mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-01 21:52:12 +08:00
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:
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;
|
||||
|
||||
Reference in new issue
Block a user