リファレンス · 有名な探査機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. |
when | When | A |
戻り値
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 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。