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

ग्रह-घड़ी, the graha clocks, the nine manas and the pitr face (Phase B, STEP 1b).

227 lines · 0 exports

प्रमाण: पाठ (SS 1.13-14, 1.17, 1.29-34, 1.45-47, 1.55, 2.64-66, 12.74, 14.1-2, 14.14, 14.21) · गणित · स्वामी-परम्परा (Pardeep Sehrawat):
लेख · the header

The header, as the file states it

graha-ghadi.js — ग्रह-घड़ी, the graha clocks, the nine manas and the pitr face (Phase B, STEP 1b). प्रमाण: पाठ (SS 1.13-14, 1.17, 1.29-34, 1.45-47, 1.55, 2.64-66, 12.74, 14.1-2, 14.14, 14.21) · गणित · स्वामी-परम्परा (Pardeep Sehrawat): G2 (owner 2026-11-09T21:23Z "हर ग्रह की घड़ी", 21:18Z "एक ही") and M08 (the pitr day = krishna paksha, मुख्य tier, D-TIER 2026-11-03) t = civil days since midnight at Lanka at the Kali epoch on the D13 line, an exact rational (the door passes it). The text's counts are read from sphuta.js (REV, RISINGS, YUGA_DAYS) and ss-graha.js (PLANETS, YEARS_GONE); none is typed here. G1 bhagana clock R = t rev / Y, Y = the civil days of a yuga (SS 1.37); whole = floor(R), r = R - whole, exact. At t = 0 (SS 1.45-47: 1,953,720,000 years to the end of the Krta; with the Treta and the Dvapara of SS 1.17, 452 3/4 yugas of motion gone) every graha stands at Mesha 0, the Moon's apogee at 90 deg and Rahu at 180 deg, Rahu running backward: lambda = 360 frac(e + R), e = frac(rev YEARS_GONE / REV_sun) (westward: 360 frac(-(e + R))). पाठ + गणित. G2 one formula every clock's r is cut by kala-vibhaga.vibhaga (K2, K4, K5, K7-K9) plus rashi floor(12 r) and nakshatra floor(27 r), as the spec writes them. स्वामी-परम्परा + गणित. Beside them, labelled, the place's rashi floor(12 p) (SS 1.28) and nakshatra floor(27 p) (SS 2.64), p = lambda/360 (पाठ + गणित). For the seven that stood at Mesha 0, p = r and the two agree; for Candrocca (from 90 deg) and Rahu (from 180 deg, backward) they differ, and both carry a flag: which the surfaces show is the owner's to rule. G3 Budha, Shukra their counts are their shighroccas, their mean place is the Sun's (SS 1.29-30; ss-graha.PLANETS .inner; ss-graha.js meanPlaces). पाठ, labelled "shighrocca". G4 own rising day U = RISINGS - rev (SS 1.34, kala-dvara.udayaCount; a westward count enters with its sign); own days elapsed = t U / Y; one own day = Y / U civil days. पाठ + गणित. G5 difference clocks tithi clock = R_Candra - R_Surya (lunations; x 30 tithis), yoga clock = R_Candra + R_Surya (x 27). पाठ (SS 2.64-66) + गणित. G6 the nine manas savana = t; nakshatra = t RISINGS / Y (kala-dvara.nakshatraFromSavana); saura = 360 R_Surya; candra = 30 (R_Candra - R_Surya); pitrya = R_Candra - R_Surya (SS 14.14); barhaspatya = 12 R_Guru (SS 1.55); divya = R_Surya (SS 1.13-14; / 360 divine years); prajapatya and brahma from ss-kalpa.K (SS 1.18-23, 14.21) with the Kali years = R_Surya. पाठ + गणित. G7 the pitr face D-TIER: पाठ (default) phase = E - 270 deg, E = the true elongation unwrapped; pitr ahoratra = floor(phase / 360), f = the fraction; pitr day while f < 1/2; pitr ghati = 60 f (SS 12.74, 14.14) — a port of nava-kala nava_mana.py:240-250. मुख्य beside it, M08: krishna paksha = pitr day; ghati = 30 x the paksha's elapsed fraction; ahoratra = the pitrya mana's whole units (nava_mana.py pitr_m08, 473b45a). The paksha's start and end are whole spandas of the turn, each found by an exact bracket search on integer spandas (nava_mana.py _pitr_paksha): the first spanda at which the unwrapped true elongation reaches 180 k and 180 (k + 1), k = floor(E / 180) at the instant's nearest whole spanda tau; the ghati is cut on those three whole spandas, exactly. No float bisection. The served door passes the served elongation; by default (the पाठ sibling) the text's true Sun and Moon (sphuta.sphutaAtDays) give it, at the exact spanda (sphuta.sphuta takes the turn-spandas). Every value is {value, sutra, pramana, source}, t and each body's rev included; the sutras use ASCII digits. No trigonometry here. Browser: window.GrahaGhadi (needs window.Sphuta, SSGraha, KalaDvara, KalaVibhaga, SSKalpa); node: module.exports.
आवश्यक · requires

