Plotter

From PaparazziUAV
Jump to navigation Jump to search

Basic Log Plotter

The plot program (in sw/logalizer/) is a facility to plot data recorded in a log. Main features:

  • Multi-logs, multi-windows
  • Multi-curves, constant curves
  • Auto and manual display scaling
  • Value scaling
  • PNG snapshot
  • Export of the flight track as a KML file for Google Earth
  • Export synchronized values as a CSV file

Try it

Launch the plotter with (or from the Paparazzi Center)

sw/logalizer/plot

from a shell. Open (CTRL-O) a log (from the var/logs directory). A menu for each aircraft is inserted in the menubar. Select a field from this menu to plot it.

Plotter desired and measured pitch

The curve can be scaled by a factor and an offset (separated with a "+") can be added by entering a value in the "Scale next by" entry. For example the value "1.8+32" translates degrees Celcius into degrees Fahrenheit. For example, to compare the desired and the measured pitch attitude, select "theta" from the "ATTITUDE" message with a (default) scale of 1., then set 57.3 (to convert radians into degrees) in the scale box and select "pitch" field from the "DESIRED" message.

To zoom on the curve, unselect the "Auto Scale" checkbox and choose the appropriate time/Y min and max.

A curve can be deleted from the "Curves" menu.

Open another window from the File menu (CTRL-N): the log menu will be inserted into any new window.

Save a screenshot of the window as a PNG image from the File menu (CTRL-S).

Export a KML file from the log menu.

Export values in CSV format

From the log menu, the "Export CSV" entry allows to export synchronised values to raw text format (which then can be imported in any spreadsheet, scilab, ...). It opens a popup window where values from the messages to export are chosen. Timestamped lines of values (separarated with semicolons) are produced on a periodic basis (e.g. 0.25s) or synchronously with a chosen message (e.g. GPS). Exported values at time t are the values from the more recent messages (if available). The configuration (clicked values) is saved (in conf/%gconf.xml) and loaded as default.

Export values from a log

Example of the export output:

Time;GPS:climb;GPS:speed;ATTITUDE:theta;ATTITUDE:phi
4.160;;;;
4.410;0;0;;
4.660;0;0;-30;-22
4.910;0;0;-30;-22
5.160;0;0;-22;-21
5.410;0;0;-22;-21