Hi,
I am using SimConnect_SetDataOnSimObject after creation of some aircrafts through SimConnect_AICreateNonATCAircraft. And i am continuously using SIMCONNECT_DATA_INITPOSITION structure to set its parameters every half a second. Learning Center says one must not use this structure to continuously set data through this structure as P3D tries to initiate somethings for terrain system. If so, then which structure should I have to use.
Thanks for your precious time.
Best Regards,
Zamirk
SimConnect_SetDataOnSimObject
Re: SimConnect_SetDataOnSimObject
Can I ask why you are trying to do that? Could you not just set a waypoint and then "let" the aircraft fly to the next position.
Or you could look into the body velocity X,Y Z, but then that's like writing your own flight dynamics engine.
Or you could look into the body velocity X,Y Z, but then that's like writing your own flight dynamics engine.
Ron
Re: SimConnect_SetDataOnSimObject
In fact, I am writing a module which will interact different flight simulators with each other that is why I have to do that.
Setting the position of aircraft could be multiple times in a second, so I can't use waypoint setting approach. Is there any way to do that.
Setting the position of aircraft could be multiple times in a second, so I can't use waypoint setting approach. Is there any way to do that.
Re: SimConnect_SetDataOnSimObject
Same is the case for munitions and when I set Weapon position through this approach, weapon disappears but aircraft doesn't disappear through this approach. Please, guide me about this.
Re: SimConnect_SetDataOnSimObject
Look into the velocity body X,Y Z in the Simulation variables section of the Utilities/Variables area in the SDK. I have not coded this, but would assume you would use SetDataonSimObject. See the throttle example.
The are other variables like acceleration and rotation. But this means setting up your own flight dynamics engine, based on what you want to do.
The are other variables like acceleration and rotation. But this means setting up your own flight dynamics engine, based on what you want to do.
Ron
Re: SimConnect_SetDataOnSimObject
Thanks for your guidelines. I Will give it a try IA!
-
- Lockheed Martin
- Posts: 1382
- Joined: Mon Sep 20, 2010 6:17 pm
Re: SimConnect_SetDataOnSimObject
Hi Zamirk,
I'd recommend taking a look at the SimObject API (ISimObjects). That PDK capability was specifically created for use cases similar to the one you describe. There are a couple examples included in the SDK.
Regards,
Adam
I'd recommend taking a look at the SimObject API (ISimObjects). That PDK capability was specifically created for use cases similar to the one you describe. There are a couple examples included in the SDK.
Regards,
Adam
Prepar3D® Engineering Project Manager
Re: SimConnect_SetDataOnSimObject
Thanks Adam,
i am trying to use SimObject API, i compiled Missile SimObject Sample in Visual Studio 2013 and place Missile.dll in gauges/Missile.dll and also update dll.xml with new load Missile.dll addone, when i run prepar3d.exe its crashes on load Missile.dll, i don't know why because when i compile Missile sample project its succeeded.
So, how i debug this problem?
Regards,
zamirk
i am trying to use SimObject API, i compiled Missile SimObject Sample in Visual Studio 2013 and place Missile.dll in gauges/Missile.dll and also update dll.xml with new load Missile.dll addone, when i run prepar3d.exe its crashes on load Missile.dll, i don't know why because when i compile Missile sample project its succeeded.
So, how i debug this problem?
Regards,
zamirk