aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Karney <charles.karney@sri.com>2020-10-27 10:02:27 -0400
committerCharles Karney <charles.karney@sri.com>2020-10-27 10:02:27 -0400
commit94e36270ca393bd7b107bf690f09fd8ec1cd046b (patch)
treedd153675742ead1db539f3b7d155b6bb95ba4d7c /src
parent6bd7c777f8e789f8ea34a6aa68104ab44a31beee (diff)
downloadPROJ-94e36270ca393bd7b107bf690f09fd8ec1cd046b.tar.gz
PROJ-94e36270ca393bd7b107bf690f09fd8ec1cd046b.zip
Use nm units in builtins.gie. Remove backward looking comments in code.
Diffstat (limited to 'src')
-rw-r--r--src/phi2.cpp10
-rw-r--r--src/tsfn.cpp3
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);