リファレンス · ジャーニーモード:ホーマン遷移・打ち上げ窓・フリップ&バーンの旅
State型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What is true of the craft at a moment: its place, speed, acceleration, the distances, the clocks, the signal time home and how far it has turned round.
インポート
import type { State } from "@johnmorrisdotca/uchusen-rockets/journey";
定義
interface State extends Place {
dateMs: number;
burn: "off" | "forward" | "reverse";
speedFrame: "start" | "earth" | "sun" | "destination";
speedMs: number;
gamma: number;
accelG: number;
doneKm: number;
progress: number;
toDestinationKm: number;
positionKm: Vec3;
shipS: number;
frameS: number;
signalS: number;
turned: number;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
dateMs | number | |
burn | "off" | "forward" | "reverse" | Which way the engine is firing: not at all, pushing it on, or against its motion. |
speedFrame | "sun" | "earth" | "start" | "destination" | How the speed is measured: from the start or destination (for a ship that burns all the way), from the Earth, the Sun or the destination. |
speedMs | number | |
gamma | number | |
accelG | number | The acceleration, in g, positive along the motion. |
doneKm | number | Path flown, km, and the fraction of the path, 0 to 1. |
progress | number | |
toDestinationKm | number | The straight line from the craft to the destination, km. |
positionKm | Vec3 | The craft's place in the trip's frame, km. |
shipS | number | Time on board since lift-off and time since lift-off in the frame of the places, seconds. |
frameS | number | |
signalS | number | How long a signal takes to get home from here, seconds. |
turned | number | How far the craft has turned round, 0 (facing forward) to 1 (facing back). |
phase | Phase | |
index | number | |
fraction | number | How far through the phase, 0 to 1. |
missionS | number | Mission seconds from lift-off (negative before). |
scale | number | Mission seconds shown per second on the screen in this phase. |
例
import type { State } from "@johnmorrisdotca/uchusen-rockets/journey";
const speed = (state: State) => `${Math.round(state.speedMs)} m/s`;
console.log(typeof speed);function出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。