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_aspirin2.h File Reference
#include "generated/airframe.h"
#include "subsystems/imu.h"
#include "subsystems/imu/imu_aspirin2_arch.h"
+ Include dependency graph for imu_aspirin2.h:

Go to the source code of this file.

Data Structures

struct  ImuAspirin2
 

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.359
 default gyro sensitivy and neutral from the datasheet MPU60X0 has 16.4 LSB/(deg/s) at 2000deg/s range sens = 1/16.4 * pi/180 * 2^INT32_RATE_FRAC sens = 1/16.4 * pi/180 * 4096 = 4.359066229 More...
 
#define IMU_GYRO_P_SENS_NUM   4359
 
#define IMU_GYRO_P_SENS_DEN   1000
 
#define IMU_GYRO_Q_SENS   4.359
 
#define IMU_GYRO_Q_SENS_NUM   4359
 
#define IMU_GYRO_Q_SENS_DEN   1000
 
#define IMU_GYRO_R_SENS   4.359
 
#define IMU_GYRO_R_SENS_NUM   4359
 
#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   4.905
 default accel sensitivy from the datasheet MPU60X0 has 2048 LSB/g fixed point sens: 9.81 [m/s^2] / 2048 [LSB/g] * 2^INT32_ACCEL_FRAC sens = 9.81 / 2048 * 1024 = 4.905 More...
 
#define IMU_ACCEL_X_SENS_NUM   4905
 
#define IMU_ACCEL_X_SENS_DEN   1000
 
#define IMU_ACCEL_Y_SENS   4.905
 
#define IMU_ACCEL_Y_SENS_NUM   4905
 
#define IMU_ACCEL_Y_SENS_DEN   1000
 
#define IMU_ACCEL_Z_SENS   4.905
 
#define IMU_ACCEL_Z_SENS_NUM   4905
 
#define IMU_ACCEL_Z_SENS_DEN   1000
 
#define IMU_ACCEL_X_NEUTRAL   0
 
#define IMU_ACCEL_Y_NEUTRAL   0
 
#define IMU_ACCEL_Z_NEUTRAL   0
 
#define MPU_OFFSET_STATUS   1
 
#define MPU_OFFSET_GYRO   10
 
#define MPU_OFFSET_ACC   2
 
#define MPU_OFFSET_MAG   16
 
#define ImuEvent(_gyro_handler, _accel_handler, _mag_handler)
 

Enumerations

enum  Aspirin2Status { Aspirin2StatusUninit, Aspirin2StatusIdle, Aspirin2StatusReading }
 

Functions

static uint8_t imu_from_buff (void)
 
static void imu_aspirin2_event (void(*_gyro_handler)(void), void(*_accel_handler)(void), void(*_mag_handler)(void))
 
void imu_aspirin2_arch_init (void)
 

Variables

struct ImuAspirin2 imu_aspirin2
 

Macro Definition Documentation

#define IMU_ACCEL_X_NEUTRAL   0

Definition at line 87 of file imu_aspirin2.h.

#define IMU_ACCEL_X_SENS   4.905

default accel sensitivy from the datasheet MPU60X0 has 2048 LSB/g fixed point sens: 9.81 [m/s^2] / 2048 [LSB/g] * 2^INT32_ACCEL_FRAC sens = 9.81 / 2048 * 1024 = 4.905

Definition at line 76 of file imu_aspirin2.h.

#define IMU_ACCEL_X_SENS_DEN   1000

Definition at line 78 of file imu_aspirin2.h.

#define IMU_ACCEL_X_SENS_NUM   4905

Definition at line 77 of file imu_aspirin2.h.

#define IMU_ACCEL_X_SIGN   1

Definition at line 43 of file imu_aspirin2.h.

#define IMU_ACCEL_Y_NEUTRAL   0

Definition at line 88 of file imu_aspirin2.h.

#define IMU_ACCEL_Y_SENS   4.905

Definition at line 79 of file imu_aspirin2.h.

#define IMU_ACCEL_Y_SENS_DEN   1000

Definition at line 81 of file imu_aspirin2.h.

#define IMU_ACCEL_Y_SENS_NUM   4905

Definition at line 80 of file imu_aspirin2.h.

#define IMU_ACCEL_Y_SIGN   1

Definition at line 44 of file imu_aspirin2.h.

