Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
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) |
#define CHIMU_COM_ID_HIGH 0x1F |
Definition at line 102 of file imu_chimu.c.
#define CHIMU_STATE_MACHINE_DEVICE 3 |
Definition at line 96 of file imu_chimu.c.
#define CHIMU_STATE_MACHINE_HEADER2 1 |
Definition at line 94 of file imu_chimu.c.
#define CHIMU_STATE_MACHINE_ID 4 |
Definition at line 97 of file imu_chimu.c.
#define CHIMU_STATE_MACHINE_LEN 2 |
Definition at line 95 of file imu_chimu.c.
#define CHIMU_STATE_MACHINE_PAYLOAD 5 |
Definition at line 98 of file imu_chimu.c.
#define CHIMU_STATE_MACHINE_START 0 |
Definition at line 93 of file imu_chimu.c.
#define CHIMU_STATE_MACHINE_XSUM 6 |
Definition at line 99 of file imu_chimu.c.
#define POLY 0xEDB88320 |
|
static |
Definition at line 283 of file imu_chimu.c.
Referenced by CHIMU_ProcessMessage().
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().
void CHIMU_Init | ( | CHIMU_PARSER_DATA * | pstData | ) |
Definition at line 108 of file imu_chimu.c.
References CHIMU_sensor_data::acc, CHIMU_RX_BUFFERSIZE, CHIMU_STATE_MACHINE_START, CHIMU_sensor_data::cputemp, CHIMU_attitude_data::euler, CHIMU_PARSER_DATA::m_attitude, CHIMU_PARSER_DATA::m_attrates, CHIMU_PARSER_DATA::m_Checksum, CHIMU_PARSER_DATA::m_DeviceID, CHIMU_PARSER_DATA::m_FullMessage, CHIMU_PARSER_DATA::m_Index, CHIMU_PARSER_DATA::m_MsgID, CHIMU_PARSER_DATA::m_MsgLen, CHIMU_PARSER_DATA::m_Payload, CHIMU_PARSER_DATA::m_PayloadIndex, CHIMU_PARSER_DATA::m_ReceivedChecksum, CHIMU_PARSER_DATA::m_sensor, CHIMU_PARSER_DATA::m_State, CHIMU_PARSER_DATA::m_TempDeviceID, CHIMU_sensor_data::mag, CHIMU_Euler::phi, CHIMU_Euler::psi, CHIMU_sensor_data::rate, CHIMU_sensor_data::spare1, and CHIMU_Euler::theta.
Referenced by ahrs_chimu_init().
unsigned char CHIMU_Parse | ( | unsigned char | btData, |
unsigned char | bInputType, | ||
CHIMU_PARSER_DATA * | pstData | ||
) |
Definition at line 149 of file imu_chimu.c.
References CHIMU_COM_ID_HIGH, CHIMU_ProcessMessage(), CHIMU_RX_BUFFERSIZE, CHIMU_STATE_MACHINE_DEVICE, CHIMU_STATE_MACHINE_HEADER2, CHIMU_STATE_MACHINE_ID, CHIMU_STATE_MACHINE_LEN, CHIMU_STATE_MACHINE_PAYLOAD, CHIMU_STATE_MACHINE_START, CHIMU_STATE_MACHINE_XSUM, CHIMU_PARSER_DATA::m_Checksum, CHIMU_PARSER_DATA::m_DeviceID, CHIMU_PARSER_DATA::m_FullMessage, CHIMU_PARSER_DATA::m_Index, CHIMU_PARSER_DATA::m_MsgID, CHIMU_PARSER_DATA::m_MsgLen, CHIMU_PARSER_DATA::m_Payload, CHIMU_PARSER_DATA::m_PayloadIndex, CHIMU_PARSER_DATA::m_ReceivedChecksum, CHIMU_PARSER_DATA::m_State, CHIMU_PARSER_DATA::m_TempDeviceID, and UpdateCRC().
Referenced by parse_ins_msg().
unsigned char CHIMU_ProcessMessage | ( | unsigned char * | pMsgID, |
unsigned char * | pPayloadData, | ||
CHIMU_PARSER_DATA * | pstData | ||
) |
Definition at line 288 of file imu_chimu.c.
References CHIMU_sensor_data::acc, BitTest(), CHIMU_Msg_0_Ping, CHIMU_Msg_10_Res, CHIMU_Msg_11_Res, CHIMU_Msg_12_Res, CHIMU_Msg_13_Res, CHIMU_Msg_14_RefVector, CHIMU_Msg_15_SFCheck, CHIMU_Msg_1_IMU_Raw, CHIMU_Msg_2_IMU_FP, CHIMU_Msg_3_IMU_Attitude, CHIMU_Msg_4_BiasSF, CHIMU_Msg_5_BIT, CHIMU_Msg_6_MagCal, CHIMU_Msg_7_GyroBias, CHIMU_Msg_8_TempCal, CHIMU_Msg_9_DAC_Offsets, CHIMU_sensor_data::cputemp, CHIMU_attitude_data::euler, FloatSwap, CHIMU_PARSER_DATA::gCalStatus, CHIMU_PARSER_DATA::gCHIMU_BIT, CHIMU_PARSER_DATA::gCHIMU_SW_Exclaim, CHIMU_PARSER_DATA::gCHIMU_SW_Major, CHIMU_PARSER_DATA::gCHIMU_SW_Minor, CHIMU_PARSER_DATA::gCHIMU_SW_SerialNumber, CHIMU_PARSER_DATA::gConfigInfo, GetEulersFromQuat(), CHIMU_PARSER_DATA::m_attitude, CHIMU_PARSER_DATA::m_attrates, CHIMU_PARSER_DATA::m_MsgID, CHIMU_PARSER_DATA::m_sensor, CHIMU_sensor_data::mag, CHIMU_Euler::phi, CHIMU_Euler::psi, CHIMU_attitude_data::q, CHIMU_sensor_data::rate, CHIMU_Quaternion::s, CHIMU_sensor_data::spare1, CHIMU_Euler::theta, TRUE, CHIMU_Quaternion::v, CHIMU_Vector::x, CHIMU_Vector::y, and CHIMU_Vector::z.
Referenced by CHIMU_Parse().
|
static |
Definition at line 245 of file imu_chimu.c.
References attitude, CHIMU_attitude_data::euler, CHIMU_Euler::phi, CHIMU_Euler::psi, CHIMU_attitude_data::q, CHIMU_Quaternion::s, CHIMU_Euler::theta, CHIMU_Quaternion::v, CHIMU_Vector::x, CHIMU_Vector::y, and CHIMU_Vector::z.
Referenced by CHIMU_ProcessMessage().
|
static |
Definition at line 50 of file imu_chimu.c.
References POLY.
Referenced by CHIMU_Checksum(), and CHIMU_Parse().