in reply to Lat/Long distance calculator
# 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 | |
by Fastolfe (Vicar) on Nov 07, 2000 at 21:02 UTC |