Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
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

◆ CHIMU_COM_ID_HIGH

#define CHIMU_COM_ID_HIGH   0x1F

Definition at line 102 of file imu_chimu.c.

◆ CHIMU_STATE_MACHINE_DEVICE

#define CHIMU_STATE_MACHINE_DEVICE   3

Definition at line 96 of file imu_chimu.c.

◆ CHIMU_STATE_MACHINE_HEADER2

#define CHIMU_STATE_MACHINE_HEADER2   1

Definition at line 94 of file imu_chimu.c.

◆ CHIMU_STATE_MACHINE_ID

#define CHIMU_STATE_MACHINE_ID   4

Definition at line 97 of file imu_chimu.c.

◆ CHIMU_STATE_MACHINE_LEN

#define CHIMU_STATE_MACHINE_LEN   2

Definition at line 95 of file imu_chimu.c.

◆ CHIMU_STATE_MACHINE_PAYLOAD

#define CHIMU_STATE_MACHINE_PAYLOAD   5

Definition at line 98 of file imu_chimu.c.

◆ CHIMU_STATE_MACHINE_START

#define CHIMU_STATE_MACHINE_START   0

Definition at line 93 of file imu_chimu.c.

◆ CHIMU_STATE_MACHINE_XSUM

#define CHIMU_STATE_MACHINE_XSUM   6

Definition at line 99 of file imu_chimu.c.

◆ POLY

#define POLY   0xEDB88320

Function Documentation

◆ BitTest()

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

Definition at line 283 of file imu_chimu.c.

Referenced by CHIMU_ProcessMessage().

+ Here is the caller graph for this function:

◆ CHIMU_Checksum()

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:

◆ CHIMU_Init()

◆ CHIMU_Parse()

◆ CHIMU_ProcessMessage()

◆ GetEulersFromQuat()

static CHIMU_attitude_data GetEulersFromQuat ( CHIMU_attitude_data  attitude)
static

◆ UpdateCRC()

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: