greenwichApparentSiderealTime function

double greenwichApparentSiderealTime(
  1. double jdUt, {
  2. double? deltaTSeconds,
})

Greenwich apparent sidereal time (radians, 0 ≤ GAST < 2π) for jdUt: GMST plus the equation of the equinoxes Δψ·cos ε_A and its complementary terms (IERS Conventions 2010, table 5.2e). deltaTSeconds overrides the ΔT model.

Implementation

double greenwichApparentSiderealTime(double jdUt, {double? deltaTSeconds}) {
  final jdTT = julianDayTT(jdUt, deltaTSeconds: deltaTSeconds);
  final t = centuriesSinceJ2000(jdTT);
  final equationOfEquinoxes =
      nutation(t).longitude * math.cos(meanObliquity(t)) +
      equationOfEquinoxesComplementaryTerms(t);
  return (greenwichMeanSiderealTime(jdUt, jdTT) + equationOfEquinoxes) %
      (2 * math.pi);
}