本文へ移動

Wakusei Planets惑星

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

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

目次

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

spacecraftPosition関数

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

Where a craft is at a moment: x, y, z in kilometres from the Sun, in the J2000 ecliptic frame (the same axes as heliocentric, which is in astronomical units). The path comes from Horizons, which is the craft's tracked path to now and its planned path after, so a moment in the future is a prediction. A moment outside the record (before about an hour after launch, or past its end) throws a RangeError.

インポート

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

定義

function spacecraftPosition(id: SpacecraftId, when: When): Vec3

引数

名前型説明
id"voyager1" | "voyager2" | "newhorizons" | "pioneer10" | "pioneer11" | "cassini" | "galileo" | "juno" | "parker" | "webb"

The craft.

whenWhen

A Date or milliseconds since 1970 (UTC).

戻り値

Vec3

The position in kilometres.

例

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

await loadSpacecraft("newhorizons");
console.log(spacecraftPosition("newhorizons", new Date("2015-07-14T11:49:00Z")).map((n) => Math.round(n / 1e6)));
[ 1197, -4772, 164 ]

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

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

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