fix(fw_att_control): use adapted tailsitter attitude for FW error

- In tailsitter case, construct current quaternion from _R, which is
   aready rotated correctly a bit above
 - Downside: bloaty solution of converting to rotation matrix, adjusting
   that, and converting back to quaternion
This commit is contained in:
Kirill authored and Balduin committed 2026-07-06 13:21:15 +02:00
1 parent a201b24287
commit 56ede3a888
1 file changed
+1 -1
@@ -303,7 +303,7 @@ void FixedwingAttitudeControl::Run()
const Quatf q_sp(_att_sp.q_d);
if (q_sp.isAllFinite()) {
const Quatf q_current(att.q);
const Quatf q_current = _vehicle_status.is_vtol_tailsitter ? Quatf(_R) : Quatf(att.q);
const Vector3f att_err = computeAttitudeError(q_current, q_sp);
Vector3f body_rates_setpoint;