Calculates Greenwich Mean Sidereal Time (GMST) using IAU 2006/2000A standards.
Implements full IAU 2000A nutation series (106 terms) for high-precision transformations. Fundamental arguments computed per IERS Conventions 2010, Table 5.1. Achieves <1e-8° precision matching Python Skyfield library.
Reference: IERS Conventions 2010 (https://www.iers.org/IERS/EN/Publications/TechnicalNotes/tn36.html)
Two Approaches
1. Simplified Formula (Fast, UT1-based)
Good for applications where precision within ~0.1 seconds is acceptable:
GMST (deg) = 280.46061837 + 360.98564736629 × (JD_UT1 − 2451545.0)2. IAU 2006/2000A Rigorous Formula
High-precision formula that splits Earth rotation and precession:
GMST (seconds) = 67310.54841
+ (876600 × 3600 + 8640184.812866) × T_UT1
+ 0.093104 × T_TT²
− 6.2×10⁻⁶ × T_TT³Where:
T_UT1= Julian centuries since J2000 in UT1 (Earth rotation angle)T_TT= Julian centuries since J2000 in TT (uniform precession timebase)
Why Two Time Scales?
The IAU formula uses both UT1 and TT because:
- Earth's actual spin varies irregularly → needs UT1
- Precession models require smooth atomic time → needs TT
Think of it as: "Where is Earth right now (UT1), accounting for long-term drift calculated on a perfect clock (TT)?"
Summary
Functions
Computes the equation of equinoxes (nutation correction to GMST).
Computes the 5 fundamental arguments for IAU 2000A nutation.
Computes GAST (Greenwich Apparent Sidereal Time) using IAU 2006 standards.
Computes GMST using the IAU 2006/2000A rigorous formula.
Converts Julian Date to Julian centuries since J2000.0 epoch.
Computes mean obliquity of ecliptic at date (IAU 2006).
Computes the mean precession matrix from J2000 to mean-of-date.
Normalizes an angle in degrees to the range [0, 360).
Computes nutation in longitude (Δψ) and obliquity (Δε) using full IAU 2000A series.
Computes nutation in obliquity (simplified model).
Computes a simplified nutation matrix (IAU 2006 truncated model).
Computes the IAU 2006 precession rotation matrix from J2000 to date.
Converts time in seconds to degrees.
Computes true obliquity of ecliptic (mean obliquity + nutation in obliquity).
Computes the true precession-nutation matrix from J2000 to true-of-date.
Functions
Computes the equation of equinoxes (nutation correction to GMST).
Uses the simplified IAU 2000B truncated nutation model (~0.1 arcsecond error).
Parameters
jd_tt: Julian Date in Terrestrial Time
Returns
Equation of equinoxes in degrees
Computes the 5 fundamental arguments for IAU 2000A nutation.
Returns {l, lp, F, D, Omega} in radians.
Parameters
- jd_tt: Julian Date in TT
Fundamental arguments:
- l: mean anomaly of the Moon
- lp: mean anomaly of the Sun
- F: mean argument of latitude (Moon)
- D: mean elongation of Moon from Sun
- Omega: longitude of ascending node of Moon
Reference
IERS Conventions 2010, Table 5.1
Computes GAST (Greenwich Apparent Sidereal Time) using IAU 2006 standards.
GAST = GMST + equation of equinoxes
This accounts for nutation in longitude, which causes a small shift in the
position of the vernal equinox. The equation of equinoxes here comes from a
truncated IAU 2000B model with ~0.1 arcsecond error; use
nutation_iau2000a/1 when you need the full series.
Parameters
jd_ut1: Julian Date in UT1 time scalejd_tt: Julian Date in Terrestrial Time (TT) scale
Returns
GAST in degrees, normalized to [0, 360)
Computes GMST using the IAU 2006/2000A rigorous formula.
Returns GMST in degrees, normalized to [0, 360).
Parameters
jd_ut1: Julian Date in UT1 time scalejd_tt: Julian Date in Terrestrial Time (TT) scale
Examples
iex> gmst_iau_2006(2451545.0, 2451545.0)
# GMST at J2000.0 epoch
280.46061837
Converts Julian Date to Julian centuries since J2000.0 epoch.
Examples
iex> julian_centuries_since_j2000(2451545.0)
0.0 # At J2000.0
iex> julian_centuries_since_j2000(2488070.0)
1.0 # One century after J2000.0
Computes mean obliquity of ecliptic at date (IAU 2006).
Parameters
jd_tt: Julian Date in TT
Returns
Obliquity in degrees
Computes the mean precession matrix from J2000 to mean-of-date.
Returns the transpose of the existing precession_matrix_iau2006 to provide J2000 → mean-of-date transformation (matching Python Skyfield).
Parameters
jd_tt: Julian Date in TT
Returns
Matrix3.t() for J2000 → mean-of-date transformation
Normalizes an angle in degrees to the range [0, 360).
Uses high-precision modulo to minimize floating-point error accumulation. This is critical for astronomical calculations where sub-arcsecond precision matters.
Examples
iex> normalize_angle(450.0)
90.0
iex> normalize_angle(-30.0)
330.0
Computes nutation in longitude (Δψ) and obliquity (Δε) using full IAU 2000A series.
Returns {delta_psi_rad, delta_epsilon_rad}.
Parameters
- jd_tt: Julian Date in TT
Implementation
Sums all 106 terms from IAU 2000A nutation series. Each term contributes sine/cosine components based on 5 fundamental arguments.
Computes nutation in obliquity (simplified model).
Parameters
jd_tt: Julian Date in TT
Returns
Nutation in obliquity in degrees
Computes a simplified nutation matrix (IAU 2006 truncated model).
Provides the main nutation terms with ~0.1" accuracy. For full IAU 2000A
precision, use true_precession_matrix_iau2006/2 with nutation_iau2000a/1.
Parameters
jd_tt: Julian Date in TT
Returns
Matrix3.t() nutation rotation matrix
Computes the IAU 2006 precession rotation matrix from J2000 to date.
Returns 3x3 matrix to rotate J2000 equatorial vectors to mean-of-date equatorial.
Parameters
jd_tt: Julian Date in TT scale
Returns
Matrix3.t()
Converts time in seconds to degrees.
Uses the relationship: 86400 seconds = 360 degrees (one full rotation).
Computes true obliquity of ecliptic (mean obliquity + nutation in obliquity).
Parameters
- jd_tt: Julian Date in TT
Returns
True obliquity in degrees
Computes the true precession-nutation matrix from J2000 to true-of-date.
Combines precession with nutation to provide the complete transformation from J2000 equatorial to true-of-date equatorial coordinates.
Parameters
- jd_tt: Julian Date in TT
Returns
Matrix3.t() for J2000 → true-of-date transformation
Implementation
True matrix = Mean precession matrix × Nutation matrix Following IAU 2006/2000A standard.