19 #include "generated/airframe.h"
21 #if CHIMU_DOWNLINK_IMMEDIATE
23 #include "pprzlink/messages.h"
46 #ifndef AHRS_CHIMU_GPS_ID
47 #define AHRS_CHIMU_GPS_ID GPS_MULTI_ID
52 uint32_t stamp __attribute__((unused)),
77 uint8_t rate[12] = {
CHIMU_STX,
CHIMU_STX, 0x06,
CHIMU_BROADCAST,
MSG10_UARTSETTINGS, 0x05, 0xff, 0x79, 0x00, 0x00, 0x01, 0x76 };
110 while (dev->char_available(dev->periph)) {
111 uint8_t ch = dev->get_byte(dev->periph);
139 }
else if (CHIMU_DATA.
m_MsgID == 0x02) {
140 #if CHIMU_DOWNLINK_IMMEDIATE
153 uint8_t centripedal[19] = {0xae, 0xae, 0x0d, 0xaa, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2 };
158 gps_speed = gps_speed_3d / 100.;
162 memmove(¢ripedal[6], &gps_speed, 4);
Event structure to store callbacks in a linked list.
static void stateSetNedToBodyEulers_f(struct FloatEulers *ned_to_body_eulers)
Set vehicle body attitude from euler angles (float).
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
Dispatcher to register actual AHRS implementations.
#define CHIMU_Msg_3_IMU_Attitude
CHIMU_attitude_data m_attitude
struct AhrsChimu ahrs_chimu
Main include for ABI (AirBorneInterface).
#define MSG10_UARTSETTINGS
#define INS_ROLL_NEUTRAL_DEFAULT
void CHIMU_Checksum(unsigned char *data, unsigned char buflen)
Architecture independent SPI (Serial Peripheral Interface) API.
INS_FORMAT ins_roll_neutral
void ahrs_chimu_init(void)
void ahrs_register_impl(AhrsEnableOutput enable)
Register an AHRS implementation.
data structure for GPS information
void CHIMU_Init(CHIMU_PARSER_DATA *pstData)
Device independent GPS code (interface)
static bool ahrs_chimu_enable_output(bool enable)
INS_FORMAT ins_pitch_neutral
unsigned char CHIMU_Parse(unsigned char btData, unsigned char bInputType, CHIMU_PARSER_DATA *pstData)
#define InsSend(_dat, _len)
CHIMU_sensor_data m_sensor
static void gps_cb(uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
#define INS_PITCH_NEUTRAL_DEFAULT
static const struct usb_device_descriptor dev
CHIMU_PARSER_DATA CHIMU_DATA
#define DefaultChannel
SITL.
void ahrs_chimu_update_gps(uint8_t gps_fix, uint16_t gps_speed_3d)
API to get/set the generic vehicle states.
volatile uint8_t new_ins_attitude
void ahrs_chimu_register(void)
CHIMU_attitude_data m_attrates
Common code for AP and FBW telemetry.
#define AHRS_CHIMU_GPS_ID
ABI binding for gps data.
arch independent LED (Light Emitting Diodes) API
Highspeed SPI Slave Interface.
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
Device independent INS code.