Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
ekf_aw.h File Reference
#include "std.h"
#include "math/pprz_algebra_float.h"
#include "math/pprz_geodetic_float.h"
+ Include dependency graph for ekf_aw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ekfAwParameters
 
struct  ekfHealth
 

Macros

#define ekf_aw_update_Q_accel(_v)
 
#define ekf_aw_update_Q_gyro(_v)
 
#define ekf_aw_update_Q_mu(_v)
 
#define ekf_aw_update_Q_k(_v)
 
#define ekf_aw_update_R_V_gnd(_v)
 
#define ekf_aw_update_R_accel_filt_x(_v)
 
#define ekf_aw_update_R_accel_filt_y(_v)
 
#define ekf_aw_update_R_accel_filt_z(_v)
 
#define ekf_aw_update_R_V_pitot(_v)
 

Functions

void ekf_aw_init (void)
 
void ekf_aw_reset (void)
 
void ekf_aw_propagate (struct FloatVect3 *acc, struct FloatRates *gyro, struct FloatEulers *euler, float *pusher_RPM, float *hover_RPM_array, float *skew, float *elevator_angle, struct FloatVect3 *V_gnd, struct FloatVect3 *acc_filt, float *V_pitot, float dt)
 
struct NedCoor_f ekf_aw_get_speed_body (void)
 
struct NedCoor_f ekf_aw_get_wind_ned (void)
 
struct NedCoor_f ekf_aw_get_offset (void)
 
struct FloatVect3 ekf_aw_get_innov_V_gnd (void)
 
struct FloatVect3 ekf_aw_get_innov_accel_filt (void)
 
float ekf_aw_get_innov_V_pitot (void)
 
void ekf_aw_get_meas_cov (float meas_cov[7])
 
void ekf_aw_get_state_cov (float state_cov[9])
 
void ekf_aw_get_process_cov (float process_cov[9])
 
void ekf_aw_get_fuselage_force (float force[3])
 
void ekf_aw_get_wing_force (float force[3])
 
void ekf_aw_get_elevator_force (float force[3])
 
void ekf_aw_get_hover_force (float force[3])
 
void ekf_aw_get_pusher_force (float force[3])
 
struct ekfAwParametersekf_aw_get_param_handle (void)
 
void ekf_aw_set_speed_body (struct NedCoor_f *s)
 
void ekf_aw_set_wind (struct NedCoor_f *s)
 
void ekf_aw_set_offset (struct NedCoor_f *s)
 
struct ekfHealth ekf_aw_get_health (void)
 
void ekf_aw_update_params (void)
 
void ekf_aw_reset_health (void)
 

Variables

struct ekfAwParameters ekf_aw_params
 

Data Structure Documentation

◆ ekfAwParameters

struct ekfAwParameters

Definition at line 13 of file ekf_aw.h.

Data Fields
float k_fx_drag[2]
float k_fx_elev[3]
float k_fx_fuselage[4]
float k_fx_hover[3]
float k_fx_push[3]
float k_fx_wing[5]
float k_fy_beta
float k_fy_v
float k_fy_wing[5]
float k_fz_elev[2]
float k_fz_fuselage[4]
float k_fz_hover[5]
float k_fz_wing[4]
bool propagate_offset
float Q_accel accel process noise
float Q_gyro gyro process noise
float Q_k offset process noise
float Q_mu wind process noise
bool quick_convergence
float R_accel_filt[3] filtered accel measurement noise
float R_V_gnd speed measurement noise
float R_V_pitot airspeed measurement noise
bool use_model[3]
bool use_pitot
float vehicle_mass

◆ ekfHealth

struct ekfHealth

Definition at line 54 of file ekf_aw.h.

Data Fields
uint16_t crashes_n
bool healthy

Macro Definition Documentation

◆ ekf_aw_update_Q_accel

#define ekf_aw_update_Q_accel (   _v)
Value:
{ \
ekf_aw_params.Q_accel = _v; \
ekf_aw_update_params(); \
}

Definition at line 98 of file ekf_aw.h.

◆ ekf_aw_update_Q_gyro

#define ekf_aw_update_Q_gyro (   _v)
Value:
{ \
ekf_aw_params.Q_gyro = _v; \
ekf_aw_update_params(); \
}

Definition at line 103 of file ekf_aw.h.

