yantra/patha/panchanga.js
पञ्चाङ्ग of the sovereign engine: sunrise and sunset on the turn about the dhruva, the five limbs with
366 lines · 0 exports
The header, as the file states it
What it loads
- yantra/patha/sphuta.jsmodule
- yantra/patha/dhruva.jsmodule
- yantra/patha/kala-dvara.jsmodule
- yantra/patha/ss-udaya.jsmodule
What it exports
SS verses named in the header
- SS 1.11verseprāṇādiḥ kathito mūrtastruṭyādyo amūrtasaṃjñakaḥ । ṣaḍbhiḥ prāṇairvināḍī syāttatṣaṣṭyā nāḍikā smṛtā ।।
- SS 1.12versenāḍīṣaṣṭyā tu nākṣatraṃ ahorātraṃ prakīrtitam । tattriṃśatā bhavenmāsaḥ sāvano arkodayaistathā ।।
The channels it runs in
Every function, what it calls, who calls it
33 top-level functions read from the source; the doc line is the comment above each; calls and callers are resolved across the registry’s modules by name. Line numbers are the file’s at engine 3f94072.
One nāḍī = 1/60 of the star-wheel's turn, in civil days: savana / (60 x nakshatra days of the yuga), SS 1.11-1.12, 1.34-1.37.
── places ──────────────────────────────────────────────────────────────────────────────────────
The ayanāṃśa at t: opts.ayanamsha (a number) overrides; else this instance's own rule (ayanamshaFn, given to withPlaces by a tier: ss-tier.js), else the text's SS 3.9-3.10.
atan2 in degrees by the text's own sine (sphuta.js jya and its inverse), the quadrant from the signs.
The obliquity at t: opts.epsilon (a number) overrides; else this instance's own (epsilonFn, given by a measured tier: the true obliquity it measured), else the text's (SS 2.28).
Hour angle of the true Sun (degrees, 0 at the meridian, increasing westward) at the site.
The text's own rule (2.60-2.63, 3.42; council G-3, as vedha-lekha.js): the Sun's asus since rising — the meridian's asus on the turn less the Sun's right ascension plus its half-day — is 0 at sunrise and the whole day (twice the half-day) at sunset; the sine is this instance's (the 24 jyās by default).
Which rule a sunrise follows: the text's (default on the text's table, with no measured frame) or the sphere's (opts.sunrise "sphere"; Mādhava's sine; a measured ramc or obliquity; a dip; opts.sunriseMethod).
── the five limbs ──────────────────────────────────────────────────────────────────────────────
First instant after t0 at which limb `key` changes, by bracketing then bisection (to ~10 ms).
Previous instant before t0 at which limb `key` changed.
Instant (near t, within ±searchDays) when the elongation equals `target` degrees (0 new moon, 180 full moon).
The Sun's sign changes (saṅkrānti) between t1 and t2.
The name of an amānta month from the saṅkrāntis inside it (rāśi indices, 0 = Meṣa … 11, in time order) and, when it holds none, the rāśi index of the next saṅkrānti after it: the month holding the Meṣa saṅkrānti is Caitra, and so on; none → adhika, named after the next month; two → kṣaya, the second name dropped [standard rule; no local text states it]. The one rule that lunarMonth and the year bu
The amānta lunar month containing t: from the new moon before it to the next. Name: the month in which the Sun enters Meṣa is Caitra, and so on; a month with no saṅkrānti is adhika and takes the name of the month after it; a month with two is kṣaya and the second name is dropped [standard rule; no local text states it]. SS 14.15-14.16 is where the names come from (the Moon's nakṣatra at the full m
The places, the ayanāṃśa and the sāyana right ascension of the meridian (degrees) at t, on the turn: the mean Sun's right ascension carried by the local hour (12 h at local midnight).
{ A: the ayanāṃśa (degrees), ramcDeg: the sāyana right ascension of the meridian on the turn } — one meridian for lagnaAt and meridianAt.
Sidereal rising sign (lagna) at t: the ecliptic point on the eastern horizon, found on the turn about the dhruva — by SS 3.42 at the point with 2.61-2.63 (the table by default, "text"; Mādhava's sine with "madhava"), by 3.42-3.48 as worded ("text-linear"), or by the sphere ("sphere", or any opts.epsilon); site.palabha if the owner measured it, else from the latitude by the same sine.
The madhya-lagna at t: the ecliptic point on the meridian (SS 3.49), by 3.42 at the point — the sidereal λ whose right ascension is the meridian's (ramcOf). Mādhava's sine by default; the text's table with { lagna: "text" } or "text-linear". { lagna: "sphere" } (or any opts.epsilon) also takes Mādhava's sine: the point on the meridian needs no horizon, and this module adds no library trigonometry
The civil day holding the instant t at the site (SS 14.18, 1.36: sunrise to sunrise): { N, sunrise, sunset, nextSunrise, vara, polar, rule } with sunrise(N) ≤ t < sunrise(N + 1); the vāra is Kali day N's (1.51), so it changes at sunrise, not at midnight. Where the Sun does not rise or set (polar), N is the local civil date floor(t + deśāntara/360), the three times are null and polar is true.
The full pañcāṅga of civil day N (sunrise to the next sunrise) at the site.