Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

lla2ecef

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

Syntax

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

Description

p = lla2ecef(lla) converts an m-by-3 array of geodetic coordinates (latitude, longitude and altitude), lla, to an m-by-3 array of ECEF coordinates, p. lla is in [degrees degrees meters]. p is in meters. The default ellipsoid planet is WGS84. Latitude and longitude values can be any value. However, latitude values of +90 and -90 may return unexpected values because of singularity at the poles.

p = lla2ecef(lla, model) is an alternate method for converting the coordinates for a specific ellipsoid planet. Currently only 'WGS84' is supported for model. Latitude and longitude values can be any value. However, latitude values of +90 and -90 may return unexpected values because of singularity at the poles.

p = lla2ecef(lla, 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. Latitude and longitude values can be any value. However, latitude values of +90 and -90 may return unexpected values because of singularity at the poles.

Examples

Determine ECEF coordinates at a latitude, longitude, and altitude:

p = lla2ecef([0 45 1000])


p =

  1.0e+006 *

    4.5107    4.5107         0

Determine ECEF coordinates at multiple latitudes, longitudes, and altitudes, specifying WGS84 ellipsoid model:

p = lla2ecef([0 45 1000; 45 90 2000], 'WGS84')


p =

  1.0e+006 *

    4.5107    4.5107         0
    0.0000    4.5190    4.4888

Determine ECEF coordinates at multiple latitudes, longitudes, and altitudes, specifying custom ellipsoid model:

f = 1/196.877360;
Re = 3397000;
p = lla2ecef([0 45 1000; 45 90 2000], f, Re)


p =

  1.0e+006 *

    2.4027    2.4027         0
    0.0000    2.4096    2.3852

Introduced in R2006b

Was this topic helpful?