36 #include "generated/airframe.h"
43 #ifndef KROOZ_GYRO_RANGE
44 #define KROOZ_GYRO_RANGE MPU60X0_GYRO_RANGE_250
48 #if !defined IMU_GYRO_P_SENS & !defined IMU_GYRO_Q_SENS & !defined IMU_GYRO_R_SENS
49 #define IMU_GYRO_P_SENS MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]
50 #define IMU_GYRO_P_SENS_NUM MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]
51 #define IMU_GYRO_P_SENS_DEN MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]
52 #define IMU_GYRO_Q_SENS MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]
53 #define IMU_GYRO_Q_SENS_NUM MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]
54 #define IMU_GYRO_Q_SENS_DEN MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]
55 #define IMU_GYRO_R_SENS MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]
56 #define IMU_GYRO_R_SENS_NUM MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]
57 #define IMU_GYRO_R_SENS_DEN MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]
65 #if !defined IMU_ACCEL_X_SENS & !defined IMU_ACCEL_Y_SENS & !defined IMU_ACCEL_Z_SENS
67 #define IMU_ACCEL_X_SENS 0.9197
68 #define IMU_ACCEL_X_SENS_NUM 9197
69 #define IMU_ACCEL_X_SENS_DEN 10000
70 #define IMU_ACCEL_Y_SENS 0.9197
71 #define IMU_ACCEL_Y_SENS_NUM 9197
72 #define IMU_ACCEL_Y_SENS_DEN 10000
73 #define IMU_ACCEL_Z_SENS 0.9197
74 #define IMU_ACCEL_Z_SENS_NUM 9197
75 #define IMU_ACCEL_Z_SENS_DEN 10000
77 #if !defined IMU_ACCEL_X_NEUTRAL & !defined IMU_ACCEL_Y_NEUTRAL & !defined IMU_ACCEL_Z_NEUTRAL
78 #define IMU_ACCEL_X_NEUTRAL 32768
79 #define IMU_ACCEL_Y_NEUTRAL 32768
80 #define IMU_ACCEL_Z_NEUTRAL 32768
83 #ifndef IMU_KROOZ_ACCEL_AVG_FILTER
84 #define IMU_KROOZ_ACCEL_AVG_FILTER 15
110 #endif // IMU_KROOZ_H
struct Int32Vect3 accel_filtered
struct spi_transaction ad7689_trans
SPI transaction structure.
void imu_krooz_event(void)
struct Int32Rates rates_sum
void imu_krooz_periodic(void)
Architecture independent SPI (Serial Peripheral Interface) API.
volatile uint8_t ad7689_spi_rx_buffer[2]
void imu_krooz_init(void)
struct Uint8Vect3 meas_nb_acc
struct ImuKrooz imu_krooz
Inertial Measurement Unit interface.
Driver for the MPU-60X0 using I2C.
struct Int32Vect3 accel_sum
void imu_krooz_downlink_raw(void)
volatile uint8_t ad7689_spi_tx_buffer[2]