Distance using WGS84-ellipsoid

Daniele Peruzzini picture Daniele Peruzzini · Oct 9, 2012 · Viewed 12k times · Source

Consider points P1 (60°N, 20°E, 0) and P2 (60°N, 22°E, 0) on the surface of the Earth

What is the shortest distance between the points P1 and P2, when the shape of the Earth is modeled using WGS-84 ellipsoid?

Answer

cffk picture cffk · Jan 3, 2014

Unfortunately, Vincenty's algorithm fails to converge for some inputs. GeographicLib provides an alternative which always converges (and is also more accurate). Implementations in C++, C, Fortran, Javascript, Python, Java, and Matlab are provided. E.g., using the Matlab package:

format long;
geoddistance(60,20,60,22)
->
111595.753650629