◆ ekf_aw_update_Q_k

#define ekf_aw_update_Q_k (   _v)
Value:
{ \
ekf_aw_params.Q_k = _v; \
ekf_aw_update_params(); \
}

Definition at line 113 of file ekf_aw.h.

◆ ekf_aw_update_Q_mu

#define ekf_aw_update_Q_mu (   _v)
Value:
{ \
ekf_aw_params.Q_mu = _v; \
ekf_aw_update_params(); \
}

Definition at line 108 of file ekf_aw.h.

◆ ekf_aw_update_R_accel_filt_x

#define ekf_aw_update_R_accel_filt_x (   _v)
Value:
{ \
ekf_aw_params.R_accel_filt[0] = _v; \
ekf_aw_update_params(); \
}

Definition at line 123 of file ekf_aw.h.

◆ ekf_aw_update_R_accel_filt_y

#define ekf_aw_update_R_accel_filt_y (   _v)
Value:
{ \
ekf_aw_params.R_accel_filt[1] = _v; \
ekf_aw_update_params(); \
}

Definition at line 128 of file ekf_aw.h.

◆ ekf_aw_update_R_accel_filt_z

#define ekf_aw_update_R_accel_filt_z (   _v)
Value:
{ \
ekf_aw_params.R_accel_filt[2] = _v; \
ekf_aw_update_params(); \
}

Definition at line 133 of file ekf_aw.h.

◆ ekf_aw_update_R_V_gnd

#define ekf_aw_update_R_V_gnd (   _v)
Value:
{ \
ekf_aw_params.R_V_gnd = _v; \
ekf_aw_update_params(); \
}

Definition at line 118 of file ekf_aw.h.

◆ ekf_aw_update_R_V_pitot

#define ekf_aw_update_R_V_pitot (   _v)
Value:
{ \
ekf_aw_params.R_V_pitot = _v; \
ekf_aw_update_params(); \
}

Definition at line 138 of file ekf_aw.h.

Function Documentation

◆ ekf_aw_get_elevator_force()

void ekf_aw_get_elevator_force ( float  force[3])

Definition at line 1392 of file ekf_aw.cpp.

References eawp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_fuselage_force()

void ekf_aw_get_fuselage_force ( float  force[3])

Definition at line 1374 of file ekf_aw.cpp.

References eawp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_health()

struct ekfHealth ekf_aw_get_health ( void  )

Definition at line 591 of file ekf_aw.cpp.

References deg2rad, E, eawp, EKF_AW_AOA_MAX_ANGLE, EKF_AW_AOA_MIN_ANGLE, EKF_AW_AX_SCHED_END_DEG, EKF_AW_AX_SCHED_GAIN, EKF_AW_AX_SCHED_START_DEG, EKF_AW_AZ_QUICK_CONV_ACCEL_GAIN, EKF_AW_AZ_QUICK_CONV_MU_GAIN, EKF_AW_AZ_SCHED_END_DEG, EKF_AW_AZ_SCHED_GAIN, EKF_AW_AZ_SCHED_START_DEG, EKF_AW_COV_SIZE, EKF_AW_DEBUG, EKF_AW_ELEV_MAX_ANGLE, EKF_AW_ELEV_MIN_ANGLE, ekf_aw_params, EKF_AW_Q_mu_x_index, EKF_AW_Q_mu_y_index, EKF_AW_R_a_x_filt_index, EKF_AW_R_a_y_filt_index, EKF_AW_R_a_z_filt_index, EKF_AW_R_SIZE, EKF_AW_SKEW_POLY_0, EKF_AW_SKEW_POLY_1, EKF_AW_SKEW_POLY_2, EKF_AW_USE_BETA, EKF_AW_WING_INSTALLED, fx_elevator(), fx_fuselage(), fx_fy_hover(), fx_pusher(), fx_wing(), fy_wing(), fz_elevator(), fz_fuselage(), fz_hover(), fz_wing(), get_sys_time_usec(), gravity(), K, ekfAwParameters::k_fx_drag, ekfAwParameters::k_fx_elev, ekfAwParameters::k_fx_fuselage, ekfAwParameters::k_fx_hover, ekfAwParameters::k_fx_push, ekfAwParameters::k_fx_wing, ekfAwParameters::k_fy_beta, ekfAwParameters::k_fy_v, ekfAwParameters::k_fy_wing, ekfAwParameters::k_fz_elev, ekfAwParameters::k_fz_fuselage, ekfAwParameters::k_fz_hover, ekfAwParameters::k_fz_wing, FloatRates::p, p, FloatEulers::phi, ekfAwParameters::propagate_offset, FloatEulers::psi, FloatRates::q, ekfAwParameters::Q_mu, ekfAwParameters::quick_convergence, FloatRates::r, ekfAwParameters::R_accel_filt, FloatEulers::theta, ekfAwParameters::use_model, ekfAwParameters::use_pitot, ekfAwParameters::vehicle_mass, FloatVect3::x, FloatVect3::y, and FloatVect3::z.

