Coordinate frame transformations for satellite state vectors.
Supports:
- TEME → GCRS with bit-exact (0 ULP) Skyfield parity
- GCRS → ITRS (Earth-fixed / ECEF)
- ITRS → Geodetic (WGS84 lat/lon/alt)
- Topocentric (azimuth/elevation/range) from a ground station
Summary
Functions
Convert a GCRS position to ITRS (Earth-fixed / ECEF).
Convert a TEME state vector to GCRS.
Convert an ITRS/ECEF position to WGS84 geodetic coordinates.
Compute topocentric azimuth, elevation, and range from a ground station to a satellite given in GCRS.
Functions
Convert a GCRS position to ITRS (Earth-fixed / ECEF).
Accepts a map with a :position tuple (km) and a datetime.
Pass skyfield_compat: true for 0 ULP Skyfield parity.
Returns {x, y, z} in km.
Convert a TEME state vector to GCRS.
Accepts a map with :position and :velocity tuples (km and km/s),
and a datetime (either DateTime or {{y,m,d},{h,m,s}} tuple).
Options
:skyfield_compat- whentrue, uses Skyfield's exact computation path (AU scaling, Kahan triple product, FMA multiply) for 0 ULP parity. Defaultfalseuses direct km arithmetic which is more numerically precise.
Returns a map with GCRS :position and :velocity.
Convert an ITRS/ECEF position to WGS84 geodetic coordinates.
Accepts a position tuple {x, y, z} in km.
Returns %{latitude: degrees, longitude: degrees, altitude_km: km}.
Compute topocentric azimuth, elevation, and range from a ground station to a satellite given in GCRS.
Parameters
gcrs_state- map with:positiontuple (km) in GCRSdatetime- observation timestation-%{latitude: deg, longitude: deg, altitude_m: meters}
Returns %{azimuth: degrees, elevation: degrees, range_km: km}.