Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
This module implements optical flow landings in which the divergence is kept constant. More...
#include "firmwares/rotorcraft/stabilization/stabilization_indi_simple.h"
#include "math/pprz_algebra_int.h"
#include "math/pprz_algebra_float.h"
#include "optical_flow_landing.h"
#include "generated/airframe.h"
#include "paparazzi.h"
#include "modules/core/abi.h"
#include "firmwares/rotorcraft/stabilization.h"
#include "firmwares/rotorcraft/stabilization/stabilization_attitude.h"
#include "firmwares/rotorcraft/guidance/guidance_v.h"
#include "firmwares/rotorcraft/guidance/guidance_v_adapt.h"
#include "autopilot.h"
#include "modules/nav/common_flight_plan.h"
#include "modules/datalink/telemetry.h"
#include "mcu_periph/sys_time.h"
#include "math/pprz_stat.h"
#include <stdio.h>
#include "modules/computer_vision/textons.h"
#include "math/pprz_matrix_decomp_float.h"
#include "math/pprz_simple_matrix.h"
Go to the source code of this file.
Functions | |
static void | send_divergence (struct transport_tx *trans, struct link_device *dev) |
void | vertical_ctrl_agl_cb (uint8_t sender_id, uint32_t stamp, float distance) |
Function definitions Callback function of the ground altitude. More... | |
void | vertical_ctrl_optical_flow_cb (uint8_t sender_id, uint32_t stamp, int32_t flow_x, int32_t flow_y, int32_t flow_der_x, int32_t flow_der_y, float quality, float size_divergence) |
static void | set_cov_div (int32_t thrust) |
Set the covariance of the divergence and the thrust / past divergence This funciton should only be called once per time step. More... | |
static int32_t | PID_divergence_control (float setpoint, float P, float I, float D, float dt) |
Determine and set the thrust for constant divergence control. More... | |
static void | update_errors (float err, float dt) |
Updates the integral and differential errors for PID control and sets the previous error. More... | |
static uint32_t | final_landing_procedure () |
Execute a final landing procedure. More... | |
static void | reset_all_vars (void) |
Reset all variables: More... | |
void | vertical_ctrl_module_run (bool in_flight) |
Run the optical flow landing module. More... | |
void | optical_flow_landing_init (void) |
Initialize the optical flow landing module. More... | |
void | guidance_module_enter (void) |
Entering the module (user switched to module) More... | |
void | guidance_module_run (bool in_flight) |
void | save_texton_distribution (void) |
void | load_texton_distribution (void) |
void | learn_from_file (void) |
void | recursive_least_squares_batch (float *targets, float **samples, uint8_t D, uint16_t count, float *params, float *fit_error) |
Recursively fit a linear model from samples to target values - batch mode, possibly for initialization. More... | |
void | recursive_least_squares (float target, float *sample, uint8_t length_sample, UNUSED float *params) |
void | fit_linear_model_OF (float *targets, float **samples, uint8_t D, uint16_t count, float *params, float *fit_error) |
Fit a linear model from samples to target values. More... | |
float | predict_gain (float *distribution) |
void | save_weights (void) |
void | load_weights (void) |
This module implements optical flow landings in which the divergence is kept constant.
When using a fixed gain for control, the covariance between thrust and divergence is tracked, so that the drone knows when it has arrived close to the landing surface. Then, a final landing procedure is triggered. It can also be set to adaptive gain control, where the goal is to continuously gauge the distance to the landing surface. In this mode, the drone will oscillate all the way down to the surface.
de Croon, G.C.H.E. (2016). Monocular distance estimation with optical flow maneuvers and efference copies: a stability-based strategy. Bioinspiration & biomimetics, 11(1), 016004. http://iopscience.iop.org/article/10.1088/1748-3190/11/1/016004
Based on the above theory, we have also developed a new strategy for landing that consists of two phases: (1) while hovering, the drone determines the optimal gain by increasing the gain until oscillation (2) the drone starts landing while exponentially decreasing the gain over time
This strategy leads to smooth, high-performance constant divergence landings, as explained in the article: H.W. Ho, G.C.H.E. de Croon, E. van Kampen, Q.P. Chu, and M. Mulder (submitted) Adaptive Control Strategy for Constant Optical Flow Divergence Landing, https://arxiv.org/abs/1609.06767
Definition in file optical_flow_landing.c.
#define ACTIVE_RATES 0 |
Definition at line 214 of file optical_flow_landing.c.
#define HORIZONTAL_RATE_CONTROL 0 |
Definition at line 210 of file optical_flow_landing.c.
#define INCREASE_GAIN_PER_SECOND 0.10 |
Definition at line 222 of file optical_flow_landing.c.
#define MINIMUM_GAIN 0.1 |
Definition at line 219 of file optical_flow_landing.c.
#define n_ts 10 |
Definition at line 261 of file optical_flow_landing.c.
#define OFL_ACTIVE_MOTION 0 |
Definition at line 201 of file optical_flow_landing.c.
#define OFL_AGL_ID ABI_BROADCAST |
Definition at line 99 of file optical_flow_landing.c.
#define OFL_CLOSE_TO_EDGE 0.025 |
Definition at line 176 of file optical_flow_landing.c.
#define OFL_CONTROL_METHOD 0 |
Definition at line 143 of file optical_flow_landing.c.
#define OFL_COV_LANDING_LIMIT 2.2 |
Definition at line 156 of file optical_flow_landing.c.
#define OFL_COV_METHOD 0 |
Definition at line 147 of file optical_flow_landing.c.
#define OFL_COV_SETPOINT -0.0075 |
Definition at line 160 of file optical_flow_landing.c.
#define OFL_COV_WINDOW_SIZE 30 |
Definition at line 152 of file optical_flow_landing.c.
#define OFL_DGAIN 0.0 |
Definition at line 119 of file optical_flow_landing.c.
#define OFL_DGAIN_ADAPTIVE 0.50 |
Definition at line 189 of file optical_flow_landing.c.
#define OFL_ELC_OSCILLATE true |
Definition at line 172 of file optical_flow_landing.c.
#define OFL_FRONT_DIV_THRESHOLD 0.3 |
Definition at line 205 of file optical_flow_landing.c.
#define OFL_IGAIN 0.01 |
Definition at line 115 of file optical_flow_landing.c.
#define OFL_IGAIN_ADAPTIVE 0.50 |
Definition at line 185 of file optical_flow_landing.c.
#define OFL_IGAIN_HORIZONTAL_FACTOR 0.1 |
Definition at line 127 of file optical_flow_landing.c.
#define OFL_LP_CONST 0.02 |
Definition at line 164 of file optical_flow_landing.c.
#define OFL_OMEGA_FB 0.0 |
Definition at line 197 of file optical_flow_landing.c.
#define OFL_OMEGA_LR 0.0 |
Definition at line 193 of file optical_flow_landing.c.
#define OFL_OPTICAL_FLOW_ID ABI_BROADCAST |
Definition at line 105 of file optical_flow_landing.c.
#define OFL_P_LAND_THRESHOLD 0.15 |
Definition at line 168 of file optical_flow_landing.c.
#define OFL_PGAIN 0.40 |
Definition at line 111 of file optical_flow_landing.c.
#define OFL_PGAIN_ADAPTIVE 0.50 |
Definition at line 181 of file optical_flow_landing.c.
#define OFL_PGAIN_HORIZONTAL_FACTOR 0.05 |
Definition at line 123 of file optical_flow_landing.c.
#define OFL_PITCH_TRIM 0.0f |
Definition at line 135 of file optical_flow_landing.c.
#define OFL_ROLL_TRIM 0.0f |
Definition at line 131 of file optical_flow_landing.c.
#define OFL_VISION_METHOD 1 |
Definition at line 139 of file optical_flow_landing.c.
#define RECURSIVE_LEARNING 0 |
Definition at line 257 of file optical_flow_landing.c.
#define TEXTON_DISTRIBUTION_PATH /data/ftp/internal_000 |
Definition at line 264 of file optical_flow_landing.c.
|
static |
Execute a final landing procedure.
Definition at line 998 of file optical_flow_landing.c.
References landing, MAX_PPRZ, OpticalFlowLanding::nominal_thrust, and of_landing_ctrl.
Referenced by vertical_ctrl_module_run().
void fit_linear_model_OF | ( | float * | targets, |
float ** | samples, | ||
uint8_t | D, | ||
uint16_t | count, | ||
float * | params, | ||
float * | fit_error | ||
) |
Fit a linear model from samples to target values.
[in] | targets | The target values |
[in] | samples | The samples / feature vectors |
[in] | D | The dimensionality of the samples |
[in] | count | The number of samples |
[out] | parameters* | Parameters of the linear fit |
[out] | fit_error* | Total error of the fit |
Definition at line 1415 of file optical_flow_landing.c.
References D, MAKE_MATRIX_PTR, MAT_MUL, MAT_SUB, n_samples, of_landing_ctrl, parameters, pprz_svd_float(), pprz_svd_solve_float(), and OpticalFlowLanding::use_bias.
Referenced by learn_from_file().
void guidance_module_enter | ( | void | ) |
Entering the module (user switched to module)
Definition at line 1169 of file optical_flow_landing.c.
References Stabilization::cmd, MAX_PPRZ, OpticalFlowLanding::nominal_thrust, of_landing_ctrl, reset_all_vars(), stabilization, and thrust_set.
void guidance_module_run | ( | bool | in_flight | ) |
Definition at line 1178 of file optical_flow_landing.c.
References vertical_ctrl_module_run().
void learn_from_file | ( | void | ) |
Definition at line 1251 of file optical_flow_landing.c.
References fit_linear_model_OF(), gains, load_texton_distribution(), n_read_samples, n_textons, RECURSIVE_LEARNING, recursive_least_squares_batch(), save_weights(), text_dists, and weights.
Referenced by vertical_ctrl_module_run().
void load_texton_distribution | ( | void | ) |
Definition at line 1213 of file optical_flow_landing.c.
References cov_divs_log, distribution_logger, gains, MAX_SAMPLES_LEARNING, n_read_samples, n_textons, sonar_OF, text_dists, and TEXTON_DISTRIBUTION_PATH.
Referenced by learn_from_file().
void load_weights | ( | void | ) |
Definition at line 1521 of file optical_flow_landing.c.
References n_textons, TEXTON_DISTRIBUTION_PATH, weights, and weights_file.
Referenced by vertical_ctrl_module_run().
void optical_flow_landing_init | ( | void | ) |
Initialize the optical flow landing module.
Definition at line 334 of file optical_flow_landing.c.
References OpticalFlowLanding::active_motion, OpticalFlowLanding::agl, agl_ev, OpticalFlowLanding::agl_lp, OpticalFlowLanding::close_to_edge, OpticalFlowLanding::CONTROL_METHOD, OpticalFlowLanding::cov_limit, OpticalFlowLanding::COV_METHOD, OpticalFlowLanding::cov_set_point, OpticalFlowLanding::d_err, DefaultPeriodic, OpticalFlowLanding::delay_steps, delta_setpoint, OpticalFlowLanding::dgain, OpticalFlowLanding::dgain_adaptive, OpticalFlowLanding::divergence, divergence_front, OpticalFlowLanding::divergence_setpoint, OpticalFlowLanding::elc_oscillate, OpticalFlowLanding::front_div_threshold, get_sys_time_float(), guidance_v, if(), OpticalFlowLanding::igain, OpticalFlowLanding::igain_adaptive, OpticalFlowLanding::igain_horizontal_factor, OpticalFlowLanding::lp_const, OpticalFlowLanding::lp_cov_div_factor, lp_divergence_front, OpticalFlowLanding::lp_factor_prediction, lp_flow_x, lp_flow_y, MAX_PPRZ, module_enter_time, n_textons, VerticalGuidance::nominal_throttle, OpticalFlowLanding::nominal_thrust, of_landing_ctrl, OFL_ACTIVE_MOTION, OFL_AGL_ID, OFL_CLOSE_TO_EDGE, OFL_CONTROL_METHOD, OFL_COV_LANDING_LIMIT, OFL_COV_METHOD, OFL_COV_SETPOINT, OFL_COV_WINDOW_SIZE, OFL_DGAIN, OFL_DGAIN_ADAPTIVE, OFL_ELC_OSCILLATE, OFL_FRONT_DIV_THRESHOLD, OFL_IGAIN, OFL_IGAIN_ADAPTIVE, OFL_IGAIN_HORIZONTAL_FACTOR, OFL_LP_CONST, OFL_OMEGA_FB, OFL_OMEGA_LR, OFL_OPTICAL_FLOW_ID, OFL_P_LAND_THRESHOLD, OFL_PGAIN, OFL_PGAIN_ADAPTIVE, OFL_PGAIN_HORIZONTAL_FACTOR, OFL_PITCH_TRIM, OFL_ROLL_TRIM, OFL_VISION_METHOD, old_flow_time, OpticalFlowLanding::omega_FB, OpticalFlowLanding::omega_LR, optical_flow_ev, OpticalFlowLanding::p_land_threshold, P_RLS, OpticalFlowLanding::pgain, OpticalFlowLanding::pgain_adaptive, OpticalFlowLanding::pgain_horizontal_factor, OpticalFlowLanding::pitch_trim, OpticalFlowLanding::previous_err, ramp, OpticalFlowLanding::ramp_duration, ramp_start_time, OpticalFlowLanding::reduction_factor_elc, register_periodic_telemetry(), reset_all_vars(), OpticalFlowLanding::roll_trim, send_divergence(), start_setpoint_ramp, OpticalFlowLanding::sum_err, OpticalFlowLanding::t_transition, OpticalFlowLanding::use_bias, OpticalFlowLanding::vel, vertical_ctrl_agl_cb(), vertical_ctrl_optical_flow_cb(), OpticalFlowLanding::VISION_METHOD, weights, and OpticalFlowLanding::window_size.
|
static |
Determine and set the thrust for constant divergence control.
[out] | thrust | |
[in] | divergence_set_point | The desired divergence |
[in] | P | P-gain |
[in] | I | I-gain |
[in] | D | D-gain |
[in] | dt | time difference since last update |
Definition at line 1051 of file optical_flow_landing.c.
References D, OpticalFlowLanding::d_err, delta_setpoint, OpticalFlowLanding::divergence, divergence_vision_dt, get_sys_time_float(), MAX_PPRZ, OpticalFlowLanding::nominal_thrust, of_landing_ctrl, P, previous_divergence_setpoint, ramp, OpticalFlowLanding::ramp_duration, ramp_start_time, set_cov_div(), start_setpoint_ramp, OpticalFlowLanding::sum_err, and update_errors().
Referenced by vertical_ctrl_module_run().
float predict_gain | ( | float * | distribution | ) |
Definition at line 1486 of file optical_flow_landing.c.
References n_textons, of_landing_ctrl, OpticalFlowLanding::use_bias, and weights.
Referenced by recursive_least_squares(), recursive_least_squares_batch(), and vertical_ctrl_module_run().
void recursive_least_squares | ( | float | target, |
float * | sample, | ||
uint8_t | length_sample, | ||
UNUSED float * | params | ||
) |
Definition at line 1340 of file optical_flow_landing.c.
References float_mat_div_scalar(), float_mat_mul_scalar(), lambda, MAKE_MATRIX_PTR, MAT_MUL, MAT_SUB, P, P_RLS, predict_gain(), target, and weights.
Referenced by recursive_least_squares_batch().
void recursive_least_squares_batch | ( | float * | targets, |
float ** | samples, | ||
uint8_t | D, | ||
uint16_t | count, | ||
float * | params, | ||
float * | fit_error | ||
) |
Recursively fit a linear model from samples to target values - batch mode, possibly for initialization.
[in] | targets | The target values |
[in] | samples | The samples / feature vectors |
[in] | D | The dimensionality of the samples |
[in] | count | The number of samples |
[out] | parameters* | Parameters of the linear fit |
[out] | fit_error* | Total error of the fit // TODO: relevant for RLS? |
Definition at line 1290 of file optical_flow_landing.c.
References D, n_textons, of_landing_ctrl, P_RLS, predict_gain(), recursive_least_squares(), OpticalFlowLanding::use_bias, and weights.
Referenced by learn_from_file().
|
static |
Reset all variables:
Definition at line 448 of file optical_flow_landing.c.
References OpticalFlowLanding::agl, OpticalFlowLanding::agl_lp, count_covdiv, cov_array_filled, cov_div, OpticalFlowLanding::d_err, delta_setpoint, OpticalFlowLanding::dgain, OpticalFlowLanding::divergence, divergence_history, divergence_setpoint, divergence_vision, divergence_vision_dt, dstate, elc_phase, elc_time_start, get_sys_time_float(), OpticalFlowLanding::igain, ind_hist, istate, landing, OpticalFlowLanding::load_weights, lp_cov_div, lp_divergence_front, lp_flow_x, lp_flow_y, MAX_PPRZ, OpticalFlowLanding::nominal_thrust, normalized_thrust, of_landing_ctrl, OFL_COV_WINDOW_SIZE, optical_flow_x, optical_flow_y, OpticalFlowLanding::pgain, prev_vision_time, previous_cov_err, previous_divergence_setpoint, OpticalFlowLanding::previous_err, pstate, pused, ramp, ramp_start_time, start_setpoint_ramp, stateGetPositionEnu_f(), OpticalFlowLanding::sum_err, sum_pitch_error, sum_roll_error, thrust_history, thrust_set, vision_time, and EnuCoor_f::z.
Referenced by guidance_module_enter(), and optical_flow_landing_init().
void save_texton_distribution | ( | void | ) |
Definition at line 1186 of file optical_flow_landing.c.
References OpticalFlowLanding::agl, cov_div, distribution_logger, n_textons, of_landing_ctrl, pstate, texton_distribution, and TEXTON_DISTRIBUTION_PATH.
Referenced by vertical_ctrl_module_run().
void save_weights | ( | void | ) |
Definition at line 1503 of file optical_flow_landing.c.
References n_textons, TEXTON_DISTRIBUTION_PATH, weights, and weights_file.
Referenced by learn_from_file().
|
static |
Definition at line 300 of file optical_flow_landing.c.
References OpticalFlowLanding::agl, cov_div, dev, OpticalFlowLanding::divergence, divergence_vision_dt, lp_divergence_front, normalized_thrust, of_landing_ctrl, pstate, and pused.
Referenced by optical_flow_landing_init().
|
static |
Set the covariance of the divergence and the thrust / past divergence This funciton should only be called once per time step.
[in] | thrust | the current thrust value |
Definition at line 1014 of file optical_flow_landing.c.
References cov_array_filled, cov_div, OpticalFlowLanding::COV_METHOD, covariance_f(), OpticalFlowLanding::delay_steps, OpticalFlowLanding::divergence, divergence_history, ind_hist, MAX_PPRZ, normalized_thrust, of_landing_ctrl, past_divergence_history, thrust_history, and OpticalFlowLanding::window_size.
Referenced by PID_divergence_control().
|
static |
Updates the integral and differential errors for PID control and sets the previous error.
[in] | err | the error of the divergence and divergence setpoint |
[in] | dt | time difference since last update |
Definition at line 1109 of file optical_flow_landing.c.
References OpticalFlowLanding::d_err, OpticalFlowLanding::lp_const, lp_factor, of_landing_ctrl, OpticalFlowLanding::previous_err, and OpticalFlowLanding::sum_err.
Referenced by PID_divergence_control().
Function definitions Callback function of the ground altitude.
Definition at line 1121 of file optical_flow_landing.c.
References OpticalFlowLanding::agl, and of_landing_ctrl.
Referenced by optical_flow_landing_init().
void vertical_ctrl_module_run | ( | bool | in_flight | ) |
Run the optical flow landing module.
Definition at line 510 of file optical_flow_landing.c.
References OpticalFlowLanding::active_motion, ACTIVE_RATES, OpticalFlowLanding::agl, OpticalFlowLanding::agl_lp, ANGLE_BFP_OF_REAL, attitude, OpticalFlowLanding::close_to_edge, Stabilization::cmd, OpticalFlowLanding::CONTROL_METHOD, count_covdiv, cov_div, OpticalFlowLanding::cov_limit, OpticalFlowLanding::COV_METHOD, OpticalFlowLanding::cov_set_point, OpticalFlowLanding::dgain, OpticalFlowLanding::divergence, divergence_front, OpticalFlowLanding::divergence_setpoint, divergence_vision, divergence_vision_dt, dstate, elc_d_gain_start, elc_i_gain_start, OpticalFlowLanding::elc_oscillate, elc_p_gain_start, elc_phase, elc_time_start, final_landing_procedure(), OpticalFlowLanding::front_div_threshold, get_sys_time_float(), HORIZONTAL_RATE_CONTROL, if(), OpticalFlowLanding::igain, OpticalFlowLanding::igain_adaptive, OpticalFlowLanding::igain_horizontal_factor, INCREASE_GAIN_PER_SECOND, istate, landing, learn_from_file(), OpticalFlowLanding::learn_gains, load_weights(), OpticalFlowLanding::load_weights, OpticalFlowLanding::lp_const, lp_cov_div, OpticalFlowLanding::lp_cov_div_factor, lp_divergence_front, lp_factor, OpticalFlowLanding::lp_factor_prediction, lp_flow_x, lp_flow_y, MAX_PPRZ, MINIMUM_GAIN, module_active_time_sec, module_enter_time, OpticalFlowLanding::nominal_thrust, of_landing_ctrl, OpticalFlowLanding::omega_FB, OpticalFlowLanding::omega_LR, optical_flow_x, optical_flow_y, OpticalFlowLanding::p_land_threshold, OpticalFlowLanding::pgain, OpticalFlowLanding::pgain_adaptive, OpticalFlowLanding::pgain_horizontal_factor, Int32Eulers::phi, PID_divergence_control(), OpticalFlowLanding::pitch_trim, predict_gain(), prev_vision_time, previous_divergence_setpoint, pstate, pused, OpticalFlowLanding::reduction_factor_elc, OpticalFlowLanding::roll_trim, save_texton_distribution(), StabilizationSetpoint::sp, ThrustSetpoint::sp, stab_sp_from_eulers_i(), stabilization, stabilization_attitude_run(), stateGetNedToBodyEulers_f(), stateGetPositionEnu_f(), stateGetSpeedEnu_f(), OpticalFlowLanding::sum_err, sum_pitch_error, sum_roll_error, OpticalFlowLanding::t_transition, texton_distribution, th_sp_from_thrust_i(), THRUST_AXIS_Z, thrust_set, OpticalFlowLanding::vel, OpticalFlowLanding::VISION_METHOD, vision_time, and EnuCoor_f::z.
Referenced by guidance_module_run().
void vertical_ctrl_optical_flow_cb | ( | uint8_t | sender_id, |
uint32_t | stamp, | ||
int32_t flow_x | UNUSED, | ||
int32_t flow_y | UNUSED, | ||
int32_t flow_der_x | UNUSED, | ||
int32_t flow_der_y | UNUSED, | ||
float quality | UNUSED, | ||
float | size_divergence | ||
) |
Definition at line 1126 of file optical_flow_landing.c.
References divergence_front, divergence_vision, FLOW_OPTICFLOW_ID, get_sys_time_float(), old_flow_time, optical_flow_x, optical_flow_y, and vision_time.
Referenced by optical_flow_landing_init().
|
static |
The altitude ABI event.
Definition at line 293 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init().
int32_t count_covdiv |
Definition at line 290 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
uint8_t cov_array_filled |
Definition at line 327 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and set_cov_div().
float cov_div |
Definition at line 74 of file optical_flow_landing.c.
Referenced by reset_all_vars(), save_texton_distribution(), send_divergence(), set_cov_div(), and vertical_ctrl_module_run().
float cov_divs_log[MAX_SAMPLES_LEARNING] |
Definition at line 70 of file optical_flow_landing.c.
Referenced by load_texton_distribution().
float delta_setpoint |
Definition at line 282 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), PID_divergence_control(), and reset_all_vars().
|
static |
Definition at line 269 of file optical_flow_landing.c.
Referenced by load_texton_distribution(), and save_texton_distribution().
float divergence_front |
Definition at line 252 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), vertical_ctrl_module_run(), and vertical_ctrl_optical_flow_cb().
float divergence_history[OFL_COV_WINDOW_SIZE] |
Definition at line 324 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and set_cov_div().
float divergence_setpoint |
Definition at line 250 of file optical_flow_landing.c.
Referenced by reset_all_vars().
float divergence_vision |
Definition at line 76 of file optical_flow_landing.c.
Referenced by reset_all_vars(), vertical_ctrl_module_run(), and vertical_ctrl_optical_flow_cb().
float divergence_vision_dt |
Definition at line 239 of file optical_flow_landing.c.
Referenced by PID_divergence_control(), reset_all_vars(), send_divergence(), and vertical_ctrl_module_run().
float dstate |
Definition at line 245 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
float elc_d_gain_start |
Definition at line 289 of file optical_flow_landing.c.
Referenced by vertical_ctrl_module_run().
float elc_i_gain_start |
Definition at line 289 of file optical_flow_landing.c.
Referenced by vertical_ctrl_module_run().
float elc_p_gain_start |
Definition at line 289 of file optical_flow_landing.c.
Referenced by vertical_ctrl_module_run().
int32_t elc_phase |
Definition at line 287 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
uint32_t elc_time_start |
Definition at line 288 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
float gains[MAX_SAMPLES_LEARNING] |
Definition at line 69 of file optical_flow_landing.c.
Referenced by attitude_run_fb(), attitude_run_ff(), learn_from_file(), and load_texton_distribution().
uint32_t ind_hist |
Definition at line 326 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and set_cov_div().
float istate |
Definition at line 244 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
float lambda |
Definition at line 268 of file optical_flow_landing.c.
Referenced by adaptive_notch_filter_init(), recursive_least_squares(), UKF_Wind_Estimator_step(), and wls_alloc().
bool landing |
Definition at line 247 of file optical_flow_landing.c.
Referenced by final_landing_procedure(), reset_all_vars(), and vertical_ctrl_module_run().
float lp_cov_div |
Definition at line 291 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
float lp_divergence_front |
Definition at line 234 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), reset_all_vars(), send_divergence(), and vertical_ctrl_module_run().
float lp_flow_x |
Definition at line 232 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), reset_all_vars(), and vertical_ctrl_module_run().
float lp_flow_y |
Definition at line 233 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), reset_all_vars(), and vertical_ctrl_module_run().
float module_active_time_sec |
Definition at line 276 of file optical_flow_landing.c.
Referenced by vertical_ctrl_module_run().
float module_enter_time |
Definition at line 277 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), and vertical_ctrl_module_run().
unsigned int n_read_samples |
Definition at line 271 of file optical_flow_landing.c.
Referenced by learn_from_file(), and load_texton_distribution().
float normalized_thrust |
Definition at line 240 of file optical_flow_landing.c.
Referenced by reset_all_vars(), send_divergence(), and set_cov_div().
struct OpticalFlowLanding of_landing_ctrl |
Definition at line 294 of file optical_flow_landing.c.
Referenced by final_landing_procedure(), fit_linear_model_OF(), guidance_module_enter(), optical_flow_landing_init(), PID_divergence_control(), predict_gain(), recursive_least_squares_batch(), reset_all_vars(), save_texton_distribution(), send_divergence(), set_cov_div(), update_errors(), vertical_ctrl_agl_cb(), and vertical_ctrl_module_run().
float old_flow_time |
Definition at line 227 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), and vertical_ctrl_optical_flow_cb().
|
static |
Definition at line 294 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init().
float optical_flow_x |
Definition at line 230 of file optical_flow_landing.c.
Referenced by reset_all_vars(), vertical_ctrl_module_run(), and vertical_ctrl_optical_flow_cb().
float optical_flow_y |
Definition at line 231 of file optical_flow_landing.c.
Referenced by reset_all_vars(), vertical_ctrl_module_run(), and vertical_ctrl_optical_flow_cb().
float** P_RLS |
Definition at line 266 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), recursive_least_squares(), and recursive_least_squares_batch().
float past_divergence_history[OFL_COV_WINDOW_SIZE] |
Definition at line 325 of file optical_flow_landing.c.
Referenced by set_cov_div().
float prev_vision_time |
Definition at line 246 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
float previous_cov_err |
Definition at line 248 of file optical_flow_landing.c.
Referenced by reset_all_vars().
float previous_divergence_setpoint |
Definition at line 278 of file optical_flow_landing.c.
Referenced by PID_divergence_control(), reset_all_vars(), and vertical_ctrl_module_run().
float pstate |
Definition at line 75 of file optical_flow_landing.c.
Referenced by reset_all_vars(), save_texton_distribution(), send_divergence(), and vertical_ctrl_module_run().
float pused |
Definition at line 243 of file optical_flow_landing.c.
Referenced by reset_all_vars(), send_divergence(), and vertical_ctrl_module_run().
int ramp |
Definition at line 281 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), PID_divergence_control(), and reset_all_vars().
float ramp_start_time |
Definition at line 283 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), PID_divergence_control(), and reset_all_vars().
float sonar_OF[MAX_SAMPLES_LEARNING] |
Definition at line 68 of file optical_flow_landing.c.
Referenced by load_texton_distribution().
float start_setpoint_ramp |
Definition at line 284 of file optical_flow_landing.c.
Referenced by optical_flow_landing_init(), PID_divergence_control(), and reset_all_vars().
float sum_pitch_error |
Definition at line 236 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
float sum_roll_error |
Definition at line 235 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and vertical_ctrl_module_run().
float* text_dists[MAX_SAMPLES_LEARNING] |
Definition at line 67 of file optical_flow_landing.c.
Referenced by learn_from_file(), and load_texton_distribution().
float texton_distribution_stereoboard[n_ts] |
Definition at line 262 of file optical_flow_landing.c.
float thrust_history[OFL_COV_WINDOW_SIZE] |
Definition at line 323 of file optical_flow_landing.c.
Referenced by reset_all_vars(), and set_cov_div().
int32_t thrust_set |
Definition at line 249 of file optical_flow_landing.c.
Referenced by guidance_module_enter(), reset_all_vars(), and vertical_ctrl_module_run().
float vision_time |
Definition at line 246 of file optical_flow_landing.c.
Referenced by reset_all_vars(), vertical_ctrl_module_run(), and vertical_ctrl_optical_flow_cb().
float* weights |
Definition at line 71 of file optical_flow_landing.c.
Referenced by learn_from_file(), load_weights(), optical_flow_landing_init(), predict_gain(), predict_value(), recursive_least_squares(), recursive_least_squares_batch(), and save_weights().
|
static |
Definition at line 270 of file optical_flow_landing.c.
Referenced by load_weights(), and save_weights().