Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_krooz.h File Reference

Driver for the IMU on the KroozSD board. More...

#include "std.h"
#include "generated/airframe.h"
#include "subsystems/imu.h"
#include "peripherals/mpu60x0_i2c.h"
#include "peripherals/hmc58xx.h"
+ Include dependency graph for imu_krooz.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ImuKrooz
 

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_MAG_X_SIGN   1
 
#define IMU_MAG_Y_SIGN   1
 
#define IMU_MAG_Z_SIGN   1
 
#define IMU_GYRO_P_SENS   0.5454
 default gyro sensitivy and neutral from the datasheet MPU with 250 deg/s has 131.072 LSB/(deg/s) sens = 1/131.072 * pi/180 * 2^INT32_RATE_FRAC sens = 1/131.072 * pi/180 * 4096 = 0.5454 I More...
 
#define IMU_GYRO_P_SENS_NUM   2727
 
#define IMU_GYRO_P_SENS_DEN   5000
 
#define IMU_GYRO_Q_SENS   0.5454
 
#define IMU_GYRO_Q_SENS_NUM   2727
 
#define IMU_GYRO_Q_SENS_DEN   5000
 
#define IMU_GYRO_R_SENS   0.5454
 
#define IMU_GYRO_R_SENS_NUM   2727
 
#define IMU_GYRO_R_SENS_DEN   5000
 
#define IMU_GYRO_P_NEUTRAL   0
 
#define IMU_GYRO_Q_NEUTRAL   0
 
#define IMU_GYRO_R_NEUTRAL   0
 
#define IMU_ACCEL_X_SENS   0.6131
 default accel sensitivy from the datasheet MPU with 2g has 16384 LSB/g sens = 9.81 [m/s^2] / 16384 [LSB/g] * 2^INT32_ACCEL_FRAC = 0.6131 More...
 
#define IMU_ACCEL_X_SENS_NUM   6131
 
#define IMU_ACCEL_X_SENS_DEN   10000
 
#define IMU_ACCEL_Y_SENS   0.6131
 
#define IMU_ACCEL_Y_SENS_NUM   6131
 
#define IMU_ACCEL_Y_SENS_DEN   10000
 
#define IMU_ACCEL_Z_SENS   0.6131
 
#define IMU_ACCEL_Z_SENS_NUM   6131
 
#define IMU_ACCEL_Z_SENS_DEN   10000
 
#define IMU_ACCEL_X_NEUTRAL   0
 
#define IMU_ACCEL_Y_NEUTRAL   0
 
#define IMU_ACCEL_Z_NEUTRAL   0
 
#define IMU_KROOZ_ACCEL_AVG_FILTER   15
 

Functions

void imu_krooz_event (void)
 
void imu_krooz_downlink_raw (void)
 
static void ImuEvent (void(*_gyro_handler)(void), void(*_accel_handler)(void), void(*_mag_handler)(void))
 

Variables

struct ImuKrooz imu_krooz
 

Detailed Description

Driver for the IMU on the KroozSD board.

Invensense MPU-6050

Definition in file imu_krooz.h.

Macro Definition Documentation

#define IMU_ACCEL_X_NEUTRAL   0

Definition at line 98 of file imu_krooz.h.

#define IMU_ACCEL_X_SENS   0.6131

default accel sensitivy from the datasheet MPU with 2g has 16384 LSB/g sens = 9.81 [m/s^2] / 16384 [LSB/g] * 2^INT32_ACCEL_FRAC = 0.6131

Definition at line 87 of file imu_krooz.h.

#define IMU_ACCEL_X_SENS_DEN   10000

Definition at line 89 of file imu_krooz.h.

#define IMU_ACCEL_X_SENS_NUM   6131

Definition at line 88 of file imu_krooz.h.

#define IMU_ACCEL_X_SIGN   1

Definition at line 47 of file imu_krooz.h.

#define IMU_ACCEL_Y_NEUTRAL   0

Definition at line 99 of file imu_krooz.h.

#define IMU_ACCEL_Y_SENS   0.6131

Definition at line 90 of file imu_krooz.h.

