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_chimu.h File Reference
#include "paparazzi.h"
+ Include dependency graph for imu_chimu.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CHIMU_Euler
 
struct  CHIMU_Vector
 
struct  CHIMU_Quaternion
 
struct  CHIMU_attitude_data
 
struct  CHIMU_sensor_data
 
struct  CHIMU_PARSER_DATA
 

Macros

#define CHIMU_STX   0xae
 
#define CHIMU_BROADCAST   0xaa
 
#define MSG00_PING   0x00
 
#define MSG01_BIAS   0x01
 
#define MSG02_DACMODE   0x02
 
#define MSG03_CALACC   0x03
 
#define MSG04_CALMAG   0x04
 
#define MSG05_CALRATE   0x05
 
#define MSG06_CONFIGCLR   0x06
 
#define MSG07_CONFIGSET   0x07
 
#define MSG08_SAVEGYROBIAS   0x08
 
#define MSG09_ESTIMATOR   0x09
 
#define MSG0A_SFCHECK   0x0A
 
#define MSG0B_CENTRIP   0x0B
 
#define MSG0C_INITGYROS   0x0C
 
#define MSG0D_DEVICEID   0x0D
 
#define MSG0E_REFVECTOR   0x0E
 
#define MSG0F_RESET   0x0F
 
#define MSG10_UARTSETTINGS   0x10
 
#define MSG11_SERIALNUMBER   0x11
 
#define CHIMU_Msg_0_Ping   0
 
#define CHIMU_Msg_1_IMU_Raw   1
 
#define CHIMU_Msg_2_IMU_FP   2
 
#define CHIMU_Msg_3_IMU_Attitude   3
 
#define CHIMU_Msg_4_BiasSF   4
 
#define CHIMU_Msg_5_BIT   5
 
#define CHIMU_Msg_6_MagCal   6
 
#define CHIMU_Msg_7_GyroBias   7
 
#define CHIMU_Msg_8_TempCal   8
 
#define CHIMU_Msg_9_DAC_Offsets   9
 
#define CHIMU_Msg_10_Res   10
 
#define CHIMU_Msg_11_Res   11
 
#define CHIMU_Msg_12_Res   12
 
#define CHIMU_Msg_13_Res   13
 
#define CHIMU_Msg_14_RefVector   14
 
#define CHIMU_Msg_15_SFCheck   15
 
#define FloatSwap(X)   (X)
 
#define FALSE   (1==0)
 
#define TRUE   (1==1)
 
#define CHIMU_RX_BUFFERSIZE   128
 

Functions

void CHIMU_Init (CHIMU_PARSER_DATA *pstData)
 
unsigned char CHIMU_Parse (unsigned char btData, unsigned char bInputType, CHIMU_PARSER_DATA *pstData)
 
unsigned char CHIMU_ProcessMessage (unsigned char *pMsgID, unsigned char *pPayloadData, CHIMU_PARSER_DATA *pstData)
 
void CHIMU_Checksum (unsigned char *data, unsigned char buflen)
 

Data Structure Documentation

struct CHIMU_Euler

Definition at line 117 of file imu_chimu.h.

Data Fields
float phi
float psi
float theta
struct CHIMU_Vector

Definition at line 123 of file imu_chimu.h.

Data Fields
float x
float y
float z
struct CHIMU_Quaternion

Definition at line 129 of file imu_chimu.h.

+ Collaboration diagram for CHIMU_Quaternion:
Data Fields
float s
CHIMU_Vector v
struct CHIMU_attitude_data

Definition at line 134 of file imu_chimu.h.

+ Collaboration diagram for CHIMU_attitude_data:
Data Fields
CHIMU_Euler euler
CHIMU_Quaternion q
struct CHIMU_sensor_data

Definition at line 146 of file imu_chimu.h.

Data Fields
float acc[3]
float cputemp
float mag[3]
float rate[3]
float spare1
struct CHIMU_PARSER_DATA

Definition at line 156 of file imu_chimu.h.

