Skip to content

getMoonVisibilityEstimate

github-actions[bot] edited this page May 30, 2026 · 1 revision

moon-sighting v1.1.1


moon-sighting / getMoonVisibilityEstimate

Function: getMoonVisibilityEstimate()

getMoonVisibilityEstimate(date?, lat, lon, elevation?): MoonVisibilityEstimate

Defined in: api/index.ts:647

Quick kernel-free crescent visibility estimate using the Odeh criterion.

Computes approximate crescent geometry (ARCL, ARCV, W) from Meeus Ch. 47 positions at the given observation time and applies the Odeh V-parameter formula. Accuracy is limited by the Meeus approximation (~0.3°) and the fact that "best time" is not computed — pass your estimated observation time.

For precise crescent work, use getMoonSightingReport() with the DE442S kernel.

Parameters

date?

Date = ...

Observation time (default: now). Use a post-sunset time for best results.

lat

number

Observer geodetic latitude in degrees (north positive)

lon

number

Observer longitude in degrees (east positive)

elevation?

number = 0

Observer height above WGS84 ellipsoid in meters (default: 0)

Returns

MoonVisibilityEstimate

MoonVisibilityEstimate with Odeh V, zone, and geometry values

Example

// Estimate crescent visibility at sunset + 40 min in Mecca
const obs = new Date('2025-03-01T15:30:00Z')  // ~sunset + 40 min in Mecca
const est = getMoonVisibilityEstimate(obs, 21.42, 39.83)
console.log(est.zone)               // 'A' through 'D'
console.log(est.isVisibleNakedEye)  // true/false

Clone this wiki locally