Skip to content

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

function

def oracle_direction(epoch_utc: str) -> tuple[float, float, float]

Return the approximate Moon-centre-to-Sun direction in IAU_MOON body XYZ.

NameTypeDescription
epoch_utcstrExplicit ISO-8601 UTC instant ending in Z.
  • tuple of three float — Unit-length XYZ vector, dimensionless, in the IAU_MOON body-fixed axes.
  • ValueError — If epoch_utc is not an explicit ISO-8601 UTC instant (see _julian_day).

The solar longitude is the low-precision Meeus chapter 25 value, λ=L0+C−0.00569∘−0.00478∘sin⁡Ω\lambda = L_0 + C - 0.00569^\circ - 0.00478^\circ \sin\Omega, where L0L_0 is the mean longitude, CC is the equation of the centre and Ω\Omega 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.