Re: Latitude / longitude distance and bearing.



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
.



Relevant Pages

  • Re: Calculating a Distance on the Surface of the Earth
    ... latitude and longitude. ... I'd actually be above the surface of the earth due to the ... to the surface of the earth, I'd like to know the distance between ... longitude of the second point. ...
    (sci.geo.satellite-nav)
  • Re: Search within 50 miles of xxxx zipcode
    ... If the 50 radius takes you over a mountain range, or a body of water, then ... your driving distance can vary a great deal. ... Latitude and Longitude are always approximate, as the surface of the earth ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Search within 50 miles of xxxx zipcode
    ... Here are a few methods that calculate distance between 2 points of Latitude ... and Longitude. ... the earth is an oblate spheroid, rather than a sphere, and therefore, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Calculating a Distance on the Surface of the Earth
    ... I'd actually be above the surface of the earth due to the ... The latitude/longitude of a point on the earth's surface and the distance and direction to a second point, compute the latitude and longitude of the second point. ...
    (sci.geo.satellite-nav)
  • Re: space time
    ... The definition "A light-year is the distance light travels in 1 year" ... a world used to using the sun for so many other events in their lives. ... a light would travel in one earth orbit. ...
    (talk.origins)