HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Apr 21, 2014, 04:40 PM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Discussion
APM Log Analyser

Hi All,

I've put together a little program to help analyse the ArduCopter datalogs.

The idea is to make sense of all that data without you having to know what it all means.

It is very much work in progress (and probably always will be as I add new analysis to detect possible issues that I read about in the various groups).

If anyone wants to test the program then please go ahead, all I ask is you report bugs / ideas for improvement on here. I just want to make clear that this is not a ploy to get free testers or ideas, the program is free and will always remain so, I have no cunning plan to provide "extra" features for a price or fill the program with adware to make money. Of course, I would never refuse a small payment but that will always remain up to you!

Below is a few snips for one of my logs and attached are a few screenshots with some basic meanings for the data.

The initial version can be found here, it will auto-update on first running.

Cheers
Kev

Code:
APM Log File Analiser v1.0.1.7

Log FileName: C:\Program Files (x86)\Mission Planner\logs\Almost Half Mile Out\2014-03-29 13-49-14.log
Ardu Version: V3.1.2 Build: (ddd4d881)
   Ardu Type: ArduCopter
APM Free RAM: 939
 APM Version: 2

Data Found in APM Log File:-
GPS, CTUN, PM, CURR, NTUN, MSG, CMD, ATT, MODE, EV, D32, DU32, ERR

Data NOT Found in APM Log File:-
IMU, ATUN, ATDE, MOT, OF, MAG, INAV, STRT, D16, DU16, DFLT, PID, CAM
~~~~~~~~~ Snip ~~~~~~~~~

Code:
06/01/1980 - 000324: Mode Changed to STABILIZE
06/01/1980 - 000327: Armed
29/03/2014 13:49:30 - 000328: Take Off
29/03/2014 13:49:30 - 000328: Mode Time Changed to 29/03/2014 13:49:30
29/03/2014 13:49:54 - 000789: GCS Information: Ground Command Station is Attached.
       Alt(m ~ ft)   Spd(m/s ~ mph)   Dist(km ~ mi)     Launch(m ~ ft)    GPS-Sats   GPS-Hdop    Eff(mA/min)
Max     62 ~ 203        14 ~ 31        0.28 ~ 0.17     274.51 ~ 900.61      10        1.67           N/A
Avg     26 ~ 85          6 ~ 13         N/A ~ N/A         N/A ~ N/A          9        1.57           ~~~
Min      0 ~ 0           0 ~ 0          N/A ~ N/A        0.23 ~ 0.76         9        1.52           N/A
STABILIZE Flight Time (Session)= 47 seconds, 0:47
STABILIZE Flight Time   (Total)= 47 seconds, 0:47


29/03/2014 13:50:17 - 001427: Mode Changed to ALT_HOLD
29/03/2014 13:50:17 - 001428: SET_SIMPLE_OFF
       Alt(m ~ ft)   Spd(m/s ~ mph)   Dist(km ~ mi)     Launch(m ~ ft)    GPS-Sats   GPS-Hdop    Eff(mA/min)
Max    105 ~ 344         8 ~ 17        0.55 ~ 0.34     640.16 ~ 2100.27       9        2.36           N/A
Avg     67 ~ 219         3 ~ 6          N/A ~ N/A         N/A ~ N/A          8        1.67        450.96
Min     51 ~ 167         0 ~ 0          N/A ~ N/A      234.03 ~ 767.80       8        1.64           N/A
ALT_HOLD Flight Time (Session)= 157 seconds, 2:37
ALT_HOLD Flight Time   (Total)= 157 seconds, 2:37
WARNING: Less than 9 Satellites was detected during this mode.
~~~~~~~~~ Snip ~~~~~~~~~

Code:
29/03/2014 13:53:11 - 006298: Mode Changed to RTL
29/03/2014 13:53:11 - 006299: THROTTLE ERROR: Throttle dropped below FS_THR_VALUE meaning likely loss of contact between RX/TX.
29/03/2014 13:53:11 - 006299: THROTTLE ERROR: Current Distance from Launch is 614.94m ~ 2017.54ft
29/03/2014 13:53:11 - 006299: THROTTLE ERROR: Current Direction of UAV is 306 degrees (0 = north).
29/03/2014 13:53:20 - 006640: THROTTLE ERROR: Throttle error resolve meaning likely RX/TX contact restored.
29/03/2014 13:53:20 - 006640: THROTTLE ERROR: Current Distance from Launch is 546.74m ~ 1793.78ft
29/03/2014 13:53:20 - 006640: THROTTLE ERROR: Current Direction of UAV is 304 degrees (0 = north).
29/03/2014 13:53:21 - 006648: SET_SIMPLE_ON
       Alt(m ~ ft)   Spd(m/s ~ mph)   Dist(km ~ mi)     Launch(m ~ ft)    GPS-Sats   GPS-Hdop    Eff(mA/min)
