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

gurutva/dop853-nbody.js

Sovereign DOP853 (8th Order Prince-Dormand Explicit Runge-Kutta) N-Body Integrator.

854 lines · 19 exports

लेख · the header

The header, as the file states it

Sovereign DOP853 (8th Order Prince-Dormand Explicit Runge-Kutta) N-Body Integrator. Pure JavaScript, zero external runtime dependencies. Force model actually implemented (audited 2026-09-20; each block is labelled below): 1. Newtonian point masses (DE440 GMs; Mars..Neptune are system barycentres) 2. EIH first post-Newtonian n-body terms (contains geodetic/de Sitter precession) 3. 2PN Schwarzschild + solar Lense-Thirring (negligible at arcsec level; kept) 4. Earth J2 acting on the Moon about the Earth's pole (options.earthPole; J2000 z default) 5. Explicit de Sitter term — OFF by default (options.explicitDeSitter): it double-counts 2. 6. 2.5PN GW damping + secular solar mass loss (negligible; kept) 7. Lunar figure: J2m about the lunar pole (≈ ecliptic pole) + C22m with the long axis locked to Earth (Cassini laws) — options.lunarFigure (default ON) 8. Lunar tidal secular acceleration: along-track a = −ṅ·a/3 with ṅ = −25.858″/cy² (LLR), equivalent to the measured 3.8 cm/yr recession — options.lunarTide (default ON) 9. (2026-10-16, when options.jd0 — the TDB Julian day at t = 0 — is given; replaces 4 and 7) Earth J2, J3, J4 about the true pole of date, on the Moon and the Sun; the Moon's J2m + C22m in its body frame — Cassini state, long axis turning with the mean longitude (optical libration) plus the forced physical libration — on the Earth and the Sun (options.lunarLibration, options.figureSun, options.earthPoleModel 'fixed' for the old pole, options.earthZonals) 10. The Earth's elastic tides, unlagged part: the bulges the Moon and the Sun raise (k2 = 0.322) attract the Moon — options.earthTides (default ON with jd0) Not implemented: the asteroids and the belt ring (Mars drifts ≤ 0.005″ in a year from DE440 for that).
आवश्यक · requires

What it loads

  • frames/earth-orientation.cjs.js
required by
निर्यात · exports

What it exports

propagateevalRhsSTANDARD_GMBODY_NAMESAU_KMDAY_SmodelJ2_EARTHR_EARTH_AUJ2_MOONC22_MOONR_MOON_AULUNAR_POLET_TIDE_MOONNDOT_MOON_RAD_DAY2K2_EARTHI_MOON_EQphysicalLibrationsetEarthOrientation
पाठ · 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

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

Oblateness acceleration of a body at relative position r (from the oblate body) about pole ẑ: a = −(3/2)·GM·J2·R²/r⁴ · [ (1 − 5s²) r̂ + 2s ẑ ], s = r̂·ẑ

calls nothing in the registry
called by nothing in the registry
physicalLibration(T, Om)lines 142–157exported

The Moon's forced physical libration (Eckhardt's theory, its principal terms, deg): τ in longitude (the long axis turns by +τ; its annual 91″ and 273-yr 14″ terms drive the C22 along-track force), ρ in the equator's inclination, σ in its node. Arguments: the Delaunay set (mean anomalies M of the Sun, M′ of the Moon, F, D, Ω) and the planetary arguments K1 (Venus, 273 yr) and K2. ρ enters as I − ρ,

calls nothing in the registry
called by moonAxes
setEarthOrientation(m)lines 162–162exported

the IAU 2006/2000B functions: the engine's src/frames/earth-orientation.cjs, or any module with the same interface handed in by setEarthOrientation() (the offline app's copy of this file has no frames/ directory beside it)

calls nothing in the registry
called by eo
eo()lines 163–168
dayFrame(day)lines 171–186

per TDB day: M = GCRS → mean ecliptic & equinox of date (row-major, 9), pole = true celestial pole (GCRS)

calls eo
called by framesAt
framesAt(jd)lines 189–195

linear interpolation between the day nodes (precession and nutation are smooth on a day)

calls dayFrame
called by nothing in the registry

the Moon's body axes (x long axis, y, z spin) in GCRS at TDB jd, from FRAME_M (call framesAt first)

called by nothing in the registry

zonal field (J2..J4) of a body of GM, radius R about the unit pole, at relative position r: acceleration

calls nothing in the registry
called by nothing in the registry

the Moon's degree-2 field (J2m, C22m) in its body frame MOON_AXES, at relative position r (from the Moon)

calls nothing in the registry
called by nothing in the registry
cross3(a, b, out)lines 247–251

Cross product helper [a x b]

calls nothing in the registry
called by nothing in the registry
evalRhs(y, gm, dydt, options = {})lines 279–279exported

Evaluate full sovereign state derivative dY/dt = [V, A(P, V, t)].

calls nothing in the registry

Authentic DOP853 (8th Order Explicit Runge-Kutta Prince-Dormand 12-stage) Step.

calls evalRhs
called by nothing in the registry

Propagate Sovereign N-body system over requested times. @param {Array<Array<number>>} initialPositions - Nx3 array of positions (AU) @param {Array<Array<number>>} initialVelocities - Nx3 array of velocities (AU/day) @param {Array<number>} evalDays - Array of evaluation days relative to initial epoch @param {Object} options - Integration options { rtol, atol, maxStep, relativistic }

calls nothing in the registry
called by nothing in the registry