Setup: ArduCopter 4.6.3 on a quadrotor, using FAST-LIO2 SLAM as the external navigation/positioning source (GPS-denied). Loiter flight mode.
Problem: The drone holds attitude and altitude well under disturbance. If I hit it with wind or physically push it, roll, pitch, and height all recover to their setpoints. But, heading is not held. If an external disturbance yaws the airframe, the controller does not rotate back to the heading it held before the push, it just accepts the new heading.
My current understanding: I suspect nothing is closing a hold loop on yaw. As I understand it, ArduCopter’s position controller (PSC) has authority over the NED position axes but not over heading. Yaw is handled separately by the attitude controller, so after a disturbance there’s no command driving the aircraft back to its original heading.
Questions:
- Is that understanding correct? Does the PSC not close a loop on heading, and should yaw be holding an absolute heading target in this mode (loiter)?
- Why would attitude and altitude recover but not heading(e.g. yaw being commanded in rate vs angle mode, or the behavior of the EKF/external-nav yaw source)?
- What are the recommended ways to make it actively hold and recover heading against external yaw disturbances?
Any pointers on the relevant parameters or the control architecture would be much appreciated.