# Characteristics of different methods to convert ECEF to LLA

I'm trying to convert ECEF (Earth Centered, Earth Fixed) coordinates, which are defined in X,Y,Z, centered at (0,0,0) to LLA (Latitude, Longitude, Altitude). There are a couple of methods I found on the internet (please let me know if there are better methods). Both are clearly described in this document, on pages 3-4:

http://www.microem.ru/pages/u_blox/tech/dataconvert/GPS.G1-X-00006.pdf

One uses an iterative method and the other is a closed form solution. I would like to know which method to use for my application. Two relevant criteria are speed (computation time) and accuracy. The algorithms aren't difficult to implement, but I don't think it's straightforward to compare the two... For example, I feel like accuracy will vary by the input ECEF coordinate.

So does anyone have more information about each method? It would be great if I could get which one is faster (guessing closed form) and a rough accuracy I can expect from each (ie, within how many meters of the actual LLA can I expect my answer to be or something along those lines).

• Apr 3, 2018 at 20:35
• If the above link to the Ligas & Banasik paper doesn't work for you, try this one - researchgate.net/publication/… May 27, 2020 at 16:07

You can compare the two. In most applications I suspect the second (direct) method will be the one to choose.

Accuracy of the first (iterative) method depends on the accuracy with which you do the computations and when you decide to stop iterating. It therefore can be made as accurate as the second method for all inputs where both are valid (the first method works only for terrestrial heights, not for astronomical ones).

Which is faster depends on the programming environment, the computing architecture, and how much accuracy is needed. (In my tests with Mathematica, the second--direct--method is actually twice as fast as the first, practically no matter how much inaccuracy was tolerated in the iterative method.) Because both methods take about the same amount of computation but the first has to iterate at least once, it actually can be slower. If you're only doing the conversions at sea level (h=0), the iterative method might be a little faster, but the difference isn't going to be huge (I would be surprised by a twofold advantage).

BTW, note that the "closed formula" (for the second method) is a little deceptive: when you get to computing the height h, you need to obtain the radius of curvature N in terms of the latitude you have just calculated (phi). To do that, use the formula for N found in the preceding section.

The naïve algorithm you mentioned (can also be seen here) converges very slowly (approximately millimeter distance error after 2 iterations). Apply Newton's method if you wish to converge quicker.

For a much better iterative algorithm, try Bowring (1976). In my tests, it gives approximately nanometer distance error after 2 iterations.

For a good closed-form algorithm, I recommend Olson (1996), which also gives approximately nanometer distance error. It's in the public domain, and it's quite fast, too.