aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-03-16 09:53:56 +0100
committerKristian Evers <kristianevers@gmail.com>2019-03-16 14:04:13 +0100
commit5d86735f6770fc7779578205f6f5ecbf91536035 (patch)
tree6ed1339cf96be3c286c4e9f33f51fcfda8542b0c
parentad57355dd5157914ad148ae98d7e1683a59f399d (diff)
downloadPROJ-5d86735f6770fc7779578205f6f5ecbf91536035.tar.gz
PROJ-5d86735f6770fc7779578205f6f5ecbf91536035.zip
Use 1st eccentricity instead of 2nd eccentricity
By mistake the second eccentricity was used in a few places in the Molodensky transform. According to the literature the first eccentricity should always be used in the eccentricity. This only affects the output slightly. Reported test coordinates differed by less than a millimeter. Fixes #1321
-rw-r--r--src/transformations/molodensky.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transformations/molodensky.cpp b/src/transformations/molodensky.cpp
index 373b1095..289c321e 100644
--- a/src/transformations/molodensky.cpp
+++ b/src/transformations/molodensky.cpp
@@ -140,7 +140,7 @@ static PJ_LPZ calc_standard_params(PJ_LPZ lpz, PJ *P) {
/* ellipsoid radii of curvature */
double rho = RM(a, P->es, lpz.phi);
- double nu = RN(a, P->e2s, lpz.phi);
+ double nu = RN(a, P->es, lpz.phi);
/* delta phi */
dphi = (-dx*sphi*clam) - (dy*sphi*slam) + (dz*cphi)
@@ -193,7 +193,7 @@ static PJ_LPZ calc_abridged_params(PJ_LPZ lpz, PJ *P) {
/* delta lambda */
dlam = -dx*slam + dy*clam;
- const double dlam_denom = RN(P->a, P->e2s, lpz.phi)*cphi;
+ const double dlam_denom = RN(P->a, P->es, lpz.phi)*cphi;
if( dlam_denom == 0.0 ) {
lpz.lam = HUGE_VAL;
return lpz;