Skip to content
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

Open
cffk opened this issue Apr 23, 2018 · 2 comments
Open

Bad value of EARTH_RADIUS #5051

cffk opened this issue Apr 23, 2018 · 2 comments

Comments

@cffk
Copy link

cffk commented Apr 23, 2018

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.

@danpat
Copy link
Member

danpat commented Apr 23, 2018

@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.

@cffk
Copy link
Author

cffk commented Apr 23, 2018

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants