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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With