The distance between two points...
const EARTH_RADIUS_MILES = 3963;
$x = (sin($latitude1) * sin($latitude2)) + (cos($latitude1) * cos($latitude2) * cos($longitude2 - $longitude1));
$distance = EARTH_RADIUS_MILES * (-1 * atan($x / sqrt(1 - $x * $x)) + PI / 2);
Posted by Luke at 2:13 p.m.
Threeve
Posted by Nathan on 2007.07.26 at 5:11 p.m.
My brain hurts.
Posted by Elli on 2007.08.05 at 9:58 a.m.
Oh, it's not that bad. ;)
Posted by Luke on 2007.08.07 at 2:35 a.m.
Post a Comment