Reference · Journey mode: transfers, launch windows and flip-and-burn trips
Triptype
A trip, planned: when it leaves, its phases, its verdict, its distances, its speed changes and what is true of the craft at the peak. Plain data, with no function in it.
Import it
import type { Trip } from "@johnmorrisdotca/uchusen-rockets/journey";
Definition
interface Trip {
from: string;
to: string;
craftId: string;
drive: "ballistic" | "continuous";
frame: "sun" | "earth";
departMs: number;
liftoffBeforeS: number;
phases: Phase[];
totalS: number;
verdict: Verdict;
estimated: string[];
straightKm: number;
pathKm: number;
dv: {
departure: number;
arrival: number;
total: number;
};
peakG: number;
peakSpeed: number;
peakGamma: number;
shipS: number;
frameS: number;
propellantUsedT?: number;
propellantCarriedT?: number;
fuel: {
usedT: number | null;
carriedT: number | null;
note: string;
};
massRatio: number | null;
escape?: {
surfaceKmS: number;
parkingKmS: number;
};
assist?: {
by: "jupiter";
savedMs: number;
radii: number;
};
payload: {
kg: number | null;
atLeast: boolean;
note: string;
};
ballistic?: {
mu: number;
r1: number;
r2: number;
theta0: number;
transitS: number;
parkKm: number;
parkSpeed: number;
burnEndSpeed: number;
captureKm: number;
captureSpeedIn: number;
captureSpeedOut: number;
burnS: number;
brakeS: number;
flipS: number;
ascentS: number;
vInfDeparture: number;
vInfArrival: number;
arc: number[];
c3: number;
conic?: Conic;
fromOrbit?: boolean;
entry?: boolean;
swing?: Swing;
};
continuous?: {
from: Vec3;
to: Vec3;
a: number;
burnS: number;
flipS: number;
peakRapidity: number;
blockedBySun: boolean;
};
}
Members
| Name | Type | Description |
|---|---|---|
from | string | |
to | string | |
craftId | string | |
drive | "ballistic" | "continuous" | |
frame | "sun" | "earth" | What the positions are measured from: the Sun, or the Earth for a trip to the Moon. |
departMs | number | When the departure burn (or the first burn of a ship that burns all the way) begins, milliseconds since 1970. |
liftoffBeforeS | number | When lift-off is, seconds before |
phases | Phase[] | |
totalS | number | |
verdict | Verdict | |
estimated | string[] | Names of the figures in this plan that are estimates, not sources. |
straightKm | number | The straight line from the start to the end at departure, km. |
pathKm | number | The length of the path flown, km. |
dv | { departure: number; arrival: number; total: number; } | Speed changes, m/s. |
peakG | number | The greatest acceleration felt, g. |
peakSpeed | number | The greatest speed, m/s, and the Lorentz factor then. |
peakGamma | number | |
shipS | number | Time on board and in the frame of the two ends, seconds, from lift-off. |
frameS | number | |
propellantUsedT (optional) | number | undefined | The propellant a ship that burns all the way uses, tonnes, and carries. |
propellantCarriedT (optional) | number | undefined | |
fuel | { usedT: number | null; carriedT: number | null; note: string; } | The propellant of the trip: tonnes used (and carried, where it is known), or null with the reason no figure can be given. |
massRatio | number | null | Initial mass over mass after the burns the rocket equation was applied to. Null when no exhaust speed is known, so no propellant figure is invented. |
escape (optional) | { surfaceKmS: number; parkingKmS: number; } | undefined | Escape speed from the surface and from the parking orbit of the body the rocket leaves, kilometres a second. Absent for a ship that burns all the way. |
assist (optional) | { by: "jupiter"; savedMs: number; radii: number; } | undefined | A swing past Jupiter on the way out, and how much speed change it saves against the direct Hohmann between the same distances. |
payload | { kg: number | null; atLeast: boolean; note: string; } | What the craft carries to the end of this trip: kilograms (at least, where only a harder trip is rated), or null with the reason. |
ballistic (optional) | { mu: number; r1: number; r2: number; theta0: number; transitS: number; parkKm: number; parkSpeed: number; burnEndSpeed: number; captureKm: number; captureSpeedIn: number; captureSpeedOut: number; burnS: number; brakeS: number; flipS: number; ascentS: number; vInfDeparture: number; vInfArrival: number; arc: number[]; c3: number; conic?: Conic; fromOrbit?: boolean; entry?: boolean; swing?: Swing; } | undefined | |
continuous (optional) | { from: Vec3; to: Vec3; a: number; burnS: number; flipS: number; peakRapidity: number; blockedBySun: boolean; } | undefined |
Examples
import type { Trip } from "@johnmorrisdotca/uchusen-rockets/journey";
const describe = (trip: Trip) => `${trip.from} to ${trip.to}: ${trip.verdict.line}`;
console.log(typeof describe);functionWhat it prints (run when this page was built)