Re: Latitude / longitude distance and bearing.
- From: Don Del Grande <del_grande_news@xxxxxxxxxxxxx>
- Date: Sat, 01 Sep 2007 09:55:08 -0700
Dave (from the UK) wrote:
I have two locations, call them 'a' and 'b' .
a) Altitude of a and b (call them alt_a and alt_b).
b) Latitude of b and b (call them lat_a and lat_b)
c) Longitude of a and b (call them long_a and long_b)
'a' and 'b' are fairly close together (10 - 20 km) and in line of sight
distance. (Two mountain peaks).
I want to find
1) The straight line distances from a to b. (*Not* the distance along
the circumference of the earth, which I can get from the Haversine formula)
2) The bearing of 'a' when viewed from 'b'.
3) The vertical angle - i.e how many degress above the horizon is 'a'
when viewed from 'b'. (alt_a > alt_b).
Would this work for (2):
(a) Rotate Earth through the poles until 'b' is at longitude zero;
(b) Rotate Earth through points on what is now the equator at
longitudes +90 and -90 until 'b' is now at the north pole. (Point 'a'
is rotated on a circle parallel to the one containing longitude zero.)
Since 'a' has rotated "over the top of the Earth," what was a
northernly direction from 'b' to 'a' is now southernly; the actual
bearing equals the number of degrees the new longitude of 'b' is from
longitude 180.
(If that's not quite right, you can always use the method I use for
satellite aiming; use (a) and (b) above, but then "push" Earth South a
distance equal to its radius, so 'b' is now at the origin of
rectangular coordinates; assuming Earth is a sphere of radius R, you
know the X, Y, and Z coordinates of 'a', so the tangent of the bearing
equals Y/X (assume X is the direction towards lat 0 lng 0, Y is the
direction towards lat 0 lng +90, and Z is the direction towards lat
+90). Actually, you don't even have to to (c), since all it does is
change the two points' Z-coordinates.)
-- Don
.
- References:
- Latitude / longitude distance and bearing.
- From: Dave (from the UK)
- Latitude / longitude distance and bearing.
- Prev by Date: Re: Sinc integrals
- Next by Date: Re: PDF to TeX?
- Previous by thread: Re: Latitude / longitude distance and bearing.
- Next by thread: Re: Latitude / longitude distance and bearing.
- Index(es):
Relevant Pages
|