Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
ahrs_madgwick.c File Reference
#include "modules/ahrs/ahrs_madgwick.h"
#include "generated/airframe.h"
#include "math/pprz_algebra_float.h"
#include "modules/ahrs/ahrs_float_utils.h"
Include dependency graph for ahrs_madgwick.c:

Go to the source code of this file.

Macros

#define AHRS_MADGWICK_BETA   0.1f

Functions

static void init_state (void)
void ahrs_madgwick_init (void)
void ahrs_madgwick_align (struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel)
void ahrs_madgwick_propagate (struct FloatRates *gyro, float dt)
void ahrs_madgwick_update_accel (struct FloatVect3 *accel)

Variables

struct AhrsMadgwick ahrs_madgwick

Macro Definition Documentation

◆ AHRS_MADGWICK_BETA

#define AHRS_MADGWICK_BETA   0.1f

Definition at line 35 of file ahrs_madgwick.c.

Referenced by ahrs_madgwick_propagate().

Function Documentation

◆ ahrs_madgwick_align()

void ahrs_madgwick_align ( struct FloatRates * lp_gyro,
struct FloatVect3 * lp_accel )

Definition at line 59 of file ahrs_madgwick.c.

References ahrs_float_get_quat_from_accel(), and ahrs_madgwick.

Referenced by aligner_cb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ahrs_madgwick_init()

void ahrs_madgwick_init ( void )

Definition at line 50 of file ahrs_madgwick.c.

References ahrs_madgwick, and init_state().

Referenced by ahrs_madgwick_wrapper_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ahrs_madgwick_propagate()

void ahrs_madgwick_propagate ( struct FloatRates * gyro,
float dt )

Definition at line 69 of file ahrs_madgwick.c.

References ahrs_madgwick, AHRS_MADGWICK_BETA, float_quat_derivative(), float_quat_normalize(), float_vect3_norm(), init_state(), FloatQuat::qi, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, RATES_DIFF, VECT3_SDIV, FloatVect3::x, FloatVect3::y, and FloatVect3::z.

Referenced by gyro_cb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ahrs_madgwick_update_accel()

void ahrs_madgwick_update_accel ( struct FloatVect3 * accel)

Definition at line 139 of file ahrs_madgwick.c.

References ahrs_madgwick.

Referenced by accel_cb().

Here is the caller graph for this function:

◆ init_state()

void init_state ( void )
inlinestatic

Definition at line 43 of file ahrs_madgwick.c.

References ahrs_madgwick, float_quat_identity(), FLOAT_RATES_ZERO, and FLOAT_VECT3_ZERO.

Referenced by ahrs_madgwick_init(), and ahrs_madgwick_propagate().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ahrs_madgwick