I'm now developing a flight simulator and trying to use FG as the display module
If you want to interface an external program to FlightGear, you will probably want to look into using the props/telnet interface to access the FlightGear property tree and its properties.
See these links for an introduction:
http://cvs.flightgear.org/viewvc/data/D ... iew=markuphttp://cvs.flightgear.org/viewvc/data/D ... iew=markuphttp://wiki.flightgear.org/index.php/Property_TreeThere is also the possibility of creating custom protocols using the generic protocol system which is XML configurable:
http://wiki.flightgear.org/index.php/Generic_Protocolhttp://cvs.flightgear.org/viewvc/data/D ... iew=markuphttp://cvs.flightgear.org/viewvc/data/D ... iew=markup1) several aircrafts flying together as a team in one scenario automatically
For this you could either use the built-in multiplayer support or the AI traffic system.
The multiplayer facility is documented here:
http://wiki.flightgear.org/index.php/Multiplayerhttp://cvs.flightgear.org/viewvc/data/D ... iew=markuphttp://wiki.flightgear.org/index.php/Ho ... yer_serverAlso note that the FlightGear multiplayer server is a separate project:
http://wiki.flightgear.org/index.php/Fl ... yer_ServerIf you decide to use a completely separate program to control traffic in FlightGear, you will probably want to look at some of the hard coded protocols that are supported by FlightGear, to see how easy it is to add new protocols:
http://cvs.flightgear.org/viewvc/source/src/Network/There is also the possibility of using an external FDM:
viewtopic.php?f=17&t=7121&p=66985#p66925The AI traffic system is documented here:
http://wiki.flightgear.org/index.php/AI_Systemshttp://wiki.flightgear.org/index.php/In ... ve_Traffic(Note that there is already the possibility to control multiple aircraft in FlightGear using scripts, see the wingmen demo)
You may also want to check out this discussion about using scripted "bots" to control AI traffic in FlightGear (make sure to follow posted links):
viewtopic.php?f=23&t=5900Also, the AI traffic system has now its own subforum here:
viewforum.php?f=232) according to the command from the console, something meaning like "Plane A attacks plane B", FG will show the attacking behaviour and crash of the target
As this is about dogfighting, you may also want to check out FlightGear's support for submodels:
http://cvs.flightgear.org/viewvc/data/D ... iew=markupBut make also sure to take a look at these discussions about dogfighting (do a forum or mailing list search for more info):
viewtopic.php?f=17&t=5742viewtopic.php?f=4&t=6797Here is a thread about the wingman demo:
viewtopic.php?f=4&t=6805In general, it will be easiest to get this implemented using the AI traffic system because you don't necessarily need an external program to control FlightGear, instead you could use scripted aircraft traffic that controlled from within FlightGear. Which also has the added advantage that you don't need to compile anything to get started, even though you may find that some things are easier to implement by extending the AI traffic system slightly. This was also recently discussed:
viewtopic.php?f=23&t=7061If you are specifically interested in doing C++ development, you may find it easier to augment existing features in FlightGear than creating something completely new from scratch.
Also, you will probably want to subscribe to the FlightGear developers mailing list if you are serious about doing FlightGear development:
http://flightgear.org/mail.html