Add SIM_orbinit set03 (semi-latus rectum + true anomaly) Tier 3 coverage#630
Merged
Conversation
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>
There was a problem hiding this comment.
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 buildersRUN_0003/RUN_0103. - Extend body-init fixture schema to support
semi_latus_rectumand makesemi_major_axisoptional; 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Earth.inertialEarth.inertialMirrors the set02 wave (PR #622): a new
true_anomaly_element_staterecipe helper +build_run_0003/0103+run_0003/0103insim_orbinit_docker.rs, tier3 tests, bevy parity wrappers, and a new orbinit regen group entry intrick/generate_references.sh.Key physics detail
JEOD's set03 branch selects
shape = ShapeSemiLatusRectum, which skips thesemi_latus_rectum = a·(1−e²)derivation (that runs only for sma-parameterized sets) and uses the deck's semi-latus rectum verbatim aselem.semiparam. The new converterinit_from_semi_latus_rectum_true_anomalytherefore setssemiparam = pdirectly rather than round-tripping througha = p/(1−e²)— matching JEOD's arithmetic bit-closely. (dyn_body_init_orbit.cc:196-200, 285-321.)Fixture schema change
OrbitalInitRecord/OrbitalInitDatagain an optionalsemi_latus_rectum;semi_major_axisbecomesOption(the two are mutually exclusive per JEOD set, and the parser requires exactly one). The.pyparser andextract_body_initemit 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)
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 passedbevy_parity_orbinit_docker(incl. new run_0003/0103) +parity_coverage— 28 passed, superset invariant holdsastrodyn_dynamics/astrodyn_math/astrodyn_verif_jeod_fixturesunit + Tier 2 — 488 passedinvariant_coverage— passedcargo fmt --checkclean;cargo clippy ... --tests -- -D warningsclean🤖 Generated with Claude Code