-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad value of EARTH_RADIUS #5051
Comments
@cffk Ultimately, the 6372.8km value comes from http://math.wikia.com/wiki/Ellipsoidal_quadratic_mean_radius. I believe it was copied from libosmium Whether it's the right thing to use or not is another question. We have a PR open at the moment here #5041 that will likely deprecate this constant. |
Yes, I know about this source. Unfortunately, I can't make head or tail of it. There's a long discussion between me and Kaimbridge, the proponent of the quadratic mean radius here. Click on the "show" for the "extended discussion". |
This issue seems to be stale. It will be closed in 30 days if no further activity occurs. |
The constant is still there: osrm-backend/include/util/coordinate_calculation.hpp Lines 22 to 24 in 4930d2e
But nothing uses it anymore as of #6315. |
EARTH_RADIUS is earth's radius for use in great circle calculations where the earth is treated as a sphere. The recommended value for such a quantity is the mean radius = (2a + b)/3 = 6371 km. The value defined in coordinate_calculation.hpp and haversine.hpp is about (3a + b)/4 = 6372.8 km. There's no justification for this value.
The text was updated successfully, but these errors were encountered: