 Article
 Open Access
Explicitly computing geodetic coordinates from Cartesian coordinates
 Huaien Zeng^{1, 2}Email author
https://doi.org/10.5047/eps.2012.09.009
© The Society of Geomagnetism and Earth, Planetary and Space Sciences (SGEPSS); The Seismological Society of Japan; The Volcanological Society of Japan; The Geodetic Society of Japan; The Japanese Society for Planetary Sciences; TERRAPUB. 2012
 Received: 7 February 2012
 Accepted: 21 September 2012
 Published: 7 May 2013
Abstract
This paper presents a new form of quartic equation based on Lagrange’s extremum law and a Groebner basis under the constraint that the geodetic height is the shortest distance between a given point and the reference ellipsoid. A very explicit and concise formulae of the quartic equation by Ferrari’s line is found, which avoids the need of a good starting guess for iterative methods. A new explicit algorithm is then proposed to compute geodetic coordinates from Cartesian coordinates. The convergence region of the algorithm is investigated and the corresponding correct solution is given. Lastly, the algorithm is validated with numerical experiments.
Key words
 Geodetic coordinates
 Cartesian coordinates
 Groebner basis
 Ferrari’s solution
 convergence region
1. Introduction
The transformation between Cartesian coordinates and geodetic coordinates is a basic problem frequently encountered in geodesy and astronomy, e.g., in GPS positioning. Computing Cartesian coordinates from geodetic coordinates is a very easy task, but the inverse transformation poses a difficulty. For the latter, numerous solutions have been proposed, which can be classified into two categories. One category is an iterative solution. Bowring (1976) derived a trigonometric equation which was solved by the Newton algorithm with a single iteration. Fukushima (1999) solved a modified Borkowski’s quartic equation by the Newton method, and, later, Fukushima (2006) developed a new and faster iterative procedure using Halley’s method. Jones (2002) found a new solution with the Newton method in the reduced latitude. Pollard (2002) presented two vector methods which do not involve quartic equations, and Feltens (2009) has also presented a vector method. The other category are closed form solutions, which maybe more straightforward and efficient; however, they are relatively rare until recently. Paul (1973) proposed a closed form solution based on the wellknown theory for solutions of biquadratic equations (Burnside and Panton, 1904). Borkowski (1989) proposed two accurate closed solutions, of which one is approximate and the other is exact. Vermeille (2002) proposed a closedform algebraic method, which is well known and is used the most. Vermeille (2004) improved the formulae of Vermeille (2002) to extend the validity domain. Zhang et al. (2005), using the method of extrema with constraints and generalized Lagrange’s multipliers obtained a four new equations, and presented an alternative algebraic algorithm. GonzalezVega and PoloBlanco (2009) have used symbolic tools to characterize the Vermeille and Borkowski approaches. Featherstone and Claessens (2008) have reviewed the state of the art of closedform transformations between geodetic and ellipsoidal coordinates.
This paper presents a new form of quartic equation with Lagrange’s extremum law and a Groebner basis technique, and seeks a very explicit and concise formulae of the quartic equation by Ferrari’s line. A new algorithm to compute geodetic coordinates from Cartesian coordinates is then presented, and the convergence region of the algorithm is investigated. Lastly, the algorithm is validated through numerical experiments.
2. Description of the Presented Algorithm
2.1 Brief review of a Groebner basis
A Groebner basis for ideals in a polynomial ring was developed by B. Buchberger in 1965. It is a method of establishing the standard basis of a nonlinear polynomial system as follows. In the polynomial ring formed by the original nonlinear polynomial system, after the proper sort of the polynomial variables, seek the Spolynomial (subtraction polynomial) of the polynomial pairs from the polynomial ring, and then carry out polynomial reduction and elimination. Finally, a standard basis is generated which is completely equal with the original system, and which neither increases, nor decreases, the roots.

Step 1: Let G := F.

Step 2: Construct set B of polynomial pairs from G. B = {(f_{ i }, f_{ j }) ǀ f_{ i }, f_{ j } ∈ G, i ≠ j}.

Step 3: If B is a null set, go to Step 10.

Step 4: Select an element of B, (f_{ i }, f_{ j }), and exclude it from B, i.e., let B = B − {(f_{ i }, f_{ j })}.

Step 5: Compute the Spolynomial s = S(f_{ i }, f_{ j }).

Step 6: Compute the remainder following the division of s by the G, denoted by .

Step 7: If , go to Step 3.

Step 8: Add into set .

Step 9: Update . Turn to Step 4.

Step 10: Output the reduced Groebner basis GB according to G.
2.2 Problem formulation based on Lagrange’s constraint and a Groebner basis
2.3 The presented algorithm
 (1)Computation of Bhowever, for the case D = 0, i.e. B = ±90°, the Eq. (11) is undefined. It can be computed as follows by the tangent of the half value.thusNote this formula is fit for the case that B = ±90°; namely, the region of the poles.
 (2)Computation of LBy means of Eq. (1), the following expression is obtained,however when X = 0, i.e. L = ±90°, Eq. (14) has no meaning. In the same manner as the computation of B, we can compute L as follows.considering its applicability of Eq. (15), we obtainNote it is suitable for any case except Y = 0, X ≤ 0, i.e. L = ±180°.
 (3)
2.4 Convergence region of the presented algorithm
Obviously, there are some regions in which a point can have many geodetic coordinates. If P is the center of Earth, i.e. X = 0, Y = 0, Z = 0, the presented algorithm is invalid, and the geodetic coordinates of P may be B = 0°, L ∈ [−180°, 180°], h = −a, or B = ±90°, L ∈ [−180°, 180°], h = −b. If P is in the region of the polar axis, i.e. X = 0, Y = 0, Z > 0 or X = 0, Y = 0, Z < 0, its geodetic coordinates are B = 90°, L ∈ [−180°, 180°], h = −b, or B = −90°, L ∈ [−180°, 180°], h = −b. It is proved below that the formula of B and h of the presented algorithm is suitable in the region of the polar axis.
 (1)
Region near the center of the Earth It is indicated by numerous computations that in the region near the center of the Earth (approximately having the sphere of radius from the center of the Earth) the solution of the equation is singular. That is to say the algorithm is invalid in this region.
 (2)Region of the polar axis of the Earth The real number solution of p is shown in Fig. 2, and the solution is summarized in Table 1.Table 1.
Solution of p in the region of the polar axis.
Region
Real number solutions
Complex number solutions
Right real number solution
Outside the evolute
P_{1}, P_{2}, P_{3}, P_{4}
none
P _{1}
On the evolute
P_{1}, P_{2}, P_{3}, P_{4} (P_{2} = P_{4})
none
P _{1}
Inside the evolute*
P_{1}, P_{2}
P_{3}, P_{4}
P _{1}
 (3)Region of the equatorial plane of the Earth The real number solution of p is shown in Fig. 3, and the solution is summarized in Table 2.Table 2.
Solution of p in the region of the equatorial plane.
Region
Real number solutions
Complex number solutions
Right real number solution
Outside the evolute
P_{1}, P_{2}, P_{3}, P_{4}
none
P _{1}
On the evolute
P_{1}, P_{2}, P_{3}, P_{4} (P_{2} = P_{4})
none
P _{1}
Inside the evolute*
P_{3}, P_{4}
P_{1}, P_{2}
P _{4}
 (4)Region except near the center, the polar axis, and the equatorial plane of the Earth The real number solution of p is shown in Fig. 4, and the solution is summarized in Table 3.Table 3.
