I now have telemetry, but at first I didn't and since I really wanted to view my LOG files in something other than a graph or using notepad, I wrote a small utility for viewing them. I still use this, because there's some things that are logged here that aren't logged in the TLOG files by the Mission Planner software.
This is NOT for the TLOG's, mission planner does a great job with that. This is for the logs that the APM2 stores on it's memory cartridge, and you download using the CLI.
Installation is basically unzipping the exe file wherever you want, and run it.
Here's basic instructions:
This is "APMLogVisualizer" by Dan Gray
THIS PROGRAM IS BY NO MEANS FINISHED, but I already find it useful.
I hope you find it useful, but use at your own risk.
For a primitive video on the features, check this out:
This software is for LOG Files, not TLOG files. TLOG files are created in the Mission
Commander when you're connected by USB or Telemetry to the QuadCopter. There is already
a great built in viewer inside the mission planner for these files, but the only tool
for the "LOG" files is you can graph any particular item (or items).
But if you don't have telemetry, or if you want to log things that aren't logged in the
TLOG files, it may be possible that the information is in the LOG files, that are saved
inside the memory card on your APM2.
First, you should set up your APM2 to log the appropriate parts.
Using Mission Planner, you go to the TERMINAL button, wait until a bunch of text goes by,
then press enter 3 times.
It should end up saying "Arducopter V2.5.5" or your current version.
You should see a line that says:
logs enabled: ATTITUDE_MED GPS CTUN NTUN CMD CURRENT MOTORS
Your mileage may vary, depending on what you're logging.
APMLogVisualizer doesn't look at everything, but here's what it does "look at"...
ATTITUDE, GPS, CMD, MODE, CURRENT, MOTORS
Others that are already collected inside APMLogVisualizer, but not displayed are CTUN and NTUN.
This needs to be finished, and could be useful for tuning.
If you don't have ATTITUDE, GPS, CMD CURRENT MOTORS enabled, then enable them one by one.
The only thing to watch out for is to enable "CURRENT" you have to type "ENABLE CUR<e>"
instead of "ENABLE CURRENT<E>".
Now, I'm assuming you know how to save the log files using the mission commander
"Terminal/LogDownload". If not, go here:
Next you need to open a log file.
You can set up your "MyComputer" to automatically run this program by right clicking
on a log file then selecting "Open With", and browse to APMLogVisualizer.exe. Make
sure the checkbox that says something about "Always open with" is checked.
You can run APMLogVisualizer.exe directly, too, then click on "Load APM2 Log File" ,
browse to your file, and open it.
Once a file is open, in the large area on the left, you'll see the GPS path that the Copter
took during this log. I call this the "Path Area". At the bottom is an arrow with an
indicator of how many meters in Longitude the copter went. On the right of this area
is a brown bar graph of GPS altitude, and at the top right the highest altitude that
the copter went is diplayed after the text: "Verticle Height".
The path that the copter took is colored, Red for "Stabilize" mode, Magenta for "Loiter
Mode", and Green for "Auto Mode". Also, if there are any waypoints, they're displayed
in this area of the screen.
You can click anywhere on the map, and a browser will open and if you've an I-Net connection,
Maps.Google will display the aerial view of the center of motion for your copter. It will
put a mark on the map where you clicked in the Path area.
In the text box area at the top right is all the data that's displayed from the log.
This includes GPS data (including Universal and local time),
then all of the Attitidue data including heading, pitch, roll, yaw,
the motor signals, the volts and amps (You have to have a voltage and amperage sensor)
The current MODE that the copter is in (Stabilize, RTL, Loiter, etc),
and the latest command if in the Auto mode, along with the command parameters.
In the bottom right portion of the screen is a graphic of the current Roll, Pitch, and Heading
of the machine.
I got lazy on the Roll and the Pitch, they're just bars for now!
You can grab the slider at the bottom of the screen (I call this the "Log Pointer" slider), and drag it anywhere in the file.
To the very right is the end of the file, the very left is the beginning of the file.
You can watch the little X work around the path as you move this slider, also, all of the
numbers change to the current value for that portion of the log.
You can "play" the log file by clicking on "PlayLogRev" or "PlayLogFwd".
You'll see the numbers change, and the "little guy" will run around the path the copter took.
You can change the playback speed with the smaller slider on top of the Log Pointer slider.
I hope this is useful,
If you want to improve this program, please ask me for the project source (it's written in C#) , as long as you're
willing to share the source and exe with the community, and I decide you're worthy, I'll let
you use it.
Nice! Any specific reason for using C#?
There is a GPL data visualisation app called Data explorer. Would it be possible to use that for the purpose of exploring the logs?
Hey just started playing with this and see it can be useful. Thank you for the work you've put into this.
Several of my log files though don't show the paths and seem to be confused on a few other fronts. Would it be at all useful for you if I e-mailed them to you?
looks very useful dan, i think ill be trying that later.
Jake, I use C# because about 8 years ago, a friend of mine recommended it, not sure if it was a good decision or not, but it sure is easy to use!
Bruce, yes, please send me your log files.
Bruce sent me one of the files he was having trouble with.
I found a lot of bad lines in Bruce Jones log files, and he's upgraded to Arducopter version 2.6. I was wondering if anybody else that's upgraded to version 2.6 has bad lines in their files.
Do a text search for "0T" that's "the number zeroT" which is one of the lines that is re-occurring bad data.
It's a great tool, could you please share the source ? I'm porting apm navigational and datalogging functions to MultiWii and this tool could be a great addition to the current gui, but the log format is slightly different so I would like to modify the code to accomodate this format.
I'm currently adding graphing software to the project, would you like to wait until I'm finished?
I expect I'll have zooming into the graphs done (it's mainly all I have left to do), by early next week.
For graphing, take a look at the zedGraph control, it is used in the APM for log graphing , have many great features, and easy to use.
I'm sure can wait, i'll program the automated log downloading till that. :D
Nice app and very useful. Can you possibly make it fully compatible with APM 1 also as some of the data is not shown?
Once you've got this finished, please post on it as a blog post, to get the widest possible readership. It deserves it!
I've got my graphs working pretty well, I just need to make the zoom put an xor box while holding the button, then a few odds and ends. I'm hoping to be done this week.