Try Astrologer API

Subscribe to support and grow the project.

True Lilith (Osculating Lunar Apogee) Calculation #

LibEphemeris computes the osculating lunar apogee (True Lilith) by deriving instantaneous Keplerian orbital elements from the Moon’s geocentric state vectors obtained via JPL DE440/DE441, with calibrated perturbation corrections applied to achieve sub-arcminute agreement with Swiss Ephemeris.

Table of Contents #

Background #

True Lilith, also known as the osculating lunar apogee, is the apogee point of the Moon’s instantaneous (osculating) Keplerian orbit. Unlike Mean Lilith (which moves smoothly along the mean lunar orbit), True Lilith oscillates significantly due to solar gravitational perturbations.

The standard method for computing the osculating apogee derives it directly from the Moon’s position and velocity vectors (state vectors), from which the full set of osculating Keplerian orbital elements is obtained. This avoids the error introduced by analytical approximations and works directly with the numerical ephemeris. Both Swiss Ephemeris (via SE_OSCU_APOG) and LibEphemeris use this approach.

Physical Context #

The lunar orbit is far from a simple Keplerian ellipse because it is strongly perturbed by solar gravity (three-body problem). When the osculating ellipse is computed from instantaneous state vectors, the resulting apogee direction oscillates with the period of a synodic month as the Sun’s tidal influence alternately stretches and compresses the apparent orbital ellipse.

Key characteristics of the osculating apogee:

  1. Two-Body Approximation: The osculating apogee treats the Moon’s orbit as a simple Keplerian ellipse (two-body problem: Earth and Moon only).

  2. Large Oscillations: The osculating apogee oscillates +/- 30 degrees around the mean apogee. This is an artifact of the insufficient two-body model when applied to the strongly perturbed Earth-Moon-Sun system.

  3. Not a Real Motion: The 30-degree oscillation does not represent actual motion of the lunar apsides. It is a mathematical consequence of forcing the three-body Earth-Moon-Sun system into a two-body framework.

  4. Instantaneous Validity: The osculating apogee coincides with actual lunar maximum distance only twice per month — at conjunction and opposition with the Moon.

This is a well-understood artifact of the osculating-elements formalism, documented in standard celestial mechanics texts (Brouwer & Clemence 1961; Murray & Dermott 1999). The +/-30 degree monthly swing reflects the strength of solar perturbations, not real apsidal motion.

Method #

LibEphemeris implements two equivalent approaches in lunar.py:

1. Eccentricity Vector Method #

The primary method (calc_true_lilith) computes the apogee direction from the eccentricity vector:

Algorithm:
1. Get Moon's geocentric position (r) and velocity (v) from JPL DE ephemeris
2. Compute angular momentum: h = r x v
3. Compute eccentricity vector: e = (v x h)/mu - r/|r| (points toward perigee)
4. Apply solar gravitational perturbation to eccentricity vector direction
5. Apogee direction = -e (opposite to perigee)
6. Transform to ecliptic coordinates with precession and nutation
7. Apply perturbation corrections (evection, variation, annual equation, etc.)

2. Orbital Elements Method #

The alternative method (calc_true_lilith_orbital_elements) derives the apogee from classical orbital elements:

Algorithm:
1. Get Moon's geocentric state vectors from JPL DE ephemeris
2. Compute angular momentum vector h = r x v
3. Compute node vector n = k x h (perpendicular to orbital plane)
4. Compute eccentricity vector e = (v x h)/mu - r/|r|
5. Derive orbital elements: Omega (node), omega (argument of perigee), i (inclination)
6. Apogee longitude = Omega + omega + 180 degrees
7. Apply coordinate transformations and perturbation corrections

Perturbation Corrections #

LibEphemeris applies seven corrections to improve accuracy:

  1. Solar Gravitational Perturbation on Eccentricity Vector: Direct rotation of the eccentricity vector based on solar tidal quadrupole (amplitude ~0.01148)

  2. Evection Correction: period ~31.8 days, amplitude ~1.274 degrees Argument: 2D - M’ (twice mean elongation minus Moon’s mean anomaly)

  3. Evection-Related Secondary Terms: From Meeus Table 47.B

    • M’ - 2D: amplitude -0.2136 degrees
    • M’ + 2D: amplitude +0.1058 degrees
    • 2M’: amplitude -0.2037 degrees
    • 2M’ - 2D: amplitude +0.1027 degrees
  4. Variation Correction: period ~14.77 days, amplitude ~0.658 degrees Argument: 2D (twice mean elongation)

  5. Annual Equation Correction: period ~1 year, amplitude ~0.186 degrees Argument: M (Sun’s mean anomaly)

  6. Parallactic Inequality: period ~29.53 days, amplitude ~0.125 degrees Argument: D (mean elongation)

  7. Reduction to Ecliptic: period ~4.5 years, amplitude ~0.116 degrees Accounts for projection from inclined lunar orbital plane to ecliptic

