Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Attitude estimation for fixedwings based on the DCM. More...
#include <inttypes.h>
#include "math/pprz_algebra_float.h"
#include "math/pprz_orientation_conversion.h"
#include "modules/gps/gps.h"
Go to the source code of this file.
Data Structures | |
struct | AhrsFloatDCM |
Macros | |
#define | Kp_ROLLPITCH 0.015 |
#define | Ki_ROLLPITCH 0.000010 |
#define | Kp_YAW 0.9 |
#define | Ki_YAW 0.00005 |
#define | GRAVITY 9.81 |
#define | OUTPUTMODE 1 |
#define | AHRS_FLOAT_MIN_SPEED_GPS_COURSE 5 |
#define | PERFORMANCE_REPORTING 1 |
Enumerations | |
enum | AhrsDCMStatus { AHRS_DCM_UNINIT , AHRS_DCM_RUNNING } |
Functions | |
void | ahrs_dcm_init (void) |
bool | ahrs_dcm_align (struct FloatRates *lp_gyro, struct FloatVect3 *lp_accel, struct FloatVect3 *lp_mag) |
void | ahrs_dcm_propagate (struct FloatRates *gyro, float dt) |
void | ahrs_dcm_update_accel (struct FloatVect3 *accel) |
void | ahrs_dcm_update_mag (struct FloatVect3 *mag) |
void | ahrs_dcm_update_gps (struct GpsState *gps_s) |
Variables | |
struct AhrsFloatDCM | ahrs_dcm |
int | renorm_sqrt_count |
int | renorm_blowup_count |
float | imu_health |
Attitude estimation for fixedwings based on the DCM.
Theory: http://code.google.com/p/gentlenav/downloads/list file DCMDraft2.pdf
Definition in file ahrs_float_dcm.h.
struct AhrsFloatDCM |
Definition at line 37 of file ahrs_float_dcm.h.
Data Fields | ||
---|---|---|
struct FloatRates | body_rate | |
float | gps_acceleration | |
uint8_t | gps_age | |
float | gps_course | |
bool | gps_course_valid | |
float | gps_speed | |
struct FloatRates | gyro_bias | |
bool | is_aligned | |
struct FloatEulers | ltp_to_body_euler | |
struct FloatRates | rate_correction | |
enum AhrsDCMStatus | status |
#define AHRS_FLOAT_MIN_SPEED_GPS_COURSE 5 |
Definition at line 74 of file ahrs_float_dcm.h.
#define GRAVITY 9.81 |
Definition at line 63 of file ahrs_float_dcm.h.
#define Ki_ROLLPITCH 0.000010 |
Definition at line 59 of file ahrs_float_dcm.h.
#define Ki_YAW 0.00005 |
Definition at line 61 of file ahrs_float_dcm.h.
#define Kp_ROLLPITCH 0.015 |
Definition at line 58 of file ahrs_float_dcm.h.
#define Kp_YAW 0.9 |
Definition at line 60 of file ahrs_float_dcm.h.
#define OUTPUTMODE 1 |
Definition at line 67 of file ahrs_float_dcm.h.
#define PERFORMANCE_REPORTING 1 |
Definition at line 77 of file ahrs_float_dcm.h.
enum AhrsDCMStatus |
Enumerator | |
---|---|
AHRS_DCM_UNINIT | |
AHRS_DCM_RUNNING |
Definition at line 32 of file ahrs_float_dcm.h.
bool ahrs_dcm_align | ( | struct FloatRates * | lp_gyro, |
struct FloatVect3 * | lp_accel, | ||
struct FloatVect3 * | lp_mag | ||
) |
Definition at line 120 of file ahrs_float_dcm.c.
References ahrs_dcm, AHRS_DCM_RUNNING, ahrs_float_get_quat_from_accel(), ahrs_float_get_quat_from_accel_mag(), float_eulers_of_quat(), float_rmat_of_quat(), AhrsFloatDCM::gyro_bias, AhrsFloatDCM::is_aligned, AhrsFloatDCM::ltp_to_body_euler, set_dcm_matrix_from_rmat(), and AhrsFloatDCM::status.
Referenced by aligner_cb().
void ahrs_dcm_init | ( | void | ) |
Definition at line 99 of file ahrs_float_dcm.c.
References ahrs_dcm, AHRS_DCM_UNINIT, AhrsFloatDCM::body_rate, FLOAT_EULERS_ZERO, FLOAT_RATES_ZERO, float_rmat_identity(), AhrsFloatDCM::gps_acceleration, AhrsFloatDCM::gps_age, AhrsFloatDCM::gps_course, AhrsFloatDCM::gps_course_valid, AhrsFloatDCM::gps_speed, AhrsFloatDCM::is_aligned, AhrsFloatDCM::ltp_to_body_euler, set_dcm_matrix_from_rmat(), and AhrsFloatDCM::status.
Referenced by ahrs_dcm_register().
void ahrs_dcm_propagate | ( | struct FloatRates * | gyro, |
float | dt | ||
) |
Definition at line 149 of file ahrs_float_dcm.c.
References ahrs_dcm, AhrsFloatDCM::body_rate, compute_ahrs_representations(), AhrsFloatDCM::gyro_bias, Matrix_update(), Normalize(), FloatRates::p, FloatRates::q, FloatRates::r, and RATES_DIFF.
Referenced by gyro_cb().
void ahrs_dcm_update_accel | ( | struct FloatVect3 * | accel | ) |
Definition at line 201 of file ahrs_float_dcm.c.
References accel_float, ahrs_dcm, Drift_correction(), AhrsFloatDCM::gps_acceleration, AhrsFloatDCM::gps_age, AhrsFloatDCM::gps_speed, Omega, PRINT_CONFIG_MSG(), FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by accel_cb().
void ahrs_dcm_update_gps | ( | struct GpsState * | gps_s | ) |
void ahrs_dcm_update_mag | ( | struct FloatVect3 * | mag | ) |
Definition at line 228 of file ahrs_float_dcm.c.
References ahrs_dcm, DefaultChannel, DefaultDevice, AhrsFloatDCM::ltp_to_body_euler, MAG_Heading_X, MAG_Heading_Y, FloatEulers::phi, FloatEulers::theta, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by mag_cb().
|
extern |
Definition at line 1 of file ahrs_float_dcm.c.
Referenced by accel_cb(), ahrs_dcm_align(), ahrs_dcm_init(), ahrs_dcm_propagate(), ahrs_dcm_update_accel(), ahrs_dcm_update_gps(), ahrs_dcm_update_mag(), aligner_cb(), compute_ahrs_representations(), Drift_correction(), gyro_cb(), mag_cb(), Matrix_update(), send_filter_status(), and set_body_orientation_and_rates().
|
extern |
Referenced by Drift_correction().
|
extern |
Referenced by Normalize().
|
extern |
Referenced by Normalize().