Strange 360 degree yaw and desyaw glitch just before crash

Hi Everyone!

Yesterday one of my college did a test flight with a poorly planned mission and the drone hit some trees. On first look it seemed easy to understand that it was a simple pilot error, but when I started to examine the logs I found this:

It was in auto mode and a few blinks after it was switched to altitude hold mode. Also here is the .bin for the flight, and it would help a lot if someone could help with an explanation.

thanks in advance!

Take a look at RCIN.C5, you can see it goes down to 1100 shortly before the althold change. Not sure I understand correclty when you are referring to a yaw glitch, but when the yaw moves in the negative direction and reaches 0 it jumps back to 360, as it’s range is [0,360]

Hi bigler!

Thanks a lot!!! Now I understand, I could not figure it out, and without your help I never would have realized it, despite the pure logic of it, thanks. Altoght Im curious why the autopilot gave an 1100 command? It means the drone yaws at maximum rate, right? But based on the mission plan, it should have gone straight.

No, the c5 means channel 5 of your RC controller, which is the flight mode channel. 1100 applies to FLTMODE1 in the autopilot configuration, and it’s defined althold in your case.

Yes, of course, Im sorry, you are right. Thanks a lot!!!