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:
bresch
2023-08-21 10:56:08 +02:00
committed by Mathieu Bresciani
parent 0aa4afdbce
commit 23b31cc5fd
12 changed files with 96 additions and 18 deletions
@@ -546,6 +546,7 @@ void Sih::publish_ground_truth(const hrt_abstime &time_now_us)
local_position.heading = Eulerf(_q).psi();
local_position.heading_good_for_control = true;
local_position.unaided_heading = NAN;
local_position.timestamp = hrt_absolute_time();
_local_position_ground_truth_pub.publish(local_position);