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

    Function getAllPositions

    • Get positions of all celestial bodies at once.

      Parameters

      Returns PlanetPositions

      Map of body to position

      const positions = getAllPositions(2451545.0);

      // Iterate all positions
      for (const [body, pos] of positions) {
      console.log(`${body}: ${pos.longitude.toFixed(2)}°`);
      }

      // Get specific body
      const moon = positions.get(Planet.Moon);