Documentation Center

  • Trial Software
  • Product Updates

ecef2lla

Convert Earth-centered Earth-fixed (ECEF) coordinates to geodetic coordinates

Syntax

lla = ecef2lla(p)
lla = ecef2lla(p, model)
lla = ecef2lla(p, f, Re)

Description

lla = ecef2lla(p) converts the m-by-3 array of ECEF coordinates, p, to an m-by-3 array of geodetic coordinates (latitude, longitude and altitude), lla. lla is in [degrees degrees meters]. p is in meters. The default ellipsoid planet is WGS84.

lla = ecef2lla(p, model) is an alternate method for converting the coordinates for a specific ellipsoid planet. Currently only 'WGS84' is supported for model.

lla = ecef2lla(p, f, Re) is another alternate method for converting the coordinates for a custom ellipsoid planet defined by flattening, f, and the equatorial radius, Re, in meters.

Examples

Determine latitude, longitude, and altitude at a coordinate:

lla = ecef2lla([4510731 4510731 0])


lla =

         0   45.0000  999.9564

Determine latitude, longitude, and altitude at multiple coordinates, specifying WGS84 ellipsoid model:

lla = ecef2lla([4510731 4510731 0; 0 4507609 4498719], 'WGS84')


lla =

         0   45.0000  999.9564
   45.1358   90.0000  999.8659

Determine latitude, longitude, and altitude at multiple coordinates, specifying custom ellipsoid model:

f = 1/196.877360;
Re = 3397000;
lla = ecef2lla([4510731 4510731 0; 0 4507609 4498719], f, Re)


lla =

  1.0e+006 *

         0    0.0000    2.9821
    0.0000    0.0001    2.9801

See Also

| |

Was this topic helpful?