Precision and Validation #

Measured Precision #

Precision is measured via 500-date random sampling against Swiss Ephemeris (SE_OSCU_APOG):

Method Mean Difference Max Difference RMS Difference
True Lilith (LibEphemeris) ~52 arcsec (~0.015 deg) ~235 arcsec (~0.065 deg) ~60 arcsec (~0.017 deg)
Mean Lilith ~12 arcsec (~0.003 deg) ~18 arcsec (~0.005 deg) pyswisseph-compatible
Interpolated Apogee ~1.1 deg ~3.3 deg Different algorithm

For further precision benchmarks across all bodies, see Precision Reference.

Lilith Method Selection Guide #

Use Case Recommended Method Precision vs Swiss Ephemeris
Osculating lunar apogee True Lilith ~0.015 deg mean
Smooth, predictable motion Mean Lilith ~0.003 deg mean (compatible)
Physical apogee passages Interpolated Apogee ~1.1 deg (different algorithm)
Swiss Ephemeris compatibility (SE_OSCU_APOG) True Lilith Sub-arcminute
Swiss Ephemeris compatibility (SE_MEAN_APOG) Mean Lilith Sub-arcminute

For applications requiring the osculating (instantaneous) lunar apogee, True Lilith (calc_true_lilith) is recommended. Its sub-arcminute precision makes it suitable for all practical astrological applications.

For smooth motion without 30-degree oscillations, Mean Lilith (calc_mean_lilith) provides predictable behavior and excellent Swiss Ephemeris compatibility (~0.003 deg mean difference).

Comparison with Swiss Ephemeris #

Both implementations use the same fundamental approach: computing osculating orbital elements from the Moon’s instantaneous state vectors.

Sources of Residual Differences #

The small residual differences (~0.015 deg mean) between LibEphemeris and Swiss Ephemeris arise from:

  1. Different Ephemeris Sources:

    • Swiss Ephemeris: Compressed JPL DE431 data with ~0.001" precision
    • LibEphemeris: JPL DE440 via Skyfield (slightly different interpolation)
  2. Perturbation Model Details: Minor differences in how solar and planetary perturbations are incorporated. Swiss Ephemeris may use integrated analytical lunar theory internally, while LibEphemeris applies calibrated post-hoc corrections.

  3. Coordinate Transformation Differences: Small differences in precession, nutation, and obliquity models.

The Osculating Apogee Paradox #

The +/-30 degree monthly oscillation of the osculating apogee is an artifact of the two-body approximation (see Brouwer & Clemence 1961, Ch. XI). This has important implications:

  1. No “Correct” Answer: There is no single “correct” osculating apogee because the concept itself is a simplification that does not accurately represent lunar motion.

  2. Different Implementations Valid: Both Swiss Ephemeris and LibEphemeris implementations are valid mathematical representations of the osculating apogee concept, even though they differ slightly.

  3. True Lilith is Model-Dependent: When solar perturbations are significant (as they always are for the Moon), the “osculating apogee” concept is inherently ambiguous.

The osculating apogee is a mathematical construct with limited physical meaning. The “true” apogee in terms of actual lunar distance extremes only aligns with the osculating apogee twice per month.

The Interpolated Apogee Alternative #

The “interpolated” or “natural” apogee (SE_INTP_APOG in Swiss Ephemeris) smooths out the 30-degree oscillations by interpolating between actual lunar apogee passages. This results in:

  • Oscillation amplitude: +/- 5 degrees (vs. +/- 30 degrees for osculating)
  • More physically meaningful: represents actual variation of apogee passages
  • Less dependent on two-body approximation artifacts

For details on the interpolated apogee implementation, see Interpolated Apogee Methodology.

References #

  1. Brouwer, D. & Clemence, G.M. “Methods of Celestial Mechanics” (1961), Academic Press, Chapter XI (osculating elements and perturbations)

  2. Murray, C.D. & Dermott, S.F. “Solar System Dynamics” (1999), Cambridge University Press, Chapter 2

  3. Chapront-Touze, M. & Chapront, J. “Lunar Tables and Programs from 4000 B.C. to A.D. 8000” (1991), Willmann-Bell

  4. Meeus, J. “Astronomical Algorithms” (2nd ed., 1998), Willmann-Bell, Chapter 47

  5. Brown, E.W. “An Introductory Treatise on the Lunar Theory” (1896)

  6. Santoni, Francis. “Ephemerides de la lune noire vraie 1910-2010” (Editions St. Michel, 1993)

  7. Koch, Dieter. “Was ist Lilith und welche Ephemeride ist richtig”, Meridian 1/95

  8. Vallado, D. “Fundamentals of Astrodynamics and Applications” (4th ed., 2013)