Skip to main content

Module synthetic

Module synthetic 

Source
Expand description

Synthetic flights: HPR Sim’s flight of a drawn rocket, its truth, and the log a drawn logger would write of it, for testing what a log’s readings and fits claim against a known answer.

What it is for. A reading taken from a log, or a parameter fitted to one, states a 90% interval, and ADR-257 asks that each interval be tested on at least 1,000 flights whose truth is known: it must miss about 5% of the time on each side. Only a simulated flight has a known truth. This module draws those flights, on seeds fixed before any interval exists, as ADR-280 §2–3 sets out; M7.2’s readings and smoother and M7.3’s fits are checked on them.

How far to trust it. The truth is HPR Sim’s own flight, so a check on these flights shows how well a method recovers HPR Sim’s trajectory from noisy sensors, not how well HPR Sim predicts a real flight. The noise is the makers’ datasheets and the noise measured in public logs; set Set::B flies a model shaped differently from HPR Sim’s in three named ways, so that a method can’t pass by knowing HPR Sim’s model. What the noise leaves out is listed on the guide’s page physics/synthetic-flights.md.

The sets. Set::Tuning, 200 flights, for anything fitted or tuned; Set::A, 1,000 flights of HPR Sim’s model; Set::B, 1,000 differing from it; and Set::Calibration, 2,000 drawn as the tuning set is, for the factors that scale the readings’ 90% intervals (intervals), which ADR-257 §1, calibrated intervals, asks be fitted on seeds of their own. Flight k of a set draws each group of inputs (its design, motor, drag, wind, rail, site, model and logger) from its own stream, keyed by the set’s seed, k and the group (SeededRng::for_stream), so a set’s first flights don’t change if it grows, and an input added to one group moves no other group.

Modules§

census
A set’s census: how many flights each design and logger flew, the ranges they span, and every draw that didn’t fly, with its reason. cargo xtask synthetic commits it.
designs
The public designs the synthetic flights fly, each with its RocketPy example’s own parachutes.
fits
The least-squares fit’s 90% intervals held to the synthetic flights (M7.3b, ADR-257 §1, ADR-316).
held
The readings held to their bounds on the synthetic flights: each reading a log gives, against its flight’s truth, beside the bound the reading states (M7.2b, the readings on every logger).
intervals
The readings’ 90% intervals held to the synthetic flights’ truth (ADR-257 §1–2, ADR-308).
logger
The loggers of the synthetic flights: six profiles, each like a family HPR Sim’s readers read, and the log one writes of a flight’s truth.
noise
The noise terms a synthetic logger adds to a flight’s truth, each a function of its own so that a test can hold it to its stated parameters.
paired
Two recordings of one synthetic flight, and a logger in each stage of a staged one: the check of hpr_flightdata::timeline’s clock offset (two recordings, in the plan for the readings).
smoothed
The smoother held to the synthetic flights’ truth (M7.2d): each flight’s own log smoothed, its height and vertical speed compared with the truth’s at four moments, and the share of flights whose truth falls outside the smoother’s 90% interval on each side counted.
truth
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§

Draw
Everything one synthetic flight draws.
Flight
A synthetic flight: what it drew, its truth and its logger’s log.
Flyer
Flies synthetic flights, sharing each design’s supersonic drag table across its flights (it takes about 0.2 s to build, docs/perf.md).

Enums§

Model
The model a flight flies.
Set
A set of synthetic flights.
SyntheticError
Why a synthetic flight couldn’t be made.

Constants§

MAX_TILT_DEG
The rail’s largest angle from vertical, degrees, inside the safety code’s 20°.
MAX_WIND_M_S
The most the wind blows, m/s: 20 mph, the most the NAR’s high-power safety code allows.

Functions§

draw
Draws flight index of set.