1 The generic communication protocol for FlightGear provides a powerfull way
2 of adding a simple ASCII based output only protocol, just by defining an
3 XML encoded configuration file.
5 The definition of the protocol consists of variable separators, line separators,
10 <name> for ease of use
11 <node> the property tree node which provides the data
12 <type> the value type (needed for formatting)
13 <format> defines the actual piece of text which should be sent.
14 it can include formatting options like:
20 <factor> an optionale multiplication factor which can be used for
21 unit conversion. (for example, radians to degrees).
22 <offset> an optional offset which can be used for unit conversion.
23 (for example, degrees Celsius to degrees Fahrenheit).
26 The output section also could define the variable separator and line separator.
28 The separators can be either a control character such as a tab or newline, or a
29 user specified string or other single charachter. The currently supported
30 control charachters are:
42 any other charachters just need to be added to "Network/generic.cxx"
44 The var_separator is placed between each variable, while the line_separator is
45 placed at the end of each lot of variables.
48 A simple protocol configuration file then could look something like the
58 <line_separator>newline</line_separator>
59 <var_separator>newline</var_separator>
64 <node>/velocities/airspeed-kt</node>
69 <format>H=%02d</format>
70 <node>/orientation/heading-deg</node>
71 <factor>57.29578</factor> <!-- radians to degrees -->
75 <name>pitch angle</name>
76 <format>P=%05.1f</format>
78 <node>/orientation/pitch-deg</node>