Jump to content

Stream user aircraft position FSX/Simconnect


Recommended Posts

Hi all,


I'm trying to locate an example written in c# that every second returns the long/lat of the aircraft. This link to an MS article would have been perfect but unfortunately the download no longer exists.


If you could point me in the right direction that would be perfect.




Link to comment
Share on other sites

Use the Managed Data Request example from the SDK for guidance:


Full Simconnect spec (also in your SDK folder, file is called "fsxsdk.chm", chapter "Core Utilities Kit -> SimConnect SDK" - it has links to the examples too)



Sample code (it is in your SDK folder too, C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Core Utilities Kit\SimConnect SDK\Samples)



(yes, I know the web doc is for ESP - doesn't matter, the documentation applies just as well)


I don't know why they are using the ..ByType procedure. This is not exactly the way I would do this, but it is a start. I am using the standard RequestDataOnSimObject call, where you can set a SIMCONNECT_PERIOD to automatically repeat the call (once, Sim frame, visual frame, second, 4 seconds).`


Hint: if you are using a repeating call, and if you want your client to work correctly with P3D, you will have to cancel the request by sending it again with a period of "NEVER". Otherwise you will be swamped with Exceptions. So to avoid trouble further down the road, I suggest you include this right from the start (shut down client => kill all repeating data requests before shutting down SimConnect instance).


What are you trying to do, if I may ask?

Link to comment
Share on other sites

Thanks, in reality this here would have been a great starting point (https://msdn.microsoft.com/en-au/library/cc974114.aspx) but alas the code is no longer available. I want to do something similar have a GUI that I can select what object to monitor then feed that data into a file for later use.


I'll take a look at the links you provided

Thanks again


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...