Can I get data related to federates participating in DIS simulation

anand
Posts: 8
Joined: Thu Aug 29, 2019 5:03 am

Can I get data related to federates participating in DIS simulation

Postby anand » Fri Aug 30, 2019 9:59 am

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 ??

Clifton Crane
Lockheed Martin
Posts: 997
Joined: Tue Sep 25, 2012 2:34 pm

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

Postby Clifton Crane » Fri Aug 30, 2019 1:58 pm

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.
Clifton Crane
Prepar3D® Software Engineer Sr.

anand
Posts: 8
Joined: Thu Aug 29, 2019 5:03 am

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

Postby anand » Tue Sep 03, 2019 5:46 am

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 ?

anand
Posts: 8
Joined: Thu Aug 29, 2019 5:03 am

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

Postby anand » Tue Sep 03, 2019 6:46 am

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 ?

Clifton Crane
Lockheed Martin
Posts: 997
Joined: Tue Sep 25, 2012 2:34 pm

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

Postby Clifton Crane » Tue Sep 03, 2019 7:30 pm

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.
Clifton Crane
Prepar3D® Software Engineer Sr.

anand
Posts: 8
Joined: Thu Aug 29, 2019 5:03 am

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

Postby anand » Wed Sep 04, 2019 5:25 am

One last doubt is when I'll pass SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT , will it give detail for user object too ?

Clifton Crane
Lockheed Martin
Posts: 997
Joined: Tue Sep 25, 2012 2:34 pm

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

Postby Clifton Crane » Wed Sep 04, 2019 2:16 pm

I believe it should if the user is in an aircraft.
Clifton Crane
Prepar3D® Software Engineer Sr.


Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 4 guests