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 and placing it in the $FG_ROOT/data/Protocols
6 The definition of the protocol consists of variable separators, line separators,
11 <name> for ease of use
12 <node> the property tree node which provides the data
13 <type> the value type (needed for formatting)
14 <format> defines the actual piece of text which should be sent.
15 it can include formatting options like:
21 <factor> an optionale multiplication factor which can be used for
22 unit conversion. (for example, radians to degrees).
23 <offset> an optional offset which can be used for unit conversion.
24 (for example, degrees Celsius to degrees Fahrenheit).
27 The output section also could define the variable separator and line separator.
29 The separators can be either a control character such as a tab or newline, or a
30 user specified string or other single charachter. The currently supported
31 control charachters are:
43 any other charachters just need to be added to "Network/generic.cxx"
45 The var_separator is placed between each variable, while the line_separator is
46 placed at the end of each lot of variables.
49 A simple protocol configuration file then could look something like the
57 <line_separator>newline</line_separator>
58 <var_separator>newline</var_separator>
63 <node>/velocities/airspeed-kt</node>
67 <name>heading (rad)</name>
68 <format>H=%02d</format>
69 <node>/orientation/heading-deg</node>
70 <factor>57.29578</factor> <!-- degrees to radians -->
74 <name>pitch angle (deg)</name>
75 <format>P=%05.1f</format>
77 <node>/orientation/pitch-deg</node>