Main Content

lla2ned

Transform geodetic coordinates to local north-east-down coordinates

    Description

    example

    xyzNED= lla2ned(lla,lla0,method)transforms the geodetic coordinatesllato local north-east-down (NED) Cartesian coordinatesxyzNED. Specify the origin of the local NED system as the geodetic coordinateslla0.

    Note

    • 大地经度和纬度的值coordinate system use the World Geodetic System of 1984 (WGS84) standard.

    • Specify altitude as height in meters above the WGS84 reference ellipsoid.

    Examples

    collapse all

    Specify the geodetic coordinates of the local origin in Zermatt, Switzerland.

    lla0 = [46.017 7.750 1673];% [lat0 lon0 alt0]

    Specify the geodetic coordinates of a point of interest. In this case, the point of interest is the Matterhorn.

    lla = [45.976 7.658 4531];% [lat lon alt]

    Transform the geodetic coordinates to local NED coordinates using flat earth approximation.

    xyzNED = lla2ned(lla,lla0,'flat')
    xyzNED =1×3103× -4.5572 -7.1244 -2.8580

    Input Arguments

    collapse all

    Geodetic coordinates, specified as a three-element row vector or ann3矩阵.nis the number of points to transform. Specify each point in the form[latlonalt].latandlonspecify the latitude and longitude respectively in degrees.altspecifies the altitude in meters.

    Data Types:double

    Origin of the local NED system with the geodetic coordinates, specified as a three-element row vector or ann3矩阵.nis the number of origin points. Specify each point in the form[lat0lon0alt0].lat0andlon0specify the latitude and longitude respectively in degrees.alt0specifies the altitude in meters.

    Data Types:double

    Transformation method, specified as'flat'or'ellipsoid'. This argument specifies whether the function assumes the planet is flat or ellipsoidal.

    The flat Earth transformation method has these limitations:

    • Assumes that the flight path and bank angle are zero.

    • Assumes that the flat Earthz-axis is normal to the Earth at only the initial geodetic latitude and longitude. This method has higher accuracy over small distances from the initial geodetic latitude and longitude, and closer to the equator. The method calculates a longitude with higher accuracy when the variation in latitude is smaller.

    • Latitude values of +90 and -90 may return unexpected values because of singularity at the poles.

    Data Types:char|string

    Output Arguments

    collapse all

    Local NED Cartesian coordinates, returned as a three-element row vector or ann3矩阵.nis the number of transformed points. Each point is in the form[xNorthyEastzDown].xNorth,yEast, andzDownare the respectivex-,y-, andz-coordinates, in meters, of the point in the local NED system.

    Data Types:double

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    See Also

    Functions

    Introduced in R2020b