Page 1 of 1

Can I get data related to federates participating in DIS simulation

Posted: Fri Aug 30, 2019 9:59 am
by anand
How can I extract data related to other aircraft which has participated in DIS using SImconnect ? If simconnect does not support this , Is there any way to do that ??

Re: Can I get data related to federates participating in DIS simulation

Posted: Fri Aug 30, 2019 1:58 pm
by Clifton Crane
Hi anand,

The SimConnect Data Request Sample sample shows how to get data from the user object. The same SimConnect_RequestDataOnSimObjectType can also be used to get data on other objects in the world.

Unfortunately, through SimConnect there is not a way to determine whether or not the entity is a local entity (such as AI traffic) or a remote DIS entity. If you were to assume that all entities other than user were DIS entities this may not be an issue.

There is also the IDISManagerV450 PDK service. This interface can provide you with site/application/entity id's for individual entities (see GetEntityIdByObjectId function). Using this function you would be able to determine whether or not the entity belonged to the local client or another client by comparing site/app/entity ids.

If you decide to go the PDK route you would also want to have a look at the ISimObjectManager PDK service. This interface can be used to collect entities within a radius.

Re: Can I get data related to federates participating in DIS simulation

Posted: Tue Sep 03, 2019 5:46 am
by anand
Okay . If I have assumed that all other entities are DIS entities . will simconnect be able to tell latitude , longitude of those entities ? If yes the which method will do that ?

Re: Can I get data related to federates participating in DIS simulation

Posted: Tue Sep 03, 2019 6:46 am
by anand
Okay , I got data with SimConnect_RequestDataOnSimObjectType when I passed argument as Aircraft . but suppose if there are 5 entities other than user then how will i get data for all 5 entities ?

Re: Can I get data related to federates participating in DIS simulation

Posted: Tue Sep 03, 2019 7:30 pm
by Clifton Crane
Hello,

You can specify the type of object(s) you are requesting in SimConnect_RequestDataOnSimObjectType. For example, instead of using SIMCONNECT_SIMOBJECT_TYPE_USER you can use SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT. This will request data on all aircraft. In this case you will receive multiple SIMCONNECT_RECV_ID_SIMOBJECT_BYTYPE callbacks, one for each object.

In the SIMCONNECT_RECV_SIMOBJECT_DATA struct, the dwentrynumber and dwoutof variables can be used to determine how many objects are being returned.

Re: Can I get data related to federates participating in DIS simulation

Posted: Wed Sep 04, 2019 5:25 am
by anand
One last doubt is when I'll pass SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT , will it give detail for user object too ?

Re: Can I get data related to federates participating in DIS simulation

Posted: Wed Sep 04, 2019 2:16 pm
by Clifton Crane
I believe it should if the user is in an aircraft.