+ Collaboration diagram for CHIMU_PARSER_DATA:
Data Fields
uint8_t gCalStatus
uint8_t gCHIMU_BIT
uint8_t gCHIMU_SW_Exclaim
uint8_t gCHIMU_SW_Major
uint8_t gCHIMU_SW_Minor
uint16_t gCHIMU_SW_SerialNumber
uint8_t gConfigInfo
CHIMU_attitude_data m_attitude
CHIMU_attitude_data m_attrates
unsigned char m_Checksum
unsigned char m_DeviceID
unsigned char m_FullMessage[CHIMU_RX_BUFFERSIZE]
unsigned char m_Index
unsigned char m_MsgID
unsigned char m_MsgLen
unsigned char m_Payload[CHIMU_RX_BUFFERSIZE]
unsigned char m_PayloadIndex
unsigned char m_ReceivedChecksum
CHIMU_sensor_data m_sensor
unsigned char m_State
unsigned char m_TempDeviceID

Macro Definition Documentation

#define CHIMU_BROADCAST   0xaa

Definition at line 48 of file imu_chimu.h.

Referenced by ahrs_chimu_init().

#define CHIMU_Msg_0_Ping   0

Definition at line 71 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_10_Res   10

Definition at line 81 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_11_Res   11

Definition at line 82 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_12_Res   12

Definition at line 83 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_13_Res   13

Definition at line 84 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_14_RefVector   14

Definition at line 85 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_15_SFCheck   15

Definition at line 86 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_1_IMU_Raw   1

Definition at line 72 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_2_IMU_FP   2

Definition at line 73 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_3_IMU_Attitude   3

Definition at line 74 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage(), and parse_ins_msg().

#define CHIMU_Msg_4_BiasSF   4

Definition at line 75 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_5_BIT   5

Definition at line 76 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_6_MagCal   6

Definition at line 77 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_7_GyroBias   7

Definition at line 78 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_8_TempCal   8

Definition at line 79 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_Msg_9_DAC_Offsets   9

Definition at line 80 of file imu_chimu.h.

Referenced by CHIMU_ProcessMessage().

#define CHIMU_RX_BUFFERSIZE   128

Definition at line 154 of file imu_chimu.h.

Referenced by CHIMU_Init(), and CHIMU_Parse().

#define CHIMU_STX   0xae

Definition at line 47 of file imu_chimu.h.

Referenced by ahrs_chimu_init().

#define FALSE   (1==0)

Definition at line 140 of file imu_chimu.h.

#define FloatSwap (   X)    (X)

Definition at line 112 of file imu_chimu.h.

Referenced by ahrs_chimu_update_gps(), and CHIMU_ProcessMessage().

#define MSG00_PING   0x00

Definition at line 51 of file imu_chimu.h.

Referenced by ahrs_chimu_init().

#define MSG01_BIAS   0x01

Definition at line 52 of file imu_chimu.h.

#define MSG02_DACMODE   0x02

Definition at line 53 of file imu_chimu.h.

#define MSG03_CALACC   0x03

Definition at line 54 of file imu_chimu.h.

#define MSG04_CALMAG   0x04

Definition at line 55 of file imu_chimu.h.

#define MSG05_CALRATE   0x05

Definition at line 56 of file imu_chimu.h.

#define MSG06_CONFIGCLR   0x06

Definition at line 57 of file imu_chimu.h.

#define MSG07_CONFIGSET   0x07

Definition at line 58 of file imu_chimu.h.

#define MSG08_SAVEGYROBIAS   0x08

Definition at line 59 of file imu_chimu.h.

#define MSG09_ESTIMATOR   0x09

Definition at line 60 of file imu_chimu.h.

Referenced by ahrs_chimu_init().

#define MSG0A_SFCHECK   0x0A

Definition at line 61 of file imu_chimu.h.

#define MSG0B_CENTRIP   0x0B

Definition at line 62 of file imu_chimu.h.

#define MSG0C_INITGYROS   0x0C

Definition at line 63 of file imu_chimu.h.

#define MSG0D_DEVICEID   0x0D

Definition at line 64 of file imu_chimu.h.

#define MSG0E_REFVECTOR   0x0E

Definition at line 65 of file imu_chimu.h.

#define MSG0F_RESET   0x0F

Definition at line 66 of file imu_chimu.h.

#define MSG10_UARTSETTINGS   0x10

Definition at line 67 of file imu_chimu.h.

Referenced by ahrs_chimu_init().

#define MSG11_SERIALNUMBER   0x11

Definition at line 68 of file imu_chimu.h.

#define TRUE   (1==1)

Definition at line 143 of file imu_chimu.h.

Function Documentation

void CHIMU_Checksum ( unsigned char *  data,
unsigned char  buflen 
)

Definition at line 82 of file imu_chimu.c.

References UpdateCRC().

Referenced by ahrs_chimu_init(), and ahrs_chimu_update_gps().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: