Expand description
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.
The ARTS2 reads an Analog Devices ADXL78 accelerometer, set for ±50 g, and a Motorola
MPXA4100A pressure sensor with its processor’s 10-bit converter, and records both at a rate
its owner sets (ARTS2 User Manual, V1.0.0, Ozark Aerospace, 2007, Appendix A, p. 16; p. 7).
Flight → Save As keeps a download as an .odf file (p. 14). The manual describes neither
the .odf’s bytes nor a raw export; what follows was worked out from the three flights among
the project’s sample logs that hold both, each beside the software’s interpreted export of the
same flight (crate::arts2), with no other program’s source read.
§The .odf
Little-endian throughout:
| Offset | Bytes | What |
|---|---|---|
| 0 | 4 + 9 | the length 9, then Ozark.odf |
| 13 | 20 | five 32-bit words, 3, 3, 1, 61 and 2 in every sample file; not read |
| 33 | 256 | the board’s settings and calibration (below) |
| 289 | 4 | the number of records, n |
| 293 | 12 | three 32-bit words, each the memory’s size in records; equal, and at least n |
| 305 | 8 n | the records |
305 + 8 n | 124 | the software’s own settings; not read |
A file whose length isn’t 305 + 8n + 124 is refused, as are three sizes that disagree or n
over them. Of the settings block, the reader takes three things, at these offsets within it:
- 10, a 16-bit word: the barometer’s count on the pad, the “Zero Altitude baseline” the board averages from 16 samples on entering flight mode (p. 17);
- 12, a 16-bit word: eight times the accelerometer’s count on the pad, its “Zero G baseline”, likewise averaged (p. 16), so that it keeps an eighth of a count;
- 20, 22 and 24, three 16-bit words: the sums of 64 accelerometer readings the board takes when calibrated on its side and on either end, “at +1g, −1g, and 0”, which “are sent along with flight data” (p. 16). In every sample file the middle one is the reading on its side.
And at 8, a 16-bit word that is 2 in every sample file, all recorded at 50 a second; a file whose word isn’t 2 is refused (the clock, below). Its other bytes, among them the two flight profiles’ deployment settings, aren’t decoded. Each record is four 16-bit words, in the order of the raw export’s columns (below): the accelerometer’s count, a byte of flags and low bits, the barometer’s count and the board’s state.
The first record is the baselines, not a sample: its barometer count is the pad’s, and its accelerometer count is the pad’s eighth-count baseline cut to a whole count. A file whose first record isn’t so is refused: its bytes are laid out otherwise than the sample files’. The software exports it as the flight’s first row, at time 0, and so does the reader.
The clock. The records are 0.02 s apart (50 a second), from the first: the rate DataAnalyzer
gives every sample file’s records in both its exports. The owner sets the rate, in each of the
board’s two flight profiles (pp. 6–7), and where the file keeps it isn’t known: the sample files
are all at one rate, so no byte can be shown to change with it. The reader fails closed on the
one candidate, the settings word at 8, small and the same in every sample file: a file whose
word isn’t 2 is refused. If the rate is kept elsewhere, a file recorded at another rate is
caught only by the climb check (below), loosely: a clock whose step is k times the true one
makes the climb by the acceleration k² times larger over the same records, so the check
passes a k from √(r / (5/3)) to √(r / 0.6), r the flight’s ratio on its true clock: 0.67
to 1.12 at the sample files’ least ratio, 0.754, and 0.83 to 1.38 at their greatest, 1.145.
Every record says so in a note.
Units.
| Record word | Column | Quantity | As read |
|---|---|---|---|
| 0 | Acc(HI) | Quantity::Acceleration, along the board’s long axis, toward its forward end, with the pad’s reading taken out | from the calibration (below) |
| 1 | Acc/Baro(LO) | Quantity::Unrecognized | the byte as written |
| 2 | Baro(HI) | Quantity::Pressure | by the sensor’s transfer function (below) |
| 3 | State | Quantity::Number | the byte as written |
The columns’ names are the raw export’s; the .odf names none.
The acceleration. The ±1 g sums are 2 g apart, so a g is a 128th of their difference, in
counts; the reading on the pad, nose up, lies near the end sum on the forward end’s side, which
sets the sign: a = ±(count − pad) / per_g × g₀. As the software’s interpreted export does,
the pad’s reading is taken out, so the acceleration on the pad reads zero, gravity with it.
That takes out gravity exactly only while the board points as it did on the pad: once the
rocket tips over in the coast, the reading runs below the acceleration along the axis by
g₀ (cos θ_pad − cos θ), θ the board’s angle from the vertical, up to a g. The first
record, the baselines’, reads the pad’s whole count less its eighth-count baseline, up to
7/8 of a count below zero, not zero. The
calibration is refused unless the ADXL78’s data sheet bears it out (ADXL78, Rev. B, Analog
Devices, 2010, Specifications, AD22280 for ±50 g, p. 3; the output is ratiometric to its
5 V supply, which the converter reads against, so a count is 5 V / 1,024): a g from 36.1 to
39.9 mV, 7.39 to 8.17 counts, and the side’s reading within ±150 mV of half the supply,
512 ± 30.72 counts, between the two end sums; and the pad’s reading nearer the end sum on its
side than the side’s, a tilt under 60°.
The pressure. P = (count / 1,024 + 0.1518) / 0.010 59 kPa, the sensor’s nominal transfer
function, V_out = V_S (0.010 59 P − 0.1518) (MPX4100A, Rev 9, Freescale, 2009, p. 5,
p. 6), read against the supply as the converter’s full scale. The pad’s count must give a
pressure in the sensor’s rated 20 to 105 kPa (p. 3). The sensor’s error band is ±1.5 kPa over
that range from 0 to 85 °C (p. 6).
The climb check is each unit’s second check, and the clock’s: over the first 2 s from the
first record, the climb by the pressure, its pressure altitude in the U.S. Standard
Atmosphere, 1976, at the window’s end (the median of the 5 records within 0.04 s of it) less
the pad’s, over the climb by the acceleration integrated twice by the trapezoid rule from rest
at the first record, must lie from 0.6 to 5/3, as for an AltOS raw download
(crate::altos_eeprom), and the rocket must climb by both. The window is twice AltOS’s 1 s:
one count of this barometer is 92 Pa, 7.7 m of height near sea level and more at a higher
site, so a 1 s window held two counts of one sample file’s climb; 2 s holds at least 10 in
each. A file whose climb
can’t be measured, or falls outside the band, is refused: its clock rests on that check as
much as its units do, and a count kept as written can’t be put on a clock nothing bears out.
The flags byte. Its bits 3 and 2 are the barometer count’s low two bits, in every record of
every sample file; a record whose aren’t is refused, a check that the record’s words are where
the reader takes them. Its other bits follow the flight (bits 5 and 4 set about the apogee,
bits 1 and 0 before the main’s), and bits 7 and 6 match the accelerometer count’s low two
bits in one sample file and in 57 to 62% of the others’ records, so the byte is kept as
written. So is State, which steps through 0, 1, 2, 3, 5, 6 and 7 in the flights in order;
no document names them, so no event is taken from it.
The primary track. The file holds no altitude, so FlightLog::time_s and
FlightLog::altitude_m are empty, as for the Raven’s raw .FIPa, and every word is a
channel. Stated::figures holds the two baselines and the three calibration sums.
§The raw CSV
The software’s raw export of the same records: a MET,Acc(HI),Acc/Baro(LO),Baro(HI),State
header, then a row for each record, its time and its four words as whole numbers:
MET,Acc(HI),Acc/Baro(LO),Baro(HI),State
0.000,512,1,780,64
0.020,575,1,780,0In every sample file its rows are its .odf’s records, one for one. Recognition: the first
line that isn’t blank is that header, its names compared as written. The file holds no
calibration, only the first record’s whole-count baselines, so no column is converted, and
MET, DataAnalyzer’s clock, is kept as the time:
| Column | Quantity | As read |
|---|---|---|
MET | the clock, s | as written; each greater than the row before’s |
Acc(HI), Baro(HI) | Quantity::Unrecognized | the converter’s counts, whole numbers 0 to 1,023, as written |
Acc/Baro(LO), State | Quantity::Unrecognized, Quantity::Number | whole numbers 0 to 255, as written |
Every row must hold five numbers, and its flags byte the barometer’s low bits as above, or the
file is refused, naming the line. Read the flight’s .odf for its values in units.
Constants§
- ALTITUDE_
STEP_ M - The barometer’s step, as the format’s resolution (
LogFormat::altitude_resolution_m): the files write no altitude, but the pressure moves by one count of the converter, 92.2 Pa (the transfer function’s slope, module docs), 7.68 m near sea level (Δh = Δp / (ρ₀ g₀)). Aloft it is larger.
Functions§
- read_
csv - Reads an ARTS2 raw CSV export.
- read_
odf - Reads an ARTS2
.odffile. - recognizes_
csv - Whether a file’s text is the raw CSV: its first line that isn’t blank is the header, its lines ending in CR, LF or both.
- recognizes_
odf - Whether a file’s bytes are an
.odf: they open with the length 9 andOzark.odf.