Skip to the content

Wakusei Planets惑星

The Sun, the planets and their moons as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, tilt and rotation, and the moons where they are at any date and time.

Wakusei is the Japanese word 惑星 for a planet. About the name

Contents

Reference · The bodies nearest to a body on a date, in the sky or in space, and when two bodies come closest: nearest, within, closestApproach and conjunctions

distancefunction

The distance between two bodies on a date: the straight line between their centres at that instant, in kilometres and astronomical units, with no light time. Any two of the Sun, the planets, the dwarf planets and the moons.

Import it

import { distance } from "@johnmorrisdotca/wakusei-planets/nearest";

Definition

function distance(a: BodyId, b: BodyId, date?: When): Distance

Parameters

NameTypeDescription
aBodyId

One body.

bBodyId

The other.

date (optional)When | undefined

The moment, a Date or milliseconds since 1970 (UTC). Default: now.

Returns

Distance

The distance and the accuracy to expect of it.

Examples

import { distance } from "@johnmorrisdotca/wakusei-planets/nearest";

const mars = distance("earth", "mars", Date.UTC(2003, 7, 27, 9));
console.log(mars.distanceAu.toFixed(4), Math.round(mars.distanceKm), "km");
0.3727 55756681 km

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/wakusei-planets 0.24.0.