/* * sidereal_time.h -- Greenwich sidereal time (mean and apparent) * * Clean-room implementation from published standards: * IERS Conventions (2010), IERS Technical Note 36, Ch. 5. * Capitaine, Guinot & McCarthy (2000), "Definition of the * Celestial Ephemeris Origin and of UT1 in the International * Celestial Reference Frame", A&A 355, 398-405. * * No PostgreSQL dependencies -- pure math, suitable for standalone use. */ #ifndef PG_ORBIT_SIDEREAL_TIME_H #define PG_ORBIT_SIDEREAL_TIME_H /* * get_mean_sidereal_time -- Greenwich Mean Sidereal Time * * Computes GMST using the classical polynomial in UT1, * consistent with IAU 2006 precession. * * JD = Julian Date (UT1 timescale) * JDE = Julian Ephemeris Date (TDB/TT timescale) * * For pg_orbit Phase 2, JD and JDE are treated as identical * (delta-T correction not yet applied; the difference is <1s * for recent epochs). * * Returns GMST in radians, normalized to [0, 2*pi). */ double get_mean_sidereal_time(double JD, double JDE); /* * get_apparent_sidereal_time -- Greenwich Apparent Sidereal Time * * GAST = GMST + equation of the equinoxes. * * The equation of the equinoxes accounts for nutation: * EqEq = delta_psi * cos(epsilon_A) * where delta_psi is nutation in longitude and epsilon_A is * the mean obliquity, both from precession.h. * * Returns GAST in radians, normalized to [0, 2*pi). */ double get_apparent_sidereal_time(double JD, double JDE); #endif /* PG_ORBIT_SIDEREAL_TIME_H */