diydrones/ardupilot — pull request #1189 by commonism (2014-07-04 13:47:51+00:00)
Title: Loganalyzer add TestAutotune

As I started from non master, this PR requires https://github.com/diydrones/ardupilot/pull/1183
It will work without to, I may be able to rebase if required.

It adds an autotune target, which can be used to make sense of the data in case autotune fails.

This is my own data:
Autotune: FAIL [-] ATDE Angle:20 Rate:9867.21484375 ATUN RPGain:0.0100000072271 RDGain:0.00300000002608 SPGain:4.5 (@line:37519) [GRAPH]
[-] ATDE Angle:6 Rate:9201.97949219 ATUN RPGain:0.0100000072271 RDGain:0.0050000003539 SPGain:4.5 (@line:67101)
incomplete autotune attempt started @91856

it fails when trying to lower P below 0.01 to get the rate down.

This is 201406172154331minihexautotunestopsfivetimes.log I found on diydrones blog:
Autotune: FAIL [-] ATDE Angle:20.81 Rate:10071.92 ATUN RPGain:0.01412 RDGain:0.006 SPGain:3.0 (@line:4784) [GRAPH]
[-] ATDE Angle:20.15 Rate:9515.271 ATUN RPGain:0.01412 RDGain:0.006 SPGain:3.0 (@line:13189)
[-] ATDE Angle:20.34 Rate:9667.557 ATUN RPGain:0.01412 RDGain:0.0055 SPGain:3.0 (@line:22244)
[-] ATDE Angle:9.45 Rate:8655.21 ATUN RPGain:0.01412 RDGain:0.007 SPGain:3.0 (@line:32951)
[-] ATDE Angle:10.44 Rate:8077.911 ATUN RPGain:0.01412 RDGain:0.007 SPGain:3.0 (@line:50222)

In case autotune works, it looks like this (20140616080715.log from diydrones):
Autotune: GOOD [+] ATDE Angle:20.3 Rate:7921.739 ATUN RPGain:0.115 RDGain:0.014 SPGain:2.0 (@line:6343)

And in case there is no data:
Autotune: UNKNOWN No ATUN log data

For small (overpowered?) micro quads, autotune regulary fails, having this Test helps understanding the problem.