Skip to content

Switch to WGS84 Ellipsoid model of the Earth#17

Merged
vng merged 10 commits intomasterfrom
cffk-formula-fix
Apr 17, 2020
Merged

Switch to WGS84 Ellipsoid model of the Earth#17
vng merged 10 commits intomasterfrom
cffk-formula-fix

Conversation

@vng
Copy link
Copy Markdown
Contributor

@vng vng commented Apr 17, 2020

cffk and others added 10 commits April 25, 2018 14:57
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.
@tmpsantos
Copy link
Copy Markdown
Contributor

cc @zmiao, this might help with the distance expression precision

@vng vng merged commit dabf612 into master Apr 17, 2020
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

Successfully merging this pull request may close these issues.

4 participants