Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "subsystems/ahrs.h"
#include "std.h"
#include "math/pprz_algebra_int.h"
#include "math/pprz_orientation_conversion.h"
Go to the source code of this file.
Data Structures | |
struct | AhrsIntCmplEuler |
Enumerations | |
enum | AhrsICEStatus { AHRS_ICE_UNINIT, AHRS_ICE_RUNNING } |
Functions | |
void | ahrs_ice_init (void) |
void | ahrs_ice_set_body_to_imu (struct OrientationReps *body_to_imu) |
void | ahrs_ice_set_body_to_imu_quat (struct FloatQuat *q_b2i) |
bool | ahrs_ice_align (struct Int32Rates *lp_gyro, struct Int32Vect3 *lp_accel, struct Int32Vect3 *lp_mag) |
void | ahrs_ice_propagate (struct Int32Rates *gyro) |
void | ahrs_ice_update_accel (struct Int32Vect3 *accel) |
void | ahrs_ice_update_mag (struct Int32Vect3 *mag) |
Variables | |
struct AhrsIntCmplEuler | ahrs_ice |
Complementary filter in euler representation (fixed-point).
Definition in file ahrs_int_cmpl_euler.h.
struct AhrsIntCmplEuler |
Definition at line 43 of file ahrs_int_cmpl_euler.h.
Data Fields | ||
---|---|---|
struct OrientationReps | body_to_imu | |
struct Int32Rates | gyro_bias | |
struct Int32Eulers | hi_res_euler | |
struct Int32Rates | imu_rate | |
bool | is_aligned | |
struct Int32Eulers | ltp_to_imu_euler | |
float | mag_offset | |
struct Int32Eulers | measure | |
struct Int32Eulers | measurement | |
int32_t | reinj_1 | |
struct Int32Eulers | residual | |
enum AhrsICEStatus | status |
enum AhrsICEStatus |
Enumerator | |
---|---|
AHRS_ICE_UNINIT | |
AHRS_ICE_RUNNING |
Definition at line 38 of file ahrs_int_cmpl_euler.h.
bool ahrs_ice_align | ( | struct Int32Rates * | lp_gyro, |
struct Int32Vect3 * | lp_accel, | ||
struct Int32Vect3 * | lp_mag | ||
) |
Definition at line 78 of file ahrs_int_cmpl_euler.c.
References ahrs_ice, AHRS_ICE_RUNNING, EULERS_COPY, EULERS_SDIV, F_UPDATE, get_phi_theta_measurement_fom_accel(), get_psi_measurement_from_mag(), AhrsIntCmplEuler::gyro_bias, AhrsIntCmplEuler::hi_res_euler, AhrsIntCmplEuler::is_aligned, AhrsIntCmplEuler::ltp_to_imu_euler, AhrsIntCmplEuler::measure, AhrsIntCmplEuler::measurement, Int32Eulers::phi, Int32Eulers::psi, RATES_COPY, AhrsIntCmplEuler::status, and Int32Eulers::theta.
Referenced by aligner_cb().
void ahrs_ice_init | ( | void | ) |
Definition at line 63 of file ahrs_int_cmpl_euler.c.
References ahrs_ice, AHRS_ICE_UNINIT, AHRS_MAG_OFFSET, FACE_REINJ_1, AhrsIntCmplEuler::gyro_bias, AhrsIntCmplEuler::imu_rate, INT_EULERS_ZERO, INT_RATES_ZERO, AhrsIntCmplEuler::is_aligned, AhrsIntCmplEuler::ltp_to_imu_euler, AhrsIntCmplEuler::mag_offset, AhrsIntCmplEuler::reinj_1, and AhrsIntCmplEuler::status.
Referenced by ahrs_ice_register().
void ahrs_ice_propagate | ( | struct Int32Rates * | gyro | ) |
Definition at line 154 of file ahrs_int_cmpl_euler.c.
References ahrs_ice, EULERS_ADD, EULERS_DIFF, EULERS_SDIV, F_UPDATE, AhrsIntCmplEuler::gyro_bias, AhrsIntCmplEuler::hi_res_euler, AhrsIntCmplEuler::imu_rate, int32_eulers_dot_of_rates, INTEG_EULER_NORMALIZE, AhrsIntCmplEuler::ltp_to_imu_euler, AhrsIntCmplEuler::measure, AhrsIntCmplEuler::measurement, NOISE_FILTER_GAIN, Int32Eulers::psi, RATES_ADD, RATES_COPY, RATES_DIFF, RATES_SDIV, RATES_SUM_SCALED, AhrsIntCmplEuler::reinj_1, and AhrsIntCmplEuler::residual.
Referenced by gyro_cb().
void ahrs_ice_set_body_to_imu | ( | struct OrientationReps * | body_to_imu | ) |
Definition at line 277 of file ahrs_int_cmpl_euler.c.
References ahrs_ice_set_body_to_imu_quat(), body_to_imu, and orientationGetQuat_f().
void ahrs_ice_set_body_to_imu_quat | ( | struct FloatQuat * | q_b2i | ) |
Definition at line 282 of file ahrs_int_cmpl_euler.c.
References ahrs_ice, AhrsIntCmplEuler::body_to_imu, AhrsIntCmplEuler::is_aligned, AhrsIntCmplEuler::ltp_to_imu_euler, orientationGetEulers_i(), and orientationSetQuat_f().
Referenced by ahrs_ice_set_body_to_imu(), and body_to_imu_cb().
void ahrs_ice_update_accel | ( | struct Int32Vect3 * | accel | ) |
Definition at line 202 of file ahrs_int_cmpl_euler.c.
References ahrs_ice, get_phi_theta_measurement_fom_accel(), AhrsIntCmplEuler::measurement, NOISE_FILTER_GAIN, Int32Eulers::phi, Int32Eulers::theta, VECT3_COPY, VECT3_SDIV, and VECT3_SUM_SCALED.
Referenced by accel_cb().
void ahrs_ice_update_mag | ( | struct Int32Vect3 * | mag | ) |
Definition at line 224 of file ahrs_int_cmpl_euler.c.
References ahrs_ice, get_psi_measurement_from_mag(), AhrsIntCmplEuler::ltp_to_imu_euler, AhrsIntCmplEuler::measurement, Int32Eulers::phi, Int32Eulers::psi, and Int32Eulers::theta.
Referenced by mag_cb().
struct AhrsIntCmplEuler ahrs_ice |
Definition at line 46 of file ahrs_int_cmpl_euler.c.
Referenced by accel_cb(), ahrs_ice_align(), ahrs_ice_init(), ahrs_ice_propagate(), ahrs_ice_set_body_to_imu_quat(), ahrs_ice_update_accel(), ahrs_ice_update_mag(), aligner_cb(), get_psi_measurement_from_mag(), gyro_cb(), mag_cb(), send_bias(), send_euler(), send_filter(), send_filter_status(), and set_body_state_from_euler().