weathervane: get rid of passive strategy

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman
2018-09-19 08:27:07 +02:00
committed by Lorenz Meier
parent 0e835cb498
commit 96f3feb088
9 changed files with 1 additions and 95 deletions
@@ -234,9 +234,7 @@ private:
(ParamFloat<px4::params::SENS_BOARD_X_OFF>) _board_offset_x,
(ParamFloat<px4::params::SENS_BOARD_Y_OFF>) _board_offset_y,
(ParamFloat<px4::params::SENS_BOARD_Z_OFF>) _board_offset_z,
(ParamFloat<px4::params::VT_WV_YAWR_SCL>) _vtol_wv_yaw_rate_scale /**< Scale value [0, 1] for yaw rate setpoint */
(ParamFloat<px4::params::SENS_BOARD_Z_OFF>) _board_offset_z
)
matrix::Vector3f _attitude_p; /**< P gain for attitude control */
@@ -450,18 +450,6 @@ MulticopterAttitudeControl::control_attitude(float dt)
_rates_sp(i) = math::constrain(_rates_sp(i), -_mc_rate_max(i), _mc_rate_max(i));
}
}
/* VTOL weather-vane mode, dampen yaw rate */
if (_vehicle_status.is_vtol && _v_att_sp.disable_mc_yaw_control) {
if (_v_control_mode.flag_control_velocity_enabled || _v_control_mode.flag_control_auto_enabled) {
const float wv_yaw_rate_max = _auto_rate_max(2) * _vtol_wv_yaw_rate_scale.get();
_rates_sp(2) = math::constrain(_rates_sp(2), -wv_yaw_rate_max, wv_yaw_rate_max);
// prevent integrator winding up in weathervane mode
_rates_int(2) = 0.0f;
}
}
}
/*