Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ahrs_int_cmpl_euler.c File Reference
#include "ahrs_int_cmpl_euler.h"
#include "subsystems/imu.h"
#include "subsystems/ahrs/ahrs_aligner.h"
#include "math/pprz_trig_int.h"
#include "math/pprz_algebra_int.h"
#include "generated/airframe.h"
+ Include dependency graph for ahrs_int_cmpl_euler.c:

Go to the source code of this file.

Macros

#define FACE_REINJ_1   1024
 
#define F_UPDATE   512
 
#define PI_INTEG_EULER   (INT32_ANGLE_PI * F_UPDATE)
 
#define TWO_PI_INTEG_EULER   (INT32_ANGLE_2_PI * F_UPDATE)
 
#define INTEG_EULER_NORMALIZE(_a)
 
#define NOISE_FILTER_GAIN   50
 

Functions

static void get_phi_theta_measurement_fom_accel (int32_t *phi_meas, int32_t *theta_meas, struct Int32Vect3 accel)
 
static void get_psi_measurement_from_mag (int32_t *psi_meas, int32_t phi_est, int32_t theta_est, struct Int32Vect3 mag)
 
static void compute_imu_quat_and_rmat_from_euler (void)
 
static void compute_body_orientation (void)
 
void ahrs_init (void)
 AHRS initialization. More...
 
void ahrs_align (void)
 Aligns the AHRS. More...
 
void ahrs_propagate (void)
 Propagation. 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)
 
 __attribute__ ((always_inline))
 

Variables

struct AhrsIntCmplEuler ahrs_impl
 

Macro Definition Documentation

#define F_UPDATE   512

Definition at line 43 of file ahrs_int_cmpl_euler.c.

Referenced by __attribute__(), ahrs_align(), and ahrs_propagate().

#define FACE_REINJ_1   1024

Definition at line 32 of file ahrs_int_cmpl_euler.c.

Referenced by ahrs_init().

#define INTEG_EULER_NORMALIZE (   _a)
Value:
{ \
while (_a > PI_INTEG_EULER) _a -= TWO_PI_INTEG_EULER; \
while (_a < -PI_INTEG_EULER) _a += TWO_PI_INTEG_EULER; \
}
#define TWO_PI_INTEG_EULER
#define PI_INTEG_EULER

Definition at line 47 of file ahrs_int_cmpl_euler.c.

Referenced by ahrs_propagate().

#define NOISE_FILTER_GAIN   50

Definition at line 100 of file ahrs_int_cmpl_euler.c.

Referenced by ahrs_propagate(), and ahrs_update_accel().

#define PI_INTEG_EULER   (INT32_ANGLE_PI * F_UPDATE)

Definition at line 45 of file ahrs_int_cmpl_euler.c.

#define TWO_PI_INTEG_EULER   (INT32_ANGLE_2_PI * F_UPDATE)

Definition at line 46 of file ahrs_int_cmpl_euler.c.

Function Documentation

__attribute__ ( (always_inline)  )
void ahrs_align ( void  )
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 200 of file ahrs_int_cmpl_euler.c.

References Imu::accel, ahrs_impl, get_phi_theta_measurement_fom_accel(), imu, AhrsIntCmplEuler::measurement, NOISE_FILTER_GAIN, Int32Eulers::phi, Int32Eulers::theta, VECT3_COPY, VECT3_SDIV, and VECT3_SUM_SCALED.

+ Here is the call graph for this function:

void ahrs_update_gps ( void  )

Definition at line 227 of file ahrs_int_cmpl_euler.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 221 of file ahrs_int_cmpl_euler.c.

References ahrs, ahrs_impl, get_psi_measurement_from_mag(), imu, Ahrs::ltp_to_imu_euler, Imu::mag, AhrsIntCmplEuler::measurement, Int32Eulers::phi, Int32Eulers::psi, and Int32Eulers::theta.

+ Here is the call graph for this function:

static void compute_body_orientation ( void  )
inlinestatic

Referenced by ahrs_align(), and ahrs_propagate().

+ Here is the caller graph for this function:

static void compute_imu_quat_and_rmat_from_euler ( void  )
inlinestatic

Referenced by ahrs_align(), and ahrs_propagate().

+ Here is the caller graph for this function:

static void get_phi_theta_measurement_fom_accel ( int32_t phi_meas,
int32_t theta_meas,
struct Int32Vect3  accel 
)
inlinestatic

Referenced by ahrs_align(), and ahrs_update_accel().

+ Here is the caller graph for this function:

static void get_psi_measurement_from_mag ( int32_t psi_meas,
int32_t  phi_est,
int32_t  theta_est,
struct Int32Vect3  mag 
)
inlinestatic

Referenced by ahrs_align(), and ahrs_update_mag().

+ Here is the caller graph for this function:

Variable Documentation

struct AhrsIntCmplEuler ahrs_impl