in reply to Lat/Long distance calculator

Also see Math::Trig's great_circle_distance function. From the documentation:
# To calculate the distance between London (51.3N 0.5W) # and Tokyo (35.7N 139.8E) in kilometers: use Math::Trig qw(great_circle_distance deg2rad); # Notice the 90 - latitude: phi zero is at the North Pole. @L = (deg2rad(-0.5), deg2rad(90 - 51.3)); @T = (deg2rad(139.8),deg2rad(90 - 35.7)); $km = great_circle_distance(@L, @T, 6378);

Replies are listed 'Best First'.
(jcwren) RE: (2) Lat/Long distance calculator
by jcwren (Prior) on Nov 07, 2000 at 21:00 UTC
    Typical. I searched CPAN for latitude, longitude, Geo, and a few others, but not Math::Trig. Hardly an intuitive place to look.

    --Chris

    e-mail jcwren
      I agree. I only happened to remember it because I had examined Math::Trig for unrelated functions in the past and noticed it was in there.