|Apr 21, 2014, 04:40 PM|
APM Log Analyser
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.
APM Log File Analiser v126.96.36.199 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
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.
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
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.
ImagesView all Images in thread
|Apr 21, 2014, 04:40 PM|
• 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.
• Analysis performed on IMU data to determine if the levels of vibration are within the designer’s specified limits.
• 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.
• 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.
• Details Version Numbers, Type of Vehicle and Data Recorded.
*All reports reliant on having the appropriate logging enabled.
|Apr 22, 2014, 01:34 AM|
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
|Apr 22, 2014, 01:36 AM|
I have no idea how to write a web app, but hey if someone wants a challenge.
|Apr 22, 2014, 02:24 AM|
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.
|Apr 22, 2014, 07:12 AM|
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.
|Apr 22, 2014, 10:32 AM|
Arduplane log with Log Analyser 0.1
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.
|Apr 22, 2014, 01:49 PM|
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"))
|Apr 22, 2014, 02:04 PM|
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.
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.
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.
|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|