Browse Source

AP_TECS: add TECS_LAND_TDAMP for land damp

+     // @Description: This is the damping gain for the throttle demand loop during and auto-landing. Same as TECS_THR_DAMP but only in effect during an auto-land. Increase to add damping to correct for oscillations in speed and height. When set to 0 landing throttle damp is controlled by TECS_THR_DAMP.
mission-4.1.18
Tom Pittenger 9 years ago
parent
commit
a139789693
  1. 14
      libraries/AP_TECS/AP_TECS.cpp
  2. 1
      libraries/AP_TECS/AP_TECS.h

14
libraries/AP_TECS/AP_TECS.cpp

@ -202,6 +202,14 @@ const AP_Param::GroupInfo AP_TECS::var_info[] = { @@ -202,6 +202,14 @@ const AP_Param::GroupInfo AP_TECS::var_info[] = {
// @User: Advanced
AP_GROUPINFO("LAND_SRC", 22, AP_TECS, _land_sink_rate_change, 0),
// @Param: LAND_TDAMP
// @DisplayName: Controller throttle damping when landing
// @Description: This is the damping gain for the throttle demand loop during and auto-landing. Same as TECS_THR_DAMP but only in effect during an auto-land. Increase to add damping to correct for oscillations in speed and height. When set to 0 landing throttle damp is controlled by TECS_THR_DAMP.
// @Range: 0.1 1.0
// @Increment: 0.1
// @User: Advanced
AP_GROUPINFO("LAND_TDAMP", 23, AP_TECS, _land_throttle_damp, 0),
AP_GROUPEND
};
@ -586,7 +594,11 @@ void AP_TECS::_update_throttle(void) @@ -586,7 +594,11 @@ void AP_TECS::_update_throttle(void)
ff_throttle = nomThr + STEdot_dem / (_STEdot_max - _STEdot_min) * (_THRmaxf - _THRminf);
// Calculate PD + FF throttle
_throttle_dem = (_STE_error + STEdot_error * _thrDamp) * K_STE2Thr + ff_throttle;
float throttle_damp = _thrDamp;
if (_is_doing_auto_land && !is_zero(_land_throttle_damp)) {
throttle_damp = _land_throttle_damp;
}
_throttle_dem = (_STE_error + STEdot_error * throttle_damp) * K_STE2Thr + ff_throttle;
// Constrain throttle demand
_throttle_dem = constrain_float(_throttle_dem, _THRminf, _THRmaxf);

1
libraries/AP_TECS/AP_TECS.h

@ -150,6 +150,7 @@ private: @@ -150,6 +150,7 @@ private:
AP_Float _ptchDamp;
AP_Float _landDamp;
AP_Float _thrDamp;
AP_Float _land_throttle_damp;
AP_Float _integGain;
AP_Float _vertAccLim;
AP_Float _rollComp;

Loading…
Cancel
Save