Convert from geodetic coordinates to Earth Centered Earth Fixed (ECEF) coordinates.
Inputs:
Inputting spheroid as 4th argument is accepted but not recommended; in that case the lat and lon inputs are required to be in radians.
Note: height is relative to the reference ellipsoid, not the geoid. Use e.g., egm96geoid to compute the height difference between the geoid and the WGS84 reference ellipsoid.
Ouputs:
Example:
Aalborg GPS Centre lat=57.02929569; lon=9.950248114; h= 56.95; # meters >> [X, Y, Z] = geodetic2ecef ("", lat, lon, h) X = 3426949.39675307 Y = 601195.852419885 Z = 5327723.99358255
See also: ecef2geodetic, geodetic2aer, geodetic2enu, geodetic2ned, egm96geoid, referenceEllipsoid.
Package: mapping