### Useful tips for log analysis

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...

• So the values of MOT are percentage not currents, voltages nor the motors pulse width modulation that the ESC's receive from APM
• Developer

mot = motor.

values are generaly close to 2000 for full throttle and 1000 for no throttle

• Hi

I have the new update of mission planner & firmware, and after the last flight i downloaded datalog of the flight.

I'm just wondering, what is MOT meaning

• Hi,

I am trying to enable sonar in data logs but I having trouble with this..I used command 'enable SONAR' and the oputput are on the pic below:

• Hi all !

I tried to follow this example and noticed the missing / different values in NTUN as well.

I am clueless although i found this article about a Bug in MP concerniung column names in logs:

But the fix did not work for me.

Are those columns in the example gone due to a change in Arducopter and / or MP ?

Greetings,

Nils

• 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...

• Help, I dont see these options in 2.9, I can log NTun but not the same data, what am I looking for?

• 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?

• 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...

• Developer

just a FYI,

the planner can now graph Tlogs as well.
under telemetry log > "Log> KML" > graph Log