33 #ifndef NAVSTIK_MAG_I2C_DEV
34 #define NAVSTIK_MAG_I2C_DEV i2c3
38 #ifndef NAVSTIK_MPU_I2C_DEV
39 #define NAVSTIK_MPU_I2C_DEV i2c1
43 #if !defined NAVSTIK_LOWPASS_FILTER && !defined NAVSTIK_SMPLRT_DIV
44 #if (PERIODIC_FREQUENCY == 60) || (PERIODIC_FREQUENCY == 120)
48 #define NAVSTIK_LOWPASS_FILTER MPU60X0_DLPF_42HZ
49 #define NAVSTIK_SMPLRT_DIV 9
50 PRINT_CONFIG_MSG(
"Gyro/Accel output rate is 100Hz at 1kHz internal sampling")
51 #elif PERIODIC_FREQUENCY == 512
55 #define NAVSTIK_LOWPASS_FILTER MPU60X0_DLPF_256HZ
56 #define NAVSTIK_SMPLRT_DIV 3
60 PRINT_CONFIG_VAR(NAVSTIK_SMPLRT_DIV)
61 PRINT_CONFIG_VAR(NAVSTIK_LOWPASS_FILTER)
63 #ifndef NAVSTIK_GYRO_RANGE
64 #define NAVSTIK_GYRO_RANGE MPU60X0_GYRO_RANGE_1000
68 #ifndef NAVSTIK_ACCEL_RANGE
69 #define NAVSTIK_ACCEL_RANGE MPU60X0_ACCEL_RANGE_8G
void imu_navstik_event(void)
Handle all the events of the Navstik IMU components.
void imu_impl_init(void)
Navstik IMU initializtion of the MPU-60x0 and HMC58xx.
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)
struct Mpu60x0Config config
#define NAVSTIK_ACCEL_RANGE
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)
Handle all the periodic tasks of the Navstik IMU components.
enum Mpu60x0GyroRanges gyro_range
deg/s Range
#define NAVSTIK_MPU_I2C_DEV
enum Mpu60x0AccelRanges accel_range
g Range
union Mpu60x0_I2c::@42 data_rates
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
static uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
struct Imu imu
global IMU state
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
Inertial Measurement Unit interface.
volatile bool_t data_available
data ready flag
void imu_scale_mag(struct Imu *_imu)
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
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
static void mpu60x0_i2c_periodic(struct Mpu60x0_I2c *mpu)
convenience function: read or start configuration if not already initialized
#define RATES_COPY(_a, _b)
struct ImuNavstik imu_navstik
Basic Navstik IMU data.
void hmc58xx_event(struct Hmc58xx *hmc)
volatile bool_t data_available
data ready flag
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
#define NAVSTIK_MAG_I2C_DEV
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
#define NAVSTIK_GYRO_RANGE