CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
Loading...
Searching...
No Matches
astro::sidereal Namespace Reference

Functions

auto greenwich_mean (const double jd_ut1) -> toolbox::AngleDeg
 Compute the Greenwich Mean Sidereal Time (GMST) for a UT1 instant.
auto greenwich_apparent (const double jd_ut1, const double jde_tt, const astro::earth::nutation::Model model=astro::earth::nutation::Model::IAU_1980) -> toolbox::AngleDeg
 Compute the Greenwich Apparent Sidereal Time (GAST) for a UT1 instant.
auto local_apparent (const double jd_ut1, const double jde_tt, const toolbox::AngleDeg &longitude_west, const astro::earth::nutation::Model model=astro::earth::nutation::Model::IAU_1980) -> toolbox::AngleDeg
 Compute the Local Apparent Sidereal Time (LAST) for an observer.

Function Documentation

◆ greenwich_apparent()

auto astro::sidereal::greenwich_apparent ( const double jd_ut1,
const double jde_tt,
const astro::earth::nutation::Model model = astro::earth::nutation::Model::IAU_1980 )->toolbox::AngleDeg
inlinenodiscard

Compute the Greenwich Apparent Sidereal Time (GAST) for a UT1 instant.

Parameters
jd_ut1The julian day number, on the UT1 scale (see greenwich_mean's warning).
jde_ttThe julian ephemeris day, on the TT scale, of the same instant; used only for the nutation terms (Δψ and ε), which are ephemeris-time quantities.
modelThe nutation model to use. Defaults to earth::nutation::Model::IAU_1980.
Returns
The GAST (Greenwich hour angle of the true vernal equinox), normalized to [0°, 360°).
Note
Meeus: apparent sidereal time = mean sidereal time + Δψ·cos ε, where Δψ is the nutation in longitude and ε the TRUE obliquity (ε₀ + Δε), both evaluated at jde_tt. The correction (the equation of the equinoxes) is small: |Δψ·cos ε| < ~17".4 (|Δψ| itself can reach ~19").
See also
Jean Meeus, "Astronomical Algorithms", Second Edition, Chapter 12 (and Chapter 22 for Δψ, ε).

◆ greenwich_mean()

auto astro::sidereal::greenwich_mean ( const double jd_ut1) ->toolbox::AngleDeg
inlinenodiscard

Compute the Greenwich Mean Sidereal Time (GMST) for a UT1 instant.

Parameters
jd_ut1The julian day number, on the UT1 scale — NOT the JDE (TT) used by most other algorithms in this library. Feeding a TT value here silently shifts the result by ΔT ≈ 69 s of time (≈ 0.29° of rotation, at epoch ~2026).
Returns
The GMST (Greenwich hour angle of the mean vernal equinox), normalized to [0°, 360°).
Note
Meeus (12.3) gives GMST at 0h UT as a polynomial in julian centuries of universal time; its daily advance is only the ~0.9856° 0h-to-0h drift — the 360°/day rotation drops out mod 360° only on the 0h UT grid (Meeus's Example 12.a is such a 0h case). Formula (12.4), used here, folds the full sidereal rate back in and stays valid at any UT1 instant: θ₀ = 280.46061837° + 360.98564736629°·d + 0.000387933°·T² − T³/38710000 (mod 360°), where the constant picks up 180° because J2000.0 falls at noon UT. On the 0h grid this coincides with (12.3) exactly; julian_day::jde_to_jc is not reused since its contract is TT-based.
See also
Jean Meeus, "Astronomical Algorithms", Second Edition, Chapter 12, Formulas (12.2)-(12.4).

◆ local_apparent()

auto astro::sidereal::local_apparent ( const double jd_ut1,
const double jde_tt,
const toolbox::AngleDeg & longitude_west,
const astro::earth::nutation::Model model = astro::earth::nutation::Model::IAU_1980 )->toolbox::AngleDeg
inlinenodiscard

Compute the Local Apparent Sidereal Time (LAST) for an observer.

Parameters
jd_ut1The julian day number, on the UT1 scale (see greenwich_mean's warning).
jde_ttThe julian ephemeris day, on the TT scale, of the same instant (nutation).
longitude_westThe observer's geographic longitude, measured positive west from Greenwich (Meeus's convention; e.g. Washington USNO ≈ +77°.0656). East-positive longitudes must be negated before calling – the _west suffix is the guard (#127).
modelThe nutation model to use. Defaults to earth::nutation::Model::IAU_1980.
Returns
The LAST, normalized to [0°, 360°).
Note
With the west-positive convention the relation reads θ = θ₀(GAST) − longitude_west, consistent with Meeus's hour-angle formula H = θ₀ − L − α used from Chapter 13 onward.
See also
Jean Meeus, "Astronomical Algorithms", Second Edition, Chapter 12.