Skip to content

Verification

stone edited this page Nov 12, 2026 · 6 revisions

Verification

Timekeeping has no absolute accuracy independent of a reference. This page summarizes what the project compares, what is not claimed, and the test matrix. The exact figures and step-by-step commands are on Reproducing the comparisons.

Summary

Comparison Reference Result
UTC → ET, 82 vectors CSPICE max difference 1.1e-12 s
Contract UTC → ET, 910 cases CSPICE N0067 STR2ET bit-exact
NAIF decimal tokens, 800 CSPICE N0067 PRSDP bit-exact
Live WebGeocalc TIME_CONVERSION WGC2 2.11.2 max difference 2.847e-7 s (its output rounding)
Kernel selection sweep WGC2 with 3 LSKs every comparable value to WGC2 rounding
SCLK ticks ↔ ET, 10 871 cases CSPICE sct2e / sce2c bit-exact, two mission kernels
Observer TDB, 724 cases pyerfa observer oracle < 2e-17 s
Pre-1972 UTC, 93 cases ERFA iauDat <= 2 ns
UT1 - UTC at 00:00 daily IERS file max difference 0 s over 20 037 days
Leap-boundary noon vs day start leap physics 1.676e-3 s (naive: 0.498 s)
FinalPreferred vs astropy astropy IERS 1.1e-16 s (ordinary days), 0 s (leap days)
TT vs ERFA, 950 epochs 1972-2050 ERFA/SOFA 0 s
TCG vs ERFA, same epochs ERFA/SOFA 2.384e-7 s (f64 limit)
TCB vs ERFA, same epochs ERFA/SOFA 2.384e-7 s (f64 limit)
IAU DTDB vs ERFA, 1218 samples 1950-2050 ERFA/SOFA 4.6e-18 s
Compact TDB vs ERFA, daily 1950-2050 ERFA/SOFA 36.5e-6 s residual
Kernel date literals, 163 native captures CSPICE N0067 FURNSH 158 accepted constants, all bit-exact after the 0.1.27 and 0.1.28 repairs
Kernel date grammar, 416 inputs CSPICE N0067 FURNSH 345 bit-exact values, 71 explicit rejections

Figures near e-7 s at magnitudes of 1e8-1e9 seconds are the spacing of an f64 at that magnitude, not model error. 2.384e-7 s is the spacing of a value near 1.6e9 seconds (year 2050).

What is deliberately not claimed

  • No accuracy beyond the model. The NAIF ET model is quoted at about 30 µs because NAIF states that; the IAU series at about 3 ns because ERFA states that.
  • More printed digits are not more accuracy. WebGeocalc rounds its output; this crate prints more digits of the same number.
  • No UT1 comparison with WebGeocalc. That API has no UT1 time system.
  • No claim of zero physical error in UT1. Matching a table interpolator does not remove EOP measurement uncertainty, and subdaily terms are not implemented.
  • No leap-second predictions. A kernel only contains events up to its release date.
  • No universal accuracy bound for observer terms. The geocentric DE405 statement does not bound observer or EOP errors.

The test matrix

cargo test --all-targets                  # 165 tests
cargo test --all-targets --features mcp   # 178 tests
cargo test --release --features mcp
cargo clippy --all-targets -- -D warnings
cargo +1.75.0 check --all-targets --features mcp
cargo build --no-default-features --target wasm32-unknown-unknown
cargo build --no-default-features --target thumbv7em-none-eabi
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps

CI runs these on every push and tag.

Reproducing

Every comparison above has an entry point:

  • cargo test --test spice_golden — 82 CSPICE vectors, offline.
  • cargo test --test kernel_dates, --test kernel_date_fractional_exact, --test kernel_date_grammar_exact — native kernel-date literals, offline.
  • cargo test --test time_contract — checked contract against CSPICE STR2ET.
  • cargo test --test sclk_spice — 10 871 bit-exact SCLK cases.
  • cargo test --test dtdb_observer, --test pre_1972 — ERFA and SOFA oracles.
  • python tools/validate_sclk.py ... — CSPICE sct2e on a mission kernel.
  • python tools/validate_ut1.py ... — IERS data and leap physics.
  • python tools/wgc2_compare.py, tools/wgc2_kernel_sweep.py — live WebGeocalc.
  • python tools/gen_tcg_tcb_golden.py, tools/gen_dtdb_golden.py — ERFA/SOFA.

Details, arguments and raw numbers: Reproducing the comparisons.

Clone this wiki locally