MRAS
Multi Rocket Avionics System
Loading...
Searching...
No Matches
TelemetryDataMsg.h
1
//
2
// Created by Tom Danvers on 04/02/2023.
3
//
4
5
#ifndef MRAS_TELEMETRYDATAMSG_H
6
#define MRAS_TELEMETRYDATAMSG_H
7
8
#include "TelemetryMessage.h"
9
#include <cstdint>
10
16
struct
TelemetryDataMsg
:
public
TelemetryMessage
{
17
TelemetryDataMsg
() :
TelemetryMessage
(TelemetryDataMsg_t) {}
18
19
float
latitude = 0;
20
float
longitude = 0;
21
uint16_t altitude = 0;
22
uint8_t fix_type = 0;
23
uint8_t satellites = 0;
24
float
y_acceleration = 0;
25
float
pressure = 0;
26
float
temperature = 0;
27
float
altitude_estimate = 0;
28
29
void
to_csv(
char
*buffer,
size_t
buffer_size)
const
{
30
snprintf(buffer, buffer_size,
"%f,%f,%d,%d,%d,%f,%f,%f,%f"
, latitude, longitude, altitude, fix_type, satellites,
31
y_acceleration, pressure, temperature, altitude_estimate);
32
}
33
};
34
35
#endif
//MRAS_TELEMETRYDATAMSG_H
TelemetryMessage
A base class for all telemetry messages.
Definition:
TelemetryMessage.h:39
TelemetryDataMsg
A message containing data from the rocket.
Definition:
TelemetryDataMsg.h:16
lib
shared
telemetry_messages
TelemetryDataMsg.h
Generated by
1.9.6