Board index FlightGear Support Multiplayer

FGPropertyData

Trouble getting online, setting up a server?
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- copy&paste your commandline.

Please, also see Requesting Technical Help.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

FGPropertyData

Postby TechSwan » Thu Apr 14, 2016 12:07 pm

Good morning again Flight Gear,

I have some questions regarding the FGPropertyData contained in MultiPlayer messages (mpmessages.hxx), in particular what are the legal values of these properties, and if anyone could point me to an example of their use. It doesn't look like it's related to the Property Tree as this vector consists of an ID (integer), a type, and a four byte value (int/float/or 4 chars) corresponding to the type. If anyone could point me to the related documents or hints you have my thanks.

What I'm trying to do is send Flight Gear 'background traffic' being generated from a different, non-flightgear source (another simulator) - and while that is working well I'd like to have certain 'effects' enabled for aircraft depending on the aircraft's current state. For example - have their props spinning, landing gear deployed, and other such features which, I'm assuming, can be set via the FGPropertyData struct. I just can't find the ID's, or any examples of such being set explicitly.
TechSwan
 
Posts: 5
Joined: Thu Feb 25, 2016 12:26 pm

Re: FGPropertyData

Postby Richard » Thu Apr 14, 2016 12:20 pm

TechSwan wrote in Thu Apr 14, 2016 12:07 pm:doesn't look like it's related to the Property Tree as this vector consists of an ID (integer), a type, and a four byte value (int/float/or 4 chars) corresponding to the type. If anyone could point me to the related documents or hints you have my thanks.


The property list is in multiplaymgr.cxx. Most aircraft transmit anything that isn't in the list of named properties using the generic properties (/sim/multiplay/generic). This varies (a lot) from aircraft to aircraft.

I documented the F-14, F-15, JA-37 Viggen and Migage M2000 here https://docs.google.com/spreadsheets/d/ ... sp=sharing
Richard
 
Posts: 706
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: FGPropertyData

Postby Hooray » Sun Apr 17, 2016 1:56 pm

What I'm trying to do is send Flight Gear 'background traffic' being generated from a different, non-flightgear source (another simulator) - and while that is working well I'd like to have certain 'effects' enabled for aircraft depending on the aircraft's current state. For example - have their props spinning, landing gear deployed, and other such features which, I'm assuming, can be set via the FGPropertyData struct. I just can't find the ID's, or any examples of such being set explicitly.


The most useful search terms for the forum/wiki and devel list are "inject", "traffic" and "feed"
The MP protocol is documented at: http://wiki.flightgear.org/Multiplayer_protocol
There are several more or less complete proof-of-concept applications doing what you are interested in:
http://wiki.flightgear.org/FGAIS
Image

There are several ways to work around the limitations you encountered, e.g. by using the "generic protocol" to separately synchronize/replicate relevant state: http://wiki.flightgear.org/Generic_protocol

There is a fairly detailed example documented at: http://wiki.flightgear.org/Property_Tre ... c_protocol

In general, Richard's MPI-based approach (called Emesary) is the more correct to handle such things (absent some HLA/DIS-based scheme): http://wiki.flightgear.org/Emesary

Note that there was an experimental patch to make this property/id mapping dynamic using an XML-configurable scheme: https://sourceforge.net/p/fgms/patches/1/

see the DIS article on the wiki for background info: http://wiki.flightgear.org/Distributed_ ... Simulation
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: FGPropertyData

Postby TechSwan » Tue Apr 26, 2016 10:54 am

Richard wrote:
The property list is in multiplaymgr.cxx. Most aircraft transmit anything that isn't in the list of named properties using the generic properties (/sim/multiplay/generic). This varies (a lot) from aircraft to aircraft.


Ah thank you Richard. I didn't even notice the large IdPropertyList in multiplayermgr.cxx before, it gives me a good idea of where to start at least. It sounds like I'm going to need to make a protocol and/or mapping of some sort to ensure I can set all of the needed features which vary between aircraft. They'll be small (landing gear up/down, and propellers spinning or not) at the moment just to prove it can work.
TechSwan
 
Posts: 5
Joined: Thu Feb 25, 2016 12:26 pm

Re: FGPropertyData

Postby TechSwan » Tue Apr 26, 2016 11:10 am

Hooray wrote in Sun Apr 17, 2016 1:56 pm:The most useful search terms for the forum/wiki and devel list are "inject", "traffic" and "feed"
The MP protocol is documented at: http://wiki.flightgear.org/Multiplayer_protocol
There are several more or less complete proof-of-concept applications doing what you are interested in:
http://wiki.flightgear.org/FGAIS


Thanks Hooray. I actually have the multiplayer packet injection working - just not the state of certain aircraft components/features (landing gear up/down, propellers spinning, etc). It's amazing how easy it was to do upon seeing the packet format described in mpmessages.hxx, and their processing in multiplayermgr.cxx.

There are several ways to work around the limitations you encountered, e.g. by using the "generic protocol" to separately synchronize/replicate relevant state: http://wiki.flightgear.org/Generic_protocol

There is a fairly detailed example documented at: http://wiki.flightgear.org/Property_Tre ... c_protocol


Thank you, I'll spend some time reading up on this protocol and see what I can do. I was thinking of sending the state through the property list which, I think, is attached to the multiplayer packets. Maybe I should be using the generic protocol instead.

In general, Richard's MPI-based approach (called Emesary) is the more correct to handle such things (absent some HLA/DIS-based scheme): http://wiki.flightgear.org/Emesary

Note that there was an experimental patch to make this property/id mapping dynamic using an XML-configurable scheme: https://sourceforge.net/p/fgms/patches/1/

see the DIS article on the wiki for background info: http://wiki.flightgear.org/Distributed_ ... Simulation


I've worked with HLA for the past 8 years now (and DIS as well, although the system uses Version 2.0 (from 1994)) - do you have a public FOM available that I can view? Also - which RTIEXEC are you good folks using - is it based on the 1516, or 1.3NGv6? Would you recommend moving over to that system? I've worked with DIS, TENA, MAVLINK, STANAG 4586, HLA and a host of other simulation packet formats/middleware. The gateways I've written to translate external packets to our own HLA format could probably be converted to using your FOM as well with some work.
TechSwan
 
Posts: 5
Joined: Thu Feb 25, 2016 12:26 pm


Return to Multiplayer

Who is online

Users browsing this forum: No registered users and 1 guest