JourneyStop型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One body, with what a trip needs. gmKm3s2, massKg and escapeKmS are empty together when no page read here gives a mass.
インポート
import type { JourneyStop } from "@johnmorrisdotca/wakusei-planets";
定義
interface JourneyStop {
id: BodyId;
kind: BodyFacts["kind"];
parent?: HostId;
name: {
en: string;
ja: string;
};
radiusKm: number;
sunAu: number;
gmKm3s2: number | null;
massKg: number | null;
escapeKmS: number | null;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | BodyId | |
kind | "moon" | "star" | "planet" | "dwarf-planet" | |
parent (省略可) | HostId | undefined | The body a moon goes round. |
name | { en: string; ja: string; } | |
radiusKm | number | Equatorial radius in kilometres, the same number as |
sunAu | number | Mean distance from the Sun in astronomical units. |
gmKm3s2 | number | null | Gravitational parameter, km^3/s^2. Empty when no cited page gives it. |
massKg | number | null | Mass in kilograms, GM / G with CODATA 2018 G. Empty when GM is empty. |
escapeKmS | number | null | Escape speed in km/s: the published figure, or |
例
import { journeyStop, type JourneyStop } from "@johnmorrisdotca/wakusei-planets";
const earth: JourneyStop = journeyStop("earth");
console.log(earth.sunAu.toFixed(3), earth.escapeKmS);1.000 11.19出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。