Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
imu_umarim.h File Reference
#include "std.h"
#include "generated/airframe.h"
#include "subsystems/imu.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.

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
 
#define ImuEvent(_gyro_handler, _accel_handler, _mag_handler)
 

Functions

void imu_umarim_event (void)
 
void imu_umarim_downlink_raw (void)
 

Variables

volatile bool_t gyr_valid
 
volatile bool_t acc_valid
 

Macro Definition Documentation

#define IMU_ACCEL_X_NEUTRAL   0

Definition at line 89 of file imu_umarim.h.

Referenced by imu_init().

#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 78 of file imu_umarim.h.

#define IMU_ACCEL_X_SENS_DEN   100

Definition at line 80 of file imu_umarim.h.

#define IMU_ACCEL_X_SENS_NUM   3791

Definition at line 79 of file imu_umarim.h.

#define IMU_ACCEL_X_SIGN   1

Definition at line 38 of file imu_umarim.h.

#define IMU_ACCEL_Y_NEUTRAL   0

Definition at line 90 of file imu_umarim.h.

Referenced by imu_init().

#define IMU_ACCEL_Y_SENS   37.91

Definition at line 81 of file imu_umarim.h.

#define IMU_ACCEL_Y_SENS_DEN   100

Definition at line 83 of file imu_umarim.h.

#define IMU_ACCEL_Y_SENS_NUM   3791

Definition at line 82 of file imu_umarim.h.

#define IMU_ACCEL_Y_SIGN   1

Definition at line 39 of file imu_umarim.h.

#define IMU_ACCEL_Z_NEUTRAL   0

Definition at line 91 of file imu_umarim.h.

Referenced by imu_init().

#define IMU_ACCEL_Z_SENS   39.24

Definition at line 84 of file imu_umarim.h.

#define IMU_ACCEL_Z_SENS_DEN   100

Definition at line 86 of file imu_umarim.h.

#define IMU_ACCEL_Z_SENS_NUM   39.24

Definition at line 85 of file imu_umarim.h.

#define IMU_ACCEL_Z_SIGN   1

Definition at line 40 of file imu_umarim.h.

#define IMU_GYRO_P_NEUTRAL   0

Definition at line 60 of file imu_umarim.h.

Referenced by imu_init().

#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 49 of file imu_umarim.h.

#define IMU_GYRO_P_SENS_DEN   1000

Definition at line 51 of file imu_umarim.h.

#define IMU_GYRO_P_SENS_NUM   4973

Definition at line 50 of file imu_umarim.h.

#define IMU_GYRO_P_SIGN   1

Definition at line 33 of file imu_umarim.h.

#define IMU_GYRO_Q_NEUTRAL   0

Definition at line 61 of file imu_umarim.h.

Referenced by imu_init().

#define IMU_GYRO_Q_SENS   4.973

Definition at line 52 of file imu_umarim.h.

#define IMU_GYRO_Q_SENS_DEN   1000

Definition at line 54 of file imu_umarim.h.

#define IMU_GYRO_Q_SENS_NUM   4973

Definition at line 53 of file imu_umarim.h.

#define IMU_GYRO_Q_SIGN   1

Definition at line 34 of file imu_umarim.h.

#define IMU_GYRO_R_NEUTRAL   0

Definition at line 62 of file imu_umarim.h.

Referenced by imu_init().

#define IMU_GYRO_R_SENS   4.973

Definition at line 55 of file imu_umarim.h.

#define IMU_GYRO_R_SENS_DEN   1000

Definition at line 57 of file imu_umarim.h.

#define IMU_GYRO_R_SENS_NUM   4973

Definition at line 56 of file imu_umarim.h.

#define IMU_GYRO_R_SIGN   1

Definition at line 35 of file imu_umarim.h.

#define ImuEvent (   _gyro_handler,
  _accel_handler,
  _mag_handler 
)
Value:
{ \
if (gyr_valid) { \
_gyro_handler(); \
} \
if (acc_valid) { \
_accel_handler(); \
} \
}
volatile bool_t acc_valid
Definition: imu_navgo.c:56
void imu_umarim_event(void)
Definition: imu_umarim.c:88
#define FALSE
Definition: imu_chimu.h:141
volatile bool_t gyr_valid
Definition: imu_navgo.c:55

Definition at line 102 of file imu_umarim.h.

Function Documentation

void imu_umarim_downlink_raw ( void  )

Variable Documentation

volatile bool_t acc_valid

Definition at line 56 of file imu_navgo.c.

volatile bool_t gyr_valid

Definition at line 55 of file imu_navgo.c.