Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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).

share|improve this question
up vote 8 down vote accepted

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.

share|improve this answer
Great, exactly what I was looking for. Thanks! – Pris Feb 23 '12 at 22:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.