NavList:
A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding
Re: UTM to lat/lon formulas
From: Paul Hirose
Date: 2003 Dec 16, 13:51 -0800
From: Paul Hirose
Date: 2003 Dec 16, 13:51 -0800
The formulas to convert between lat/lon and UTM in the Explanatory Supplement to the Astronomical Almanac (1992, first printing) seem to work well after the mistake on p. 210 is corrected. I got a C language implementation running. A lat/lon -> UTM -> lat/lon set of conversions on the Clarke 1866 spheroid yields 40N 90W -> X=756106.3785 Y=4431859.1322 -> 40.000000001N 89.999999996W The error in the final longitude is equivalent to about .3 mm. The UTM values duplicate the NGS online calculator within less than 1 mm as well. As presented in the book, the equations are ill-suited to direct translation to source code because they use many integral powers. E.g., 2 + 3D + 4D^2 + 5D^3. To avoid writing inelegant code you have to factor out D: 2 + D(3 + 4D + 5D^2). Then D can be factored out one more time inside the parentheses. It's just high-school algebra, but the grid equations are much more complex than my simple example, so I had to work carefully to avoid making a mistake. After failing many years ago, it's pleasant to have finally gotten these equations working.