Geodetic longitude, latitude, altitude coordinates represent positions relative to the WGS84 ellipsoidal Earth model. These coordinates can be converted to and from Earth-Centered Earth-Fixed (ECEF) Cartesian coordinates. This coordinate system is more accurate than the geocentric system for near-surface applications because it accounts for Earth's equatorial bulge.
Longitude (\(\lambda\)): East-west angle from the prime meridian, in degrees [-180°, +180°] or radians \([-\pi, +\pi]\)
Latitude (\(\varphi\)): North-south angle from the equatorial plane, measured perpendicular to the ellipsoid surface, in degrees [-90°, +90°] or radians [\(-\frac{\pi}{2}\), \(+\frac{\pi}{2}\)]
Altitude (\(h\)): Height above the WGS84 ellipsoid surface, in meters
Combined as: [longitude, latitude, altitude], often abbreviated as [lon, lat, alt].
Info
Geodetic latitude is measured perpendicular to the ellipsoid surface, not from Earth's center. This differs from geocentric latitude, which is measured from the center. For a point on the surface, these can differ by up to 11 arcminutes (about 0.2°).
Geodetic coordinates (WGS84 ellipsoid model):
Longitude: -122.4194° = -2.136622 rad
Latitude: 37.7749° = 0.659296 rad
Altitude: 16.0 m
ECEF Cartesian coordinates:
x = -2706181.627 m
y = -4261070.165 m
z = 3885735.291 m
Distance from Earth center: 6370170.853 m
Geodetic coordinates (WGS84 ellipsoid model):
Longitude: -122.4194° = -2.136622 rad
Latitude: 37.7749° = 0.659296 rad
Altitude: 16.0 m
ECEF Cartesian coordinates:
x = -2706181.627 m
y = -4261070.165 m
z = 3885735.291 m
Distance from Earth center: 6370170.853 m
Info
The conversion from geodetic to ECEF accounts for the ellipsoidal shape using the radius of curvature in the prime vertical and the first eccentricity of the ellipsoid.
The reverse transformation converts Cartesian ECEF coordinates back to geodetic coordinates. This requires an iterative algorithm due to the ellipsoidal geometry:
For the same longitude, latitude, and altitude values, geodetic and geocentric coordinates produce different ECEF positions. The difference is smallest near the equator and largest near the poles.
For most applications, it's best to use geodetic coordinates since any computational overhead is negligible compared to the improved accuracy near Earth's surface.