Difference between revisions of "Plotter"
HectoPascal (talk | contribs) (→Try it) |
|||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== | <categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Tools</categorytree> | ||
__TOC__ | |||
The <tt>plot</tt> program (in <tt>sw/logalizer/</tt>) is a facility to plot data recorded in a log. Main features: | == Basic [[Logs|Log]] Plotter == | ||
The <tt>plot</tt> program (in <tt>sw/logalizer/</tt>) is a facility to plot data recorded in a [[Logs|log]]. Main features: | |||
* Multi-logs, multi-windows | * Multi-logs, multi-windows | ||
* Multi-curves, constant curves | * Multi-curves, constant curves | ||
* Auto and manual display scaling | * Auto and manual display scaling | ||
* Value scaling | * Value scaling | ||
* PNG snapshot | |||
* Export of the flight track as a [http://code.google.com/apis/kml/documentation/ KML] file for [http://earth.google.com Google Earth] | |||
* Export synchronized values as a CSV file | |||
===Try it=== | ===Try it=== | ||
Launch the plotter with (or | Launch the plotter with (or from the Paparazzi Center) | ||
<tt>sw/logalizer/plot</tt> | <tt>sw/logalizer/plot</tt> | ||
from a shell. | from a shell. | ||
Line 15: | Line 21: | ||
[[Image:plot_phi.png|Plotter desired and measured pitch]] | [[Image:plot_phi.png|Plotter desired and measured pitch]] | ||
The curve can be scaled by a factor by entering a value in the "Scale next by" entry. 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. | 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. | To zoom on the curve, unselect the "Auto Scale" checkbox and choose the appropriate time/Y min and max. | ||
Line 24: | Line 30: | ||
Save a screenshot of the window as a PNG image from the File menu (CTRL-S). | 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. | |||
[[Image:SaveCSV.png|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 | |||
[[Category:Tools]] [[Category:User_Documentation]] |
Latest revision as of 06:57, 24 January 2013
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.
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.
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