Skip to main content

Module readings

Module readings 

Source
Expand description

The readings taken from a flight log on its own: liftoff, apogee, the top speed, the top acceleration, burnout, landing, the flight time and the descent under each canopy, with no design file and no simulation.

Each is a Reading: a value with where it came from, how it was read and the bound its error stays within, or Reading::Withheld with the reason the log can’t support it. A reading is never guessed at; one the log can’t support is left out and says why.

The track. Every reading of a height or a time but the accelerometer’s comes from one height track, the first of these the log holds (Source): the logger’s own barometric altitude (the record’s primary track); a pressure, turned into a height by the 1976 standard atmosphere, as every logger documented does it (docs/research/altimeter-height-formulas.md); a barometric altitude kept in a channel, above the pad or above sea level; or a GNSS receiver’s altitude. A GNSS track gives no reading: a receiver’s filter lags a climb and overshoots its top, and its fix drops out at liftoff (Reason::ReceiverLag, Reason::ReceiverDropout).

Method. The track is first filtered by a running median over MEDIAN_WINDOW_S (crate::filter::running_median), which takes out the pressure pulse an ejection charge punches into a barometric trace. Then:

  • the climb is the first filtered sample twice LIFTOFF_ALLOWANCE_M and the track’s step above where the log starts: the allowance is the most the pad’s noise lifts the filtered track, from below at the start or from above at the climb. One or two of the log’s first three samples that stand more than that rise and three times the noise above the second lowest of the samples after them are bad, unless the track stays at their level again before a top well above it, and the readings leave them out;
  • the pad is the median of the samples to the last within half that of the start before the climb, or of the last rest before the climb where the track falls to it and it lies more than the rise from the start, the gap entering the pad’s error (#1158). A rocket that leaves the pad at LIFTOFF_ACCELERATION_M_S2 or more, moving at v when the log starts, climbs v t + A t²/2 while the track stays near its start, so its samples bound v, and with it how far up the rocket may already be, v²/(2A): that much enters the bounds. Where it could pass the allowance, the pad is short (Reason::ShortPad): a track on a zero, the logger’s own or one only a mapping’s or a column’s word vouches for, reads its heights from that zero, the zero’s possible error entering the bounds, and any other withholds them. A track that is above the pad only by a word must start within PAD_ZERO_M of its zero;
  • liftoff is the last sample before apogee within the pad’s allowance: how far the filtered pad strays from its median, at least LIFTOFF_ALLOWANCE_M, and a step;
  • apogee is the filtered track’s highest value, at the middle of the run of samples that hold it (the track’s step leaves a peak flat for a few samples), unless that top isn’t a coast’s (Reason::DisturbedTop): the track falls below a peak in the last COAST_CHECK_S and climbs back to it, or climbs into the top faster than a coast slowing at twice gravity and falls from it faster than a body at rest there (SPIKE_CHECK_S), as a charge’s transient does;
  • the top speed is the highest least-squares slope of the filtered track over SPEED_WINDOW_S from liftoff to apogee: a speed HPR Sim derives, withheld where the barometer’s port may read the transonic flow (TRANSONIC_SPEED_M_S) and refused as Debrief refuses one (IMPLAUSIBLE_SPEED_M_S, ASCENT_NOISE_FRACTION);
  • landing is the first sample after apogee back within the pad’s allowance, at least LANDING_HEIGHT_M, that stays under it and LANDED_CEILING_M’s margin for LANDED_FOR_S, and no sooner, give or take a sample, than a fall from rest in vacuum would lose that height, √(2h/g): drag only slows a fall;
  • the flight time is landing’s time less liftoff’s;
  • the descent under each canopy is read back from landing, as Debrief reads it: the main’s rate near the ground, the run of samples back from landing that stays near it, and its first sample the main’s opening; the drogue’s leg from apogee to there, if the descent before it fell fast enough to tell it apart (Descent, Opening, M7.2c);
  • the top acceleration and burnout come from an accelerometer along the rocket’s axis (MaxAcceleration, Burnout), burnout as a floor from the top speed’s time where the log has none; a log with no accelerometer gives no top acceleration, as differencing a height twice turns its step into spikes of many g.

Before any reading, a log must be sampled no slower than MAX_INTERVAL_S and in steps no coarser than MAX_STEP_M (or MAX_PRESSURE_STEP_PA), the range the bounds were checked over, on a clock that increases (Reason::ClockOutOfOrder); and its climb must lose more than its noise and step in the COAST_CHECK_S before its top, as a coast does and as a clock in the wrong unit, such as milliseconds read as seconds, can’t.

Bounds. Each reading states the bound its error stays within: the sum of the terms docs/physics/log-readings.md lists, each from the noise model of HPR Sim’s synthetic flights (ADR-280 §3) or measured on the log itself. Most of an apogee’s bound is the day’s air: a logger converts pressure by the standard atmosphere, so a day AIR_TEMPERATURE_SPREAD_K off standard moves its heights by up to TEMPERATURE_SHARE of themselves. On the synthetic flights’ tuning set, logged at every rate and step from 500 to half a sample a second and from no step to 100 Pa, their accelerometers at 500, 100 and 20 Hz, and started as loggers that record from launch start, from 0.3 s before liftoff to 0.5 s after it, every reading given stayed within its bound (cargo xtask synthetic).

The landing’s thresholds and the least climb, LIFTOFF_HEIGHT_M, are Debrief’s (lib/analyze/index.ts, MIT, the project owner’s own), set on its corpus of flight logs rather than taken from a published source; the running median in place of Debrief’s Hampel filter, the climb’s mark, the pad and its error, the liftoff allowance, the derived speed and the bounds are HPR Sim’s (ADR-281); so are burnout’s method and the canopies’ and the top acceleration’s bounds (ADR-283).

Re-exports§

pub use interval::Interval;

Modules§

interval
The readings’ 90% intervals (ADR-257 §1, ADR-308).

Structs§

Accelerometer
The axial accelerometer the top acceleration and burnout came from, and how its readings were taken.
Apogee
The highest point.
Burnout
Burnout: when the motor stopped pushing.
DayAir
The day’s air at the pad, from the log’s own temperature, against the standard atmosphere’s.
Descent
The descent under one canopy: a leg of the descent, from apogee or the main’s opening to the main’s opening or landing.
FlightTime
The flight time, liftoff to landing.
Landing
Landing, and the descent before it.
Liftoff
Liftoff.
MaxAcceleration
The top acceleration in the climb, as the axial accelerometer reads it.
MaxSpeed
The top vertical speed in the climb.
Opening
The main’s opening, found back from landing.
Readings
What was read from a flight log.
Sample
One sample of the track.
Withheld
Why a reading was withheld.

Enums§

Clip
Why a top acceleration is clipped.
Gravity
Whether an accelerometer’s readings hold gravity.
GravityBy
How an accelerometer’s Gravity was settled.
Method
How a reading was taken from its track.
PadHeightFrom
Where the pad’s height above sea level came from.
Provenance
Whether a reading was measured or derived.
Reading
A reading, or why the log can’t support it.
Reason
The reason a reading was withheld.
Source
The track a reading was read from.

Constants§

ACCEL_BIAS_M_S2
Its residual bias after the pad’s zero, m/s²: the synthetic flights’ 0.05 g, the top of the 10–50 mg the sensor-noise note calls a guess, as no source states one.
ACCEL_NOISE_SIGMAS
The noise bound on one accelerometer sample, in its measured σ: five, which a normal noise passes, either way, about once in 1.7 million samples.
ACCEL_SCALE_SHARE
The axial accelerometer’s scale error, a share of its reading: the ADXL375’s ±10% sensitivity (ADR-280 §3, the datasheet’s p. 3), the widest of the parts the synthetic flights’ loggers model.
AIR_TEMPERATURE_SPREAD_K
How far the day’s air may be from the 1976 standard atmosphere for the bounds to hold, K: the synthetic flights’ range (ADR-280 §2). Where the log’s temperature at the pad lies further off and the log gives the pad’s height above sea level, Readings::day_air says so, with the share the day may move a reading by (#1259).
ASCENT_NOISE_FRACTION
A top speed is refused when the climb’s most negative speed is more than this share of it: a trace swinging that far has no usable sign (Debrief’s 20%).
BAROMETER_GAIN
The share of a height a barometer’s gain can be off after its pad zero: an MS5607’s ±1.0 mbar over the 400 mbar its datasheet states it on (an inference), the widest of the synthetic flights’ parts (ADR-280 §3).
BURNOUT_MEAN_S
The span the accelerometer’s trace is averaged over to find burnout, s: 2h + 1 samples, h half the span in intervals, rounded half away from zero, a tie that a clock’s float times leave a hair short included, so 27 at 500 Hz, 7 at 100 Hz and 3 at 20 Hz.
BURN_LEAST_S
The least time a burn holds the cleaned accelerometer trace past LIFTOFF_ACCELERATION_M_S2, s: a span that holds there for less is taken for a shock, a canopy’s or a charge’s, or a knock, not a burn, unless no span holds that long, when the first is the burn, a short one. Measured once, when the rule was chosen, on the sample logs: of the spans after the first, every one that started within 3 s of apogee held for at most 0.47 s, and every longer one started more than 3 s before it; nothing beside those logs says which of the longer ones are burns. HPR Sim’s choice (#789).
COAST_CHECK_S
How long before its top the track is checked, s. A coast loses g t²/2 in the last t before its top, 78 m in 4 s, gravity slowing it and drag only adding, and a flight whose motor burns into those 4 s less; a track on a clock read a thousand times too slow, as milliseconds read as seconds, loses about 80 µm, so a track must lose more than twice its noise and step. And a coast doesn’t fall and rise again: a track that falls more than that after a peak in those 4 s and then climbs to its top has a top that isn’t the coast’s (Reason::DisturbedTop).
COAST_SPAN_S
The span of the coast before apogee’s earliest time whose median reading settles an accelerometer’s gravity, s: near apogee a rocket falls freely but for a drag its slow speed makes small, so a part that holds gravity reads about 0 and one that takes it out about −1 g.
COLDEST_STANDARD_K
The coldest temperature in the 1976 standard atmosphere below 20 km, K: the tropopause’s.
DENSITY_SCALE_HEIGHT_M
The least density scale height of the troposphere, m: the 1976 standard atmosphere’s R T/(g − R L), with its 6.5 K/km lapse L, at its coldest, the tropopause’s 216.65 K less AIR_TEMPERATURE_SPREAD_K, is 7,289 m, taken down to 7,000 m. A canopy’s rate goes as the density to the −½, so it grows by no more than exp(h/2H) over h of height in the troposphere.
DESCENT_FIT_STEPS
The steps of the track a fit of the descent’s rate holds at the least: a fit across one step reads a spike, and one across four is off by about a quarter of the rate, which the run’s MAIN_TOLERANCE_SHARE leaves room for. HPR Sim’s choice.
DESCENT_GUARD_S
Its last half is left out, s; and a main opening sooner than this after apogee is none: Debrief’s.
DESCENT_TAIL_S
The main’s rate is the median over this long before landing, or the fit’s span if that is longer, s: Debrief’s.
DESCENT_WINDOW_MAX_S
The longest fit of the descent’s rate, s: a track whose steps need more is too coarse to tell the main’s opening by. HPR Sim’s choice.
DESCENT_WINDOW_S
The span of the least-squares fit of the descent’s rate, s: a canopy’s rate changes slowly, so a fit twice the climb’s averages the noise down; it needs SPEED_MIN_SAMPLES, so a log sampled slower than every 0.25 s gives no canopy’s rate.
DRIFT_M_PER_S
The most a barometer’s drift moves a height in a second, m: the synthetic flights’ fastest drift, 3 Pa in 30 s (ADR-280 §3), at the density of air 5 km up (0.74 kg/m³).
DROGUE_RATIO
A drogue’s leg falls faster than this many times the main’s rate, by its median: Debrief’s.
FLAT_TOP_M_S2
Or within this, m/s², if that is more: Debrief’s.
FLAT_TOP_S
Or over this long, s, if that is more samples: Debrief’s.
FLAT_TOP_SAMPLES
A top acceleration held flat over this many samples is clipped: Debrief’s.
FLAT_TOP_SHARE
Flat: within this share of the top, Debrief’s.
GRAVITY_TOLERANCE_G
How near 1 g, or 0, an accelerometer’s pad must read, or its coast to apogee 0 or −1 g, to settle whether gravity is in its readings, g: a 20° rail’s 0.06 g, a part’s zero offset and the small drag near apogee, HPR Sim’s choice. Also how far below its part’s range a top acceleration is taken as clipped, with two steps.
IMPLAUSIBLE_SPEED_M_S
A top speed above this is refused, m/s (Debrief’s ceiling).
LANDED_CEILING_M
The height above the pad the altitude must then stay under, m (Debrief’s 5 m)…
LANDED_FOR_S
…and for how long, s (Debrief’s 1 s).
LANDING_HEIGHT_M
How close to the pad the altitude must come to mark landing, m (Debrief’s 2 m).
LEG_LEAST_M
A leg of the descent loses more than this, m: Debrief’s.
LEG_LEAST_SHARE
And more than this share of its top’s height: Debrief’s.
LIFTOFF_ACCELERATION_M_S2
The least mean acceleration a rocket leaves the pad with over its first meters, m/s², which sets how long it takes to climb out of the pad’s noise and so how late liftoff can be read: twice gravity, as the safety codes’ 3:1 thrust to weight leaves on the motor’s average thrust (NAR’s high-power code: liftoff weight no more than a third of the certified average thrust; Tripoli’s: below 3:1 only with an active stability system). The tuning set’s slowest rocket averages 30 m/s² over its first 5 m. A rocket slower off the pad is read later than the bound, and may already be further up, when a log starts, than its pad’s error allows.
LIFTOFF_ALLOWANCE_M
The least the filtered track may sit above the pad and still be on it, m: four times the synthetic flights’ fast correlated barometer noise (0.5 m, ADR-280 §3), HPR Sim’s choice. Where the pad’s own samples reach further, the allowance is their reach. Liftoff read at half a foot above the pad, as before the readings were taken on every logger, came up to 6 s early on a noisy 500 Hz barometer, the noise lifting the pad’s last samples above it; with the pad’s reach measured but the allowance at 1 m, 6.8 s early at half a sample a second on one tuning flight, against a 4.5 s bound, the noise moving the pad’s last sample past the reach of the two before; at 2 m, never.
LIFTOFF_HEIGHT_M
The climb above the pad that marks a flight, m (Debrief’s 3 m).
LOGGED_AIR_RANGE_K
The range a logged temperature must fall in to be taken for the pad’s air, K: −100 °C to +100 °C, well past the coldest and hottest air on record (−89.2 °C at Vostok, 56.7 °C at Death Valley, WMO’s archive of weather extremes), and room for a sun-warmed bay. A channel outside it isn’t the air, and gives no DayAir. It catches a column of zeros only in kelvin: the readers turn a column into kelvin first, so zeros in °C read 273.15 K and in °F 255.37 K, both inside it. Those are refused apart from the range, by UNIT_ZEROS_K.
MAIN_TOLERANCE_M_S
Or within this much more, m/s, if that is more: Debrief’s.
MAIN_TOLERANCE_SHARE
The run back from landing stays within this share of the main’s rate: Debrief’s.
MAX_INTERVAL_S
The slowest a log may be sampled, s: the slowest rate the bounds were checked at on the synthetic flights’ tuning set, half a sample a second, below which the readings are withheld (Reason::SampledTooSlowly). It is about twice a radio’s telemetry interval, and a millisecond clock read as seconds is slower at any rate under 500 samples a second.
MAX_MEDIAN_HALF_WINDOW
The most samples either side of its center the running median takes: the MEDIAN_WINDOW_S window at over 6 kHz, far faster than MIN_INTERVAL_S lets a log be read.
MAX_PRESSURE_STEP_PA
The coarsest step a pressure track may have, Pa: the coarsest checked on the tuning set, above the 92 Pa steps of the coarsest pressure track the readers read (an ARTS2’s raw counts).
MAX_STEP_M
The coarsest step a height track may have, m: the coarsest checked on the tuning set, above the 8.8 m steps of the coarsest altitude track the readers read (MARSA’s).
MEDIAN_WINDOW_S
The running median’s span, s: 0.3 s, Debrief’s despiking window. Debrief runs a Hampel filter over it (crate::filter::hampel, threshold 4); HPR Sim takes the plain median (threshold 0). On the public Pnut log Debrief ships, the ejection charge’s pulse peaks at 1,028 ft, against the 1,009 ft apogee the logger states. The samples around the pulse, a dip before it and a lasting drop after it, widen its window’s spread until the Hampel filter keeps it, and an apogee read after it is the pulse. After the median it reads 1,010 ft. The median removes any pulse up to half its window wide, and reads a noise-free peak bent by gravity alone no more than peak_bound_m low, 0.077 m at 20 Hz. The Pnut numbers are checked only where the log has been fetched into refs/ (it isn’t committed); CI checks an invented log of the same shape.
MIN_INTERVAL_S
The fastest a log may be sampled, s: the fastest rate the bounds were checked at on the synthetic flights’ tuning set, 500 samples a second, above which the readings are withheld (Reason::SampledTooFast). A clock a part in a thousand faster, as a logger’s rounding of its own clock may be, still reads.
NOISE_M
The barometer’s noise at a reading, m: what the fast and slow correlated noise, the part’s white noise, the pad’s own median and the port’s error at apogee’s sideways speed add to a height read off the filtered track, tuned on the tuning set.
NOISE_SPAN_S
The span either side of the top acceleration its noise is measured over, s.
PAD_ABOVE_GROUND_M
How far above the ground the logger may sit on the pad, m: it lands lower than it started by as much, so its landing is read early by the time that height takes. HPR Sim’s choice, a tall rocket’s electronics bay on a rail.
PAD_MIN_SAMPLES
The least samples of an accelerometer’s pad, or its coast, that settle its gravity.
PAD_ZERO_M
How far from its zero a track whose heights are above the pad only by a mapping’s or a column’s word may start and still be taken as a height above the pad, m: a logger zeroes on the pad, and its zero moves by the weather and its noise before launch. An hour on the pad at RAPID_PRESSURE_CHANGE_PA_PER_H, at sea level’s standard density, then NOISE_M: 203.2 / (1.225 · 9.807) + 3 = 19.9 m. The hour is HPR Sim’s choice. A track that starts further off is withheld as Reason::StartsOffThePad, as an altitude above sea level a column mapping calls one above the ground reads (#646).
PORT_PRESSURE_COEFFICIENT
The pressure coefficient a port one caliber behind the nose’s shoulder reads below Mach 0.9, its size: the ogive-cylinder’s measured −0.02 (altimeter-mach-error.md §1–2), the largest the synthetic flights draw. A climb’s dynamic pressure rises with its speed, so the port’s error lifts a speed derived while the rocket accelerates.
RAIL_TILT_DEG
The most a rail stands from vertical, degrees: the NAR’s and Tripoli’s high-power safety codes allow 20° (the NAR’s model rocket code allows 30°). A logger that zeroes its accelerometer on the pad takes out g cos θ, so standard gravity put back is off by up to g (1 − cos 20°), 0.06 g.
RAPID_PRESSURE_CHANGE_PA_PER_H
The fastest the day’s pressure changes in the ordinary run of weather, Pa an hour: the National Weather Service’s pressure rising (falling) rapidly, 0.06 inHg an hour or more (its glossary; the threshold of METAR’s PRESRR and PRESFR remarks).
SPEED_MIN_SAMPLES
The fewest samples the fit may take: the top speed is withheld on a log sampled slower than SPEED_WINDOW_S over this less one.
SPEED_NOISE_M_S
What the barometer’s noise adds to a derived speed, m/s, tuned on the tuning set.
SPEED_WINDOW_S
The span of the least-squares fit the top speed is the slope of, s: HPR Sim’s choice, long enough to average the barometer’s correlated noise down to a few meters a second, short enough to keep most of the speed’s peak.
SPIKE_CHECK_S
How long either side of its top the track is checked for a spike, s: a second, or two samples of a slower track. A coast slowing at gravity and drag climbs no more than g Δ² in its last Δ, and nothing falls from its top faster than gravity pulls it, so a track that climbs into its top and falls from it faster than both holds a spike there (Reason::DisturbedTop), as a breakup’s in a public Blue Raven log does, 1.2 km over the coast. A parachute open before apogee breaks only the first, a charge that lifts the bay’s pressure at the top only the second, and their tops are read.
SPIKE_THRESHOLD
The Hampel filter’s threshold, in robust standard deviations of its window (R. K. Pearson et al., The Class of Generalized Hampel Filters, EUSIPCO 2015, §2, t): five, as ACCEL_NOISE_SIGMAS holds the noise, so it takes out what noise alone reaches about once in 1.7 million samples. HPR Sim’s choice.
SPIKE_WINDOW_S
The window of the Hampel filter the accelerometer’s trace is cleaned with before the thrust’s start and end and burnout are found on it, s: a spike narrower than half of it, a charge’s shock or one bad sample, is taken out, while a step or a steady run, as the thrust’s rise and fall are, is kept as it was. HPR Sim’s choice; the top is still read off the samples.
SYNTHETIC_COLUMN
The column the synthetic flights’ loggers write their axial accelerometer under (hpr_forensics::synthetic::logger), gravity in.
SYNTHETIC_LOWER_RANGE_COLUMN
The column the synthetic flights’ IMU-like logger writes its axial accelerometer under, gravity in, when its part is set to ±8 g (hpr_forensics::synthetic::logger::LOWER_RANGE_G).
TEMPERATURE_SHARE
The share of a barometric height its error from the day’s air can reach: a height read by the standard atmosphere is T_std/T of the true one over the layer it spans (the hypsometric equation), so off by ΔT/T_std at most, T_std no colder than the standard atmosphere’s 216.65 K below 20 km: 15/216.65 = 6.9%. About 0.35% a kelvin near the ground.
TRANSONIC_MACH
The Mach number from which a barometer’s port may read the transonic flow over the nose: the ogive-cylinder’s pressure coefficient behind its shoulder jumps between Mach 0.9 and 1.0 (docs/research/altimeter-mach-error.md §1–2), and on the tuning set a speed derived from it was off by up to 850 m/s from Mach 0.9. HPR Sim’s margin below it.
TRANSONIC_SPEED_M_S
The top speed at or above which it is withheld (Reason::Transonic), m/s: TRANSONIC_MACH times the speed of sound in the coldest air the bounds allow below 20 km, the standard atmosphere’s 216.65 K less AIR_TEMPERATURE_SPREAD_K: 0.8 √(1.4 · 287.05 · 201.65) = 227.7 m/s.
UNIT_ZEROS_K
A unit’s zero read as kelvin, K: 0 K, 0 °C (273.15 K) and 0 °F ((0 − 32) × 5/9 + 273.15 = 255.372 K). A temperature channel whose finite samples are all one value, and that value within UNIT_ZERO_TOLERANCE_K of one of these, is taken for a logger with no sensor writing zeros, and gives no DayAir. A channel of one other value is read as the air.
UNIT_ZERO_TOLERANCE_K
How near a constant channel’s value must lie to one of UNIT_ZEROS_K to be refused, K.

Functions§

height_track
The heights the readings take, on the scale of Readings::pad_altitude_m, and their times, s on the log’s clock; None if the log holds no track. A channel-only log’s altitude_m is empty, so a caller after the log’s height takes it from here.
height_track_source
Which sensor the readings’ height track comes from, as height_track takes it; None if the log holds no track.
peak_bound_m
How far below its true peak the running median of half samples either side can read a trace sampled every interval s and bent by gravity alone near its peak, m: g ((⌈half/2⌉ + ½) Δt)² / 2. At the highest sample, half + 1 of the window’s samples lie within ⌈half/2⌉ places of it, so the median is no lower than they are, and the true peak lies within half a sample of the highest sample. At 20 Hz, 0.077 m.
read
Takes the readings from a flight log.