Skip to content

[#99] Tier 3: cover SIM_4 RUN_JEOD1x_compatible (time SIM_4 2/2)#623

Merged
simnaut merged 2 commits into
mainfrom
sim4-common-usage-runs
May 25, 2026
Merged

[#99] Tier 3: cover SIM_4 RUN_JEOD1x_compatible (time SIM_4 2/2)#623
simnaut merged 2 commits into
mainfrom
sim4-common-usage-runs

Conversation

@simnaut
Copy link
Copy Markdown
Owner

@simnaut simnaut commented May 25, 2026

Summary

Closes the SIM_4_common_usage item of issue #99 Bucket B: the
environment/time SIM_4 verification sim has two RUNs and only
RUN_JEOD2x was covered. This adds RUN_JEOD1x_compatible (1/2 → 2/2).

Both RUNs share the same epoch (1998-12-31 00:00 UTC), 60 s cadence, and
span (t = 86460 s, crossing the 1999-01-01 leap second). They differ only
in the UTC/UT1 convention set in input.py:

  • RUN_JEOD2x (already covered): default true_utc / true_ut1. UTC and
    UT1 track the leap-second / EOP tables, so UTC TJT jumps by 1 s at the
    boundary.
  • RUN_JEOD1x_compatible (this PR): time_utc.true_utc = False,
    time_ut1.true_ut1 = False. Per JEOD time_converter_tai_utc.cc /
    time_converter_tai_ut1.cc, the true_* flags gate the table updates
    inside convert_a_to_b; with the flag false, the TAI−UTC and UT1−TAI
    offsets are frozen at their initialization values and never updated —
    the legacy JEOD 1.x convention. UTC/UT1 stay smooth constant offsets from
    TAI with no leap jump.

Reproduction (no new capability)

Our SimulationTime already supports the frozen-offset convention:
SimulationTime::new freezes the TAI−UTC offset, and set_ut1_tai_offset
freezes UT1−TAI (JEOD's override_data_table = true mode). The test computes
both offsets once at the epoch from our own LeapSecondTable
(tai_utc_at_tai_tjt → 31 s) and EopTable (ut1_minus_tai_seconds), then
holds them constant for the run (no live EOP table installed). The CSV's t=0
UT1 offset is used only as a one-time epoch sanity check, never fed back as a
per-step override — computational independence preserved.

Validated time scales (tier3_time_v4_jeod1x)

All logged JEOD columns over 1442 points:

scale observed max err tolerance
TAI TJT 7.9e-7 s 1e-6 s
UTC TJT 7.9e-7 s 1e-6 s
UT1 TJT 7.9e-7 s 1e-6 s
TAI seconds (elapsed) 0 1e-9 s

Residuals are JEOD calendar→TJT rounding noise at the epoch (sub-μs),
consistent with the existing RUN_JEOD2x bounds.

Changes

  • trick/generate_references.sh: add RUN_JEOD1x_compatible to the SIM_4 group.
  • New fixture time_v4_jeod1x_time_v4.csv (regenerated via cargo xtask regenerate-tier3).
  • tier3_time_v4_jeod1x in tier3_sim_time_docker.rs (the established home for
    the time-scale sims; not a Simulation::step() trajectory).

Verification

  • cargo nextest run -p astrodyn_verif_jeod -E 'binary(tier3_sim_time_docker)' — 7/7 pass
  • cargo fmt --check — clean
  • cargo clippy -p astrodyn_verif_jeod --tests -- -D warnings — clean

🤖 Generated with Claude Code

…lse)

Closes the second of two RUNs in environment/time SIM_4_common_usage.
RUN_JEOD2x (already covered) uses the default true_utc/true_ut1 convention
where UTC/UT1 track the leap-second and EOP tables, so UTC TJT jumps by 1 s
at the 1999-01-01 boundary. RUN_JEOD1x_compatible sets true_utc=False and
true_ut1=False, which per time_converter_tai_{utc,ut1}.cc freezes the TAI-UTC
and UT1-TAI offsets at their initialization values — the legacy JEOD 1.x
convention where UTC/UT1 are smooth constant offsets from TAI with no leap jump.

Our SimulationTime reproduces this with no new capability: the constructor
already freezes the TAI-UTC offset, and set_ut1_tai_offset freezes UT1-TAI
(JEOD override_data_table=true mode). Both offsets are computed once at the
epoch from our own LeapSecondTable / EopTable, then held constant for the run.

- generate_references.sh: add RUN_JEOD1x_compatible to the SIM_4 group
- new fixture time_v4_jeod1x_time_v4.csv (1442 rows, 60 s cadence, regen via
  cargo xtask regenerate-tier3)
- tier3_time_v4_jeod1x: validates TAI/UTC/UT1 TJT + TAI seconds against JEOD
  (observed max ~8e-7 s calendar-rounding noise; tolerances 1e-6 s / 1e-9 s)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 07:09
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

Adds Tier 3 coverage for JEOD SIM_4 RUN_JEOD1x_compatible, validating the legacy “frozen offset” UTC/UT1 convention (JEOD 1.x behavior) across the 1999-01-01 leap-second boundary, closing the remaining SIM_4_common_usage gap from issue #99.

Changes:

  • Extend the SIM_4 reference-generation group to include RUN_JEOD1x_compatible.
  • Add a new Tier 3 Rust test (tier3_time_v4_jeod1x) that validates frozen UTC (TAI−UTC held constant) and frozen UT1 (UT1−TAI held constant).
  • Add the regenerated reference CSV fixture for the new RUN.

Reviewed changes

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

File Description
trick/generate_references.sh Adds RUN_JEOD1x_compatible to the SIM_4 group and documents the two UTC/UT1 conventions.
crates/astrodyn_verif_jeod/tests/tier3_sim_time_docker.rs Adds tier3_time_v4_jeod1x to cross-validate the frozen-offset convention against JEOD output.
crates/astrodyn_verif_jeod/test_data/time_v4_jeod1x_time_v4.csv New JEOD reference CSV for RUN_JEOD1x_compatible.

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

Comment thread crates/astrodyn_verif_jeod/tests/tier3_sim_time_docker.rs
Comment thread trick/generate_references.sh Outdated
Comment thread crates/astrodyn_verif_jeod/tests/tier3_sim_time_docker.rs Outdated
Address three wording nits from the PR review:
- Note that SimulationTime keeps tracking the leap-second table on every
  advance; the JEOD 1.x frozen convention is reproduced by applying the
  frozen offset to mgr.tai_tjt in the loop, not by reading mgr's UTC.
- Label the t=0 sanity check as UT1−TAI (UT1 TJT − TAI TJT in seconds),
  not "UT1−TJT".
- Fix the generate_references.sh comment to say TAI−UTC and UT1−TAI
  (was "TAI-UT1").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@simnaut simnaut enabled auto-merge (squash) May 25, 2026 07:22
@simnaut simnaut merged commit 41c65f8 into main May 25, 2026
18 checks passed
@simnaut simnaut deleted the sim4-common-usage-runs branch May 25, 2026 07:42
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