Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ahrs_extern_quat.c File Reference

AHRS interface for multiple IMU/AHRS subsystems, such as GX3, UM6 etc. More...

#include "ahrs_extern_quat.h"
#include "mcu_periph/sys_time.h"
#include "led.h"
+ Include dependency graph for ahrs_extern_quat.c:

Go to the source code of this file.

Functions

void ahrs_init (void)
 AHRS initialization. More...
 
void ahrs_propagate (void)
 Propagation. More...
 
void ahrs_align (void)
 Aligns the AHRS. More...
 
void ahrs_update_accel (void)
 Update AHRS state with accerleration measurements. More...
 
void ahrs_update_mag (void)
 Update AHRS state with magnetometer measurements. More...
 
void ahrs_update_gps (void)
 Update AHRS state with GPS measurements. More...
 

Variables

struct AhrsIntExternQuat ahrs_impl
 

Detailed Description

AHRS interface for multiple IMU/AHRS subsystems, such as GX3, UM6 etc.

Propagates the estimated attitude and rates from IMU to body states. Quaternion calculation is used.

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_extern_quat.c.

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 75 of file ahrs_extern_quat.c.

void ahrs_init ( void  )

AHRS initialization.

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

Definition at line 38 of file ahrs_extern_quat.c.

References ahrs, ahrs_impl, AHRS_RUNNING, AHRS_UNINIT, Imu::body_to_imu_quat, imu, AhrsIntExternQuat::imu_rate, INT_RATES_ZERO, LED_ON, AhrsIntExternQuat::ltp_to_imu_quat, AhrsIntExternQuat::mag_offset, QUAT_COPY, and Ahrs::status.

void ahrs_propagate ( void  )

Propagation.

Usually integrates the gyro rates to angles. Reads the global imu data struct. Needs to be implemented by each AHRS algorithm.

Definition at line 59 of file ahrs_extern_quat.c.

References ahrs_impl, Imu::body_to_imu_quat, Imu::body_to_imu_rmat, Imu::gyro, imu, AhrsIntExternQuat::imu_rate, INT32_QUAT_COMP_INV, INT32_RMAT_TRANSP_RATEMULT, AhrsIntExternQuat::ltp_to_imu_quat, stateSetBodyRates_i(), and stateSetNedToBodyQuat_i().

+ Here is the call graph for this function:

void ahrs_update_accel ( void  )

Update AHRS state with accerleration measurements.

Reads the global imu data struct. Needs to be implemented by each AHRS algorithm.

Definition at line 78 of file ahrs_extern_quat.c.

void ahrs_update_gps ( void  )

Update AHRS state with GPS measurements.

Reads the global gps data struct. Needs to be implemented by each AHRS algorithm.

Definition at line 84 of file ahrs_extern_quat.c.

void ahrs_update_mag ( void  )

Update AHRS state with magnetometer measurements.

Reads the global imu data struct. Needs to be implemented by each AHRS algorithm.

Definition at line 81 of file ahrs_extern_quat.c.

Variable Documentation

struct AhrsIntExternQuat ahrs_impl

Definition at line 36 of file ahrs_extern_quat.c.

Referenced by ahrs_init(), and ahrs_propagate().