भारत · ग्रहगणित
स्थान उज्जयिनी 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-tier.js

the text tier, as one adapter: a Julian day (UT) in, the Sūrya-Siddhānta's own quantities out, computed

1006 lines · 80 exports

प्रमाण: पाठ (the text tier's door) · स्वामी-परम्परा (the paramparā records: Parameśvara's saṃskāra, the Kerala means) · भारतीय-रूप·पुनर्मापित (the measured forms, on Mādhava's sine) · the plain text answers on the 24 jyās
लेख · the header

The header, as the file states it

ss-tier.js — the text tier, as one adapter: a Julian day (UT) in, the Sūrya-Siddhānta's own quantities out, computed प्रमाण: पाठ (the text tier's door) · स्वामी-परम्परा (the paramparā records: Parameśvara's saṃskāra, the Kerala means) · भारतीय-रूप·पुनर्मापित (the measured forms, on Mādhava's sine) · the plain text answers on the 24 jyās only by the sovereign modules. math-core.js's text tiers ('ss+parameshvara', 'ss') call nothing else. TIME. The text counts civil days from midnight at Laṅkā at the start of the Kali-yuga (SS 1.45-1.47). Laṅkā is on the Ujjayinī meridian (meridian.js MERIDIAN_DEG, D13: the Mahākāleśvara jyotirliṅga, east of Greenwich), so its midnight comes MERIDIAN_DEG/360 of a day before Greenwich's: t = jd − 588465.5 + MERIDIAN_DEG/360 (no clock correction of any kind: the text's day is the civil day) The text's obliquity is the arc of 1397 on R = 3438 (SS 2.28; Dhruva.SS_EPSILON_DEG) and its ayanāṃśa is SS 3.9-3.10 (Sphuta.ayanamshaSS); both are used everywhere in this tier (lagna, madhya-lagna, sunrise, moonrise, the shadow). THE TEXT TIERS (owner, 2026-10-08; the fourth 2026-10-09). Every function takes opts.samskara, the tier's variant: 'parameshvara' (the default, the page default): the text's model with Parameśvara's saṃskāra — the mean places that the paramparā record names (corpus/parampara/samskara.json, read through parampara.js samskaraParameshvara(), never typed here) moved by its arcminutes; the record moves them at its epoch and carries them at the text's own rates, so the shift is the same at every instant [theorem: no rate is changed]. Today the record corrects the Moon and the node, and the ayanāṃśa's zero: Parameśvara's own determination (15° complete in Kali 4536) as a phase of the text's libration (sphuta.js ayanamshaSS(spandas, phaseDeg)); the Moon's apogee would move only if the record named it. The Sun and the five star-planets are the text's. SINCE 2026-10-15 (owner: "Sun accurate ho gayā, ab candramā, aur phir bāki sab grah — ekdam perfectly accurate"; "jo hamāre pūrvajon se miss ho gaī vo bhī") the tier's DEFAULT carries its own joint measurement (corpus/research/parampara-apply.json, candidate parameshvara+all+bija, made by scripts/text-tier-measure.cjs): the frame onto Citrā, the bīja on every mean, the paramparā's forms, and the terms the paramparā never had — the Sun's perturbations, the Moon's long series, the latitudes, the true node, each star-planet's heliocentric, distance, geocentric and latitude series — every number measured against the own series, every term kept only if it improves a grid it was not fitted on; opts.measured: false gives the bare saṃskāra tier. SINCE 2026-10-16 (owner: "don't hold back"): the measured forms run in dynamical time (t + ΔT); the means take the own series' slow parts and the planets its long-period inequalities (Jupiter–Saturn, Uranus, Neptune) on its measured elements; the measured Nīlakaṇṭha form takes the śīghra epicycle at its mean size (exact geometry); the true node is the own series' crossing method on the tier's own Moon; every term's slow change is held at the fit window's edge (termHold). Measured on 1820-2180 so the served span lies inside. 'kerala': the Kerala paramparā (Parahita + Dṛggaṇita) on the same geocentric model — the mean Sun, Moon, apogee and node of the Parahita karaṇa … (below); SINCE 2026-10-12 the tier's DEFAULT carries the joint measurement of corpus/research/parampara-apply.json (candidate kerala+all+bija: bīja on the means, the Moon's forms and terms, the five star-planets on Nīlakaṇṭha's placement with measured series — every number fitted against the dṛk tier, none typed; validated out of sample in corpus/research/validate-oos.json); opts.measured: false gives the bare paramparā. Then: node of parahita-madhyama.js (Āryabhaṭa's integers, Haridatta's Śakābda-saṃskāra, Parameśvara's fractions), counted from sunrise at Laṅkā as Āryabhaṭa's day is [reading; measured: his epoch Moon reproduced to 0.3′]; Āryabhaṭa's Sun apogee 78° (registry ABH-apsides-G9); the text's epicycles on those means [reading: no local edition attests Āryabhaṭa's]; the ayanāṃśa by Nīlakaṇṭha's linear rule (registry NIL-ayanamsha-rate). The five star-planets are the text's: their Parahita integers are in the registry (PH-yugabhoga), their epicycles are not. null: the plain Sūrya-Siddhānta, exactly the text. Everything a tier's places or ayanāṃśa touch — sunrise and the day, tithi, nakṣatra, yoga, karaṇa, the months and the year, lagna, the shadow, daśā, moonrise, the eclipses — follows the tier (one code path each: the tier's calendar is Panchanga.withPlaces on its places and its ayanāṃśa). THE PARAMPARĀ RECORD. In Node it is read from corpus/parampara/ on first use. In a browser the page loads the two JSON files and calls SSTier.useParampara(Parampara.load({ registry, samskara })) before asking for the saṃskāra tier. Browser: window.SSTier (needs KalaDvara, Sphuta, Dhruva, SSUdaya, SSGraha, SSChaya, SSGrahana, SSAhargana, Panchanga, Dasha, Muhurta, Utsava, Parampara; ParahitaMadhyama for the Kerala tier; Samskara for the corrected tiers' eclipses); node: module.exports. Exact arithmetic where the modules have it; no library trigonometry here.
आवश्यक · requires

What it loads

required by
निर्यात · exports

What it exports

MERIDIAN_DEGKALI_JD0LANKA_OFFSETSPAN_YEARSEPSILON_DEGSAMSKARASDEFAULT_SAMSKARASUNRISE_DAYMEASURED_KEYSAMPLITUDE_KEYSBIJA_KEYSTERM_KEYSMOON_BASISPLANET_BASISDEFAULT_CANDIDATEDEFAULT_CANDIDATESX_TERM_KEYSLP_TERM_KEYSX_BASISA_BASISLP_BASISBIJA_SPAN_CENTURIESuseDynamicalTimedeltaTFromTabletimeScaleOftrueNodeAtcrossingNodecrossingNodeOftcrossingsplacesmeasuredOfmeasuredFromRecordplanetWithBijaplanetsAtframeShiftOfplacesOfcenturiesOfuseMeasuredmeasuredRecorddaysOfJdjdOfDaysspandasOfJddaysOfSpandasjdOfSpandasSAVANA_DAYmeanAtDayssiteOfsiteForsiteOnuseParamparacorrectionlabelcalendarT_ayanamshaAtdashautsavamuhurtamodelifsamskaraModuleErrormodelOfgrahassunMoonayanamshaDegayanamshaRateArcsecPerYearayanamshaRulelimbsAtdayOfdayEventslagnameridianlunarMonthlunarYearsamvatsaravimshottarimuhurtasmoonEvents
पाठ · the verses it cites

SS verses named in the header

  • SS 1.45verse
    ṣaṇmanūnāṃ tu sampīḍya kālaṃ tatsandhibhiḥ saha । kalpādisandhinā sārdhaṃ vaivasvatamanostathā ।।
  • SS 2.28verse
    paramāpakramajyā tu saptarandhraguṇendavaḥ । tadguṇā jyā trijīvāptā taccāpaṃ krāntirucyate ।।
  • SS 3.9verse
    triṃśatkṛtyo yuge bhānāṃ cakraṃ prākparilambate । tadguṇādbhūdinairbhaktāddyugaṇādyadavāpyate ।।
नलिका · channels

The channels it runs in

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

Every function, what it calls, who calls it

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

M(m)lines 56–56

The modules' default sine is the text's 24-jyā table (owner, 2026-10-27: the formulary); the paramparā tiers and the measured default keep Mādhava's sine, on which their records were measured — this instance is built on it, and the plain text ({ samskara: null }) is answered by a second instance on the table (the routing at the end).

calls nothing in the registry
called by nothing in the registry
wrap(d)lines 87–87
fin(x, what)lines 89–89
calls nothing in the registry
daysOfJd(jd)lines 93–93exported

Civil days since midnight at Laṅkā at the Kali epoch (SS 1.45-1.47) of a Julian day in UT.

jdOfDays(t)lines 95–95exported

The Julian day (UT) of a day count t.

calls fin
jdOrNull(t)lines 97–97
calls jdOfDays
called by nothing in the registry
siteOf(site)lines 100–107exported

{ latitude, longitude (east +) } → the text's site { latitude, deshantara = longitude − MERIDIAN_DEG } (palabha kept): the site on the served meridian. A caller of calendar(opts) on a record tier takes siteFor(site, opts) instead (the site on the tier's own day).

calls fin
called by siteOn
siteOn(T, site)lines 116–120exported

A site on a tier's own day count. Every tier counts its civil day from a midnight on one meridian — the served one (D13) for the plain text, the record's (RECORD_MERIDIAN_DEG, rule A) for every paramparā/measured tier — and t + deśāntara/360 is the place's local time only when the deśāntara is counted from that same meridian. A site comes in on the served meridian (a longitude east, or siteOf's de

spandasOf(t)lines 122–122

The spandas of the turn ({num, den}, the engine's clock: D1c) of a day count.

calls nothing in the registry
called by vimshottari
spandasOfJd(jd)lines 124–124exported

The spandas of the turn since midnight at Laṅkā at the Kali epoch of a Julian day (UT): one civil day = 30⁸·R/S of them.

calls daysOfJd
called by nothing in the registry
meanAtDays(t)lines 126–129exported

The text's mean places at a day count (no saṃskāra): Sphuta.madhyama + SSGraha.meanPlaces.

calls fin
called by nothing in the registry
daysOfSpandas(r)lines 131–131exported

A rational number of spandas of the turn { num, den } → civil days (float), exact up to the last division.

calls nothing in the registry
jdOfSpandas(r)lines 133–133exported

A rational number of spandas of the turn { num, den } → the day number (JD, UT).

called by nothing in the registry
useParampara(loaded)lines 139–143exported

Give the tier a loaded paramparā record (Parampara.load({ registry, samskara })): the browser's way.

calls nothing in the registry
called by nothing in the registry
parampara()lines 144–149
calls nothing in the registry
resolveSamskara(name)lines 151–155
calls nothing in the registry
called by correction, tierOf
parahita()lines 156–160
calls nothing in the registry
textAyanamsha(t)lines 161–161
calls nothing in the registry
called by nothing in the registry

The libration's rate at t: 54″ a year × (27 + δ)/27 for a greatest value 27 + δ, signed by the change over a day.

calls nothing in the registry
correction(name)lines 169–176exported

The correction a tier applies: null for the plain text; else a frozen record { name, tierId, corrects, mean(t) → { sun, moon, moonApogee, node, sunApogee }, ayanamshaAt(t), ayanamshaRule, ayanamshaRateArcsecPerYear(t), modelDeltas, modelEpoch, modelAyanamsha (samskara.js model inputs for the eclipse search), label, labelSa, caption, epochKali, source, … }: 'parameshvara' from the paramparā record

keralaCorrection()lines 215–272

The Kerala paramparā (Parahita + Dṛggaṇita) as one correction record — see the header. Every number is read from parahita-madhyama.js or the registry; the samskara.js model for the eclipse search is the text's canon moved, at Parameśvara's epoch, by the difference of the two canons' mean places and, per yuga, by the difference of their rates (both linear in t, so the model is exact [theorem]; chec

compiledOf(terms)lines 316–325

A term list compiled once: the nonzero argument entries flat, the amplitudes in typed arrays, the largest multiple per basis.

calls nothing in the registry
called by termSum
cosD(x)lines 347–347
calls nothing in the registry
called by termSum, planetCore
centuriesOf(t)lines 348–348exported
calls nothing in the registry
finite(n, what)lines 349–349
calls nothing in the registry
bijaOf(q, what)lines 351–351

A bīja on a mean: an epoch (degrees) and a rate (degrees a Julian century from J2000); absent fields are 0.

calls finite
termTOf(hold, T)lines 357–357

The T a measured term's slow change is evaluated at: held at the edge of the window it was measured on (the record's termHold, in centuries from J2000), else at the bīja's ±5 centuries.

calls nothing in the registry
shiftBy(v, b, T)lines 358–358
calls mod
frameShiftOf(meas, t)lines 363–363exported

The measured nirayaṇa frame rate (2026-10-15): the paramparā ayanāṃśa turns faster than the stars (its 54″-class rate against the precession), so a tier fitted on the sāyana residual keeps a nirayaṇa frame that drifts. δ(t) = rate·T (T Julian centuries from J2000, held at ±5 like every bīja) is added to every nirayaṇa longitude and taken from the tier's ayanāṃśa: a pure rotation of the frame — the

rotateMeans(means, d)lines 364–364
calls nothing in the registry
called by planetsAt
planetsOf(x)lines 367–393

The planets' bīja: per graha, a bīja on the mean, the śīghrocca and the mandocca, a scale on each epicycle, and a second manda harmonic (degrees).

called by measuredOf
sinD(x)lines 394–394
calls nothing in the registry
chebOf(q, what)lines 397–401

A slow Chebyshev series { tc, ts, coef[] } (degrees; x = (jd − J2000 − tc)/ts held at ±1) — the own series' slow part of a mean.

calls finite
called by measuredOf

Inside its window the Chebyshev sum. Beyond it, continuous at the edge, the window's own low-order trend goes on: its degree-1 truncation (the window's mean rate; a planet's slow part) or degree-2 (the Moon's: the tidal acceleration is a real T²) — never the high orders, which only describe the window.

calls nothing in the registry
slowModelOf(q, what)lines 418–423

A measured slow model { poly: [c0, c1, c2] (degrees, T in Julian centuries from J2000), hold (centuries), continue: 'linear' | 'hold', terms (A_BASIS) }: the own series' ayanāṃśa or obliquity as the tier serves it — the polynomial inside ±hold, beyond it continued along its slope at the edge ('linear': the precession goes on) or held ('hold': the obliquity's swing is bounded), plus the measured nu

