本文へ移動

Wakusei Planets惑星

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

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

目次

リファレンス · 有名な探査機10機 (ボイジャー、ニュー・ホライズンズ、パイオニア、カッシーニ、ガリレオ、ジュノー、パーカー、ウェッブ): 情報、出来事、打ち上げから記録の終わりまでの任意の日の位置

loadSpacecraft関数

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

Load the fitted paths of some spacecraft (or all of them), each a table of its own that nothing else imports: about 6 kB gzipped for the Voyagers, the Pioneers, New Horizons and JWST, and more for the craft that orbited a planet. Call it once before the other functions; it is safe to call again.

インポート

import { loadSpacecraft } from "@johnmorrisdotca/wakusei-planets/spacecraft";

定義

function loadSpacecraft(...ids: readonly SpacecraftId[]): Promise<void>

引数

名前型説明
...idsreadonly ("voyager1" | "voyager2" | "newhorizons" | "pioneer10" | "pioneer11" | "cassini" | "galileo" | "juno" | "parker" | "webb")[]

The craft to load; none means all ten.

戻り値

Promise<void>

A promise that settles when every table is registered.

例

import { loadSpacecraft, spacecraftPosition } from "@johnmorrisdotca/wakusei-planets/spacecraft";

await loadSpacecraft("voyager1");
const [x, y, z] = spacecraftPosition("voyager1", Date.UTC(2026, 10, 8));
console.log((Math.hypot(x, y, z) / 149597870.7).toFixed(0), "au from the Sun");
172 au from the Sun

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

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

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