Skip to content

Instantly share code, notes, and snippets.

@fboes
Created April 12, 2025 06:32
Show Gist options
  • Save fboes/7dcc8d1177d5e7f079afc443f98c74ca to your computer and use it in GitHub Desktop.
Save fboes/7dcc8d1177d5e7f079afc443f98c74ca to your computer and use it in GitHub Desktop.
# @see https://portal.sayintentions.ai/simapi/v1/input_variables.txt
# Set default values for the variables dictionary
variables = {
"AIRSPEED INDICATED": int(0), # INT - Indicated Airspeed in Knots
"AIRSPEED TRUE": int(0), # INT - True (Ground) Airspeed in Knots
"COM ACTIVE FREQUENCY 1": float(0.0), # FLOAT - Current COM1 Active Frequency in MHz
"COM ACTIVE FREQUENCY 2": float(0.0), # FLOAT - Current COM2 Active Frequency in MHz
"COM RECEIVE 1": int(1), # INT - Indicates if COM1 Speaker is on (1 = On, 0 = Off)
"COM RECEIVE 2": int(0), # INT - Indicates if COM2 Speaker is on (1 = On, 0 = Off)
"COM TRANSMIT 1": int(1), # INT - Indicates if COM1 is the active transmitter (1 = Active, 0 = Inactive)
"COM TRANSMIT 2": int(0), # INT - Indicates if COM2 is the active transmitter (1 = Active, 0 = Inactive)
"ENGINE TYPE": int(0), # INT - Engine type (0 = Piston, 1 = Jet, 2 = None, etc.)
"INDICATED ALTITUDE": int(0), # INT - Indicated altitude in feet
"MAGNETIC COMPASS": int(0), # INT - Indicated heading in degrees
"MAGVAR": int(0), # INT - Magnetic variation at the current position
"PLANE ALT ABOVE GROUND MINUS CG": int(0), # INT - Altitude of the plane above the surface beneath it, minus center of gravity
"PLANE ALTITUDE": int(0), # INT - Altitude of the plane above sea level, in feet
"PLANE BANK DEGREES": int(0), # INT - Current turn angle of the airplane in degrees
"PLANE HEADING DEGREES TRUE": int(0), # INT - True heading of the airplane, after accounting for magnetic variation
"PLANE LATITUDE": float(0.0), # FLOAT - Current latitude of the airplane
"PLANE LONGITUDE": float(0.0), # FLOAT - Current longitude of the airplane
"PLANE PITCH DEGREES": int(0), # INT - Current pitch angle of the airplane in degrees
"SEA LEVEL PRESSURE": int(2992), # INT - Current barometric pressure in inHg
"SIM ON GROUND": int(0), # INT - Indicates whether the aircraft is on the ground (1 = Yes, 0 = No)
"TOTAL WEIGHT": int(0), # INT - Total weight of the aircraft in pounds
"TRANSPONDER CODE 1": int(0), # INT - Current 4-digit transponder code
"VERTICAL SPEED": int(0), # INT - Current vertical speed in feet per minute
"WHEEL RPM 1": int(0), # INT - Current speed of the wheel in revolutions per minute
# Non-required variables object with example values
# ------------------------------------------
"AMBIENT WIND DIRECTION": int(0), # INT - Ambient wind direction in degrees true (optional)
"AMBIENT WIND VELOCITY": int(0), # INT - Ambient wind velocity in knots (optional)
# "CIRCUIT COM ON 1": int(1), # INT - Indicates if the circuit breaker for COM1 is active (1 = Active, 0 = Inactive) (optional)
# "CIRCUIT COM ON 2": int(1), # INT - Indicates if the circuit breaker for COM2 is active (1 = Active, 0 = Inactive) (optional)
# "ELECTRICAL MASTER BATTERY 0": int(1), # INT - Indicates if the airplane's electrical master switch is on (1 = On, 0 = Off) (optional)
"LOCAL TIME": float(0.0), # FLOAT - Current time in the simulator, measured in seconds since midnight (optional)
# "PLANE TOUCHDOWN LATITUDE": float(37.7749), # FLOAT - Latitude where the plane last touched down (optional)
# "PLANE TOUCHDOWN LONGITUDE": float(-122.4194), # FLOAT - Longitude where the plane last touched down (optional)
# "PLANE TOUCHDOWN NORMAL VELOCITY": float(-300.0), # FLOAT - Descent rate in feet per minute at the moment of touchdown (optional)
"TRANSPONDER IDENT": int(0), # INT - Indicates if the transponder is in "IDENT" mode (1 = Yes, 0 = No) (optional)
"TRANSPONDER STATE 1": int(0), # INT - Current status of the primary transponder (0 = Off, 1 = Standby, etc.) (optional)
"TYPICAL DESCENT RATE": int(0), # INT - Typical descent rate of the aircraft in feet per minute (optional)
"ZULU TIME": float(0.0), # FLOAT - Current time in the simulator, measured in seconds since midnight (UTC) (optional)
# Extra variables object with example values, mentioned in JSON example but not part of API documentation
# ------------------------------------------
# "ATC MODEL": str("ATCCOM.AC_MODEL C172.0.text"), # STRING - ATC model of the aircraft (extra)
# "AUDIO PANEL VOLUME": int(75), # INT - Volume level of the audio panel (extra)
# "COM STANDBY FREQUENCY 1": float(119.99), # FLOAT - Standby frequency for COM1 in MHz (extra)
# "COM VOLUME 1": int(46), # INT - Volume level for COM1 (extra)
# "COM VOLUME 2": int(81), # INT - Volume level for COM2 (extra)
# "INTERCOM SYSTEM ACTIVE": int(0), # INT - Indicates if the intercom system is active (1 = Active, 0 = Inactive) (extra)
"TITLE": str("Cessna 172"), # STRING - Title of the aircraft (extra)
# "WHEEL RPM 0": int(0), # INT - Current speed of the wheel in revolutions per minute (extra)
#"WING SPAN": int(0), # INT - Wing span of the aircraft in feet (extra)
"ZULU DAY OF YEAR": int(0) # INT - Current day of the year in Zulu time (extra)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment