Reference · Facts, line drawings and positions
moonGeocentricfunction
The Moon's position from the Earth's centre (J2000 mean ecliptic and equinox, kilometres), from the lunar solution ELP2000-82B (Chapront-Touze and Chapront, IMCCE) cut to its 540 largest terms and run in terrestrial time: within a few arc-seconds of Horizons from 1800 to 2200.
Import it
import { moonGeocentric } from "@johnmorrisdotca/wakusei-planets";
Definition
function moonGeocentric(ms: number): Vec3
Parameters
| Name | Type | Description |
|---|---|---|
ms | number | The instant, in milliseconds since 1970 (UTC). |
Returns
Vec3
The position as x, y, z in kilometres.
Examples
import { moonGeocentric } from "@johnmorrisdotca/wakusei-planets";
const [x, y, z] = moonGeocentric(Date.UTC(2026, 10, 2));
console.log(Math.round(Math.hypot(x, y, z)) > 350000);trueWhat it prints (run when this page was built)