Skip to content

IAU#2

Merged
VPRamon merged 2 commits intomainfrom
iau
Feb 16, 2026
Merged

IAU#2
VPRamon merged 2 commits intomainfrom
iau

Conversation

@VPRamon
Copy link
Member

@VPRamon VPRamon commented Feb 16, 2026

This pull request introduces significant improvements to the handling of astronomical time scales and conversions, especially around ΔT modeling, leap-second-aware Unix conversions, and TDB corrections. The changes enhance accuracy for modern dates, provide new time scales, and expand test coverage.

ΔT modeling and accuracy improvements:

  • Updated the src/delta_t.rs module to use observed annual ΔT values from IERS/USNO for 1992–2025, with linear extrapolation after 2026, replacing the previous polynomial approximation. This greatly improves accuracy for recent and near-future dates. [1] [2] [3]
  • Expanded test coverage for ΔT, including new tests for 2000, 2010, 2020, 2025, and extrapolated values beyond 2026, verifying improved accuracy and preventing regression to outdated models.

Time scale conversion enhancements:

  • Implemented periodic Fairhead & Bretagnon correction terms for TDB ↔ TT conversions, achieving sub-30 μs accuracy for ±10,000 years around J2000.
  • Updated Unix time conversions to apply leap-second-aware UTC/TAI/TT offsets using an IERS Bulletin C table (1972–2017), ensuring correct handling of leap seconds and TT offsets for modern dates.

New features and expanded test coverage:

  • Added new coordinate time scales: TCG (Geocentric Coordinate Time) and TCB (Barycentric Coordinate Time), with crate-root exports (tempoch::TCG, tempoch::TCB).
  • Added tests for TDB periodic corrections and leap-second-aware Unix conversions, confirming sub-ms accuracy and roundtrip correctness.

Documentation and changelog updates:

  • Updated CHANGELOG.md to document new features, improved ΔT modeling, leap-second-aware conversions, and expanded test coverage.
  • Improved documentation in src/delta_t.rs and src/scales.rs to clarify algorithm sources, valid ranges, and references. [1] [2] [3]

ΔT modeling and accuracy improvements

  • Adopted annual observed ΔT values (IERS/USNO) for 1992–2025, with linear extrapolation after 2026, replacing outdated polynomial models for modern dates. [1] [2] [3]
  • Expanded tests for ΔT at key dates and future extrapolation, ensuring improved accuracy and preventing regression.

Time scale conversion enhancements

  • Applied Fairhead & Bretagnon periodic corrections for TDB ↔ TT conversions, improving TDB accuracy to <30 μs.
  • Implemented leap-second-aware Unix conversions using IERS Bulletin C, correcting TT offsets for dates since 1972.

New features and expanded test coverage

  • Added TCG and TCB coordinate time scales and crate-root exports.
  • Added tests for TDB periodic corrections and leap-second-aware Unix conversions.

Documentation and changelog updates

  • Updated changelog and documentation to reflect new features, improved algorithms, and expanded references. [1] [2] [3] [4]

@VPRamon VPRamon self-assigned this Feb 16, 2026
@github-actions
Copy link

Code Coverage

Package Line Rate Complexity Health
src 91% 0
Summary 91% (916 / 1006) 0

@VPRamon VPRamon merged commit e243f66 into main Feb 16, 2026
5 checks passed
@VPRamon VPRamon deleted the iau branch February 17, 2026 17:10
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.

1 participant