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
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define VECT3_ADD(_a, _b)
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)
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
union Mpu60x0_I2c::@41 data_accel
#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.
struct Int32Rates rates_sum
enum Mpu60x0GyroRanges gyro_range
deg/s Range
#define KROOZ_LOWPASS_FILTER
enum Mpu60x0AccelRanges accel_range
g Range
union Mpu60x0_I2c::@42 data_rates
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
void mpu60x0_i2c_read(struct Mpu60x0_I2c *mpu)
void imu_krooz_event(void)
static uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
bool_t initialized
config done flag
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
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
void hmc58xx_read(struct Hmc58xx *hmc)
struct Imu imu
global IMU state
#define VECT3_SDIV(_vo, _vi, _s)
void imu_impl_init(void)
must be defined by underlying hardware
bool_t initialized
config done flag
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
#define KROOZ_ACCEL_RANGE
volatile bool_t data_available
data ready flag
#define DefaultChannel
SITL.
Driver for the IMU on the KroozSD board.
struct Int32Vect3 accel_sum
void imu_periodic(void)
optional.
#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
void hmc58xx_event(struct Hmc58xx *hmc)
int32_t q
in rad/s with INT32_RATE_FRAC
volatile bool_t data_available
data ready flag
bool_t drdy_int_enable
Enable Data Ready Interrupt.
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
Architecture independent I2C (Inter-Integrated Circuit Bus) API.