FlightTask: set yaw_setpoint to NAN when yaw should not be controlled

This commit is contained in:
bresch
2021-11-16 18:09:37 -05:00
committed by Daniel Agar
parent 2213343240
commit f751dd2242
9 changed files with 29 additions and 16 deletions
@@ -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 */