Reference · The Sun, Moon and planets: pure parts
frameAtfunction
The state of the sky at ms: nine vectors and an angle, in a few tenths of a millisecond. It needs astronomy-engine (an optional peer dependency).
Import it
import { frameAt } from "@johnmorrisdotca/chikyu-earth/space";
Definition
function frameAt(ms: number): Frame
Parameters
| Name | Type | Description |
|---|---|---|
ms | number | A moment, in milliseconds since the Unix epoch. |
Returns
Frame
The Sun, the Moon and the planets as seen from the Earth's centre, and how far the Earth has turned.
Examples
import { frameAt } from "@johnmorrisdotca/chikyu-earth/space";
const frame = frameAt(Date.UTC(2026, 10, 2, 12));
console.log(frame.moon.map((n) => n.toFixed(4)));[ '-0.0019', '0.0007', '-0.0015' ]What it prints (run when this page was built)