Reference · Facts, line drawings and positions
stopPlaceAufunction
Where a body is in the Sun's frame at an instant, in astronomical units. The Sun is the origin. A moon is its parent plus its offset.
Import it
import { stopPlaceAu } from "@johnmorrisdotca/wakusei-planets";
Definition
function stopPlaceAu(id: BodyId, ms: number): Vec3
Parameters
| Name | Type | Description |
|---|---|---|
id | BodyId | The body's name. |
ms | number | The instant, in milliseconds since 1970. |
Returns
Vec3
The position as x, y, z in au.
Examples
import { stopPlaceAu } from "@johnmorrisdotca/wakusei-planets";
const [x, y, z] = stopPlaceAu("mars", Date.UTC(2026, 10, 2));
console.log(Math.hypot(x, y, z).toFixed(3));1.595What it prints (run when this page was built)