vtol_att_control: got rid of VT_B_DEC_SP

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2020-03-23 21:22:01 +03:00
committed by Roman Bapst
parent 47f0e91076
commit 2522435f9c
2 changed files with 10 additions and 20 deletions
@@ -87,7 +87,7 @@ VtolAttitudeControl::VtolAttitudeControl() :
_params_handles.diff_thrust_scale = param_find("VT_FW_DIFTHR_SC");
_params_handles.dec_to_pitch_ff = param_find("VT_B_DEC_FF");
_params_handles.dec_to_pitch_i = param_find("VT_B_DEC_I");
_params_handles.back_trans_dec_sp = param_find("VT_B_DEC_SP");
_params_handles.back_trans_dec_sp = param_find("VT_B_DEC_MSS");
_params_handles.down_pitch_max = param_find("VT_DWN_PITCH_MAX");
@@ -289,7 +289,11 @@ VtolAttitudeControl::parameters_update()
// make sure parameters are feasible, require at least 1 m/s difference between transition and blend airspeed
_params.airspeed_blend = math::min(_params.airspeed_blend, _params.transition_airspeed - 1.0f);
param_get(_params_handles.back_trans_dec_sp, &_params.back_trans_dec_sp);
param_get(_params_handles.back_trans_dec_sp, &v);
// increase the target deceleration setpoint provided to the controller by 20%
// to make overshooting the transition waypoint less likely in the presence of tracking errors
_params.back_trans_dec_sp = 1.2f * v;
param_get(_params_handles.dec_to_pitch_ff, &_params.dec_to_pitch_ff);
param_get(_params_handles.dec_to_pitch_i, &_params.dec_to_pitch_i);
@@ -149,11 +149,12 @@ PARAM_DEFINE_FLOAT(VT_B_TRANS_THR, 0.0f);
*
* The approximate deceleration during a back transition in m/s/s
* Used to calculate back transition distance in mission mode. A lower value will make the VTOL transition further from the destination waypoint.
* For standard vtol and tiltrotors a controller is used to track this value during the transition.
*
* @unit m/s/s
* @min 0.00
* @max 20.00
* @increment 1
* @min 0.5
* @max 10
* @increment 0.1
* @decimal 2
* @group VTOL Attitude Control
*/
@@ -316,21 +317,6 @@ PARAM_DEFINE_INT32(VT_FW_DIFTHR_EN, 0);
*/
PARAM_DEFINE_FLOAT(VT_FW_DIFTHR_SC, 0.1f);
/**
* Target deceleration during backtransition.
*
* The vehicle will use its pitch angle to try and maintain a target deceleration during the backtransition.
* This parameter only applies for standard vtol and tiltrotors.
*
* @unit m/s2
* @min 0.5
* @max 5
* @decimal 1
* @increment 0.5
* @group VTOL Attitude Control
*/
PARAM_DEFINE_FLOAT(VT_B_DEC_SP, 2.0f);
/**
* Backtransition deceleration setpoint to pitch feedforward gain.
*