tauqeet-js 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,7 +8,8 @@
8
8
  ## ✨ Why Tauqeet.js?
9
9
  In Urdu and Arabic, *Tauqeet* refers to the science of timekeeping, specifically for religious purposes. This library is designed to bring that ancient precision to the modern web with a focus on:
10
10
  - **Sub-Second Precision:** Uses Successive Approximation loops for perfect convergence.
11
- - **Topocentric Accuracy:** Accounts for refraction, solar semidiameter, parallax, and **Altitude (Elevation)**.
11
+ - **Topocentric Accuracy:** Accounts for refraction (**Bennett Formula**), solar semidiameter, parallax, and **Altitude (Elevation)**.
12
+ - **Scientific Asr:** Refined shadow-counting logic using apparent visual horizons.
12
13
  - **Low-Code API:** Get results in one line of code.
13
14
  - **Robust:** Hardened against division-by-zero errors at poles and extreme latitudes.
14
15
 
@@ -43,24 +44,38 @@ const schedule = getPrayerTimes({
43
44
  });
44
45
  ```
45
46
 
46
- ### 3. High-Precision Astronomy
47
+ ### 2. Scientific Asr Accuracy
48
+ New in v1.0.1: Accounts for **Solar Semi-Diameter** and **Atmospheric Refraction** at both Noon (Dhuhr) and Asr for bit-perfect alignment with visual shadow observations.
49
+
50
+ ### 3. Atmospheric Refraction (Bennett Formula)
51
+ Specify your local weather conditions to refine refraction using the high-precision **Bennett's Formula (1982)**.
52
+ ```javascript
53
+ const times = getPrayerTimes({
54
+ location: { latitude: 31.4, longitude: 73.0 },
55
+ temperature: 25, // 25°C
56
+ pressure: 1013, // 1013 mbar
57
+ pressureUnit: 'mbar' // 'kPa' or 'mbar'
58
+ });
59
+ ```
60
+
61
+ ### 4. High-Precision Astronomy
47
62
  Access coordinates for the Sun, Moon (including phases), and Polaris.
48
63
  ```javascript
49
- import { AstronomyClass } from 'tauqeet-js';
64
+ import { Astronomy } from 'tauqeet-js';
50
65
 
51
- const astro = new AstronomyClass();
66
+ const astro = new Astronomy();
52
67
  console.log(astro.moon.illumination); // Current moon phase %
53
68
  console.log(astro.sun.GHA); // Sun Greenwich Hour Angle
54
69
  ```
55
70
 
56
- ### 4. Qibla Direction
57
- Calculates Great Circle bearing and Distance to Makkah.
71
+ ### 5. Qibla & Sun Alignment
72
+ Calculates the Great Circle bearing, distance, and even **Sun Alignment** times (when the sun points exactly towards Qibla).
58
73
  ```javascript
59
- import { calculateQibla } from 'tauqeet-js';
74
+ import { calculateQibla, calculateSunAtQibla } from 'tauqeet-js';
60
75
 
61
76
  const qibla = calculateQibla({ latitude: 31.4, longitude: 73.0 });
62
- console.log(qibla.bearing); // Bearing from North
63
- console.log(qibla.distance); // KM to Kaaba
77
+ const sunTimes = calculateSunAtQibla(31.4, 73.0);
78
+ // sunTimes.qibla -> Time the sun is at the Qibla bearing
64
79
  ```
65
80
 
66
81
  ## 📐 Accuracy Benchmark