Closed wanysteus closed 4 years ago
From the datasheets (see README.md
in #13) :
We can work with only the raw data for some sensors but for others, we need to get the calibration data on the Ground Station somehow
When powered up, the OBC activates the telemetry transmitter and does a complete health check. This health check is (hopefully) received by the Ground Station. During this health check, the header and some calibration data is sent. Some status messages are also sent. For example "health check : OK" or "No response from IMU1".
Once this is complete, sensor readings are sent continuously.
The telemetry transmitter can be turned off and turned on again by the ground station. When it is turned on again, a full health check is performed.
Frames are separated by a newline (\n
) character
Just data from the sensors. This will be received very often -> Stored in a .csv
file
Frame structure:
#data1&data2&...&dataN
data.csv
:
# Header
TimeReception, Complete, TimeMeasurement, RawData1Sensor1, ..., RawDataNSensorM
# Data
ValueFrame1, True, ValueFrame1, ValueFrame1, ..., ValueFrame1
ValueFrame2, False, ValueFrame2, ValueFrame12 ..., MissingValue
...
Those contain the description of the data frame fields and calibration data from the sensors -> Calibration data stored in a .yaml
file and header stored on the first line of the above .csv
As those frames are needed to process the received data frames on the ground station, they should be sent on regular intervals (every few seconds). The ground station will wait for them to process the data
NB: The header content must be unambiguous and knowing it must be enough to know what data it is and how to convert it
Frame structure:
@header1&header2&...&headerN
(header)
%cal1:value1&cal2:value2&...&calM:valueM
(calibration)
calibration.yaml
:
BMP280_dig_T1: 27504
BMP280_dig_T2: 26435
...
NB: it is easy to parse a
.yaml
file as adict
in python with PyYAML
Those can contain error messages, events (like parachute deployment) -> Stored in a logging file
Frame structure:
$message
status.log
:
2019-10-03T14:17:25 Error : something bad happened
2019-10-03T14:17:36 Info : parachute deployed
...
Defined on the drive