Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
imu_ppzuav.h File Reference
#include "generated/airframe.h"
#include "subsystems/imu.h"
#include "peripherals/itg3200.h"
#include "peripherals/hmc58xx.h"
#include "peripherals/adxl345_i2c.h"
+ Include dependency graph for imu_ppzuav.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
 

Detailed Description

Driver for the PPZUAV IMU.

9DoM IMU with ITG-3200, ADXL345 and HMC5843, all via I2C.

Interface and defaults for the PPZUAV IMU.

9DoM IMU with ITG-3200, ADXL345 and HMC5843, all via I2C.

Definition in file imu_ppzuav.h.


Data Structure Documentation

◆ ImuPpzuav

struct ImuPpzuav

Definition at line 82 of file imu_ppzuav.h.

+ Collaboration diagram for ImuPpzuav:
Data Fields
struct Adxl345_I2c acc_adxl
struct Itg3200 gyro_itg
struct Hmc58xx mag_hmc

Macro Definition Documentation

◆ IMU_ACCEL_X_SENS

#define IMU_ACCEL_X_SENS   37.91

default accel sensitivy from the ADXL345 datasheet sensitivity of x & y axes depends on supply voltage:

  • 256 LSB/g @ 2.5V
  • 265 LSB/g @ 3.3V z sensitivity stays at 256 LSB/g fixed point sens: 9.81 [m/s^2] / 256 [LSB/g] * 2^INT32_ACCEL_FRAC x/y sens = 9.81 / 265 * 1024 = 37.91 z sens = 9.81 / 256 * 1024 = 39.24

Definition at line 70 of file imu_ppzuav.h.

◆ IMU_ACCEL_X_SENS_DEN

#define IMU_ACCEL_X_SENS_DEN   100

Definition at line 72 of file imu_ppzuav.h.

◆ IMU_ACCEL_X_SENS_NUM

#define IMU_ACCEL_X_SENS_NUM   3791

Definition at line 71 of file imu_ppzuav.h.

◆ IMU_ACCEL_Y_SENS

#define IMU_ACCEL_Y_SENS   37.91

Definition at line 73 of file imu_ppzuav.h.

◆ IMU_ACCEL_Y_SENS_DEN

#define IMU_ACCEL_Y_SENS_DEN   100

Definition at line 75 of file imu_ppzuav.h.

◆ IMU_ACCEL_Y_SENS_NUM

#define IMU_ACCEL_Y_SENS_NUM   3791

Definition at line 74 of file imu_ppzuav.h.

◆ IMU_ACCEL_Z_SENS

#define IMU_ACCEL_Z_SENS   39.24

Definition at line 76 of file imu_ppzuav.h.

◆ IMU_ACCEL_Z_SENS_DEN

#define IMU_ACCEL_Z_SENS_DEN   100

Definition at line 78 of file imu_ppzuav.h.

◆ IMU_ACCEL_Z_SENS_NUM

#define IMU_ACCEL_Z_SENS_NUM   3924

Definition at line 77 of file imu_ppzuav.h.

◆ IMU_GYRO_P_SENS

#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.

◆ IMU_GYRO_P_SENS_DEN

#define IMU_GYRO_P_SENS_DEN   1000

Definition at line 50 of file imu_ppzuav.h.

◆ IMU_GYRO_P_SENS_NUM

#define IMU_GYRO_P_SENS_NUM   4973

Definition at line 49 of file imu_ppzuav.h.

◆ IMU_GYRO_Q_SENS

#define IMU_GYRO_Q_SENS   4.973

Definition at line 51 of file imu_ppzuav.h.

◆ IMU_GYRO_Q_SENS_DEN

#define IMU_GYRO_Q_SENS_DEN   1000

Definition at line 53 of file imu_ppzuav.h.

◆ IMU_GYRO_Q_SENS_NUM

#define IMU_GYRO_Q_SENS_NUM   4973

Definition at line 52 of file imu_ppzuav.h.

◆ IMU_GYRO_R_SENS

#define IMU_GYRO_R_SENS   4.973

Definition at line 54 of file imu_ppzuav.h.

◆ IMU_GYRO_R_SENS_DEN

#define IMU_GYRO_R_SENS_DEN   1000

Definition at line 56 of file imu_ppzuav.h.

◆ IMU_GYRO_R_SENS_NUM

#define IMU_GYRO_R_SENS_NUM   4973

Definition at line 55 of file imu_ppzuav.h.

Function Documentation

◆ imu_ppzuav_event()

◆ imu_ppzuav_init()

◆ imu_ppzuav_periodic()

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.

+ Here is the call graph for this function:

Variable Documentation

◆ imu_ppzuav

struct ImuPpzuav imu_ppzuav

Definition at line 79 of file imu_ppzuav.c.

Referenced by imu_ppzuav_event(), imu_ppzuav_init(), and imu_ppzuav_periodic().