Referenced by ekf_aw_wrapper_periodic().

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

◆ ekf_aw_get_hover_force()

void ekf_aw_get_hover_force ( float  force[3])

Definition at line 1401 of file ekf_aw.cpp.

References eawp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_innov_accel_filt()

struct FloatVect3 ekf_aw_get_innov_accel_filt ( void  )

Definition at line 591 of file ekf_aw.cpp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_innov_V_gnd()

struct FloatVect3 ekf_aw_get_innov_V_gnd ( void  )

Definition at line 591 of file ekf_aw.cpp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_innov_V_pitot()

float ekf_aw_get_innov_V_pitot ( void  )

Definition at line 1323 of file ekf_aw.cpp.

References eawp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_meas_cov()

void ekf_aw_get_meas_cov ( float  meas_cov[7])

Definition at line 1329 of file ekf_aw.cpp.

References eawp, and EKF_AW_R_SIZE.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_offset()

struct NedCoor_f ekf_aw_get_offset ( void  )

Definition at line 591 of file ekf_aw.cpp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_param_handle()

struct ekfAwParameters* ekf_aw_get_param_handle ( void  )

Definition at line 1419 of file ekf_aw.cpp.

References ekf_aw_params.

Referenced by ekf_aw_wrapper_init().

+ Here is the caller graph for this function:

◆ ekf_aw_get_process_cov()

void ekf_aw_get_process_cov ( float  process_cov[9])

◆ ekf_aw_get_pusher_force()

void ekf_aw_get_pusher_force ( float  force[3])

Definition at line 1410 of file ekf_aw.cpp.

References eawp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_speed_body()

struct NedCoor_f ekf_aw_get_speed_body ( void  )

Definition at line 591 of file ekf_aw.cpp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_state_cov()

void ekf_aw_get_state_cov ( float  state_cov[9])

Definition at line 1344 of file ekf_aw.cpp.

References eawp, and EKF_AW_COV_SIZE.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_wind_ned()

struct NedCoor_f ekf_aw_get_wind_ned ( void  )

Definition at line 591 of file ekf_aw.cpp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_get_wing_force()

void ekf_aw_get_wing_force ( float  force[3])

Definition at line 1383 of file ekf_aw.cpp.

References eawp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_init()

void ekf_aw_init ( void  )

< accel process noise

< gyro process noise

< wind process noise

< offset process noise

< speed measurement noise

< filtered accel measurement noise

< airspeed measurement noise

Definition at line 457 of file ekf_aw.cpp.

