-
Notifications
You must be signed in to change notification settings - Fork 1
getMoonPosition
moon-sighting / getMoonPosition
getMoonPosition(
date?,lat,lon,elevation?):MoonPosition
Defined in: api/index.ts:539
Compute the Moon's topocentric position (azimuth, altitude, distance) for an observer.
Works WITHOUT a kernel (uses Meeus Ch. 47 approximation). Accuracy: azimuth/altitude ~0.3°, distance ~300 km. For precision crescent work, use getMoonSightingReport() with the DE442S kernel.
Date = ...
Date and time to compute position for (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)
Topocentric az/alt (degrees), distance (km), parallactic angle (radians)
const pos = getMoonPosition(new Date(), 51.5, -0.1)
console.log(pos.azimuth, pos.altitude) // e.g. 212.4, 38.1moon-sighting · MIT License · npm · Issues
Guides
Examples
API Reference
- getMoonSightingReport
- getMoonPhase
- getMoonPosition
- getMoonIllumination
- getMoonVisibilityEstimate
- getMoon
- getSunMoonEvents
- initKernels
- downloadKernels
- verifyKernels
Domain Reference
Package Reference
Community