Skip to main content

Module truth

Module truth 

Source
Expand description

A synthetic flight’s truth: HPR Sim’s flight of the drawn rocket to the ground, sampled every TRUTH_STEP_S, with its events.

Structs§

ReshapedDrag
Set B’s drag: HPR Sim’s zero-lift drag times scale · (1 + a·exp(−((M − 1)/0.2)²) + b·M), a transonic rise and a slope shaped differently from HPR Sim’s.
StagedTruth
A staged flight’s truth, one to a stage.
Truth
A flight’s truth.
TruthEvents
The events of a flight, s since launch.
TruthSample
The truth at one instant.

Constants§

RAIL_LENGTH_M
The rail’s length, m: RocketPy’s Calisto example’s 5.2 m, for every design.
SHEAR_REFERENCE_HEIGHT_M
The height at which set B’s power-law wind takes the drawn speed, m: NASA/TM-2008-215633’s reference height, as hpr_atmos::PowerLawWind cites it.
SITE_LATITUDE_DEG
The site’s latitude, degrees north: fixed, as nothing here depends on where the field is but its elevation, which is drawn.
SITE_LONGITUDE_DEG
The site’s longitude, degrees east.
TRUTH_STEP_S
The truth’s sample interval, s: a row every 0.01 s from launch, and one at each event.

Functions§

fly
Flies simulation, built from inputs, and keeps its truth.
fly_staged
Flies draw on the two-stage design json: the booster burns out, the stack parts half a second later and the sustainer lights half a second after that. The sustainer comes down under a canopy, the booster tumbling.
inputs
The inputs a draw flies from, its design read from files.
tilted
curve tilted by 1 + tilt·(2t/t_b − 1) over its burn t_b and rescaled to its own impulse: progressive for a positive tilt, regressive for a negative one.