27#include "generated/modules.h"
36#if IMU_PIXHAWK6X_REV == 8
52#if IMU_PIXHAWK6X_REV == 8
55 imu1.spi.p = &PIXHAWK6X_IMU1_SPI_DEV;
56 imu1.spi.slave_idx = PIXHAWK6X_IMU1_SPI_SLAVE_IDX;
72 imu1.spi.p = &PIXHAWK6X_IMU1_SPI_DEV;
73 imu1.spi.slave_idx = PIXHAWK6X_IMU1_SPI_SLAVE_IDX;
93#if IMU_PIXHAWK6X_REV == 8
96 imu2.spi.p = &PIXHAWK6X_IMU2_SPI_DEV;
97 imu2.spi.slave_idx = PIXHAWK6X_IMU2_SPI_SLAVE_IDX;
113 imu2.spi.p = &PIXHAWK6X_IMU2_SPI_DEV;
114 imu2.spi.slave_idx = PIXHAWK6X_IMU2_SPI_SLAVE_IDX;
121 imu2.accel_aaf = 213;
134#if IMU_PIXHAWK6X_REV == 8
137 imu3.spi.p = &PIXHAWK6X_IMU3_SPI_DEV;
138 imu3.spi.slave_idx = PIXHAWK6X_IMU3_SPI_SLAVE_IDX;
153 imu3.spi.p = &PIXHAWK6X_IMU3_SPI_DEV;
154 imu3.spi.slave_idx = PIXHAWK6X_IMU3_SPI_SLAVE_IDX;
173#if IMU_PIXHAWK6X_REV == 8
186#if IMU_PIXHAWK6X_REV == 8
Main include for ABI (AirBorneInterface).
int32_t phi
in rad with INT32_ANGLE_FRAC
int32_t psi
in rad with INT32_ANGLE_FRAC
int32_t theta
in rad with INT32_ANGLE_FRAC
#define ANGLE_BFP_OF_REAL(_af)
#define int32_rmat_of_eulers
Rotation matrix from Euler angles.
void imu_set_defaults_gyro(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Rates *neutral, const struct FloatRates *scale_f)
Set the defaults for a gyro sensor WARNING: Should be called before sensor is publishing messages to ...
void imu_set_defaults_accel(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Vect3 *neutral, const struct FloatVect3 *scale_f)
Set the defaults for a accel sensor WARNING: Should be called before sensor is publishing messages to...
Inertial Measurement Unit interface.
static struct Mpu60x0_Spi imu2
static struct invensense2_t imu3
static struct invensense2_t imu1
void imu_pixhawk6x_init(void)
void imu_pixhawk6x_event(void)
void imu_pixhawk6x_periodic(void)
void invensense2_event(struct invensense2_t *inv)
Should be called in the event thread.
void invensense2_periodic(struct invensense2_t *inv)
Should be called periodically to request sensor readings.
void invensense2_init(struct invensense2_t *inv)
Initialize the invensense v2 sensor instance.
Driver for the Invensense V2 IMUs ICM20948, ICM20648 and ICM20649.
@ INVENSENSE2_GYRO_DLPF_229HZ
@ INVENSENSE2_GYRO_RANGE_4000DPS
Only possible for ICM20649.
@ INVENSENSE2_ACCEL_RANGE_30G
Only possible for ICM20649.
@ INVENSENSE2_ACCEL_DLPF_265HZ
void invensense3_periodic(struct invensense3_t *inv)
Should be called periodically to request sensor readings.
void invensense3_event(struct invensense3_t *inv)
Should be called in the event thread.
void invensense3_init(struct invensense3_t *inv)
Initialize the invensense v3 sensor instance.
Driver for the Invensense V3 IMUs ICM40605, ICM40609, ICM42605, IIM42652 and ICM42688.
@ INVENSENSE3_ACCEL_RANGE_32G
Only possible for ICM40609.
@ INVENSENSE3_GYRO_ODR_4KHZ
@ INVENSENSE3_PARSER_FIFO
@ INVENSENSE3_ACCEL_ODR_4KHZ
@ INVENSENSE3_GYRO_RANGE_2000DPS
void invensense3_456_init(struct invensense3_456_t *inv)
Initialize the invensense v3 sensor instance.
void invensense3_456_event(struct invensense3_456_t *inv)
Should be called in the event thread.
void invensense3_456_periodic(struct invensense3_456_t *inv)
Should be called periodically to request sensor readings.
Driver for the Invensense 456XY IMUs:
@ INVENSENSE3_456_ODR_6_4KHZ
Architecture independent SPI (Serial Peripheral Interface) API.