Expand description
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.
A university team’s flight computer writes each reading as a packet framed by 255 and 254,
and sends the packets over its radio. The team published, for one flight, four files of them:
the flight computer’s own log, the text a ground receiver wrote of what it heard, and two
exports of the log, cut to the flight, saved as RTF documents and then as CSV. No document
describes the packets, so this reader takes them from the files, and the sample logs’ survey
(cargo xtask logs) holds the reading to the files: every packet the receiver or an export
holds that the onboard log also holds, by its stage, kind and clock, matches the log’s field
for field (ADR-274).
A packet is fields separated by colons, or by commas in the exports:
255:T:11:PP:100150:950.12:21.50:3.25:254
255:T:11:AA:100152:9.70:0.40:-0.80:254
255:T:11:CC:100160:1.25:-0.50:14.00:2.50:254
255:N:88:GG:100200:1.00:2.00:1234.56:9876.54:8.00:250.00:90.00:0.50:254| Field | Read as |
|---|---|
255 | the packet’s start |
T | the path it came by, one capital letter: T from the flight computer, N relayed by a second transmitter, which also sends the GPS packets |
11 | two digits: the flight computer’s stage of the flight, 00 to 55 in the samples, or 88 on a GPS packet |
PP | its kind, two capital letters |
100150 | the clock, ms, a whole number: the flight computer’s, or on stage 88 the relaying transmitter’s own |
| the values | numbers, as many as the kind’s first packet holds |
254 | the packet’s end |
The path, the stages’ meanings and the GPS packets are inferred from the files: no document
confirms them. Each kind is a set of channels on its own clock, named by the kind and the
value’s place from 1, such as PP 1, and the kind’s stage field is its own channel, PP stage.
A kind whose first packet is on stage 88, the GPS packets in the samples, runs on the relaying
transmitter’s own clock, whose offset from the flight computer’s nothing states: its times are
gaps (NaN) and its clock is kept as
written, ms, in a channel of its own, GG clock. A packet of the kind on another stage than its
first’s, or the reverse, is broken. The clock is read
as milliseconds, the survey holding it to the flight: the time from liftoff (the first packet,
after the pad’s stage 00, whose pressure is more than 1 hPa below the median of the 5 s ending
1 s before it) to the least pressure is 1.055 times √(2h/g), h the standard atmosphere’s height
of the two pressures, where the check allows a factor of 2. PP 1 is read as a pressure in
hectopascals, Quantity::Pressure, the survey holding its pad reading between 500 and 1,100
hPa, where every launch site’s is; the rest is kept as written, Quantity::Unrecognized, as
nothing states its unit. Among them, PP 3 climbs with the flight, but where it reads above 200 it is 1.11 to 1.24 times
the standard atmosphere’s height of the pressure above the pad’s in meters, by the survey, so no
unit is settled for it.
Lines that aren’t packets. A Stage line, Stage and a number’s word from One to Nine,
such as Stage Two, is an event at the clock of the next packet; one heard again is a repeat. The onboard log opens with a whole number and Gain[0]: … lines, its filter’s
gains, which a note counts. Any other line is broken, a packet the radio cut or ran into the next:
the receiver’s text holds many. A broken line is dropped, and a note counts them; so is a
packet heard again, the same stage, kind, clock and values as written as one already read, by
either path.
A packet whose kind has another count of values than its first packet is broken.
The exports (LogFormat::RadioPacketRtf) are an RTF document whose lines a spreadsheet
split at the colons and saved as CSV, so each line has commas after it, the document’s markup
sits in the first cells, and a \ ends a line where the document broke it. The reader takes each
line on its own: the commas after it dropped, then the control words before a packet, such as
\f0\fs24 \cf0 , a \ ending the line, and the } closing the document at its end. A line
of markup alone is dropped.
What refuses the file. No packet at all (LogError::Syntax); more than MAX_KINDS
kinds, more than MAX_VALUES values in a packet, a clock of 2³² ms, 49.7 days, or more, or a
PP 1 too large for its conversion to pascals.
The record has no barometric track, as no packet states an altitude above the pad in a settled
unit: FlightLog::time_s and FlightLog::altitude_m are empty, and every value is a channel.
Constants§
- MAX_
KINDS - The most kinds a file may hold, eight times the sample files’ four.
- MAX_
VALUES - The most values a packet may hold, four times the sample files’ eight.
Functions§
- read
- Reads the packets’ text form,
LogFormat::RadioPacketText: the onboard log, or the text a receiver wrote of what it heard. - read_
rtf - Reads the exports’ form,
LogFormat::RadioPacketRtf.