Flight-Tracker-StreamDeck icon indicating copy to clipboard operation
Flight-Tracker-StreamDeck copied to clipboard

Get aircraft data from SimConnect

Open Nezz opened this issue 4 years ago • 2 comments

I wanted to set up some aircraft specific things and couldn't find a way to access the current aircraft's title. I noticed that AircraftDataStruct was already there in the code, but it was unused, so I added the functionality to retrieve it from SimConnect.

Please note that this PR only adds the functionality to IFlightConnector - which I use for my home cockpit. It needs further work to utilize it in Stream Deck, but I wanted to contribute my changes in case someone wants to do something similar.

Nezz avatar Feb 14 '21 21:02 Nezz

Thank you very much for the PR. I'll leave it here until we add features that utilize for aircraft data. I really want to minimize the load we put on SimConnect.

By the way, may I know what you use those information for in your home cockpit? Maybe I can think of something useful for the Stream Deck.

Also, last time I tried, the returned model is the unlocalized name of the aircraft. Did you do some mapping/translation too or you can just use that value directly for your purposes?

nguyenquyhy avatar Feb 15 '21 00:02 nguyenquyhy

By the way, may I know what you use those information for in your home cockpit?

I use it to show aircraft-specific buttons, such as electrical systems, buttons used for jet engine start procedures, and range buttons for G1000/G3000.

Did you do some mapping/translation too or you can just use that value directly for your purposes?

I use the value directly. It doesn't appear to support localization (ui_type and ui_manufacturer do).

Nezz avatar Feb 15 '21 07:02 Nezz