Loss of yaw control during fast descent

I did autotune on 3.6 several month ago and got ATC_ACCEL_Y_MAX about 23000

I can test both autotune and descending case with your fix applied, just wondering do I need to wait PR review first or it is more or less safe :wink:

I believe so. It would be great to get another tester over it too.

I assume you can compile it yourself.

I won’t be able to compile myself, but would love to test. Friday looks like some pretty good weather here.

We just got it all tested and in master. What autopilot are you running?

1 Like

Hi @Leonardthall, unfortunatelly the fix didn’t helped for me.
I didn’t tested master, but cherry-picked these three commits into Copter-4.0: https://github.com/SergeyBokhantsev/ardupilot/commits/yaw_fix
Shall there 3 fixed be enough or do the fix work only in Master?

Here is my log: https://www.dropbox.com/s/3vh38akz8eop0re/00000050.BIN?dl=0

Here is onboard video: https://www.youtube.com/watch?v=l4PLYFm4s78
3:20 - descend in STAB (yaw lost was not very hard b/c I increased throttle)
6:20 - descend in AltHold

@sergbokh, I think you might need to also add in this fix: https://github.com/ArduPilot/ardupilot/commit/5979c750f9fb25e4d757231c9cbd8e5727ffd180. In any case master might be a good choice or -rc2 will be out within a few days. Txs for testing!

1 Like


Yes sorry, when I did my clean up and comments before committing the code I introduced another mistake that had the same impact. This is where a sorry or embarrassed emoji would be appropriate.

The commit above addresses that problem. Everything is in master now and will go out in the next beta.

1 Like

No problem, will test this soon.

@Leonardthall - Cube Orange.

Based on the traditional helicopter, I did not find the Yaw failure in the test flight after three of my complete takeoffs. I used the FC of the T-rex500 and Matek F765 wing and used the 4.0rc1 FW. But I feel that the height of the floating is large, compared to the previous firmware, it seems that the ability has dropped!

Hi @zhangsir

The yaw problem does not affect Heli.

Do you mean you are getting more height variation?

Yes, the problem of yaw does not affect Helicopters!

I am responsive to the ability of the barometer to maintain its height. Compared to previous firmware, it is a bit weak and floats in a range!

@zhangsir, it’s a bit out of my area but it would probably help if we had before and after logs (i.e. flights logs on 3.6.11 and 4.0.0) ideally of back-to-back flights so we can be sure the conditions are similar.

… then maybe @bnsgeyer could provide some insights.

Thank you, but ArduPilot’s support for Matek F765 wing is only from 4.0 dev. There is no previous firmware version. It may be that the performance of the F765’s onboard BMP280 barometer itself is not as good as 5611. I will follow up later. Contrast test, no need to panic, thank you!

1 Like

@Leonardthall All I can say is wow! Thank you for the update. Latest master for Cube Orange. PID was turned on for logging.

I’m also can confirm the fix is working. Solid stable yaw control at descend now. And the yaw control at hovering is also much more accurate now.
The only thing I noticed - maximum descend rate in Loiter was not faster that 4.6 m/s (my max descend speed parameter is 5 m/s). Same time in AltHold there was no problems to achieve 5 m/s. But I think this is because of some additional thrust for horizontal stabilization was applied.


@sergbokh I think you are correct.

I am glad it is working. Just a heads up. That aircraft has a significant yaw offset. This is the reason your aircraft was particularly susceptible to this bug.

Thank you @Leonardthall for all your work on the fix. Not sure what to do about the yaw offset though. Would you mind expanding on that?

This means that the aircraft has to hold about 14 % yaw into the aircraft to hold the heading. This suggests a twisted arm or something similar. You also need a bit of pitch but that may be some wind.

When an aircraft is perfectly setup it needs zero roll, pitch yaw input on average to hover when there is not wind.

CG offsets and wind tend to result in roll and pitch offsets, twisted arms or mismatched KV on a motor tend to result in yaw offsete.