Absolute noob with absolute noob questions

Hi all.
Forgive the stupid questions and feel free to throw RTDM manual comments and links to resources etc but…

Am just starting out driven by a desire to do a couple of things with this game that I can’t find anybody doing for me right now.

  1. Use sim connect to pull the active ATC dialogue options from game so that the entire dialogue box can be displayed on a completely different (networked) device.

  2. Sim connect to pull aircraft structural health data (if that even exists at all)*
    Example - Does exceeding speed of landing gear deployment get registered as damage to landing gear? If so, can simconnect be used to display that state?

For all this I guess I’m going to need some direction towards resources.

Your help and patience much appreciated.

I think you need to get your hands on the SDK .

https://docs.flightsimulator.com/html/index.htm#t=Introduction%2FIntroduction.htm

Most of the SDK deals with creating new assets (scenery, airports, AI objects, behaviour, resource formats, …) so in order to get started with the SimConnect API you may start right here:

https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FProgramming_Tools.htm

(Unless you want to extend existing aircraft controls / displays / instrument you can probably ignore the WASM chapter for now)

SimConnect basically lets you interact in two ways with the simulator:

  • Simulation variables
  • Events

Simulation variables basically represent the state of the aircraft (attitude and position, control element states and their resulting effects (flaps position, gear up/down, ailerons, spoilers, …).

Events let you „set“ those values, but as most simulation variables are actually „settable“ (or „writeable“) as well that functional part is overlapping - and probably the reason why events have been declared „legacy“ by now.

(Note that not all simulation variables are writeable yet, and with events you can do things for which no equivalent set of simulation variables exist yet, e.g. „freezing“ the aircraft‘s position and attitude - time will tell how Asobo sorts this all out).

A common usage pattern looks like this:

  • Connect with the simulator (= „SimConnect server“)
  • Register your data structures (records) that you either want to send or receive (or both)
  • Register your „client events“
  • Send simulation variable requests or events
  • Dispatch the events (responses from previous requests, or spontaneous simulator events such as „Paused“, „Started“ etc.)

There are at least three ways how to get your „dispatcher function“ (= callback function) called:

  • Polling (some loop with a delay, e.g. polling frequency 30 Hz etc.)
  • Event-based dispatching (based on Windows messages → HWND window handle required)
  • Your own message based event queue

Refer to this thread here:

All three dispatching methods have been discussed there by now (but you need to „dig for information“ a little bit ;))

Oh and for your actual questions: you essentially need to consult the documentation about the simulation variables and possibly also the (legacy) events:

https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FSimVars%2FSimulation_Variables.htm

and see whether you find corresponding variables which let you query the desired „ATC state“. In the best case you can interact with ATC with the same set of simulation variables (if they are „writeable“, that is). Alternatively look at the events and see whether they let you set the desired ATC options.

And as far as the networking aspect is concerned: the SimConnect client (your app/add-on) apparently already communicates via sockets (or „pipes“ when run „locally“ on the same machine like the simulator („server“)).

That means you can actually also configure remote IP addresses and ports, for your client:

https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FSimConnect%2FSimConnect_CFG_Definition.htm

and server (Flight Simulator):

https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FSimConnect%2FSimConnect_XML_Definition.htm

But again, this networking functionality has been declared „legacy“. And since the client SimConnect.dll only runs on Windows based operating systems (and possibly Xbox, I don‘t know) this networking solution is limited to Windows clients.

So most people write their own „wrappers“ around the SimConnect API (which is required anyway when using languages other than C/C++ or C#), and some of those wrappers provide network support already. Just browse the web for existing solutions :wink:

1 Like

Many thanks. This was exactly the start that I was hoping for, really helpful.