リファレンス · ジャーニーモード:ホーマン遷移・打ち上げ窓・フリップ&バーンの旅
planTrip関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Plans a trip: the transfer or the flip and burn, the burns, the times, and what the craft can and cannot do. A craft that cannot make the trip comes back with a verdict that says why in one line and no phases.
インポート
import { planTrip } from "@johnmorrisdotca/uchusen-rockets/journey";
定義
function planTrip(source: BodySource, craft: Craft, from: string, to: string, departMs: number, g?: number, via?: "jupiter"): Trip
引数
| 名前 | 型 | 説明 |
|---|---|---|
source | BodySource | Where the places are. |
craft | Craft | The craft. |
from | string | The starting place's id. |
to | string | The destination's id. |
departMs | number | When the departure burn begins, milliseconds since 1970 (for a ballistic trip to a planet, one of |
g (省略可) | number | undefined | Proper acceleration in g for a ship that burns all the way. Omitted, the ship flies at its rated acceleration. A ballistic craft ignores it. |
via (省略可) | "jupiter" | undefined |
|
戻り値
Trip
The planned trip.
例
import { craftOf, planTrip, type BodySource } from "@johnmorrisdotca/uchusen-rockets/journey";
declare const source: BodySource;
const trip = planTrip(source, craftOf("saturn-v")!, "earth", "moon", Date.UTC(2026, 10, 5));
console.log(trip.verdict.line, Math.round(trip.dv.departure));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。