[Proj] The world of ECEF aka geocentric coordinates
Gerald I. Evenden
geraldi.evenden at gmail.com
Fri Jan 30 11:30:28 PST 2009
When I was updating the code for the 'geodesic' system I ran into the
geocentric to geodesic conversion software embedded in the 3D version of the
Vincenty FORTRAN code. Although not a part of the geodesic program I figured
it may be of interest later so I translated in an included it in the geodesic
distribution library. Knowing the the procedures also had to be part of
Warmerdam's proj-4 I quickly checked there and decided the stay with the NGS
version. At that time I miss the fact of presence of two other versions.
Later, while browsing Wikipedia I also found another non-iterative version.
When Karney recently brought up the issue I went to his library site and find
another version.
To summarize: I now have 6, count them, 6 versions of the geocentric to
geodetic conversion:
1. An iterative version that is part of NGS's geodesic software
Frank Warmerdam's three methods in pj_Convert_Geocentric_To_Geodetic
of file geocent.c:
2. "non-iterative by Ralph Toms"
or iterative methods
3. "Wenzel iterative"
4. "U. of Hannover" method
5. Karney's cpp routine.
6. Wikipedia's noniterative at
http://en.wikipedia.org/wiki/Geodetic_system
No code, just math.
In terms of the iteration, the NGS version loop is short---only 4 lines and
works with usually 3 or less iterations with excellent precision.
do {
tglax = tgla;
tgla = P1->z / (p - ae2 / sqrt(ell->one_es * tgla * tgla + 1.));
} while ((fabs(tgla - tglax) > TOL) && --count);
Karney's routine is limited to WGS84 as is all the software in his library.
10 lashes with a wet noodle, Karney.
Some of these methods may be equivalent but I have not dug that far into the
details of the morass. I am also sure that there must be more versions out
there.
Lastly, the use of the term ECEF suggested by Wikipedia for geocentric seems
appropriate. Also, where are our ENU procedures? Tsk, tsk.
--
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist
More information about the Proj
mailing list