mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 11:20:34 +08:00
manual_yaw: compensate for yaw estimate convergence
When the yaw estimate is converging, the controller makes the drone yaw in order to follow the current setpoint. This is unintuitive for the pilot and it is preferable if the drone continues to fly towards the same physical direction.
This commit is contained in:
committed by
Mathieu Bresciani
parent
0aa4afdbce
commit
23b31cc5fd
@@ -221,8 +221,7 @@ void FlightTaskAuto::rcHelpModifyYaw(float &yaw_sp)
|
||||
{
|
||||
// Only set a yawrate setpoint if weather vane is not active or the yaw stick is out of its dead-zone
|
||||
if (!_weathervane.isActive() || fabsf(_sticks.getYawExpo()) > FLT_EPSILON) {
|
||||
_stick_yaw.generateYawSetpoint(_yawspeed_setpoint, yaw_sp, _sticks.getYawExpo(), _yaw, _is_yaw_good_for_control,
|
||||
_deltatime);
|
||||
_stick_yaw.generateYawSetpoint(_yawspeed_setpoint, yaw_sp, _sticks.getYawExpo(), _yaw, _deltatime);
|
||||
|
||||
// Hack to make sure the MPC_YAW_MODE 4 alignment doesn't stop the vehicle from descending when there's yaw input
|
||||
_yaw_sp_aligned = true;
|
||||
|
||||
Reference in New Issue
Block a user