Main Content

Direction Cosine Matrix ECEF to NED

Convert geodetic latitude and longitude to direction cosine matrix

  • Direction Cosine Matrix ECEF to NED block

Libraries:
Aerospace Blockset / Utilities / Axes Transformations

Description

The Direction Cosine Matrix ECEF to NED block converts geodetic latitude and longitude into a 3-by-3 direction cosine matrix (DCM). The DCM matrix performs the coordinate transformation of a vector in Earth-centered Earth-fixed (ECEF) axes into a vector in north-east-down (NED) axes. For more information on the direction cosine matrix, see Algorithms.

The implementation of the ECEF coordinate system assumes that the origin is at the center of the planet, the x-axis intersects the Greenwich meridian and the equator, the z-axis is the mean spin axis of the planet, positive to the north, and the y-axis completes the right-hand system. For more information, see About Aerospace Coordinate Systems.

Examples

Ports

Input

expand all

Geodetic latitude and longitude, specified as a 2-by-1 vector, in degrees. 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.

Data Types: double

Output

expand all

DCM to perform coordinate transform of a vector in ECEF axes into a vector in NED axes, returned as a 3-by-3 matrix.

Data Types: double

Algorithms

The DCM matrix performs the coordinate transformation of a vector in ECEF axes, (ox0, oy0, oz0), into a vector in NED axes, (ox2, oy2, oz2). The order of the axis rotations required to bring this about is:

  1. A rotation about oz0 through the longitude (ι) to axes (ox1, oy1, oz1)

  2. A rotation about oy1 through the geodetic latitude (μ) to axes (ox2, oy2, oz2)

[ox2oy2oz2]=DCMef[ox0oy0oz0][ox2oy2oz2]=[sinμ0cosμ010cosμ0sinμ][cosιsinι0sinιcosι0001][ox0oy0oz0]

Combining the two axis transformation matrices defines the following DCM.

DCMef=[sinμcosιsinμsinιcosμsinιcosι0cosμcosιcosμsinιsinμ]

References

[1] Stevens, B. L., and F. L. Lewis. Aircraft Control and Simulation, Hoboken, NJ: John Wiley & Sons, 1992.

[2] Zipfel, Peter H., Modeling and Simulation of Aerospace Vehicle Dynamics. Second Edition. Reston, VA: AIAA Education Series, 2000.

[3] Recommended Practice for Atmospheric and Space Flight Vehicle Coordinate Systems, R-004-1992, ANSI/AIAA, February 1992.

Extended Capabilities

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

Version History

Introduced before R2006a