Autopilot PID controller tuning resources: Difference between revisions

Jump to navigation Jump to search
m
(Added Screenshots & enhanced Windows section)
Line 70: Line 70:
[[Image:Livegraph-plot.png‎|thumb|Livegraph plotted data]]
[[Image:Livegraph-plot.png‎|thumb|Livegraph plotted data]]


The first 4 lines prepare a kind of "header" in the Logfile so that the Grapher can use it. Copy and paste these lines into your favorite ascii text editor and save it to your fg directory (e.g. save as "fgfsparser.pl"). Next you need to install a Perl Interpreter (e.g. [http://www.activestate.com/activeperl Activestate's Active Perl]). Now start Flightgear the following way:
The first 4 lines prepare a kind of "header" in the Logfile so that the Grapher can use it. In the while-part I added the pipe sign as separator so that Live-Grpah can use the output. Copy and paste these lines into your favorite ASCII text editor and save it to your FG directory (e.g. save as "fgfsparser.pl"). Next you need to install a Perl Interpreter (e.g. [http://www.activestate.com/activeperl Activestate's Active Perl]). Now start Flightgear the following way:
<pre>
<pre>
path-to-fgfs-binary\fgfs.exe | perl fgfsparser.pl &gt; my_file 2&1
path-to-fgfs-binary\fgfs.exe | perl fgfsparser.pl &gt; my_file 2&1
Line 78: Line 78:
The following part describes the visualization of the debug output with [http://www.live-graph.org Live Graph]. Live-Graph is a GPL'd Graph Plotter for Windows systems available at Sourceforge.org.
The following part describes the visualization of the debug output with [http://www.live-graph.org Live Graph]. Live-Graph is a GPL'd Graph Plotter for Windows systems available at Sourceforge.org.


After installing it start Live-Graph and set the Data file to your output logfile (e.g. "my_file"). Be aware that you don't have an output file before you did not start the process of debug output at least one time. In this case start Flightgear first and activate the function on the autopilot where you actived the debug output. Back to Live-Graph: The update frequency works fine with updates at 0.5 Hz to 1 Hz (every 1 to 2 seconds). Activate "Show tail data" so that your graph will not be overcrowding during the time and keep caching data active or you will experience loss of data which makes your tests useless.
After installing it start Live-Graph and set the Data file to your output logfile (e.g. "my_file"). Be aware that you don't have an output file before you did not start the process of debug output at least one time. In this case start Flightgear first and activate the AP function on the autopilot where you actived the debug=true output. Back to Live-Graph: The update frequency works fine with updates at 1 Hz or 2 Hz (every 1 or 2 seconds). Activate "Show tail data" so that your graph will not be overcrowding during the time and keep caching data active or you will experience loss of data which will make your tests useless.


Next you need to define the visal output. Set the viewport on the Y-axis from min. -1.5 to max. +1.5. X-axis set to auto on both sides.  It's quite handy to set the horizontal grid (I prefer a grid size of 0.2). And last but not least on X Axcis set "Dataset numbers" as type for the input.
Next you need to define the visal output: set the viewport on the Y-axis from min. -1.5 to max. +1.5. Leaving the scaling to "auto" will create a graph which will not be very easy to read. X-axis set to auto on both sides.  It's quite handy to set the horizontal grid (I prefer a grid size of 0.2 to 0.5). And last but not least on X Axcis set "Dataset numbers" as type for the input.


In the Data series window you can switch the single values on and off and define the way how the program should plot the data. Here in the image I aquire the data of a simple wing leveller and therefor I normalize all data to values between 0 and 1. Be aware that my settings are not mandatory. Be creative and play around with different settings until you feel satisfied with the plotted data.
In the Data series window you can switch the single values on and off and define the way how the program should plot the data. Here in the image I aquire the data of a simple wing leveller and therefor I normalize all data to values between 0 and 1. Be aware that my settings are not mandatory. Be creative and play around with different settings until you feel satisfied with the plotted data.
172

edits

Navigation menu