mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 17:58:52 +08:00
FlightTaskManual: fix for the sideways oscillations in fast foward flight when using the vehicle yaw estimate
This commit is contained in:
@@ -145,6 +145,17 @@ bool FlightTaskManual::update()
|
||||
return true;
|
||||
}
|
||||
|
||||
float FlightTaskManual::_get_input_frame_yaw()
|
||||
{
|
||||
/* using constant yaw angle from setpoint here to prevent sideways oscillation in fast forward flight */
|
||||
if (PX4_ISFINITE(_hold_yaw)) {
|
||||
return _hold_yaw;
|
||||
|
||||
} else {
|
||||
return _yaw;
|
||||
}
|
||||
}
|
||||
|
||||
void FlightTaskManual::_updateYaw()
|
||||
{
|
||||
const float yaw_speed = _sticks(3) * math::radians(_man_yaw_max.get());
|
||||
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
bool _evaluateSticks();
|
||||
bool _sticks_data_required = true; /**< let sibling task define if it depends on stick data */
|
||||
|
||||
float _get_input_frame_yaw() { return _yaw; }
|
||||
float _get_input_frame_yaw();
|
||||
virtual void _scaleVelocity(matrix::Vector3f &velocity);
|
||||
|
||||
control::BlockParamFloat _z_vel_max_up; /**< maximal vertical velocity when flying upwards with the stick */
|
||||
|
||||
Reference in New Issue
Block a user