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

    Function findExactTransitTime

    • Find the exact time when a transit aspect becomes perfect using binary search.

      Parameters

      • body: CelestialBody

        Transiting celestial body

      • natalLongitude: number

        Natal point longitude (0-360°)

      • aspectAngle: number

        Target aspect angle (0, 60, 90, 120, 180, etc.)

      • startJD: number

        Start of search window (Julian Date)

      • endJD: number

        End of search window (Julian Date)

      • tolerance: number = EXACT_TIME_TOLERANCE

        Angular tolerance in degrees (default: 0.0001°)

      Returns number | null

      Julian Date of exact aspect, or null if no crossing in window

      Uses binary search (bisection method) to find the moment when the transit becomes exact within the specified tolerance.

      Algorithm:

      1. Check if there's a zero-crossing in the window
      2. Bisect the interval, keeping the half with the crossing
      3. Repeat until deviation is within tolerance
      // Find exact Saturn conjunction to natal Sun
      const exactJD = findExactTransitTime(
      CelestialBody.Saturn,
      280.37, // natal Sun longitude
      0, // conjunction = 0°
      2460665, // start JD
      2460695 // end JD (30 days later)
      );