Celestine API Documentation - v0.9.0
    Preparing search index...

    Function findRetrogradePeriods

    • Find all retrograde periods for a body in a date range.

      Parameters

      Returns RetrogradePeriod[]

      Array of retrograde periods

      Each retrograde period is defined by:

      • Station Retrograde: When retrograde begins
      • Station Direct: When direct motion resumes

      Stations come from the shared station solver (the same instants as findStations in celestine/events for the same frame). A period whose station direct lies in the range is included even if its station retrograde precedes startJD; one still open at endJD is not.

      const periods = findRetrogradePeriods(CelestialBody.Mercury, jdStart, jdEnd);
      for (const period of periods) {
      console.log(`Mercury Rx from ${period.stationRetroJD} to ${period.stationDirectJD}`);
      console.log(`Duration: ${period.durationDays.toFixed(1)} days`);
      }