Orbis.Coordinates (Orbis v0.8.0)

Copy Markdown View Source

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

gcrs_to_itrs(map, datetime, opts \\ [])

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.

teme_to_gcrs(map, datetime, opts \\ [])

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 - when true, uses Skyfield's exact computation path (AU scaling, Kahan triple product, FMA multiply) for 0 ULP parity. Default false uses direct km arithmetic which is more numerically precise.

Returns a map with GCRS :position and :velocity.

to_geodetic(arg)

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}.

to_topocentric(map, datetime, station, opts \\ [])

Compute topocentric azimuth, elevation, and range from a ground station to a satellite given in GCRS.

Parameters

  • gcrs_state - map with :position tuple (km) in GCRS
  • datetime - observation time
  • station - %{latitude: deg, longitude: deg, altitude_m: meters}

Returns %{azimuth: degrees, elevation: degrees, range_km: km}.