I spent some time tuning the PIDs yesterday, and everything seemed to be going well, but then I took it out today, and it flipped 5 times in a row on takeoff from a relatively flat surface. After a power cycle it took off normally and was behaving well.
Looking at the logs, there are some weird spikes on some spoolups and not others. There looks to be a lot of noise on only my Z gyro too. Is it possible that the z gyro is being incorrectly initialised sometimes which might cause this behaviour until rebooted? I've found that if it flips once, it will keep doing it until it's power cycled. Other logs I have where it flips show noise on only this gyro, whereas on successful takeoffs, this noise looks to be absent. I could be interpreting the logs incorrectly, so if someone else could take a look it would be appreciated.
Log 373 shows flips (ends up as being tilted onto its side on each takeoff attempt) and log 374 is the subsequent successful flight.
Thoughts?
Gyro log:
Motor logs - All 5 takeoffs
Motor logs - First 2 takeoffs