Skip to content

Add SIM_orbinit set02 (mean-anomaly) RUN_0002/0102 (#99)#622

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

Add SIM_orbinit set02 (mean-anomaly) RUN_0002/0102 (#99)#622
simnaut merged 2 commits into
mainfrom
orbinit-set02

Conversation

@simnaut
Copy link
Copy Markdown
Owner

@simnaut simnaut commented May 25, 2026

Summary

Extends SIM_orbinit Tier 3 coverage (5/46 → 7/46) with the mean-anomaly orbital-init parameterization — JEOD DynBodyInitOrbit::SmaEccIncAscnodeArgperMeanAnomaly ("set02"), distinct from the covered set01 time-periapsis path. Adds RUN_0002 (ISS) and RUN_0102 (STS-114), both Earth.inertial.

This is a genuine Tier-3 trajectory wave: orbital-element → Cartesian init → Simulation::step() propagation, with full bevy↔runner parity.

  • Both set02 runs are driven from committed body-init fixtures (test_data/body_init/{iss,sts_114}.json), loaded via load_orbital_init and converted by the new mean_anomaly_element_state recipe helper, which reads the fixture's mean_anomaly field directly (mirroring how set01 loads and derives M from time_periapsis). No orbital elements are hardcoded at the call site.
  • tier3 tests assert our element→Cartesian init reproduces JEOD's t=0 logged state (pos err ~1–6e-9 m, vel ~e-12 m/s — FP noise; tolerances 1.05× observed), then propagate.
  • bevy_parity wrappers assert runner≡bevy bit-identity at every synthetic checkpoint.
  • Regen group extended + 2 reference CSVs committed.

Fixture / conversion changes (addressing review)

  • extract_body_init now extracts trans_Orbit_inertial_body_set02 for STS_114 as well as ISS; sts_114.json regenerated with the new entry.
  • The fixtures parser's degree→radian conversion is aligned from val * PI / 180.0 (two roundings) to f64::to_radians() (single rounding). Both fixtures regenerated — the only value deltas are 1-ULP shifts in a few degree-derived angles (machine-epsilon; ~1e-15 relative). Both files now carry a real generated_utc.
  • Affected orbinit Tier 3 tolerances re-derived to 1.05× observed: RUN_0001 → 6.56e-9 / 6.50e-12; RUN_0101 velocity tightened 1.93e-12 → 2.39e-13 (more-accurate conversion). RUN_0002/RUN_0102 land on the original observed tolerances.

Verification

  • All 7 tier3_orbinit_docker_* + 7 bevy_parity_orbinit_docker_* pass; full fixture-consumer suites (dynamics/math/fixtures) green.
  • cargo fmt --check + cargo clippy --workspace --tests -- -D warnings clean.

Next in the orbinit set

set03 (true-anomaly via semi-latus-rectum) maps onto init_from_orbital_elements; sets 04–11 (altitude apo/peri, arg-latitude + radial-vel) need small element-conversion additions. Tracked under #99 Bucket B.

🤖 Generated with Claude Code

Extends SIM_orbinit Tier 3 coverage with the mean-anomaly orbital-init
parameterization (JEOD DynBodyInitOrbit::SmaEccIncAscnodeArgperMeanAnomaly,
"set02"), distinct from the covered set01 time-periapsis path: RUN_0002
(ISS) and RUN_0102 (STS-114), both Earth.inertial.

- Recipe `mean_anomaly_state` calls `init_from_mean_anomaly` directly with
  the set02 elements taken verbatim from JEOD's Modified_data decks (source
  data). run_0002/run_0102 pair with CsvReference::SyntheticTimes.
- tier3 tests assert our orbital-element→Cartesian init matches JEOD's t=0
  logged state (pos 3.3e-9 / 1.7e-9 m, vel ~3e-12 m/s — FP noise; tolerances
  1.05× observed) then propagate through Simulation::step().
- bevy_parity wrappers assert runner≡bevy bit-identity (genuine Tier-3 with
  parity). Regen group + 2 reference CSVs added.

Part of #99 Bucket B. set03 (true-anomaly/semi-latus-rectum) maps onto
init_from_orbital_elements next; sets 04-11 need element-conversion adds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 06:46
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 verification matrix by adding two new Docker-backed runs that validate the set02 mean-anomaly orbital-element initialization path (ISS RUN_0002 and STS-114 RUN_0102) against JEOD’s logged t=0 state and also assert runner↔bevy bit-parity at synthetic checkpoints.

Changes:

  • Add two new SIM_orbinit Docker verification cases (run_0002, run_0102) that initialize from set02 mean anomaly elements.
  • Add Tier 3 JEOD cross-validation tests and bevy parity wrappers for the two new runs.
  • Extend reference generation + commit two new JEOD reference CSVs for RUN_0002 and RUN_0102.

Reviewed changes

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

Show a summary per file
File Description
trick/generate_references.sh Adds RUN_0002/0102 to the SIM_orbinit reference-generation group.
crates/astrodyn_verif_parity/tests/bevy_parity_orbinit_docker.rs Adds parity tests for the two new orbinit Docker runs.
crates/astrodyn_verif_jeod/tests/tier3_sim_orbinit_docker.rs Adds Tier 3 assertions against JEOD t=0 for RUN_0002/0102 with tight tolerances.
crates/astrodyn_verif_jeod/test_data/orbinit_0002_orbinit.csv Adds JEOD t=0 reference record for RUN_0002.
crates/astrodyn_verif_jeod/test_data/orbinit_0102_orbinit.csv Adds JEOD t=0 reference record for RUN_0102.
crates/astrodyn_verif_jeod/src/run_verification/sim_orbinit_docker.rs Introduces set02 mean-anomaly state construction and exports new verification cases.

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

Comment thread crates/astrodyn_verif_jeod/src/run_verification/sim_orbinit_docker.rs Outdated
Comment thread crates/astrodyn_verif_jeod/src/run_verification/sim_orbinit_docker.rs Outdated
Addresses the two PR #622 review threads: the set02 recipes no longer
hardcode orbital elements that duplicate committed fixtures.

- Add `trans_Orbit_inertial_body_set02` to the STS_114 scenario in
  `extract_body_init`, regenerate `sts_114.json` (new set02 entry).
- Replace the inline `mean_anomaly_state(...)` element literals in
  `build_run_0002`/`build_run_0102` with `mean_anomaly_element_state`,
  which loads the committed fixture and reads its `mean_anomaly` field —
  mirroring how set01 loads via `load_orbital_init`.
- Align the fixtures parser's degree→radian conversion from
  `val * PI / 180.0` (two roundings) to `f64::to_radians()` (single
  rounding), so the fixture path reproduces the hardcoded path
  bit-for-bit and the conversion is consistent everywhere. Regenerate
  both fixtures (1-ULP shifts in some angles; both now carry a real
  `generated_utc` instead of the pre-#503 baseline marker).
- Re-derive affected orbinit tier3 tolerances to 1.05× observed:
  RUN_0001 6.56e-9/6.50e-12, RUN_0101 vel 2.39e-13 (tightened from
  1.93e-12). RUN_0002/0102 land back on the PR's original tolerances.

All orbinit tier3 + bevy_parity + fixture-consumer tests pass;
fmt/clippy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@simnaut simnaut enabled auto-merge (squash) May 25, 2026 07:16
@simnaut simnaut merged commit e458b20 into main May 25, 2026
18 checks passed
@simnaut simnaut deleted the orbinit-set02 branch May 25, 2026 07:35
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