Basically I'm writing and try to Optimize as much as possible a library for long range navigation. Using age old principle of great circles . I am to tired to explain this well and a picture is worth a thousand words so look at these images up here that show the concept better than I can explain right now. Basically at a certain point let's say 200 miles using regular geometry like dlon^2+dlat^2=dst^2 is no longer sufficient. Because earth is a sphere sphere like so instead . We get haversine formula dat=2*asin(sqrt((sin(dlat/2)^2)+cos(lat1)*cos(lat2)*(sin(dlng/2)^2))) and if your doing all that extra there's gotta be a reason.