Hi Juan,
This website explains it https://sayintentionsai.freshdesk.com/support/soluti…light-simulator
Bascially you just have to get the data from the the sim and write it to the input file simapi_input.json. That is all I did. I write to the file about every .75 seconds. I don't mess with the output side because I cannot talk to aerofly. You have to have sayintentions installed on your computer for it to work as it writes to a file in the program that then gets read. I of course have it so I could test your app if you want. For the data needed you already have it from Aerofly. My Python file, which is mostly yours, gets the data and sends it. It is on my github page at https://github.com/sshaper/aerofl…to_websocket.py
Here are the json values for the say intentions input.
{
"sim" : {
"variables" : {
"PLANE BANK DEGREES" : 0,
"COM TRANSMIT:1" : 1,
"INDICATED ALTITUDE" : 5902,
"AIRSPEED TRUE" : 0,
"TITLE" : "C172SP G1000 Cargo Livery: Cargo 02 Adaptive",
"TOTAL WEIGHT" : 1898,
"PLANE TOUCHDOWN LATITUDE" : 0,
"PLANE ALTITUDE" : 5902,
"WHEEL RPM:1" : 0,
"ATC MODEL" : "ATCCOM.AC_MODEL C172.0.text",
"COM TRANSMIT:2" : 0,
"COM RECEIVE:2" : 0,
"PLANE TOUCHDOWN NORMAL VELOCITY" : 0,
"TRANSPONDER IDENT" : 0,
"PLANE ALT ABOVE GROUND MINUS CG" : 0,
"COM RECEIVE:1" : 1,
"COM STANDBY FREQUENCY:1" : 119.99,
"INTERCOM SYSTEM ACTIVE" : 0,
"AIRSPEED INDICATED" : 0,
"SEA LEVEL PRESSURE" : 1013,
"PLANE LONGITUDE" : -120.132249773466,
"ENGINE TYPE" : 0,
"LOCAL TIME" : 60863.319,
"PLANE PITCH DEGREES" : 0,
"COM ACTIVE FREQUENCY:2" : 121.5,
"CIRCUIT COM ON:1" : 1,
"COM STANDBY FREQUENCY:2" : 124.85,
"TRANSPONDER STATE:1" : 4,
"TRANSPONDER CODE:1" : 1200,
"PLANE HEADING DEGREES TRUE" : 5,
"MAGNETIC COMPASS" : 287,
"COM ACTIVE FREQUENCY:1" : 127.95,
"VERTICAL SPEED" : 0,
"ELECTRICAL MASTER BATTERY:0" : 1,
"PLANE TOUCHDOWN LONGITUDE" : 0,
"WHEEL RPM:0" : 0,
"AUDIO PANEL VOLUME" : 75,
"COM VOLUME:1" : 46,
"SIM ON GROUND" : 1,
"ZULU TIME" : 86063.319,
"PLANE LATITUDE" : 39.3156749179636,
"TYPICAL DESCENT RATE" : 1000,
"AMBIENT WIND VELOCITY" : 0,
"AMBIENT WIND DIRECTION" : 270,
"COM VOLUME:2" : 81,
"CIRCUIT COM ON:2" : 1,
"WING SPAN" : 36,
"ZULU DAY OF YEAR" : 84,
"MAGVAR" : 12
},
"exe" : "example_sim_pro_v2.exe",
"simapi_version" : "1.0",
"name" : "ExampleSimPro",
"version" : "2.2.5.6",
"adapter_version" : "0.9"
}
}
Display More