Skip to content

Add SIM_orbinit set03 (semi-latus rectum + true anomaly) Tier 3 coverage#630

Merged
simnaut merged 2 commits into
mainfrom
orbinit-set03
May 25, 2026
Merged

Add SIM_orbinit set03 (semi-latus rectum + true anomaly) Tier 3 coverage#630
simnaut merged 2 commits into
mainfrom
orbinit-set03

Conversation

@simnaut
Copy link
Copy Markdown
Owner

@simnaut simnaut commented May 25, 2026

Summary

Extends SIM_orbinit Tier 3 coverage (#99 Bucket B) with the set03 orbital-init parameterization — JEOD SlrEccIncAscnodeArgperTanom (set = 3): semi-latus rectum (p) + true anomaly, plus eccentricity / inclination / ascending node / arg periapsis.

  • RUN_0003 — ISS, Earth.inertial
  • RUN_0103 — STS-114, Earth.inertial

Mirrors the set02 wave (PR #622): a new true_anomaly_element_state recipe helper + build_run_0003/0103 + run_0003/0103 in sim_orbinit_docker.rs, tier3 tests, bevy parity wrappers, and a new orbinit regen group entry in trick/generate_references.sh.

Key physics detail

JEOD's set03 branch selects shape = ShapeSemiLatusRectum, which skips the semi_latus_rectum = a·(1−e²) derivation (that runs only for sma-parameterized sets) and uses the deck's semi-latus rectum verbatim as elem.semiparam. The new converter init_from_semi_latus_rectum_true_anomaly therefore sets semiparam = p directly rather than round-tripping through a = p/(1−e²) — matching JEOD's arithmetic bit-closely. (dyn_body_init_orbit.cc:196-200, 285-321.)

Fixture schema change

OrbitalInitRecord / OrbitalInitData gain an optional semi_latus_rectum; semi_major_axis becomes Option (the two are mutually exclusive per JEOD set, and the parser requires exactly one). The .py parser and extract_body_init emit the new field; set03 is added to the SCENARIOS list for both ISS and STS-114. Existing sma-using call sites updated to .expect(...).

Observed t=0 errors vs JEOD (tolerances = 1.05× observed)

RUN position velocity
RUN_0003 (ISS) 5.21e-10 m 2.27e-13 m/s
RUN_0103 (STS) 1.40e-9 m 9.37e-13 m/s

Sub-nanometre agreement — consistent with the inertial set01/set02 RUNs.

pfix variants

RUN_0203/0303 (pfix set03) not included. The JEOD decks exist, but the set03 recipe helper would need its own frame-rotation branch (the set01 pfix path lives in a different helper); the inertial RUNs are the focused deliverable and pfix is a clean follow-up.

Verification

  • cargo nextest run -p astrodyn_verif_jeod -E 'test(orbinit)' — 25 passed
  • bevy_parity_orbinit_docker (incl. new run_0003/0103) + parity_coverage — 28 passed, superset invariant holds
  • astrodyn_dynamics / astrodyn_math / astrodyn_verif_jeod_fixtures unit + Tier 2 — 488 passed
  • invariant_coverage — passed
  • cargo fmt --check clean; cargo clippy ... --tests -- -D warnings clean

🤖 Generated with Claude Code

Extends SIM_orbinit Tier 3 coverage (issue #99 Bucket B) with the set03
orbital-init parameterization (JEOD `SlrEccIncAscnodeArgperTanom`, set=3):
semi_latus_rectum (p) + true_anomaly, plus ecc/inc/raan/argper.

RUN_0003 (ISS, Earth.inertial) and RUN_0103 (STS-114, Earth.inertial).

JEOD's set03 path selects `shape = ShapeSemiLatusRectum`, which skips the
`semi_latus_rectum = a·(1-e²)` derivation and uses the deck's semi-latus
rectum verbatim as `elem.semiparam`. The new
`init_from_semi_latus_rectum_true_anomaly` converter sets `semiparam = p`
directly to match JEOD bit-closely, rather than round-tripping through
`a = p/(1-e²)`.

Fixtures: `OrbitalInitRecord`/`OrbitalInitData` gain an optional
`semi_latus_rectum`; `semi_major_axis` becomes optional (the two are
mutually exclusive per JEOD set). The `.py` parser and `extract_body_init`
emit the new field; set03 added to the SCENARIOS list for both vehicles.

Observed t=0 errors vs JEOD (tolerances = 1.05× observed):
  RUN_0003: pos 5.21e-10 m, vel 2.27e-13 m/s
  RUN_0103: pos 1.40e-9 m,  vel 9.37e-13 m/s

pfix set03 (RUN_0203/0303) deferred: the set03 helper would need a separate
frame-rotation branch; the inertial RUNs are the focused deliverable.

Tier 3 tests + bevy parity wrappers added; parity superset invariant holds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 20:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends the SIM_orbinit Tier 3 JEOD parity suite to cover JEOD set03 (SlrEccIncAscnodeArgperTanom), initializing orbits from semi-latus rectum + true anomaly for ISS and STS-114 inertial runs, including fixture/schema updates and reference regeneration wiring.

Changes:

  • Add set03 conversion path (init_from_semi_latus_rectum_true_anomaly) and corresponding verification scenario builders RUN_0003 / RUN_0103.
  • Extend body-init fixture schema to support semi_latus_rectum and make semi_major_axis optional; regenerate ISS/STS fixtures and add new JEOD reference CSVs.
  • Add Tier 3 tests + bevy parity wrappers, and include new runs in the Trick reference regeneration group.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
trick/generate_references.sh Adds set03 RUN_0003/0103 to the orbinit reference regen group.
src/lib.rs Re-exports the new set03 initializer from the top-level crate.
crates/astrodyn_verif_parity/tests/bevy_parity_orbinit_docker.rs Adds parity tests for RUN_0003 and RUN_0103.
crates/astrodyn_verif_jeod/tests/tier3_sim_orbinit_docker.rs Adds Tier 3 JEOD CSV validation tests for set03 inertial runs.
crates/astrodyn_verif_jeod/test_data/orbinit_0003_orbinit.csv New JEOD reference output for RUN_0003.
crates/astrodyn_verif_jeod/test_data/orbinit_0103_orbinit.csv New JEOD reference output for RUN_0103.
crates/astrodyn_verif_jeod/test_data/body_init/iss.json Regenerated fixture with set03 entry and new nullable shape fields.
crates/astrodyn_verif_jeod/test_data/body_init/sts_114.json Regenerated fixture with set03 entry and new nullable shape fields.
crates/astrodyn_verif_jeod/src/run_verification/sim_orbinit_docker.rs Adds set03 recipe helper + builders and exposes run_0003/run_0103 verification cases.
crates/astrodyn_verif_jeod/src/bin/extract_body_init.rs Emits the new semi_latus_rectum field and updates scenario extraction list.
crates/astrodyn_verif_jeod_fixtures/src/orbital_init.rs Updates .py parser and data structs to support set03 semi-latus rectum input.
crates/astrodyn_verif_jeod_fixtures/src/body_init_fixtures.rs Updates committed-JSON parser and record structs for nullable semi_major_axis and optional semi_latus_rectum.
crates/astrodyn_math/tests/jeod_validation.rs Updates fixture consumers for semi_major_axis: Option<f64>.
crates/astrodyn_dynamics/tests/tier2_body_init.rs Updates Tier 2 tests for semi_major_axis: Option<f64>.
crates/astrodyn_dynamics/src/lib.rs Re-exports the new set03 initializer from astrodyn_dynamics.
crates/astrodyn_dynamics/src/body_init.rs Implements init_from_semi_latus_rectum_true_anomaly and adds focused unit tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/astrodyn_verif_jeod_fixtures/src/orbital_init.rs Outdated
Comment thread crates/astrodyn_verif_jeod_fixtures/src/body_init_fixtures.rs Outdated
Both `parse_orbital_init_py` and `parse_orbital_init_entry` documented that
exactly one of `semi_major_axis` / `semi_latus_rectum` is present per JEOD
set, but only rejected the both-missing case — a deck/fixture carrying both
was silently accepted. Reject the both-present case too, per the "Fail
Loudly" rule, with negative tests for each parser.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@simnaut simnaut enabled auto-merge (squash) May 25, 2026 20:15
@simnaut simnaut merged commit 7fffbce into main May 25, 2026
17 of 18 checks passed
@simnaut simnaut deleted the orbinit-set03 branch May 25, 2026 20:30
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.

2 participants