Skip to main content

Crate hpr_flightdata

Crate hpr_flightdata 

Source
Expand description

Flight-log importers, the canonical flight record, smoothing and time alignment, and the readings taken from a flight with the provenance of each.

Start here says what works today and what is planned.

This crate doesn’t depend on the simulator, and must not. Reading a flight log and working out what it says is a use of this project in its own right. It serves someone who has a log and neither a design file nor any wish to simulate anything. Comparing a flight with a simulation of it is hpr-forensics, which depends on both.

Every reading carries where it came from: measured by an instrument, derived from what was measured, or clipped because the sensor saturated. A reading the log can’t support is withheld with a reason rather than printed.

Status: pre-alpha. import::read recognizes a log’s layout from its content. It reads the log into the record every reader produces (log::FlightLog). The readers for altimeters and flight computers:

  • PerfectFlite’s .pf2, its CSV and text exports, and its older .pfa (perfectflite).
  • AltOS’s CSV, and a table of AltOS’s own columns with no version header (altos). It also reads an AltOS export a spreadsheet re-saved with formula cells, each formula kept as text.
  • AltOS’s radio telemetry as AltosUI saves it (altos_telem).
  • AltOS’s radio telemetry decoded to a table (altos_telem_csv).
  • AltOS’s raw downloads: the board’s own log as AltosUI saves it to an .eeprom file (altos_eeprom). It’s checked against AltosUI’s export of the same flight in all 9 samples that have one.
  • The Featherweight Raven’s FIP CSV (raven). A FIP export that lost its header line is read under the header the caller states (raven::read_rows).
  • The Blue Raven’s CSV (blueraven).
  • The Blue Raven’s USB download to a serial terminal, each line held to its CRC (blueraven_usb).
  • The Featherweight app’s summaries of a Blue Raven’s or a GPS tracker’s flight (fwsummary).
  • Missile Works RRC3’s CSV (rrc3).
  • Two raw downloads, the Raven’s .FIPa (raven_fipa) and the RRC3’s .rff (rrc3_rff). Each is checked against its maker’s export of the same flight where the sample logs hold one. That’s 55 of the 57 .FIPa files and 1 of the 6 .rff.
  • Eggtimer’s CSV, an Eggtimer TRS’s terminal text, and an Eggtimer’s download saved as RTF (eggtimer).
  • AltimeterCloud’s CSV (altimetercloud).
  • Entacore AIM’s CSV (entacore).
  • AerospaceNU’s SillyGoose logs (sillygoose).
  • AerospaceNU’s flight computer board’s CSV (aerospacenu_fcb) and its ground station’s text (aerospacenu_gs).
  • Silicdyne Fluctus’s CSV (fluctus).
  • The ARTS2’s interpreted data (arts2).
  • The ARTS2’s .odf and its raw CSV export (arts2_raw). The .odf is read in units held to the interpreted export of the same flight.
  • The R-DAS’s raw text, its counts kept as written (rdas).
  • A phone app’s launch CSV (phone_launch).
  • A course’s Teensy data logger, one sensor’s reading a line (teensy).
  • One team’s radio telemetry packets, 255:…:254, as its flight computer logged them, as a receiver heard them, and inside an RTF document (packets).
  • A MARSA altimeter’s download and a spreadsheet’s re-save of it (marsa).

An AltiMAX’s own .ALS file is read too (altimax_als), as are an Entacore AIM’s .xtra files and raw dumps of its memory (entacore_raw). Each of these layouts was worked out from one sample flight and held to the maker’s conversion of it.

Five GPS logs are read, every column kept as a channel on its own clock:

  • Featherweight’s tracker and ground-station CSV (fwgps).
  • KML (kml).
  • NMEA 0183 (nmea).
  • Missile Works’ RTx tracker’s .rtx file and its CSV and text exports (rtx).
  • GPX 1.0 and 1.1, checked on invented files only (gpx).

Files from other loggers, and files that hold other files:

  • A table from a logger no other reader knows is read by the units its header states (generic). Each unit is held to the column’s name and values. The caller can give a column mapping instead.
  • A team flight computer’s binary records are read by a layout the caller states. They come from a raw file (records) or a serial console’s capture of them as base64 (capture).
  • A mapping or a layout can come from the JSON file a person writes for their own logger (custom). That’s how the command line and Python take them.
  • A zip archive of a flight’s files is unpacked in memory, within a bound, and each file is read on its own (archive).
  • An Excel workbook’s sheets are written out as text, each cell as the workbook stores it, and each sheet is read on its own (workbook).
  • An older Excel .xls worksheet’s cells are written out as text (xls). An AltiMAX altimeter’s export is one such worksheet (altimax).

