Main Content

LLA to ECEF Position

Calculate Earth-centered Earth-fixed (ECEF) position from geodetic latitude, longitude, and altitude above planetary ellipsoid

  • LLA to ECEF Position block

Libraries:
Aerospace Blockset / Utilities / Axes Transformations

Description

The LLA to ECEF Position block converts geodetic latitude (μ¯), longitude (ι¯), and altitude (h¯) above the planetary ellipsoid into a 3-by-1 vector of ECEF position (p¯). 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. For more information the ECEF position calculation, see Algorithms.

Examples

Limitations

  • The planet is assumed to be ellipsoidal. To use a spherical planet, set the Flattening parameter to zero.

  • 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-handed system.

Ports

Input

expand all

Geodetic latitude and longitude, specified as a 2-by-1 vector, in degrees.

Data Types: double

Altitude above the planetary ellipsoid, specified as a scalar.

Data Types: double

Output

expand all

Position in ECEF frame, returned as a 3-by-1 vector, in the same units as the input at the h port.

Data Types: double

Parameters

expand all

Parameter and output units:

Units

Radius from CG to Center of Planet

Equatorial Radius

Metric (MKS)

Meters

Meters

English

Feet

Feet

Dependencies

To enable this, set Planet model to Earth (WGS84).

Programmatic Use

Block Parameter: units
Type: character vector
Values: 'Metric (MKS)' | 'English'
Default: 'Metric (MKS)'

Planet model to use, Custom or Earth (WGS84).

Programmatic Use

Block Parameter: ptype
Type: character vector
Values: 'Earth (WGS84)' | 'Custom'
Default: 'Earth (WGS84)'

Flattening of the planet, specified as a double scalar.

Dependencies

To enable this parameter, set Planet model to Custom.

Programmatic Use

Block Parameter: F
Type: character vector
Values: double scalar
Default: 1/298.257223563

Radius of the planet at its equator, in the same units as the desired units for ECEF position.

Dependencies

To enable this parameter, set Planet model to Custom.

Programmatic Use

Block Parameter: R
Type: character vector
Values: double scalar
Default: 6378137

Algorithms

The ECEF position is calculated from the geocentric latitude at mean sea-level (λs) and longitude using:

p¯=[p¯xp¯yp¯z]=[rscosλscosι+hcosμcosιrscosλssinι+hcosμsinιrssinλs+hsinμ],

where geocentric latitude at mean sea-level and the radius at a surface point (rs) are defined by flattening (f¯), and equatorial radius (R¯) in the following relationships:

λs=atan((1f)2tanμ)rs=R21+(1/(1f)21)sin2λs

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