Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
#include "paparazzi.h"
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 |
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) |
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.
Data Fields | ||
---|---|---|
float | s | |
CHIMU_Vector | v |
struct CHIMU_attitude_data |
Definition at line 134 of file imu_chimu.h.
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.
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 |
#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.
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().