readings takes a first set of readings from the record. They’re liftoff, apogee, the top speed and acceleration, burnout, landing, the flight time, and the descents under the drogue and the main. Each states the bound its error stays within. On the synthetic flights’ tuning set, logged from 500 to half a sample a second and in the other conditions readings lists, every reading given stayed within its bound. The guide’s reading a flight log page shows them on a log, and the layouts read lists what each reader keeps. The rest of the readings, smoothing and reconstruction are planned (the roadmap).

use hpr_flightdata::{perfectflite, readings};

// A few rows of an invented PerfectFlite log: feet and seconds.
let mut text = String::from("PerfectFlite Pnut\nData: (Time, Altitude, Velocity)\n");
for (i, feet) in [0, 0, 0, 40, 90, 120, 130, 130, 120, 90, 40, 5, 0, 0, 0, 0].iter().enumerate() {
    text.push_str(&format!("{}, {feet}, 0\n", i as f64 * 0.5));
}
let log = perfectflite::read(&text)?;
let read = readings::read(&log);
let apogee = read.apogee.value().expect("the log climbs");
assert_eq!(apogee.altitude_m, 130.0 * 0.3048);
assert_eq!(apogee.time_s, 3.25); // midway between the two samples at the top

Modules§

aerospacenu_fcb
AerospaceNU’s flight computer board’s CSV: the club’s table of a flight, one row per packet the board logged, under a header whose first name is empty.
aerospacenu_gs
AerospaceNU’s ground station’s text: the club’s flight computer board’s radio downlink, one packet a line, as the ground station parsed it.
altimax
Rocketronics’ AltiMAX altimeters: a flight as the AltiMAX PC software exports it to Excel, a bare .xls worksheet (xls) whose sheet reads as this table.
altimax_als
Rocketronics’ AltiMAX altimeters: a flight’s .ALS file, the samples as the altimeter stores them, before the PC software works heights and a speed out of them.
altimetercloud
Rocketry Ltd’s flight logs as CSV, as a flight page on altimetercloud.com hands them back: a Nano V1’s, or a Mercury’s.
altos
AltOS’s CSV flight logs, as AltosUI exports a TeleMetrum’s, TeleMega’s, EasyMega’s or EasyMini’s flight.
altos_eeprom
AltOS raw flight downloads, as AltosUI saves a flight computer’s memory to a .eeprom file: the board’s own log, record by record, in a JSON form or an older text form.
altos_telem
AltOS radio telemetry, as AltosUI saves the packets a TeleDongle hears to a .telem file: one TELEM line a packet, its bytes in hexadecimal.
altos_telem_csv
AltOS’s radio telemetry decoded to a table: one row a packet, under a header naming the packet’s fields, serial,tick,ptype,state,v_batt,…,height,crc.
archive
Zip archives of a flight’s files, as flyers share them: a Blue Raven’s high-rate and low-rate files with the app’s summary, or a folder of everything a flight left behind.
arts2
Ozark Aerospace’s ARTS2 flight computer’s interpreted data, as its software exports a flight: a # MET Acc Vel iAlt pAlt header, then comma-separated rows.
arts2_raw
Ozark Aerospace ARTS2 flight computer’s raw data: the .odf file its PC software, DataAnalyzer, saves a downloaded flight to, and the sensors’ counts as the software exports them to CSV.
blueraven
The Featherweight Blue Raven’s flight logs, as its phone app exports them to comma-separated files.
blueraven_usb
The Featherweight Blue Raven’s flight data as its USB port downloads it: one @ LOG_LOW or @ LOG_HIR line a sample, each closed by a CRC, as a terminal program saves them.
capture
A serial console’s capture holding binary records as base64: what a flight computer prints when asked, over its USB serial shell, to dump its memory, as a terminal program saves it.
custom
A flyer’s own logger, read by a column mapping or a record layout stated in a JSON file: what hpr analyze and the Python package take (ADR-276; M7.1d2, your own logger from the command line and Python).
eggtimer
An Eggtimer’s flight data, as the flight computer’s own download writes it: the Eggtimer Classic’s and TRS’s over a serial cable, the Quantum’s and Proton’s from their WiFi page.
entacore
Entacore’s AIM flight computers’ logs, as the AIM XTRA and AIM BASE software exports a flight with Export to Excel…: a CSV file (AIM XTRA/BASE v4.x.x Manual, Entacore, 2 February 2025, p38).
entacore_raw
Entacore AIM XTRA’s own files: a flight as the AIM software saves it to an .xtra file, and the flight computer’s memory as the software downloads it, raw, before any conversion.
error
Why a flight log couldn’t be read.
filter
Filters a flight log’s channels are cleaned with before a reading is taken from them.
fluctus
Silicdyne’s Fluctus flight computer’s logs, as its Fluctus Control Center (FCC) exports a flight: a sep=; line, then a semicolon-separated table with each column’s unit in its name.
fwgps
Featherweight’s GPS tracker logs, as the tracker’s app and its ground station write them to comma-separated files: positions from a GPS receiver, with no barometer.
fwsummary
Featherweight’s summary files, as the Featherweight UI app exports a Blue Raven’s or a GPS tracker’s flight beside its data: the figures the logger worked out about the flight, one a row, and no samples.
generic
A table of samples from a logger no other reader knows, read by what its header states: one header row naming the columns, the units in the names, then one row a sample. Or the same table read by a column mapping the caller gives, for a file whose header states too little or that has none.
ghost
Ghost files: a flight’s logs as time-synced trajectories in a frame at the pad, written as JSON, CZML (Cesium’s scene format) and glTF (an animated 3D scene), for a viewer to replay (M7.2g, ghost files; ADR-313).
gpx
GPX files, the GPS Exchange Format, holding the tracks a GPS receiver, a phone app or a mapping tool recorded, in version 1.0 or 1.1 of the format Topografix publishes.
import
One entry point for every format HPR Sim reads: give read a file’s bytes, and it recognizes the layout from the content, never the file’s name, and reads it into the record every reader fills (FlightLog).
kml
KML files holding a GPS track, as AltOS, Missile Works’ RTx, Big Red Bee’s BeeLine, fw2kml, GPS Visualizer and others write a flight’s path for Google Earth.
log
The flight record every log reader produces: a clock, the channels the logger recorded on it, and what the file states about itself.
marsa
A MARSA altimeter’s flight download: its settings, then a row a sample of the time, the barometric altitude and the acceleration, as MARSA Systems’ software saves it to a .dat file, or as a spreadsheet re-saves that file.
nmea
A GPS receiver’s NMEA 0183 sentences, as a logger writes them to a text file.
packets
One team’s radio telemetry packets, 255:…:254: the flight computer’s own log of them, the packets a receiver heard, and the same packets in an RTF document a spreadsheet saved as CSV.
perfectflite
PerfectFlite’s .pf2 flight logs, as its software writes a Pnut’s, a StratoLogger’s or a StratoLoggerCF’s flights, the CSV and text exports it writes of them (read_export), and the older .pfa of an Alt15K/WD’s flights (read_pfa). Every .pf2 and .pfa among the project’s sample logs reads, of all four models (cargo xtask logs).
phone_launch
A phone app’s launch….csv: one row a sample, from the phone’s GPS, accelerometer, gyroscope, magnetometer and, in the newer files, its barometer.
raven
The Featherweight Raven’s flight logs, as the Featherweight Interface Program (FIP) exports them to a comma-separated file.
raven_fipa
The Featherweight Raven’s raw downloads, .FIPa: the altimeter’s flash memory as the Featherweight Interface Program (FIP) saves it, before any export.
rdas
AED Electronics’ R-DAS flight computer’s raw data, as its Windows software exports a flight to text: a *** Configuration *** section, then *** Raw data *** and a table of the converters’ counts.
readings
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.
records
Binary records read by a layout the caller states: a team’s flight computer that writes each sample as a fixed run of bytes, such as a u32 clock in milliseconds then 24 f32 readings, with nothing in the file to say so.
rrc3
Missile Works’ RRC3 flight logs, as its mDACS software exports a flight to a CSV file.
rrc3_rff
Missile Works’ RRC3 raw flight files, .rff: what its mDACS software saves when it downloads a flight from the altimeter, before any export.
rtx
Missile Works’ RTx/GPS tracker: the .rtx file its base station’s software saves when it downloads the tracker’s fixes, and the CSV and text files the same software exports from it.
sillygoose
AerospaceNU’s SillyGoose flight computer’s logs, as the board writes them: text under a timestampMs header, one row per sample.
smoother
The smoother: a flight’s height and vertical speed at every sample, each with its standard error, from the barometer, the axial accelerometer and a GNSS receiver together, and a health card saying how each sensor fared (M7.2d).
teensy
A course’s Teensy data logger: one sensor’s reading a line, each line opening with the sensor’s tag and the logger’s clock in microseconds, in two layouts.
timeline
Two or more recordings of one flight on one timeline, read side by side and never averaged.
workbook
Excel workbooks, .xlsx: a flight’s log as a flyer saved it from a spreadsheet, one sheet or several, such as a Blue Raven’s high-rate and low-rate files side by side.
xls
Excel’s older binary format, .xls, as a bare worksheet stream: the records of one sheet, written on their own rather than inside the compound file Excel 97 and later save, as some loggers’ programs write their exports.