Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces 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 KROOZ_GYRO_RANGE   MPU60X0_GYRO_RANGE_250
 
#define KROOZ_ACCEL_RANGE   MPU60X0_ACCEL_RANGE_2G
 
#define IMU_GYRO_P_SENS   MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]
 
#define IMU_GYRO_P_SENS_NUM   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]
 
#define IMU_GYRO_P_SENS_DEN   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]
 
#define IMU_GYRO_Q_SENS   MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]
 
#define IMU_GYRO_Q_SENS_NUM   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]
 
#define IMU_GYRO_Q_SENS_DEN   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]
 
#define IMU_GYRO_R_SENS   MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]
 
#define IMU_GYRO_R_SENS_NUM   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]
 
#define IMU_GYRO_R_SENS_DEN   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]
 
#define IMU_ACCEL_X_SENS   MPU60X0_ACCEL_SENS[KROOZ_ACCEL_RANGE]
 
#define IMU_ACCEL_X_SENS_NUM   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][0]
 
#define IMU_ACCEL_X_SENS_DEN   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][1]
 
#define IMU_ACCEL_Y_SENS   MPU60X0_ACCEL_SENS[KROOZ_ACCEL_RANGE]
 
#define IMU_ACCEL_Y_SENS_NUM   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][0]
 
#define IMU_ACCEL_Y_SENS_DEN   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][1]
 
#define IMU_ACCEL_Z_SENS   MPU60X0_ACCEL_SENS[KROOZ_ACCEL_RANGE]
 
#define IMU_ACCEL_Z_SENS_NUM   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][0]
 
#define IMU_ACCEL_Z_SENS_DEN   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][1]
 
#define IMU_KROOZ_ACCEL_AVG_FILTER   15
 

Functions

void imu_krooz_init (void)
 
void imu_krooz_periodic (void)
 
void imu_krooz_event (void)
 
void imu_krooz_downlink_raw (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.


Data Structure Documentation

struct ImuKrooz

Definition at line 80 of file imu_krooz.h.

+ Collaboration diagram for ImuKrooz:
Data Fields
struct Int32Vect3 accel_filtered
struct Int32Vect3 accel_sum
volatile uint8_t ad7689_spi_rx_buffer[2]
volatile uint8_t ad7689_spi_tx_buffer[2]
struct spi_transaction ad7689_trans
struct Hmc58xx hmc
volatile bool hmc_eoc
volatile uint8_t meas_nb
struct Uint8Vect3 meas_nb_acc
struct Mpu60x0_I2c mpu
volatile bool mpu_eoc
struct Int32Rates rates_sum
int32_t temperature

Macro Definition Documentation

#define IMU_ACCEL_X_SENS   MPU60X0_ACCEL_SENS[KROOZ_ACCEL_RANGE]

Definition at line 64 of file imu_krooz.h.

#define IMU_ACCEL_X_SENS_DEN   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][1]

Definition at line 66 of file imu_krooz.h.

#define IMU_ACCEL_X_SENS_NUM   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][0]

Definition at line 65 of file imu_krooz.h.

#define IMU_ACCEL_Y_SENS   MPU60X0_ACCEL_SENS[KROOZ_ACCEL_RANGE]

Definition at line 67 of file imu_krooz.h.

#define IMU_ACCEL_Y_SENS_DEN   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][1]

Definition at line 69 of file imu_krooz.h.

#define IMU_ACCEL_Y_SENS_NUM   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][0]

Definition at line 68 of file imu_krooz.h.

#define IMU_ACCEL_Z_SENS   MPU60X0_ACCEL_SENS[KROOZ_ACCEL_RANGE]

Definition at line 70 of file imu_krooz.h.

#define IMU_ACCEL_Z_SENS_DEN   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][1]

Definition at line 72 of file imu_krooz.h.

#define IMU_ACCEL_Z_SENS_NUM   MPU60X0_ACCEL_SENS_FRAC[KROOZ_ACCEL_RANGE][0]

Definition at line 71 of file imu_krooz.h.

#define IMU_GYRO_P_SENS   MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]

Definition at line 51 of file imu_krooz.h.

#define IMU_GYRO_P_SENS_DEN   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]

Definition at line 53 of file imu_krooz.h.

#define IMU_GYRO_P_SENS_NUM   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]

Definition at line 52 of file imu_krooz.h.

#define IMU_GYRO_Q_SENS   MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]

Definition at line 54 of file imu_krooz.h.

#define IMU_GYRO_Q_SENS_DEN   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]

Definition at line 56 of file imu_krooz.h.

#define IMU_GYRO_Q_SENS_NUM   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]

Definition at line 55 of file imu_krooz.h.

#define IMU_GYRO_R_SENS   MPU60X0_GYRO_SENS[KROOZ_GYRO_RANGE]

Definition at line 57 of file imu_krooz.h.

#define IMU_GYRO_R_SENS_DEN   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][1]

Definition at line 59 of file imu_krooz.h.

#define IMU_GYRO_R_SENS_NUM   MPU60X0_GYRO_SENS_FRAC[KROOZ_GYRO_RANGE][0]

Definition at line 58 of file imu_krooz.h.

#define IMU_KROOZ_ACCEL_AVG_FILTER   15

Definition at line 77 of file imu_krooz.h.

Referenced by imu_krooz_periodic().

#define KROOZ_ACCEL_RANGE   MPU60X0_ACCEL_RANGE_2G

Definition at line 45 of file imu_krooz.h.

Referenced by imu_krooz_init().

#define KROOZ_GYRO_RANGE   MPU60X0_GYRO_RANGE_250

Definition at line 41 of file imu_krooz.h.

Referenced by imu_krooz_init().

Function Documentation

void imu_krooz_downlink_raw ( void  )

Definition at line 130 of file imu_krooz.c.

void imu_krooz_event ( void  )

Definition at line 139 of file imu_krooz.c.

void imu_krooz_init ( void  )

Definition at line 61 of file imu_krooz.c.

void imu_krooz_periodic ( void  )

Definition at line 91 of file imu_krooz.c.

Variable Documentation

struct ImuKrooz imu_krooz

Definition at line 54 of file imu_krooz.c.