#define IMU_ACCEL_Y_SENS_DEN   10000

Definition at line 92 of file imu_krooz.h.

#define IMU_ACCEL_Y_SENS_NUM   6131

Definition at line 91 of file imu_krooz.h.

#define IMU_ACCEL_Y_SIGN   1

Definition at line 48 of file imu_krooz.h.

#define IMU_ACCEL_Z_NEUTRAL   0

Definition at line 100 of file imu_krooz.h.

#define IMU_ACCEL_Z_SENS   0.6131

Definition at line 93 of file imu_krooz.h.

#define IMU_ACCEL_Z_SENS_DEN   10000

Definition at line 95 of file imu_krooz.h.

#define IMU_ACCEL_Z_SENS_NUM   6131

Definition at line 94 of file imu_krooz.h.

#define IMU_ACCEL_Z_SIGN   1

Definition at line 49 of file imu_krooz.h.

#define IMU_GYRO_P_NEUTRAL   0

Definition at line 75 of file imu_krooz.h.

#define IMU_GYRO_P_SENS   0.5454

default gyro sensitivy and neutral from the datasheet MPU with 250 deg/s has 131.072 LSB/(deg/s) sens = 1/131.072 * pi/180 * 2^INT32_RATE_FRAC sens = 1/131.072 * pi/180 * 4096 = 0.5454 I

Definition at line 64 of file imu_krooz.h.

#define IMU_GYRO_P_SENS_DEN   5000

Definition at line 66 of file imu_krooz.h.

#define IMU_GYRO_P_SENS_NUM   2727

Definition at line 65 of file imu_krooz.h.

#define IMU_GYRO_P_SIGN   1

Definition at line 42 of file imu_krooz.h.

#define IMU_GYRO_Q_NEUTRAL   0

Definition at line 76 of file imu_krooz.h.

#define IMU_GYRO_Q_SENS   0.5454

Definition at line 67 of file imu_krooz.h.

#define IMU_GYRO_Q_SENS_DEN   5000

Definition at line 69 of file imu_krooz.h.

#define IMU_GYRO_Q_SENS_NUM   2727

Definition at line 68 of file imu_krooz.h.

#define IMU_GYRO_Q_SIGN   1

Definition at line 43 of file imu_krooz.h.

#define IMU_GYRO_R_NEUTRAL   0

Definition at line 77 of file imu_krooz.h.

#define IMU_GYRO_R_SENS   0.5454

Definition at line 70 of file imu_krooz.h.

#define IMU_GYRO_R_SENS_DEN   5000

Definition at line 72 of file imu_krooz.h.

#define IMU_GYRO_R_SENS_NUM   2727

Definition at line 71 of file imu_krooz.h.

#define IMU_GYRO_R_SIGN   1

Definition at line 44 of file imu_krooz.h.

#define IMU_KROOZ_ACCEL_AVG_FILTER   15

Definition at line 104 of file imu_krooz.h.

Referenced by imu_periodic().

#define IMU_MAG_X_SIGN   1

Definition at line 52 of file imu_krooz.h.

#define IMU_MAG_Y_SIGN   1

Definition at line 53 of file imu_krooz.h.

#define IMU_MAG_Z_SIGN   1

Definition at line 54 of file imu_krooz.h.

Function Documentation

void imu_krooz_downlink_raw ( void  )

Definition at line 133 of file imu_krooz.c.

void imu_krooz_event ( void  )

Definition at line 140 of file imu_krooz.c.

Referenced by ImuEvent().

+ Here is the caller graph for this function:

static void ImuEvent ( void(*)(void)  _gyro_handler,
void(*)(void)  _accel_handler,
void(*)(void)  _mag_handler 
)
inlinestatic

Definition at line 134 of file imu_krooz.h.

References ImuKrooz::acc_valid, FALSE, ImuKrooz::gyr_valid, imu_krooz, imu_krooz_event(), and ImuKrooz::mag_valid.

+ Here is the call graph for this function:

Variable Documentation

struct ImuKrooz imu_krooz

Definition at line 60 of file imu_krooz.c.

Referenced by ImuEvent().