New software for visualizing "LOG" files

Hi all,

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.

http://www.siderealtechnology.com/APMLogVisualizer1.0.zip

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:
https://www.youtube.com/watch?v=lAt2dI5Rhzw

Instructions:

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.

Now type:"LOGS<E>"
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:
http://code.google.com/p/arducopter/wiki/AC2_Logs

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.

Dan Gray
grayarea1@tms-usa.com

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • This thing is great.  I had a flight where I recorded some auto-waypoints and then switched to Auto mode and I haven't been able to tell exactly what happened, but this helped a lot.  One suggestion would be to make the waypoint markers a little bigger or more brightly colored or something, they're a little hard to make out among a confusing flight track.

    I have a lot of C# experience.  I'd like to add NTUN support (visualization on the graph of the x and y errors, distance to wp, etc could be pretty cool).  Have you posted the code anywhere?  It could be a good thing to get this up in a google code repository or somewhere like that, and then people could work together on it.  Otherwise, if you could send me the code I could work on NTUN and send you my changes.

    Thanks!

  • 3D Robotics

    Once you've got this finished, please post on it as a blog post, to get the widest possible readership. It deserves it!

  • Hi Dan

    Nice app and very useful. Can you possibly make it fully compatible with APM 1 also as some of the data is not shown?

    Regards Jani

  • Hi Dan,

    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.

     

    Thanks,

          EOSBandi

  • looks very useful dan, i think ill be trying that later.

    thanks,

    james

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

  • There is a GPL data visualisation app called Data explorer. Would it be possible to use that for the purpose of exploring the logs?

    DataExplorer - Summary [Savannah]
    Savannah is a central point for development, distribution and maintenance of free software, both GNU and non-GNU.
  • Nice!  Any specific reason for using C#?

This reply was deleted.

Activity