This is similar to this question, but kind of the opposite.
I have two geographic points (latitude, longitude) A and B. Let's say they're 40 nautical miles apart. I'd like to calculate the coordinates of the point 10 nautical miles from point A, on the line between A and B. I'm sure this is very basic math, but it's been YEARS since I've had to do this kind of math (some other kinds I use daily), so I'm stuck. Any pointers would be greatly appreciated. My code for this project is in Python, but math isn't language-specific, so I'm not really concerned about that -- I just want to know the formula.
A point is an ordered pair of numbers written as (x;y) ( x; y). Distance is a measure of the length between two points. Points P (2;1) P ( 2; 1), Q(−2;−2) Q ( − 2; − 2) and R(2;−2) R ( 2; − 2) are given.
Using (3, 2) as (x 1, y 1) and (1, 5) as (x 2, y 2 ): In either case, the result is the same. The distance between two points on a 3D coordinate plane can be found using the following distance formula where (x 1, y 1, z 1) and (x 2, y 2, z 2) are the 3D coordinates of the two points involved.
where x ^, y ^ are unit vectors in the x and y directions, and D = ( x 2 − x 1) 2 + ( y 2 − y 1) 2 is the distance between P 1 and P 2. Then, if you're looking for the point a distance d away from P 1 along the line through P 1 and P 2, then, vector-based the answer is P 3 → = P 1 → + d u ^. y 3 = y 1 + d D ( y 2 − y 1). for some λ ∈ R.
Solution: Given, A (3,2) and B (9,7) are the two points in a plane. We have to find the distance between A and B. Here, x 1 = 3, x 2 = 9, y 1 = 2 and y 2 = 7. d = √61 unit.
You have two position vectors with (latitude, longitude). From those you can calculate your bearing from point A to point B (if you don't already know it). With a bearing and a distance you can calculate your new latitude and longitude.
All the math you need to know is referenced here: http://www.movable-type.co.uk/scripts/latlong.html. I deal with this stuff so infrequently it's nice to have that link saved somewhere (read: printed).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With