called by measuredOf
polyAt(M, T)lines 424–426
calls nothing in the registry
called by tierOf
timeScaleOf(q)lines 431–441exported
calls finite
called by measuredOf
elementsOf(e)lines 442–449

The amplitudes of one measured candidate of corpus/research/parampara-apply.json (default 'kerala+all'); the candidates that carry the planets' bīja (the record says which, `planets: true`) get it from record.measured.planets.bodies.

useMeasured(record)lines 486–490exported

Give the tier the measurement record (corpus/research/parampara-apply.json, or an object carrying its `measured` block): the browser's way; parampara-record.js carries the block and calls this. Node reads the file.

calls nothing in the registry
called by nothing in the registry
measuredRecord()lines 491–497exported
calls nothing in the registry
defaultMeasured(s)lines 499–499

A tier's default measured option: its joint candidate in the record (Kerala: required; the text tier: when the record has it).

recordOffers(s)lines 500–505
called by tierOf

sun: { lambda, anomaly } — the tier's true Sun (sidereal) and its mean anomaly (mean − apogee), for the Nīlakaṇṭha form's centre and for the radial variation with the Earth's distance; absent, the text's mean Sun stands and the Sun's radial term is 0.

The means of a tier shifted by the Sun/Moon/node bīja of the measured forms (the text's arithmetic then runs on them).

useDynamicalTime(fn)lines 590–590exported
calls nothing in the registry
called by nothing in the registry
deltaTableOf(q)lines 591–595
calls finite
called by measuredOf
deltaTFromTable(tab, jd)lines 597–601exported

ΔT in seconds at jd (UT) from a table { fromYear, stepYears, seconds }: linear between its years, held at its ends.

calls nothing in the registry
called by deltaTSecondsAt
dynOf(measured, t)lines 604–604

The measured tier's time: the civil day count t → t + ΔT (dynamical), when the record says so.

optsOf(opts)lines 695–695
calls nothing in the registry
grahas(jd, opts)lines 702–719exported

Every graha at jd: sidereal degrees from the text's Meṣa 0, the latitudes (degrees, north +), the mean places, the Sun's and Moon's equations, and SSGraha.truePlaces in full. The last call is memoised per tier.

called by nothing in the registry
planetsAt(jd0, t0, p, measured)lines 723–729exported

The five star-planets of a tier at jd (t its day count, p its places at t): with the measured bīja on means rotated by the measured frame and the tier's true Sun (the convention the measurement fits through: scripts/text-tier-measure.cjs calls this), else the text's four steps, rotated by the frame when there is one.

crossingNode(T, t)lines 733–751exported

The true node as the own series defines it (siddhanta-tier trueNode), on the tier's OWN Moon: the latitude's zero crossings on either side of t, bisected to 1e-7 d, the node (the Moon's longitude there, +180° at a descending one) linear between them. The crossings found are kept per tier (a sorted list), so nearby calls reuse them.

called by grahas
nodeBetween(b, a, t)lines 752–752
calls wrap, mod
called by crossingNode
sunMoon(jd, opts)lines 754–757exported

Sun and Moon only (for the limbs).

calls T_, mod
called by nothing in the registry
ayanamshaDeg(jd, opts)lines 762–762exported

The tier's ayanāṃśa at jd, degrees: SS 3.9-3.10 for the plain text; for the measured tiers (the paramparā defaults) the sky's measured precession, not D23; bare ({ measured: false }): the libration with Parameśvara's phase, the Kerala line (correction()).

calls T_, daysOfJd
called by nothing in the registry

Its rate, arcseconds a (sidereal) year: the measured precession's own for the measured tiers; ±54″ by the libration's direction over a day for the text [theorem: 600 turns a yuga × 360° ÷ 4,320,000 years × 0.3]; the bare paramparā tiers' fitted rates (correction()).

called by nothing in the registry
ayanamshaRule(opts)lines 777–779exported

The rule the tier's ayanāṃśa follows, in words (for the pages' labels).

calls T_
called by nothing in the registry
limbsAt(jd, opts)lines 783–788exported

Panchanga.limbsAt at jd (tithi 1-30, nakṣatra 1-27, pada, yoga 1-27, karaṇa 1-60) with the text's names (IAST).

calls T_
called by nothing in the registry
dayOf(jd, site, opts)lines 791–795exported

The civil day holding jd at the site (SS 14.18: sunrise to sunrise), in JDs: { N, sunriseJd, sunsetJd, nextSunriseJd, vara: { index, name }, polar, rule } — on the tier's calendar: its Sun and its ayanāṃśa make its sunrise.

calls T_, siteOn, optsOf
called by nothing in the registry
dayEvents(N, site, opts)lines 797–801exported

Sunrise, sunset and the next sunrise of civil day N at the site (JDs; null where the Sun does not cross).

calls T_, siteOn, optsOf
called by nothing in the registry
lagna(jd, site, opts)lines 803–803exported

Panchanga.lagnaAt at jd (sidereal, the text's frame: SS ε and SS 3.9-3.10).

calls T_, siteOn, optsOf
called by nothing in the registry
meridian(jd, site, opts)lines 805–805exported

Panchanga.meridianAt at jd: { ramcDeg (sāyana), madhyaLagna: { longitude (sidereal), rashi, index }, method }.

calls T_, siteOn, optsOf
called by nothing in the registry
hit(list, t)lines 808–808

── months, years, saṃvatsara ──────────────────────────────────────────────────────────────────────────

calls nothing in the registry
keep(list, x, n)lines 809–809
calls nothing in the registry
lunarMonth(jd, opts)lines 812–818exported

The amānta month holding jd (Panchanga.lunarMonth on the tier's places) + startJd, endJd, fullMoonJd. Cached by interval: two instants of one civil day either side of a new moon get their own months.

calls T_, hit, keep
called by nothing in the registry
lunarYear(jd, opts)lines 820–827exported

The lunisolar year holding jd (SSAhargana.lunarYear on the tier's calendar) + startJd, endJd, meshaJd.

calls T_, hit, keep
called by nothing in the registry
samvatsara(jd, opts)lines 829–829exported

SS 1.55 (SSGraha.samvatsara) at jd: mean Jupiter, which no saṃskāra moves. opts.zero picks the reading (0 = A).

called by nothing in the registry
periodJd(T, p)lines 832–832

── daśā ───────────────────────────────────────────────────────────────────────────────────────────────

called by vimshottari

Vimśottarī from a birth instant: the birth nakṣatra by the tier's Moon, the elapsed part by time (BPHS 46.16, dasha.js), the text's solar year (dasha.js YEAR "saura-surya"), and the chain running at atJd down to `depth` levels.

called by nothing in the registry
muhurtas(N, site, opts)lines 850–855exported

Fifteen muhūrtas of the day and fifteen of the night of civil day N (muhurta.js), in JDs; Abhijit is the 8th of the day [standard usage, unverified: muhurta.js says so]. null in a polar day.

calls T_, siteOn, optsOf
called by nothing in the registry
moonEvents(N, site, opts)lines 857–860exported

Moonrise and moonset in civil day N (utsava.js: the Moon's centre on the horizon, no parallax, no refraction).

calls T_, siteOn, optsOf
called by nothing in the registry
shadow(jd, site, opts)lines 864–874

The gnomon's shadow at jd (ss-chaya.js): the noon shadow of the sāyana Sun (SS 3.20b-3.22a) and the shadow at the Sun's hour angle at jd (3.34b-3.36); the sāyana Sun is the text's Sun + SS 3.9-3.10. { error } where the text's chain does not reach (a southern place, SS 3.14; the Sun below the horizon at noon).

calls T_, siteOn, mod
called by nothing in the registry

The eclipsed body against the text's horizon at day count t, read as ss-grahana.js reads an eclipse's contacts: the Laṅkā risings (SS 3.42-3.43) for the hour angle, the Moon's latitude joined to its declination (2.58), the half-day by 2.60-2.63. lamSid: the body's sidereal longitude; betaArcmin: the Moon's latitude (lunar only).

The eclipsed body above the text's horizon at the middle, on the tier's own places.

Lunar and solar eclipses within ±spanDays of jd at the site. Plain text: ss-grahana.js eclipsesBetween. Saṃskāra: the same parvas on the saṃskāra model of samskara.js (the code the fit itself uses), built from what the record corrects (its 'corrects', exactly as placesWith moves the places): the lunar eclipse by Samskara.lunarEclipse, the solar by Samskara.solarEclipseOnModel (the bare tiers: the

called by nothing in the registry
modelOf(T, SK)lines 951–966exported

The samskara.js model that carries a corrected tier's places into the eclipse search (built once per tier): the correction's modelDeltas about its epoch, with its own ayanāṃśa rule where it has one (the Kerala tier).

calls mod
called by eclipsesNear
samskaraDeltas(corr)lines 970–970

samskara.js model deltas of a tier's correction (its modelDeltas): for 'parameshvara' each body the record corrects moved at its epoch by the record's arcminutes ('<body>.epoch') and the libration's phase ('ayanamsha.phase'); for 'kerala' the difference of the canons at the epoch and per yuga.

calls nothing in the registry
called by nothing in the registry
label(opts)lines 973–977exported

The labels a page shows for a text tier.

calls T_
called by nothing in the registry
tableTier()lines 995–995
calls nothing in the registry
called by nothing in the registry
plain(args)lines 997–997
calls nothing in the registry
called by nothing in the registry