Hilal Vision — Scientific Methodology
Technical documentation for astronomers, researchers, and advanced users
Document version: 2.2 · Last updated: October 2026
Astronomy engine: astronomy-engine v2 (VSOP87 / ELP2000) by Don Cross
Table of Contents
- The Crescent Visibility Problem
- Yallop (1997) Criterion — q-value
- Odeh (2004) Criterion — V-value
- The Danjon Limit — Physical Visibility Boundary
- Atmospheric Refraction & Altitude Correction
- Three-Engine Hijri Calendar System
- Best-Time-to-Observe Algorithm
- Global Visibility Grid Computation
- ICOP Historical Archive
- Crowdsourced Sighting Reports — Validation Pipeline
- Data Export & Public API
- Accuracy & Known Limitations
- References
1. The Crescent Visibility Problem
The Islamic lunar calendar begins each month with the first visual sighting of the new crescent moon (hilāl) after astronomical conjunction (new moon). This is not merely a calendar question — it is a precision astronomy problem. Whether the crescent is visible from a specific location on a specific night depends on a conjunction of geometric, atmospheric, and physiological factors:
- Geometry: The Moon must be sufficiently separated from the Sun (elongation above about 7°, the Danjon limit) and high enough above the horizon at sunset (Arc of Vision, ARCV) to be theoretically visible.
- Crescent width (W): The illuminated sliver must be wide enough to be resolved by the naked eye (typically W > 0.5 arcminutes).
- Atmospheric conditions: Refraction, extinction, cloud cover, and sky brightness all affect practical observability.
- Observer physiology: Naked-eye, binocular, and telescopic observations have different visibility thresholds.
Modern crescent visibility models — chiefly Yallop (1997) and Odeh (2004) — encode these factors into standardised visibility scores validated against hundreds of historical observations.
Coordinate System
All computations are performed in topocentric coordinates — positions as seen by an observer at a specific geographic location on Earth's surface — rather than geocentric coordinates (as seen from Earth's centre). This distinction is critical for the Moon, whose topocentric parallax can be up to ~1°, significantly affecting apparent altitude and elongation.
Input parameters at the moment of local sunset, for observer at latitude φ, longitude λ, elevation h:
| Parameter | Symbol | Units | Description |
|---|---|---|---|
| Moon topocentric altitude | h_moon | degrees | Apparent altitude corrected for refraction |
| Sun topocentric altitude | h_sun | degrees | Apparent altitude corrected for refraction |
| Arc of Vision | ARCV | degrees | h_moon − h_sun |
| Moon-Sun azimuth difference | DAZ | degrees | Moon azimuth − Sun azimuth |
| Lunar elongation | ε | degrees | Moon-Sun angular separation |
| Moon's angular semi-diameter | SD | arcminutes | arcsin(1737.4 / moonDist_km) × 60 |
| Topocentric crescent width | W | arcminutes | SD × (1 − cos ε) |
2. Yallop (1997) Criterion — q-value
Reference: Yallop, B.D. (1997). A Method for Predicting the First Sighting of the New Crescent Moon. HM Nautical Almanac Office Technical Note No. 69.
Background
B.D. Yallop at the Royal Greenwich Observatory developed a polynomial model trained on 295 historical crescent sighting records. The model captures the relationship between the Arc of Vision (ARCV) — the altitude difference between Moon and Sun at local sunset — and the topocentric crescent width (W), deriving a single visibility score, the q-value.
Crescent Width Calculation
The topocentric crescent width W is derived as follows:
SD = arcsin(1737.4 / moonDist_km) × 60 [arcminutes]
W = SD × (1 − cos(elongation_degrees × π/180)) [arcminutes]
Where:
moonDist_km: geocentric distance to the Moon in kilometreselongation_degrees: topocentric Moon-Sun angular separation
The crescent width W is highly sensitive to lunar distance: at perigee (~356,500 km), the Moon appears ~14% larger than at apogee (~406,700 km).
q-value Formula
The q-value is computed by comparing the observed ARCV against the theoretical minimum ARCV required for visibility at a given crescent width W:
q = (ARCV − ARCV_min(W)) / 10
Where:
ARCV_min(W) = 11.8371 − 6.3226·W + 0.7319·W² − 0.1018·W³
This is a polynomial fit to Yallop's original observation data.
Zone Classification
| Zone | q-value Range | Interpretation |
|---|---|---|
| A | q ≥ +0.216 | Easily visible with the naked eye |
| B | −0.014 ≤ q < +0.216 | Visible under perfect conditions |
| C | −0.160 ≤ q < −0.014 | May need optical aid to locate crescent |
| D | −0.232 ≤ q < −0.160 | Will need optical aid; naked-eye impossible |
| E | q < −0.232 | Not visible even with optical aid |
| F | — | Moon below horizon at sunset (conjunction not yet passed, or Moon sets before Sun) |
Zone F is determined geometrically: if h_moon ≤ 0° at local sunset, the crescent cannot be observed regardless of q-value.
Interpretation Note
The Yallop criterion was designed primarily for naked-eye observation. It was calibrated on 295 historical and modern sighting records. It performs well for Zones A and E (clear positives and negatives) but has higher uncertainty in the intermediate zones B–D, which is where regional variation and atmospheric conditions dominate.
3. Odeh (2004) Criterion — V-value
Reference: Odeh, M.S. (2004). New Criterion for Lunar Crescent Visibility. Experimental Astronomy, 18, 39–64.
Background
Mohammad Sh. Odeh at the International Astronomical Center refined the Yallop model using a substantially larger dataset: 737 crescent sighting observations, almost half of them from the Islamic Crescents' Observation Project (ICOP), including modern CCD and telescopic sightings that Yallop's 1997 dataset did not include. This makes the Odeh criterion better calibrated for optical-aid sightings.
V-value Formula
V = ARCV − ARCV_min_odeh(W)
Where:
ARCV_min_odeh(W) = −0.1018·W³ + 0.7319·W² − 6.3226·W + 7.1651
Note: The polynomial coefficients are the same as Yallop's ARCV_min but with a different constant term (7.1651 vs. 11.8371), and the normalisation factor is removed — V is measured in degrees directly.
Zone Classification
| Zone | V-value Range | Observation Method | Interpretation |
|---|---|---|---|
| A | V ≥ +5.65 | Naked eye | Easily visible |
| B | +2.00 ≤ V < +5.65 | Optical aid, then possibly naked eye | Visible with optical aid; may then be seen with the naked eye |
| C | −0.96 ≤ V < +2.00 | Binoculars/telescope | Visible with optical aid only |
| D | V < −0.96 | — | Not visible even with optical aid |
Odeh vs. Yallop: Key Differences
| Aspect | Yallop | Odeh |
|---|---|---|
| Training dataset | 295 historical records | 737 observations, almost half from ICOP (visual + CCD) |
| Telescope/CCD validity | Not calibrated | Explicitly calibrated |
| Output | q-value (dimensionless) | V (degrees) |
| Zone scheme | 6 zones (A–F) | 4 zones (A–D, excluding moon-below-horizon) |
| Preferred use | Naked-eye prediction | Optical-aid prediction |
Hilal Vision implements both criteria simultaneously, allowing users to compare outputs and select the criterion appropriate to their community's practice.
4. The Danjon Limit — Physical Visibility Boundary
Reference: Danjon, A. (1932). Jeunes et vieilles lunes. L'Astronomie, 46, 57–66.
French astronomer André Danjon found that the crescent shortens as the Moon-Sun elongation shrinks, and that below an elongation of roughly 7 degrees no crescent has been seen with the naked eye. Published estimates of the naked-eye limit range from about 5° to 7.5°, Odeh's data show an optical-aid limit near 6.4°, and specialised telescope-and-camera stacking has recorded crescents thinner than that (about 4.4° in 2013). The physical cause is still debated: the shortening of the illuminated arc through the topography of the lunar limb, the fall in surface brightness and contrast against the twilight sky, or a combination of both.
Hilal Vision does not apply the Danjon limit as a separate cutoff. A crescent too thin to see has a very small width W, which already pushes the Yallop q-value and the Odeh V-value into their lowest zones, so the limit is built into both criteria rather than enforced on top of them. The elongation is shown for reference.
5. Atmospheric Refraction & Altitude Correction
Standard Refraction Model
The apparent altitude of celestial objects near the horizon is increased by atmospheric refraction. Hilal Vision uses the Bennett (1982) formula (popularised by Meeus, Astronomical Algorithms, 2nd ed., Chapter 16):
R₀ = 1.02 / tan(h + 10.3 / (h + 5.11)) [arcminutes]
Where h is the apparent (refracted) altitude in degrees. At the horizon this gives about 34.5 arcminutes, falling to about 10 arcminutes at 5° altitude. Bennett quotes an accuracy of about 0.07 arcminutes for altitudes above 5°, degrading towards the horizon, where real refraction also depends on the temperature profile of the air.
Pressure & Temperature Correction
Standard conditions are P₀ = 1010 hPa, T₀ = 10°C. The correction for non-standard conditions is:
R = R₀ × (P / 1010) × (283 / (273 + T))
Where P is surface pressure in hPa and T is temperature in °C. The altitude returned by the astronomy engine already includes standard refraction, so this correction adds only the difference between standard air and the local air.
Users with Pro access can override P and T manually (useful for high-altitude observatories or unusually hot/cold conditions). The visibility maps and the globe use the live pressure and temperature of the place (from Open-Meteo, unless automatic weather is switched off); the single-place pages use the standard P = 1010 hPa, T = 10°C.
Observer Elevation & Horizon Dip
When an observer is at elevation h (metres above sea level), the geometric horizon is depressed by:
dip = 1.7615 × √h [arcminutes]
The app applies this dip to the Moon and Sun altitudes it reports, using the elevation of the chosen place when it is known (from the place search) and 0 m otherwise. Because the dip is applied to both bodies, it does not change the arc of vision between them; what it changes is how low a body can sink before it disappears, which lengthens the time the Moon stays visible after sunset.
Atmospheric Extinction
At low altitudes, the Moon's brightness is reduced by atmospheric extinction. While the Yallop/Odeh models implicitly account for this in their polynomial fits, Hilal Vision does not apply an explicit extinction model beyond the refraction correction above. Users in high-humidity or aerosol-rich environments may find predictions optimistic.
Local Horizon (Terrain)
Standard rise and set times assume a flat horizon at sea level. Hilal Vision also shows rise and set times over the real skyline of the chosen place, because in a valley the Sun can clear the nearest ridge tens of minutes after the tabulated sunrise. For each whole degree of azimuth the app takes the highest terrain angle within 60 km from public elevation data (AWS Open Data Terrain Tiles, 30 to 90 m detail), subtracts the curvature of the Earth (with a terrestrial refraction coefficient of 0.13) and compares the upper limb of the Sun or Moon, including refraction, with that skyline minute by minute. Buildings and trees are not in the elevation data, so you can add an obstruction angle for the east and west yourself. These local times, and a check of whether the Moon is above the terrain when the Sun disappears, are shown alongside the standard values: the Yallop and Odeh classifications are unchanged and still assume a flat horizon.
6. Three-Engine Hijri Calendar System
Hilal Vision implements three independent Hijri calendar algorithms simultaneously, allowing side-by-side comparison:
Engine 1 — Astronomical (Computed Crescent)
The astronomical calendar starts each month on the civil day after the astronomical new moon (the conjunction of the Sun and Moon), in the time zone of your device: the day on which the conjunction happens still belongs to the old month. It does not look at visibility at all: it is a pure calculation of the lunar cycle, computed with astronomy-engine.
This engine shows the conjunction-based calendar: what you would get if every month began on the first day after the new moon. Because a crescent is only seen a day or more after conjunction, it often starts months a day earlier than a calendar based on visibility.
Engine 2 — Umm al-Qura (KACST)
The Umm al-Qura calendar is the official civil calendar of Saudi Arabia, maintained by the King Abdulaziz City for Science and Technology (KACST). It is a pre-computed tabular calendar based on:
- Astronomical conjunction (new moon) occurring before sunset at Mecca
- Moon setting after the sun at Mecca on the same evening
Crucially, it does not require the crescent to be physically visible. This is a calculated civil calendar, not an observation-based one.
Hilal Vision uses the @umalqura/core library, whose look-up tables reproduce the published Umm al-Qura calendar. The start of Ramadan and Eid in Saudi Arabia is announced separately by the Supreme Court and can differ from this calendar.
Engine 3 — Tabular (Kuwaiti Algorithm)
The tabular calendar uses a 30-year intercalation cycle (11 leap years per cycle) based on the mean synodic month of 29 days, 12 hours, 44 minutes, and 3 seconds. This is the oldest and simplest Hijri calendar computation, used in historical Islamic astronomy manuscripts.
Hilal Vision implements the Kuwaiti variant of the tabular algorithm, which places leap days in years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, and 29 of each 30-year cycle.
Calendar Accuracy Comparison
| Calendar | Basis | Accuracy | Authority |
|---|---|---|---|
| Astronomical | Day after the new moon | Exact conjunction; often a day earlier than a visible crescent | None (pure computation) |
| Umm al-Qura | Conjunction + moonset at Mecca | Reproduces the published table | Saudi Arabia (civil calendar) |
| Tabular | Mean synodic period intercalation | Within about 1 to 2 days of the Moon; the error is bounded and does not accumulate | Historic/Academic |
7. Best-Time-to-Observe Algorithm
The Best-Time-to-Observe (BTTO) engine gives one recommended moment and a window for looking for the crescent.
Best Time (Yallop)
The recommended moment is Yallop's best time, the moment at which his q-test is evaluated (Yallop 1997):
lag = moonset − sunset
bestTime = sunset + (4/9) × lag
Sunset and moonset are the ordinary flat-horizon times. The card also shows the Moon's and the Sun's altitude at that moment.
Observation Window
The window is the part of the evening, between sunset and moonset, when the Moon is more than 3° above the horizon and the Sun is more than 2° below it. This is the same rule the evening timeline under the card and the figure below draw. If there is no such time, the card says there is no viable window. Neither the best time nor the window includes cloud cover; live cloud cover is shown separately and used by the push-alert planner.
Local Horizon in the Best Time
When the terrain skyline of the chosen place is available, the lag still starts at the true sunset, because the brightness of the sky depends on how far the Sun is below the horizon, not on whether a hill hides it. It ends when the Moon disappears behind the terrain, if that is earlier than its flat-horizon moonset. The window only counts moments when the Moon is above the terrain in its own direction (and above 3°), not merely above the flat horizon. If the Moon is behind the terrain at the best time, the nearest moment when it is clear is shown instead. The card says when this adjustment was applied.
8. Global Visibility Grid Computation
The global visibility maps compute Yallop/Odeh visibility zones at a regular grid of geographic points. Three resolution levels are available:
| Resolution | Points (80°S to 80°N) | Use Case |
|---|---|---|
| 6° × 6° | ~1,650 | Fast preview / mobile |
| 4° × 4° | ~3,700 | Standard display (default) |
| 2° × 2° | ~14,700 | High-detail (Pro) |
Computation Architecture
- Grid computation is offloaded to a Web Worker thread to avoid blocking the UI
- The grid is recomputed in the browser when the date or resolution changes; it is not sent to or stored on a server
- Each grid point evaluates: topocentric Moon/Sun positions → ARCV, W → q/V → zone classification
- The sunset time at each grid point is computed independently, so the map represents a composite of local sunsets across the globe — not a simultaneous snapshot
Composite Sunset Interpretation
A critical point often misunderstood: the global visibility map does not show what the sky looks like at a single moment in time. It shows what the crescent visibility situation is at each location's own local sunset. Since the Earth rotates, local sunsets span a 24-hour period. The map is therefore a mosaic of visibility forecasts at each point's local sunset on the selected date.
9. ICOP Historical Archive
The Islamic Crescents' Observation Project (ICOP) was established in 1998 by the International Astronomical Center (IAC), Abu Dhabi. It is a long-running, continuously maintained database of physical crescent observation records.
Hilal Vision's observation archive contains 1,028 records of the Ramadan and Shawwal crescents of Hijri years 1440–1446 AH (2019–2025 CE), from 316 cities. The month picker covers 1438–1465 AH; months without observation data show the computed visibility only. For each record the archive holds:
- Place: the country and city reported by the observer
- Outcome: Seen (566 records) or Not Seen (462 records)
- Method: the optical aid used, where the report gives it
Data Attribution
All ICOP data is used with explicit attribution to the International Astronomical Center. Data is reproduced for educational and research purposes in accordance with ICOP's stated policy of public availability for scientific use.
Theoretical Computed Cities
In addition to ICOP observations, the archive displays computed theoretical visibility for major cities using the Yallop criterion, allowing comparison between what was observed and what was theoretically predicted. Discrepancies illuminate the role of atmospheric and observational factors.
10. Crowdsourced Sighting Reports — Validation Pipeline
The live sighting reports feature (Sighting Feed) lets visitors submit crescent sighting reports. Reports go through these checks:
Validation Steps
- Zone F Rejection: A report of a sighting (as opposed to a report of not seeing the crescent) from a place where the Moon was below the horizon at local sunset is rejected, because it is geometrically impossible. Reports of not seeing the crescent are always accepted, since negative observations are what calibrate the models.
- Rate Limiting: Submissions are limited to 5 per minute per visitor (per IP address for anonymous reports, per account for signed-in users) to prevent spam and flooding.
- Atmospheric Enrichment: After submission, the current temperature, pressure and cloud cover (Open-Meteo) are attached to the report, together with the computed Yallop q-value, Odeh V-value and zone for the reported coordinates. Reports from signed-in users also record aerosol optical depth.
- Privacy Jitter: The stored location is displaced by up to about 1.1 km, so the exact position of a private observation point is never published.
Data Use
Aggregated, anonymised sighting data may be used in future research on crescent visibility patterns. Individual user data is handled according to the Privacy Policy.
11. Data Export & Public API
Export Formats
- CSV: Table of sighting records including date, location, q-value, ARCV, W, outcome
- JSON: Structured object with full ephemeris data per record Available from the ICOP Archive and Sighting Feed views.
Public REST API (v1)
| Endpoint | Parameters | Returns |
|---|---|---|
GET /api/v1/visibility | lat, lng, date (ISO 8601) | Zone A–F, q-value, ARCV, W, elongation, moonAltitude, sunAltitude |
GET /api/v1/moon-phases | date (ISO 8601) | Phase name, illuminated fraction, lunar age (hours), next new moon (approximate and exact), next full moon |
GET /api/v1/skyline | lat, lng | Terrain elevation angle in degrees for each whole degree of azimuth within 60 km, and the ground elevation. Cached per ~110 m cell |
GET /api/v1/geocoding | q | Place search results: name, latitude, longitude, elevation and time zone |
Rate limit: the public endpoints allow 10 requests per minute per IP address. The skyline endpoint applies this limit only when it has to compute a new location; repeated requests for the same place are served from a cache.
12. Accuracy & Known Limitations
Positional Accuracy
- astronomy-engine (VSOP87/ELP2000) gives arcminute-level or better positions for the Moon and Sun for dates within ±1000 years of J2000.0, far finer than crescent visibility modelling needs.
- Topocentric corrections are applied for the observer's geodetic coordinates.
- No gravitational relativistic corrections are applied (effect on lunar position: < 0.01 arcseconds).
Crescent Visibility Accuracy
- Yallop's q-value and Odeh's V-value are empirical fits to historical sighting records, so some real observations in any dataset fall outside the zone the criterion predicts. The papers (Yallop, 1997; Odeh, 2004) describe how well each fits its own data.
- Intermediate zones (B, C, D) carry the most uncertainty, because atmospheric variability matters most close to the visibility threshold.
Known Limitations
- Atmospheric variability: Clear-sky probability, seeing, and transparency are not modelled beyond cloud cover (Open-Meteo).
- Horizon profile: The Yallop and Odeh classifications assume a flat horizon at sea level. Rise and set times over the real skyline are shown alongside them (see Local Horizon in section 5), but buildings and trees are not in the elevation data unless you add them.
- Elevation: Places found through the search use their real elevation for the horizon dip; a place without a known elevation is computed at 0 m, so mountain sites may have longer observation windows than predicted.
- Sighting psychology: Human factors (observer experience, eye adaptation, horizon scanning technique) are not modelled.
- Local time zones: Sunset times use the IANA timezone database; DST transitions are handled automatically.
13. References
-
Yallop, B.D. (1997). A Method for Predicting the First Sighting of the New Crescent Moon. HM Nautical Almanac Office Technical Note No. 69, NAO, Royal Greenwich Observatory, Cambridge. PDF
-
Odeh, M.S. (2004). New Criterion for Lunar Crescent Visibility. Experimental Astronomy, 18(1–3), 39–64. DOI: 10.1007/s10686-005-7614-4. ResearchGate
-
Meeus, J. (1998). Astronomical Algorithms, 2nd Edition. Willmann-Bell, Inc., Richmond, Virginia. ISBN: 978-0943396613.
-
Danjon, A. (1932). Jeunes et vieilles lunes. L'Astronomie, 46, 57–66.
-
Cross, D. astronomy-engine — VSOP87/ELP2000 planetary position library for multiple languages. GitHub. MIT License.
-
International Astronomical Center. Islamic Crescents' Observation Project (ICOP). Abu Dhabi, UAE. Website
-
King Abdulaziz City for Science and Technology (KACST). Umm al-Qura Calendar. Riyadh, Saudi Arabia.
-
Ilyas, M. (1994). Lunar crescent visibility criterion and Islamic calendar. Quarterly Journal of the Royal Astronomical Society, 35, 425–461.
-
Schaefer, B.E. (1988). Visibility of the lunar crescent. Quarterly Journal of the Royal Astronomical Society, 29, 511–523.
-
Bennett, G.G. (1982). The calculation of astronomical refraction in marine navigation. Journal of the Institute of Navigation, 35(4), 255–259.
About Hilal Vision · Privacy Policy · Terms of Service · Support