Max    103 ~ 337         8 ~ 17        0.10 ~ 0.06     613.56 ~ 2012.98      10        1.43           N/A
Avg    101 ~ 331         7 ~ 15         N/A ~ N/A         N/A ~ N/A         10        1.43           ~~~
Min    100 ~ 328         7 ~ 15         N/A ~ N/A      515.90 ~ 1692.58      10        1.43           N/A
RTL Flight Time (Session)= 13 seconds, 0:13
RTL Flight Time   (Total)= 26 seconds, 0:26
~~~~~~~~~ Snip ~~~~~~~~~

Code:
Overall Flight Summary:
       Alt(m ~ ft)   Spd(m/s ~ mph)   Dist(km ~ mi)     Launch(m ~ ft)    GPS-Sats   GPS-Hdop
Max    106 ~ 347        14 ~ 31        1.52 ~ 0.94     656.39 ~ 2153.50      10        2.36              
Avg      0 ~ 0           0 ~ 0          N/A ~ N/A         N/A ~ N/A          9        1.55              
Min      0 ~ 0           0 ~ 0          N/A ~ N/A         N/A ~ N/A          9        1.53              

Power Summary:
       Battery(V)        Vcc(V)        Current(A)       Used Cap(mAh)    Eff(mA/mim)
Max       12.44           5.03            49.30             2778             N/A
Avg        0.00           0.00            25.60              N/A          421.97
Min       10.79           4.81             0.01              N/A             N/A
Overall Flight Time = 395 seconds, 6:35

*** Enable IMU logging to view vibration results.
Happy Flying when you know your UAV is not reporting errors that you maybe ignoring!
Kev
bionicbone is offline Find More Posts by bionicbone
Last edited by bionicbone; Jul 15, 2014 at 12:08 AM.
Reply With Quote
Sign up now
to remove ads between posts
Old Apr 21, 2014, 04:40 PM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Current Features

Model Types:-
• ArduCopter
• ArduPlane (currently being added).

Parameter Checking (only when “Parameter Warnings” is checked):-
• Warning where ACRO_TRAINER is not set to self-level.
• Checks the THR_MIN and MOT_SPIN_ARMED settings.
• Warning if the Battery Capacity is not set correctly according to the models profile.
• Currently only the default mode profile is available, more models to come soon!
• Warning if the APM is not set to complete the pre-arm checks.
• Warning if the APM is set to RTL at an altitude of less than 15 meters.
• Warning if the APM is set to land after a successful RTL.
• Warning if the APM is set to hover below 5 meters after a successful RTL.
• Warning if the Compass Offsets are not in line with expected results.
• Hyperlinks to relevant discussion topics where available.

Basic Event Flows Reported:-
• Armed, Disarmed, Auto Armed, Take Off and Land Complete.
Advanced Event Flows Reported (only when “Non-Critical Events” is checked):-
• Mavlink Float, Mavlink Int32, Mavlink Int16, Mavlink Int8, AP State, Initialise Simple Bearing.
• Lost GPS, Set Home, Not Landed.
• GCS (Ground Command Station) signal strength / quality indication.
• Flip Start / End.
• Simple Mode On / Off, Super Simple On/Off.
• Auto Tune Initialised / Off / Restart / Success / Failed / Reach Limit / Pilot Testing / Saved Gains.
• Save Trim, Save Way Point, Clear Mission.
• Geo Fence Enabled / Disabled.
• Acro Mode Trainer Disabled / Levelling / Limited.
• EPM On / Off / Neutral.
• Parachute Disabled / Enabled / Released.
• Detection of New Event that is Not Recognised (will eventually report back to developer to update code).

Errors Reported (only when “Errors” is checked):-
• MAIN ERROR: Critical Error, contact firmware developers and DO NOT FLY!
• RADIO ERROR: Late Frames & Resolutions.
• COMPASS ERROR: Read Failures & Resolutions.
• OPTICAL FLOW ERROR: Initialisation issues.
• THROTTLE ERROR: Loss of Contact and Restored.
• Includes extra details about distance from launch and direction of travel.
• ERROR: Battery Fail Safe.
• GPS ERROR: Lost Lock, Restored, Glitch, Glitch Cleared, < 9 Satellites, >2 HDop.
• GCS ERROR: Lost Updates, Restored.
• FENCE ERROR: Circular / Altitude breach, Back With in Fences.
• FLIGHT MODE ERROR: Reports on all modes not successfully entering.
• CRASH ERROR: Crash Detected by APM.

Vibration Checks:-
• Analysis performed on IMU data to determine if the levels of vibration are within the designer’s specified limits.

