yantra/patha/ss-chaya.js
छाया: the Sūrya-Siddhānta's shadow chain (chapter 3, tripraśna — direction, place and time) by the text's
548 lines · 0 exports
The header, as the file states it
What it loads
What it exports
SS verses named in the header
none in the registry
The channels it runs in
Every function, what it calls, who calls it
46 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.
2.23-2.27: the utkramajyā of an arc of 0…10,800′. The text's versed sines are R minus its sines read backwards (ss-numbers.test.js proves it from the words), so interpolating them is R − jyā(90° − x); past 90° it is R + jyā(x − 90°).
3.39 "utkramajyābhiḥ": the arc in minutes (0…10,800) of a versed sine 0…2R.
3.8: karṇa = √(śaṅku² + chāyā²).
3.8: chāyā = √(karṇa² − śaṅku²).
3.8 "śaṅkur viparyayāt": śaṅku = √(karṇa² − chāyā²).
3.12b-3.14a: from the palabhā (aṅgulas of the 12-aṅgula gnomon): the equinoctial hypotenuse (3.8), lambajyā = R × 12 ÷ it, akṣajyā = R × palabhā ÷ it, and their arcs (minutes): co-latitude and latitude.
3.16b-3.17a: from the latitude (degrees): akṣajyā by the table, lambajyā = √(R² − akṣajyā²), palabhā = 12 × akṣajyā ÷ lambajyā, and the equinoctial hypotenuse 12 × R ÷ lambajyā (3.13 read backwards).
── 3.14b-3.19: the noon shadow read backwards ─────────────────────────────────────────────────
3.14b-3.15a: the noon nata (signed minutes, north +) from the noon shadow and where it points. The hypotenuse is the shadow's own (3.8) unless `opts.karna` gives it. North when the shadow is south, south when it is north.
3.15b-3.16a: the latitude (minutes) from a noon shadow and the Sun's declination (signed minutes). The text adds them when unlike and differences them when alike; signed, the akṣa (south, so −φ) = nata − declination.
3.17b-3.18a: the Sun's declination (signed minutes) from the noon shadow at a place of the given palabhā: latitude (south) and nata, the difference when alike, the sum when unlike; signed, declination = nata + latitude.
3.18b: the Sun's arc from Meṣa in the first quadrant (degrees, 0…90) from its declination's sine: arc(|krāntijyā| × R ÷ 1397). A sine past 1397 (an observation beyond the greatest declination) is held at 90° and flagged.
3.19: the quadrant from the declination's direction and the ayana (whether the Sun is going north, "uttara", or south, "dakshina"): 0 Meṣa…Mithuna, 1 Karka…Kanyā, 2 Tulā…Dhanu, 3 Makara…Mīna.
3.19: the first-quadrant arc placed in its quadrant: as it is; from 180°; plus 180°; from 360°.
The Sun (sāyana degrees) from its declination's sine, by 3.18b-3.19. opts: quadrant (0-3), or ayana, or near (a longitude: the nearer of the two candidates with this declination). Returns both candidates: the shadow alone cannot tell λ from 180° − λ.
3.14b-3.19: the chāyārka — the true sāyana Sun at noon from the noon shadow at a place of the given palabhā.
3.20a: the mean Sun (sidereal degrees) from the true sidereal Sun: the manda equation of 2.29-2.45 (kendra = mandocca − planet, the epicycle 14° at the even ends and 13°40′ at the odd, varying by 2.38) taken in reverse and again, until it stops changing. `mandocca` in degrees (sphuta.js: mean.sunApogee).
3.20b-3.22a: the noon shadow of the Sun at sāyana λ: the declination by 2.28 on the table; nata = latitude (south) and declination combined; chāyā = 12 × jyā(nata) ÷ koṭijyā, karṇa = 12 × R ÷ koṭijyā; the shadow points away from the Sun.
3.22b-3.25a and 3.27b-3.28a: the agrā. agrājyā = krāntijyā × R ÷ lambajyā (3.27b; 3.22b with the śaṅku read as 12 gives the same as krāntijyā × the equinoctial hypotenuse ÷ 12). 3.22b-3.23a read with the noon śaṅku-sine: the noon agrā in aṅgulas = krāntijyā × the equinoctial hypotenuse ÷ the noon koṭijyā, and any shadow's own = that × its hypotenuse ÷ the noon hypotenuse; 3.28a: agrājyā × hypotenu
3.25b-3.27a: the hypotenuse when the Sun is on the prime vertical, three ways; null unless the declination is north and less than the latitude ("saumyākṣonā krāntiḥ"), the only case in which the Sun crosses it above the horizon.
3.28b-3.34a: the Sun in an intermediate direction. karaṇī = (R²/2 − agrājyā²) × 12 × 12 ÷ (12²/2 + palabhā²); phala = 12 × palabhā × agrājyā ÷ the same; the śaṅku (a sine, R-units) = √(phala² + karaṇī) less the phala for a southern declination, plus it for a northern; dṛgjyā = √(R² − śaṅku²); shadow and hypotenuse 12 × dṛgjyā, 12 × R, ÷ śaṅku. `corners` says which pair it falls in (3.32): the Sun'
2.60-2.61, 3.34b: the krāntijyā, dyujyā, carajyā (signed: north +) and antyā = R + carajyā of the Sun at sāyana λ.
3.34b-3.36: the śaṅku and shadow when the Sun is `natAsus` from the meridian (east −, west +; asus of the Sun's own day, 1′ of its hour angle each). cheda = (antyā − utkramajyā(nata)) × dyujyā ÷ R; śaṅku = cheda × lambajyā ÷ R. Below the horizon the śaṅku is ≤ 0 and the shadow is Infinity.
The tip of that shadow on the slab, in aṅgulas from the gnomon's foot: north = the bhuja (3.23b-3.24, with the agrā of 3.28a); east = the rest of the shadow by 3.8's rule, pointing west in the forenoon and east in the afternoon.
3.37-3.39: the nata (asus from the meridian) from a shadow measured at a place of the given palabhā on a day the Sun is at sāyana λ: dṛgjyā = R × shadow ÷ hypotenuse; śaṅku = √(R² − dṛgjyā²); cheda = śaṅku × R ÷ lambajyā; unnatajyā = cheda × R ÷ dyujyā; the arc of the versed sine antyā − unnatajyā is the nata. A shadow shorter than this arithmetic's noon shadow (an observation near noon, or a decl
The asus of the Sun's own day from its rising to a measured shadow: the half-day (2.62-2.63) less the nata in the forenoon ("purva"), plus it in the afternoon ("pashcima").
3.40-3.41a: the Sun from any shadow: krāntijyā = lambajyā × agrā ÷ hypotenuse (aṅgulas); × R ÷ 1397 → the arc, placed by quadrant (3.19; `opts` as for sunFromKrantijya). The agrā (north +) is the tip's distance from the east-west line through the equinoctial shadow's tip: palabhā − bhuja, with the bhuja measured north + from the gnomon's line (3.23-3.24).
3.41b-3.42a: the circle through three marked tips {east, north} by two fish-figures: the perpendicular bisectors of the two chords meet at the centre; the thread from it through the three is the bhā-bhrama.
3.1-3.3: the east-west line from the two tips that meet a circle of radius r aṅgulas, the Sun at sāyana λ at noon and moving `motion` minutes a day. Each mark's time comes from 3.37-3.39, its tip from shadowTip; between the marks the declination moves, the two bhujas differ and the line is turned. Returns the tips and the turn in minutes (+ when the east end lies north of true east); null when the
2.59: the Sun's own day in asus of the turn: 21,600 + its daily motion (minutes) × the Laṅkā rising of its sign ÷ 1800 (3.44's stated 1670, 1795, 1935; `{ stated: false }` for those computed from 1397). Laṅkā's, because the nata is counted from the meridian [reading].
Asus of the turn (a kapāla calibrated on a star, kala-dvara.js) → asus of the Sun's hour angle, by 2.59.
3.11-3.12a: the observed ayanāṃśa = chāyārka − karaṇāgata (degrees): the circle has moved east by it when the computed Sun is less than the shadow-Sun, west when more.
An aṅgula reading: a number, or { angula, vyangula } with 60 vyaṅgula to the aṅgula (JM p.36, "duṣkarā").
A kapāla count { ghati, vinadi, prana } → asus (1 ghaṭī = 60 vināḍī = 360 prāṇa, SS 1.11).
The civil day: { kali } (days since the Kali epoch) or { calendar, year, month, day } (kala-dvara.js).
Checks a whole file's shape: only the fields named in corpus/vedha/README.md, in the owner's units. Throws on the first fault.
The text's Sun at Kali day t: karaṇāgata (sidereal), its mean and mandocca, the text's ayanāṃśa (3.9-3.10), and the daily motion in minutes (true place a day apart).
Reduces a vedha file (corpus/vedha/README.md) to what the shadows say, every derived number tagged [measured]. opts.ayanamsha: for the declination an "ishta" shadow is timed with — "text" (3.9-3.10, the default), "observed" (the mean of this file's noon ayanāṃśas) or a number of degrees. Noon is the local mean noon of the record's day, Kali day + ½ − deśāntara ÷ 360 (the equation of time, ≤ 16 min