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_Mand 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_S2or more, moving atvwhen the log starts, climbsv t + A t²/2while the track stays near its start, so its samples boundv, 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 withinPAD_ZERO_Mof 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 lastCOAST_CHECK_Sand 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_Sfrom 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 andLANDED_CEILING_M’s margin forLANDED_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§
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.
- Flight
Time - 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.
- Gravity
By - How an accelerometer’s
Gravitywas settled. - Method
- How a reading was taken from its track.
- PadHeight
From - 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_airsays 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 + 1samples,hhalf 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²/2in the lasttbefore 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 lapseL, at its coldest, the tropopause’s 216.65 K lessAIR_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 thanexp(h/2H)overhof 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_SHAREleaves 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, byUNIT_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_Swindow at over 6 kHz, far faster thanMIN_INTERVAL_Slets 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 thanpeak_bound_mlow, 0.077 m at 20 Hz. The Pnut numbers are checked only where the log has been fetched intorefs/(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, thenNOISE_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 asReason::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 tog (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
PRESRRandPRESFRremarks). - SPEED_
MIN_ SAMPLES - The fewest samples the fit may take: the top speed is withheld on a log sampled slower than
SPEED_WINDOW_Sover 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, asACCEL_NOISE_SIGMASholds 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/Tof the true one over the layer it spans (the hypsometric equation), so off byΔT/T_stdat most,T_stdno 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_MACHtimes the speed of sound in the coldest air the bounds allow below 20 km, the standard atmosphere’s 216.65 K lessAIR_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_Kof one of these, is taken for a logger with no sensor writing zeros, and gives noDayAir. 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_Kto 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;Noneif the log holds no track. A channel-only log’saltitude_mis 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_tracktakes it;Noneif the log holds no track. - peak_
bound_ m - How far below its true peak the running median of
halfsamples either side can read a trace sampled everyintervals and bent by gravity alone near its peak, m:g ((⌈half/2⌉ + ½) Δt)² / 2. At the highest sample,half + 1of 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.