Switch to WGS84 Ellipsoid model of the Earth#17
Merged
Conversation
The FCC formulas have a few drawbacks: * They involve "magic constants" (given with a limited number of significant digits) with no indication of where they come from. * They are based on the Clarke ellipsoid dating back to 1866 so are inconsistent with most modern GIS systems which use the WGS84 ellipsoid. * They are written as truncated trigonometric series. There's absolutely no reason not to use the exact expressions (which are simpler!). (Expanding the exact expressions was traditionally done in order to perform integration leading to a series approximation of the elliptic integral. But that's not an issues here. Because these latitude and longitude coefficients are now exact, several tests (based on the series approximation) now fail. I've left in place the Clarke 1866 parameters. I recommend that the WGS84 parameters be substituted in the process of updating the tests. I realize that cheap-ruler is already approximate, so why quibble about the coefficients? Two reasons: * The new formulas are accurate in limit of small distance. * 50 years from now, no-one will be able to figure out what the old formulas mean.
Ellipsoid. Still to do: switch to WGS84 + rationalize the error criteria.
mourner
approved these changes
Apr 17, 2020
tmpsantos
approved these changes
Apr 17, 2020
Contributor
|
cc @zmiao, this might help with the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on: mapbox/cheap-ruler#41