Hi all, I thought I'd do a little write up on how I tend to use the log analysis function of APMPlanner.
I don't claim to be very knowledgeable about coding and such, being more of a engineering type I tend to use the graphs to understand what the software is doing, rather then trying to understand by reading the code. This approach may be good for other beginners like me.
The first example is used to gain an understanding of what parameters are used in loiter:
Let's use an example of a flight that contained one failed attempt at loiter:
Graph the values from a NTUN line: Long err, Lat err, nav lon, nav lat, Loiter lon I.
This will immediately identify the portion of the flight, where loiter mode was used. You can see that it begins around line 2000.
Zooming in on that part of the flight we get more detail:
RED and GREEN: How the copter is deviating from set position.
BLUE and PINK: how the copter is being commanded to move.
YELLOW: The state of the LOITER I TERM.
Here is the I term in more detail (YELLOW):
You can see that the I wind-up has deviated from zero.
NOW COMES THE KICKER:
In the forum you can see people asking if X version of Arducopter uses NAV in the loiter or not. Obviously, you have to know this, if you're going to tune loiter properly.
Finding out is as easy as graphing a NAV I TERM instead of the LOITER I TERM:
In this graph you can see that the NAV I TERM (YELLOW) wind-up does not deviate from zero,
hence this version does not use NAV terms or procedures for loiter.
A typical circling loiter:
This a typical circling loiter. The values being graphed are the same as in the last example, with no I term displayed.
You can see that the commanded pitch and roll BLUE and PINK are a diverging oscillation which is almost perfectly in phase - this accounts for the circling motion.
You can also see that the position errors are growing as a function of the increasing control commands by the autopilot.
Anyway that's enough for today, I hope someone finds my amateurish contribution useful...

Great stuff--thanks for posting! I'm going to link to this from the manual.
Comment by Hans Miller on March 7, 2012 at 5:08pm Happy to help, I'll be happy to post more examples if people are interested...

This is incredibly useful. Thank you.
just a FYI,
the planner can now graph Tlogs as well.
under telemetry log > "Log> KML" > graph Log
Comment by Jon von Weymarn on July 30, 2012 at 12:24pm Hi,
I cant find the loiter term (Loiter lon I) or any other of the PID params.
Do i have to enable them somehow or am I looking in the wrong place? Im looking in Map Screen --> Tuning --> Double Click on graph legend. I also looked in Tlog > Kml or Graph --> Graph Log...
Comment by Jon von Weymarn on August 9, 2012 at 5:15am To add on my last post:
I undestand now that Hans is examining the ONBOARD logs that you can download via the CLI. So far I have only been looking at the logs MP records via telemetry.
But my question still stands: How can i see the params as Loiter Lon I on APM1 running latest FW? I have enabled NTUN logs but Loiter Lon I is just not there. Must I add it to the dataflashlog.xml?
Comment by Jason Wise on January 24, 2013 at 8:14pm Help, I dont see these options in 2.9, I can log NTun but not the same data, what am I looking for?
Comment by Hans Miller on January 24, 2013 at 10:55pm I'd love to be able to provide some useful advice, but I gave up on Arducopter a long time ago...Maybe not permanently, but for the foreseeable future anyway...
Comment
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.47 members
24 members
87 members
183 members
692 members
© 2013 Created by Chris Anderson.
Powered by

You need to be a member of DIY Drones to add comments!
Join DIY Drones