In Islamic jurisprudence, the five daily prayers are inextricably linked to tangible cosmic phenomena: Fajr to the true astronomical dawn, Dhuhr to solar culmination past the meridian, Asr to shadow length parity, Maghrib to the disappearance of the solar upper limb, and Isha to the extinction of twilight. For centuries, Muslim astronomers and jurists worked in harmony to record and calculate these celestial moments with meticulous care.
However, the translation of these principles into modern digital software introduced a silent structural crisis. The majority of contemporary prayer time libraries and web widgets rely on flattened geometry and simplified trigonometric formulas. They tacitly assume that every coordinate on Earth experiences an ordinary sunrise, sunset, and positive noon shadow every single day. When the planet is placed in its true physical orbit in space, those simplifications collapse at high latitudes and temporal boundaries, generating fabricated times that conflict with physical reality and jurisprudential honesty.
Based on the formal engineering investigation documented in work order R0001 (Issue #5), this article details how Adhan Earth (athan.waqf.app) resolves these structural failures, establishing an open planetary observatory endowed as a digital waqf under the WaqfTech umbrella.
The Mandatory Date Trap and Cross-Layer Semantic Collapse
Rigorous audit of prevailing prayer time libraries revealed a core conceptual flaw: the conflation of distinct semantic layers. Standard libraries treat a mandatory programming clock object (`Date`), an astronomical horizon crossing, a fiqh judgment, a cartographic contour, and a graphical rendering blend as interchangeable representations of the same entity.
Because typical programming APIs mandate returning a concrete timestamp (`HH:MM:SS`), calculation engines cannot express astronomical non-existence. When a trigonometric equation fails to intersect the horizon—such as during polar night or midnight sun—the engine clamps the trigonometric outputs or silently falls back to solar noon or midnight. The API returns a fabricated timestamp to satisfy its type contract, substituting mathematical fiction for cosmic reality.
Baseline Witnesses: The Tromsø Winter Anomaly (W01)
To demonstrate this failure reproducibly, the project documented the baseline behavior of standard prayer libraries in Tromsø, Norway (latitude 69.65°N) on the winter solstice of December 21, 2026:
- Solar Culmination: With solar declination at -23.44°, the maximum solar altitude at solar noon reaches only -3.09°. The sun remains continuously below the horizon for the entire day.
- Fabricated Sunrise and Sunset: Despite the sun never rising, conventional software returns a sunrise at 10:42:14 UTC and a Maghrib at that exact same second (10:42:14 UTC). The solar altitude at both returned events is -3.09°, violating the required -0.833° sunset threshold by over 2.25 degrees.
- Chronological Inversion: The engine proceeds to return Dhuhr at 10:43:14 UTC and Asr at 11:14:00 UTC (with the sun at -3.26° below the horizon). Consequently, the fabricated Maghrib actually precedes Dhuhr and Asr in the daily schedule.
- Negative Noon Shadow Ratio: The shadow formula tan(|phi - delta|) evaluates to -18.54 because the sun never rises above the horizon, yet the library still computes and returns a natural Asr time.
In contrast, Adhan Earth introduces explicit, first-class typed absence (`alwaysBelow` for polar night, `alwaysAbove` for midnight sun, and horizontal grazing). When the sun does not cross the horizon, the observatory records the absence of a natural physical event rather than fabricating an artificial time, allowing transparent application of recognized jurisprudential estimation rules.
Validation of Positive Noon Shadow for Asr
Classical Islamic jurisprudence establishes that Asr begins when an object's shadow equals its length plus the shadow cast at solar noon (Dill al-Zawal). A physical shadow at noon requires that the sun has culminated above the horizon.
When high-latitude winters yield negative shadow values, standard applications either output times below the horizon or apply ad-hoc offsets such as Dhuhr + 2 hours. Adhan Earth strictly validates that a positive solar altitude exists at noon. If no physical noon shadow can form, the engine explicitly marks natural calculation as impossible, directing the consumer to authoritative fiqh estimation policies.
Correcting Directional Geometry and Front Kinematics
Investigation of existing 3D earth globes (Witness W04) revealed that prayer contours were frequently inverted, placing Asr on the morning side of the globe. Historical unit tests had codified the defect because the test fixtures used the same inverted coordinate assumptions.
Adhan Earth implements strict local hour angle kinematics:
- Morning fronts (Fajr and Sunrise) advance along the ascending solar branch (local hour angle H < 0).
- Evening fronts (Maghrib and Isha) advance along the descending solar branch (local hour angle H > 0).
- Asr is strictly bounded to the afternoon post-meridian branch, ensuring that prayer contours move across the planet in harmony with real solar motion.
The Fixed-Interval Isha Locus vs. Arbitrary Twilight Angles
Certain authoritative conventions specify a fixed time offset after Maghrib for Isha (such as the 90-minute rule in the Umm Al-Qura calendar). Witness W05 identified that 3D simulators mapped Umm Al-Qura Isha to an 18° astronomical twilight circle when `ishaAngle = 0` was encountered.
At Makkah on October 4, 2026, Maghrib occurs at 15:06 UTC and Isha at 16:36 UTC, where the true solar depression is -21.80°, not -18°. Adhan Earth constructs the true temporal setting locus at `t - 90 min` in Earth-fixed coordinates, ensuring the displayed contour corresponds to the exact time of the prayer.
Civil Date Windows and the Tokyo Dawn Disconnect
Witness W06 revealed that calculating next-day events by adding 24 hours (+86,400,000 ms) introduces an error of approximately 17.3 seconds due to the equation of time and orbital eccentricity.
Furthermore, evaluating events strictly by UTC calendar dates caused engines to completely miss the dawn prayer in Tokyo, because Tokyo's civil day advances ahead of UTC. Adhan Earth resolves this with multi-day civil date windowing and coordinate-aware event searches that preserve prayer continuity across the International Date Line.
Radiative Realism and Prevention of Light Leaks
Physical precision was carried into the 3D WebGL shaders. Witness W07 demonstrated that standard 3D web globes used heuristic smoothstep blending functions that leaked direct sunlight more than 9 degrees into the dark hemisphere, illuminating night cities artificially.
Adhan Earth eliminates light leakage through spherical geometric occlusion, separates direct sunlight from atmospheric scattering, distinguishes geometric sunset (0.0°) from apparent optical refraction (-0.833°), and terminates twilight scattering at the astronomical boundary (-18°), all integrated into Three.js linear color management.
Global Continuity: Sweep-Line Geometry vs. Unchecked Folklore
It is widely said that the call to prayer never ceases for a single second across the Earth. Adhan Earth subjected this assertion to rigorous mathematical modeling across 15,000 populated settlements. Witness W08 uncovered that previous software divided the day into coarse five-minute bins and artificially injected zero (`Math.min(..., 0)`).
Adhan Earth replaced this with an exact computational geometry Sweep-line algorithm over interval endpoints, assuming a nominal 4-minute adhan duration. Under baseline simulation parameters, the model achieves 100% temporal continuity.
Crucially, the project practices complete scientific and religious transparency: 100% continuity is a mathematical property of the dataset and chosen parameters, not empirical proof of audible acoustics across uninhabited oceans and deserts. Truthful scholarship honors the beauty of Islamic practice without relying on unsubstantiated claims.
Engineering Provenance and Digital Waqf
Adhan Earth was built through a multi-agent AI engineering architecture, validated by 761 automated tests across 35 test files, and certified by an independent victory audit confirming zero mock shams and authentic mathematical algorithms.
Deployed as a lightweight client on Cloudflare Workers, the project is endowed as a perpetual waqf for Allah Almighty under the Waqf Digital Public License, applying the base level: Charitable Waqf with Binding Attribution (Waqf-DPL-Khayri-Mulzim Draft 1.0), anchored to the Reference Revision (Draft 2026-08-31) with cryptographic verification (SHA-256: 00b0de3122d71c1f365e08525099e2fa1174e2dd6a7ed7de5ffbdf3a87cc1a95).
Acknowledgments and Scientific Provenance
We extend our deepest gratitude and recognition to Muddaththir ‘Ismāʻīl bin Dāniyāl al-Amrīkī (@theIslampill on X, GitHub). The foundational mathematical formulations, rigorous baseline diagnostics, and the engineering work order (R0001) originated from his research and exhaustive documentation in GitHub Issue #5, as prominently recognized on the official Adhan Earth Credits Page. May Allah reward him abundantly for his profound contributions to astronomical precision and jurisprudential integrity.
We invite researchers, developers, and users worldwide to explore Adhan Earth (athan.waqf.app), inspect the live 3D planetary simulation, and examine the open mathematical specifications.