Posted by Pupkin on 11/30/06 19:57
$r = the radius of the earth, but which radius?
http://en.wikipedia.org/wiki/Earth_radius
In article <kr8bh.89$2A7.29@newsfe03.lga>, no.one@example.com says...
> $distance = $r *
> acos(
> cos($lat1) *
> cos($lon1) *
> cos($lat2) *
> cos($lon2) +
> cos($lat1) *
> sin($lon1) *
> cos($lat2) *
> sin($lon2) +
> sin($lat1) *
> sin($lat2)
> );
>
> where:
>
> $r -- radius of the Earth
> $lat1 -- latitude of point 1 in radians
> $lon1 -- longitude of point 1 in radians
> $lat2 -- latitude of point 2 in radians
> $lon2 -- longitude of point 2 in radians
>
[Back to original message]
|