33 PRINT_CONFIG_VAR(GL1_I2C_DEV)
36 #ifndef GL1_ACCEL_RATE
37 # if PERIODIC_FREQUENCY <= 60
38 # define GL1_ACCEL_RATE ADXL345_RATE_50HZ
39 # elif PERIODIC_FREQUENCY <= 120
40 # define GL1_ACCEL_RATE ADXL345_RATE_100HZ
42 # define GL1_ACCEL_RATE ADXL345_RATE_200HZ
48 #ifndef GL1_GYRO_LOWPASS
49 # if PERIODIC_FREQUENCY <= 60
50 # define GL1_GYRO_LOWPASS L3G4200_DLPF_1
51 # elif PERIODIC_FREQUENCY <= 120
52 # define GL1_GYRO_LOWPASS L3G4200_DLPF_2
54 # define GL1_GYRO_LOWPASS L3G4200_DLPF_3
60 #ifndef GL1_GYRO_SMPLRT
61 # if PERIODIC_FREQUENCY <= 60
62 # define GL1_GYRO_SMPLRT L3G4200_DR_100Hz
65 # define GL1_GYRO_SMPLRT L3G4200_DR_100Hz
72 # define L3G4200_SCALE GL1_GYRO_SCALE
74 # define L3G4200_SCALE L3G4200_SCALE_2000
void l3g4200_event(struct L3g4200 *l3g)
volatile bool data_available
data ready flag
#define GL1_GYRO_LOWPASS
gyro internal lowpass frequency
#define GL1_ACCEL_RATE
adxl345 accelerometer output rate, lowpass is set to half of rate
enum Adxl345Rates rate
Data Output Rate.
#define VECT3_COPY(_a, _b)
struct Adxl345_I2c acc_adxl
Main include for ABI (AirBorneInterface).
struct Imu imu
global IMU state
struct L3g4200Config config
void imu_gl1_periodic(void)
static void l3g4200_periodic(struct L3g4200 *l3g)
convenience function: read or start configuration if not already initialized
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 Adxl345Config config
static void adxl345_i2c_periodic(struct Adxl345_I2c *adxl)
convenience function: read or start configuration if not already initialized
void adxl345_i2c_event(struct Adxl345_I2c *adxl)
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.
void imu_scale_gyro(struct Imu *_imu)
void adxl345_i2c_init(struct Adxl345_I2c *adxl, struct i2c_periph *i2c_p, uint8_t addr)
void l3g4200_init(struct L3g4200 *l3g, struct i2c_periph *i2c_p, uint8_t addr)
Initialize L3g4200 struct and set default config options.
union Adxl345_I2c::@293 data
void imu_scale_mag(struct Imu *_imu)
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
int32_t p
in rad/s with INT32_RATE_FRAC
#define ADXL345_ADDR
default I2C address
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
#define GL1_GYRO_SMPLRT
gyro sample rate divider
void imu_scale_accel(struct Imu *_imu)
#define RATES_COPY(_a, _b)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
volatile bool data_available
data ready flag
void hmc58xx_event(struct Hmc58xx *hmc)
int32_t q
in rad/s with INT32_RATE_FRAC
volatile bool 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.