You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The haversine distance from my understanding is supposed to work on a sphere, however, the notion on reduced latitude and flattening factors exist to deal with the non-spherical nature of the Earth (see https://en.wikipedia.org/wiki/Flattening). I am by no means an expert, I could very well be wrong.
Moreover, reading the wikipage and other implementations the transformation to a reduced latitude is not needed for the haversine distance, the latitude is used directly. Here are some references:
Repository commit
2e405f3
Python version (python --version)
NA
Dependencies version (pip freeze)
NA
Expected behavior
First of thanks for all the algorithms and the work!
The current (and initial) implementation of the haversine distance is using reduced latitudes (as one does for Lambert's formula see https://en.wikipedia.org/wiki/Geographical_distance#Lambert's_formula_for_long_lines), however, from my understanding the haversine distance should be using the raw latitudes (in radians like the longitudes are currently being handled). At least that is how it is written in https://en.wikipedia.org/wiki/Haversine_formula#Formulation .
The haversine distance from my understanding is supposed to work on a sphere, however, the notion on reduced latitude and flattening factors exist to deal with the non-spherical nature of the Earth (see https://en.wikipedia.org/wiki/Flattening). I am by no means an expert, I could very well be wrong.
Moreover, reading the wikipage and other implementations the transformation to a reduced latitude is not needed for the haversine distance, the latitude is used directly. Here are some references:
additional implementations:
I think most likely there was some confusion with Lambert's formula.
I am happy to make a small PR, if there is an agreement with my observation.
Actual behavior
Use the right angles and the results should slightly be different. I did some test, it is not that significant.
The text was updated successfully, but these errors were encountered: