Skip to main content

spacelab_eop/
lib.rs

1//! Earth-orientation parameters, as published by the IERS.
2//!
3//! The Earth is not a clock and its pole is not fixed. Turning a celestial frame
4//! into a terrestrial one needs three measured quantities that no theory supplies:
5//! the position of the pole (`xp`, `yp`), and how far the planet's rotation has
6//! drifted from atomic time (`ΔUT1`). They are observed, published daily, and
7//! predicted a year ahead with rapidly decaying confidence.
8//!
9//! # Two things this crate refuses to do quietly
10//!
11//! **Predicted values are not final values.** A `ΔUT1` predicted a month ahead
12//! carries millisecond error, which is metres of longitude. [`EopQuality`] is part
13//! of every sample and every interpolation result, so the distinction cannot be
14//! lost by accident.
15//!
16//! **Bulletin B is preferred over Bulletin A when it exists.** `finals2000A`
17//! carries both: the rapid service (columns 17–134) and the final combined
18//! solution (columns 135–185). Most implementations read only the first. Before
19//! 2000 the two disagree by tens of milliarcseconds.
20//!
21//! **The frame is read, not assumed.** `finals2000A` has no header, so it cannot say which ITRF
22//! its pole coordinates are in. The IERS EOP 20 C04 series can, on its second line, and
23//! [`EopSeries::parse_c04`] reads it into [`EopSeries::frame`]: an orbit product's frame is then
24//! checked against the chain's with `ReferenceFrame::agrees_with` rather than stated in prose.
25//!
26//! # Interpolation and sub-daily corrections
27//!
28//! The daily series is interpolated with four-point Lagrange, as the IERS Conventions
29//! prescribe (a `ΔUT1` leap-second step is undone first so it is never smeared across the
30//! window). On top of that, the Conventions add diurnal and semidiurnal corrections for ocean
31//! tides and lunisolar libration (`ortho_eop`, `pmsdnut2`, `utlibr`). These live in
32//! [`subdaily`] and are exposed as [`subdaily_correction`] — a caller with better-than-mas
33//! inputs adds them to the interpolated [`Eop`]; for TLE-scale work they are far below the
34//! input error and can be ignored.
35
36#![forbid(unsafe_code)]
37
38mod c04;
39mod finals;
40pub mod subdaily;
41mod subdaily_tables;
42
43pub use finals::{Eop, EopError, EopQuality, EopSample, EopSeries};
44pub use subdaily::{SubdailyCorrection, subdaily_correction};