References eawp, EKF_AW_K1_FX_DRAG, EKF_AW_K1_FX_ELEV, EKF_AW_K1_FX_FUSELAGE, EKF_AW_K1_FX_HOVER, EKF_AW_K1_FX_PUSH, EKF_AW_K1_FX_WING, EKF_AW_K1_FY_WING, EKF_AW_K1_FZ_ELEV, EKF_AW_K1_FZ_FUSELAGE, EKF_AW_K1_FZ_HOVER, EKF_AW_K1_FZ_WING, EKF_AW_K2_FX_DRAG, EKF_AW_K2_FX_ELEV, EKF_AW_K2_FX_FUSELAGE, EKF_AW_K2_FX_HOVER, EKF_AW_K2_FX_PUSH, EKF_AW_K2_FX_WING, EKF_AW_K2_FY_WING, EKF_AW_K2_FZ_ELEV, EKF_AW_K2_FZ_FUSELAGE, EKF_AW_K2_FZ_HOVER, EKF_AW_K2_FZ_WING, EKF_AW_K3_FX_ELEV, EKF_AW_K3_FX_FUSELAGE, EKF_AW_K3_FX_HOVER, EKF_AW_K3_FX_PUSH, EKF_AW_K3_FX_WING, EKF_AW_K3_FY_WING, EKF_AW_K3_FZ_FUSELAGE, EKF_AW_K3_FZ_HOVER, EKF_AW_K3_FZ_WING, EKF_AW_K4_FX_FUSELAGE, EKF_AW_K4_FX_WING, EKF_AW_K4_FY_WING, EKF_AW_K4_FZ_FUSELAGE, EKF_AW_K4_FZ_HOVER, EKF_AW_K4_FZ_WING, EKF_AW_K5_FX_WING, EKF_AW_K5_FY_WING, EKF_AW_K5_FZ_HOVER, EKF_AW_K_FY_BETA, EKF_AW_K_FY_V, ekf_aw_params, EKF_AW_PROPAGATE_OFFSET, EKF_AW_Q_ACCEL, EKF_AW_Q_GYRO, EKF_AW_Q_MU, EKF_AW_Q_OFFSET, EKF_AW_R_ACCEL_FILT_X, EKF_AW_R_ACCEL_FILT_Y, EKF_AW_R_ACCEL_FILT_Z, EKF_AW_R_V_GND, EKF_AW_R_V_PITOT, EKF_AW_USE_MODEL_BASED_X, EKF_AW_USE_MODEL_BASED_Y, EKF_AW_USE_MODEL_BASED_Z, EKF_AW_USE_PITOT, EKF_AW_VEHICLE_MASS, init_ekf_aw_state(), ekfAwParameters::k_fx_drag, ekfAwParameters::k_fx_elev, ekfAwParameters::k_fx_fuselage, ekfAwParameters::k_fx_hover, ekfAwParameters::k_fx_push, ekfAwParameters::k_fx_wing, ekfAwParameters::k_fy_beta, ekfAwParameters::k_fy_v, ekfAwParameters::k_fy_wing, ekfAwParameters::k_fz_elev, ekfAwParameters::k_fz_fuselage, ekfAwParameters::k_fz_hover, ekfAwParameters::k_fz_wing, ekfAwParameters::propagate_offset, ekfAwParameters::Q_accel, ekfAwParameters::Q_gyro, ekfAwParameters::Q_k, ekfAwParameters::Q_mu, ekfAwParameters::quick_convergence, ekfAwParameters::R_accel_filt, ekfAwParameters::R_V_gnd, ekfAwParameters::R_V_pitot, ekfAwParameters::use_model, ekfAwParameters::use_pitot, and ekfAwParameters::vehicle_mass.

Referenced by ekf_aw_wrapper_init().

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

◆ ekf_aw_propagate()

void ekf_aw_propagate ( struct FloatVect3 acc,
struct FloatRates gyro,
struct FloatEulers euler,
float *  pusher_RPM,
float *  hover_RPM_array,
float *  skew,
float *  elevator_angle,
struct FloatVect3 V_gnd,
struct FloatVect3 acc_filt,
float *  V_pitot,
float  dt 
)

Definition at line 591 of file ekf_aw.cpp.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_reset()

void ekf_aw_reset ( void  )

Definition at line 584 of file ekf_aw.cpp.

References init_ekf_aw_state().

+ Here is the call graph for this function:

◆ ekf_aw_reset_health()

void ekf_aw_reset_health ( void  )

Definition at line 1447 of file ekf_aw.cpp.

References eawp.

◆ ekf_aw_set_offset()

void ekf_aw_set_offset ( struct NedCoor_f s)

Definition at line 1440 of file ekf_aw.cpp.

References eawp, and s.

◆ ekf_aw_set_speed_body()

void ekf_aw_set_speed_body ( struct NedCoor_f s)

Definition at line 1426 of file ekf_aw.cpp.

References eawp, and s.

Referenced by ekf_aw_wrapper_periodic().

+ Here is the caller graph for this function:

◆ ekf_aw_set_wind()

void ekf_aw_set_wind ( struct NedCoor_f s)

Definition at line 1433 of file ekf_aw.cpp.

References eawp, and s.

◆ ekf_aw_update_params()

Variable Documentation

◆ ekf_aw_params