Solution of p in the region except near the center, the polar axis, and the equatorial plane of the Earth.
Region
Real number solutions
Complex number solutions
Right real number solution
Outside the evolute
P_{1}, P_{3}
P_{3}, P_{4}
P _{1}
On the evolute
P_{1}, P_{2}, P_{3}, P_{4} (P_{2} = P_{4})
none
P _{1}
Inside the evolute*
P_{1}, P_{2}, P_{3}, P_{4}
none
P _{1}
Whereas Figs. 2, 3, and 4, are depicted for the case that B ∈ [0°, 90°], L ∈ [0°, 180°], the conclusion of Tables 1, 2, and 3, can apply for the globe, i.e. B ∈ [−90°, 90°], L ∈ [−180°, 180°].
3. Numerical Experiments and Discussion
3.1 Experiments for the surface, and outer space, regions of the Earth
Statistics of the errors computed with the algorithms presented by Vermeille and this paper.
log_{10} ǀΔBǀ, ΔB in second  log_{10} ǀΔhǀ, Δh in meter  

Algorithms  Min  Second least value  Max  Average^{1}  RMSE^{1}  Min  Second least value  Max  Average^{2}  RMSE^{2} 
Presented by Vermeille  −∞  −11.9  −10.0  −11.3  0.44  −∞  −10.9  −7.5  −9.3  0.52 
Presented in this paper  −∞  −12.1  −10.3  −11.3  0.44  −∞  −10.9  −7.9  −9.1  0.55 
3.2 Experiments for the inner space region of the Earth
 (1)Region of the polar axis of the EarthThe simulated computation indicates that the error ΔB is always zero, and the errors Δh are correlated with the distance S between the point P and the center of the Earth, which is shown in Table 5. It is seen from Table 5 that the error decreases dramatically with an increase of S. If an accuracy of one centimeter (common geodetic demand) is required, S must be more than 100 km.Table 5.
The magnitude of error Δh corresponding to different values of S along the polar axis.
S (km)
1
10
20
42.8*
100
300
1000
3000
6300
Δh (m)
10^{3}
101
10^{0}
10^{−1}
10^{−2}
10^{−4}
10^{−6}
10^{−8}
10^{−∞}
 (2)Region of the equatorial plane of the EarthThe simulated computation indicates that the error ΔB is always zero, and the errors Δh are correlated to the distance between the point P and the center of the Earth, which is shown in Table 6. It is seen from Table 6 that with an increase of S inside the evolute, the error decreases dramatically to the 10meter level, and then increases dramatically to +∞; with an increase of S outside the evolute, the error again decreases dramatically. If an accuracy of one centimeter (common geodetic demand) is required, S must be more than 200 km.Table 6.
The magnitude of error Δh corresponding to different values of S in the equatorial plane.
S (km)
1
10
20
40
42
42.6*
43
45
Δh (m)
10^{3}
10^{2}
10^{1}
10^{2}
104
10^{∞}
10^{4}
10^{2}
S (km)
60
80
200
400
800
1600
3200
6300
Δh (m)
10^{0}
10^{−1}
10^{−2}
1010^{−4}
1010^{−5}
1010^{−6}
1010^{−8}
1010^{−9}
 (3)Region except near the center, polar axis and equatorial plane of the EarthThe simulated computation indicates that the errors ΔB and Δh are correlated with the distance between the point P and the center of the Earth, which are shown in Tables 7 and 8, taking the case that B = 11°, L = 45° for example. It is seen from Tables 7 and 8 that the errors ΔB and Δh decrease dramatically with an increase of S.Table 7.
