Reference · Journey mode: transfers, launch windows and flip-and-burn trips
stageOffunction
What of a craft is left at a phase of its trip, to draw: the whole rocket until the ascent is over, the upper stage with its payload for the departure burn and the coast, and the payload alone from the turn round. A ship that burns all the way is whole throughout.
Import it
import { stageOf } from "@johnmorrisdotca/uchusen-rockets/journey";
Definition
function stageOf(craft: Craft, phase: string, onPad?: boolean): Stage
Parameters
| Name | Type | Description |
|---|---|---|
craft | Craft | A craft. |
phase | string | The phase of the trip, such as |
onPad (optional) | boolean | Whether the craft lifts off. A craft that is already in orbit (a departure from the Moon) is the payload throughout. |
Returns
Stage
The rocket, variant and slots to draw, and a name for them.
Examples
import { craftOf, stageOf } from "@johnmorrisdotca/uchusen-rockets/journey";
const saturn = craftOf("saturn-v")!;
console.log(stageOf(saturn, "ascent").name, stageOf(saturn, "coast").name, stageOf(saturn, "brake").name);Saturn V S-IVB with the Apollo spacecraft Apollo command and service moduleWhat it prints (run when this page was built)