Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_chimu.c File Reference
#include "imu_chimu.h"
#include "string.h"
#include "math.h"
+ Include dependency graph for imu_chimu.c:

Go to the source code of this file.

Macros

#define POLY   0xEDB88320
 
#define CHIMU_STATE_MACHINE_START   0
 
#define CHIMU_STATE_MACHINE_HEADER2   1
 
#define CHIMU_STATE_MACHINE_LEN   2
 
#define CHIMU_STATE_MACHINE_DEVICE   3
 
#define CHIMU_STATE_MACHINE_ID   4
 
#define CHIMU_STATE_MACHINE_PAYLOAD   5
 
#define CHIMU_STATE_MACHINE_XSUM   6
 
#define CHIMU_COM_ID_HIGH   0x1F
 

Functions

static unsigned long UpdateCRC (unsigned long CRC_acc, void *data, unsigned long data_len)
 
void CHIMU_Checksum (unsigned char *data, unsigned char buflen)
 
void CHIMU_Init (CHIMU_PARSER_DATA *pstData)
 
unsigned char CHIMU_Parse (unsigned char btData, unsigned char bInputType, CHIMU_PARSER_DATA *pstData)
 
static CHIMU_attitude_data GetEulersFromQuat (CHIMU_attitude_data attitude)
 
static unsigned char BitTest (unsigned char input, unsigned char n)
 
unsigned char CHIMU_ProcessMessage (unsigned char *pMsgID, unsigned char *pPayloadData, CHIMU_PARSER_DATA *pstData)
 

Macro Definition Documentation

#define CHIMU_COM_ID_HIGH   0x1F

Definition at line 102 of file imu_chimu.c.

Referenced by CHIMU_Parse().

#define CHIMU_STATE_MACHINE_DEVICE   3

Definition at line 96 of file imu_chimu.c.

Referenced by CHIMU_Parse().

#define CHIMU_STATE_MACHINE_HEADER2   1

Definition at line 94 of file imu_chimu.c.

Referenced by CHIMU_Parse().

#define CHIMU_STATE_MACHINE_ID   4

Definition at line 97 of file imu_chimu.c.

Referenced by CHIMU_Parse().

#define CHIMU_STATE_MACHINE_LEN   2

Definition at line 95 of file imu_chimu.c.

Referenced by CHIMU_Parse().

#define CHIMU_STATE_MACHINE_PAYLOAD   5

Definition at line 98 of file imu_chimu.c.

Referenced by CHIMU_Parse().

#define CHIMU_STATE_MACHINE_START   0

Definition at line 93 of file imu_chimu.c.

Referenced by CHIMU_Init(), and CHIMU_Parse().

#define CHIMU_STATE_MACHINE_XSUM   6

Definition at line 99 of file imu_chimu.c.

Referenced by CHIMU_Parse().

#define POLY   0xEDB88320

Referenced by UpdateCRC().

Function Documentation

static unsigned char BitTest ( unsigned char  input,
unsigned char  n 
)
static

Definition at line 283 of file imu_chimu.c.

References FALSE, and TRUE.

Referenced by CHIMU_ProcessMessage().

+ Here is the caller graph for this function:

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:

static CHIMU_attitude_data GetEulersFromQuat ( CHIMU_attitude_data  attitude)
static
static unsigned long UpdateCRC ( unsigned long  CRC_acc,
void *  data,
unsigned long  data_len 
)
static

Definition at line 50 of file imu_chimu.c.

References POLY.

Referenced by CHIMU_Checksum(), and CHIMU_Parse().

+ Here is the caller graph for this function: