diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/phi2.cpp | 10 | ||||
| -rw-r--r-- | src/tsfn.cpp | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/phi2.cpp b/src/phi2.cpp index b9b37765..0fdca47c 100644 --- a/src/phi2.cpp +++ b/src/phi2.cpp @@ -116,6 +116,7 @@ double pj_phi2(projCtx ctx, const double ts0, const double e) { * Determine latitude angle phi-2. * Inputs: * ts = exp(-psi) where psi is the isometric latitude (dimensionless) + * this variable is defined in Snyder (1987), Eq. (7-10) * e = eccentricity of the ellipsoid (dimensionless) * Output: * phi = geographic latitude (radians) @@ -123,13 +124,12 @@ double pj_phi2(projCtx ctx, const double ts0, const double e) { * psi = log( tan(pi/4 + phi/2) * * ( (1 - e*sin(phi)) / (1 + e*sin(phi)) )^(e/2) ) * = asinh(tan(phi)) - e * atanh(e * sin(phi)) + * = asinh(tan(chi)) + * chi = conformal latitude * - * OLD: This routine inverts this relation using the iterative scheme given - * by Snyder (1987), Eqs. (7-9) - (7-11). + * This routine converts t = exp(-psi) to * - * NEW: This routine converts t = exp(-psi) to - * - * tau' = sinh(psi) = (1/t - t)/2 + * tau' = tan(chi) = sinh(psi) = (1/t - t)/2 * * returns atan(sinpsi2tanphi(tau')) ***************************************************************************/ diff --git a/src/tsfn.cpp b/src/tsfn.cpp index a0960a66..8ed258d6 100644 --- a/src/tsfn.cpp +++ b/src/tsfn.cpp @@ -11,10 +11,13 @@ double pj_tsfn(double phi, double sinphi, double e) { * e = eccentricity of the ellipsoid (dimensionless) * Output: * ts = exp(-psi) where psi is the isometric latitude (dimensionless) + * = 1 / (tan(chi) + sec(chi)) * Here isometric latitude is defined by * psi = log( tan(pi/4 + phi/2) * * ( (1 - e*sin(phi)) / (1 + e*sin(phi)) )^(e/2) ) * = asinh(tan(phi)) - e * atanh(e * sin(phi)) + * = asinh(tan(chi)) + * chi = conformal latitude ***************************************************************************/ double cosphi = cos(phi); |
