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_float_cmpl.h File Reference

Complementary filter in float to estimate the attitude, heading and gyro bias. More...

#include "std.h"
+ Include dependency graph for ahrs_float_cmpl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AhrsFloatCmpl
 

Functions

void ahrs_update_heading (float heading)
 Update yaw based on a heading measurement. More...
 
void ahrs_realign_heading (float heading)
 Hard reset yaw to a heading. More...
 

Variables

struct AhrsFloatCmpl ahrs_impl
 

Detailed Description

Complementary filter in float to estimate the attitude, heading and gyro bias.

Propagation can be done in rotation matrix or quaternion representation.

Definition in file ahrs_float_cmpl.h.

Function Documentation

void ahrs_realign_heading ( float  heading)

Hard reset yaw to a heading.

Doesn't affect the bias. Sets ahrs_impl.heading_aligned to TRUE.

Parameters
headingHeading in body frame, radians (CW/north)

Definition at line 387 of file ahrs_float_cmpl.c.

References ahrs_impl, AhrsFloatCmpl::body_to_imu_quat, FLOAT_ANGLE_NORMALIZE, FLOAT_QUAT_COMP, FLOAT_QUAT_COMP_NORM_SHORTEST, FLOAT_QUAT_INV_COMP_NORM_SHORTEST, FLOAT_QUAT_NORMALIZE, FLOAT_RMAT_OF_QUAT, AhrsFloatCmpl::heading_aligned, AhrsFloatCmpl::ltp_to_imu_quat, AhrsFloatCmpl::ltp_to_imu_rmat, FloatQuat::qi, QUAT_COPY, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, stateGetNedToBodyQuat_f(), stateSetNedToBodyQuat_f(), and TRUE.

Referenced by ahrs_update_gps().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ahrs_update_heading ( float  heading)

Update yaw based on a heading measurement.

e.g. from GPS course

Parameters
headingHeading in body frame, radians (CW/north)

Definition at line 349 of file ahrs_float_cmpl.c.

References ahrs_impl, FLOAT_ANGLE_NORMALIZE, FLOAT_RATES_ADD_SCALED_VECT, FLOAT_RMAT_VECT3_MUL, AhrsFloatCmpl::gyro_bias, AhrsFloatCmpl::ltp_to_imu_rmat, AhrsFloatCmpl::rate_correction, RMAT_ELMT, stateGetNedToBodyRMat_f(), FloatVect2::x, FloatVect2::y, and FloatVect3::z.

Referenced by ahrs_update_gps().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct AhrsFloatCmpl ahrs_impl

Definition at line 40 of file ahrs_ardrone2.c.