TECS: added alpha filter classes to energy rate and tas derivative

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2020-09-22 11:48:13 +03:00
committed by Roman Bapst
parent cabb50a67b
commit d0e8b882a2
5 changed files with 58 additions and 3 deletions
@@ -111,6 +111,9 @@ FixedwingPositionControl::parameters_update()
_tecs.set_heightrate_p(_param_fw_t_hrate_p.get());
_tecs.set_heightrate_ff(_param_fw_t_hrate_ff.get());
_tecs.set_speedrate_p(_param_fw_t_srate_p.get());
_tecs.set_ste_rate_time_const(_param_ste_rate_time_const.get());
_tecs.set_speed_derivative_time_constant(_param_tas_rate_time_const.get());
// Landing slope
/* check if negative value for 2/3 of flare altitude is set for throttle cut */
@@ -408,6 +408,8 @@ private:
(ParamFloat<px4::params::FW_T_THRO_CONST>) _param_fw_t_thro_const,
(ParamFloat<px4::params::FW_T_TIME_CONST>) _param_fw_t_time_const,
(ParamFloat<px4::params::FW_T_VERT_ACC>) _param_fw_t_vert_acc,
(ParamFloat<px4::params::FW_T_STE_R_TC>) _param_ste_rate_time_const,
(ParamFloat<px4::params::FW_T_TAS_R_TC>) _param_tas_rate_time_const,
(ParamFloat<px4::params::FW_THR_ALT_SCL>) _param_fw_thr_alt_scl,
(ParamFloat<px4::params::FW_THR_CRUISE>) _param_fw_thr_cruise,
@@ -737,3 +737,30 @@ PARAM_DEFINE_FLOAT(FW_GND_SPD_MIN, 5.0f);
* @group FW L1 Control
*/
PARAM_DEFINE_INT32(FW_POSCTL_INV_ST, 0);
/**
* Specific total energy rate first order filter time constant.
*
* This filter is applied to the specific total energy rate used for throttle damping.
*
* @min 0.0
* @max 2
* @decimal 2
* @increment 0.01
* @group FW TECS
*/
PARAM_DEFINE_FLOAT(FW_T_STE_R_TC, 0.4f);
/**
* True airspeed rate first order filter time constant.
*
* This filter is applied to the true airspeed rate.
*
* @min 0.0
* @max 2
* @decimal 2
* @increment 0.01
* @group FW TECS
*/
PARAM_DEFINE_FLOAT(FW_T_TAS_R_TC, 0.4f);