2025-08-18 15:49:27 -05:00
|
|
|
/*
|
|
|
|
|
* IMU.hpp
|
|
|
|
|
*
|
|
|
|
|
* Created on: Aug 17, 2025
|
|
|
|
|
* Author: jakoboberbuchner
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef AUTOPILOT_SHARED_DATA_IMU_HPP_
|
|
|
|
|
#define AUTOPILOT_SHARED_DATA_IMU_HPP_
|
|
|
|
|
|
|
|
|
|
|
2025-09-01 20:47:00 -05:00
|
|
|
#include "stdint.h"
|
|
|
|
|
#include "stdbool.h"
|
|
|
|
|
|
|
|
|
|
namespace IMU {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct Data {
|
|
|
|
|
|
|
|
|
|
int16_t acc_x = 0;
|
|
|
|
|
int16_t acc_y = 0;
|
|
|
|
|
int16_t acc_z = 0;
|
|
|
|
|
|
|
|
|
|
int16_t gyr_x = 0;
|
|
|
|
|
int16_t gyr_y = 0;
|
|
|
|
|
int16_t gyr_z = 0;
|
|
|
|
|
|
|
|
|
|
int16_t mag_x = 0;
|
|
|
|
|
int16_t mag_y = 0;
|
|
|
|
|
int16_t mag_z = 0;
|
|
|
|
|
|
|
|
|
|
bool isCallibrating = false;
|
|
|
|
|
};
|
|
|
|
|
//IMU uses SPI 1
|
|
|
|
|
//MAG uses I2C
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} //namespace IMU
|
|
|
|
|
|
2025-08-18 15:49:27 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* AUTOPILOT_SHARED_DATA_IMU_HPP_ */
|