SGP4/SDP4 orbit propagation from Two-Line Element sets.
Summary
Functions
Fit a TLE to TEME position samples using the core inverse-SGP4 solver.
Propagate a TLE to a specific datetime, returning a TEME state vector.
Propagate many satellites across a shared list of times, in one NIF call.
Types
Functions
@spec fit_tle( [map()], keyword() ) :: {:ok, Sidereon.SGP4.Fit.t()} | {:error, term()}
Fit a TLE to TEME position samples using the core inverse-SGP4 solver.
@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}.
@spec propagate_batch([Sidereon.Elements.t()], [number()], keyword()) :: {:ok, ok: [Sidereon.TemeState.t()], error: term()} | {:error, term()}
Propagate many satellites across a shared list of times, in one NIF call.
Each time is minutes since that satellite's own epoch (the core batch
convention), so element i of the result is the arc for satellites |> Enum.at(i)
evaluated at every offset in times_minutes. This is the throughput primitive
over sidereon_core::astro::sgp4::propagate_batch; one bad satellite never
collapses the batch.
satellites is a list of %Sidereon.Elements{}. Options:
:opsmode-:afspc(default, matchingpropagate/2) or:improved.:parallel- whentrue, fans the per-satellite arcs across a thread pool (propagate_batch_parallel); the results are bit-identical to the serial path. Defaults tofalse.
Returns {:ok, arcs} where each arc is {:ok, [%Sidereon.TemeState{}, ...]}
(one state per time, in order) or {:error, reason} for a satellite that failed
to propagate. Returns {:error, {:invalid_elements, index, reason}} if an input
element set cannot be marshalled.