What it loads

required by
निर्यात · exports

What it exports

पाठ · the verses it cites

SS verses named in the header

  • SS 1.13verse
    aindavastithibhistadvatsaṃkrāntyā saura ucyate । māsairdvādaśabhirvarṣaṃ divyaṃ tadaha ucyate ।।
  • SS 1.14verse
    surāsurāṇāṃ anyonyaṃ ahorātraṃ viparyayāt । tatṣaṣṭiḥ ṣaḍguṇā divyaṃ varṣaṃ āsuraṃ eva ca ।।
  • SS 1.37verse
    vasudvyaṣṭādrirūpāṅkasaptādritithayo yuge । cāndrāḥ khāṣṭakhakhavyomakhāgnikhartuniśākarāḥ ।।
  • SS 1.45verse
    ṣaṇmanūnāṃ tu sampīḍya kālaṃ tatsandhibhiḥ saha । kalpādisandhinā sārdhaṃ vaivasvatamanostathā ।।
  • SS 1.46verse
    yugānāṃ trighanaṃ yātaṃ tathā kṛtayugaṃ tvidam । projjhya sṛṣṭestataḥ kālaṃ pūrvoktaṃ divyasaṃkhyayā ।।
  • SS 1.47verse
    sūryābdasaṃkhyayā jñeyāḥ kṛtasyānte gatā amī । khacatuṣkayamādryagniśararandhraniśākarāḥ ।।
  • SS 1.17verse
    yugasya daśamo bhāgaścatustridvyekasaṅguṇaḥ । kramātkṛtayugādīnāṃ ṣaṣṭhāṃśaḥ sandhyayoḥ svakaḥ ।।
  • SS 1.28verse
    vikalānāṃ kalā ṣaṣṭyā tatṣaṣṭyā bhāga ucyate । tattriṃśatā bhavedrāśirbhagaṇo dvādaśaiva te ।।
  • SS 2.64verse
    bhabhogo aṣṭaśatīliptāḥ khāśviśailāstathā titheḥ । grahaliptābhabhogāptā bhāni bhuktyā dinādikam ।।
  • SS 1.29verse
    yuge sūryajñaśukrāṇāṃ khacatuṣkaradārṇavāḥ । kujārkiguruśīghrāṇāṃ bhagaṇāḥ pūrvayāyinām ।।
  • SS 1.30verse
    indo rasāgnitritrīṣusaptabhūdharamārgaṇāḥ । dasratryaṣṭarasāṅkākṣilocanāni kujasya tu ।।
  • SS 1.34verse
    bhānāṃ aṣṭākṣivasvadritridvidvyaṣṭaśarendavaḥ । bhodayā bhagaṇaiḥ svaiḥ svairūnāḥ svasvodayā yuge ।।
  • SS 2.65verse
    ravīnduyogaliptābhyo yogā bhabhogabhājitāḥ । gatā gamyāśca ṣaṣṭighnyo bhuktiyogāptanāḍikāḥ ।।
  • SS 2.66verse
    arkonacandraliptābhyastithayo bhogabhājitāḥ । gatā gamyāśca ṣaṣṭighnyo nāḍyo bhuktyantaroddhṛtāḥ ।।
  • SS 14.14verse
    triṃśatā tithibhirmāsaścāndraḥ pitryaṃ ahaḥ smṛtam । niśā ca māsapakṣāntau tayormadhye vibhāgataḥ ।।
  • SS 1.55verse
    dvādaśaghnā guroryātā bhagaṇā vartamānakaiḥ । rāśibhiḥ sahitāḥ śuddhāḥ ṣaṣṭyā syurvijayādayaḥ ।।
  • SS 1.18verse
    yugānāṃ saptatiḥ saikā manvantaraṃ ihocyate । kṛtābdasaṃkhyāstasyānte sandhiḥ prokto jalaplavaḥ ।।
  • SS 1.19verse
    sasandhayaste manavaḥ kalpe jñeyāscaturdaśa । kṛtapramāṇaḥ kalpādau sandhiḥ pañcadaśaḥ smṛtaḥ ।।
  • SS 1.20verse
    itthaṃ yugasahasreṇa bhūtasaṃhārakārakaḥ । kalpo brāhmaṃ ahaḥ proktaṃ śarvarī tasya tāvatī ।।
  • SS 1.21verse
    paramāyuḥ śataṃ tasya tayāhorātrasaṃkhyayā । āyuṣo ardhamitaṃ tasya śeṣakalpo ayaṃ ādimaḥ ।।
  • SS 1.22verse
    kalpādasmācca manavaḥ ṣaḍvyatītāḥ sasandhayaḥ । vaivasvatasya ca manoryugānāṃ trighano gataḥ ।।
  • SS 1.23verse
    aṣṭāviṃśādyugādasmādyātaṃ etatkṛtaṃ yugam । ataḥ kālaṃ prasaṃkhyāya saṃkhyāṃ ekatra piṇḍayet ।।
  • SS 12.74verse
    sakṛdudgataṃ abdārdhaṃ paśyantyarkaṃ surāsurāḥ । pitaraḥ śaśigāḥ pakṣaṃ svadinaṃ ca narā bhuvi ।।
