Substitute the exact formulas for the meridional and normal curvatures.#13
Substitute the exact formulas for the meridional and normal curvatures.#13cffk wants to merge 3 commits intomapbox:masterfrom
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.
|
The coefficients in the FCC formulas are only quoted to the nearest centimeter and one of the coefficients is off by about 3 cm (the coefficient of |
mourner
left a comment
There was a problem hiding this comment.
This is great! Let's update the ellipsoid and the tests.
|
I'll update the tests... I notice that |
|
Yeah, agreed about the error checking. |
Ellipsoid. Still to do: switch to WGS84 + rationalize the error criteria.
|
I recommend deferring the update to the ellipsoid and the redoing of the tests to a separate pull request. As it stands, the formulas are in a saner form and the existing tests are all working. It would be good to know how the existing "good" results for tests were created so that I know how to update them for WGS84. |
|
Here is the updated version: #17 |
The FCC formulas have a few drawbacks:
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: