GreatCircleDistance function

 

The Excel GreatCircleDistance function returns the line-of-flight distance between two latitude-longitude pairs.

Usage:

=GreatCircleDistance(lat1, long1, lat2, long2)

Where:

lat1, long1 are the coordinates of the origin

lat2, long2 are the coordinates of the destination

Examples:

=GreatCircleDistance(1,2,3,4) returns 5

Notes:

The distance is calculated using Vincenty’s formulae, with fallback to the Haversine formula when Vincenty’s method doesn’t converge.

The results are accurate to better than 0.5mm for all cases except those where Haversine is used. These all occur at longitudes between -179.5 and 179.5, which are in the middle of the Pacific.

 Posted by on 2011/04/06 at 09:19

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)