41 #include "pprzlink/messages.h"
44 #if !defined KROOZ_LOWPASS_FILTER && !defined KROOZ_SMPLRT_DIV
45 #define KROOZ_LOWPASS_FILTER MPU60X0_DLPF_256HZ
46 #define KROOZ_SMPLRT_DIV 1
51 #ifndef KROOZ_GYRO_RANGE
52 #define KROOZ_GYRO_RANGE MPU60X0_GYRO_RANGE_250
56 #ifndef KROOZ_ACCEL_RANGE
57 #define KROOZ_ACCEL_RANGE MPU60X0_ACCEL_RANGE_2G
63 #if IMU_KROOZ_USE_ACCEL_MEDIAN_FILTER
83 #if IMU_KROOZ_USE_ACCEL_MEDIAN_FILTER
115 #if IMU_KROOZ_USE_ACCEL_MEDIAN_FILTER
struct Int32Vect3 accel_filtered
bool initialized
config done flag
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define VECT3_ADD(_a, _b)
volatile bool data_available
data ready flag
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
#define RATES_ADD(_a, _b)
void imu_scale_gyro(struct Imu *_imu)
void hmc58xx_start_configure(struct Hmc58xx *hmc)
bool initialized
config done flag
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
void imu_scale_accel(struct Imu *_imu)
struct Mpu60x0Config config
#define IMU_KROOZ_ACCEL_AVG_FILTER
#define VECT3_COPY(_a, _b)
void imu_krooz_sd_arch_init(void)
#define VECT3_ASSIGN(_a, _x, _y, _z)
#define RATES_ASSIGN(_ra, _p, _q, _r)
Main include for ABI (AirBorneInterface).
uint8_t smplrt_div
Sample rate divider.
union Mpu60x0_I2c::@312 data_accel
struct Int32Rates rates_sum
struct Imu imu
global IMU state
enum Mpu60x0GyroRanges gyro_range
deg/s Range
#define KROOZ_LOWPASS_FILTER
enum Mpu60x0AccelRanges accel_range
g Range
bool drdy_int_enable
Enable Data Ready Interrupt.
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
void mpu60x0_i2c_read(struct Mpu60x0_I2c *mpu)
void imu_krooz_event(void)
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
void imu_krooz_downlink_raw(void)
int32_t r
in rad/s with INT32_RATE_FRAC
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
union Mpu60x0_I2c::@313 data_rates
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
void imu_krooz_periodic(void)
void hmc58xx_read(struct Hmc58xx *hmc)
#define VECT3_SDIV(_vo, _vi, _s)
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
#define KROOZ_ACCEL_RANGE
void imu_krooz_init(void)
#define DefaultChannel
SITL.
Driver for the IMU on the KroozSD board.
struct Int32Vect3 accel_sum
#define VECT3_SMUL(_vo, _vi, _s)
struct ImuKrooz imu_krooz
struct MedianFilter3Int median_mag
void imu_scale_mag(struct Imu *_imu)
void mpu60x0_i2c_start_configure(struct Mpu60x0_I2c *mpu)
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
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
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
volatile bool data_available
data ready flag
Architecture independent I2C (Inter-Integrated Circuit Bus) API.