lunartrace.sun_oracle
Independent, kernel-free analytical Sun direction for display-sun comparison.
The result is an approximate IAU_MOON body-fixed unit vector. It is deliberately not an observation product: it uses Meeus’s low-precision geocentric solar theory and the IAU 2009 lunar pole/prime-meridian series, not a SPICE ephemeris. The geocentre is used in place of the lunar centre; the resulting lunar parallax is at most about 0.15 degrees. The IAU 2009 orientation is an approximation to the DE421 Mean-Earth (MOON_ME_DE421) frame, not an exact frame transformation.
References:
- Jean Meeus, Astronomical Algorithms, 2nd ed. (1998), chapters 25 and 47 (low-precision solar longitude and obliquity; lunar orientation angles).
- Archinal et al., “Report of the IAU Working Group on Cartographic Coordinates and Rotational Elements: 2009”, Celestial Mechanics and Dynamical Astronomy 109, 101–135 (2011), Table 2, DOI: 10.1007/s10569-010-9320-4.
- JPL, Lunar Constants and Models Document, D-32296, lunar coordinate systems: https://ssd.jpl.nasa.gov/doc/lunar_cmd_2005_jpl_d32296.pdf
oracle_direction
Section titled “oracle_direction”function
def oracle_direction(epoch_utc: str) -> tuple[float, float, float]Return the approximate Moon-centre-to-Sun direction in IAU_MOON body XYZ.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
epoch_utc | str | Explicit ISO-8601 UTC instant ending in Z. |
Returns
Section titled “Returns”tuple of three float— Unit-length XYZ vector, dimensionless, in the IAU_MOON body-fixed axes.
Raises
Section titled “Raises”ValueError— Ifepoch_utcis not an explicit ISO-8601 UTC instant (see_julian_day).
The solar longitude is the low-precision Meeus chapter 25 value, , where is the mean longitude, is the equation of the centre and is the longitude of the ascending node of the Moon. The Sun vector is then taken from the equinox of date to J2000 by inverse IAU 1976 precession, and projected onto the three lunar body axes from the IAU 2009 orientation series.
The direction omits Earth-to-Moon parallax. Expect up to about 0.15 degrees error from that omission, plus low-precision ephemeris error and differences between the IAU 2009 orientation and the DE421 Mean-Earth frame.