Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the PPZUAV IMU. More...
#include "generated/airframe.h"
#include "subsystems/imu.h"
#include "peripherals/itg3200.h"
#include "peripherals/hmc58xx.h"
#include "peripherals/adxl345_i2c.h"
Go to the source code of this file.
Data Structures | |
struct | ImuPpzuav |
Macros | |
#define | IMU_GYRO_P_SENS 4.973 |
default gyro sensitivy and neutral from the datasheet ITG3200 has 14.375 LSB/(deg/s) sens = 1/14.375 * pi/180 * 2^INT32_RATE_FRAC sens = 1/14.375 * pi/180 * 4096 = 4.973126 More... | |
#define | IMU_GYRO_P_SENS_NUM 4973 |
#define | IMU_GYRO_P_SENS_DEN 1000 |
#define | IMU_GYRO_Q_SENS 4.973 |
#define | IMU_GYRO_Q_SENS_NUM 4973 |
#define | IMU_GYRO_Q_SENS_DEN 1000 |
#define | IMU_GYRO_R_SENS 4.973 |
#define | IMU_GYRO_R_SENS_NUM 4973 |
#define | IMU_GYRO_R_SENS_DEN 1000 |
#define | IMU_ACCEL_X_SENS 37.91 |
default accel sensitivy from the ADXL345 datasheet sensitivity of x & y axes depends on supply voltage: More... | |
#define | IMU_ACCEL_X_SENS_NUM 3791 |
#define | IMU_ACCEL_X_SENS_DEN 100 |
#define | IMU_ACCEL_Y_SENS 37.91 |
#define | IMU_ACCEL_Y_SENS_NUM 3791 |
#define | IMU_ACCEL_Y_SENS_DEN 100 |
#define | IMU_ACCEL_Z_SENS 39.24 |
#define | IMU_ACCEL_Z_SENS_NUM 3924 |
#define | IMU_ACCEL_Z_SENS_DEN 100 |
Functions | |
void | imu_ppzuav_init (void) |
void | imu_ppzuav_periodic (void) |
void | imu_ppzuav_event (void) |
Variables | |
struct ImuPpzuav | imu_ppzuav |
Driver for the PPZUAV IMU.
Interface and defaults for the PPZUAV IMU.
9DoM IMU with ITG-3200, ADXL345 and HMC5843, all via I2C.
Definition in file imu_ppzuav.h.
struct ImuPpzuav |
Definition at line 82 of file imu_ppzuav.h.
Data Fields | ||
---|---|---|
struct Adxl345_I2c | acc_adxl | |
struct Itg3200 | gyro_itg | |
struct Hmc58xx | mag_hmc |
#define IMU_ACCEL_X_SENS 37.91 |
default accel sensitivy from the ADXL345 datasheet sensitivity of x & y axes depends on supply voltage:
Definition at line 70 of file imu_ppzuav.h.
#define IMU_ACCEL_X_SENS_DEN 100 |
Definition at line 72 of file imu_ppzuav.h.
#define IMU_ACCEL_X_SENS_NUM 3791 |
Definition at line 71 of file imu_ppzuav.h.
#define IMU_ACCEL_Y_SENS 37.91 |
Definition at line 73 of file imu_ppzuav.h.
#define IMU_ACCEL_Y_SENS_DEN 100 |
Definition at line 75 of file imu_ppzuav.h.
#define IMU_ACCEL_Y_SENS_NUM 3791 |
Definition at line 74 of file imu_ppzuav.h.
#define IMU_ACCEL_Z_SENS 39.24 |
Definition at line 76 of file imu_ppzuav.h.
#define IMU_ACCEL_Z_SENS_DEN 100 |
Definition at line 78 of file imu_ppzuav.h.
#define IMU_ACCEL_Z_SENS_NUM 3924 |
Definition at line 77 of file imu_ppzuav.h.
#define IMU_GYRO_P_SENS 4.973 |
default gyro sensitivy and neutral from the datasheet ITG3200 has 14.375 LSB/(deg/s) sens = 1/14.375 * pi/180 * 2^INT32_RATE_FRAC sens = 1/14.375 * pi/180 * 4096 = 4.973126
Definition at line 48 of file imu_ppzuav.h.
#define IMU_GYRO_P_SENS_DEN 1000 |
Definition at line 50 of file imu_ppzuav.h.
#define IMU_GYRO_P_SENS_NUM 4973 |
Definition at line 49 of file imu_ppzuav.h.
#define IMU_GYRO_Q_SENS 4.973 |
Definition at line 51 of file imu_ppzuav.h.
#define IMU_GYRO_Q_SENS_DEN 1000 |
Definition at line 53 of file imu_ppzuav.h.
#define IMU_GYRO_Q_SENS_NUM 4973 |
Definition at line 52 of file imu_ppzuav.h.
#define IMU_GYRO_R_SENS 4.973 |
Definition at line 54 of file imu_ppzuav.h.
#define IMU_GYRO_R_SENS_DEN 1000 |
Definition at line 56 of file imu_ppzuav.h.
#define IMU_GYRO_R_SENS_NUM 4973 |
Definition at line 55 of file imu_ppzuav.h.
void imu_ppzuav_event | ( | void | ) |
Definition at line 112 of file imu_ppzuav.c.
References ImuPpzuav::acc_adxl, Imu::accel, Imu::accel_unscaled, adxl345_i2c_event(), Adxl345_I2c::data, Hmc58xx::data, Itg3200::data, Adxl345_I2c::data_available, Hmc58xx::data_available, Itg3200::data_available, get_sys_time_usec(), Imu::gyro, ImuPpzuav::gyro_itg, Imu::gyro_unscaled, hmc58xx_event(), imu, imu_ppzuav, IMU_PPZUAV_ID, imu_scale_accel(), imu_scale_gyro(), imu_scale_mag(), itg3200_event(), Imu::mag, ImuPpzuav::mag_hmc, Imu::mag_unscaled, Int32Rates::p, Int32Rates::q, Int32Rates::r, Int32Vect3::x, Int32Vect3::y, and Int32Vect3::z.
void imu_ppzuav_init | ( | void | ) |
Definition at line 81 of file imu_ppzuav.c.
References ImuPpzuav::acc_adxl, ADXL345_ADDR, adxl345_i2c_init(), Adxl345_I2c::config, Itg3200::config, Itg3200Config::dlpf_cfg, ImuPpzuav::gyro_itg, HMC58XX_ADDR, hmc58xx_init(), HMC_TYPE_5843, IMU_PPZUAV_ACCEL_RATE, IMU_PPZUAV_GYRO_LOWPASS, IMU_PPZUAV_GYRO_SMPLRT_DIV, IMU_PPZUAV_I2C_DEV, ITG3200_ADDR, itg3200_init(), ImuPpzuav::mag_hmc, Adxl345Config::rate, Itg3200Config::smplrt_div, and Hmc58xx::type.
void imu_ppzuav_periodic | ( | void | ) |
Definition at line 101 of file imu_ppzuav.c.
References ImuPpzuav::acc_adxl, adxl345_i2c_periodic(), ImuPpzuav::gyro_itg, hmc58xx_periodic(), imu_ppzuav, itg3200_periodic(), and ImuPpzuav::mag_hmc.
struct ImuPpzuav imu_ppzuav |
Definition at line 79 of file imu_ppzuav.c.
Referenced by imu_ppzuav_event(), and imu_ppzuav_periodic().