The CIO and the equinox
To get from a catalog position to where a star is in the sky above you, you need the star’s position relative to the Earth’s true pole of date, and an angle that says how far the Earth has turned. Right ascension has to be measured from some origin on the true equator, and the Earth’s rotation is measured from the same origin. There are two choices of origin, and they lead to two equivalent chains:
| Equinox-based | CIO-based | |
|---|---|---|
| Origin of right ascension | true equinox of date | Celestial Intermediate Origin (CIO) |
| Matrix from the GCRS | npb_matrix_iau2006a | gcrs_to_cirs_matrix(x, y, s) |
| Frame of date | true equator and equinox | CIRS |
| Earth rotation | Greenwich apparent sidereal time (GAST) | Earth rotation angle (ERA) |
Both use the same pole, so they agree on declination. Right ascensions differ by the equation of the origins (EO), the arc between the two origins:
use celestial_core::angle::Angle;
use celestial_core::cio::{gcrs_to_cirs_matrix, CioSolution};
use celestial_core::constants::{ARCSEC_PER_RAD, MJD_ZERO_POINT};
use celestial_core::matrix::Vector3;
use celestial_core::nutation::NutationIAU2006A;
use celestial_core::precession::PrecessionIAU2006;
use celestial_core::utils::jd_to_centuries;
let (jd1, jd2) = (MJD_ZERO_POINT, 61041.0); // 2026 January 1, 0h TT
let t = jd_to_centuries(jd1, jd2);
let polaris = Vector3::from_spherical(
Angle::from_degrees(37.95456067).radians(),
Angle::from_degrees(89.26410897).radians(),
);
let nutation = NutationIAU2006A::new().compute(jd1, jd2)?;
let npb = PrecessionIAU2006::new().npb_matrix_iau2006a(t, nutation.delta_psi, nutation.delta_eps)?;
let cio = CioSolution::calculate(&npb, t)?;
let gcrs_to_cirs = gcrs_to_cirs_matrix(cio.cip.x, cio.cip.y, cio.s)?;
// Equinox-based: RA measured from the true equinox of date
let (ra_equinox, dec_equinox) = (npb * polaris).to_spherical();
// CIO-based: RA measured from the CIO
let (ra_cio, dec_cio) = (gcrs_to_cirs * polaris).to_spherical();
println!("Dec difference: {}\"", (dec_cio - dec_equinox) * ARCSEC_PER_RAD);
println!("RA difference: {:.6}\"", (ra_cio - ra_equinox) * ARCSEC_PER_RAD);
println!("EO: {:.6}\"", cio.equation_of_origins * ARCSEC_PER_RAD);
// Dec difference: 0"
// RA difference: -1204.241814"
// EO: -1204.241814"
In 2026 the two origins are about 20 arcminutes apart. When you turn the Earth, that offset cancels: GAST is ERA minus EO, so the hour angle comes out the same either way.
Why there are two
The equinox is where the true equator crosses the ecliptic. It moves along the equator with precession and nutation, so sidereal time, which is measured from it, mixes the Earth’s rotation with the motion of the equinox. Computing GAST means evaluating the precession and nutation models inside the rotation angle.
The CIO is defined so that it has no motion along the equator as the pole moves. The angle from it to the Earth’s reference meridian, the ERA, is a linear function of UT1 and nothing else. That separates the Earth’s spin from the motion of its axis. IAU Resolution B1.8 (2000) recommends this non-rotating origin, and the IERS Conventions build their celestial-to-terrestrial transformation on it.
The equinox-based chain stays useful because so much else uses it: sidereal time on a
mount controller, apparent places in almanacs, and older software you need to match.
celestial-coords builds its CIRS with the CIO-based matrix. celestial-time computes
GAST as ERA minus the EO from CioSolution.
The CIO quantities
Three numbers locate the CIRS against the GCRS:
- X and Y are the coordinates of the Celestial Intermediate Pole (CIP), the pole of
date, in the GCRS. They are elements
[2][0]and[2][1]of the NPB matrix. - s, the CIO locator, places the CIO on the CIP’s equator. It comes from a series in time plus a −XY/2 term.
- EO, the equation of the origins, is the arc from the CIO to the true equinox.
CioSolution::calculate takes the NPB matrix and the date in Julian centuries of TT,
and returns all three:
use celestial_core::cio::CioSolution;
use celestial_core::constants::{ARCSEC_PER_RAD, MJD_ZERO_POINT};
use celestial_core::nutation::NutationIAU2006A;
use celestial_core::precession::PrecessionIAU2006;
use celestial_core::utils::jd_to_centuries;
let (jd1, jd2) = (MJD_ZERO_POINT, 61041.0);
let t = jd_to_centuries(jd1, jd2);
let nutation = NutationIAU2006A::new().compute(jd1, jd2)?;
let npb = PrecessionIAU2006::new().npb_matrix_iau2006a(t, nutation.delta_psi, nutation.delta_eps)?;
let cio = CioSolution::calculate(&npb, t)?;
println!("{}", cio.cip);
println!("s = {:.6}\"", cio.s * ARCSEC_PER_RAD);
println!("EO = {:.3}\"", cio.equation_of_origins * ARCSEC_PER_RAD);
// CIP(X=523.244", Y=6.525")
// s = -0.007643"
// EO = -1204.242"
X grows by about 2000″ per century as the pole precesses. Near the present, Y is a few arcseconds and s is a few milliarcseconds.
Each piece is also available on its own:
CipCoordinates::from_npb_matrixreads X and Y out of the matrix. It returns an error if either is beyond 0.2 radians, because no NPB matrix within the models’ 20-century range puts the pole that far off. At 20 centuries from J2000.0, X reaches about 0.19.CioLocator::iau2006a(t).calculate(x, y)evaluates s with the IAU 2006/2000A series: 66 periodic terms across five powers of t.equation_of_origins(&npb, s)computes EO from the matrix.
gcrs_to_cirs_matrix(x, y, s) then builds the rotation from the GCRS to the CIRS.
Earth orientation corrections
The nutation models leave out effects that can’t be predicted, such as the free core
nutation. The IERS publishes the observed offsets of the pole as dX and dY, in
milliarcseconds. celestial-core doesn’t read IERS data, so CioSolution gives the
model’s X and Y. celestial-coords adds dX and dY from its bundled IERS tables before
it calls gcrs_to_cirs_matrix. To apply your own, add them to cio.cip.x and
cio.cip.y and pass the sums.
Edge cases
gcrs_to_cirs_matrixreturns an error when X² + Y² exceeds 1 orsisn’t finite. The CIP must lie on the unit sphere.CioSolution::calculateneeds the GCRS-to-true-of-date matrix that includes frame bias. The bias-freeprecession_matrixfromPrecessionResultgives the wrong X and Y.
Where next
- Precession, nutation and obliquity covers the models behind the NPB matrix.
- Vectors and rotation matrices explains
rotate_zand the other rotationsgcrs_to_cirs_matrixcomposes.