Power Checks:-
• VCC Voltage within specified ranges of the model profile.
• VCC Fluctuation is within specified range of the model profile.
• Main Battery was correct against the model profile.

APM Performance Monitoring Checks:-
• DCM renormalization count is not Zero.
• DCM renormalization blow-up count is not Zero.
• Slow program loops reported.
• I2C bus errors.
• INS errors.

Calculations:-
• GPS date and Time of flight and time in each mode along with the time of the overall flight.
• Calculates the distance flown in each mode selected and for the overall flight.
• Calculates the minimum and maximum distance from home in each mode selected and the maximum for the overall flight.
• Calculates the minimum and maximum speed in each mode selected and the minimum and maximum for the overall flight.
• Calculates the flying efficiency of each mode selected and the overall flight (i.e. current used in each situation).
• Calculates Altitude based on GPS signals if Barometer Altitude is not available.

Log Contents:-
• Details Version Numbers, Type of Vehicle and Data Recorded.


*All reports reliant on having the appropriate logging enabled.
bionicbone is offline Find More Posts by bionicbone
Last edited by bionicbone; Jun 08, 2014 at 10:05 AM.
Reply With Quote
Old Apr 21, 2014, 04:42 PM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Place Holder 2
bionicbone is offline Find More Posts by bionicbone
Last edited by bionicbone; Jun 30, 2014 at 03:02 PM. Reason: Testing Only
Reply With Quote
Old Apr 21, 2014, 04:43 PM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Place Holder 3
bionicbone is offline Find More Posts by bionicbone
Reply With Quote
Old Apr 21, 2014, 04:44 PM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Place Holder 4
bionicbone is offline Find More Posts by bionicbone
Reply With Quote
Old Apr 21, 2014, 05:22 PM
Chris
The Netherlands, NB, Eindhoven
Joined Sep 2010
1,818 Posts
well done!
It would be nice if it was a webapp so all of us could use it easily (linux, mac, mobile etc)
cmavr8 is online now Find More Posts by cmavr8
Reply With Quote
Old Apr 21, 2014, 05:31 PM
Official Stupid Question Asker
TheQuestor's Avatar
United States, TX, San Juan
Joined Mar 2013
3,278 Posts
tried the updated version and it still borks in the same place.

Are you using C# or VB?
TheQuestor is online now Find More Posts by TheQuestor
RCG Plus Member
Latest blog entry: QTipToo.8 Part 5
Reply With Quote
Old Apr 22, 2014, 01:34 AM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Quote:
Originally Posted by TheQuestor View Post
tried the updated version and it still borks in the same place.

Are you using C# or VB?
Hi TheQuestor,

It is written in VB.

I'm not sure why you would have issues now at that point as the code is a simple check against two formatted dates. If a alter my regional settings then it works now.

I made some changes and updated the version number, if you don't mind retrying.

If this does not work I'll create the Trace Logging route, then I'll be able to see what is happening for you

For now though, I best do some work

Edit: Latest Version is on Page 1

Cheers
Kev
bionicbone is offline Find More Posts by bionicbone
Last edited by bionicbone; Apr 23, 2014 at 12:43 AM.
Reply With Quote
Old Apr 22, 2014, 01:36 AM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Quote:
Originally Posted by cmavr8 View Post
well done!
It would be nice if it was a webapp so all of us could use it easily (linux, mac, mobile etc)
I have basic4Android and did the code in the old fashioned way in the hope of a mostly copy and paste.

I have no idea how to write a web app, but hey if someone wants a challenge.

Regards
Kev
bionicbone is offline Find More Posts by bionicbone
Reply With Quote
Old Apr 22, 2014, 02:24 AM
Done Posting, Gone Flying
JNJO's Avatar
Sweden, Uppsala County, Balsta
Joined Jun 2012
1,154 Posts
Really cool and useful.
I'll load an ArduPlane log later today and post the results.
It looks like Log Analyser could read it as-is, once the Plane flight modes are added.
JNJO is online now Find More Posts by JNJO
Reply With Quote
Old Apr 22, 2014, 03:11 AM
FPV! and nothing else matters.
guy1a's Avatar
Israel, Haifa
Joined Aug 2010
1,885 Posts
bless you

thanks
guy1a is online now Find More Posts by guy1a
Reply With Quote
Old Apr 22, 2014, 07:12 AM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Quote:
Originally Posted by JNJO View Post
Really cool and useful.
I'll load an ArduPlane log later today and post the results.
It looks like Log Analyser could read it as-is, once the Plane flight modes are added.
I look forward to seeing the results.

