45 #if !defined IMU_GYRO_P_CHAN & !defined IMU_GYRO_Q_CHAN & !defined IMU_GYRO_R_CHAN
46 #define IMU_GYRO_P_CHAN 3
47 #define IMU_GYRO_Q_CHAN 4
48 #define IMU_GYRO_R_CHAN 5
50 #if !defined IMU_ACCEL_X_CHAN & !defined IMU_ACCEL_Y_CHAN & !defined IMU_ACCEL_Z_CHAN
51 #define IMU_ACCEL_X_CHAN 0
52 #define IMU_ACCEL_Y_CHAN 1
53 #define IMU_ACCEL_Z_CHAN 2
55 #if !defined IMU_MAG_X_CHAN & !defined IMU_MAG_Y_CHAN & !defined IMU_MAG_Z_CHAN
56 #define IMU_MAG_X_CHAN 2
57 #define IMU_MAG_Y_CHAN 0
58 #define IMU_MAG_Z_CHAN 1
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
uint16_t max1168_values[MAX1168_NB_CHAN]
void imu_scale_gyro(struct Imu *_imu)
void imu_scale_accel(struct Imu *_imu)
Main include for ABI (AirBorneInterface).
void imu_hbmini_event(void)
static uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
int32_t r
in rad/s with INT32_RATE_FRAC
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
struct ImuHbmini imu_hbmini
void imu_hbmini_downlink_raw(void)
struct Imu imu
global IMU state
#define Max1168Periodic()
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
volatile bool_t data_available
data ready flag
#define DefaultChannel
SITL.
volatile uint8_t max1168_status
void imu_scale_mag(struct Imu *_imu)
#define MAX1168_DATA_AVAILABLE
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
void imu_impl_init(void)
must be defined by underlying hardware
Common code for AP and FBW telemetry.
int32_t p
in rad/s with INT32_RATE_FRAC
arch independent LED (Light Emitting Diodes) API
void hmc58xx_init(struct Hmc58xx *hmc, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Hmc58xx struct and set default config options.
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
void imu_periodic(void)
optional.
void hmc58xx_event(struct Hmc58xx *hmc)
int32_t q
in rad/s with INT32_RATE_FRAC
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
Architecture independent I2C (Inter-Integrated Circuit Bus) API.