Expand description
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.
MARSA Systems’ MARSA4 and MARSA54 flight computers share their firmware and their PC software,
MARSA_Connect (MARSA’s home page, 2011), which downloads a flight from the altimeter’s memory
and saves it to the computer (MARSA54L Flight Computer User Manual, V1.4, 2014, p. 18). No
document describes the file, so this reader takes the layout from the two sample files, and
the sample logs’ survey (cargo xtask logs) holds each unit to a check (ADR-274).
An invented download, cut short:
<BARO_ZERO 0> 790
<ACCEL_ZERO 0> 498
<LAUNCH TIME 0> 12000
<FIRMWARE VER> 26
<MARSA VERSION> 2
<CHAN 1>
<CHAN APOGEE OPTION> 1
<CHAN ALTITUDE SETTING> 500
-0.2,-58.1,-0.08
-0.1,-58.1,-0.08
0.0,-58.1,8.20
0.1,-29.0,8.65The settings. Each line before the samples is a setting, <NAME> value, or a section’s
heading, <NAME> alone, such as <CHAN 1>, which opens a pyro channel’s settings. Each setting
is a Figure of the record’s Stated::figures, named as the file names it, after its
section’s heading where it has one (CHAN 1, CHAN APOGEE OPTION); its value as written, and a
number of Quantity::Number where it is one, as no document gives the settings’ units. The
MARSA4 manual describes two: Baro0 and Accel0, the file’s BARO_ZERO and ACCEL_ZERO, are
“the A/D values of the ground barometric and sensor readings” (MARSA4 User Manual, Version
1.0, 2009, p. 17). FIRMWARE VER is the record’s FlightLog::firmware. A setting named twice
in one section is refused, as no reader could tell which value is the altimeter’s.
The samples. Each line after the settings is a sample: three numbers by commas, which no line names. They are read as the time, s, from the logger’s zero at liftoff; the barometric altitude, in feet, above the logger’s own zero; and the acceleration, in units of standard gravity, 9.806 65 m/s², its reading at rest taken out. MARSA’s manuals give the altitude in feet: the altimeter’s display reads “898 ft” in the MARSA54L manual’s example (p. 12), and its altitude events are set “in 100 ft increments”. The software plots “Baro altitude and acceleration” (MARSA4 manual, p. 18), the altitude “based on the barometric pressure according to the standard atmospheric model” (p. 16). The survey holds the units to the files: each file’s apogee against an AltOS flight computer’s in the same rocket, the feet’s check, and the barometric climb over the first seconds after liftoff against the acceleration integrated twice, the g’s.
- The altitude is
Quantity::AltitudeAboveGroundand the record’s primary track. It moves by its barometer’s count, not by the tenth of a foot it is written in, and it needn’t read 0 on the pad: the logger’s zero is its own (FlightLog::altitude_m), and in both sample files the pad reads several counts below it. The survey reports it. - The acceleration is
Quantity::Acceleration: it reads about 0 at rest, not 1 g, and so it is the rocket’s acceleration along its axis while the rocket points straight up, as AltOS’s is (crate::altos).
A sample’s time must be later than the one before, or the file is refused at its line: in both sample files the steps are a tenth of a second early in the flight and grow later. A last line the file ends in with no line end, which isn’t a whole sample, is dropped with a note: a download cut off as it was written.
A spreadsheet’s re-save. One sample file is a download a spreadsheet re-saved as CSV: each
setting’s line ends in two empty cells, <BARO_ZERO 0> 790,,, and the numbers are rewritten,
8.2 for 8.20. Empty cells at a line’s end are passed over, so both read the same.
Bounds. A file may hold at most MAX_SETTINGS settings and headings, a name
MAX_NAME_BYTES bytes and a value MAX_VALUE_CHARS characters; past them it is refused,
so a hostile file can’t make the record’s figures fill memory.
Constants§
- ALTITUDE_
STEP_ M - The altitude’s step, m: its barometer’s count, 29.3 ft at most within 300 ft of the pad among
the sample files (
LogFormat::altitude_resolution_m). It is measured there, not stated by any document, and holds near the pad only: a count of pressure spans more feet where the air is thinner, so the step is larger higher up. - MAX_
NAME_ BYTES - The longest name a setting may have, in bytes.
- MAX_
SETTINGS - The most settings and headings a file may hold.
- MAX_
VALUE_ CHARS - The longest value a setting may have, in characters.
Functions§
- read
- Reads a MARSA download from its text.
- recognizes
- Whether a text is a MARSA download: its first line that isn’t blank is a setting or a
heading, and one of its first 200 is the
<MARSA VERSION>setting with a value.