Can I get data related to federates participating in DIS simulation
Can I get data related to federates participating in DIS simulation
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 ??
-
- Lockheed Martin
- Posts: 1207
- Joined: Tue Sep 25, 2012 2:34 pm
Re: Can I get data related to federates participating in DIS simulation
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.
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.
Prepar3D® Software Engineer Sr.
Re: Can I get data related to federates participating in DIS simulation
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
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 ?
-
- Lockheed Martin
- Posts: 1207
- Joined: Tue Sep 25, 2012 2:34 pm
Re: Can I get data related to federates participating in DIS simulation
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.
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.
Prepar3D® Software Engineer Sr.
Re: Can I get data related to federates participating in DIS simulation
One last doubt is when I'll pass SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT , will it give detail for user object too ?
-
- Lockheed Martin
- Posts: 1207
- Joined: Tue Sep 25, 2012 2:34 pm
Re: Can I get data related to federates participating in DIS simulation
I believe it should if the user is in an aircraft.
Clifton Crane
Prepar3D® Software Engineer Sr.
Prepar3D® Software Engineer Sr.
-
- Posts: 10
- Joined: Sat May 02, 2020 6:32 am
Re: Can I get data related to federates participating in DIS simulation
Hi Clifton Crane,
How can I call APIs implemented in IDISManagerV450 from a C# project?
How can I call APIs implemented in IDISManagerV450 from a C# project?