13,212
edits
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. | |||
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 | |||
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]] |