#define IMU_ACCEL_Z_NEUTRAL   0

Definition at line 89 of file imu_aspirin2.h.

#define IMU_ACCEL_Z_SENS   4.905

Definition at line 82 of file imu_aspirin2.h.

#define IMU_ACCEL_Z_SENS_DEN   1000

Definition at line 84 of file imu_aspirin2.h.

#define IMU_ACCEL_Z_SENS_NUM   4905

Definition at line 83 of file imu_aspirin2.h.

#define IMU_ACCEL_Z_SIGN   1

Definition at line 45 of file imu_aspirin2.h.

#define IMU_GYRO_P_NEUTRAL   0

Definition at line 65 of file imu_aspirin2.h.

#define IMU_GYRO_P_SENS   4.359

default gyro sensitivy and neutral from the datasheet MPU60X0 has 16.4 LSB/(deg/s) at 2000deg/s range sens = 1/16.4 * pi/180 * 2^INT32_RATE_FRAC sens = 1/16.4 * pi/180 * 4096 = 4.359066229

Definition at line 54 of file imu_aspirin2.h.

#define IMU_GYRO_P_SENS_DEN   1000

Definition at line 56 of file imu_aspirin2.h.

#define IMU_GYRO_P_SENS_NUM   4359

Definition at line 55 of file imu_aspirin2.h.

#define IMU_GYRO_P_SIGN   1

Definition at line 38 of file imu_aspirin2.h.

#define IMU_GYRO_Q_NEUTRAL   0

Definition at line 66 of file imu_aspirin2.h.

#define IMU_GYRO_Q_SENS   4.359

Definition at line 57 of file imu_aspirin2.h.

#define IMU_GYRO_Q_SENS_DEN   1000

Definition at line 59 of file imu_aspirin2.h.

#define IMU_GYRO_Q_SENS_NUM   4359

Definition at line 58 of file imu_aspirin2.h.

#define IMU_GYRO_Q_SIGN   1

Definition at line 39 of file imu_aspirin2.h.

#define IMU_GYRO_R_NEUTRAL   0

Definition at line 67 of file imu_aspirin2.h.

#define IMU_GYRO_R_SENS   4.359

Definition at line 60 of file imu_aspirin2.h.

#define IMU_GYRO_R_SENS_DEN   1000

Definition at line 62 of file imu_aspirin2.h.

#define IMU_GYRO_R_SENS_NUM   4359

Definition at line 61 of file imu_aspirin2.h.

#define IMU_GYRO_R_SIGN   1

Definition at line 40 of file imu_aspirin2.h.

#define ImuEvent (   _gyro_handler,
  _accel_handler,
  _mag_handler 
)
Value:
{ \
imu_aspirin2_event(_gyro_handler, _accel_handler, _mag_handler); \
}
static void imu_aspirin2_event(void(*_gyro_handler)(void), void(*_accel_handler)(void), void(*_mag_handler)(void))
Definition: imu_aspirin2.h:148

Definition at line 163 of file imu_aspirin2.h.

#define MPU_OFFSET_ACC   2

Referenced by imu_from_buff().

#define MPU_OFFSET_GYRO   10

Referenced by imu_from_buff().

#define MPU_OFFSET_MAG   16

Referenced by imu_from_buff().

#define MPU_OFFSET_STATUS   1

Referenced by imu_from_buff().

Enumeration Type Documentation

Enumerator
Aspirin2StatusUninit 
Aspirin2StatusIdle 
Aspirin2StatusReading 

Definition at line 93 of file imu_aspirin2.h.

Function Documentation

void imu_aspirin2_arch_init ( void  )

Definition at line 8 of file imu_aspirin2_arch.c.

Referenced by imu_impl_init().

+ Here is the caller graph for this function:

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

Definition at line 148 of file imu_aspirin2.h.

References Aspirin2StatusUninit, FALSE, imu_aspirin2, imu_from_buff(), ImuAspirin2::imu_spi_data_received, and ImuAspirin2::status.

+ Here is the call graph for this function:

static uint8_t imu_from_buff ( void  )
inlinestatic

Variable Documentation

struct ImuAspirin2 imu_aspirin2

Definition at line 32 of file imu_aspirin2.c.

Referenced by imu_aspirin2_event(), imu_from_buff(), imu_impl_init(), and imu_periodic().