#!/usr/bin/perl

use Math::Trig qw(great_circle_distance deg2rad);

# Notice the 90 minus latitude: phi zero is at the North Pole.
@london = (deg2rad(-  0.5), deg2rad(90 - 51.3));
@tokyo  = (deg2rad( 139.8), deg2rad(90 - 35.7));

# 6378 is the equatorial radius of the Earth, in kilometers.
print great_circle_distance(@london, @tokyo, 6378);
