-
Notifications
You must be signed in to change notification settings - Fork 1
getMoon
moon-sighting / getMoon
getMoon(
date?,lat,lon,elevation?):MoonSnapshot
Defined in: api/index.ts:727
Combined kernel-free moon snapshot for a time and location.
Calls getMoonPhase(), getMoonPosition(), getMoonIllumination(), and getMoonVisibilityEstimate() in a single request. Convenient for dashboards and apps that need all four values together.
Works WITHOUT a kernel (all Meeus-based approximations).
Date = ...
Date and time (default: now)
number
Observer geodetic latitude in degrees (north positive)
number
Observer longitude in degrees (east positive)
number = 0
Observer height above WGS84 ellipsoid in meters (default: 0)
MoonSnapshot with phase, position, illumination, and visibility estimate
const moon = getMoon(new Date(), 51.5, -0.1)
console.log(moon.phase.phaseName) // 'Waxing Crescent'
console.log(moon.position.altitude) // degrees above horizon
console.log(moon.illumination.fraction) // 0.0 to 1.0
console.log(moon.visibility.zone) // 'A' through 'D'moon-sighting · MIT License · npm · Issues
Guides
Examples
API Reference
- getMoonSightingReport
- getMoonPhase
- getMoonPosition
- getMoonIllumination
- getMoonVisibilityEstimate
- getMoon
- getSunMoonEvents
- initKernels
- downloadKernels
- verifyKernels
Domain Reference
Package Reference
Community