More comprehensive reverse JHS formula for computing latitude,longitude given northing, easting of a projection.
reference: Geomatics guidance Note number 7 part 2 - 3.5.3.1
(EPSG Dataset coordinate operation method code 9807)
spheroid constants:
-
$\text{f}$ flattening -
$a$ semi-major axis -
$e^2= 2\text{f} - \text{f}^2$ eccentricity
projection constants:
-
$\varphi_0$ Latitude of orgin -
$\lambda_0$ Longitude of origin (sometimes called central meridian) -
$k_0$ scale factor -
$FE$ false easting -
$FN$ false northing
-
$h_1 = \frac{n}{2} - \frac{2}{3}n^2 + \frac{5}{16}n^3 + \frac{41}{180}n^4$ -
$h_2 = \frac{13}{48}n^2 - \frac{3}{5}n^3 + \frac{557}{1440}n^4$ -
$h_3 = \frac{61}{240}n^3 - \frac{103}{140}n^4$ -
$h_4 = \frac{49561}{161280}n^4$
Obs:
-
$h'_1 = \frac{n}{2} - \frac{2}{3} n^2 + \frac{37}{96} n^3 - \frac{1}{360} n^4$ -
$h'_2 = \frac{1}{48} n^2 + \frac{1}{15} n^3 - \frac{437}{1440} n^4$ -
$h'_3 = \frac{17}{480} n^3 - \frac{37}{840} n^4$ -
$h'_4 = \frac{4397}{161280} n^4$
meridional arc distance from equator to the projection origin
if
else if
else if
else:
-
$\xi_{O1} = h_1 \sin(2\xi_{O0})$ -
$\xi_{O2} = h_2 \sin(4\xi_{O0})$ -
$\xi_{O3} = h_3 \sin(6\xi_{O0})$ -
$\xi_{O4} = h_4 \sin(8\xi_{O0})$
end
Given easting
$\xi'_1 = h'_1 \text{sin}(2\xi')\text{ cosh}(2\eta')$ $\xi'_2 = h'_2 \text{sin}(4\xi')\text{ cosh}(4\eta')$ $\xi'_3 = h'_3 \text{sin}(6\xi')\text{ cosh}(6\eta')$ $\xi'_4 = h'_4 \text{sin}(8\xi')\text{ cosh}(8\eta')$ $\xi'_0 = \xi' - (\xi'_1 + \xi'_2 + \xi'_3 + \xi'_4)$
$\eta'_1 = h'_1 \text{cos}(2\xi')\text{ sinh}(2\eta')$ $\eta'_2 = h'_2 \text{cos}(4\xi')\text{ sinh}(4\eta')$ $\eta'_3 = h'_3 \text{cos}(6\xi')\text{ sinh}(6\eta')$ $\eta'_4 = h'_4 \text{cos}(8\xi')\text{ sinh}(8\eta')$ $\eta'_0 = \eta' - (\eta'_1 + \eta'_2 + \eta'_3 + \eta'_4)$
Finally: