MRAS
Multi Rocket Avionics System
Loading...
Searching...
No Matches
RocketSDLogger.h
1//
2// Created by Tom Danvers on 10/02/2023.
3//
4
5#ifndef MRAS_ROCKETSDLOGGER_H
6#define MRAS_ROCKETSDLOGGER_H
7
8
9#include "SDLogger.h"
10#include "system_messages/TextLogMsg.h"
11#include "Vector.h"
12
16class RocketSDLogger : public SDLogger {
18
19 int8_t loop() override;
20
21 void on_message(SystemMessage *msg) override;
22
23 uint32_t last_log_entry = millis();
24 uint32_t last_flush = millis();
25
33 struct RocketDataLogPayload {
34 Vector<float, 3> accel = {};
35 Vector<float, 3> accel_high_G = {};
36 Vector<float, 3> gyro = {};
37 Vector<float, 3> mag = {};
38 float pressure = 0;
39 float temperature = 0;
40 float latitude = 0;
41 float longitude = 0;
42 float altitude = 0;
43 uint8_t fix_type = 0;
44 uint8_t SIV = 0;
45 float altitude_estimate = 0;
46 float velocity_estimate = 0;
47 } data;
48};
49
50
51#endif //MRAS_ROCKETSDLOGGER_H
Data logger for the rocket, uses the Teensy SD card to log CSV data and text logs to the same file.
Definition: RocketSDLogger.h:16
General SD logger class, used by both the ground and rocket SD loggers. This class is not intended to...
Definition: SDLogger.h:21
SDLogger(uint8_t id, uint8_t sdPin)
Construct a new SDLogger object.
Definition: SDLogger.h:29
A base class for all system messages.
Definition: SystemMessage.h:32