From: Strebe@AOL.COM (daan Strebe) Newsgroups: sci.math Subject: Re: Lat and Long equation Date: Tue, 02 Jul 1996 14:36:10 -0600 In article <836320485.17059.0@gawai.demon.co.uk>, john@gawai.demon.co.uk (John) wrote: |>mike@mdhawkgy.demon.co.uk (mike) wrote: |> |>>Hi, |>>Can anybody help me with a slight mathematical equation problem. |>>What I am looking for is some sort of equation that will calculate |>>from two Lat and Long's (e.g. N5120.12 W00310.11) the distance between |>>them. |>>(If there is a more suitable newsgroup I should have posted this |>>request to then a small note to the affect would be grateful). |>>Many Thanks |>>MIKE |> |>I'm asking this question at the moment in another thread (Calculate |>distance on surface of Sphere). If you haven't seen it, I've pasted |>the reply from Anthony Hugh Back. |> |>JOhn |> |>> |>> Hello, |>> |>> Can anyone give me any pointers as to how one calculates distance over |>> the surface of a sphere (the Earth) when you are given just longitude |>> and latitude. |>> |>> It is easy to calc the difference in X or Y (east-West, North-south) |>> but I don't know how to go any furthur. |>> |>> Thanks very much |>> |>> John |>> |> |>cos(AOB)=cos(latA)cos(latB)cos(lonB-lonA)+sin(latA)sin(latB) Actually trying to compute the above formula for very short distances fails because of roundoff error. The following formula is suitable for all distances: sin^2 (AOB/2) = sin^2 ([latB-latA]/2) + cos (latA) * cos (latB) * sin^2 ([lonB-lonA]/2) daan