A collection of algorithms I use for the analysis of geospatial data. Written in C, wrapped in Python.
GNU General Public License v3.0
22
stars
12
forks
source link
[Bug] Error in Vincenty Distance Code. Latitude and Longitude Inverted #1
Closed
MurrayData closed 5 years ago
There is an error in the Vincenty Distance Calculation.
Looking at the Formula https://en.wikipedia.org/wiki/Vincenty's_formulae
Lambda is Longitude, Phi is Latitude
In the code these are the wrong way round.
If you change the lines as follows:
It works fine and I've checked it against the online calculator here https://geographiclib.sourceforge.io/cgi-bin/GeodSolve
and Haversine distance from several spatial libraries.