mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 18:13:34 +08:00
FlightTask: set yaw_setpoint to NAN when yaw should not be controlled
This commit is contained in:
@@ -124,6 +124,7 @@ void FlightTask::_evaluateVehicleLocalPosition()
|
||||
|
||||
// yaw
|
||||
_yaw = _sub_vehicle_local_position.get().heading;
|
||||
_is_yaw_good_for_control = _sub_vehicle_local_position.get().heading_good_for_control;
|
||||
|
||||
// position
|
||||
if (_sub_vehicle_local_position.get().xy_valid) {
|
||||
|
||||
@@ -231,6 +231,7 @@ protected:
|
||||
matrix::Vector3f _velocity; /**< current vehicle velocity */
|
||||
|
||||
float _yaw{}; /**< current vehicle yaw heading */
|
||||
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 */
|
||||
float _dist_to_ground{}; /**< equals _dist_to_bottom if valid, height above home otherwise */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user