Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_umarim.h File Reference
#include "std.h"
#include "generated/airframe.h"
#include "subsystems/imu.h"
#include "peripherals/itg3200.h"
#include "peripherals/adxl345_i2c.h"
+ Include dependency graph for imu_umarim.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ImuUmarim
 

Macros

#define IMU_GYRO_P_SIGN   1
 
#define IMU_GYRO_Q_SIGN   1
 
#define IMU_GYRO_R_SIGN   1
 
#define IMU_ACCEL_X_SIGN   1
 
#define IMU_ACCEL_Y_SIGN   1
 
#define IMU_ACCEL_Z_SIGN   1
 
#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_GYRO_P_NEUTRAL   0
 
#define IMU_GYRO_Q_NEUTRAL   0
 
#define IMU_GYRO_R_NEUTRAL   0
 
#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   39.24
 
#define IMU_ACCEL_Z_SENS_DEN   100
 
#define IMU_ACCEL_X_NEUTRAL   0
 
#define IMU_ACCEL_Y_NEUTRAL   0
 
#define IMU_ACCEL_Z_NEUTRAL   0
 

Functions

void imu_umarim_init (void)
 
void imu_umarim_periodic (void)
 
void imu_umarim_event (void)
 
void imu_umarim_downlink_raw (void)
 

Variables

volatile bool gyr_valid
 
volatile bool acc_valid
 
struct ImuUmarim imu_umarim
 

Data Structure Documentation

struct ImuUmarim

Definition at line 108 of file imu_umarim.h.

+ Collaboration diagram for ImuUmarim:
Data Fields
struct Adxl345_I2c adxl
struct Itg3200 itg

Macro Definition Documentation

#define IMU_ACCEL_X_NEUTRAL   0

Definition at line 100 of file imu_umarim.h.

#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

what about the offset at 3.3V?

Definition at line 89 of file imu_umarim.h.

#define IMU_ACCEL_X_SENS_DEN   100

Definition at line 91 of file imu_umarim.h.

#define IMU_ACCEL_X_SENS_NUM   3791

Definition at line 90 of file imu_umarim.h.

#define IMU_ACCEL_X_SIGN   1

Definition at line 49 of file imu_umarim.h.

#define IMU_ACCEL_Y_NEUTRAL   0

Definition at line 101 of file imu_umarim.h.

#define IMU_ACCEL_Y_SENS   37.91

Definition at line 92 of file imu_umarim.h.

#define IMU_ACCEL_Y_SENS_DEN   100

Definition at line 94 of file imu_umarim.h.

#define IMU_ACCEL_Y_SENS_NUM   3791

Definition at line 93 of file imu_umarim.h.

#define IMU_ACCEL_Y_SIGN   1

Definition at line 50 of file imu_umarim.h.

#define IMU_ACCEL_Z_NEUTRAL   0

Definition at line 102 of file imu_umarim.h.

#define IMU_ACCEL_Z_SENS   39.24

Definition at line 95 of file imu_umarim.h.

#define IMU_ACCEL_Z_SENS_DEN   100

Definition at line 97 of file imu_umarim.h.

#define IMU_ACCEL_Z_SENS_NUM   39.24

Definition at line 96 of file imu_umarim.h.

#define IMU_ACCEL_Z_SIGN   1

Definition at line 51 of file imu_umarim.h.

#define IMU_GYRO_P_NEUTRAL   0

Definition at line 71 of file imu_umarim.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 60 of file imu_umarim.h.

#define IMU_GYRO_P_SENS_DEN   1000

Definition at line 62 of file imu_umarim.h.

#define IMU_GYRO_P_SENS_NUM   4973

Definition at line 61 of file imu_umarim.h.

#define IMU_GYRO_P_SIGN   1

Definition at line 44 of file imu_umarim.h.

#define IMU_GYRO_Q_NEUTRAL   0

Definition at line 72 of file imu_umarim.h.

#define IMU_GYRO_Q_SENS   4.973

Definition at line 63 of file imu_umarim.h.

#define IMU_GYRO_Q_SENS_DEN   1000

Definition at line 65 of file imu_umarim.h.

#define IMU_GYRO_Q_SENS_NUM   4973

Definition at line 64 of file imu_umarim.h.

#define IMU_GYRO_Q_SIGN   1

Definition at line 45 of file imu_umarim.h.

#define IMU_GYRO_R_NEUTRAL   0

Definition at line 73 of file imu_umarim.h.

#define IMU_GYRO_R_SENS   4.973

Definition at line 66 of file imu_umarim.h.

#define IMU_GYRO_R_SENS_DEN   1000

Definition at line 68 of file imu_umarim.h.

#define IMU_GYRO_R_SENS_NUM   4973

Definition at line 67 of file imu_umarim.h.

#define IMU_GYRO_R_SIGN   1

Definition at line 46 of file imu_umarim.h.

Function Documentation

void imu_umarim_downlink_raw ( void  )
void imu_umarim_periodic ( void  )

Definition at line 83 of file imu_umarim.c.

References ImuUmarim::adxl, adxl345_i2c_periodic(), imu_umarim, ImuUmarim::itg, and itg3200_periodic().

+ Here is the call graph for this function:

Variable Documentation

volatile bool acc_valid
volatile bool gyr_valid
struct ImuUmarim imu_umarim

Definition at line 64 of file imu_umarim.c.

Referenced by imu_umarim_event(), and imu_umarim_periodic().