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

    Function detectHouseIngress

    • Detect if an ingress occurred between two positions.

      Parameters

      • houseCusps: number[]

        Array of 12 house cusp longitudes

      • currentLongitude: number

        Current position of the body

      • previousLongitude: number

        Previous position of the body

      • body: CelestialBody

        The celestial body (for naming)

      • isRetrograde: boolean

        Whether the body is in retrograde motion

      Returns HouseIngress | null

      HouseIngress if a cusp was crossed, null otherwise

      This compares the house placement at two times to determine if a house boundary was crossed. It handles both direct and retrograde motion, as well as the 12→1 house wraparound.

      const cusps = [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330];
      const ingress = detectHouseIngress(cusps, 35, 25, CelestialBody.Saturn, false);
      // Returns: { body: 'Saturn', house: 2, previousHouse: 1, direction: 'entering', isRetrograde: false }