リファレンス · 有名な探査機10機 (ボイジャー、ニュー・ホライズンズ、パイオニア、カッシーニ、ガリレオ、ジュノー、パーカー、ウェッブ): 情報、出来事、打ち上げから記録の終わりまでの任意の日の位置
spacecraftEarthDistance関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A craft's distance from the Earth's centre at a moment, in kilometres: the craft's path from Horizons and the Earth from VSOP87B (a few thousand kilometres at most), both for the same instant, with no allowance for the light's travel.
インポート
import { spacecraftEarthDistance } from "@johnmorrisdotca/wakusei-planets/spacecraft";
定義
function spacecraftEarthDistance(id: SpacecraftId, when: When): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | "voyager1" | "voyager2" | "newhorizons" | "pioneer10" | "pioneer11" | "cassini" | "galileo" | "juno" | "parker" | "webb" | The craft. |
when | When | A |
戻り値
number
The distance.
例
import { loadSpacecraft, spacecraftEarthDistance } from "@johnmorrisdotca/wakusei-planets/spacecraft";
await loadSpacecraft("webb");
console.log((spacecraftEarthDistance("webb", Date.UTC(2026, 10, 8)) / 1e6).toFixed(2), "million km");1.64 million km出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。