
I wanted to analyze some data from a tlog file and figured that Excel would be the most flexible way so I created a little utility to extract the data I was interested in and save it as a comma separated value (CSV) file. Each selected parameter is in a separate column, and Excel can open the csv directly.
Note that it can't open the tlog file directly. You must use the Mission Planner to convert it to txt format. so:
1. From the APM Mission Planner Flight Data page select "Telemetry Logs", then "Tlog > Kml or Graph", then "Convert to Text".
2. Select the tlog file you are interested in, and the Mission Planner will create a txt file in its log folder.
3. Open the txt file in this program and it will parse the file and list the available parameters in the left tree control. Double click on the parameters you are interested in and they will be selected and displayed in the right tree control. If you want to remove a parameter from the selected list, double click it.
4."Save As" and provide an output file name. This will produce the csv file that you can open in Excel and plot as desired. The file will look like this, where each row was produced from one packet in the input file that contained at least one of the selected parameters.
If you want to re-use the list of parameters you can save and re-load them from the "configure" menu. These are simple text files you can edit directly if you like.
I am not familiar with the deloyment process for C# programs, so I have placed the entire project folder here.
Comment by Daniel Portillo on May 16, 2012 at 1:07am I can execute the exe file but the program didn't work fine on my pc, I can't do nothing when I open the txt file, when I double click in the left column don't happen nothing. My OS is W7 64bit.
Thanks
Comment by Andrew Fernie on May 16, 2012 at 9:09am Do you see the tree structure in the left box when you open the text file?
Comment by Daniel Portillo on May 16, 2012 at 9:25am
Comment by Andrew Fernie on May 16, 2012 at 4:05pm So you see a bunch of packets (e.g. mavlink_heartbeat_t, mavlink_attitude_t...) in the left hand tree control box, but can't expand them to see the fields? Could you please send me the file and I will have a look - andrewfernie_at_hotmail_dot_com
Has anyone else managed to have it work, or had problems?
Andrew
Comment by CJ on May 19, 2012 at 5:45pm Andrew (and Daniel)...I encountered the same problem. Packets were visible in the left hand box, but no option to expand them or add to the right hand box. I got the program to work by generating the text file in an older version of APM Planner (1.0.68 is the one I happened to have on my computer). The TLOG was from a recent flight (using 1.1.86)...the only action performed in the old version was generating the text.
The only problem now is that the CSV generated by the utility is slightly off. All of the requested column headers are present, but some of the columns have incorrect data types populated (most noticeably date and time).
Which version of APM Planner did you use while creating this program?
Comment by Andrew Fernie on May 22, 2012 at 1:22pm Looks like the data format of the txt file was changed in recent versions of the Mission Planner. I was keying on the "=" to pick up the parameters and it is gone. I will rework the code.
Andrew
Comment by Andrew Fernie on May 22, 2012 at 7:04pm TLogDataExtractor_V1.1.zip has been uploaded to the same location. It works with V87 of the mission planner. If in doubt, check the txt file exported from the mission planner. If you see '=" between parameter names and values you have the old version, if there is just a space, you have the new file format.
One issue to watch is the statustext message that has a format like "mavlink_statustext_t severity 1 text GROUND START Len 59". "text" is the parameter name, and the value should be "GROUND START" but the program interprets "GROUND" as the value, and "START" as the next parameter. No guarantee that the value is one, two, or three words long so tough to decide on what to do.
Andrew
Sorry about that Andrew, that wasn't on Purpose
Comment by Andrew Fernie on May 23, 2012 at 7:33pm No problem Michael. Didn't take long to adapt.
I noticed that you have a CSV output format that would be another way for me to split the fields. Do you expect to continue to support both txt and csv, or am I better to stick with one in particular?
Andrew
Comment by Maqbool on December 2, 2012 at 8:35pm
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.24 members
205 members
719 members
88 members
54 members
© 2013 Created by Chris Anderson.
Powered by

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