|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
39 #if !defined DROTEK_2_LOWPASS_FILTER && !defined DROTEK_2_SMPLRT_DIV
40 #if (PERIODIC_FREQUENCY == 60) || (PERIODIC_FREQUENCY == 120)
44 #define DROTEK_2_LOWPASS_FILTER MPU60X0_DLPF_42HZ
45 #define DROTEK_2_SMPLRT_DIV 9
46 PRINT_CONFIG_MSG(
"Gyro/Accel output rate is 100Hz at 1kHz internal sampling")
47 #elif PERIODIC_FREQUENCY == 512
51 #define DROTEK_2_LOWPASS_FILTER MPU60X0_DLPF_256HZ
52 #define DROTEK_2_SMPLRT_DIV 3
56 PRINT_CONFIG_VAR(DROTEK_2_SMPLRT_DIV)
57 PRINT_CONFIG_VAR(DROTEK_2_LOWPASS_FILTER)
62 #ifndef DROTEK_2_MPU_I2C_ADDR
63 #define DROTEK_2_MPU_I2C_ADDR MPU60X0_ADDR_ALT
67 #ifndef DROTEK_2_HMC_I2C_ADDR
68 #define DROTEK_2_HMC_I2C_ADDR HMC58XX_ADDR
118 #if IMU_DROTEK_2_ORIENTATION_IC_UP
142 #if IMU_DROTEK_2_ORIENTATION_IC_UP
159 void *
mpu __attribute__((unused)))
void imu_drotek2_event(void)
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
uint8_t smplrt_div
Sample rate divider.
#define DROTEK_2_ACCEL_RANGE
void hmc58xx_start_configure(struct Hmc58xx *hmc)
static void mpu60x0_i2c_periodic(struct Mpu60x0_I2c *mpu)
convenience function: read or start configuration if not already initialized
void hmc58xx_event(struct Hmc58xx *hmc)
enum Mpu60x0GyroRanges gyro_range
deg/s Range
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
struct Mpu60x0_I2c mpu
The MPU gyro/accel device.
int32_t q
in rad/s with INT32_RATE_FRAC
enum Mpu60x0AccelRanges accel_range
g Range
void imu_drotek2_init(void)
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
#define DROTEK_2_GYRO_RANGE
void(* Mpu60x0ConfigSet)(void *mpu, uint8_t _reg, uint8_t _val)
Configuration function prototype.
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
int32_t p
in rad/s with INT32_RATE_FRAC
Mpu60x0I2cSlaveConfigure configure
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
void imu_scale_gyro(struct Imu *_imu)
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
#define DROTEK_2_MPU_I2C_ADDR
void hmc58xx_read(struct Hmc58xx *hmc)
struct Mpu60x0Config config
struct ImuDrotek2 imu_drotek2
struct Imu imu
global IMU state
uint8_t nb_slaves
number of used I2C slaves
void hmc58xx_init(struct Hmc58xx *hmc, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Hmc58xx struct and set default config options.
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
bool i2c_bypass
Bypass MPU I2C.
union Mpu60x0_I2c::@331 data_accel
void imu_drotek2_periodic(void)
void imu_scale_mag(struct Imu *_imu)
struct Mpu60x0I2cSlave slaves[MPU60X0_I2C_NB_SLAVES]
I2C slaves.
#define DROTEK_2_HMC_I2C_ADDR
union Mpu60x0_I2c::@332 data_rates
bool imu_drotek2_configure_mag_slave(Mpu60x0ConfigSet mpu_set, void *mpu)
callback function to configure hmc5883 mag
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
volatile bool data_available
data ready flag
#define RATES_COPY(_a, _b)
volatile bool data_available
data ready flag
int32_t r
in rad/s with INT32_RATE_FRAC
void imu_scale_accel(struct Imu *_imu)
bool initialized
config done flag
#define VECT3_COPY(_a, _b)
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
bool initialized
config done flag