20,741
edits
m (courtesy of Lee E: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg21192.html) |
m (courtesy of Lee E: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg21192.html) |
||
Line 11: | Line 11: | ||
Thus, the property system acts as a routing interface, both between different high-level FG sub-systems and the outside world. Data that is required by one FG sub-system can be exposed in the property tree, where it can then be read or modified, either by other internal FG sub-systems, or by & for external input & output. | Thus, the property system acts as a routing interface, both between different high-level FG sub-systems and the outside world. Data that is required by one FG sub-system can be exposed in the property tree, where it can then be read or modified, either by other internal FG sub-systems, or by & for external input & output. | ||
For example, a left banking joystick input is exposed in the property tree where it is read by the FG FDM sub-system. The FG FDM sub-system then in turn outputs an aileron deflection back to the property tree where it is then read by the FG animation sub-system to animate the aileron deflection in the 3D model. | |||
Alternatively data [the joystick input], once exposed in the property tree, can be read and modified by an external application | |||
via the FG IO sub-system, such as an external FDM. | |||
The output from the external FDM can then be fed back in to FG by writing it's data back to the property tree, once again, via the FG | |||
IO sub-system. | |||
In addition to the protocols supported by the FG IO sub-system there are also telnet and http interfaces, which allow property tree data | |||
to be read and modified via these interfaces, i.e. using a telnet client or a conventional web browser to inspect/access and modify most FlightGear runtime state. | |||
An important feature of the property tree interface is that it can be tailored and new entries added as required, without requiring C++ changes. | |||
If you wish to use a custom-written sub-system, such as your own Terrain Following and Avoidance sub-system, for example, and | |||
perhaps implemented or prototyped in Nasal. | |||
Adding new property tree branches and nodes to handle your unique data presents no problems. | |||
To make it easier to manipulate the tree, start FlightGear with the following command line | To make it easier to manipulate the tree, start FlightGear with the following command line |