I wish to implement this formula from Wikipedia to convert LLA to ECEF coordinates:



enter image description here

and a and b are the semi-major and semi-minor axes respectively.

My question is: what units will this work with? This paper says the equation is in meters. I am wondering if it can be more general than that. Can I use any unit of distance so long as I am consistent?

  • Semi-major (ie a), Semi-minor (ie b), and Ellipsoid Height (ie h) must be in the same unit of length, eg all must be in meters, or all in feets, and etc.
  • Unit of measurement of X, Y, Z follow the unit of length of a, b, h.
  • By convention, ECEF X, Y, Z are always in meters.

As long as you use the same linear unit, you can use whatever linear unit you want. As far as I know, the angular units must be in radians.

Your Answer

