Skip to content

feat(astro): integrate numerical propagation on TT, drag on UT1/UTC, and fix SSR civil dates - #110

Merged
neilberkman merged 1 commit into
mainfrom
feat/tt-propagation-drag-ut1
Nov 25, 2026
Merged

neilberkman merged 1 commit into
mainfrom
feat/tt-propagation-drag-ut1

Conversation

@neilberkman

Copy link
Copy Markdown
Owner

Moves numerical propagation onto TT, takes drag's Earth orientation on UT1 and its atmosphere calendar on UTC, and closes a saturating cast in the SSR civil-date conversion.

New public API (additive; cargo semver-checks against main reports no semver update required): estimate_decay_with_context, estimate_decay_with_source_and_context, StatePropagator::propagate_covariance_with_context, StatePropagator::propagate_state_with_covariance_with_context.

Numerical propagation on TT

  • StatePropagator and everything it drives integrate with elapsed TT as the independent variable, as Orekit does and as propagate_variational already did. That covers propagate_to*, ephemeris*, the STM methods, covariance, PropagationConfig and estimate_decay*. Both propagators share one TT/TDB epoch mapping and one RK4/DP54 loop, and agree bit for bit on the same TT grid.

  • Public epochs stay absolute TDB seconds. Elapsed TT is (target - initial) - (TDB-TT at target - TDB-TT at initial), so no rounded absolute TT value is subtracted (error below 1e-13 s).

  • DP54 dense output folds a step shorter than one TDB ULP into the neighbouring segment, so evaluating at an endpoint always returns the post-step state.

  • Multi-segment covariance shares one TT anchor, and its node states equal ephemeris bit for bit.

  • Pinned values that moved, each by its TT-vs-TDB elapsed difference (3.33e-10 of the elapsed time):

    • the 5400 s DP54 reference arc: 10.8 mm;
    • the 120 s RK4 two-body and J2 checks: 0.29 mm;
    • the propagated-covariance Pc: 4.3e-9 relative.

    The Python numerical_propagation.json fixture regenerates in the next release train.

Drag

  • Drag takes Earth orientation from the propagation context's provider, the same one the geopotential and tides use. The body-fixed position and the Earth rotation vector are evaluated on UT1 with the full chain. Before, it treated TDB as UT1 for a GMST-only rotation.
  • The atmosphere-relative velocity is v - omega x r with that rotation vector.
  • The NRLMSISE-00 calendar inputs and the space-weather lookups use UTC. The NRLMSISE-00 model itself is unchanged.
  • Without a provider, drag uses the default provider in permissive mode. Beyond the embedded UT1 table it takes the long-term Delta T and records the departure in PropagationResult::ut1_degraded, so decay estimates past mid-2027 keep working. A caller-supplied provider keeps its own validity mode.
  • Effect on the golden case (400 km, 51.6°, 2020-06-25): the acceleration changes by 6.6e-3 relative. The King-Hele 360 km decay slope changes by 3.5e-4 relative. Bisected decay times are unchanged within their 2 s tolerance.

SSR civil date: civil_fields_from_j2000_gpst now goes through the checked civil-date helper, so 2^63 and out-of-range epochs return None instead of reaching a saturating cast.

The Orekit oracles are unchanged, including the orbit-determination comparison with BatchLSEstimator. Skyfield- and C-reference-matched outputs are unchanged.

All seven local gates pass (fmt, clippy with and without default features, doctests, MSRV 1.89 check, nextest, fuzz check).

…and fix SSR civil dates

1. Numerical propagation on TT: StatePropagator (propagate_to*, ephemeris*,
   STM, propagate_covariance*, propagate_state_with_covariance*,
   PropagationConfig, and estimate_decay*) now integrates with elapsed TT as
   the independent variable, sharing the TT/TDB epoch mapping and RK4/DP54
   integrator loop with propagate_variational (0-ULP agreement on the same TT
   grid). Public signatures remain absolute TDB seconds past J2000; elapsed TT
   is formed as (target - initial_tdb) - (tdb_minus_tt(tt_target) -
   tdb_minus_tt(tt_initial)) in TtEpochMap (shared with
   VariationalEpoch::from_tdb_seconds and multi-segment propagate_covariance*,
   which anchors one mapping at the initial epoch so node states match
   ephemeris* bit for bit), and each force receives the absolute TDB epoch
   rebuilt from elapsed TT. DP54 dense output folds accepted steps shorter
   than half a TDB ULP into the surrounding segment so no zero-length TDB
   segment is emitted and DenseSegment::eval / DenseOutput::eval return the
   post-step state at every endpoint.
2. Drag time scales and context APIs: DragForce and SourcedDragForce now take
   Earth orientation on UT1 from the PropagationContext
   EarthOrientationProvider, defaulting to TdbEarthOrientationProvider::new()
   in ValidityMode::Permissive when no provider is attached (using long-term
   Delta T outside the embedded UT1 table and recording any departure in
   PropagationContext / PropagationResult::ut1_degraded, while a
   caller-supplied provider keeps its own validity mode), form GCRF
   atmosphere-relative velocity as v - omega x r from that orientation's Earth
   rotation vector, and derive NRLMSISE-00 calendar inputs (with checked
   integer conversions) and space-weather lookups on UTC from the orientation's
   TimeScales. Add estimate_decay_with_context,
   estimate_decay_with_source_and_context,
   StatePropagator::propagate_covariance_with_context, and
   StatePropagator::propagate_state_with_covariance_with_context.
3. SSR civil date: civil_fields_from_j2000_gpst now delegates to
   civil_fields_from_j2000_seconds with checked u8::try_from conversions,
   rejecting 2^63 and out-of-range epochs cleanly.
@neilberkman
neilberkman merged commit 4b4b0e5 into main Nov 25, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant