735
edits
m (http://sourceforge.net/p/flightgear/mailman/message/34632142/) |
(Integration of relevant insta-quotes into main text and update on current status) |
||
Line 25: | Line 25: | ||
# It provides a very good framework to allow anyone to create components that interact with FlightGear using programming languages other than C/C++ (think Ada, Java, Python etc), which may be running in their own threads, and reside in separate binaries<ref>http://sourceforge.net/p/flightgear/mailman/message/34196458/</ref>, which will be also easier to debug/troubleshoot (think regression testing, i.e. running a self-contained subsystem in a dedicated gdb/valgrind session), without having to know how to modify/patch and rebuild FlightGear. | # It provides a very good framework to allow anyone to create components that interact with FlightGear using programming languages other than C/C++ (think Ada, Java, Python etc), which may be running in their own threads, and reside in separate binaries<ref>http://sourceforge.net/p/flightgear/mailman/message/34196458/</ref>, which will be also easier to debug/troubleshoot (think regression testing, i.e. running a self-contained subsystem in a dedicated gdb/valgrind session), without having to know how to modify/patch and rebuild FlightGear. | ||
A good overview of how the HLA architecture works can her found here http://www.pitch.se/images/files/tutorial/TheHLAtutorial.pdf. | |||
==Design== | |||
The planned overall design is as follows: | |||
* We intend to use OpenRTI as the underlying RTI. This is an open source IEEE 1516 standard RTI, written by Mathias Fröhlich and available from https://sourceforge.net/projects/openrti/. | |||
* Mathias has also written an open source toolkit to act as an interface library, with a working name of SimKit. This sits on top of the RTI and simplifies interfacing with the RTI massively. It also has excellent Python integration, making it very easy to write scripted Federates. | |||
Using SimKit, the integration point is within the FlightGear code (rather than SimGear), in particular the code under src/Network/HLA. | |||
==Federate Object Model== | |||
A key part of the design is writing the Federation Object Model (FOM), which defines the objects and updated that are published by the RTI. While it might at first glance seem a good idea to use the FOM to share the internal property tree across multiple federates, this is probably the wrong way to use HLA as the granularity is too low and it's likely to lead to synchonization issues . Instead we'll need to make explicit decisions about the data models to communicate. | |||
The FOM is a set of XML files in [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/HLA/ fgdata/HLA/] | |||
==Current Status (19/02/2016== | |||
Currently there is some very old HLA support in SimGear. This is very out of date and should be ignored. | |||
Stuart has HLA Support using the latest OpenRTI and SimKit working on a local build, but is waiting for Mathias to officially publish his SimKit before he pushes his changes. So all of the following is local-only, but included here for information. | |||
The Flightgear core currently supports HLA as follows. | |||
* SimKit integration, reading the SimKit FOM and connecting to an OpenRTI RTI. | |||
* Instantiating MP AI objects so users can view objects published over the RTI by other Federates. This is currently somewhat unsatisfactory as it overloads the MP code, where really these objects are more basic. | |||
We currently have the following other Federates: | |||
* fgogel - An AI model written in python the publishes over to the RTI. Part of SimKit, but handy nevertheless! | |||
* fgtraffic - to run an AI Scenario externally to the FG Core | |||
* fgmetar - written in python that retrieves the closest METAR station for other published Federates and publishes the METAR for them to pick up. This could be expanded to provide a general Weather Engine. | |||
Separately Erik has been doing some preparatory work suitable for supporting HLA in JSBSim (http://sourceforge.net/p/jsbsim/mailman/message/34720784/) | |||
For additional information, please see: | For additional information, please see: |