Main Content

ned2lla

Transform local north-east-down coordinates to geodetic coordinates

    Description

    example

    lla = ned2lla(xyzNED,lla0,method) transforms the local north-east-down (NED) Cartesian coordinates xyzNED to geodetic coordinates lla. Specify the origin of the local NED system as the geodetic coordinates lla0.

    Note

    • The latitude and longitude values in the geodetic 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

    This example shows how to convert local north-east-down (NED) Cartesian coordinates to geodetic coordinates.

    Specify the geodetic coordinates of the local origin. lat0 and lon0 specify the latitude and longitude respectively in degrees. alt0 specifies the altitude in meters. In this example, the local origin is Zermatt, Switzerland.

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

    Specify the NED coordinates of the point of interest in meters. In this example, the point of interest is the Matterhorn.

    xyzNED = [-4556.3 -7134.8 -2852.4]; % [xNorth yEast zDown]

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

    lla = ned2lla(xyzNED, lla0, 'flat')
    lla = 1×3
    103 ×
    
        0.0460    0.0077    4.5254
    
    

    Input Arguments

    collapse all

    Local NED Cartesian coordinates, specified as a three-element row vector or an n-by-3 matrix. n is the number of points to transform. Specify each point in the form [xNorth yEast zDown]. xNorth, yEast, and zDown are the respective x-, y-, and z-coordinates, in meters, of the point in the local NED system.

    Data Types: double

    Origin of the local NED system with the geodetic coordinates, specified as a three-element row vector or an n-by-3 matrix. n is the number of origin points. Specify each point in the form [lat0 lon0 alt0]. lat0 and lon0 specify the latitude and longitude respectively in degrees. alt0 specifies 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 approximation has these limitations:

    • This transformation method assumes that the flight path and bank angle are zero.

    • This transformation method assumes that the flat Earth z-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

    Geodetic coordinates, returned as a three-element row vector or an n-by-3 matrix. n is the number of transformed points. Each point is in the form [lat lon alt]. lat and lon specify the latitude and longitude, respectively, in degrees. alt specifies the altitude in meters.

    Data Types: double

    Extended Capabilities

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

    See Also

    | |

    Introduced in R2020b