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 · Julian dates (and the julian package's functions), calendars, time scales, sidereal time and Mars time

convertTimeScalefunction

A moment on one time scale as the same moment on another, in milliseconds since 1970 read on the target scale's own clock. UTC to TT is the leap seconds plus 32.184 s from 1972 and delta T before; UT1 needs dut1 (UT1 minus UTC, from the IERS) and is UTC when it is left out, which is within 0.9 s; the TDB term is under 2 ms.

Import it

import { convertTimeScale } from "@johnmorrisdotca/wakusei-planets/time";

Definition

function convertTimeScale(when: When, from: TimeScale, to: TimeScale, options?: { dut1?: number; }): number

Parameters

NameTypeDescription
whenWhen

A Date or a number of milliseconds since 1970, on the from scale.

fromTimeScale

The scale it is on.

toTimeScale

The scale wanted.

options (optional){ dut1?: number; }

dut1, UT1 minus UTC in seconds, default 0.

Returns

number

Milliseconds since 1970 on the to scale.

Examples

import { convertTimeScale } from "@johnmorrisdotca/wakusei-planets/time";

const utc = Date.UTC(2026, 10, 7, 12);
console.log((convertTimeScale(utc, "utc", "tt") - utc) / 1000, (convertTimeScale(utc, "utc", "gps") - utc) / 1000);
69.184 18

What it prints (run when this page was built)

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