I understand the MSFS franchise is one great big heap of competing priorities, but I’d like to make a plea for more holistic / less chaotic API’s.
For external apps I think we’re agreed SimConnect is the API of choice.
For html/js gauges I’m assuming the BaseInstrument framework with the SimVars real-time sim data connection should be the way to go.
My example today is trying to communicate the Weather parameters loaded by the user in the sim (i.e. Weather preset name, wind layer parameters, cloud layer parameters).
There’s a good ‘js listener’ API in the html/js framework to get those weather parameters, which are a simple mix of strings and numbers. Actually, an ideal strategy would be the SAME information is available to SimConnect applications, or some modern flavor of that, but currently that’s not the case.
But as I develop in both C# SimConnect and html/js gauges then maybe I can collect the data I need in the html/js code, and communicate that through to my SimConnect code, and lo, my SimConnect logger can log the weather parameters.
The reality is this communicating the data from the gauge code to the C# SimConnect code is extremely clunky (there’s no real API, I’d need to define a whole bunch of shared vars for the numbers, and communicating a string isn’t even possible unless I multiplex that into a whole load more vars).
So not only can the SimConnect app not directly get the low speed ‘static’ info that the html/js gauge can get, but the gauge can’t even package that up and send it to C# SimConnect.
Instead I’ve written a hash function in the html/js gauge that compresses all the weather data into a 7-digit decimal hash, and put that hash in a L: var so the SimConnect can pick that up, and use it to independently detect the preset changing and look up a reference list of weather presets.
With hindsight I could have just added another API to my simconnect exe code so the gauge could send the structured data directly to the logger bypassing the MSFS api’s completely, as I’ve been doing for the past 4 months with the PLN data. But it seems seriously wrong to have my amateur API bridge become an increasingly necessary component to get data from one part of the sim to another.
This looks like a rant, but honestly it isn’t, it’s a frustration that existing API’s are getting more fragmented and if it continues this way it’s going to seriously impact MSFS as a franchise which will be a loss for us all.