本文へ移動

Wakusei Planets惑星

太陽・惑星・衛星を、線画、陰影つきの絵、表面の地図で描きます。実際の大きさ・傾き・自転つきで、任意の日時の衛星の位置も分かります。

「惑星」(わくせい) は、太陽のまわりを回る大きな星のことです。 名前について(英語)

目次

リファレンス · ユリウス日 (julian パッケージの関数も)、暦、時刻系、恒星時、火星の時刻

convertTimeScale関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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 { convertTimeScale } from "@johnmorrisdotca/wakusei-planets/time";

定義

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

引数

名前型説明
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 (省略可){ dut1?: number; }

dut1, UT1 minus UTC in seconds, default 0.

戻り値

number

Milliseconds since 1970 on the to scale.

例

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/wakusei-planets 0.24.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。