Pomax / msfs-simconnect-api-wrapper

A JavaScripty wrapper around node-simconnect
Other
14 stars 6 forks source link

Access environmental variables #21

Closed Nordicdesign closed 1 year ago

Nordicdesign commented 1 year ago

Hi,

Is it possible to access the environmental variables like ZULU TIME? https://docs.flightsimulator.com/html/Additional_Information/#EnvironmentVariables

According to this post those variables, despite not being listed in the documentation, are available as simVars via SimConnect. https://devsupport.flightsimulator.com/t/environment-e-variables-missing-from-simulation-variables-docs-for-simconnect-users/6673

But when I try to read it, I receive Cannot get SimVar: "ZULU TIME" unknown. Not sure if the question belongs here or with the node-simconnect repo, happy to post it there though.

Cheers, Alex

Pomax commented 1 year ago

Technically those are WASM vars, not regular vars. Still, there's some experimental code already in place for some of them, adding the rest be a matter of adding everything listed on https://docs.flightsimulator.com/html/Programming_Tools/WASM/Gauge_API/Token_Vars/Token_Variables.htm to https://github.com/Pomax/msfs-simconnect-api-wrapper/blob/main/simvars/wasm-gauge-api-token-variables.js

Pomax commented 1 year ago

marking as duplicate of https://github.com/Pomax/msfs-simconnect-api-wrapper/issues/12

Nordicdesign commented 1 year ago

Raised a new PR for these: https://github.com/Pomax/msfs-simconnect-api-wrapper/pull/22