Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ahrs_gx3.c File Reference

Driver for Microstrain GX3 IMU/AHRS subsystem. More...

+ Include dependency graph for ahrs_gx3.c:

Go to the source code of this file.

Macros

#define GX3_CHKSM(_ubx_payload)   (uint16_t)((uint16_t)(*((uint8_t*)_ubx_payload+66+1))|(uint16_t)(*((uint8_t*)_ubx_payload+66+0))<<8)
 

Functions

static bool_t gx3_verify_chk (volatile uint8_t *buff_add)
 
static float bef (volatile uint8_t *c)
 
void ahrs_align (void)
 Aligns the AHRS. More...
 
void imu_impl_init (void)
 
void imu_periodic (void)
 
void gx3_packet_read_message (void)
 
void gx3_packet_parse (uint8_t c)
 
void ahrs_init (void)
 AHRS initialization. More...
 
void ahrs_aligner_run (void)
 
void ahrs_aligner_init (void)
 

Variables

struct AhrsFloatQuat ahrs_impl
 
struct AhrsAligner ahrs_aligner
 

Detailed Description

Driver for Microstrain GX3 IMU/AHRS subsystem.

Takes care of configuration of the IMU, communication and parsing the received packets. See GX3 datasheet for configuration options.

Author
Michal Podhradsky micha.nosp@m.l.po.nosp@m.dhrad.nosp@m.sky@.nosp@m.aggie.nosp@m.mail.nosp@m..usu..nosp@m.edu

Definition in file ahrs_gx3.c.

Macro Definition Documentation

#define GX3_CHKSM (   _ubx_payload)    (uint16_t)((uint16_t)(*((uint8_t*)_ubx_payload+66+1))|(uint16_t)(*((uint8_t*)_ubx_payload+66+0))<<8)

Definition at line 46 of file ahrs_gx3.c.

Referenced by gx3_packet_read_message().

Function Documentation

void ahrs_align ( void  )

Aligns the AHRS.

Called after ahrs_aligner has run to set initial attitude and biases. Must set the ahrs status to AHRS_RUNNING. Needs to be implemented by each AHRS algorithm.

Definition at line 81 of file ahrs_gx3.c.

References ahrs_impl, AhrsFloatQuat::gx3_status, GX3Running, GX3Uninit, and uart_transmit().

Referenced by imu_impl_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ahrs_aligner_init ( void  )
void ahrs_init ( void  )

AHRS initialization.

Called at startup. Needs to be implemented by each AHRS algorithm.

Definition at line 328 of file ahrs_gx3.c.

References ahrs, ahrs_aligner, AHRS_ALIGNER_LOCKED, ahrs_impl, AHRS_UNINIT, ImuFloat::body_to_imu, imuf, AhrsFloatQuat::ltp_to_imu_quat, AhrsFloatQuat::mag_offset, orientationGetQuat_f(), QUAT_COPY, AhrsAligner::status, and Ahrs::status.

+ Here is the call graph for this function:

static float bef ( volatile uint8_t c)
inlinestatic

Definition at line 61 of file ahrs_gx3.c.

References p.

Referenced by gx3_packet_read_message().

+ Here is the caller graph for this function:

void gx3_packet_parse ( uint8_t  c)

Definition at line 296 of file ahrs_gx3.c.

References ahrs_impl, GX3Packet::chksm_error, FALSE, GX3_HEADER, GX3_MSG_LEN, AhrsFloatQuat::gx3_packet, gx3_verify_chk(), GX3PacketReading, GX3PacketWaiting, GX3Packet::hdr_error, GX3Packet::msg_available, GX3Packet::msg_buf, GX3Packet::msg_idx, GX3Packet::status, and TRUE.

Referenced by ReadGX3Buffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool_t gx3_verify_chk ( volatile uint8_t buff_add)
inlinestatic

Definition at line 72 of file ahrs_gx3.c.

References chk_calc, and GX3_MSG_LEN.

Referenced by gx3_packet_parse().

+ Here is the caller graph for this function:

void imu_periodic ( void  )

Definition at line 222 of file ahrs_gx3.c.

Variable Documentation

struct AhrsAligner ahrs_aligner

Definition at line 55 of file ahrs_gx3.c.

Referenced by ahrs_init().

struct AhrsFloatQuat ahrs_impl