|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
33 #ifndef BEBOP_MAG_I2C_DEV
34 #define BEBOP_MAG_I2C_DEV i2c1
38 #ifndef BEBOP_MPU_I2C_DEV
39 #define BEBOP_MPU_I2C_DEV i2c2
43 #if !defined BEBOP_LOWPASS_FILTER && !defined BEBOP_SMPLRT_DIV
44 #if (PERIODIC_FREQUENCY == 60) || (PERIODIC_FREQUENCY == 120)
48 #define BEBOP_LOWPASS_FILTER MPU60X0_DLPF_42HZ
49 #define BEBOP_SMPLRT_DIV 9
50 PRINT_CONFIG_MSG(
"Gyro/Accel output rate is 100Hz at 1kHz internal sampling")
51 #elif PERIODIC_FREQUENCY == 512
55 #define BEBOP_LOWPASS_FILTER MPU60X0_DLPF_256HZ
56 #define BEBOP_SMPLRT_DIV 3
60 PRINT_CONFIG_VAR(BEBOP_SMPLRT_DIV)
61 PRINT_CONFIG_VAR(BEBOP_LOWPASS_FILTER)
90 { 0.0, RadOfDeg(8.5), M_PI };
144 #else //BEBOP regular first verion
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
uint8_t smplrt_div
Sample rate divider.
#define BEBOP_MAG_I2C_DEV
static void mpu60x0_i2c_periodic(struct Mpu60x0_I2c *mpu)
convenience function: read or start configuration if not already initialized
void imu_bebop_event(void)
Handle all the events of the Navstik IMU components.
enum Mpu60x0GyroRanges gyro_range
deg/s Range
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
enum Mpu60x0AccelRanges accel_range
g Range
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
void ak8963_init(struct Ak8963 *ak, struct i2c_periph *i2c_p, uint8_t addr)
Initialize AK8963 struct.
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
#define RATES_ASSIGN(_ra, _p, _q, _r)
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
struct OrientationReps imu_to_mag_bebop
IMU to magneto rotation.
struct ImuBebop imu_bebop
Basic Navstik IMU data.
void imu_scale_gyro(struct Imu *_imu)
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
struct Ak8963 ak
The AK8963 mag.
static void orientationSetEulers_f(struct OrientationReps *orientation, struct FloatEulers *eulers)
Set vehicle body attitude from euler angles (float).
struct Mpu60x0Config config
struct Imu imu
global IMU state
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
void int32_rmat_vmult(struct Int32Vect3 *vb, struct Int32RMat *m_a2b, struct Int32Vect3 *va)
rotate 3D vector by rotation matrix.
void imu_bebop_periodic(void)
Handle all the periodic tasks of the Navstik IMU components.
static void ak8963_periodic(struct Ak8963 *ak)
convenience function: read or start configuration if not already initialized
union Mpu60x0_I2c::@331 data_accel
void imu_scale_mag(struct Imu *_imu)
union Mpu60x0_I2c::@332 data_rates
struct Mpu60x0_I2c mpu
The MPU gyro/accel device.
static struct Int32RMat * orientationGetRMat_i(struct OrientationReps *orientation)
Get vehicle body attitude rotation matrix (int).
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
void imu_bebop_init(void)
Navstik IMU initializtion of the MPU-60x0 and HMC58xx.
volatile bool data_available
data ready flag
Everything that is in the bebop IMU.
#define VECT3_ASSIGN(_a, _x, _y, _z)
volatile bool data_available
data ready flag
void imu_scale_accel(struct Imu *_imu)
#define BEBOP_ACCEL_RANGE
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
#define BEBOP_MPU_I2C_DEV
void ak8963_event(struct Ak8963 *ak)