भारत · ग्रहगणित
स्थान उज्जयिनी Ujjayinī · change it on a tool⌕ search the कोश ⌘Kप्रहर — · —:—:—ours, from sunriseउज्जयिनी —:—:—UTC + λ/15 h, λ = 75.7682° E (D13)IST Error −26.9 minlocal mean time − IST = 4λ − 330 min (K12)engine 3f94072the site ↗

yantra/patha/ss-drishya.js

दृश्य: when a body is seen. The heliacal rising and setting of the planets and the junction stars

522 lines · 0 exports

लेख · the header

The header, as the file states it

ss-drishya.js — दृश्य: when a body is seen. The heliacal rising and setting of the planets and the junction stars (Sūrya-Siddhānta ch.9), the Moon's last morning and its rising in the dark half (10.1, 10.5), and the elevation of the Moon's horns with its bright part (10.6-10.15) — by the text's own arithmetic: its rising-times, its sine table on R = 3438, its 1397, its dṛkkarma. No spherical trigonometry on this path. 9.2 Jupiter, Mars, Saturn — and Venus and Mercury when retrograde — set in the west when greater than the Sun, rise in the east when less ("sūryād abhyadhikāḥ paścād astaṃ … ūnāḥ prāg udayaṃ … śukrajñau vakriṇau tathā"). 9.3 the fast movers, Moon, Mercury, Venus, set in the east when less than the Sun, rise in the west when greater. 9.4 the places are taken at sunset for the west and at sunrise for the east; then the dṛkkarma of the planet. 9.5 kālāṃśa = the asus between the two lagnas ÷ 60 (ṣaṣṭi-bhājitāḥ); in the west both are advanced six signs. 7.8-7.10 dṛkkarma at the horizon (ss-udaya.js): ākṣa = latitude′ × palabhā ÷ 12, and āyana. For a junction star the dhruvaka already lies on the star's circle through the dhruva — the place the āyana part makes for a planet (7.11 names "nakṣatra-graha-yoga" as its use; 8.15) — so a star takes the ākṣa part only [reading; `starAyana: true` applies both, as "dṛkkarma pūrvavat" (9.17) read literally]. 9.6 the kālāṃśa of setting: Jupiter 11 (ekādaśa), Saturn 15 (tithi-saṅkhyā), Mars 17 (daśa saptādhikāḥ). 9.7 Venus: setting in the west and rising in the east by 8 (aṣṭābhiḥ, "mahattayā"); setting in the east and rising in the west by 10 (daśabhiḥ, "alpatvāt"). By 9.2-9.3 the first pair happens while retrograde. 9.8 Mercury: 12 (dvādaśabhiḥ) when retrograde (vakrī), 14 (caturdaśabhiḥ) when fast (śīghragatiḥ). 9.9 with more kālāṃśa than these a body is seen; with fewer it is lost in the Sun's light. 9.10 days to go (or gone) = the kalās of the difference of the kālāṃśas ÷ the difference of the motions — their sum ("bhukti-yogena") for a retrograde body. 9.11 the motions there are kālagatis: each daily motion × the rising asus of its lagna's sign ÷ 1800 (aṣṭādaśa-śata, the minutes of a sign); "bhuktī" is the dual — the two daily motions. 9.12-9.15 the stars' kālāṃśas: 13 (trayodaśa) Svātī, Agastya, Mṛgavyādha, Citrā, Jyeṣṭhā, Punarvasu, Abhijit, Brahmahṛdaya; 14 (caturdaśa) Hasta, Śravaṇa, both Phālgunīs, Śraviṣṭhā, Rohiṇī, Maghā, Viśākhā, Aśvinī; 15 (pañcadaśa) Kṛttikā, Maitra, Mūla, Sārpa, Raudra, both Āṣāḍhās; 21 (triḥ-saptaka, "saukṣmyāt") Bharaṇī, Tiṣya, Saumya; 17 (saptadaśa) the rest. Of the 27 nakṣatras: 4 + 9 + 7 + 3 + 4. 9.16 kṣetrāṃśa = dṛśyāṃśa × 1800 ÷ the rising asus of its own sign — the same limit as an arc of the ecliptic. 9.17 stars rise in the east and set in the west; dṛkkarma as before; the days by the Sun's motion alone. 9.18 Abhijit, Brahmahṛdaya, Svātī, Vaiṣṇava (Śravaṇa), Vāsava (Dhaniṣṭhā), Ahirbudhnya (Uttarabhādrapadā), being northern, are not lost in the Sun's rays — at a place where their ākṣa shift exceeds the limit (measured in the test). 10.1 the Moon by the same rule with 12: seen in the west, lost in the east. The west is Utsava.candraDarshana; here the east (the last morning), and both on the text's own sunset and sunrise. 10.5 in the dark half, the Sun advanced half a revolution: the asus from it to the Moon are the Moon's rising after sunset, iterated as 10.3-10.4. 10.6 the declinations of Sun and Moon (the Moon's with its latitude, 2.58): their difference when on one side, their sum otherwise; its sine is north or south as the Moon lies from the Sun. 10.7 × the hypotenuse of the Moon's midday shadow ("madhyāhna-indu-prabhā-karṇa"); north: taken from 12 × akṣajyā (arka-ghna), south: added to it. The words' midday karṇa is the default; the figure's geometry needs the karṇa of the moment, 12 R ÷ śaṅku by 3.34-3.36 (`karna: "tatkala"` [reading]) — the test measures both against the sphere. 10.8 the remainder ÷ lambajyā is the bāhu in its own direction; the koṭi is the gnomon (12); √(bāhu² + koṭi²) is the śruti (karṇa). 10.9 (Moon − Sun) in minutes ÷ 900 (nava-śata) = the bright part, in twelfths of the disc; × the disc in aṅgulas ÷ 12 = the bright part in aṅgulas. 10.10-10.14 the figure: Sun-point, bāhu, koṭi westward, karṇa to the Moon; the horns on the line across the karṇa; with the koṭi upright, the horn on the side away from the bāhu stands higher. Its tilt from level is the arc whose sine is bāhu × R ÷ śruti (2.33 on the table). 10.15 in the dark half the dark part is Moon − (Sun + six signs) the same way; the bāhu is laid to the left hand ("vāmaṃ bhujaṃ") and the western part of the disc is dark — read here as the waning Moon in the east before sunrise, where north lies on the left of one facing east [reading]. Sunrise and sunset: the mean Sun's turn with the bhujāntara (2.46), the udayāntara (the obliquity's part, the true Sun's place less its right ascension, 3.42 by the text's sine) and the cara (2.61-2.63) — owner, 2026-10-28; `sunrise: "bhujantara"` is the text as written (2.46 and the cara only), `sunrise: "ascension"` the true Sun's right ascension by the Laṅkā risings (3.42-3.43). Every longitude used with a rising-time is sāyana (3.10). Time = days since the Kali epoch; site = { latitude, deshantara } (+ palabha). Planets come from a callback (no planet module is required here); the Sun and Moon from the pañcāṅga's places. Browser: window.SSDrishya (needs Sphuta, SSUdaya, Panchanga, Utsava, KalaDvara); node: module.exports.
आवश्यक · requires

What it loads

required by
निर्यात · exports

What it exports

पाठ · the verses it cites

SS verses named in the header

none in the registry

नलिका · channels

The channels it runs in

not on a channel
कार्य · the functions

Every function, what it calls, who calls it

50 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.

mod(a, m)lines 71–71
calls nothing in the registry
wrap180(a)lines 72–72
calls mod
called by build, bhukti

9.6-9.8, 10.1: the kālāṃśa limit of a body in its present motion. For Venus 9.7 names the phenomena (west setting and east rising 8; east setting and west rising 10); by 9.2-9.3 those are the retrograde and the direct pair.

calls nothing in the registry
called by build
dhruvakaOf(e)lines 122–131exported

A yogatara.json entry → its dhruvaka in degrees (sidereal, the text's Meṣa 0): 8.1 for a figure, 8.4-8.5 by rule, or a named star's degree (8.10-8.12). null where the catalogue gives none.

calls nothing in the registry
called by starsOf
starsOf(cat)lines 133–136exported

The catalogue (yogatara.json) → [{ name, dhruvaka, vikshepa, kalamsa }] for every star with a place and a kālāṃśa.

called by nothing in the registry
signOf(lam)lines 139–139exported

── the arithmetic of 9.5, 9.10, 9.11, 9.16 ─────────────────────────────────────────────────────────

calls mod
called by kalagati, kshetramsa
signedAsus(a)lines 140–140
calls mod
called by kalamsa, build
kalamsa(point, sun, rs, side)lines 144–147exported

9.5: the signed kālāṃśa of a point from the Sun on one horizon. East: asus from the point's rising to the Sun's (positive when it rises first). West: from the Sun's setting to the point's, both advanced six signs (positive when it sets after). `rs`: the twelve risings at the place (3.44-3.45).

9.11: kālagati — a daily motion (minutes of arc a day) × the rising asus of the sign of its lagna ÷ 1800: asus a day. The lagna in the west is the point + six signs (9.5).

calls signOf
called by build

9.10: days until (positive, gamya) or since (negative, gata) the kālāṃśa `k` reaches `limit`: the difference in kalās ÷ the difference of the two kālagatis — the sum when the body is retrograde, its kālagati being negative.

calls nothing in the registry
called by build
kshetramsa(kal, point, rs, side)lines 158–158exported

9.16: kṣetrāṃśa — the dṛśyāṃśa (kālāṃśa) × 1800 ÷ the rising asus of its own sign: the limit as degrees of the ecliptic.

calls signOf
called by build

7.8-7.9 at the horizon, ākṣa part only: a junction star's dhruvaka (sāyana) carried to the ecliptic point that rises (east) or sets (west) with it; with `starAyana` the āyana part of 7.10 is added as for a planet.

calls mod
called by starKalamsa, build
ownDrk(opts)lines 169–169

The default horizon rule (opts.drk): "own" — each body's own declination and cara, its right ascension by 3.42's rule at the point (2.58, 2.61-2.63; 2.63 gives the stars their own day) — or "aksa", 9.5 with 7.8-7.10 as the chapters word it (linear dṛkkarma, risings proportional within a sign). Against the sphere the first is within 0.53 kālāṃśa at |β| = 5° and 0.37 for every junction star at Ujjay

calls nothing in the registry

9.11 in the own-horizon rule: a daily motion × the rate at which the body's horizon time moves with its longitude (asus per minute of arc, taken over ±1′) — the same quantity 9.11's "rising asus of the sign ÷ 1800" approximates.

calls nothing in the registry
called by build
calls nothing in the registry
called by build

9.2-9.3: the phenomenon a body is heading for. Slow (Jupiter, Mars, Saturn; Venus and Mercury retrograde; stars, 9.17): greater than the Sun → setting in the west, less → rising in the east. Fast (Moon; Venus and Mercury direct): less → setting in the east, greater → rising in the west. `motion: "relative"` calls slow whatever moves slower than the Sun [reading].

calls nothing in the registry
called by build
aksha(pb)lines 202–202exported

3.13-3.14: akṣajyā and lambajyā from the palabhā, over the equinoctial hypotenuse √(144 + palabhā²).

calls nothing in the registry
signedJya(deg)lines 203–203
calls nothing in the registry
called by shanku
arcOf(x)lines 204–204
calls nothing in the registry
shanku(deltaDeg, nataAsus, pb)lines 207–213exported

3.34-3.36: the śaṅku (R-sine of the altitude) of a body of declination δ° at hour angle `nataAsus` from the meridian: antyā = R + carajyā; less the versed sine of the hour angle; × dyujyā ÷ R × lambajyā ÷ R.

called by build
karnaOfShanku(sh)lines 215–215

The hypotenuse of the shadow of the 12-aṅgula gnomon for a śaṅku: 12 R ÷ śaṅku (3.36 "chāyākarṇau pūrvavat").

calls nothing in the registry
called by madhyahnaKarna
madhyahnaKarna(deltaDeg, pb)lines 218–221exported

The Moon's midday shadow hypotenuse: zenith distance at the meridian = akṣa − declination (3.17), its śaṅku the sine of the complement.

called by nothing in the registry
sinD(d)lines 229–229

this build's own trigonometry for the exact forms (its sine and arc; no other)

calls nothing in the registry
asinD(x)lines 230–230
atan2D(y, x)lines 231–231
equatorialOf(lam, betaDeg)lines 233–236exported
calls sinD, mod, atan2D, asinD
called by hornsSphere
hornsSphere(st)lines 242–257exported

The horns exactly (owner, 2026-10-27: "what is perfect for the model"): the position angle χ of the bright limb's middle (from the north, through the east) — the direction of the Sun from the Moon — and the Moon's parallactic angle q (the direction of the zenith); χ − q is the bright limb's angle from the zenith. The horns stand at χ ± 90°: the higher is the one nearer the zenith, and the line thr

called by nothing in the registry
shringonnati(st, opts = {})lines 260–260exported

10.6-10.14: the horns. opts.method: "sphere" (default when no karṇa rule is named: hornsSphere) or "text" (the figure as written; naming opts.karna chooses it).

calls nothing in the registry
called by build
illumination(sun, moon, opts = {})lines 287–287exported

10.9, 10.15: the bright part in twelfths of the disc — (Moon − Sun)′ ÷ 900 in the bright half; in the dark half the dark part is (Moon − (Sun + 180°))′ ÷ 900. × the disc in aṅgulas ÷ 12 when `bimbaAngula` is given. Linear in the elongation, by the words.

calls nothing in the registry
called by build
placesOf(t)lines 300–300
calls nothing in the registry
called by build, bhukti, luni
ayanOf(t, opts)lines 301–301
calls nothing in the registry
called by build, luni
palabhaOfSite(site)lines 302–302
calls nothing in the registry
called by build
bhukti(t, body)lines 303–303
called by build, luni
civil(N)lines 304–304
calls nothing in the registry
called by build
checkSite(site)lines 305–305
calls nothing in the registry
called by build
sunEvent(N, site, kind, opts = {})lines 312–312exported

Sunrise ("rise") or sunset ("set") of civil day N: the true Sun's hour angle — the mean Sun's turn from midnight at the place, with the bhujāntara (mean − true, 2.46) and the udayāntara (the true Sun's sāyana place − its right ascension, 3.42 by the text's sine; owner, 2026-10-28) — equal to minus or plus its half-day (2.61-2.63). `sunrise: "bhujantara"`: the text as written, the bhujāntara alone;

calls nothing in the registry
called by build
solarDay(N, site, opts = {})lines 330–330exported

Sunrise and sunset of day N with the Sun's sāyana place and motion at each (9.4).

calls nothing in the registry
called by build, solarDays
solarDays(t1, t2, site, opts)lines 338–338exported
calls solarDay
called by build

Visibility of a planet (9.2-9.11) on each morning and evening in [t1, t2), and the days its state changes. bodyAt(t) → { lambda (sidereal degrees), latArcmin (north +), bhukti (minutes a day, negative when retrograde), retrograde? }. opts.planet: "mars" | "jupiter" | "saturn" | "venus" | "mercury" | "moon" (or opts.limits). Each event: side, kind (udaya | asta), the first morning/evening in the ne

calls nothing in the registry
called by build

A junction star (9.12-9.18): { name, dhruvaka (sidereal degrees), vikshepa (degrees, north +), kalamsa? }. Each morning and evening in [t1, t2): its kālāṃśa from the Sun with the ākṣa dṛkkarma; the heliacal setting in the west (first evening with fewer kālāṃśa than the limit) and rising in the east (first morning with as many); the 9.17 estimate (Sun's kālagati only) from the day before; and wheth

calls nothing in the registry
called by build

Every star of a list over [t1, t2) with one table of sunrises and sunsets.

calls nothing in the registry
called by build
luni(t, opts)lines 422–425exported

The Moon's sāyana place, latitude and both motions at t.

called by build
moonriseAfterSunset(st, opts)lines 430–447exported

10.5: in the dark half, the asus from sunset to moonrise — from the Sun + half a revolution (the point rising at sunset) to the Moon's eastern dṛk-place — both advanced by their motions for those asus and recomputed until they stop changing (as 10.3-10.4). Within a degree or so of opposition the Moon's dṛk-place can lie behind that point: the asus are then negative, the Moon having risen just befo

calls mod, ownDrk
called by build
moonAtSunset(N, site, opts = {})lines 450–450exported

The Moon at the text's sunset of day N: in the bright half its setting after sunset (10.2-10.4), in the dark half its rising after sunset (10.5). Times in days since the Kali epoch.

calls nothing in the registry
called by build

10.1, east ("prāg yāty adṛśyatām"): before each amāvāsyā in [t1, t2), the last morning on which the Moon rises at least 12 kālāṃśa before the Sun, with the mornings tried.

calls nothing in the registry
called by build

Utsava.candraDarshana (10.1-10.4, west) run on the text's sunset, beside the last morning (10.1, east): for each amāvāsyā, the nights the Moon is unseen.

calls nothing in the registry
called by build
hornsOn(N, site, opts = {})lines 494–494exported

The horns and the bright part on day N: in the bright half at the text's sunset (the Moon in the west), in the dark half at the text's sunrise (the Moon in the east). The Moon's hour angle for the "tatkala" karṇa: the Sun's (± its half-day) less the difference of right ascensions by the Laṅkā risings of the Sun and of the Moon's polar place (7.10's āyana part).

calls nothing in the registry
called by build