The magnitude of error ΔB corresponding to different values of S in the region except near the center, the polar axis and the equatorial plane.
S (km)
31
34
78
178
378
1000
3000
6300
ΔB (°)
10^{−2}
10^{−4}
10^{−6}
10^{−8}
10^{−10}
10^{−12}
10^{−15}
1015
Because the algorithm presented by Vermeille (2004) is invalid when the distance between the point P and the center of the Earth is less than 43 km, I do not compare the two algorithms for this region, and the result is comparable with other regions.Table 8.The magnitude of error Δh corresponding to different values of S in the region except near the center, the polar axis and the equatorial plane.
S (km)
31
34
78
178
378
1000
3000
6300
Δh (m)
10^{3}
10^{2}
10^{−1}
10^{−2}
^{−4}
^{−6}
10^{−8}
10^{−9}
4. Conclusion
A new explicit algorithm for computing geodetic coordinates from Cartesian coordinates is presented. Numerical experiments indicate that it is correct for any point except the region near the center of the Earth, and give a good transformation accuracy for different regions, including the surface, outer, and inner space, of the Earth. The results show that the presented algorithm is comparable to the algorithm of Vermeille (2004).
Notes
Declarations
Acknowledgments
The work of this paper is supported by the National Natural Science Foundation of China (Grant No. 41104009), Open Research Fund Program of the Key Laboratory of Geospace Environment and Geodesy, Ministry of Education, China (Grant No. 110104), and the Open Foundation of the Key Laboratory of Precise Engineering and Industry Surveying, National Administration of Surveying, Mapping and Geoinformation of China (Grant No. PF20114). The author is grateful to the support and good working atmosphere provided by his research team in China Three Gorges University. The author also thanks Professor Kiyoshi Yomogida of Hokkaido University, Japan, Associate Professor Shinichi Miyazaki of Kyoto University, Japan, and two anonymous reviewers for valuable comments and suggestions, which enhanced the quality of this manuscript.
Authors’ Affiliations
References
 Borkowski, K. M., Accurate algorithms to transform geocentric to geodetic coordinates, Bull. Geod., 63, 52–54, 1989.View ArticleGoogle Scholar
 Bowring, B. R., Transformation from spatial to geodetic coordinates, Surv. Rev., 23, 323–327, 1976.View ArticleGoogle Scholar
 Burnside, W. S. and A. W. Panton, Theory of Equations, Dublin Univ. Press Series, p. 121–125, 1904.Google Scholar
 Featherstone, W. E. and S. J. Claessens, Closedform transformation between geodetic and ellipsoidal coordinates, Stud. Geophys. Geod., 52, 1–18, 2008.View ArticleGoogle Scholar
 Feltens, J., Vector method to compute the Cartesian (X, Y, Z) to geodetic (φ, λ, h) transformation on a triaxial ellipsoid, J. Geod., 83, 129–137, 2009.View ArticleGoogle Scholar
 Fukushima, T., Fast transform from geocentric to geodetic coordinates, J. Geod., 73, 603–610, 1999.View ArticleGoogle Scholar
 Fukushima, T., Transformation from Cartesian to geodetic coordinates accelerated by Halley’s method, J. Geod., 79, 689–693, 2006.View ArticleGoogle Scholar
 GonzalezVega, L. and I. PoloBlanco, A symbolic analysis of Vermeille and Borkowski polynomials for transforming 3D Cartesian to geodetic coordinates, J. Geod., 83, 1071–1081, 2009.View ArticleGoogle Scholar
 Jones, G. C., New solutions for the geodetic coordinate transformation, J. Geod., 76, 437–446, 2002.View ArticleGoogle Scholar
 Paul, M. K., A note on computation of geodetic coordinates from geocentric (Cartesian) coordinates, Bull. Geod., 108(2), 135–139, 1973.View ArticleGoogle Scholar
 Pollard, J., Iterative vector methods for computing geodetic latitude and height from rectangular coordinates, J. Geod., 76, 36–40, 2002.View ArticleGoogle Scholar
 Shmakov, S. L., A universal method of solving quartic equations, Int. J. Pure Appl. Math., 71, 251–259, 2011.Google Scholar
 Vermeille, H., Direct transformation from geocentric coordinates to geodetic coordinates, J. Geod., 76, 451–454, 2002.View ArticleGoogle Scholar
 Vermeille, H., Computing geodetic coordinates from geocentric coordinates, J. Geod., 78, 94–95, 2004.View ArticleGoogle Scholar
 Zhang, C. D., H. T. Hsu, X. P. Wu, S. S. Li, Q. B. Wang, H. Z. Chai, and L. Du, An alternative algorithm to transform Cartesian to geodetic coordinates, J. Geod., 79, 413–420, 2005.View ArticleGoogle Scholar