Expand description
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.
The flight computer board (FCB) is a flight computer of Northeastern University’s rocketry
club, AerospaceNU, with two STMicroelectronics LSM9DS1 inertial units (each an accelerometer,
a gyroscope and a magnetometer), a high-g accelerometer, one or two barometers and a GPS. The
club publishes its flights’ logs, each board’s binary log beside a CSV its tools made from it
(AerospaceNU, rocket-flight-data, README.md, read 2026-10-12). This reader reads that CSV.
No published document describes the columns or their units, so each unit here comes from the
column’s name or from two checks the reader runs on the file’s values that agree, as below;
where they don’t, the column is kept as written. 20 such files are among the project’s sample
logs, under eight headers of 73 to 87 columns: the oldest open with timestamp_s, timestamp_ms,
the later ones with packetType, then one clock column or both; the 73-column layout, the
board’s second version (FCBV2), has one IMU and one barometer and adds servo columns. An
invented row of the 87-column layout, cut short:
,packetType,timestamp_ms,imu1_accel_x,imu1_accel_y,imu1_accel_z,imu1_gyro_x,…
1000,0,600000,0,0,1366,0,0,0,-310,1220,1405,2,2,1368,…Recognition. The first line that isn’t blank is a header whose first name is empty, the
club’s row-number column, and which names packetType, timestamp_ms or timestamp_s.
Names and cells are split at commas.
Columns. Each name the reader knows, what it is read as, and where its unit comes from;
every column but the clock is kept as a channel on the clock, under the file’s name. A column
the reader doesn’t know is kept as written, Quantity::Unrecognized, with a note (the first
20 such notes kept, the rest counted); a header naming a column twice, with an empty name past
the first, or with more than MAX_COLUMNS names is refused:
| Column | Quantity | Unit, and from where |
|---|---|---|
| the first, unnamed | Quantity::Number | the club’s row number, as written |
timestamp_ms, timestamp_s | the clock | milliseconds or seconds, from its spacing and the climb (below), whatever its name says; the other, if it holds only 0, is kept as written |
baro1_pres, baro2_pres, baro_pres_avg | Quantity::Pressure | atmospheres, × 101,325 Pa, from the size and the step (below) |
imu1_accel_*_real, imu2_accel_*_real | Quantity::Acceleration | m/s² or standard gravities, from the pad’s gravity and the sensor’s scale (below) |
imu_accel_*_avg | Quantity::Acceleration | the IMUs’ unit, from the pad’s gravity and the mean (below) |
high_g_accel_*_real | Quantity::Acceleration | as the IMUs’ scaled columns (below); kept as written in every sample file |
acc_x, acc_y, acc_z | Quantity::Acceleration | m/s² or standard gravities, from the pad’s gravity and the climb (below): the board’s own estimate, in axes the file doesn’t state |
imu1_gyro_*_real, imu2_gyro_*_real | Quantity::AngularRate | radians or degrees per second, from the board’s turning and the sensor’s scale (below) |
imu_gyro_*_avg | Quantity::AngularRate | the IMUs’ unit, from the turning and the mean (below) |
pos_z | Quantity::AltitudeAboveGround: the primary track | meters or feet, from the pressure’s climb and the accelerometer’s (below) |
baro_height, baroalt_agl, baro1_alt | Quantity::AltitudeAboveGround | as pos_z |
gps_alt | Quantity::GnssAltitude | meters or feet, from the pressure’s climb and the accelerometer’s at the GPS’s fresh fixes (below); a 0, the receiver’s mark for no fix, is a gap |
vel_z | Quantity::Speed, up positive: FlightLog::vertical_speed_m_s | m/s or ft/s, from pos_z and the accelerometer (below) |
gps_lat, gps_long | Quantity::Latitude, Quantity::Longitude | NMEA 0183’s degrees and minutes or degrees, from the latitudes’ and the longitudes’ ranges, where the file writes a negative value to show its hemisphere (below); a position (0, 0), no fix, is a gap |
gps_lat_mod, gps_long_mod | Quantity::Latitude, Quantity::Longitude | degrees, where they are gps_lat and gps_long, once decided, in degrees (below) |
dynamixel_degrees, dynamixel_degrees_1 | Quantity::Angle | degrees, from their names: a servo’s angle |
packetType, state, pyro_cont, pyro_status, trigger_status, gps_fix_quality, gps_sats_tracked, gps_hdop, q_x … q_w | Quantity::Number | codes, flags, counts, a dilution of precision and an attitude quaternion’s parts, as written: no published source gives the codes’ meanings |
imu1_accel_*, imu1_gyro_*, imu1_mag_*, the same of imu2, high_g_accel_* | Quantity::Unrecognized | a sensor’s raw counts, kept as written: the _real columns hold them scaled |
imu1_mag_*_real, imu2_mag_*_real, imu_mag_*_avg | Quantity::Unrecognized | kept as written: a magnetic field, a quantity HPR Sim doesn’t hold |
baro1_temp, baro2_temp, baro_temp_avg | Quantity::Unrecognized | kept as written: the names state no unit, and degrees Celsius and Fahrenheit both put the values within a barometer’s working −40 to 85 °C; no other column holds a temperature to tell them apart |
battery_voltage, battery_voltage_1, battery_voltage_2, dynamixel_length, dynamixel_length_1 | Quantity::Unrecognized | kept as written: the names state no unit and nothing in the file checks one |
heading, vtg, pos_x, pos_y, vel_x, vel_y | Quantity::Unrecognized | kept as written: the names state no unit, and in the sample files they hold only 0 but for one file’s vel_x |
Each unit a check decides gets a note saying on what evidence, and each column kept as written
a note saying why. Every decision rests on two checks that must agree and that the weather or
the flight can’t meet in the wrong unit; a check without enough data to tell decides nothing.
Most checks set a column against a physical mark (1 g at rest, a barometer’s whole pascals, a
sensor’s published sensitivity, the board’s turning) or against a column whose unit is already
decided (the pressure, an accelerometer). Some set a column against its siblings: the IMUs’
averages are checked against the IMUs’ scaled columns, vel_z against pos_z, and the GPS’s
_mod companions against gps_lat and gps_long; each such check counts only once the
sibling is read in a unit by its own two checks, so no counted check relates two columns that
share one unknown unit. The checks, with what they found in the 20 sample files:
- The pressures’ size and step. A pad lies 0.5 to 1.1 from sea level’s pressure in
atmospheres or bars, and far from it in pascals, hectopascals, kilopascals, psi or inches or
millimeters of mercury: the first check is the median of the first 10 rows’ values. The
board’s barometers read whole pascals, and the club divides them by 101,325; so the second
check is that each cell lies within a millionth of a step of a whole number of steps of
1/101,325, or of 1/202,650 for an average of two barometers, for every cell written to
enough decimals that its printing, at most half a unit in its last place, takes under half
that tolerance (at least 10 cells). In bars, a whole number of pascals over 100,000, the cells
miss the steps by up to half a step. A pressure on both grids or on neither is kept as
written. In the sample files 1,517 to 21,291 cells test per column and every barometer that
reads is in atmospheres;
baro_pres_avgtakes half steps where it averages two. One barometer reads 0 throughout and is kept as written. - The clock’s spacing and the climb. The board logs a row every 15 or 16 ms in flight and
about every 100 ms on the pad; the first check is that the rows’ median step, in the unit,
lies within 5 to 500 ms. The second integrates the first IMU’s raw accelerometer (else the
second’s), in its pad reading’s 1 g so that its counts’ unit divides out, along the pad
reading’s direction less gravity, from the launch (the first row of 3 g, the next two at 2
g) to the pressure’s apogee in the U.S. Standard Atmosphere, 1976 (
hpr_atmos::ussa76); the median, over the rows past 30 m, of the pressure’s climb over the integrated one must lie within a factor of 10 of 1. Seconds read as milliseconds, or the reverse, put it 10⁶ off. The unit both checks bear out is taken; with none, or two, the file is refused (LogError::Unit): nothing in it has a time. Either clock column can hold either unit: in six sample filestimestamp_sholds milliseconds, in two seconds, and in the other twelvetimestamp_msholds milliseconds; the ratio is 0.57 to 1.15 in milliseconds, and 0.83 and 3.26 in the two in seconds. - The pad’s gravity and the sensor’s scale. A board at rest reads 1 g: the magnitude of the
three axes’ pad readings within 10% of 9.806 65 in m/s² or of 1 in standard gravities is the
first check. The second: each scaled column is its raw counts times one factor (within a
millionth), and that factor is, in the unit, one of the LSM9DS1’s accelerometer
sensitivities, 0.061, 0.122, 0.244 or 0.732 mg a count (LSM9DS1, STMicroelectronics,
DocID025715 Rev 3, 2015, Table 3,
LA_So). The reader never rescales by a factor it infers. In the sample files the factor is 0.732 mg in m/s² throughout, and the IMUs read 9.11 to 9.97 at rest, but for the FCBV2’s, which reads 14.7 (1.5 g: its counts are another part’s), four whose second IMU reads 0.27 to 0.54, and one second IMU that reads 0; these are kept as written. The high-g accelerometer’s factor, 0.029 42, is none of the LSM9DS1’s, so it is kept as written in every file. - The IMUs’ average.
imu_accel_*_avgmust read 1 g at rest in the unit of the IMUs’ scaled columns, all of which must be read in it, and be their mean at every row, within a millionth. Where an IMU is kept as written, so is the average; in the sample files, where one IMU reads near 0, the average reads half of 1 g. - The board’s estimate
acc_*. Its pad reading must be 1 g within 10%, and the pressure’s climb over the one it integrates to, as the clock’s check but read in the unit, must lie within a factor of 1.8 of 1 in that unit and in no other; read in the wrong one, the specific force is 9.8 times too large or too small against the gravity taken off it. In the sample files it reads 9.11 to 9.97 at rest and the ratio is 0.74 to 1.10, in m/s². - The board’s turning and the gyroscope’s scale. As
crate::sillygoosemakes the turning check: over stretches of 10 steps at most 0.05 s apart with the raw accelerometer within 15% of 1 g, the angle its direction turns against the gyroscope’s turn across that direction, |ω × â| dt; the unit, radians or degrees per second, whose turn lies within a quarter to 4 times the accelerometer’s, from at least 3 stretches and 0.2 rad. The second check: the scaled columns are their raw counts times one factor, one of the LSM9DS1’s gyroscope sensitivities, 8.75, 17.5 or 70 m°/s a count (Table 3,G_So), in the unit. In the sample files the factor is 17.5 or 70 m°/s in rad/s, and the turning ratio 0.54 to 2.34 where it is read; one file’s is 6.6 and 8.4, and two have no stretches to check, so those are kept as written.imu_gyro_*_avgmust bear the IMUs’ unit out by the turning and be their mean. - The climbs:
pos_z,baro_height,baroalt_agl,baro1_alt. First, the column’s climb from its pad reading to its highest (its 5-row running median) over the pressure’s, which must be at least 30 m, must lie within 25% of 1 in meters or in feet. Second, its climb over the one the accelerometer integrates to, as above, with the first ofacc_*, the IMUs’ scaled columns and their average read in a unit, must lie within a factor of 1.8 of 1: 1.8² = 3.24 is under the 3.28 between meters and feet. The pressure and the accelerometer are decided by their own checks above, so neither shares the column’s unknown unit. In the sample filespos_zis read in meters in every file, its gain 0.90 to 1.21 and its ratio 0.82 to 1.11. gps_alt. A receiver may write 0, or hold an old value, until its first fix, so a pad reading taken from the first rows can be no altitude at all: subtracted from the climb, a pad of 0 at a site 1,000 m up would inflate both checks above alike. So the GPS’s checks use only its fresh fixes, the rows past the first where it holds a number other than 0 that differs from the row before’s, and each fits its own line with a free offset, so that no pad reading enters either. First, the line’s slope on the pressure’s climb, at the fresh fixes up to the apogee, at least 3 over at least 30 m of climb, must lie within 25% of 1 in meters or in feet. Second, its slope on the climb the accelerometer integrates to, as above, at the fresh fixes from the launch, at least 5 over at least 30 m, must lie within a factor of 1.8. Where the first rows hold a number other than 0, their median, the pad reading, must lie within a quarter of the GPS’s rise over the fixes of where the first line puts the pad: a value further off is one held from before the first fix, and the column is kept as written, as a pad that far off would move a gain taken through it by more than its whole 25% margin. Where the column is read, each 0 is a gap, counted in a note. In the sample files every GPS altitude but one that reads 0 throughout holds a number other than 0 from the first row;gps_altis read in meters in 12, its gains 0.91 to 1.10 and its ratios 0.86 to 1.39, its pad reading within 6% of its rise of where the line puts the pad, and kept as written in 8, where it reads 0, has too few fresh fixes, or climbs far short of the pressure or the accelerometer.vel_z. First, over the steps at most 0.05 s long, the least-squares slope ofpos_z’s change, in meters, onvel_ztimes the step must lie within 25% of 1 in m/s or of 0.3048 in ft/s, from at least 10 m of movement. Second, the median, over the rows past 10 m/s, of it over the speed the accelerometer integrates to must lie within a factor of 1.8. In the sample files the slope is 0.92 to 1.00 and the ratio 0.80 to 1.24 in m/s; one file’svel_zreads 0 throughout and one’s slope is 0.59, kept as written.- The GPS position. NMEA 0183’s degrees and minutes write a latitude of 42.5° as 4230.0, so
they put every latitude more than 1° from the equator past 90 and every longitude more than
2° from the prime meridian past 180, which no degrees reach. The checks take only the fixes:
a position (0, 0) is the receiver’s mark for none, and where the position is read it is a gap,
counted in a note. Degrees and minutes: most latitudes pass ±90 and, a second check on
another measurement, most longitudes pass ±180; every value’s last two digits before the
point, its minutes, are under 60; and converted, every latitude lies within ±90 and every
longitude within ±180. “Most” keeps one corrupt fix from deciding a file. Degrees: every
latitude lies within ±90 and, the second check, every longitude within ±180, which in
degrees and minutes would put the place within 1° of the equator and 2° of the prime meridian
at once, at sea in the Gulf of Guinea. Otherwise both are kept as written.
gps_lat_modandgps_long_modcount in neither decision: they are read in degrees only wheregps_latandgps_longare read and, at every fix, they hold them in degrees within a millionth (converted from degrees and minutes, or as written), and are kept as written otherwise. In the sample files 15 positions are read in degrees and minutes, every fix past ±90 and ±180, and their companions in degrees; 4 in degrees, every fix within, whose companions in 3 hold the values converted as if they were degrees and minutes, and are kept, and in 1 copy them, and are read; in one the GPS reads 0 throughout. - The GPS hemisphere. NMEA 0183 writes the hemisphere in a field of its own beside each
coordinate (N or S, E or W); the board’s columns have no such field, so the sign is all
that can carry it. A file that writes a negative value in
gps_latorgps_longshows its signs, and the position is read by the checks above, each coordinate with its sign. Where every value in both is 0 or more, a place south of the equator or west of the prime meridian can’t be told from its mirror north or east, so both, and their companions, are kept as written, with a note giving how the checks above would read them, so that a person who knows the site can sign them; no hemisphere is guessed from anything else. In the sample files every one of the 19 with a fix writes its longitudes negative, west, and its latitudes positive, and is read; none is kept for want of a hemisphere.
The primary track. The record’s altitude is pos_z, the board’s filtered altitude above
the pad, where it is read in a unit; otherwise the track is empty and a note says so, as no
other column is the board’s altitude above the pad in a decided unit. The vertical speed is
vel_z where it is read. The track takes the rows in time order, the first at each time,
leaving out a row without a time; a note counts those put in order or left out, and the
channels keep every row in the file’s order. Where pos_z reads more than 100 m off zero at
the track’s first row, a note says so. No temperature or battery voltage is the record’s, as
none is read in a unit. Events: none. state is the board’s state code, a
Quantity::Number; its codes’ meanings aren’t published, so no event is drawn from it.
Cells. An empty cell, or one that isn’t a number, is a gap (NaN), counted in a note. A
value too large to hold once converted to its unit, such as an acceleration of 1.7 × 10³⁰⁸ in
standard gravities or of 1.7 × 10³⁰⁸ atmospheres, is refused, naming its line. A row with
fewer cells than the header names has the rest as gaps, counted in a note; a row with more is
refused, naming its line, as is a file whose rows hold under a quarter of the cells the header
names (past the first 65,536), so that a short file can’t make the reader store far more gaps
than it writes cells. Lines may end in CR, LF or both, blank lines are skipped, and a
byte-order mark is dropped.
Constants§
- ALTITUDE_
STEP_ M - The barometric altitude’s step, m (
crate::log::LogFormat::altitude_resolution_m): the track is the board’s altitude estimatepos_z, written to 15 or more digits, but the barometer it rests on reads whole pascals (its pressure is a whole number of pascals over 101,325, below), and one pascal is1 / (ρ₀ g₀)= 0.083 m of altitude near sea level, with the International Standard Atmosphere’s ρ₀ = 1.225 kg/m³ (ISO 2533:1975) and g₀ = 9.806 65 m/s². - MAX_
COLUMNS - The most names a header may have: the board’s files have 73 to 87.
Functions§
- read
- Reads the board’s CSV.
- recognizes
- Whether the text is the board’s CSV: a header row whose first cell is empty and that names
packetTypeor atimestamp_msortimestamp_scolumn.