Skip to main content

Module logger

Module logger 

Source
Expand description

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.

Rates are the makers’ (docs/research/altimeter-smoothing-methods.md §2); parts, noise, ranges and steps are their datasheets’ (altimeter-sensor-noise.md §2, §4–6); a logger turns pressure into height by the standard atmosphere and zeroes it on the pad (altimeter-height-formulas.md). Every range is ADR-280, the synthetic flights first §3’s.

Structs§

LoggerDraw
What one flight’s logger draws.
Recording
How a log is written: the barometer’s rates and how its reading is written. A profile’s own is Profile::recording; the readings’ check (super::held) writes each tuning flight again at other rates and steps.

Enums§

Profile
A logger profile.
Written
How a barometer’s reading is written.

Constants§

ACCEL_BIAS_G
The residual accelerometer bias after the pad’s zero is drawn from ±this, g: the top of the ±10–50 mg that sensor noise’s What this suggests 1 calls a guess, as no source states one.
CORRELATED_NOISE_M
The fast correlated barometer noise: 0.5 m at 50 Hz, lag-one correlation 0.5, as on the pads of five Blue Raven logs (sensor noise §3, §6).
CORRELATED_NOISE_PHI
The correlated noise’s lag-one correlation at CORRELATED_NOISE_RATE_HZ.
CORRELATED_NOISE_RATE_HZ
The rate at which it was measured, Hz.
GNSS_NOISE_M
A GNSS fix’s noise, 1σ along each axis, m: the filter’s σ in GNSS in boost §4’s simulation, which was fed noise-free fixes, taken as a receiver’s noise (an assumption).
LOWER_RANGE_G
The lower full scale a low-g IMU axis is set to in accelerometer_log_set_lower, g: ±8 g, as the BMX160 and the MPU-6000 offer, which most of the IMU-like logger’s tuning flights’ tops pass and the rest don’t, as the synthetic flights’ report counts. The readings know it by its column, hpr_flightdata::readings::SYNTHETIC_LOWER_RANGE_COLUMN, whose family states it.
MS5607_RELATIVE_GAIN
The MS5607’s error after a zero at one pressure, ±1.0 mbar over 0–50 °C, read over the 400 mbar (700–1100 mbar) its datasheet states the figure on as a gain on the pressure’s change from the pad (sensor noise §2 note †, §6; an inference).
SLOW_NOISE_M
The slow correlated barometer noise, a first-order Gauss–Markov term of 0.24–0.29 m and time constant 0.65–1.26 s, as a BMP085’s ten minutes at rest gave (sensor noise §3; Sabatini and Genovese, Sensors 13(11):15692, 2013, Tables 1–2): the noise that a reading averaged over a second keeps, which the fast term alone leaves out.
SLOW_NOISE_TAU_S
Its time constant’s range, s.

Functions§

accelerometer_log
The log draw’s logger writes of truth, its accelerometer sampled at rate_hz on its own clock in place of the barometer’s: the same part, noise terms and streams, its noise grown with the rate’s bandwidth. None for a profile with no accelerometer.
accelerometer_log_set_lower
The log draw’s logger writes of truth, its accelerometer set to the lower full scale its part offers (Profile::accelerometer_lower_range_m_s2): the same part, noise terms and streams on the same clock, clipping at the lower range, as the BMX160 holds its maximum code past it (sensor noise §5, its datasheet p. 32), in steps of the part’s 16 bits over it, under hpr_flightdata::readings::SYNTHETIC_LOWER_RANGE_COLUMN. None for a part with no such setting.
barometer_log
The log draw’s barometer would write of truth at recording’s rates and step, with the same noise terms and streams, and nothing else: no accelerometer, no GNSS receiver. Tagged as a table read by a mapping (LogFormat::GenericTable), so that a reading takes the track’s step from the track itself. None for a profile with no barometer.
log
The log draw’s logger writes of truth, with noise drawn from seed’s streams for flight index.