Logging properties: Difference between revisions

Jump to navigation Jump to search
+-first section; More complete example; links to Generic protocol, readme and source code
m (cat: Property Tree)
(+-first section; More complete example; links to Generic protocol, readme and source code)
Line 1: Line 1:
{{Template:PropertyTree}}
{{Template:PropertyTree}}
__NOTOC__
FlightGear has the ability to produce multiple files '''logging properties'''.  Both the properties and the interval between the records are user selectable.


FlightGear has the ability to produce multiple logs, each recording the value of user-selected properties at a user-defined interval. Details are available in docs-mini/README.logging;  Here's a simple example that logs the rudder and aileron positions to steering.csv every second or so:
More than one log file can be configured in the [[PropertyList XML files|PropertyList file]] setting up what properties to log.
 
== Simple example ==
Here is a simple example that logs the rudder and aileron positions to the file <code>steering.csv</code> every second or so:


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
  <logging>
  <logging>
   <log>
   <log>
   <filename>steering.csv</filename>
   <filename>steering.csv</filename>
  <enabled>true</enabled>
   <interval-ms>1000</interval-ms>
   <interval-ms>1000</interval-ms>
  <delimiter>,</delimiter>
   <entry>
   <entry>
     <title>Rudder</title>
     <title>Rudder</title>
Line 18: Line 27:
   </log>
   </log>
  </logging>
  </logging>
</PropertyList>
</syntaxhighlight>
</syntaxhighlight>
Here's some sample output:
 
Here is some sample output:


<pre>
<pre>
Line 40: Line 51:
   22097,-0.000000,-0.168000
   22097,-0.000000,-0.168000
</pre>
</pre>
== Related content ==
=== Wiki articles ===
* [[Generic protocol]] – ''Alternative and more flexible way to log or even stream data.''
=== Readme files ===
* {{Git link|gitorious|fg/fgdata|master|Docs/README.logging}}
=== Source code ===
* {{Git link|gitorious|fg/flightgear|next|src/Main/logger.hxx}}
* {{Git link|gitorious|fg/flightgear|next|src/Main/logger.cxx}}


[[Category:Property Tree]]
[[Category:Property Tree]]

Navigation menu