41 #ifndef IMU_APOGEE_CHAN_X
42 #define IMU_APOGEE_CHAN_X 0
44 #ifndef IMU_APOGEE_CHAN_Y
45 #define IMU_APOGEE_CHAN_Y 1
47 #ifndef IMU_APOGEE_CHAN_Z
48 #define IMU_APOGEE_CHAN_Z 2
51 #if !defined APOGEE_LOWPASS_FILTER && !defined APOGEE_SMPLRT_DIV
52 #define APOGEE_LOWPASS_FILTER MPU60X0_DLPF_42HZ
53 #define APOGEE_SMPLRT_DIV 9
59 #ifndef APOGEE_GYRO_RANGE
60 #define APOGEE_GYRO_RANGE MPU60X0_GYRO_RANGE_1000
64 #ifndef APOGEE_ACCEL_RANGE
65 #define APOGEE_ACCEL_RANGE MPU60X0_ACCEL_RANGE_8G
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
Driver for the IMU on the Apogee board.
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
void imu_scale_gyro(struct Imu *_imu)
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
void imu_scale_accel(struct Imu *_imu)
bool_t configure_baro_slave(Mpu60x0ConfigSet mpu_set, void *mpu)
struct Mpu60x0Config config
union Mpu60x0_I2c::@41 data_accel
#define VECT3_COPY(_a, _b)
Main include for ABI (AirBorneInterface).
uint8_t smplrt_div
Sample rate divider.
void imu_periodic(void)
optional.
enum Mpu60x0GyroRanges gyro_range
deg/s Range
#define APOGEE_GYRO_RANGE
enum Mpu60x0AccelRanges accel_range
g Range
union Mpu60x0_I2c::@42 data_rates
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
Mpu60x0I2cSlaveConfigure configure
static uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
void imu_impl_init(void)
must be defined by underlying hardware
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
#define IMU_APOGEE_CHAN_Y
struct Imu imu
global IMU state
uint8_t nb_slaves
number of used I2C slaves
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
#define APOGEE_LOWPASS_FILTER
void imu_apogee_event(void)
#define IMU_APOGEE_CHAN_Z
#define IMU_APOGEE_CHAN_X
struct Mpu60x0I2cSlave slaves[5]
I2C slaves.
bool_t i2c_bypass
Bypass MPU I2C.
#define DefaultChannel
SITL.
void imu_apogee_downlink_raw(void)
Common code for AP and FBW telemetry.
int32_t p
in rad/s with INT32_RATE_FRAC
arch independent LED (Light Emitting Diodes) API
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
static void mpu60x0_i2c_periodic(struct Mpu60x0_I2c *mpu)
convenience function: read or start configuration if not already initialized
#define APOGEE_ACCEL_RANGE
#define RATES_COPY(_a, _b)
int32_t q
in rad/s with INT32_RATE_FRAC
void(* Mpu60x0ConfigSet)(void *mpu, uint8_t _reg, uint8_t _val)
Configuration function prototype.
struct ImuApogee imu_apogee
volatile bool_t data_available
data ready flag
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
#define APOGEE_SMPLRT_DIV