Skip to main content

Module geodesy

Module geodesy 

Source
Expand description

Geodetic to geocentric coordinate conversions for Earth-based observers.

§Geodetic vs Geocentric Coordinates

Geodetic coordinates (what GPS gives you) define position relative to the WGS84 reference ellipsoid:

  • Latitude: angle between the equatorial plane and the ellipsoid surface normal
  • Longitude: angle from the prime meridian
  • Height: distance above the ellipsoid surface

Geocentric coordinates define position relative to Earth’s center of mass:

  • The Earth is modeled as an oblate spheroid (equatorial bulge)
  • At mid-latitudes, geodetic and geocentric latitude differ by up to ~11 arcminutes

Topocentric corrections (parallax, aberration, refraction) require knowing the observer’s true position in space, not their position on the reference ellipsoid. The geocentric coordinates returned here are the cylindrical components needed for:

  • Diurnal parallax: Moon position shifts by up to 1° depending on observer
  • Stellar parallax: precise baseline for nearby star distances
  • Satellite tracking: ground station positions in Earth-centered frame

§WGS84 Ellipsoid Parameters

This module uses the WGS84 reference ellipsoid:

  • Semi-major axis (equatorial radius): 6,378,137.0 m (or 6378.137 km)
  • Flattening: 1/298.257223563
  • First eccentricity squared: ~0.00669438

§Output Format

Both conversion methods return (u, v) where:

  • u: distance from Earth’s rotation axis (equatorial component)
  • v: distance from equatorial plane (polar component)

These are cylindrical coordinates centered on Earth’s center of mass. To get Cartesian XYZ, you’d combine with longitude: x = u*cos(lon), y = u*sin(lon), z = v.