If it is just unrecognised mode issues then that should be easy fixed, i used dedicated variables instead of objects in the hope that porting to my android device will be easier this way. It should handle "Unrecognised" modes as "Other" mode, but will group them all together i think (untested though at this time).

Then we would need to consdier about plane "Parameter Issues", those things that you should watch out for, not change or be within a certain range etc.

Errors / Events may be different. If two groups are working separately they may decide to use these logs differently - we would need to cross match Plane / Quad wiki info to be 100% sure.

Anyway - next step though is creating the code to reliably determine the level of vibration found while hovering or only moving slowly. Of course this will need IMU to be logging.

Cheers
Kev
bionicbone is offline Find More Posts by bionicbone
Reply With Quote
Old Apr 22, 2014, 10:32 AM
Done Posting, Gone Flying
JNJO's Avatar
Sweden, Uppsala County, Balsta
Joined Jun 2012
1,154 Posts
Arduplane log with Log Analyser 0.1

Hi,

I'm using this file: http://ardupilot.com/forum/download/file.php?id=1224 which is a flight made with ArduPlane 3.0.1 Beta.
The difference between the stable and this beta is an added flight mode; Autotune.

The flight modes used in this flight was: Manual, Stabilize, FBWA and Autotune.
JNJO is online now Find More Posts by JNJO
Reply With Quote
Old Apr 22, 2014, 01:49 PM
Official Stupid Question Asker
TheQuestor's Avatar
United States, TX, San Juan
Joined Mar 2013
3,278 Posts
Still having the same issue And when I click continue it says it is already expired

have you played with

Dim TheDate As Date = Now
Dim DateString As String
DateString = Format(TheDate, "dd/MM/yyyy")

which allows you to set the date i/o to anything you want

or something along these lines

Dim USDate As String = "11/25/1981"
Dim NLDate As String
Dim D As Date = Date.Parse(USDate,System.Globalization.CultureInfo .CreateSpecificCul ture("en-US"))
NLDate = D.ToString("d", System.Globalization.CultureInfo.CreateSpecificCul ture("nl-NL"))
TheQuestor is online now Find More Posts by TheQuestor
RCG Plus Member
Latest blog entry: QTipToo.8 Part 5
Reply With Quote
Old Apr 22, 2014, 02:04 PM
Whoops was it always in 2 bits
bionicbone's Avatar
United Kingdom, England, Rotherham
Joined Oct 2008
1,247 Posts
Quote:
Originally Posted by JNJO View Post
Hi,

I'm using this file: http://ardupilot.com/forum/download/file.php?id=1224 which is a flight made with ArduPlane 3.0.1 Beta.
The difference between the stable and this beta is an added flight mode; Autotune.

The flight modes used in this flight was: Manual, Stabilize, FBWA and Autotune.
Hi JNJO,

I've had a quick look and it seems the documentation for both Plane and Copter logs appear to state all the crucial data should be the same but in reality it is not.
Copter Doc
Plane Doc

OK GPS seems to be, however according to the FMT in the log you uploaded the data in each line is different to the documentation, CTUN being the most different.

For example:
FMT Copter Mode Data: Mode, ThrCrs
FMT Plane Mode Data: TimeMS, Mode, ModeNum

FMT Copter Ctun Data: ThrIn, SonAlt, BarAlt, WPAlt, DesSonAlt, AngBst, CRate, ThrOut, DCRate
FMT Plane Ctun Data: TimeMS, NavRoll, Roll, NavPitch, Pitch, ThrOut, RdrOut, AccY

I'd need to know the whereabouts of BarAlt and the true ThrOut to start with. The Mode is not so difficult to get at as this is just one position to the right.

All in all I think I work on the current Quad based solution and then come to Planes later.

If you want a challenge, try to view the BarAlt and ThrOut in Mission Planner Log View, then see if you can identify the correct data in the Log (i.e. matching the same figures). For example, do I trust the FMT details in the Log or the Documentation on the net, or a mixture of both. Currently all the other critical data I can think of comes from the GPS line, which on the face of it seems the same. If you can find BarAlt and ThrOut values then it maybe worth a quick test to add the new modes and let it run.

Cheers
Kev
bionicbone is offline Find More Posts by bionicbone
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion APM 2.6 Help read my Logs. Loiter and Position Problem AndreTan Multirotor Talk 1 May 03, 2014 12:48 PM
Discussion APM crash log Beachbreak Multirotor Power Systems 5 Apr 20, 2014 11:26 PM
Discussion Y6 apm copter view my log kamelkungen Multirotor Talk 0 Mar 02, 2014 04:57 AM
For Sale Arducopter APM 2.0 w/minumOSD $210, APM 1 $170 wingspinner Aircraft - Electric - Multirotor (FS/W) 0 Aug 26, 2012 09:16 AM