Reference · Facts, line drawings and positions
heliocentricModelfunction
The theory that heliocentric(planet, ms) answers with, given the tables loaded now: VSOP87B for Mercury to Neptune, a fitted Chebyshev table where one covers the moment, else
osculating elements (a dwarf planet) or JPL's approximate elements (Pluto outside its table). worstArcseconds is the fitted table's measured worst on samples held back from
the fit, not a bound for every date; null where no such measurement exists. Ask again after importing a table or for another moment.
Import it
import { heliocentricModel } from "@johnmorrisdotca/wakusei-planets";
Definition
function heliocentricModel(planet: HostId, ms: number): { theory: "vsop87b" | "chebyshev" | "osculating-elements" | "approximate-elements"; worstArcseconds: number | null; }
Parameters
| Name | Type | Description |
|---|---|---|
planet | HostId | A planet or dwarf planet. |
ms | number | The moment in milliseconds since 1970 (UTC). |
Returns
{ theory: "vsop87b" | "chebyshev" | "osculating-elements" | "approximate-elements"; worstArcseconds: number | null; }
The theory's name and its measured worst error in arc-seconds, or null.
Examples
import { heliocentricModel } from "@johnmorrisdotca/wakusei-planets";
console.log(heliocentricModel("pluto", Date.UTC(2026, 0, 1)));{ theory: 'chebyshev', worstArcseconds: 0.14637 }What it prints (run when this page was built)