Sidereon.SGP4 (Sidereon v0.8.0)

Copy Markdown View Source

SGP4/SDP4 orbit propagation from Two-Line Element sets.

Summary

Functions

Propagate a TLE to a specific datetime, returning a TEME state vector.

Types

element_error()

@type element_error() :: {:missing_field, atom()} | {:invalid_field, atom(), term()}

propagation_error()

@type propagation_error() :: element_error() | String.t() | {:nif_error, String.t()}

Functions

propagate(tle, datetime)

@spec propagate(Sidereon.Elements.t(), DateTime.t()) ::
  {:ok, Sidereon.TemeState.t()} | {:error, propagation_error()}

Propagate a TLE to a specific datetime, returning a TEME state vector.

Uses the sgp4 Rust crate in AFSPC compatibility mode. Elements are passed as individual fields, so this works for both TLE and OMM inputs.

Returns {:ok, %Sidereon.TemeState{}} with position in km and velocity in km/s, or {:error, reason}.