|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/meteo/wind_estimation_quadrotor.h"#include "filters/linear_kalman_filter.h"#include "math/pprz_isa.h"#include "state.h"#include "generated/airframe.h"#include "modules/datalink/downlink.h"#include "generated/modules.h"#include "modules/core/abi.h"#include "mcu_periph/sys_time.h"#include "modules/air_data/air_data.h"#include "modules/datalink/telemetry.h"Go to the source code of this file.
Data Structures | |
| struct | wind_estimation_quadrotor |
Macros | |
| #define | WE_QUAD_STATUS_IDLE 0 |
| #define | WE_QUAD_STATUS_RUN 1 |
| #define | WE_QUAD_STATE_SIZE 4 |
| #define | WE_QUAD_CMD_SIZE 2 |
| #define | WE_QUAD_MEAS_SIZE 2 |
| #define | WE_QUAD_VA_X 0 |
| #define | WE_QUAD_W_X 1 |
| #define | WE_QUAD_VA_Y 2 |
| #define | WE_QUAD_W_Y 3 |
| #define | WE_QUAD_P0_VA 1.f |
| #define | WE_QUAD_P0_W 1.f |
| #define | WE_QUAD_Q_VA .05f |
| #define | WE_QUAD_Q_W .001f |
| #define | WE_QUAD_R .5f |
| #define | WE_QUAD_UPDATE_STATE TRUE |
Functions | |
| static void | send_wind (struct transport_tx *trans, struct link_device *dev) |
| static void | wind_estimation_quadrotor_reset (void) |
| void | wind_estimation_quadrotor_init (void) |
| void | wind_estimation_quadrotor_periodic (void) |
| void | wind_estimation_quadrotor_stop (void) |
| void | wind_estimation_quadrotor_start (void) |
| float | wind_estimation_quadrotor_SetQva (float Q_va) |
| float | wind_estimation_quadrotor_SetQw (float Q_w) |
| float | wind_estimation_quadrotor_SetR (float R) |
| void | wind_estimation_quadrotor_report (void) |
Variables | |
| static const float | we_dt = WIND_ESTIMATION_QUADROTOR_PERIODIC_PERIOD |
| static struct wind_estimation_quadrotor | we_quad |
| struct wind_estimation_quadrotor_params | we_quad_params |
Definition in file wind_estimation_quadrotor.c.
| struct wind_estimation_quadrotor |
Definition at line 82 of file wind_estimation_quadrotor.c.
| Data Fields | ||
|---|---|---|
| struct linear_kalman_filter | filter | |
| uint8_t | status | |
| #define WE_QUAD_CMD_SIZE 2 |
Definition at line 45 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init(), and wind_estimation_quadrotor_periodic().
| #define WE_QUAD_MEAS_SIZE 2 |
Definition at line 46 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init(), and wind_estimation_quadrotor_periodic().
| #define WE_QUAD_P0_VA 1.f |
Definition at line 54 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_reset().
| #define WE_QUAD_P0_W 1.f |
Definition at line 58 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_reset().
| #define WE_QUAD_Q_VA .05f |
Definition at line 62 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init().
| #define WE_QUAD_Q_W .001f |
Definition at line 66 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init().
| #define WE_QUAD_R .5f |
Definition at line 70 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init().
| #define WE_QUAD_STATE_SIZE 4 |
Definition at line 44 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init(), wind_estimation_quadrotor_report(), and wind_estimation_quadrotor_reset().
| #define WE_QUAD_STATUS_IDLE 0 |
Definition at line 41 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init(), and wind_estimation_quadrotor_stop().
| #define WE_QUAD_STATUS_RUN 1 |
Definition at line 42 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_start().
| #define WE_QUAD_UPDATE_STATE TRUE |
Definition at line 75 of file wind_estimation_quadrotor.c.
| #define WE_QUAD_VA_X 0 |
Definition at line 48 of file wind_estimation_quadrotor.c.
Referenced by send_wind(), and wind_estimation_quadrotor_periodic().
| #define WE_QUAD_VA_Y 2 |
Definition at line 50 of file wind_estimation_quadrotor.c.
Referenced by send_wind(), and wind_estimation_quadrotor_periodic().
| #define WE_QUAD_W_X 1 |
Definition at line 49 of file wind_estimation_quadrotor.c.
Referenced by send_wind(), and wind_estimation_quadrotor_periodic().
| #define WE_QUAD_W_Y 3 |
Definition at line 51 of file wind_estimation_quadrotor.c.
Referenced by send_wind(), and wind_estimation_quadrotor_periodic().
|
static |
Definition at line 214 of file wind_estimation_quadrotor.c.
References dev, float_vect2_norm(), we_quad, WE_QUAD_VA_X, WE_QUAD_VA_Y, WE_QUAD_W_X, and WE_QUAD_W_Y.
| void wind_estimation_quadrotor_init | ( | void | ) |
Definition at line 99 of file wind_estimation_quadrotor.c.
References DefaultPeriodic, linear_kalman_filter_init(), register_periodic_telemetry(), send_wind(), we_dt, we_quad, WE_QUAD_CMD_SIZE, WE_QUAD_MEAS_SIZE, we_quad_params, WE_QUAD_Q_VA, WE_QUAD_Q_W, WE_QUAD_R, WE_QUAD_STATE_SIZE, WE_QUAD_STATUS_IDLE, and wind_estimation_quadrotor_reset().
| void wind_estimation_quadrotor_periodic | ( | void | ) |
Definition at line 134 of file wind_estimation_quadrotor.c.
References AIRSPEED_WE_QUAD_ID, eas_from_tas(), float_rmat_transp_vmult(), float_vect2_norm(), get_sys_time_usec(), linear_kalman_filter_predict(), linear_kalman_filter_update(), MAT33_ELMT, PPRZ_ISA_GRAVITY, stateGetNedToBodyRMat_f(), stateGetSpeedNed_f(), stateSetHorizontalWindspeed_f(), we_quad, WE_QUAD_CMD_SIZE, WE_QUAD_MEAS_SIZE, WE_QUAD_VA_X, WE_QUAD_VA_Y, WE_QUAD_W_X, WE_QUAD_W_Y, FloatVect3::x, NedCoor_f::x, FloatVect3::y, and NedCoor_f::y.
| void wind_estimation_quadrotor_report | ( | void | ) |
Definition at line 209 of file wind_estimation_quadrotor.c.
References DefaultChannel, DefaultDevice, we_quad, and WE_QUAD_STATE_SIZE.
|
static |
Definition at line 90 of file wind_estimation_quadrotor.c.
References float_vect_zero(), we_quad, WE_QUAD_P0_VA, WE_QUAD_P0_W, and WE_QUAD_STATE_SIZE.
Referenced by wind_estimation_quadrotor_init(), and wind_estimation_quadrotor_start().
| float wind_estimation_quadrotor_SetQva | ( | float | Q_va | ) |
Definition at line 185 of file wind_estimation_quadrotor.c.
References we_quad, and we_quad_params.
| float wind_estimation_quadrotor_SetQw | ( | float | Q_w | ) |
Definition at line 193 of file wind_estimation_quadrotor.c.
References we_quad, and we_quad_params.
| float wind_estimation_quadrotor_SetR | ( | float | R | ) |
Definition at line 201 of file wind_estimation_quadrotor.c.
References we_quad, and we_quad_params.
| void wind_estimation_quadrotor_start | ( | void | ) |
Definition at line 179 of file wind_estimation_quadrotor.c.
References we_quad, WE_QUAD_STATUS_RUN, and wind_estimation_quadrotor_reset().
| void wind_estimation_quadrotor_stop | ( | void | ) |
Definition at line 170 of file wind_estimation_quadrotor.c.
References stateSetHorizontalWindspeed_f(), we_quad, and WE_QUAD_STATUS_IDLE.
|
static |
Definition at line 78 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init().
|
static |
Definition at line 87 of file wind_estimation_quadrotor.c.
Referenced by send_wind(), wind_estimation_quadrotor_init(), wind_estimation_quadrotor_periodic(), wind_estimation_quadrotor_report(), wind_estimation_quadrotor_reset(), wind_estimation_quadrotor_SetQva(), wind_estimation_quadrotor_SetQw(), wind_estimation_quadrotor_SetR(), wind_estimation_quadrotor_start(), and wind_estimation_quadrotor_stop().
| struct wind_estimation_quadrotor_params we_quad_params |
Definition at line 88 of file wind_estimation_quadrotor.c.
Referenced by wind_estimation_quadrotor_init(), wind_estimation_quadrotor_SetQva(), wind_estimation_quadrotor_SetQw(), and wind_estimation_quadrotor_SetR().