User:Tim Zukas/Transv Merc

Newer formulas for the ellipsoid

Newer formulas for the ellipsoid
In Survey Review in 1989 (p374), Bowring gave formulas for the Transverse Mercator that are simpler to program but retain millimeter accuracy. First, the conversion from latitude-longitude to Transverse Mercator coordinates:

$$ a $$ = radius of the equator of the chosen spheroid $$ b $$ = polar semi-axis of the spheroid $$ k_0 $$ = scale factor along the central meridian $$ \scriptstyle \phi $$ = latitude $$ \scriptstyle \omega $$ = difference in longitude from the central meridian, in radians, positive eastward $$ m $$ = meridian distance on the spheroid from the equator to $$ \scriptstyle \phi$$ (see below)

$$ c \; = \; \cos \; \phi$$

$$ s \; = \; \sin \; \phi$$

$$ \epsilon \; \quad = \; \quad \frac{a^2 - b^2}{b^2} \quad = \quad \frac {2r - 1}{(r - 1)^2}$$ where $$ r $$ is the reciprocal of the flattening for the chosen spheroid (for WGS84, r = 298.257223563 exactly). $$ \nu \; = \quad a \sqrt{ \frac {1 + \epsilon}{1 + \epsilon c^2}}$$(prime vertical radius of curvature)

$$ z \; = \; \frac {{ \epsilon} \, { \omega}^3 \, {c}^5}{6}$$

$$ tan \; \theta_2 \; \quad = \; \quad \frac {2sc \sin^2 (\frac { \omega}{2})}{s^2 + c^2 \cos \; \omega}$$
 * $$ Easting \quad = \quad k_0 \; \nu \left [ {\tanh}^{-1} (c \sin \omega ) \; + \; z \left ( 1 + \frac { \omega ^2}{10}(36 c^2 - 29)\right ) \right ] \,\! $$
 * $$ Northing \quad = \quad k_0 \left [ m + \; \nu \theta_2 \; + \; \frac {z \nu \omega s}{4} (9 + 4 \epsilon c^2 - 11 \omega ^2 + 20 \omega ^2 c^2)\right ] \,\! $$

To convert Transverse Mercator Easting and Northing to lat-lon, first calculate $$\scriptstyle \phi '$$, the footprint latitude-- i.e. the latitude that has a meridian distance on the spheroid of Northing/$$k_0$$. Bowring's formulas below seem quickest, but the Redfearn formulas above will suffice. Then

$$ c_1 \; = \; cos \; \phi ' $$

$$ s_1 \; = \; sin \; \phi ' $$

$$ \nu_1 \; = \; a \sqrt{ \frac {1 + \epsilon}{1 + \epsilon {c_1}^2}}$$

$$ x \; = \; \frac {Easting}{(k_0) \nu_1}$$

$$ \tan \theta_4 \; = \; \frac {\sinh x}{c_1}$$

$$\tan \theta_5 \; = \; \tan \phi ' \cos \theta_4$$


 * $$ \phi \quad = \quad \left (1 + \epsilon {c_1}^2 \right ) \left [ \theta_5 - \frac { \epsilon }{24}x^4 \tan \phi '(9 - 10{c_1}^2) \right ] - \epsilon {c_1}^2 \phi '$$


 * $$\omega \quad=\quad \theta_4 - \frac { \epsilon}{60} x^3 c_1 \left ( 10 - \frac {4 x^2}{{c_1}^2} + x^2 {c_1}^2 \right )$$

Meridian distance
Bowring gave formulas for meridian distance (in Bulletin Geodesique, 1983) that seem to be correct within 0.001 millimeter on earth-size spheroids. The symbol $$n$$ is the same as in the Redfearn formulas $$n \;= \; \frac {a - b}{a + b} \; = \; \frac {1}{2r - 1}$$

$$ \tan \psi \; = \quad \frac {r - 1}{r} \tan \phi \quad = \quad \frac {1 - n}{1 + n} \tan \phi$$

$$p = 1 - \tfrac {3}{4} n \cos 2 \psi$$

$$q = \tfrac {3}{4} n \sin 2 \psi$$

$$Z = (1 - \tfrac {3}{8}n^2)(p + qi)^ \frac {2}{3}$$ where $$\quad i = \sqrt{-1}$$

Discard the real part of the complex number Z; subtract the real coefficient of the imaginary part of Z from $$\psi$$ (in radians) to get $$\theta$$. Then

meridian distance = $$ a \theta \frac {(1 + \frac {n^2}{8})^2}{1 + n}$$

(Note that if latitude is 90 degrees, then $$ \theta = \frac {\pi}{2} $$, which, it turns out, gives the length of a meridian quadrant to a trillionth of a meter on GRS80.)

For the inverse (given meridian distance, calculate latitude), calculate $$\theta$$ using the last formula above, then

$$p' = 1 - \tfrac{33}{20}n \cos 2 \theta$$ $$q' = \tfrac{33}{20} n \sin 2 \theta$$ $$Z' = \frac {5}{4}(1 - \tfrac{9}{16}n^2)(p' + q'i)^ \tfrac{8}{33}$$ Discard the real part of Z' and add the real coefficient of i to $$\theta$$ to get the reduced latitude $$\psi$$ (in radians) which converts to latitude $$ \scriptstyle \phi $$ using the equation at the top of this section.