नलिका · channels

The channels it runs in

कार्य · the functions

Every function, what it calls, who calls it

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

Q(num, den)lines 50–50

── exact rationals (normalised by kala-vibhaga) ───────────────────────────────────────────────────────────────────────

calls nothing in the registry
add(a, b)lines 51–51
calls Q
floorDiv(a, b)lines 54–54
calls nothing in the registry
fracQ(a)lines 56–56
toNum(a)lines 57–57
calls nothing in the registry
mod360(x)lines 58–58
calls nothing in the registry
wrap180(x)lines 59–59
calls mod360
calls nothing in the registry
placeOf(p)lines 61–61
calls Q, toNum
called by row
bhagana(T, rev, westward)lines 87–91exported

G1: the bhagana clock of a count `rev` (BigInt, a yuga) at t; westward for Rahu.

calls Q, floorQ, sub, fracQ, add
called by row

G4: the own rising day of a count (SS 1.34).

calls Q, V, floorQ, fracQ, toNum, mulInt
called by row
row(b, T, sunPlace)lines 99–115
called by grahaGhadi

── G5: the difference clocks ───────────────────────────────────────────────────────────────────────────────────────

calls floorQ, sub, Q, mulInt, V, fracQ
called by grahaGhadi
manas(T, Rs, Rc, Rg)lines 124–143

── G6: the nine manas (SS 14.1-2) ──────────────────────────────────────────────────────────────────────────────────────

calls sub, V, floorQ, fracQ, Q, add, mulInt
called by grahaGhadi
pitrFace(e, ctx)lines 150–170exported

The pitr face of an unwrapped true elongation E (degrees: a BigInt, a number, or {num, den}). ctx (from grahaGhadi): the instant and the paksha's bounds as whole spandas of the turn (tau, startSpanda, endSpanda, BigInt) with k, the paksha's count floor(E(tau) / 180); or, as before, t and the paksha's start and end in civil days. With them M08's ghati; with pitryaWhole (the pitrya mana's whole unit

calls sub, Q, floorDiv, V, mulInt
called by pitrAt
textElongation(x)lines 172–172exported

the text's own true elongation (deg, 0..360) at civil day x: sphuta.js, the Sun's and the Moon's manda equations (SS 2)

calls mod360
called by nothing in the registry

the same at a whole spanda s of the turn since the Kali epoch, at the exact instant: sphuta.sphuta takes the turn-spandas (BigInt)

calls mod360
called by nothing in the registry
spandaOfDays(T)lines 178–178

the nearest whole spanda of the turn to an exact t (civil days): t RISINGS SPT / Y, rounded, as K1 puts every instant

calls Q, floorDiv
called by pakshaOnSpandas

The paksha that holds t on the whole spandas: tau = t's nearest spanda; k = floor(E(tau) / 180), E the unwrapped true elongation; start = the first spanda with E >= 180 k, end = the first spanda with E >= 180 (k + 1), so start <= tau < end. E(s) - 180 j is taken as the exact mean part 360 L(s) - 180 j (L(s) = s (REV_moon - REV_sun) / (RISINGS SPT), the lunations since the epoch) plus the true-minu

grahaGhadi(t, opts)lines 207–223exported

The graha clocks at t (civil days since Lanka midnight at the Kali epoch; exact). opts.elongation(x): the true elongation in degrees at civil day x for the pitr face (the served door passes its own); default the text's (sphuta.js). opts.tier: its label.

called by nothing in the registry