lat, lon, alt = ecef2geodetic (spheroid, X, Y, Z) ¶lat, lon, alt = ecef2geodetic (X, Y, Z) ¶lat, lon, alt = ecef2geodetic (…, angleUnit) ¶lat, lon, alt = ecef2geodetic (X, Y, Z, spheroid) ¶Convert from Earth Centered Earth Fixed (ECEF) coordinates to geodetic coordinates.
Inputs:
Inputting spheroid as 4th argument is accepted but not recommended; in that case the lat and lon outputs are returned in radians.
Outputs:
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.
Example:
Aalborg GPS Centre
X =     3426949.39675307
Y =     601195.852419885
Z =     5327723.99358255
lat = 57.02929569;
lon = 9.950248114;
h = 56.95; # meters
>> [lat, lon, alt] = geodetic2ecef ("", X, Y, Z)
lat = 57.029
lon = 9.9502
alt = 56.95
See also: geodetic2ecef, ecef2aer, ecef2enu, ecef2enuv,ecef2ned, ecef2nedv, egm96geoid, referenceEllipsoid.
Package: mapping