mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 20:23:35 +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
@@ -112,6 +112,7 @@ void FlightTask::_evaluateVehicleLocalPosition()
|
||||
|
||||
// yaw
|
||||
_yaw = _sub_vehicle_local_position.get().heading;
|
||||
_unaided_yaw = _sub_vehicle_local_position.get().unaided_heading;
|
||||
_is_yaw_good_for_control = _sub_vehicle_local_position.get().heading_good_for_control;
|
||||
|
||||
// position
|
||||
|
||||
@@ -218,6 +218,7 @@ protected:
|
||||
matrix::Vector3f _velocity; /**< current vehicle velocity */
|
||||
|
||||
float _yaw{}; /**< current vehicle yaw heading */
|
||||
float _unaided_yaw{};
|
||||
bool _is_yaw_good_for_control{}; /**< true if the yaw estimate can be used for yaw control */
|
||||
float _dist_to_bottom{}; /**< current height above ground level if dist_bottom is valid */
|
||||
float _dist_to_ground{}; /**< equals _dist_to_bottom if available, height above home otherwise */
|
||||
|
||||
Reference in New Issue
Block a user