mirror of
https://github.com/weyne85/DCS-ExportScripts.git
synced 2025-10-29 16:58:18 +00:00
updated to mirror sda format
This commit is contained in:
43
Scripts/DCS-ExportScript/Config.lua
Normal file
43
Scripts/DCS-ExportScript/Config.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
--
|
||||
-- Config File
|
||||
--
|
||||
-- Copyright by Michael aka McMicha 2014
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
|
||||
ExportScript.Config = {}
|
||||
ExportScript.Version.Config = "1.2.1"
|
||||
|
||||
-- Ikarus a Glass Cockpit Software
|
||||
ExportScript.Config.IkarusExport = true -- false for not use
|
||||
ExportScript.Config.IkarusHost = "127.0.0.1" -- IP for Ikarus
|
||||
ExportScript.Config.IkarusPort = 1725 -- Port Ikarus (1625)
|
||||
ExportScript.Config.IkarusSeparator = ":"
|
||||
|
||||
-- D.A.C. (DCS Arcaze Connector)
|
||||
ExportScript.Config.DACExport = false -- true for use
|
||||
ExportScript.Config.DAC = {}
|
||||
-- first hardware
|
||||
ExportScript.Config.DAC[1] = {}
|
||||
ExportScript.Config.DAC[1].Host = "127.0.0.1" -- IP for hardware 1
|
||||
ExportScript.Config.DAC[1].SendPort = 26026 -- Port for hardware 1
|
||||
ExportScript.Config.DAC[1].Separator = ":"
|
||||
-- secound to n hardware
|
||||
--ExportScript.Config.DAC[2] = {}
|
||||
--ExportScript.Config.DAC[2].Host = "127.0.0.1" -- IP for hardware 2
|
||||
--ExportScript.Config.DAC[2].SendPort = 9092 -- Port for hardware 2
|
||||
--ExportScript.Config.DAC[2].Separator = ":"
|
||||
|
||||
-- Ikarus and D.A.C. can data send
|
||||
ExportScript.Config.Listener = true -- false for not use
|
||||
ExportScript.Config.ListenerPort = 26027 -- Listener Port for D.A.C.
|
||||
|
||||
-- Other
|
||||
ExportScript.Config.ExportInterval = 0.05 -- export evry 0.05 secounds
|
||||
ExportScript.Config.ExportLowTickInterval = 0.1 -- export evry 0.5 secounds
|
||||
ExportScript.Config.LogPath = lfs.writedir()..[[Logs\Export.log]]
|
||||
ExportScript.Config.ExportModulePath = lfs.writedir()..[[Scripts\DCS-ExportScript\ExportsModules\]]
|
||||
ExportScript.Config.Debug = false
|
||||
ExportScript.Config.SocketDebug = false
|
||||
ExportScript.Config.FirstNewDataSend = true
|
||||
ExportScript.Config.FirstNewDataSendCount = 100
|
||||
173
Scripts/DCS-ExportScript/ExportScript.lua
Normal file
173
Scripts/DCS-ExportScript/ExportScript.lua
Normal file
@@ -0,0 +1,173 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
--
|
||||
-- Copyright by Michael aka McMicha 2014 - 2018
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
|
||||
|
||||
-- Main Table
|
||||
ExportScript = {}
|
||||
ExportScript.Version = {}
|
||||
ExportScript.Version.ExportScript = "1.2.1"
|
||||
-- Simulation id
|
||||
ExportScript.SimID = string.format("%08x*",os.time())
|
||||
|
||||
-- State data for export
|
||||
ExportScript.PacketSize = 0
|
||||
ExportScript.SendStrings = {}
|
||||
ExportScript.LastData = {}
|
||||
|
||||
ExportScript.PacketSizeDAC = {}
|
||||
ExportScript.SendStringsDAC = {}
|
||||
ExportScript.LastDataDAC = {}
|
||||
|
||||
ExportScript.lastExportTimeHI = 0
|
||||
ExportScript.lastExportTimeLI = 0
|
||||
|
||||
ExportScript.NoLuaExportBeforeNextFrame = false
|
||||
|
||||
local PrevExport = {}
|
||||
PrevExport.LuaExportStart = LuaExportStart
|
||||
PrevExport.LuaExportStop = LuaExportStop
|
||||
PrevExport.LuaExportBeforeNextFrame = LuaExportBeforeNextFrame
|
||||
PrevExport.LuaExportAfterNextFrame = LuaExportAfterNextFrame
|
||||
|
||||
dofile(lfs.writedir()..[[Scripts\DCS-ExportScript\Config.lua]])
|
||||
ExportScript.utf8 = dofile(lfs.writedir()..[[Scripts\DCS-ExportScript\lib\utf8.lua]])
|
||||
dofile(lfs.writedir()..[[Scripts\DCS-ExportScript\lib\Tools.lua]])
|
||||
dofile(lfs.writedir()..[[Scripts\DCS-ExportScript\lib\genericRadio.lua]])
|
||||
dofile(lfs.writedir()..[[Scripts\DCS-ExportScript\lib\Maps.lua]])
|
||||
|
||||
for i = 1, #ExportScript.Config.DAC, 1 do
|
||||
ExportScript.PacketSizeDAC[i] = 0
|
||||
ExportScript.SendStringsDAC[i] = {}
|
||||
ExportScript.LastDataDAC[i] = {}
|
||||
end
|
||||
|
||||
-- Found DCS or FC Module
|
||||
ExportScript.FoundDCSModule = false
|
||||
ExportScript.FoundFCModule = false
|
||||
ExportScript.FoundNoModul = true
|
||||
|
||||
---------------------------------------------
|
||||
-- DCS Export API Function Implementations --
|
||||
---------------------------------------------
|
||||
|
||||
function LuaExportStart()
|
||||
-- Works once just before mission start.
|
||||
-- (and before player selects their aircraft, if there is a choice!)
|
||||
|
||||
-- 2) Setup udp sockets to talk to GlassCockpit
|
||||
package.path = package.path..";.\\LuaSocket\\?.lua"
|
||||
package.cpath = package.cpath..";.\\LuaSocket\\?.dll"
|
||||
|
||||
--local lrename1, lrename2 = os.rename(ExportScript.Config.LogPath, ExportScript.Config.LogPath..".old")
|
||||
ExportScript.logFile = io.open(ExportScript.Config.LogPath, "wa") -- "W+"
|
||||
if ExportScript.logFile then
|
||||
ExportScript.logFile:write('\239\187\191') -- create a UTF-8 BOM
|
||||
ExportScript.logFile:write("ExportScript Version: "..ExportScript.Version.ExportScript.."\r\n")
|
||||
end
|
||||
--if lrenmae1 == nil then
|
||||
-- ExportScript.Tools.WriteToLog("Rename Error: "..lrename2)
|
||||
--end
|
||||
|
||||
ExportScript.Tools.createUDPSender()
|
||||
ExportScript.Tools.createUDPListner()
|
||||
|
||||
ExportScript.AF = {} -- Table for Auxiliary functions
|
||||
|
||||
ExportScript.NoLuaExportBeforeNextFrame = false
|
||||
ExportScript.Tools.SelectModule() -- point globals to Module functions and data.
|
||||
|
||||
-- Chain previously-included export as necessary
|
||||
if PrevExport.LuaExportStart then
|
||||
PrevExport.LuaExportStart()
|
||||
end
|
||||
end
|
||||
|
||||
function LuaExportBeforeNextFrame()
|
||||
--[[ if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.ProcessInput()
|
||||
else
|
||||
ExportScript.coProcessArguments_BeforeNextFrame = coroutine.create(ExportScript.Tools.ProcessInput)
|
||||
coStatus = coroutine.resume(ExportScript.coProcessArguments_BeforeNextFrame)
|
||||
end
|
||||
|
||||
if ExportScript.NoLuaExportBeforeNextFrame == false then
|
||||
ExportScript.Tools.ProcessOutput()
|
||||
end
|
||||
]]
|
||||
-- Chain previously-included export as necessary
|
||||
if PrevExport.LuaExportBeforeNextFrame then
|
||||
PrevExport.LuaExportBeforeNextFrame()
|
||||
end
|
||||
end
|
||||
|
||||
function LuaExportAfterNextFrame()
|
||||
if ExportScript.NoLuaExportBeforeNextFrame then
|
||||
ExportScript.Tools.ProcessOutput()
|
||||
end
|
||||
|
||||
-- Chain previously-included export as necessary
|
||||
if PrevExport.LuaExportAfterNextFrame then
|
||||
PrevExport.LuaExportAfterNextFrame()
|
||||
end
|
||||
end
|
||||
|
||||
function LuaExportActivityNextEvent(t)
|
||||
local tNext = t
|
||||
|
||||
-- Put your event code here and increase tNext for the next event
|
||||
-- so this function will be called automatically at your custom
|
||||
-- model times.
|
||||
-- If tNext == t then the activity will be terminated.
|
||||
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.ProcessInput()
|
||||
else
|
||||
ExportScript.coProcessArguments_BeforeNextFrame = coroutine.create(ExportScript.Tools.ProcessInput)
|
||||
coStatus = coroutine.resume(ExportScript.coProcessArguments_BeforeNextFrame)
|
||||
end
|
||||
|
||||
if ExportScript.NoLuaExportBeforeNextFrame == false then
|
||||
ExportScript.Tools.ProcessOutput()
|
||||
end
|
||||
|
||||
tNext = tNext + ExportScript.Config.ExportInterval
|
||||
|
||||
return tNext
|
||||
end
|
||||
|
||||
function LuaExportStop()
|
||||
-- Works once just after mission stop.
|
||||
if ExportScript.Config.DACExport then
|
||||
ExportScript.Tools.SendDataDAC("DAC", "stop")
|
||||
for i=1, #ExportScript.Config.DAC, 1 do
|
||||
ExportScript.Tools.FlushDataDAC(i)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.SendData("Ikarus", "stop")
|
||||
ExportScript.Tools.FlushData()
|
||||
end
|
||||
|
||||
ExportScript.UDPsender:close()
|
||||
if ExportScript.Config.Listener then
|
||||
ExportScript.UDPListener:close()
|
||||
end
|
||||
|
||||
ExportScript.ModuleName = nil
|
||||
ExportScript.FoundNoModul = false
|
||||
|
||||
if ExportScript.logFile then
|
||||
ExportScript.Tools.WriteToLog("====== Logfile close ======")
|
||||
ExportScript.logFile:flush()
|
||||
ExportScript.logFile:close()
|
||||
ExportScript.logFile = nil
|
||||
end
|
||||
|
||||
-- Chain previously-included export as necessary
|
||||
if PrevExport.LuaExportStop then
|
||||
PrevExport.LuaExportStop()
|
||||
end
|
||||
end
|
||||
1232
Scripts/DCS-ExportScript/ExportsModules/A-10A.lua
Normal file
1232
Scripts/DCS-ExportScript/ExportsModules/A-10A.lua
Normal file
File diff suppressed because it is too large
Load Diff
22000
Scripts/DCS-ExportScript/ExportsModules/A-10C.lua
Normal file
22000
Scripts/DCS-ExportScript/ExportsModules/A-10C.lua
Normal file
File diff suppressed because it is too large
Load Diff
538
Scripts/DCS-ExportScript/ExportsModules/AJS37.lua
Normal file
538
Scripts/DCS-ExportScript/ExportsModules/AJS37.lua
Normal file
@@ -0,0 +1,538 @@
|
||||
-- AJS37
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.AJS37 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- INSTRUMENTS Front panel
|
||||
-- Left Side
|
||||
-- Airspeed indicator
|
||||
[100] = "%.4f", -- IndicatedAirSpeed {0, 0.01, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1} {0, 41.66, 47.78, 55.56, 64.17, 73.61, 83.33, 98.61, 106.9, 122.22, 136.1, 154.16, 194.44, 239, 263.89, 288.89, 319.44, 350, 380.55, 416.66} --m/s
|
||||
-- Mach-meter
|
||||
[103] = "%.4f", -- MachMeterDec2 (1.2 _3_)
|
||||
[102] = "%.4f", -- MachMeterDec1 (1. _2_ 3)
|
||||
[101] = "%.4f", -- Integer (_1_ .23)
|
||||
[2007] = "%.f", -- ASI OFF Flag
|
||||
-- ADI
|
||||
[105] = "%.4f", -- Pitch {1.0, -1.0}
|
||||
[106] = "%.4f", -- Heading {1.0, -1.0}
|
||||
[107] = "%.4f", -- Roll {-1.0, 1.0}
|
||||
[108] = "%.4f", -- VerticalSpeed {-1.0, 1.0} {-5.0, 5.0} --ms
|
||||
[107] = "%.4f", -- Rollindex {1.0, -1.0} inverted
|
||||
[109] = "%.4f", -- VerticalILS {1.0, -1.0} {-1 , 1} --Degrees?
|
||||
[110] = "%.4f", -- HorizontalILS {1.0, -1.0} {-1 , 1} --Degrees?
|
||||
[160] = "%.4f", -- ADI OFF Flag
|
||||
[1810] = "%.4f", -- Slipball {-1.0, 1.0}, not animate
|
||||
[120] = "%.4f", -- AoA
|
||||
-- Main altimeter
|
||||
[114] = "%.4f", -- Altimeter_10000m {0.0, 1.0} {0.0, 10000}
|
||||
[113] = "%.4f", -- Altimeter_1000m {0.0, 1.0} {0.0, 1000}
|
||||
[2008] = "%.f", -- Altimeter OFF
|
||||
-- Altimeter setting 1 hPa
|
||||
[115] = "%.4f", -- AltimeterSetting_000X
|
||||
[116] = "%.4f", -- AltimeterSetting_00X0
|
||||
[117] = "%.4f", -- AltimeterSetting_0X00
|
||||
[118] = "%.4f", -- AltimeterSetting_X000
|
||||
-- Frequency
|
||||
-- FM/AM Radio
|
||||
[177] = "%.4f", -- MHz_X00
|
||||
[178] = "%.4f", -- MHz_0X0
|
||||
[179] = "%.4f", -- MHz_00X
|
||||
[180] = "%.4f", -- KHz_X00
|
||||
[181] = "%.4f", -- KHz_0X0
|
||||
[182] = "%.4f", -- KHz_00X
|
||||
-- Centre
|
||||
-- CI Instruments
|
||||
[128] = "%.4f", -- CIHeading {1.0, -1.0}
|
||||
[129] = "%.4f", -- CICommandedHeading {1.0, 0.0}
|
||||
[163] = "%.4f", -- CI OFF Flag 0.0=OFF, 1.0=fade in
|
||||
[3000] = "%.2f", -- Radar Scan Zone, 0.0=off, >= 0.1=15, >= 0.2=30, >= 0.3=60, >=0.4=120
|
||||
-- Right Side
|
||||
-- ENGINE
|
||||
[139] = "%.4f", -- Engine_RPM_100 {-1.0, 1.0} {0.0, 1.1}
|
||||
[140] = "%.4f", -- Engine_RPM_10
|
||||
-- Accelerometer
|
||||
[136] = "%.4f", -- VerticalAcceleration {-0.3, 1.0} { -2.0, 9.0}
|
||||
-- Backup instruments
|
||||
[127] = "%.4f", -- MagneticHeading {1.0, -1.0}
|
||||
[138] = "%.4f", -- IndicatedAirSpeedBackup {0.0, 0.01, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.0} {0.0, 56.39, 60.56, 65.83, 70.83, 75.83, 81.11, 86.11, 100.0, 113.9, 130.55, 150.0, 170.8, 193.0, 222.22} --m/s
|
||||
[121] = "%.4f", -- BackupPitch {1.0, -1.0}
|
||||
[122] = "%.4f", -- BackupRoll {1.0, -1.0}
|
||||
[125] = "%.4f", -- BackupAltimeter_10000m {0.0, 1.0} {0.0, 10000}
|
||||
[124] = "%.4f", -- BackupAltimeter_1000m {0.0, 1.0} {0.0, 1000}
|
||||
-- BackupAltimeter setting 1 hPa
|
||||
[468] = "%.4f", -- BackupAltimeterSetting_000X
|
||||
[467] = "%.4f", -- BackupAltimeterSetting_00X0
|
||||
[466] = "%.4f", -- BackupAltimeterSetting_0X00
|
||||
[465] = "%.4f", -- BackupAltimeterSetting_X000
|
||||
-- Distance indicator
|
||||
[142] = "%.4f", -- Distance {0.0, 0.4} {0.0, 40.0}
|
||||
[143] = "%.1f", -- km/mil Display 0.0=km >0.8=mil
|
||||
-- Fuel Gauge
|
||||
[144] = "%.4f", -- FuelGauge {0.0, 1.0} {0.0, 135.0}
|
||||
[145] = "%.4f", -- FuelNeeded {0.0, 1.0} {0.0, 135.0}
|
||||
-- Clock
|
||||
[130] = "%.4f", -- Hour
|
||||
[131] = "%.4f", -- Minute
|
||||
[133] = "%.4f", -- Second (Arrow)
|
||||
[1333] = "%.4f", -- Second
|
||||
--
|
||||
[141] = "%.4f", -- Engine pressure ratio EPR indicator
|
||||
-- INSTRUMENTS Right Panel
|
||||
[147] = "%.4f", -- Engine nozzle indicator
|
||||
[146] = "%.4f", -- Exhaust Gas Temperature indicator Engine_TEMP {0.0, 1.00} {100, 800}
|
||||
[148] = "%.4f", -- Oxygen pressure indicator
|
||||
-- INSTRUMENTS Left Panel
|
||||
[2005] = "%.4f", -- Cabin pressure indicator
|
||||
[150] = "%.4f", -- Brake pressure indicator
|
||||
[151] = "%.4f", -- Pitch trim indicator
|
||||
-- Lamps/Lights
|
||||
-- Left Warning Lampen Panel
|
||||
-- Left Side
|
||||
[406] = "%.f", -- BRAND
|
||||
[407] = "%.f", -- BRAND
|
||||
[408] = "%.f", -- BRÄ UPPF
|
||||
[409] = "%.f", -- XTANK BRÄ
|
||||
[410] = "%.f", -- TANK PUMP
|
||||
[411] = "%.f", -- LANDSTÄLL
|
||||
[412] = "%.f", -- FÖRV FÖRBJ
|
||||
[413] = "%.f", -- NOSSTÄLL
|
||||
[414] = "%.f", -- V-STÄLL
|
||||
[415] = "%.f", -- H-STÄLL
|
||||
-- Right Side
|
||||
[416] = "%.f", -- TIPP VÄXEL
|
||||
[417] = "%.f", -- ELFEL
|
||||
[418] = "%.f", -- RESERVEFF
|
||||
[419] = "%.f", -- HYDR-TR2
|
||||
[420] = "%.f", -- HYDR-TR1
|
||||
[421] = "%.f", -- AFK FEL
|
||||
[422] = "%.f", -- EJ REV
|
||||
[423] = "%.f", -- OLJETRYCK
|
||||
-- Right Warning Lampen Panel
|
||||
-- Left Side
|
||||
[424] = "%.f", -- SPAK
|
||||
[425] = "%.f", -- HALL FUNK
|
||||
[426] = "%.f", -- RHM FEL
|
||||
[427] = "%.f", -- ROLLVÄXEL
|
||||
[428] = "%.f", -- CK
|
||||
[429] = "%.f", -- KABINHÖJD
|
||||
[430] = "%.f", -- HUV o STOLL
|
||||
[431] = "%.f", -- TÄNDSYST
|
||||
[432] = "%.f", -- STARTSYST
|
||||
[433] = "%.f", -- MAN BR REG
|
||||
-- Right Side
|
||||
[434] = "%.f", -- SYRGAS
|
||||
[435] = "%.f", -- BRÄ < 24
|
||||
[436] = "%.f", -- BRAND GTS
|
||||
[437] = "%.f", -- TILS
|
||||
[438] = "%.f", -- NAV-SYST
|
||||
[439] = "%.f", -- KB-V SLUT
|
||||
[440] = "%.f", -- KB-H/KA SL
|
||||
[441] = "%.f", -- FACKL SL
|
||||
[442] = "%.f", -- MOTVERK
|
||||
[443] = "%.f", -- LUFTBROMS
|
||||
-- Masterwarning lamp HUVUDVARNING
|
||||
[444] = "%.f", -- HUVUDVARNING - left lamp
|
||||
[445] = "%.f", -- HUVUDVARNING - right lamp
|
||||
-- Central Indicator
|
||||
[450] = "%.f", -- Altitude warning light
|
||||
-- RWR lights
|
||||
[451] = "%.f", -- 1 o'clock light
|
||||
[452] = "%.f", -- 3 o'clock light
|
||||
[453] = "%.f", -- 5 o'clock light
|
||||
[454] = "%.f", -- 7 o'clock light
|
||||
[455] = "%.f", -- 9 o'clock light
|
||||
[456] = "%.f", -- 11 o'clock light
|
||||
-- right main panel
|
||||
[461] = "%.f", -- Stores released indicator light (FÄLLD LAST)
|
||||
[462] = "%.f", -- Reserve and transonic indicator (REVAVDR TRANSONIC) red "REV" light
|
||||
-- 1,2,3 Lamps
|
||||
[405] = "%.1f", -- Afterburner zone indicator 0.0=off, >= 0.3=1, >= 0.6=2, >= 0.9=3
|
||||
-- left main panel
|
||||
[463] = "%.f", -- Auto throttle mode indicator light
|
||||
[464] = "%.f", -- Alpha 15.5° button (for AFK)
|
||||
[460] = "%.f", -- Reserve and transonic indicator (REVAVDR TRANSONIC) green "REV" light
|
||||
-- SA06 functionality lamps (Autopilot)
|
||||
[401] = "%.f", -- SPAK Lamp
|
||||
[402] = "%.f", -- ATT Lamp
|
||||
[403] = "%.f" -- HOJD Lamp
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Stick
|
||||
--[8] = "%1d", -- Mastersafe
|
||||
--[3] = "%.4f" -- Stick horizontal
|
||||
--[2] = "%.4f" -- Stick vertical
|
||||
--
|
||||
[12] = "%1d", -- Gear Handle
|
||||
[20] = "%1d", -- Reverser Handle
|
||||
[401] = "%1d", -- SPAK
|
||||
[402] = "%1d", -- Attitude Hold ATT
|
||||
[403] = "%1d", -- Altitude Hold HOJD
|
||||
[464] = "%1d", -- AFK 15 Deg Mode
|
||||
[213] = "%1d", -- Doppler Land/Sea Mode
|
||||
--[0] = "%.3f", -- Altimeter Setting (Axis) {0.0,1.0} in 0.001 steps
|
||||
-- Datapanel
|
||||
[200] = "%1d", -- Datapanel Selector
|
||||
[201] = "%1d", -- Datapanel IN/OUT Switch
|
||||
[290] = "%1d", -- Datapanel Key 0
|
||||
[291] = "%1d", -- Datapanel Key 1
|
||||
[292] = "%1d", -- Datapanel Key 2
|
||||
[293] = "%1d", -- Datapanel Key 3
|
||||
[294] = "%1d", -- Datapanel Key 4
|
||||
[295] = "%1d", -- Datapanel Key 5
|
||||
[296] = "%1d", -- Datapanel Key 6
|
||||
[297] = "%1d", -- Datapanel Key 7
|
||||
[298] = "%1d", -- Datapanel Key 8
|
||||
[299] = "%1d", -- Datapanel Key 9
|
||||
-- NAvigations Panel
|
||||
[271] = "%1d", -- Navigation Selector Button B1
|
||||
[272] = "%1d", -- Navigation Selector Button B2
|
||||
[273] = "%1d", -- Navigation Selector Button B3
|
||||
[274] = "%1d", -- Navigation Selector Button B4
|
||||
[275] = "%1d", -- Navigation Selector Button B5
|
||||
[276] = "%1d", -- Navigation Selector Button B6
|
||||
[277] = "%1d", -- Navigation Selector Button B7
|
||||
[278] = "%1d", -- Navigation Selector Button B8
|
||||
[279] = "%1d", -- Navigation Selector Button B9
|
||||
[280] = "%1d", -- Navigation Selector Button BX
|
||||
[270] = "%1d", -- Navigation Selector Button LS
|
||||
[281] = "%1d", -- Navigation Selector Button L MÅL
|
||||
[282] = "%.1f", -- TILS Channel Selection {0.0,0.1,0.2,...,0.9,1.0}
|
||||
[283] = "%1d", -- RHM switch, Radar Altimeter Power
|
||||
[285] = "%1d", -- TILS Channel Layer Selection 11-20/1-10
|
||||
---
|
||||
[344] = "%1d", -- Warning Panel Light Test
|
||||
[315] = "%1d", -- Indicator System Test
|
||||
[175] = "%1d", -- Max G Reset
|
||||
---
|
||||
[250] = "%1d", -- Anti Collision Lights
|
||||
[251] = "%1d", -- Navigation Lights {-1.0,0.0,1.0}
|
||||
[252] = "%1d", -- Formation Lights
|
||||
[253] = "%1d", -- Position Lights
|
||||
[254] = "%.1f", -- Position Lights Brightness {0.0,0.1,0.2}
|
||||
---
|
||||
[392] = "%.2f", -- Panel Lights (Axis) {0.0,1.0} in 0.05 steps
|
||||
[393] = "%.2f", -- Flood Lights (Axis) {0.0,1.0} in 0.05 steps
|
||||
[394] = "%.2f", -- Instrument Lights (Axis) {0.0,1.0} in 0.05 steps
|
||||
-- Engine panel
|
||||
[206] = "%1d", -- Start System
|
||||
[204] = "%1d", -- Low-pressure Fuel Valve
|
||||
[202] = "%1d", -- High-pressure Fuel Valve
|
||||
[205] = "%1d", -- Ignition System
|
||||
[310] = "%1d", -- Engine De-Ice
|
||||
[312] = "%1d", -- Backup Generator
|
||||
[21] = "%1d", -- Ejection Seat Arm
|
||||
[208] = "%1d", -- Restart
|
||||
[203] = "%1d", -- Main Electric Power
|
||||
[207] = "%1d", -- Generator
|
||||
[209] = "%0.1f",-- Master Mode Selector Bailey
|
||||
[446] = "%1d", -- Master Caution Reset
|
||||
[323] = "%1d", -- Slav SI
|
||||
[324] = "%1d", -- HÖJD CISI
|
||||
--[0] = "%1d", -- Snabbresning
|
||||
--[123] = "%1d", -- Backup ADI Cage
|
||||
--[126] = "%.3f", -- Backup Altimeter Setting (Axis) {0.0,1.0} in 0.001 steps
|
||||
[311] = "%1d", -- Pitch Gear Automatic/Landing
|
||||
-- Countermeasure panel
|
||||
[317] = "%.1f", -- Jammer Operation Mode Selector {0.0,0.1,0.2,0.3,0.4}
|
||||
[318] = "%.1f", -- Jammer Band Selector {0.0,0.1,0.2,0.3,0.4}
|
||||
[319] = "%.1f", -- Countermeasure Operation Mode Selector {0.0,0.1,0.2,0.3,0.4}
|
||||
[320] = "%.1f", -- Countermeasure Streak Mode Selector {0.0,0.1}
|
||||
[321] = "%.1f", -- Radarwarning Indication Selector {0.0,0.1,0.2}
|
||||
[322] = "%.1f", -- Countermeasure Chaff/Flares Selector {0.0,0.1,0.2}
|
||||
-- Oxygen
|
||||
[176] = "%1d", -- Oxygen Lever
|
||||
-- Canopy
|
||||
[9] = "%1d", -- Canopy Open/Close {-1.0,0.0,1.0}
|
||||
[210] = "%1d", -- Canopy Jettison
|
||||
---
|
||||
[184] = "%1d", -- Countermeasure Release {-1.0,0.0,1.0}
|
||||
[316] = "%1d", -- Manual Fuel Regulator
|
||||
[212] = "%1d", -- Roll Centering
|
||||
[390] = "%1d", -- Emergency Roll Trim {-1.0,0.0,1.0}
|
||||
[389] = "%1d", -- Emergency Pitch Trim {-1.0,0.0,1.0}
|
||||
[388] = "%1d", -- Emergency Yaw Trim {-1.0,0.0,1.0}
|
||||
[313] = "%1d", -- Manual Afterburner Fuel Regulator
|
||||
[11] = "%1d", -- HUD Reflector Glass Position
|
||||
[180] = "%.2f", -- HUD Brightness Knob (Axis) {0.0,1.0} in 0.02 steps
|
||||
[13] = "%1d", -- AFK Lever
|
||||
[464] = "%1d", -- AFK Mode 3
|
||||
[22] = "%1d", -- Parking Brake
|
||||
-- Radio
|
||||
[171] = "%.1f", -- Radio Manual Frequency Setting Knob Inner Left (Axis) {0.0,1.0} in 0.1 steps
|
||||
[172] = "%.1f", -- Radio Manual Frequency Setting Knob Outer Left (Axis) {0.0,1.0} in 0.1 steps
|
||||
[173] = "%.1f", -- Radio Manual Frequency Setting Knob Inner Right (Axis) {0.0,1.0} in 0.1 steps
|
||||
[174] = "%.1f", -- Radio Manual Frequency Setting Knob Outer Right (Axis) {0.0,1.0} in 0.1 steps
|
||||
[170] = "%1d", -- Radio Manual Frequency Setting Modulation
|
||||
---
|
||||
[372] = "%1d", -- Flight 0
|
||||
[373] = "%1d", -- Flight 1
|
||||
[374] = "%1d", -- Flight 2
|
||||
[375] = "%1d", -- Flight 3
|
||||
[376] = "%1d", -- Flight 4
|
||||
[377] = "%1d", -- Flight 5
|
||||
[378] = "%1d", -- Flight 6
|
||||
[379] = "%1d", -- Flight 7
|
||||
[380] = "%1d", -- Flight 8
|
||||
[381] = "%1d", -- Flight 9
|
||||
[362] = "%1d", -- Channel H
|
||||
[363] = "%1d", -- Special 1
|
||||
[364] = "%1d", -- Special 2
|
||||
[365] = "%1d", -- Special 3
|
||||
[366] = "%1d", -- Minus
|
||||
[367] = "%1d", -- Channel A/G
|
||||
[368] = "%1d", -- Channel B
|
||||
[369] = "%1d", -- Channel C/F
|
||||
[370] = "%1d", -- Channel C2
|
||||
[371] = "%1d", -- Channel D/E
|
||||
---
|
||||
[386] = "%1d", -- FR22 Mode Selector {-1.0,0.0,1.0}
|
||||
[361] = "%1d", -- Base Selector {-1.0,0.0,1.0}
|
||||
[360] = "%1d", -- Group Selector {-1.0,0.0,1.0}
|
||||
---
|
||||
[382] = "%1d", -- Ground Intercom
|
||||
-- Weapons system
|
||||
-- trigger safety bracket
|
||||
[8] = "%1d", -- Trigger Safety Bracket
|
||||
[260] = "%1d", -- Weapon Emergency Release Cover
|
||||
[261] = "%1d", -- Weapon Emergency Release Button
|
||||
[262] = "%1d", -- External Tank Release Cover
|
||||
[263] = "%1d", -- External Tank Release Button
|
||||
[264] = "%.1f", -- Weapon Selector Knob - J/A Valjare {0.0,0.1,0.2,0.3,0.4,0.5}
|
||||
[265] = "%.1f", -- Weapon Interval Selector Mode Knob - Siktningvaljare {0.0,0.1,0.2,...,0.9,1.0}
|
||||
[266] = "%1d", -- Weapon Release Mode Switch - Fallsattomkopplare
|
||||
[267] = "%1d", -- RB-04/RB-15/BK Release Mode Switch - MALVAL/PREP
|
||||
-- IFF panel
|
||||
[308] = "%1d", -- IFF Power
|
||||
[309] = "%.1f", -- IFF Code {0.0,0.1,0.2,...,0.9,1.0}
|
||||
-- CB Circuit breakers
|
||||
[302] = "%1d", -- CB Autopilot SA
|
||||
[303] = "%1d", -- CB High Alpha Warning
|
||||
[304] = "%1d", -- CB Trim System
|
||||
[305] = "%1d", -- CB CI/SI
|
||||
[306] = "%1d", -- CB Ejection System
|
||||
[307] = "%1d", -- CB CB Engine
|
||||
-- Radar
|
||||
[217] = "%.1f", -- Anti Jamming Mode (AS) Selector {0.0,0.1,0.2,...,0.6,0.7}
|
||||
[214] = "%1d", -- Lin/Log Radar Gain Switch
|
||||
[218] = "%1d", -- Pulse Normal/Short Switch
|
||||
[216] = "%1d", -- Passive Recce On/Off Switch
|
||||
[391] = "%.3f", -- Radar Brightness (Axis) {0.0,1.0} in 0.001 steps
|
||||
-- Cabin air
|
||||
-- Var
|
||||
[286] = "%.3f", -- Windscreen De-Ice (Axis) {0.0,1.0} in 0.001 steps
|
||||
[675] = "%.3f", -- Maintenance Testing Mode (Axis) {0.0,1.0} in 0.001 steps
|
||||
[1006] = "%1d", -- Radar/EL Maintenance Test
|
||||
[1200] = "%1d", -- Magnetic Declination Cover
|
||||
[396] = "%.3f", -- Drysuit Ventilation Adjustment (Axis) {0.0,1.0} in 0.001 steps
|
||||
[395] = "%1d", -- Ignition Coils
|
||||
[1206] = "%1d", -- DME Selector
|
||||
[1203] = "%1d", -- IFF/Transponder Power
|
||||
[1204] = "%1d", -- IFF Channel Selector
|
||||
[1205] = "%1d", -- IFF Identification
|
||||
[384] = "%1d", -- Flight Recorder {-1.0,0.0,1.0}
|
||||
[385] = "%.5f", -- Radio Volume (Axis) {0.0,1.0} in 0.00001 steps
|
||||
--??[4200] = "%1d", -- Insert/Remove Data Cartridge
|
||||
[300] = "%1d", -- Rensa Button Cover
|
||||
[301] = "%1d", -- CK37 Rensa (Clear)
|
||||
--
|
||||
[398] = "%1d", -- Cabin Air Valve
|
||||
[493] = "%1d", -- Autopilot Yaw Trim Cover
|
||||
[211] = "%.2f", -- Autopilot yaw correction RENFLYGN (Axis) {0.0,1.0} in 0.01 steps
|
||||
[400] = "%1d", -- Missile Select Button
|
||||
[399] = "%.3f", -- Master Volume / Sidewinder Tone (Axis) {0.0,1.0} in 0.001 steps
|
||||
[1201] = "%.1f", -- Magnetic Declination Correction (Axis) {0.0,1.0} in 0.1 steps
|
||||
-- Clock
|
||||
[135] = "%.3f", -- Clock Setting
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
local lFR22Radio = GetDevice(31)
|
||||
--ExportScript.Tools.SendData(2500, string.format("%7.3f", lFR22Radio:get_frequency()/1000000)) -- full frequency
|
||||
ExportScript.Tools.SendData(2500, ExportScript.Tools.RoundFreqeuncy(lFR22Radio:get_frequency()/1000000)) -- full frequency
|
||||
local lMHz = string.format("%0.0f", lFR22Radio:get_frequency()/1000000)
|
||||
local lKHz = string.sub(string.format("%0.3f", string.format("%.3f", lFR22Radio:get_frequency()/1000000) - lMHz), 3)
|
||||
ExportScript.Tools.SendData(2501, lMHz) -- slice frequency MHz
|
||||
ExportScript.Tools.SendData(2502, lKHz) -- slice frequency KHz
|
||||
|
||||
local TotalMhz = string.format(lMHz .. ".".. lKHz)
|
||||
ExportScript.Tools.SendData(2503, TotalMhz) -- Total Frequency Bailey
|
||||
|
||||
-- 1,2,3 Lamps
|
||||
--[405] = "%.1f", -- Afterburner zone indicator 0.0=off, >= 0.3=1, >= 0.6=2, >= 0.9=3
|
||||
local lAfterburnerZoneIndicator = mainPanelDevice:get_argument_value(405)
|
||||
|
||||
if lAfterburnerZoneIndicator >= 0.9 then
|
||||
ExportScript.Tools.SendData(2510, 1) -- Afterburner 1
|
||||
ExportScript.Tools.SendData(2511, 1) -- Afterburner 2
|
||||
ExportScript.Tools.SendData(2512, 1) -- Afterburner 3
|
||||
elseif lAfterburnerZoneIndicator >= 0.6 then
|
||||
ExportScript.Tools.SendData(2510, 1)
|
||||
ExportScript.Tools.SendData(2511, 1)--ExportScript.Tools.SendDataDAC(2511, 2)
|
||||
ExportScript.Tools.SendData(2512, 0)
|
||||
elseif lAfterburnerZoneIndicator >= 0.3 then
|
||||
ExportScript.Tools.SendData(2510, 1)
|
||||
ExportScript.Tools.SendData(2511, 0)
|
||||
ExportScript.Tools.SendData(2512, 0)
|
||||
else
|
||||
ExportScript.Tools.SendData(2510, 0)
|
||||
ExportScript.Tools.SendData(2511, 0)
|
||||
ExportScript.Tools.SendData(2512, 0)
|
||||
end
|
||||
|
||||
-- Cockpit Light
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {392, 393, 394})
|
||||
-- Panel Lights, Flood Lights, Instrument Lights
|
||||
|
||||
--AoA in Units Bailey
|
||||
local AoaUnitValue = 30 * mainPanelDevice:get_argument_value(120)
|
||||
AoaUnitValue = string.format("%0.1f", AoaUnitValue)
|
||||
AoaUnitValue= string.format("AoA" .. "\n" .. AoaUnitValue)
|
||||
ExportScript.Tools.SendData(2520, AoaUnitValue) -- AoA in Units
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
local lFR22Radio = GetDevice(31)
|
||||
--ExportScript.Tools.SendData(2500, string.format("%7.3f", lFR22Radio:get_frequency()/1000000)) -- full frequency
|
||||
ExportScript.Tools.SendData(2500, ExportScript.Tools.RoundFreqeuncy(lFR22Radio:get_frequency()/1000000)) -- full frequency
|
||||
local lMHz = string.format("%0.0f", lFR22Radio:get_frequency()/1000000)
|
||||
local lKHz = string.sub(string.format("%0.3f", string.format("%.3f", lFR22Radio:get_frequency()/1000000) - lMHz), 3)
|
||||
ExportScript.Tools.SendData(2501, lMHz) -- slice frequency MHz
|
||||
ExportScript.Tools.SendData(2502, lKHz) -- slice frequency KHz
|
||||
|
||||
local TotalMhz = string.format(lMHz .. ".".. lKHz)
|
||||
ExportScript.Tools.SendData(2503, TotalMhz) -- Total Frequency Bailey
|
||||
|
||||
-- 1,2,3 Lamps
|
||||
--[405] = "%.1f", -- Afterburner zone indicator 0.0=off, >= 0.3=1, >= 0.6=2, >= 0.9=3
|
||||
local lAfterburnerZoneIndicator = mainPanelDevice:get_argument_value(405)
|
||||
|
||||
if lAfterburnerZoneIndicator >= 0.9 then
|
||||
ExportScript.Tools.SendDataDAC(2510, 1) -- Afterburner 1
|
||||
ExportScript.Tools.SendDataDAC(2511, 1) -- Afterburner 2
|
||||
ExportScript.Tools.SendDataDAC(2512, 1) -- Afterburner 3
|
||||
elseif lAfterburnerZoneIndicator >= 0.6 then
|
||||
ExportScript.Tools.SendDataDAC(2510, 1)
|
||||
ExportScript.Tools.SendDataDAC(2511, 1)--ExportScript.Tools.SendDataDAC(2511, 2)
|
||||
ExportScript.Tools.SendDataDAC(2512, 0)
|
||||
elseif lAfterburnerZoneIndicator >= 0.3 then
|
||||
ExportScript.Tools.SendDataDAC(2510, 1)
|
||||
ExportScript.Tools.SendDataDAC(2511, 0)
|
||||
ExportScript.Tools.SendDataDAC(2512, 0)
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC(2510, 0)
|
||||
ExportScript.Tools.SendDataDAC(2511, 0)
|
||||
ExportScript.Tools.SendDataDAC(2512, 0)
|
||||
end
|
||||
|
||||
--AoA in Units Bailey
|
||||
local AoaUnitValue = 30 * mainPanelDevice:get_argument_value(120)
|
||||
AoaUnitValue = string.format("%0.1f", AoaUnitValue)
|
||||
AoaUnitValue= string.format("AoA" .. "\n" .. AoaUnitValue)
|
||||
ExportScript.Tools.SendData(2520, AoaUnitValue) -- AoA in Units
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
1435
Scripts/DCS-ExportScript/ExportsModules/AV8BNA.lua
Normal file
1435
Scripts/DCS-ExportScript/ExportsModules/AV8BNA.lua
Normal file
File diff suppressed because it is too large
Load Diff
334
Scripts/DCS-ExportScript/ExportsModules/Bf-109K-4.lua
Normal file
334
Scripts/DCS-ExportScript/ExportsModules/Bf-109K-4.lua
Normal file
@@ -0,0 +1,334 @@
|
||||
-- Bf-109K-4 Kurfürst
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.Bf109K4 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
[1] = "%.4f", -- MW50 pressure {0.0, 3.0}kg/cm2 = {0.0, 1.0}
|
||||
[2] = "%.4f", -- Airspeed Gauge {0, 100, 150, 200, 700, 750, 900, 1000} = {0.0, 0.1, 0.15, 0.2, 0.7, 0.75, 0.9, 1.0}
|
||||
-- Artificial horizon Fl_22415
|
||||
[3] = "%.4f", -- turn indicator {-1.0, 1.0}
|
||||
[4] = "%.4f", -- Bank {1.0, -1.0}
|
||||
[5] = "%.4f", -- Pitch {1.0, -1.0}
|
||||
[6] = "%.4f", -- Slipball {-1.0, 1.0}
|
||||
[7] = "%.4f", -- Caged {0.0, 1.0}
|
||||
--Altitude Gauge
|
||||
[8] = "%.4f", -- Altimeter_FinePtr {0.0, 1000.0} = {0.0, 1.0}
|
||||
[9] = "%.4f", -- Altimeter_CoarsePtr {0.0, 13000.0} = {0.0, 1.0}
|
||||
[10] = "%.4f", -- Altimeter_Pressure {712.56, 780.07} = {0.0, 1.0}
|
||||
[11] = "%.4f", -- Pressure_Setter_Pinion {0.0, 1440.0} = {0.0, 1.0}
|
||||
-- AN5730 remote compass
|
||||
[13] = "%.4f", -- CompassHeading {0.0, 1.0}
|
||||
[12] = "%.4f", -- CommandedCourse {0.0, 1.0}
|
||||
-- AFN2 blind landing system
|
||||
[14] = "%.4f", -- AFN2_Horizontal_Needle {-1.0, 1.0}
|
||||
[15] = "%.4f", -- AFN2_Vertical_Needle {0.0, 1.0}
|
||||
[16] = "%.f", -- AFN2_Signal_Lamp {0.0, 1.0}
|
||||
--Dual-Range Pressure Gauge
|
||||
[25] = "%.4f", -- Fuel_Pressure {0.0, 2.0} -- kg/cm2 = {0.0, 1.0}
|
||||
[26] = "%.4f", -- Oil_Pressure {0.0, 10.0} = {0, 1.0}
|
||||
[27] = "%.4f", -- Coolant_Temperature {-1, 0, 130} = {-1, 0, 1}
|
||||
[28] = "%.4f", -- Oil_Temperature {-1, 0, 130} = {-1, 0, 1}
|
||||
[29] = "%.4f", -- Engine_RPM {400.0, 3600.0} = {0.0, 1.0}
|
||||
-- propeller pitch indicator, changed 1hour every 6degrees of pitch change
|
||||
[30] = "%.4f", -- Propeller_Pitch_Hour {0.0, 12.0} = {0.0, 1.0}
|
||||
[31] = "%.4f", -- Propeller_Pitch_Minute {0.0, 60.0} = {0.0, 1.0}
|
||||
-- Manifold_Pressure
|
||||
[32] = "%.4f", -- Manifold_Pressure {0.6, 1.8} = {0.0, 1.0}
|
||||
--fuel system
|
||||
[33] = "%.4f", -- Fuel_Tank_Fuselage {-1.0, 0.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0} -- Liters = {-1.0, 0.0, 0.07, 0.175, 0.31, 0.52, 0.73, 0.88, 1.0}
|
||||
--oxygen pressure indicator
|
||||
[34] = "%.4f", -- Oxygen_Pressure {0.0, 250.0} = {0.0, 1.0}
|
||||
--[35] = "%.1f", -- Oxygen_Flow_Blinker {0.0, 1.0}
|
||||
-- Variometer
|
||||
[36] = "%.4f", -- Variometer {-30, -10, -5, 0, 5, 10, 30} = {-0.3, -0.1, -0.05, 0.0, 0.05, 0.1, 0.3}
|
||||
--Weapon gauges
|
||||
[40] = "%.4f", -- MG131_0_Shell_Counter {0.0, 500.0} = {0.0, 1.0}
|
||||
[41] = "%.4f", -- MG131_1_Shell_Counter {0.0, 500.0} = {0.0, 1.0}
|
||||
--[42] = "%.4f", -- MG131_0_Klappanker {0.0, 60.0} = {0.0, 1.0}
|
||||
--[43] = "%.4f", -- MG131_1_Klappanker {0.0, 60.0} = {0.0, 1.0}
|
||||
[44] = "%.f", -- LeftWing_MG151_Control_Lamp {0.0, 1.0}
|
||||
[45] = "%.f", -- RightWing_MG151_Control_Lamp {0.0, 1.0}
|
||||
--REVI_16B_Gunsight
|
||||
[46] = "%.4f", -- BodyState {0.0, 0.15,0.25, 1.0} = {0.0, 0.15,0.25, 1.0}
|
||||
[47] = "%.4f", -- SmokedScreen {0.0, 1.0}
|
||||
[48] = "%.4f", -- SightBrightness {0.0, 1.0}
|
||||
-- Landing Gear Light
|
||||
[56] = "%.f", -- LandingGearRedLight {0.0, 1.0}
|
||||
[57] = "%.f", -- LandingGearGreenLightLeft {0.0, 1.0}
|
||||
[58] = "%.f", -- LandingGearGreenLightRight {0.0, 1.0}
|
||||
-- Fuel_Reserve_Lamp
|
||||
[135] = "%.f" -- Fuel_Reserve_Lamp {0.0, 29.0} = {0.0, 1.0}
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
-- FuseBox Controls - Electrical Switches
|
||||
-- RH Fuse Box Circuit Breakers
|
||||
-- Left Row
|
||||
-- A 100 - Generator Cut-Off Relay
|
||||
[114] = "%1d", -- Generator On {0, 1}
|
||||
[151] = "%1d", -- Generator OFF {0, 1}
|
||||
-- D 100 - Heating CB
|
||||
[115] = "%1d", -- Pitot/Windscreen Heating On {0, 1}
|
||||
[152] = "%1d", -- Pitot/Windscreen Heating OFF {0, 1}
|
||||
-- C 100 - Navigation Lights CB
|
||||
[116] = "%1d", -- Nav. Lights On {0, 1}
|
||||
[153] = "%1d", -- Nav. Lights OFF {0, 1}
|
||||
-- C 101 - Instrument Panel Illumination CB {0, 1}
|
||||
[117] = "%1d", -- UV Lights On {0, 1}
|
||||
[154] = "%1d", -- UV Lights Off {0, 1}
|
||||
-- V 101 - Drop Ordnance & Optional Armament CB
|
||||
[118] = "%1d", -- Wing / Drop Ordnance On {0, 1}
|
||||
[155] = "%1d", -- Wing / Drop Ordnance Off {0, 1}
|
||||
-- V 100 - Systematic & Ignition CB
|
||||
[119] = "%1d", -- Ignition On {0, 1}
|
||||
[156] = "%1d", -- Ignition Off {0, 1}
|
||||
-- Spotlights CB - TODO implement when landing lights rustsatz is available
|
||||
--[] = "%1d", -- Spotlights On {0, 1}
|
||||
--[] = "%1d", -- Spotlights Off {0, 1}
|
||||
-- Right Row
|
||||
-- A 101 - Battery Cut-Off Relay
|
||||
[120] = "%1d", -- Battery On {0, 1}
|
||||
[157] = "%1d", -- Battery Off {0, 1}
|
||||
-- F 135 - Radio CB - Labelled "FuG 16"
|
||||
[121] = "%1d", -- Radio On {0, 1}
|
||||
[158] = "%1d", -- Radio Off {0, 1}
|
||||
-- F 211 - IFF CB - Labelled "FuG 25a"
|
||||
[122] = "%1d", -- IFF On {0, 1}
|
||||
[159] = "%1d", -- IFF Off {0, 1}
|
||||
-- E 101 - Fuel Pump CB - Labelled "Tankpumpe"
|
||||
[123] = "%1d", -- Fuel Pump On {0, 1}
|
||||
[160] = "%1d", -- Fuel Pump Off {0, 1}
|
||||
-- Ignition Controls and Starter and Motor-Related Switches
|
||||
-- Magneto Selector
|
||||
[59] = "%.1f", -- Magnetos (Off, M1, M2, M1+M2) {0.0, 0.1, 0.2, 0.3}
|
||||
-- Starter Handle Cover
|
||||
[51] = "%1d", -- Starter Handle Cover {0, 1}
|
||||
-- Starter Turn Handle
|
||||
[52] = "%1d", -- Starter {0, 1}
|
||||
-- WM-Kommandgerat Toggle
|
||||
[62] = "%1d", -- Governor Automation {0, 1}
|
||||
-- Dashboard and Secondary Switches
|
||||
-- A 104 - Kill Switch
|
||||
[49] = "%1d", -- Kill Switch {0, 1}
|
||||
-- Button T - Gun Camera Trigger
|
||||
[149] = "%1d", -- Button T {0, 1}
|
||||
-- SZKK3 Weapons Control Master Switch
|
||||
[37] = "%1d", -- Weapons Master {0, 1}
|
||||
-- LH SZ 500 Ammo Counter
|
||||
[38] = "%.1f", -- Left Ammo Counter Setter Pinion (axis) {0.0 - 0.0}
|
||||
-- RH SZ 500 Ammo Counter
|
||||
[39] = "%.1f", -- Right Ammo Counter Setter Pinion (axis) {0.0 - 0.0}
|
||||
-- MW50 Operational Toggle
|
||||
[60] = "%1d", -- MW50 Boost {0, 1}
|
||||
-- Wing Cannons Toggle
|
||||
[61] = "%1d", -- Wing Cannons {0, 1}
|
||||
-- MK 108 / Wing Guns Toggle
|
||||
[62] = "%1d", -- MK 108 / R 21 {0, 1}
|
||||
-- R 101 ZSK 244 A Bomb Panel Master Switch
|
||||
-- Operated internally via ZSK 244 A Mode Control
|
||||
-- R 101 ZSK 244 A Mode Selector
|
||||
[64] = "%.1f", -- Bomb Fusing Selector (DIVE (INSTANT), DIVE (DELAYED), OFF, LEVEL (DELAYED), LEVEL (INSTANT)) {0.0, 0.25, 0.5, 0.75, 1.0}
|
||||
-- Illumination Controls
|
||||
-- C 102 LH UV Lamp Rheostat
|
||||
[80] = "%.1f", -- Left UV Lamp Brightness (axis) {0.0 - 0.5}
|
||||
-- C 103 RH UV Lamp Rheostat
|
||||
[82] = "%.1f", -- Right UV Lamp Brightness (axis) {0.0 - 0.5}
|
||||
-- Oxygen Apparatus Controls
|
||||
-- Apparatus Connecting Valve
|
||||
[127] = "%1d", -- Oxygen Operating Valve {0, 1}
|
||||
[126] = "%1d", -- Oxygen Emergency By-Pass {0, 1}
|
||||
-- Main Panel Controls
|
||||
-- Undercarriage Controls
|
||||
-- U/C Plungers Cover
|
||||
[53] = "%1d", -- Undercarriage Controls Cover {0, 1}
|
||||
[54] = "%1d", -- Undercarriage Raise {1.0, 1.0}
|
||||
[55] = "%1d", -- Undercarriage Lower {1.0, 1.0}
|
||||
[63] = "%1d", -- Undercarriage Emergency Release
|
||||
-- Fuel and MW50 Systems Controls
|
||||
-- Fuel Primer Hand Pump
|
||||
[140] = "%1d", -- Fuel Priming Pump {0, 1}
|
||||
-- Schnellstop Lever
|
||||
[88] = "%1d", -- Engine Stop {0, 1}
|
||||
-- Booster Pumps Lever
|
||||
[87] = "%.1f", -- Booster Pumps (Off, P1, P2, P1+P2) {0.0, 0.1, 0.2, 0.3}
|
||||
-- Stoff-Kraftstoff Ventilbatterie Lever
|
||||
[96] = "%1d", -- MW / Fuel {0, 1}
|
||||
-- Fuel Jettison Knob
|
||||
[112] = "%1d", -- "Fuel / MW Jettison {0, 1}
|
||||
-- Coolant System Controls
|
||||
-- Radiator Mode Lever {0, 1}
|
||||
[113] = "%.1f", -- Radiators Mode (Drive Off, Open, Automatic, Close) {0.0, 0.1, 0.2, 0.3}
|
||||
-- LH Radiator Hose Cut-Off Pull Handle
|
||||
[90] = "%1d", -- LH Radiator Cut-Off {0, 1}
|
||||
-- RH Radiator Hose Cut-Off Pull Handle
|
||||
[91] = "%1d", -- RH Radiator Cut-Off {0, 1}
|
||||
-- Navigation Instruments
|
||||
-- Altimeter
|
||||
[11] = "%.2f", -- Altimeter Pressure Set (axis) 1.0 in 0.04 steps
|
||||
-- Artificial Horizon
|
||||
--[7] = "%.2f", -- Horizon Cage (axis) {0.0, 0.511} in 0.04 steps
|
||||
-- Repeater Compass
|
||||
--[12] = "%.2f", -- Course Set (axis) 0.0 in 0.04 steps
|
||||
-- Instruments
|
||||
-- Clock Scale
|
||||
[21] = "%.8f", -- Scale Set (axis) 0.0 in 0.01612434 steps
|
||||
-- Clock Setter Pinion
|
||||
[22] = "%.1f", -- Adjusting Knob (axis) 0.0 in 0.1 steps
|
||||
-- Clock Freeze Lever
|
||||
[23] = "%1d", -- Time Setting Lever {0, 1}
|
||||
-- Clock Stopwatch Button
|
||||
[24] = "%1d", -- Start/Stop/Reset Chronometer
|
||||
-- P 112 Gun Sight Brightness Rheostat {0, 1}
|
||||
--[48] = "%.1f", -- Gun Sight Brightness (axis) 0.5 in 0.1 steps
|
||||
-- P 112 Gun Sight Folding Controls
|
||||
[139] = "%1d", -- Gunsight Fold {0, 1}
|
||||
-- P 112 Gun Sight Smoked Screen Controls
|
||||
--[47] = "%.1f", -- Gunsight Smoked Screen (axis) {0, 1} in 01 steps
|
||||
-- Radio Controls
|
||||
-- FUG16
|
||||
[128] = "%.1f", -- FuG16ZY Preset Selector (1, 2, TR, SQ) {0.0, 0.1, 0.2, 0.3}
|
||||
[129] = "%.2f", -- FuG16 ZY Fine Tune (axis) 0.5 in 0.05 steps
|
||||
[130] = "%.2f", -- FuG16 ZY Volume (axis) 0.0 in 0.04 steps
|
||||
[131] = "%1d", -- "Mic. On/Off {0, 1}
|
||||
-- FUG25
|
||||
[132] = "%.1f", -- FuG25 Mode Selector (1, 2) {0.0, 1.0}
|
||||
[133] = "%1d", -- FuG25 Test {0, 1}
|
||||
-- Left Wall Controls
|
||||
-- Tail Wheel Lock Handle
|
||||
[97] = "%1d", -- Tail Wheel Lock {0, 1}
|
||||
-- Cockpit Open/Close Control
|
||||
[136] = "%1d", -- Canopy (Open/Close) {0, 1}
|
||||
[137] = "%1d", -- Canopy (Open/Close) H {0, 1}
|
||||
[138] = "%1d", -- Canopy (Open/Close) S {0, 1}
|
||||
-- Cockpit Jettison Pull Handle
|
||||
[83] = "%1d", -- Jettison Canopy {0, 1}
|
||||
-- Trim Wheel
|
||||
[141] = "%1d", -- Stabilizer Trim Nose Up {0, 1}
|
||||
[142] = "%1d", -- Stabilizer Trim Nose Down {0, 1}
|
||||
-- Flaps Wheel
|
||||
[143] = "%1d", -- Extend Flaps {0, 1}
|
||||
[144] = "%1d", -- Retract Flaps {0, 1}
|
||||
-- Notwurf / Ordinance Dump
|
||||
[92] = "%1d", -- Ordinance Emergency Release
|
||||
--[98] = "$1d", -- Cockpit Left Vent {0, 1}
|
||||
-- Right Wall Controls
|
||||
-- RH Cockpit Vent
|
||||
--[99] = "%1d", -- Cockpit Right Vent {0, 1}
|
||||
-- Flare Gun Trigger
|
||||
[72] = "%1d", -- Fire Flare Gun
|
||||
-- Engine Controls & Quadrant
|
||||
-- Propellor Control Rocker
|
||||
[85] = "%.1f", -- Decrease RPM {1.0, -1.0}
|
||||
-- Radio Transmit Button
|
||||
[150] = "%1d", -- Microphone On {0, 1}
|
||||
-- E 103 Propellor Automation Switch
|
||||
[89] = "%1d", -- Governor Automation {0, 1}
|
||||
-- Cold Weather Start Valve Handle
|
||||
[86] = "%1d" -- Cold Weather Start {0, 1}
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
ExportScript.Tools.SendData(35, string.format("%0.4f", mainPanelDevice:get_argument_value(35))) -- Oxygen_Flow_Blinker
|
||||
ExportScript.Tools.SendData(42, string.format("%0.4f", mainPanelDevice:get_argument_value(42))) -- MG131_0_Klappanker
|
||||
ExportScript.Tools.SendData(43, string.format("%0.4f", mainPanelDevice:get_argument_value(43))) -- MG131_1_Klappanker
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to hardware
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
local lRADIO = GetDevice(14)
|
||||
--ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", lRADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy(lRADIO:get_frequency()/1000000))
|
||||
|
||||
-- Lamps
|
||||
ExportScript.Tools.SendDataDAC("35", mainPanelDevice:get_argument_value(35) > 0.8 and 1 or 0) -- Oxygen_Flow_Blinker
|
||||
ExportScript.Tools.SendDataDAC("42", mainPanelDevice:get_argument_value(42) > 0.8 and 1 or 0) -- MG131_0_Klappanker
|
||||
ExportScript.Tools.SendDataDAC("43", mainPanelDevice:get_argument_value(43) > 0.8 and 1 or 0) -- MG131_1_Klappanker
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
117
Scripts/DCS-ExportScript/ExportsModules/Empty-DCS.lua
Normal file
117
Scripts/DCS-ExportScript/ExportsModules/Empty-DCS.lua
Normal file
@@ -0,0 +1,117 @@
|
||||
-- Module Name Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.<ModuleName> = "1.2.X"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
2358
Scripts/DCS-ExportScript/ExportsModules/F-14B.lua
Normal file
2358
Scripts/DCS-ExportScript/ExportsModules/F-14B.lua
Normal file
File diff suppressed because it is too large
Load Diff
1448
Scripts/DCS-ExportScript/ExportsModules/F-14B_nosaMtrevoC.lua
Normal file
1448
Scripts/DCS-ExportScript/ExportsModules/F-14B_nosaMtrevoC.lua
Normal file
File diff suppressed because it is too large
Load Diff
1408
Scripts/DCS-ExportScript/ExportsModules/F-15C.lua
Normal file
1408
Scripts/DCS-ExportScript/ExportsModules/F-15C.lua
Normal file
File diff suppressed because it is too large
Load Diff
1212
Scripts/DCS-ExportScript/ExportsModules/F-16C_50.lua
Normal file
1212
Scripts/DCS-ExportScript/ExportsModules/F-16C_50.lua
Normal file
File diff suppressed because it is too large
Load Diff
717
Scripts/DCS-ExportScript/ExportsModules/F-5E-3.lua
Normal file
717
Scripts/DCS-ExportScript/ExportsModules/F-5E-3.lua
Normal file
@@ -0,0 +1,717 @@
|
||||
-- F-5E-3
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.F5E3 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Gear System
|
||||
[97] = "%.4f", -- AlterReleaseRods
|
||||
-- Cockpit mechanics
|
||||
[712] = "%.4f", -- CanopyHandle
|
||||
-- WEAPONS ----------------------------------------------------
|
||||
-- CMDS
|
||||
[401] = "%.4f", -- ChaffDrumCounter_10 {0.0, 1.0} {0.0, 10.0}
|
||||
[402] = "%.4f", -- ChaffDrumCounter_1 {0.0, 1.0} {0.0, 10.0}
|
||||
[405] = "%.4f", -- FlareDrumCounter_10 {0.0, 1.0} {0.0, 10.0}
|
||||
[406] = "%.4f", -- FlareDrumCounter_1 {0.0, 1.0} {0.0, 10.0}
|
||||
-- AN/ASG-31 Sight
|
||||
[43] = "%.4f", -- RetDepressionDrum_100 {0.0, 1.0} {0.0, 10.0}
|
||||
[44] = "%.4f", -- RetDepressionDrum_10 {0.0, 1.0} {0.0, 10.0}
|
||||
[45] = "%.4f", -- RetDepressionDrum_1 {0.0, 1.0} {0.0, 10.0}
|
||||
-- Slipball
|
||||
[3] = "%.4f", -- Slipball {-1.0, 1.0}
|
||||
-- Sight Camera
|
||||
[85] = "%.4f", -- MotorRunKnob {1.0, 0.0}
|
||||
-- AN/APQ-159 Radar
|
||||
-- Range scale lights
|
||||
[155] = "%.4f", -- RangeScale_5
|
||||
[156] = "%.4f", -- RangeScale_10
|
||||
[157] = "%.4f", -- RangeScale_20
|
||||
[158] = "%.4f", -- RangeScale_40
|
||||
[159] = "%.f", -- InRangeLight
|
||||
[160] = "%.f", -- FailLight
|
||||
[161] = "%.f", -- LockOnLight
|
||||
[162] = "%.f", -- ExcessGLight
|
||||
[163] = "%.4f", -- ScaleBrightness
|
||||
-- INSTRUMENTS ------------------------------------------------
|
||||
-- Angle-of-attack Indicator
|
||||
[7] = "%.4f", -- AOA_Units {0.0, 1.0} {0.0, 30.0}
|
||||
[704] = "%.f", -- AOA_poweroff_flag
|
||||
-- Accelerometer
|
||||
[6] = "%.4f", -- Accelerometer { 0.0, 0.323, 0.653, 1.0} {-5.0, 0.0, 5.0, 10.0}
|
||||
[902] = "%.4f", -- AccelerometerMin { 0.0, 0.323, 0.653, 1.0} {-5.0, 0.0, 5.0, 10.0}
|
||||
[903] = "%.4f", -- AccelerometerMax { 0.0, 0.323, 0.653, 1.0} {-5.0, 0.0, 5.0, 10.0}
|
||||
-- AirSpeed/Mach Indicator
|
||||
[8] = "%.4f", -- Airspeed {0.0, 0.0435, 0.1, 0.318, 0.3745, 0.397, 0.4495, 0.482, 0.54, 0.553, 0.6145, 0.658, 0.668, 0.761, 0.801, 0.877, 0.909, 0.942, 0.972, 1.0} {0.0, 80.0, 100.0, 170.0, 190.0, 200.0, 230.0, 250.0, 290.0, 300.0, 350.0, 390.0, 400.0, 500.0, 550.0, 650.0, 700.0, 750.0, 800.0, 850.0}
|
||||
[178] = "%.4f", -- MaxAirspeed {0.0, 0.0435, 0.1, 0.318, 0.3745, 0.397, 0.4495, 0.482, 0.54, 0.553, 0.6145, 0.658, 0.668, 0.761, 0.801, 0.877, 0.909, 0.942, 0.972, 1.0} {0.0, 80.0, 100.0, 170.0, 190.0, 200.0, 230.0, 250.0, 290.0, 300.0, 350.0, 390.0, 400.0, 500.0, 550.0, 650.0, 700.0, 750.0, 800.0, 850.0}
|
||||
[177] = "%.4f", -- SetAirspeed
|
||||
[179] = "%.4f", -- MachIndicator {1.0, 0.957, 0.92, 0.631, 0.386} {0.0, 0.5, 1.0, 1.8, 2.5}
|
||||
-- Vertical Velocity Indicator
|
||||
[24] = "%.4f", -- Variometer {-1.0, -0.64, -0.5, -0.29, 0.0, 0.29, 0.5, 0.64, 1.0} {-6000.0, -3000.0, -2000.0, -1000.0, 0.0, 1000.0, 2000.0, 3000.0, 6000.0}
|
||||
-- Altimeter AAU-34/A
|
||||
[10] = "%.4f", -- Altimeter_100_footPtr {0.0, 1.0} {0.0, 1000.0}
|
||||
[11] = "%.4f", -- Altimeter_10000_footCount {0.0, 1.0} {0.0, 10.0}
|
||||
[520] = "%.4f", -- Altimeter_1000_footCount {0.0, 1.0} {0.0, 10.0}
|
||||
[521] = "%.4f", -- Altimeter_100_footCount {0.0, 1.0} {0.0, 10.0}
|
||||
[59] = "%.4f", -- pressure_setting_0 {0.0, 1.0} {0.0, 10.0}
|
||||
[58] = "%.4f", -- pressure_setting_1 {0.0, 1.0} {0.0, 10.0}
|
||||
[57] = "%.4f", -- pressure_setting_2 {0.0, 1.0} {0.0, 10.0}
|
||||
[56] = "%.4f", -- pressure_setting_3 {0.0, 1.0} {0.0, 10.0}
|
||||
[9] = "%.4f", -- AAU34_PNEU_flag {0.0, 1.0} {0.0, 0.4}
|
||||
-- Attitude Indicator ARU-20
|
||||
[81] = "%.4f", -- AI_Pitch {-0.507, 0.0, 0.507} {-rad_(90.0), 0.0, rad_(90.0)}
|
||||
[30] = "%.4f", -- AI_Bank {-1.0, 1.0} { 0.0, math.pi * 2.0}
|
||||
[149] = "%.4f", -- AI_OFF_flag
|
||||
-- Horizontal Situation Indicator
|
||||
[32] = "%.4f", -- HSI_CompassCard
|
||||
[139] = "%.4f", -- HSI_BearingPtr
|
||||
[35] = "%.4f", -- HSI_CourseArrow
|
||||
[36] = "%.4f", -- HSI_CourseDevInd {-1.0, 1.0}
|
||||
[144] = "%.4f", -- HSI_HeadingMark
|
||||
[268] = "%.4f", -- HSI_Range_100 {0.0, 1.0} {0.0, 10.0}
|
||||
[269] = "%.4f", -- HSI_Range_10 {0.0, 1.0} {0.0, 10.0}
|
||||
[270] = "%.4f", -- HSI_Range_1 {0.0, 1.0} {0.0, 10.0}
|
||||
[142] = "%.4f", -- HSI_Range_flag
|
||||
[275] = "%.4f", -- HSI_CourseSel_100 {0.0, 1.0} {0.0, 10.0}
|
||||
[276] = "%.4f", -- HSI_CourseSel_10 {0.0, 1.0} {0.0, 10.0}
|
||||
[277] = "%.4f", -- HSI_CourseSel_1 {0.0, 1.0} {0.0, 10.0}
|
||||
[146] = "%.4f", -- HSI_ToFrom
|
||||
[143] = "%.4f", -- HSI_OFF_flag
|
||||
[141] = "%.4f", -- HSI_DevDF_Win
|
||||
-- Standby Attitude Indicator
|
||||
[438] = "%.4f", -- SAI_Pitch {-0.665, -0.581, -0.5, 0.0, 0.5, 0.581, 0.676, 0.735} {-rad_(78.0), -rad_(60.0), -rad_(42.0), 0.0, rad_(42.0), rad_(60.0), rad_(80.0), rad_(92.0)}
|
||||
[439] = "%.4f", -- SAI_Bank {1.0, -1.0} {-math.pi, math.pi}
|
||||
[440] = "%.4f", -- SAI_OFF_flag
|
||||
--[443] = "%.4f", -- SAI_knob_arrow {-1.0, 1.0} {0.0, 1.0}
|
||||
-- Clock
|
||||
[19] = "%.4f", -- CLOCK_currtime_hours
|
||||
[18] = "%.4f", -- CLOCK_currtime_minutes
|
||||
[509] = "%.4f", -- CLOCK_elapsed_time_minutes
|
||||
[37] = "%.4f", -- CLOCK_elapsed_time_seconds
|
||||
-- Pitch Trim Indicator
|
||||
[52] = "%.4f", -- Pitch_Trim {1.0, 0.0, -0.1} {-10.0, 0.0, 1.0}
|
||||
-- Flap Indicator
|
||||
[51] = "%.4f", -- Flap_Indicator {0.0, 0.4} {0.0, 4.0}
|
||||
-- Hydraulic Pressure Indicators
|
||||
[109] = "%.4f", -- Utility_Pressure {0.0, 1.0} {0.0, 4000.0}
|
||||
[110] = "%.4f", -- Flight_Pressure {0.0, 1.0} {0.0, 4000.0}
|
||||
-- Engine Tachometers
|
||||
[16] = "%.4f", -- Tachometer_Left {0.008, 0.475, 0.84, 0.94, 1.0} {0.0, 50.0, 90.0, 100.0, 107.0}
|
||||
[425] = "%.4f", -- Tachometer_percent_Left {0.0, 1.0} {0.0, 10.0}
|
||||
[17] = "%.4f", -- Tachometer_Right {0.008, 0.475, 0.84, 0.94, 1.0} {0.0, 50.0, 90.0, 100.0, 107.0}
|
||||
[426] = "%.4f", -- Tachometer_percent_Right {0.0, 1.0} {0.0, 10.0}
|
||||
-- Exhaust Gas Temperature Indicators
|
||||
[12] = "%.4f", -- EGT_Left {0.0, 0.03, 0.1, 0.274, 0.78, 1.0} {0.0, 140.0, 200.0, 500.0, 800.0, 1200.0}
|
||||
[14] = "%.4f", -- EGT_Right {0.0, 0.03, 0.1, 0.274, 0.78, 1.0} {0.0, 140.0, 200.0, 500.0, 800.0, 1200.0}
|
||||
-- Aux Intake Doors Indicator
|
||||
[111] = "%.4f", -- AuxIntakeDoors {0.0, 0.2} {0.0, 2.0}
|
||||
-- Oil Pressure Indicator (Dual)
|
||||
[112] = "%.4f", -- OilPressure_Left {0.0, 1.0} {0.0, 100.0}
|
||||
[113] = "%.4f", -- OilPressure_Right {0.0, 1.0} {0.0, 100.0}
|
||||
-- Nozzle Position Indicators
|
||||
[107] = "%.4f", -- NozzlePos_Left {0.0, 1.0} {0.0, 100.0}
|
||||
[108] = "%.4f", -- NozzlePos_Right {0.0, 1.0} {0.0, 100.0}
|
||||
-- Cabin Pressure Altimeter
|
||||
[114] = "%.4f", -- CabinPressure {0.0, 1.0} {0.0, 50.0}
|
||||
-- Fuel Flow Indicator (Dual)
|
||||
[525] = "%.4f", -- FuelFlow_Left {0.0, 0.67, 0.75, 0.83, 1.0} {0.0, 4000.0, 7000.0, 10000.0, 15000.0}
|
||||
[526] = "%.4f", -- FuelFlow_Right {0.0, 0.67, 0.75, 0.83, 1.0} {0.0, 4000.0, 7000.0, 10000.0, 15000.0}
|
||||
-- Fuel Quantity Indicator (Dual)
|
||||
[22] = "%.4f", -- FuelQuantity_Left {0.0, 1.0} {0.0, 2500.0}
|
||||
[23] = "%.4f", -- FuelQuantity_Right {0.0, 1.0} {0.0, 2500.0}
|
||||
-- Oxygen Quantity Indicator
|
||||
[390] = "%.4f", -- OxygenQuantity {0.0, 1.0} {0.0, 5.0}
|
||||
-- Oxygen Flow Pressure Indicator
|
||||
[604] = "%.4f", -- FlowPressure {0.0, 0.5, 1.0} {0.0, 100.0, 500.0}
|
||||
-- Oxygen Flow Indicator
|
||||
[600] = "%.4f", -- FlowBlinker
|
||||
-- RADIO ------------------------------------------------------
|
||||
-- UHF Radio AN/ARC-164
|
||||
[326] = "%.2f", -- UHFRadioChannel
|
||||
[302] = "%.1f", -- UHFRadio100MHz
|
||||
[303] = "%.1f", -- UHFRadio10MHz {1.0, 0.0} {0.0, 1.0}
|
||||
[304] = "%.1f", -- UHFRadio1MHz {1.0, 0.0} {0.0, 1.0}
|
||||
[305] = "%.1f", -- UHFRadio01MHz {1.0, 0.0} {0.0, 1.0}
|
||||
[306] = "%.1f", -- UHFRadio0025MHz {1.0, 0.0} {0.0, 1.0}
|
||||
-- IFF/SIF APX72
|
||||
[197] = "%.4f", -- IFF_Code4Sw_Pull
|
||||
[198] = "%.4f", -- IFF_MasterSw_Pull
|
||||
-- TACAN
|
||||
[263] = "%.4f", -- TACAN_window_wheel.hundreds {0.0, 1.0} {0.0, 10.0}
|
||||
[264] = "%.4f", -- TACAN_window_wheel.tens {0.0, 1.0} {0.0, 10.0}
|
||||
[265] = "%.4f", -- TACAN_window_wheel.ones {0.0, 1.0} {0.0, 10.0}
|
||||
--[266] = "%.4f", -- XYwheel
|
||||
[260] = "%.f", -- TACAN_test_light
|
||||
-- LAMPS
|
||||
-- Engine Fire Lights
|
||||
[167] = "%.f", -- lamp_LeftFire
|
||||
[168] = "%.f", -- lamp_RightFire
|
||||
-- AOA Indexer Lights
|
||||
[48] = "%.f", -- lamp_AOA_Red
|
||||
[49] = "%.f", -- lamp_AOA_Green
|
||||
[50] = "%.f", -- lamp_AOA_Yellow
|
||||
-- Landing Gear Lights
|
||||
[96] = "%.f", -- lamp_GearWarning
|
||||
[54] = "%.f", -- lamp_GearNose
|
||||
[53] = "%.f", -- lamp_GearLeft
|
||||
[55] = "%.f", -- lamp_GearRight
|
||||
-- Hook Light
|
||||
[90] = "%.f", -- lamp_Hook
|
||||
-- Caution Lights panel
|
||||
[530] = "%.f", -- lamp_LeftGenerator
|
||||
[531] = "%.f", -- lamp_Canopy
|
||||
[532] = "%.f", -- lamp_RightGenerator
|
||||
[533] = "%.f", -- lamp_UtilityHyd
|
||||
[534] = "%.f", -- lamp_Spare1
|
||||
[535] = "%.f", -- lamp_FlightHyd
|
||||
[536] = "%.f", -- lamp_ExtTanksEmpty
|
||||
[537] = "%.f", -- lamp_IFF
|
||||
[538] = "%.f", -- lamp_Oxygen
|
||||
[539] = "%.f", -- lamp_LeftFuelLow
|
||||
[540] = "%.f", -- lamp_EngineAntiIce
|
||||
[541] = "%.f", -- lamp_RightFuelLow
|
||||
[542] = "%.f", -- lamp_LeftFuelPress
|
||||
[543] = "%.f", -- lamp_INS
|
||||
[544] = "%.f", -- lamp_RightFuelPress
|
||||
[545] = "%.f", -- lamp_AOA_Flaps
|
||||
[546] = "%.f", -- lamp_AirDataComputer
|
||||
[547] = "%.f", -- lamp_DirGyro
|
||||
[548] = "%.f", -- lamp_Spare2
|
||||
[549] = "%.f", -- lamp_DC_Overload
|
||||
[550] = "%.f", -- lamp_Spare3
|
||||
-- Master Caution Light
|
||||
[169] = "%.f", -- lamp_MasterCaution
|
||||
--IFF Panel lamps
|
||||
[216] = "%.f", -- IFF_reply_lamp
|
||||
[218] = "%.f", -- IFF_test_lamp
|
||||
-- Internal Lights
|
||||
[801] = "%.f", -- light_Flight
|
||||
[802] = "%.f", -- light_Engine
|
||||
[803] = "%.f", -- light_Console
|
||||
[804] = "%.f", -- light_Compass
|
||||
[805] = "%.f", -- light_Flood
|
||||
[806] = "%.f", -- light_Sight
|
||||
[807] = "%.f", -- light_Armt
|
||||
[810] = "%.f", -- light_Tstorm
|
||||
-- RWR button lights
|
||||
[576] = "%.f", -- rwr_Power
|
||||
[572] = "%.f", -- rwr_Ship_unkn
|
||||
[571] = "%.f", -- rwr_Ship_U
|
||||
[568] = "%.f", -- rwr_Sys_On
|
||||
[569] = "%.f", -- rwr_Sys
|
||||
[565] = "%.f", -- rwr_Sep_Up
|
||||
[566] = "%.f", -- rwr_Sep_Down
|
||||
[563] = "%.f", -- rwr_Alt
|
||||
[562] = "%.f", -- rwr_Alt_Low
|
||||
[557] = "%.f", -- rwr_Hand_Up
|
||||
[558] = "%.f", -- rwr_Hand_H
|
||||
[555] = "%.f", -- rwr_Search
|
||||
[553] = "%.f", -- rwr_Mode_Open
|
||||
[552] = "%.f", -- rwr_Mode_Pri
|
||||
-- Brightness regulation
|
||||
[808] = "%.f", -- brtRadarScale
|
||||
[815] = "%.f", -- brtRwrLights
|
||||
[816] = "%.f", -- brtFireLights
|
||||
[817] = "%.f", -- brtMainLights
|
||||
[818] = "%.f", -- brtIFFLights
|
||||
[819] = "%.f" -- brtRadarLights
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Control System
|
||||
[323] = "%1d", -- Yaw Damper Switch, YAW/OFF
|
||||
[322] = "%1d", -- Pitch Damper Switch, PITCH/OFF
|
||||
[324] = "%.4f", -- Rudder Trim Knob (Axis) {-1.0, 1.0} in 0.15 Steps
|
||||
[116] = "%1d", -- Flaps Lever, EMER UP/THUMB SW/FULL {-1.0, 0.0, 1.0}
|
||||
[132] = "%1d", -- Pitch Damper Cutoff Switch - Push to cutoff
|
||||
[101] = "%1d", -- Speed Brake Switch, OUT/OFF/IN {-1.0, 0.0, 1.0}
|
||||
[115] = "%1d", -- Auto Flap System Thumb Switch, UP/FIXED/AUTO {-1.0, 0.0, 1.0}
|
||||
--[125] = "%1d", -- Trimmer Switch, PUSH(DESCEND) {0.0, 1.0}
|
||||
--[125] = "%1d", -- Trimmer Switch, PULL(CLIMB) {-1.0, 0.0}
|
||||
--[126] = "%1d", -- Trimmer Switch, LEFT WING DOWN {0.0, 1.0}
|
||||
--[126] = "%1d", -- Trimmer Switch, RIGHT WING DOWN {-1.0, 0.0}
|
||||
[125] = "%1d", -- Trimmer Switch, PUSH(DESCEND)/PULL(CLIMB) {1.0, 0.0, -1.0}
|
||||
[126] = "%1d", -- Trimmer Switch, LEFT WING DOWN/RIGHT WING DOWN {1.0, 0.0, -1.0}
|
||||
[278] = "%1d", -- Rudder Pedal Adjust T-Handle, PULL/STOW
|
||||
-- Electric system
|
||||
[387] = "%1d", -- attery Switch, BATT/OFF
|
||||
[388] = "%1d", -- Left Generator Switch, L GEN/OFF/RESET {-1.0, 0.0, 1.0}
|
||||
[389] = "%1d", -- Right Generator Switch, R GEN/OFF/RESET {-1.0, 0.0, 1.0}
|
||||
[375] = "%1d", -- Pitot Anti-Ice Switch, PITOT/OFF
|
||||
[230] = "%1d", -- Fuel & Oxygen Switch, GAGE TEST/OFF/QTY CHECK {-1.0, 0.0, 1.0}
|
||||
-- Fuel System
|
||||
[360] = "%1d", -- Left Fuel Shutoff Switch, OPEN/CLOSED
|
||||
[362] = "%1d", -- Right Fuel Shutoff Switch, OPEN/CLOSED
|
||||
[377] = "%1d", -- Ext Fuel Cl Switch, ON/OFF
|
||||
[378] = "%1d", -- Ext Fuel Pylons Switch, ON/OFF
|
||||
[380] = "%1d", -- Left Boost Pump Switch, ON/OFF
|
||||
[381] = "%1d", -- Crossfeed Switch, OPEN/CLOSED
|
||||
[382] = "%1d", -- Right Boost Pump Switch, ON/OFF
|
||||
[383] = "%1d", -- Autobalance Switch, LEFT/NEUT/RIGHT {-1.0, 0.0, 1.0}
|
||||
-- Engines
|
||||
[357] = "%1d", -- Left Engine Start Button - Push to start
|
||||
[358] = "%1d", -- Right Engine Start Button - Push to start
|
||||
[376] = "%1d", -- Engine Anti-Ice Switch, ENGINE/OFF {1.0, -1.0}
|
||||
-- Gear System
|
||||
[83] = "%1d", -- Landing Gear Lever, LG UP/LG DOWN
|
||||
[95] = "%1d", -- Landing Gear Alternate Release Handle, Pull and Hold
|
||||
[98] = "%1d", -- Gear Alternate Release Reset Control, OFF/RESET
|
||||
[88] = "%1d", -- Landing Gear Downlock Override Button - Push and hold to override locking solenoid
|
||||
[87] = "%1d", -- Landing Gear And Flap Warning Silence Button
|
||||
[250] = "%1d", -- Nose Strut Switch, EXTEND/RETRACT {1.0, -1.0}
|
||||
[131] = "%1d", -- Nosewheel Steering Button - Press and Hold to engage nosewheel control
|
||||
[92] = "%1d", -- Left Landing Gear Lamp - Press to test(LMB)
|
||||
[93] = "%1d", -- Nose Landing Gear Lamp - Press to test(LMB)
|
||||
[94] = "%1d", -- Right Landing Gear Lamp - Press to test(LMB)
|
||||
[89] = "%1d", -- Arresting Hook Button
|
||||
-- Oxygen System
|
||||
[603] = "%1d", -- Oxygen Supply Lever, ON/OFF {1.0, -1.0}
|
||||
[602] = "%1d", -- Diluter Lever
|
||||
[601] = "%1d", -- Emergency Lever, EMERGENCY/NORMAL/TEST MASK {-1.0, 0.0, 1.0}
|
||||
-- EC System
|
||||
[371] = "%1d", -- Cabin Press Switch, DEFOG ONLY/NORMAL/RAM DUMP {0.0, 0.5, 1.0}
|
||||
[372] = "%1d", -- Cabin Temp Switch, AUTO/CENTER/MAN COLD/MAN HOT {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6}
|
||||
[373] = "%.2f", -- Cabin Temp Knob (Axis) {-1.0, 1.0} in 0.15 Steps
|
||||
[374] = "%.2f", -- Canopy Defog Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[386] = "%.2f", -- Cockpit Air Inlet (Horizontal) (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
[385] = "%.2f", -- Cockpit Air Inlet (Vertical) (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
-- Cockpit Mechanics
|
||||
--[0] = "%1d", -- Canopy Handle, OPEN/CLOSE
|
||||
[772] = "%1d", -- Seat Adjust Switch, DOWN/NEUTRAL/UP {-1.0, 0.0, 1.0}
|
||||
[384] = "%1d", -- Canopy Jettison T-Handle, PULL/PUSH
|
||||
[91] = "%.1f", -- Drag Chute T-Handle, PULL/PUSH {0.1, -0.1}
|
||||
-- External Lights
|
||||
[227] = "%.2f", -- Navigation Lights Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[228] = "%.2d", -- Formation Lights Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[229] = "%1d", -- Beacon Switch, BEACON/OFF
|
||||
[353] = "%1d", -- Landing & Taxi Light Switch, ON/OFF
|
||||
-- Internal Lights
|
||||
[46] = "%1d", -- AN/ASG-31 Sight Panel Light Button, ON/OFF
|
||||
[613] = "%1d", -- Magnetic Compass Light Switch, LIGHT/OFF
|
||||
[221] = "%.2f", -- Flood Lights Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[222] = "%.2f", -- Flight Instruments Lights Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[223] = "%.2f", -- Engine Instruments Lights Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[224] = "%.2f", -- Console Lights Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[363] = "%.2f", -- Armament Panel Lights Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[172] = "%1d", -- Master Caution Button - Push to reset
|
||||
[226] = "%1d", -- Warning Test Switch, Press to test
|
||||
[225] = "%1d", -- Bright/Dim Switch, BRT/NEUT/DIM {-1.0, 0.0, 1.0}
|
||||
-- Countermeasures Dispensing System
|
||||
[400] = "%1d", -- Chaff Mode Selector, OFF/SINGLE/PRGM/MULT {0.0, 0.1, 0.2, 0.3}
|
||||
[404] = "%1d", -- Flare Mode Selector, OFF/SINGLE/PRGM {0.0, 0.1, 0.2}
|
||||
[409] = "%1d", -- Flare Jettison Switch, OFF/UP
|
||||
[403] = "%1d", -- Chaff Counter Reset Button - Push to reset
|
||||
[407] = "%1d", -- Flare Counter Reset Button - Push to reset
|
||||
[117] = "%1d", -- Flare-Chaff Button - Push to dispense
|
||||
-- IFF
|
||||
[199] = "%1d", -- IFF MODE 4 CODE Selector, ZERO(use MW to pull switch)/B/A/HOLD
|
||||
[197] = "%1d", -- IFF MODE 4 CODE Selector, ZERO(use MW to pull switch)/B/A/HOLD
|
||||
[200] = "%1d", -- IFF MASTER Control Selector, EMER(use MW to pull switch)/NORM/LOW/STBY/OFF
|
||||
[198] = "%1d", -- IFF MASTER Control Selector, EMER(use MW to pull switch)/NORM/LOW/STBY/OFF
|
||||
[201] = "%1d", -- IFF MODE 4 Monitor Control Switch, AUDIO/OUT/LIGHT {-1.0, 0.0, 1.0}
|
||||
[202] = "%1d", -- IFF Mode Select/TEST Switch, M-1 /ON/OUT {-1.0, 0.0, 1.0}
|
||||
[203] = "%1d", -- IFF Mode Select/TEST Switch, M-2 /ON/OUT {-1.0, 0.0, 1.0}
|
||||
[204] = "%1d", -- IFF Mode Select/TEST Switch, M-3/A /ON/OUT {-1.0, 0.0, 1.0}
|
||||
[205] = "%1d", -- IFF Mode Select/TEST Switch, M-C /ON/OUT {-1.0, 0.0, 1.0}
|
||||
[206] = "%1d", -- IFF RAD TEST/MON Switch, RAD TEST/OUT/MON {-1.0, 0.0, 1.0}
|
||||
[207] = "%1d", -- IFF Identification of Position (IP) Switch, IDENT/OUT/MIC {-1.0, 0.0, 1.0}
|
||||
[208] = "%1d", -- IFF MODE 4 Control Switch, ON/OUT
|
||||
[209] = "%.1f", -- IFF MODE 1 Code Selector Wheel 1 {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7}
|
||||
[210] = "%.1f", -- IFF MODE 1 Code Selector Wheel 2 {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7}
|
||||
[211] = "%.1f", -- IFF MODE 3/A Code Selector Wheel 1 {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7}
|
||||
[212] = "%.1f", -- IFF MODE 3/A Code Selector Wheel 2 {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7}
|
||||
[213] = "%.1f", -- IFF MODE 3/A Code Selector Wheel 3 {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7}
|
||||
[214] = "%.1f", -- IFF MODE 3/A Code Selector Wheel 4 {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7}
|
||||
[217] = "%1d", -- MODE 4 REPLY Light - Press to test(LMB)
|
||||
[215] = "%1d", -- Radiation TEST and Monitor Light - Press to test(LMB)
|
||||
-- Jettison System
|
||||
[365] = "%1d", -- Emergency All Jettison Button - Push to jettison
|
||||
[367] = "%1d", -- Select Jettison Switch, SELECT POSITION/OFF/ALL PYLONS {-1.0, 0.0, 1.0}
|
||||
[366] = "%1d", -- Select Jettison Button - Push to jettison
|
||||
-- Weapons Control
|
||||
[346] = "%1d", -- Armament Position Selector Switch - LEFT WINGTIP, ON/OFF
|
||||
[347] = "%1d", -- Armament Position Selector Switch - LEFT OUTBD, ON/OFF
|
||||
[348] = "%1d", -- Armament Position Selector Switch - LEFT INBD, ON/OFF
|
||||
[349] = "%1d", -- Armament Position Selector Switch - CENTERLINE, ON/OFF
|
||||
[350] = "%1d", -- Armament Position Selector Switch - RIGHT INBD, ON/OFF
|
||||
[351] = "%1d", -- Armament Position Selector Switch - RIGHT OUTBD, ON/OFF
|
||||
[352] = "%1d", -- Armament Position Selector Switch - RIGHT WINGTIP, ON/OFF
|
||||
[340] = "%1d", -- Interval Switch [sec], .06/.10/.14 {-1.0, 0.0, 1.0}
|
||||
[341] = "%1d", -- Bombs Arm Switch, SAFE/TAIL/NOSE & TAIL/NOSE {0.0, 0.1, 0.2, 0.3}
|
||||
[343] = "%1d", -- Guns, Missile and Camera Switch, GUNS MSL & CAMR/OFF/CAMR ONLY {-1.0, 0.0, 1.0}
|
||||
[344] = "%.1f", -- External Stores Selector, RIPL/BOMB/SAFE/RKT DISP {0.0,0.1,0.2,0.3}
|
||||
[345] = "%.2f", -- Missile Volume Knob - Rotate to adjust volume (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[128] = "%1d", -- Weapon Release Button - Press to release (Stick)
|
||||
[137] = "%1d", -- Missile Uncage Switch - Press and hold to uncage missile seeker head
|
||||
-- Trigger
|
||||
[127] = "%1d", -- Trigger Button, FIRST DETENT(LMB) {0.0, 0.5}
|
||||
[127] = "%1d", -- Trigger Button, SECOND DETENT(RMB) {0.0, 1.0}
|
||||
-- AHRS
|
||||
[166] = "%1d", -- Fast Erect Button - Push to erect
|
||||
[220] = "%1d", -- Compass Switch, DIR GYRO/MAG/FAST SLAVE
|
||||
[273] = "%.1f", -- Nav Mode Selector Switch, DF/TACAN {0.1,-0.1}
|
||||
-- AN/APQ-159 Radar Control Panel
|
||||
[65] = "%.2f", -- AN/APQ-159 Radar Scale Knob - Rotate to adjust scale brightness (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[321] = "%.2f", -- AN/APQ-159 Radar Elevation Antenna Tilt Control Knob - Rotate to adjust antenna elevation (Axis) {-1.0, 1.0} in 0.15 Steps
|
||||
[315] = "%.1f", -- AN/APQ-159 Radar Range Selector Switch [nm], 5/10/20/40 {0.0, 0.1, 0.2, 0.3}
|
||||
[316] = "%.1f", -- AN/APQ-159 Radar Mode Selector Switch, OFF/STBY/OPER/TEST {0.0, 0.1, 0.2, 0.3}
|
||||
[317] = "%1d", -- AN/APQ-159 Radar Acquisition Button
|
||||
[70] = "%.2f", -- AN/APQ-159 Radar Bright Knob - Rotate to adjust brightness (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[69] = "%.2f", -- AN/APQ-159 Radar Persistence Knob - Rotate to adjust persistence (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[68] = "%.2f", -- AN/APQ-159 Radar Video Knob - Rotate to adjust video intensity (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[67] = "%.2f", -- AN/APQ-159 Radar Cursor Knob - Rotate to adjust indication brightness (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[66] = "%.2f", -- AN/APQ-159 Radar Pitch Knob - Rotate to adjust horizon bar (Axis) {-0.75, 0.75} in 0.1 Steps
|
||||
-- AN/ASG-31 Sight
|
||||
[40] = "%.1f", -- AN/ASG-31 Sight Mode Selector, OFF/MSL/A/A1 GUNS/A/A2 GUNS/MAN {0.0, 0.1, 0.2, 0.3, 0.4}
|
||||
[42] = "%.2f", -- AN/ASG-31 Sight Reticle Depression Knob - Rotate to adjust manual mode depression angle (Axis) {0.0, 1.0} in 0.10 Steps
|
||||
[41] = "%.2f", -- AN/ASG-31 Sight Reticle Intensity Knob - Rotate to adjust brightness (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[136] = "%1d", -- AN/ASG-31 Sight Cage Switch - Press and hold to cage
|
||||
-- RWR-IC
|
||||
[551] = "%1d", -- RWR Indicator Control MODE Button
|
||||
[554] = "%1d", -- RWR Indicator Control SEARCH Button
|
||||
[556] = "%1d", -- RWR Indicator Control HANDOFF Button
|
||||
[559] = "%1d", -- RWR Indicator Control LAUNCH Button
|
||||
[561] = "%1d", -- RWR Indicator Control ALTITUDE Button
|
||||
[564] = "%1d", -- RWR Indicator Control T Button
|
||||
[567] = "%1d", -- RWR Indicator Control SYS TEST Button
|
||||
[570] = "%1d", -- RWR Indicator Control UNKNOWN SHIP Button
|
||||
[573] = "%1d", -- RWR Indicator Control ACT/PWR Button
|
||||
[575] = "%1d", -- RWR Indicator Control POWER Button {1.0,0.0,-1.0}
|
||||
[577] = "%.1f", -- RWR Indicator Control AUDIO Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[578] = "%.1f", -- RWR Indicator Control DIM Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- AN/ALR-87 RWR
|
||||
[140] = "%.2f", -- Adjust Display Brightness (Axis) {0.15, 0.85} in 0.1 Steps
|
||||
-- Instruments --------------------------
|
||||
-- Accelerometer
|
||||
[904] = "%1d", -- Accelerometer - Push to set
|
||||
-- AirSpeed/Mach Indicator
|
||||
[180] = "%.2f", -- Index Setting Pointer Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
-- Altimeter AAU-34/A
|
||||
[62] = "%.2f", -- Zero Setting Knob (Axis) {0.0, 1.0} in 0.04 Steps
|
||||
[60] = "%1d", -- Altimeter Mode Control Lever, ELECT(rical)/PNEU(matic) {-1.0, 0.0, 1.0}
|
||||
-- Attitude Indicator ARU-20
|
||||
[150] = "%.3f", -- AI Pitch Trim Knob (Axis) {0.0, 1.0} in 0.083 Steps
|
||||
-- Horizontal Situation Indicator
|
||||
[272] = "%.5f", -- HSI Course Set Knob (Axis) {0.0, 1.0} in 0.05818 Steps
|
||||
[271] = "%.5f", -- HSI Heading Set Knob (Axis) {0.0, 1.0} in 0.05818 Steps
|
||||
-- Standby Attitude Indicator
|
||||
[441] = "%1d", -- Cage/Pitch Trim (Button)
|
||||
[442] = "%.1f", -- Cage/Pitch Trim Knob (Axis) {0.0, 1.0} in 0.5 Steps
|
||||
-- Clock
|
||||
[511] = "%1d", -- ABU-11 Clock Winding and Setting knob (Button)
|
||||
[510] = "%1d", -- ABU-11 Clock Winding and Setting Knob (Axis) {0.0, 1.0} in 0.6 Steps
|
||||
[512] = "%1d", -- ABU-11 Clock Elapsed Time Knob
|
||||
-- Electric system - CB Front Panel
|
||||
[280] = "%1d", -- CB WPN PWR LEFT INBD, ON/OFF {1.0, 0.0}
|
||||
[281] = "%1d", -- CB WPN PWR CENTER LINE, ON/OFF {1.0, 0.0}
|
||||
[282] = "%1d", -- CB WPN PWR RIGHT INBD, ON/OFF {1.0, 0.0}
|
||||
[283] = "%1d", -- CB WPN PWR LEFT OUTBD, ON/OFF {1.0, 0.0}
|
||||
[284] = "%1d", -- CB WPN ARMING, ON/OFF {1.0, 0.0}
|
||||
[285] = "%1d", -- CB WPN PWR RIGHT OUTBD, ON/OFF {1.0, 0.0}
|
||||
[286] = "%1d", -- CB JETTISON CONTROL, ON/OFF {1.0, 0.0}
|
||||
[287] = "%1d", -- CB WPN RELEASE, ON/OFF {1.0, 0.0}
|
||||
[288] = "%1d", -- CB WPN MODE SEL & AIM-9-INTLK, ON/OFF {1.0, 0.0}
|
||||
[289] = "%1d", -- CB EMERGENCY ALL JETTISON, ON/OFF {1.0, 0.0}
|
||||
[290] = "%1d", -- CB LEFT AIM-9 CONT, ON/OFF {1.0, 0.0}
|
||||
[291] = "%1d", -- CB RIGHT AIM-9 CONT, ON/OFF {1.0, 0.0}
|
||||
-- Electric system - CB Left Panel
|
||||
[450] = "%1d", -- CB LEFT AIM-9 POWER, ON/OFF {1.0, 0.0}
|
||||
[451] = "%1d", -- CB LEFT GUN FIRING, ON/OFF {1.0, 0.0}
|
||||
[453] = "%1d", -- CB 26 VOLT AC POWER, ON/OFF {1.0, 0.0}
|
||||
[454] = "%1d", -- CB ATTD & HDG REF SYS A, ON/OFF {1.0, 0.0}
|
||||
[455] = "%1d", -- CB CENTRAL AIR DATA COMPUTER, ON/OFF {1.0, 0.0}
|
||||
[456] = "%1d", -- CB ENG IGN L ENG INST & HYD IND, ON/OFF {1.0, 0.0}
|
||||
[457] = "%1d", -- CB RIGHT AIM-9 POWER, ON/OFF {1.0, 0.0}
|
||||
[458] = "%1d", -- CB RIGHT GUN FIRING, ON/OFF {1.0, 0.0}
|
||||
[460] = "%1d", -- CB TRIM CONTROL, ON/OFF {1.0, 0.0}
|
||||
[461] = "%1d", -- CB ATTD & HDG REF SYS B, ON/OFF {1.0, 0.0}
|
||||
[462] = "%1d", -- CB TOTAL TEMP PROBE HTR, ON/OFF {1.0, 0.0}
|
||||
[463] = "%1d", -- CB L ENG AUX DOOR, ON/OFF {1.0, 0.0}
|
||||
[464] = "%1d", -- CB CABIN COND, ON/OFF {1.0, 0.0}
|
||||
[467] = "%1d", -- CB FUEL QTY PRIMARY, ON/OFF {1.0, 0.0}
|
||||
[468] = "%1d", -- CB ATTD & HDG REF SYS C, ON/OFF {1.0, 0.0}
|
||||
[469] = "%1d", -- CB TACAN, ON/OFF {1.0, 0.0}
|
||||
[471] = "%1d", -- CB PYLON TANK FUEL CONT, ON/OFF {1.0, 0.0}
|
||||
[472] = "%1d", -- CB L BOOST CL & TIP TANK FUEL CONT, ON/OFF {1.0, 0.0}
|
||||
[473] = "%1d", -- CB IGNITION INVERTER POWER, ON/OFF {1.0, 0.0}
|
||||
[474] = "%1d", -- CB L ENG START & AB CONT, ON/OFF {1.0, 0.0}
|
||||
[475] = "%1d", -- CB R ENG START & AB CONT, ON/OFF {1.0, 0.0}
|
||||
[476] = "%1d", -- CB UHF COMMAND RADIO, ON/OFF {1.0, 0.0}
|
||||
[477] = "%1d", -- CB LEFT LE FLAP CONT, ON/OFF {1.0, 0.0}
|
||||
[478] = "%1d", -- CB RIGHT LE FLAP CONT, ON/OFF {1.0, 0.0}
|
||||
[479] = "%1d", -- CB LEFT TE FLAP CONT, ON/OFF {1.0, 0.0}
|
||||
[480] = "%1d", -- CB RIGHT TE FLAP CONT & IND, ON/OFF {1.0, 0.0}
|
||||
-- Electric system - CB Right Panel
|
||||
[231] = "%1d", -- CB PITOT HEATER, ON/OFF {1.0, 0.0}
|
||||
[233] = "%1d", -- CB R OIL & HYD IND FUEL QTY SEL, ON/OFF {1.0, 0.0}
|
||||
[234] = "%1d", -- CB CABIN AIR VALVES, ON/OFF {1.0, 0.0}
|
||||
[238] = "%1d", -- CB INST LIGHTS, ON/OFF {1.0, 0.0}
|
||||
[239] = "%1d", -- CB R ENG AUX DOORS, ON/OFF {1.0, 0.0}
|
||||
[244] = "%1d", -- CB CAUTION & WARN LIGHTS-DIM, ON/OFF {1.0, 0.0}
|
||||
[245] = "%1d", -- CB OXY QTY & CANOPY SEAL, ON/OFF {1.0, 0.0}
|
||||
[246] = "%1d", -- CB LDG-TAXI LAMP PWR, ON/OFF {1.0, 0.0}
|
||||
--UHF Radio AN/ARC-164
|
||||
[300] = "%.2f", -- AN/ARC-164, UHF Radio Preset Channel Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, ... 0.15, 0.16, 0.17, 0.18, 0.19}
|
||||
--[327] = "%.1f", -- AN/ARC-164, UHF Radio 100 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3}
|
||||
--[328] = "%.1f", -- AN/ARC-164, UHF Radio 10 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[329] = "%.1f", -- AN/ARC-164, UHF Radio 1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[330] = "%.1f", -- AN/ARC-164, UHF Radio 0.1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[331] = "%.2f", -- AN/ARC-164, UHF Radio 0.025 MHz Frequency Selector Knob {0.0, 0.25, 0.5, 0.75}
|
||||
[307] = "%.1f", -- AN/ARC-164, UHF Radio Frequency Mode Selector Switch, MANUAL/PRESET/GUARD {0.0, 0.1, 0.2}
|
||||
[311] = "%.1f", -- AN/ARC-164, UHF Radio Function Selector Switch, OFF/MAIN/BOTH/ADF {0.0, 0.1, 0.2}
|
||||
[310] = "%1d", -- AN/ARC-164, UHF Radio Tone Button
|
||||
[308] = "%1d", -- AN/ARC-164, UHF Radio Squelch Switch, ON/OFF
|
||||
[309] = "%.1f", -- AN/ARC-164, UHF Radio Volume Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[336] = "%.1f", -- AN/ARC-164, UHF Radio Antenna Selector Switch, UPPER/AUTO/LOWER {0.0, 0.5, 1.0}
|
||||
[135] = "%1d", -- AN/ARC-164, UHF Radio Microphone Button
|
||||
--TACAN
|
||||
[256] = "%.1f", -- TACAN Channel Selector (Tens) - Rotate mouse wheel to select (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[257] = "%.1f", -- TACAN Channel Selector (Ones) / X/Y Mode - Right mouse click to select X/Y. Rotate mouse wheel to make channel selection (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[258] = "%.2f", -- TACAN Channel Selector (Ones) / X/Y Mode - Right mouse click to select X/Y. Rotate mouse wheel to make channel selection (Button) {0.87, 0.93}
|
||||
[259] = "%1d", -- TACAN Signal on HSI Test Button
|
||||
[261] = "%1d", -- TACAN Signal Volume Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[262] = "%.1f", -- TACAN Mode Selector Switch {0.0, 0.1, 0.2, 0.3, 0.4}
|
||||
-- Sight Camera
|
||||
[82] = "%.1f", -- Sight Camera Lens f-Stop Selector, 2.8(dull)..22(bright) (Axis) {0.0, 0.3} in 0.1 Steps
|
||||
[80] = "%1d", -- Sight Camera FPS Select Switch, 24/48
|
||||
[84] = "%.1f", -- Sight Camera Overrun Selector, 0/3/10/20 {0.0, 0.1, 0.2, 0.3}
|
||||
[79] = "%1d" -- Sight Camera Run (Test) Switch, ON/OFF
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--[443] = "%.4f", -- SAI_knob_arrow {-1.0, 1.0} {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(443, ExportScript.Tools.negate(mainPanelDevice:get_argument_value(443)))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
--AN/ARC-164 UHF
|
||||
---------------------------------------------------
|
||||
local lUHFRadio = GetDevice(23)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2000, string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy(lUHFRadio:get_frequency()/1000000))
|
||||
|
||||
local lUHFRadio_PRESET = {[0]="01",[0.05]="02",[0.1]="03",[0.15]="04",[0.2]="05",[0.25]="06",[0.3]="07",[0.35]="08",[0.4]="09",[0.45]="10",[0.5]="11",[0.55]="12",[0.6]="13",[0.65]="14",[0.7]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20"}
|
||||
ExportScript.Tools.SendData(2001, lUHFRadio_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(300), 2)])
|
||||
end
|
||||
|
||||
--[327] = "%.1f", -- AN/ARC-164, UHF Radio 100 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3}
|
||||
--[328] = "%.1f", -- AN/ARC-164, UHF Radio 10 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[329] = "%.1f", -- AN/ARC-164, UHF Radio 1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[330] = "%.1f", -- AN/ARC-164, UHF Radio 0.1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[331] = "%.2f", -- AN/ARC-164, UHF Radio 0.025 MHz Frequency Selector Knob {0.0, 0.25, 0.5, 0.75}
|
||||
--F5E_UHF
|
||||
--327: 0.0=A, 0.1=3, 0.2=2, 0.3=T
|
||||
--1: 0.0=A, 0.1=T, 0.2=2, 0.3=3
|
||||
|
||||
--328: 0.0=0, 0.1=9, 0.2=8, 0.3=7, 0.4=6, 0.5=5, 0.6=4, 0.7=3, 0.8=2, 0.9=1, 1.0=0
|
||||
--2: 0.0=0, 0.1=1, 0.2=2, 0.3=3, 0.4=4, 0.5=5, 0.6=6, 0.7=7, 0.8=8, 0.9=9, 1.0=0
|
||||
|
||||
--329: 0.0=0, 0.1=9, 0.2=8, 0.3=7, 0.4=6, 0.5=5, 0.6=4, 0.7=3, 0.8=2, 0.9=1, 1.0=0
|
||||
--3: 0.0=0, 0.1=1, 0.2=2, 0.3=3, 0.4=4, 0.5=5, 0.6=6, 0.7=7, 0.8=8, 0.9=9, 1.0=0
|
||||
|
||||
--330: 0.0=0, 0.1=9, 0.2=8, 0.3=7, 0.4=6, 0.5=5, 0.6=4, 0.7=3, 0.8=2, 0.9=1, 1.0=0
|
||||
--4: 0.0=0, 0.1=1, 0.2=2, 0.3=3, 0.4=4, 0.5=5, 0.6=6, 0.7=7, 0.8=8, 0.9=9, 1.0=0
|
||||
|
||||
--331: 0.0=00, 0.25=75, 0.5=50, 0.75=25, 1.0=00
|
||||
--5: 0.0=00, 0.25=25, 0.5=50, 0.75=75
|
||||
|
||||
local lTmp327 = tonumber(string.format("%0.1f", mainPanelDevice:get_argument_value(327)))
|
||||
local lTmp327_2 = lTmp327
|
||||
if lTmp327 == 0.0 then lTmp327_2 = 0.0
|
||||
elseif lTmp327 == 0.1 then lTmp327_2 = 0.3
|
||||
elseif lTmp327 == 0.2 then lTmp327_2 = 0.2
|
||||
elseif lTmp327 == 0.3 then lTmp327_2 = 0.1
|
||||
else lTmp327_2 = lTmp327 end
|
||||
|
||||
local lTmp328_2 = 1 - mainPanelDevice:get_argument_value(328)
|
||||
local lTmp329_2 = 1 - mainPanelDevice:get_argument_value(329)
|
||||
local lTmp330_2 = 1 - mainPanelDevice:get_argument_value(330)
|
||||
|
||||
local lTmp331 = mainPanelDevice:get_argument_value(331)
|
||||
local lTmp331_2 = 0
|
||||
if lTmp331 == 0.0 then lTmp331_2 = 0.0
|
||||
elseif lTmp331 == 0.25 then lTmp331_2 = 0.75
|
||||
elseif lTmp331 == 0.5 then lTmp331_2 = 0.5
|
||||
elseif lTmp331 == 0.75 then lTmp331_2 = 0.25
|
||||
else lTmp331_2 = lTmp331 end
|
||||
|
||||
ExportScript.Tools.SendData(327, lTmp327_2)
|
||||
ExportScript.Tools.SendData(328, lTmp328_2)
|
||||
ExportScript.Tools.SendData(329, lTmp329_2)
|
||||
ExportScript.Tools.SendData(330, lTmp330_2)
|
||||
ExportScript.Tools.SendData(331, lTmp331_2)
|
||||
|
||||
|
||||
-- TACAN Channel
|
||||
-------------------------------------------------
|
||||
ExportScript.Tools.SendData(2002, (string.format("%0.2f", (mainPanelDevice:get_argument_value(263))) == "1.00" and "0" or "1")..ExportScript.Tools.round(mainPanelDevice:get_argument_value(264) * 10, 0)..ExportScript.Tools.round(mainPanelDevice:get_argument_value(265) * 10, 0)..(string.format("%1d", (mainPanelDevice:get_argument_value(266))) == "0" and "X" or "Y"))
|
||||
--[266] = "%.4f", -- XYwheel
|
||||
ExportScript.Tools.SendData(266, mainPanelDevice:get_argument_value(266) == 0 and 0 or 1)
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--AN/ARC-164 UHF
|
||||
---------------------------------------------------
|
||||
local lUHFRadio = GetDevice(23)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC(2000, string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC(2000, ExportScript.Tools.RoundFreqeuncy(lUHFRadio:get_frequency()/1000000))
|
||||
|
||||
local lUHFRadio_PRESET = {[0]="01",[0.05]="02",[0.1]="03",[0.15]="04",[0.2]="05",[0.25]="06",[0.3]="07",[0.35]="08",[0.4]="09",[0.45]="10",[0.5]="11",[0.55]="12",[0.6]="13",[0.65]="14",[0.7]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20"}
|
||||
ExportScript.Tools.SendDataDAC(2001, lUHFRadio_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(300), 2)])
|
||||
end
|
||||
|
||||
-- TACAN Channel
|
||||
-------------------------------------------------
|
||||
ExportScript.Tools.SendDataDAC(2002, (string.format("%0.2f", (mainPanelDevice:get_argument_value(263))) == "1.00" and "0" or "1")..ExportScript.Tools.round(mainPanelDevice:get_argument_value(264) * 10, 0)..ExportScript.Tools.round(mainPanelDevice:get_argument_value(265) * 10, 0)..(string.format("%1d", (mainPanelDevice:get_argument_value(266))) == "0" and "X" or "Y"))
|
||||
|
||||
-- Fuel Quantity Indicator (Dual)
|
||||
local lLeftFuel = ExportScript.Tools.round(mainPanelDevice:get_argument_value(22) * 2500, 0)
|
||||
local lRightFuel = ExportScript.Tools.round(mainPanelDevice:get_argument_value(23) * 2500, 0)
|
||||
|
||||
ExportScript.Tools.SendDataDAC(2003, lLeftFuel)
|
||||
ExportScript.Tools.SendDataDAC(2004, lRightFuel)
|
||||
ExportScript.Tools.SendDataDAC(2005, lLeftFuel + lRightFuel)
|
||||
|
||||
-- generic Radio display and frequency rotarys
|
||||
-------------------------------------------------
|
||||
-- genericRadioConf
|
||||
ExportScript.genericRadioConf = {}
|
||||
ExportScript.genericRadioConf['maxRadios'] = 1 -- numbers of aviables/supported radios
|
||||
ExportScript.genericRadioConf[1] = {} -- first radio
|
||||
ExportScript.genericRadioConf[1]['Name'] = "AN/ARC-164 UHF" -- name of radio
|
||||
ExportScript.genericRadioConf[1]['DeviceID'] = 23 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[1]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[1]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[1]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[1]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[1]['minFrequency'] = 220.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[1]['maxFrequency'] = 399.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[1]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[1]['Power']['ButtonID'] = 3008 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.1 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Volume'] = {} -- volume knob active
|
||||
ExportScript.genericRadioConf[1]['Volume']['ButtonID'] = 3011 -- volume button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Preset'] = {} -- preset knob active
|
||||
ExportScript.genericRadioConf[1]['Preset']['ArgumentID'] = 300 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
ExportScript.genericRadioConf[1]['Preset']['List'] = {[0.0]="01",[0.1]="02",[0.2]="03",[0.3]="04",[0.4]="05",[0.5]="06",[0.6]="07",[0.7]="08",[0.8]="09",[0.9]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20"}
|
||||
ExportScript.genericRadioConf[1]['Preset']['Step'] = 0.1 -- minimal step for preset change
|
||||
ExportScript.genericRadioConf[1]['Squelch'] = {} -- squelch switch active
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ArgumentID'] = 308 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ButtonID'] = 3010 -- squelch button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ValueOff'] = 1.0 -- squelch off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Load'] = {} -- load button preset
|
||||
--ExportScript.genericRadioConf[1]['Load']['ButtonID'] = 3015 -- load button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['ManualPreset'] = {} -- switch manual or preset active
|
||||
ExportScript.genericRadioConf[1]['ManualPreset']['ArgumentID'] = 307 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['ManualPreset']['ButtonID'] = 3007 -- ManualPreset button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['ManualPreset']['ValueManual'] = 0.0-- ManualPreset Manual value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['ManualPreset']['ValuePreset'] = 0.1-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
405
Scripts/DCS-ExportScript/ExportsModules/F-86F Sabre.lua
Normal file
405
Scripts/DCS-ExportScript/ExportsModules/F-86F Sabre.lua
Normal file
@@ -0,0 +1,405 @@
|
||||
-- F-86 Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.F86 = "1.2.1"
|
||||
--ExportScript.NoLuaExportBeforeNextFrame = true
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Mechanic clock
|
||||
[19] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0} = {0.0, 1.0}
|
||||
[18] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0} = {0.0, 1.0}
|
||||
--[37] = "%.4f", -- CLOCK_currtime_seconds {0.0, 60.0} = {0.0, 1.0}
|
||||
--[56] = "%.4f", -- CLOCK_flight_time_meter_status {0.0, 0.2} = {0.0, 1.0}
|
||||
--[52] = "%.4f", -- CLOCK_flight_hours {0.0, 12.0} = {0.0, 1.0}
|
||||
--[53] = "%.4f", -- CLOCK_flight_minutes {0.0, 60.0} = {0.0, 1.0}
|
||||
[37] = "%.4f", -- CLOCK_seconds_meter_time_minutes {0.0, 60.0} = {0.0, 1.0}
|
||||
[1006] = "%.4f", -- CLOCK_seconds_meter_time_seconds {0.0, 60.0} = {0.0, 1.0}
|
||||
-- flight gauge
|
||||
-- Airspeeed
|
||||
[178] = "%.4f", -- Airspeeed {0.0, 25.7, 180.06, 334.4} = {0.0, 0.019, 0.494, 0.965}
|
||||
[709] = "%.4f", -- AirspeeedDrum {0.0, 51.4444444} = {0.0, 1.0}
|
||||
[8] = "%.4f", -- AirspeeedM1 {0.0, 25.7, 51.444, 308.67, 334.4} = {0.0, 0.02, 0.1, 0.6, 0.697}
|
||||
-- Altimeter
|
||||
[707] = "%.4f", -- Altimeter10000 {0 ,30480} = {0 ,1}
|
||||
[523] = "%.4f", -- Altimeter1000 {0 ,3048} = {0 ,1}
|
||||
[524] = "%.4f", -- Altimeter100 {0 ,304.8} = {0 ,1}
|
||||
[700] = "%.4f", -- AltimeterHG {0 , 91.44} = {0 ,1}
|
||||
-- Variometer
|
||||
[24] = "%.4f", -- Variometer {-30.48, -10.16, -5.08, 0.0, 5.08, 10.16, 30.48} = {-1.0, -0.5, -0.29, 0.0, 0.29, 0.5, 1.0}
|
||||
-- MachNumber
|
||||
[179] = "%.4f", -- MachNumber {0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5} = {0.0515, 0.0855, 0.122, 0.161, 0.203, 0.248, 0.295, 0.342, 0.3915, 0.441, 0.493, 0.597, 0.699, 0.796, 0.883, 0.965}
|
||||
-- TurnIndicator
|
||||
[25] = "%.4f", -- TurnIndicator {-1.0, 1.0}
|
||||
-- SlipIndicator
|
||||
[31] = "%.4f", -- SlipIndicator {-1.0, 1.0}
|
||||
-- Accelerometer
|
||||
[6] = "%.4f", -- Accelerometer {-5.0, 0.0, 10.0} {0.0, 0.334, 1.0}
|
||||
[1003] = "%.4f", -- AccelerometerMin {-5.0, 0.0, 10.0} {0.0, 0.334, 1.0}
|
||||
[1002] = "%.4f", -- AccelerometerMax {-5.0, 0.0, 10.0} {0.0, 0.334, 1.0}
|
||||
-- GyroCompass
|
||||
[711] = "%.4f", -- GyroCompassNeedle {1.0, 0.0}
|
||||
[712] = "%.4f", -- GyroCompassScale {0.0, 1.0}
|
||||
-- AttitudeIndicator
|
||||
[713] = "%.4f", -- AttitudeIndicatorOffFlag {0.0, 1.0} = {1.0, 0.0}
|
||||
[605] = "%.4f", -- AttitudeIndicatorPitch {-0.27, 0.27}
|
||||
[606] = "%.4f", -- AttitudeIndicatorBank {1.0, -1.0}
|
||||
[81] = "%.4f", -- AttitudeIndicatorPitchSphere {-1.0, 1.0}
|
||||
[1005] = "%.4f", -- AttitudeIndicatorBankNeedle {1.0, -1.0}
|
||||
-- engine gauges
|
||||
-- Tachometer
|
||||
[16] = "%.4f", -- Tachometer {0.0, 0.5, 0.504, 1.1} = {0.012, 0.482, 0.5, 1.0}
|
||||
-- ExhaustTemperature
|
||||
[12] = "%.4f", -- ExhaustTemperature {0.0, 1000.0} = {0.0, 1.0}
|
||||
-- OilPressure
|
||||
[112] = "%.4f", -- OilPressure {0.0, 100.0} = {0.023, 1.0}
|
||||
-- FuelFlow
|
||||
[531] = "%.4f", -- FuelFlow {0.0, 1.2599} = {0.0, 1.0}
|
||||
-- electric system
|
||||
[601] = "%.4f", -- VoltageDC {0.0, 30.0} = {0.0, 0.3}
|
||||
[602] = "%.4f", -- Loadmeter {0.0, 400.0} = {0.0, 1.0}
|
||||
-- hydraulic system
|
||||
[109] = "%.4f", -- HydPress {0.0, 1.0} = {0.0, 1.0}
|
||||
-- fuel system
|
||||
[22] = "%.4f", -- FuelQuantity {-500.0, 0.0, 45.36, 226.8, 453.6, 907.2, 1360.8, 1451.5} = {-1.0, 0.0, 0.012, 0.141, 0.31, 0.625, 0.938, 1.0}
|
||||
-- oxygen system
|
||||
[353] = "%.4f", -- OxygenPressure {0.0, 500.0} = {0, 1}
|
||||
[705] = "%.1f", -- OxygenFlowBlinker {0.0, 1.0}
|
||||
-- air system
|
||||
[114] = "%.4f", -- CockpitAltimeter {0.0, 15240.0} = {0.0, 1.0}
|
||||
-- radio compass
|
||||
[804] = "%.4f", -- ARN6_Band {0.0, 3.0} = {0.0, 1.0}
|
||||
[800] = "%.4f", -- ARN6_TuningMeter {0.0, 1.0}
|
||||
[801] = "%.4f", -- ARN6_Tuning {0.0, 0.2} = {0.0, 1.0}
|
||||
[600] = "%.4f", -- ARN6_Bearing {0.0, 1.0}
|
||||
[814] = "%.4f", -- ARN6_Scale {1.0, 0.0}
|
||||
[830] = "%.4f", -- ARN6_FreqScale {0.0, 1.0}
|
||||
[219] = "%.4f", -- ARN6_ScaleLight {0.0, 1.0}
|
||||
-- light system
|
||||
[182] = "%.f", -- IlluminationLights {0.0, 1.0}
|
||||
[825] = "%.f", -- StandByCompassLight {0.0, 1.0}
|
||||
[180] = "%.f", -- PrimaryInstLights {0.0, 1.0}
|
||||
[185] = "%.f", -- AuxiliaryInstrumentLights {0.0, 1.0}
|
||||
[222] = "%.4f", -- LandingGearUnsafe {0.0, 1.0}
|
||||
--
|
||||
[603] = "%.4f", -- LABS_roll_needle {-1.0, 1.0}
|
||||
[604] = "%.4f", -- LABS_pitch_needle {-1.0, 1.0}
|
||||
--
|
||||
[818] = "%.4f", -- EmergencyJettisonHandlePos {0.0, 1.0}
|
||||
[221] = "%.4f", -- EmergencyJettisonHandleRot {0.0, 1.0}
|
||||
-- LAMPS
|
||||
-- electric system
|
||||
[617] = "%.f", -- lamp_ELEC_GenOff {-1.0, 1.0}
|
||||
[610] = "%.f", -- lamp_ELEC_MainInstInverterOffSelectAlt {-1.0, 1.0}
|
||||
[611] = "%.f", -- lamp_ELEC_BothInstInvertersOff {-1.0, 1.0}
|
||||
[612] = "%.f", -- lamp_ELEC_MainRadarInverterOff {-1.0, 1.0}
|
||||
-- hydraulic system
|
||||
[614] = "%.f", -- lamp_HYDRO_AltFltContSysOper {-1.0, 1.0}
|
||||
[39] = "%.f", -- lamp_HYDRO_LeftGear {-1.0, 1.0}
|
||||
[41] = "%.f", -- lamp_HYDRO_RightGear {-1.0, 1.0}
|
||||
[40] = "%.f", -- lamp_HYDRO_NoseGear {-1.0, 1.0}
|
||||
-- fuel system
|
||||
[625] = "%.f", -- lamp_FUEL_OutbdTanksEmpty {-1.0, 1.0}
|
||||
-- fire detection system
|
||||
[615] = "%.f", -- lamp_FIRE_DETECTION_FwdFireWarning {-1.0, 1.0}
|
||||
[616] = "%.f", -- lamp_FIRE_DETECTION_AftFireWarning {-1.0, 1.0}
|
||||
-- control system
|
||||
[613] = "%.f", -- lamp_CONTROL_TakeOffPosInd {-1.0, 1.0}
|
||||
-- air system
|
||||
[614] = "%.f" -- lamp_WindshieldAntiIceOverheatWarning {-1.0, 1.0}
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- cockpit mechanics
|
||||
[718] = "%.1f", -- Canopy Switch, OPEN/OFF/CLOSE {-1.0, 0.0, 1.0}
|
||||
[818] = "%.1f", -- Emergency Jettison Handle, IN/OUT {0.0, 1.0}
|
||||
[817] = "%.1f", -- Canopy Alternate Emergency Jettison Handle, IN/OUT {0.0, 1.0}
|
||||
[816] = "%.1f", -- Canopy Declutch Handle, IN/OUT {0.0, 1.0}
|
||||
-- electric
|
||||
[653] = "%1d", -- Battery-Starter Switch, BATTERY/OFF/STARTER {-1, 1}
|
||||
[643] = "%.1f", -- Instrument Power Switch, ALTERNATE/NORMAL {-1.0, 1.0}
|
||||
[664] = "%.1f", -- Stop-Starter Button (Push to de-energize starter in case of malfunction) {0.0, 1.0}
|
||||
[652] = "%1d", -- Engine Master Switch, ON/OFF {1}
|
||||
[670] = "%.1f", -- Generator Switch, ON/OFF/RESET {1}
|
||||
[687] = "%1d", -- Generator Warning Light (Push To Test) {1}
|
||||
[680] = "%1d", -- Main Instrument (Three-phase) Inverter Failure Warning Light (Push to test) {1}
|
||||
[681] = "%1d", -- Both Instrument (Main and alternate three-phase) Inverter Failure Warning Light (Push to test) {1}
|
||||
[682] = "%1d", -- Main Radar (Single-phase) Inverter Failure Warning Light (Push to test) {1}
|
||||
-- Circuit Breaker (left panel)
|
||||
[760] = "%1d", -- Bomb Rocket Tank Salvo {0, 1}
|
||||
[761] = "%1d", -- Bomb Sel. {0, 1}
|
||||
[762] = "%1d", -- Gyr'Syn Compass {0, 1}
|
||||
[763] = "%1d", -- 3f Inverter {0, 1}
|
||||
[764] = "%1d", -- Turn Bank Ind. {0, 1}
|
||||
[765] = "%1d", -- Rudder Trim & Take-Off Ind. {0, 1}
|
||||
[766] = "%1d", -- Alt Ail. Trim {0, 1}
|
||||
[767] = "%1d", -- Ail & Horiz. Trim & Alt Horiz. Trim {0, 1}
|
||||
[768] = "%1d", -- LDG Light Control {0, 1}
|
||||
[769] = "%1d", -- LDG Lights {0, 1}
|
||||
[770] = "%1d", -- Fire Warn. {0, 1}
|
||||
[771] = "%1d", -- Bus Tie-In Control {0, 1}
|
||||
[772] = "%1d", -- Speed Brake {0, 1}
|
||||
[773] = "%1d", -- Free Air & Oil Temp & Air Sel. {0, 1}
|
||||
[774] = "%1d", -- LDG Gear Warn. {0, 1}
|
||||
[775] = "%1d", -- LDG Gear Control {0, 1}
|
||||
[776] = "%1d", -- LDG Gear Pos Ind. {0, 1}
|
||||
[777] = "%1d", -- Fuel Booster AFT {0, 1}
|
||||
[778] = "%1d", -- Alt Emerg. Hyd. Cont. & Hyd. Press Ind. {0, 1}
|
||||
[779] = "%1d", -- Sight Power {0, 1}
|
||||
[780] = "%1d", -- Sight Heater {0, 1}
|
||||
[781] = "%1d", -- Sight A.C. Power Unit {0, 1}
|
||||
[782] = "%1d", -- AN/ARN-6 Radio Compass {0, 1}
|
||||
-- Circuit Breaker (right panel)
|
||||
[783] = "%1d", -- Eng. Master Fuel Shut-Off {0, 1}
|
||||
[784] = "%1d", -- Eng. Ign. {0, 1}
|
||||
[785] = "%1d", -- Fuel Level {0, 1}
|
||||
[786] = "%1d", -- Inv Gen. Failure Overvolt LTS Test {0, 1}
|
||||
[787] = "%1d", -- Light Post IndCode {0, 1}
|
||||
[788] = "%1d", -- Console & Ped LTS {0, 1}
|
||||
[789] = "%1d", -- Fuel Boost FWD {0, 1}
|
||||
[790] = "%1d", -- Wing Flap LH. {0, 1}
|
||||
[791] = "%1d", -- Wing Flap RH. {0, 1}
|
||||
[792] = "%1d", -- Light Fluor {0, 1}
|
||||
[793] = "%1d", -- Sight Control {0, 1}
|
||||
[794] = "%1d", -- AN/APC 3 Radio {0, 1}
|
||||
[795] = "%1d", -- AN/APX-6 Radio IFF {0, 1}
|
||||
-- Hydraulic Interface
|
||||
[599] = "%1d", -- Landing Gear Handle, UP/DOWN {1, 0}
|
||||
[710] = "%1d", -- Landing Gear Emergency-up Button (Ground-use only! Hold in until gear retracts completely) {1}
|
||||
[631] = "%1d", -- Hydraulic Pressure Gage and Selector Switch, UTILITY/NORMAL/ALTERNATE {1}
|
||||
[641] = "%1d", -- Speed Brake Emergency Lever {1, 0}
|
||||
[684] = "%1d", -- Alternate-on Warning Light (Push to test) {1}
|
||||
[706] = "%1d", -- Alternate Hydraulic Emergency Override Handle, IN/OUT {1, -1}
|
||||
[647] = "%1d", -- Flight Control Switch, ALTERNATE ON/NORMAL/RESET {1}
|
||||
[815] = "%1d", -- Landing Gear Warning Horn Cutout Button (Push to silence horn) {1}
|
||||
[819] = "%.4f", -- Landing Gear Emergency Release Handle (rotary) {0.0,1.0} in 0.1 steps
|
||||
[211] = "%1d", -- Speed Brake Switch, OUT/HOLD/IN {-1.0,0.0,1.0}
|
||||
[217] = "%1d", -- Parking Brake Handle, ON/OFF
|
||||
-- Fuel Interface
|
||||
[672] = "%1d", -- Fuel Densitometer Selection Switch, IN/OUT {2, -2}
|
||||
[662] = "%.1f", -- Drop Tank Selector Switch {-0.1, 0.1}
|
||||
[701] = "%1d", -- Drop Tank Jettison Button - Push to release drop tank(s) {1}
|
||||
[695] = "%1d", -- Outboard Drop Tank Empty Indicator Light (Push to test) {1}
|
||||
-- Oxygen Interface
|
||||
[703] = "%1d", -- Oxygen Regulator Diluter Lever, NORMAL OXYGEN/100% OXYGEN {1, -1}
|
||||
[704] = "%.4f", -- Oxygen Regulator Supply Lever (rotary) {0.0 to 1.0} in -0.5 steps
|
||||
-- Fire Detection Interface
|
||||
[635] = "%1d", -- Engine Fire Warning Light Test Button {1,- 1}
|
||||
[685] = "%1d", -- Forward Engine Compartment Fire-warning Light (Push to test) {1}
|
||||
[686] = "%1d", -- Aft Engine Compartment Fire-warning Light (Push to test) {1}
|
||||
-- Air Interface
|
||||
[650] = "%1d", -- Cockpit Pressure Control Switch, PRESS/RAM {2, -2}
|
||||
[651] = "%1d", -- Cockpit Pressure Schedule Selector Switch, 5 PSI/2.75 PSI {2, -2}
|
||||
[646] = "%1d", -- Pitot Heater Switch, ON/OFF {2, -2}
|
||||
[740] = "%.4f", -- Cockpit Air Temperature Control Rheostat (rotary) {0.0, 1.0} in 0.3 steps
|
||||
--[736] = "%1d", -- Cockpit Air Temperature Control Switch Cover {1, -1}
|
||||
[737] = "%.1f", -- Cockpit Air Temperature Control Switch, AUTO/OFF/HOT/COLD {-1.0, 1.0}
|
||||
[645] = "%.1f", -- Engine Anti-Ice & Screen Switch, EXTEND/RET./ANTI-ICE {-1.0, 1.0}
|
||||
[741] = "%1d", -- Air Outlet Selector Lever, FLOOR/BOTH/DEFROST {-1, 1}
|
||||
[691] = "%1d", -- Windshield Anti-Ice Overheat Warning Light
|
||||
[202] = "%.4f", -- Windshield Anti-Icing Lever (rotary) {0.0,1.0} in 0.1 steps
|
||||
-- Light Interface
|
||||
[654] = "%1d", -- Compass Light Switch, ON/OFF {2, -2}
|
||||
[813] = "%.1f", -- Instrument Panel Primary Light Rheostat (rotary) {0.0, 1.0} in 0.5 steps
|
||||
[811] = "%.1f", -- Instrument Panel Auxiliary Light Rheostat (rotary) {0.0, 1.0} in 0.5 steps
|
||||
[812] = "%.1f", -- Console and Panel Light Rheostat (rotary) {0.0, 1.0} in 0.5 steps
|
||||
-- Nav Lights Interface
|
||||
[661] = "%.1f", -- Landing & Taxi Lights Switch, EXTEND&ON/OFF/RETRACT {-1.0, 0.0, 1.0}
|
||||
[656] = "%.1f", -- Position and Fuselage Light Selector Switch, STEADY/OFF/FLASH {-1.0, 0.0, 1.0}
|
||||
[655] = "%1d", -- Exterior Lighting Dimmer Switch, BRIGHT/DIM {2, -2}
|
||||
-- Engine Interface
|
||||
[630] = "%1d", -- Emergency Fuel Switch, ON/OFF {2, -2}
|
||||
--[732] = "%1d", -- Emergency (In-air) Ignition Switch Cover {1, -1}
|
||||
[733] = "%.1f", -- Emergency (In-air) Ignition Switch, ON/OFF {1.0, 1.0}
|
||||
-- Control Interface
|
||||
[649] = "%.1f", -- Lateral Alternate Trim Switch, LEFT/RIGHT/NORMAL/OFF {0.3, 0.5, 0.1, 0.0}
|
||||
[648] = "%.1f", -- Rudder Trim Switch, LEFT/OFF/RIGHT {1.0, -1.0}
|
||||
--[738] = "%1d", -- Longitudinal Alternate Trim Switch Cover {1, -1}
|
||||
[739] = "%.1f", -- Longitudinal Alternate Trim Switch, NORMAL GRIP CONT/NOSE UP/NOSE DOWN/OFF {0.5, 0.3, 0.1, 0.0}
|
||||
[683] = "%1d", -- Take-off (Trim) Position Indicator Light (Push to test) {1}
|
||||
[735] = "%1d", -- Wing Flaps Handle {-1, 1}
|
||||
[209] = "%1d", -- Nose Wheel Steering Button
|
||||
-- radio ARC-27
|
||||
[806] = "%.4f", -- AN/ARC-27 UHF Audio Volume Knob (rotary) {0.1, 0.9} in 0.5 steps
|
||||
[807] = "%.1f", -- AN/ARC-27 UHF Preset Channel Selector {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8}
|
||||
[805] = "%.1f", -- AN/ARC-27 UHF Power Switch, OFF/T/R/T/R + G REC/ADF {0.0, 0.1, 0.2, 0.3}
|
||||
[213] = "%1d", -- Microphone Button
|
||||
-- radio compass ARN-6
|
||||
[802] = "%.4f", -- AN/ARN-6 Audio Volume Control (rotary) {0.1, 0.9} in 0.5 steps
|
||||
[803] = "%.1f", -- AN/ARN-6 Frequency Band Switch {0.0, 0.1, 0.2, 0.3}
|
||||
[667] = "%.1f", -- AN/ARN-6 Function Selector Switch, OFF/COMP/ANT./LOOP/CONT. {0.0, 0.1, 0.2, 0.3, 0.4}
|
||||
[666] = "%.1f", -- AN/ARN-6 LOOP L-R Switch {-1.0, 0.0, 1.0}
|
||||
--[null] = "%.4f", -- AN/ARN-6 Tuning Crank {0.0, 1.0} in 0.01 steps
|
||||
[657] = "%.1f", -- AN/ARN-6 Scale Light Switch, HI/OFF/LO {-0.1, 0.0, 0.1}
|
||||
[826] = "%.4f", -- AN/ARN-6 East/West Variation Knob (rotary) {0.0, 1.0} in 0.05 steps
|
||||
[658] = "%.1f", -- AN/ARN-6 CW-VOICE Switch, CW/VOICE {1.0, -1.0}
|
||||
-- IFF APX-6
|
||||
[810] = "%.1f", -- AN/APX-6 IFF Master Switch, EMERGENCY/NORM/LOW/STDBY/OFF {0.0, 0.1, 0.2, 0.3, 0.4}
|
||||
[659] = "%.1f", -- AN/APX-6 IFF Mode 2 Switch, MODE 2/OUT/I/P {-0.1, 0.0, 0.1}
|
||||
[660] = "%.1f", -- AN/APX-6 IFF Mode 3 Switch, MODE 3/OUT {0.0, 0.1}
|
||||
--[808] = "%1d", -- AN/APX-6 IFF Destruct Switch Cover {1, -1}
|
||||
[809] = "%1d", -- AN/APX-6 IFF Destruct Switch, OFF/ON {0, -1}
|
||||
-- baro altimeter
|
||||
[218] = "%.4f", -- Altimeter reference pressure adjusting knob (rotary) {0.0, 1.0} in 0.1 steps
|
||||
-- gyromag compass
|
||||
--[null] = "%.4f", -- Compass Correction (rotary) {0.0, 1.0} in 0.05 steps
|
||||
[598] = "%.1f", -- Directional Indicator Fast Slaving Button {0.0, 1.0}
|
||||
-- attitude indicator
|
||||
[714] = "%.1f", -- Pull to Cage Knob {0.0, 1.0}
|
||||
-- accelerometer
|
||||
[1004] = "%.1f", -- Accelerometer Reset Button {0.0, 1.0}
|
||||
-- CLOCK
|
||||
--[null] = "%1d", -- Set Clock Knob
|
||||
[831] = "%1d", -- Elapsed Time Mechanism Button {0, 1}
|
||||
-- A4 Gun Sight
|
||||
[716] = "%.4f", -- A-4 Sight Wing Span Adjustment Knob (rotary) {0.0, 1.0} in 0.1 steps
|
||||
[715] = "%.4f", -- A-4 Sight Radar Range Sweep Rheostat (rotary) {0.0, 1.0} in 0.1 steps
|
||||
[734] = "%.4f", -- A-4 Sight Reticle Dimmer Control (rotary) {0, 0.74} in -0.2 steps
|
||||
[755] = "%1d", -- A-4 Sight Mechanical Caging Lever, CAGE/UNCAGE {0, 1}
|
||||
[755] = "%.4f", -- A-4 Sight Mechanical Caging Lever, CAGE/UNCAGE (rotary) {0.001, 0.999} in 0.1 steps
|
||||
[212] = "%1d", -- A-4 Sight Electrical Caging Button
|
||||
[642] = "%1d", -- A-4 Sight Filament Selector Switch, SECONDARY/PRIMARY {2, -2}
|
||||
[210] = "%.4f", -- A-4 Sight Rotating Grip - Mouse Wheel for manual ranging {-1.0,1.0} in 0.2 steps
|
||||
[210] = "%1d", -- A-4 Sight Rotating Grip - Right Click for return to CCW spring-loaded position {1.0}
|
||||
[721] = "%.1f", -- Variable Sight Selector Unit - Sight Function Selector Lever, ROCKET/GUN/BOMB {0.0, 0.1, 0.2}
|
||||
[720] = "%.1f", -- Variable Sight Selector Unit - Target Speed Switch, HI/LO {0.0,0.5,1.0}
|
||||
[722] = "%.4f", -- Variable Sight Selector Unit - Rocket Depression Angle Selector (rotary) {0.0, 1.0} in 0.1 steps
|
||||
[727] = "%.4f", -- Bomb-Target Wind Control Knob (rotary) {0.0, 1.0} in 0.6 steps
|
||||
-- weapon system
|
||||
[639] = "", -- Demolition Bomb Release Selector Switch, AUTO RELEASE/MANUAL RELEASE {2,-2}
|
||||
[641] = "%.1f", -- Demolition Bomb Arming Switch (Fuze Selection), ARM NOSE&TAIL/OFF/TAIL ONLY {-1.0, 0.0, 1.0}
|
||||
[752] = "%.1f", -- Demolition Bomb Sequence Selector Switch, ALL/OFF/LEFT/RIGHT {0.0, 0.1, 0.2, 0.3, 0.4, 0.5}
|
||||
[638] = "%.1f", -- Rocket Fuze (Arming) Switch, DELAY/OFF/INSTANT {-1.0, 0.0, 1.0}
|
||||
[637] = "%1d", -- Rocket Jettison Switch, READY/OFF {2, -2}
|
||||
--[750] = "%1d", -- Rocket Release Selector Switch Cover {1, -1}
|
||||
[751] = "%.1f", -- Rocket Release Selector Switch, SINGLE/OFF/AUTO {-1.0, 0.0, 1.0}
|
||||
[668] = "%.1f", -- Gun Selector Switch {-0.2, 0.2}
|
||||
[665] = "%.1f", -- Gun-Missile Selector Switch, OFF/SIGHT CAMERA & RADAR/GUNS/MISSILE {0, 0.3}
|
||||
[636] = "%.1f", -- Gun Heater Switch, HEATER/OFF/(N/F) {-1.0, 1.0}
|
||||
[663] = "%1d", -- Manual Pip Control Switch, BOMB/NORMAL {2, -2}
|
||||
[796] = "%.1f", -- Manual Pip Control Change Calibrated Dials (Presets) {0.0, 0.3, 0.6, 0.9}
|
||||
[797] = "%.4f", -- Manual Pip Control Knob (rotary) {0.0, 1.0} in 0.1 steps
|
||||
[729] = "%.4f", -- A-4 Sight Bombing Altimeter Target Altitude Knob (rotary) {0.0, 1.0} in 0.015 steps
|
||||
[731] = "%.4f", -- A-4 Sight Bombing Altimeter Index Altitude Handle (rotary) {0.0, 1.0} in -0.015 steps
|
||||
[632] = "%1d", -- LABS Gyro Caging Switch, UNCAGE/CAGE {2,- 2}
|
||||
[633] = "%1d", -- LABS Start Switch, ON/OFF {2, -2}
|
||||
[634] = "%1d", -- LABS Change-over Switch, LABS/A-4 {2, -2}
|
||||
[702] = "%1d", -- Bomb-Rocket-Tank Jettison Button {0.0, 1.0}
|
||||
[820] = "%.1f", -- Missile Control Switch, LH & RH/RH/SALVO {-1.0, 0.0, 1.0}
|
||||
[821] = "%.4f", -- Tone Volume (rotary) {0.0, 1.0} in 0.1 steps
|
||||
[822] = "%.1f", -- Safe Launch Button {0.0, 1.0}
|
||||
[225] = "%1d", -- G-Limit Light - Push to test
|
||||
[226] = "%.4f", -- G-Limit Light - Rotate to adjust brightness(MW) (rotary) {0.0,0.5} in 0.02 steps
|
||||
[1001] = "%.1f", -- Rocket Intervalometer {0.0, 1.0}
|
||||
[208] = "%1d" -- A-4 Sight Radar Target Selector Button
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {654,813,811,812})
|
||||
-- Compass Light Switch, Instrument Panel Primary Light Rheostat, Instrument Panel Auxiliary Light Rheostat, Console and Panel Light Rheostat
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
746
Scripts/DCS-ExportScript/ExportsModules/FA-18C_hornet.lua
Normal file
746
Scripts/DCS-ExportScript/ExportsModules/FA-18C_hornet.lua
Normal file
@@ -0,0 +1,746 @@
|
||||
-- F/A-18C Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.FA18C_hornet = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Controlls
|
||||
--[71] = "%.4f", -- StickPitch {-1, 0, 0.137, 0.5} {1, 0.12, 0, -0.726}
|
||||
--[74] = "%.4f", -- StickRoll {-1, 1}
|
||||
--[500] = "%.4f", -- Rudder {-1, 1}
|
||||
--[501] = "%.4f", -- LeftWheelBrake
|
||||
--[502] = "%.4f", -- RightWheelBrake
|
||||
--[104] = "%.4f", -- LeftThrottle
|
||||
--[105] = "%.4f", -- RightThrottle
|
||||
--[495] = "%.4f", -- LeftFingerLift
|
||||
--[496] = "%.4f", -- RightFingerLift
|
||||
-- Electric Interface
|
||||
[400] = "%.4f", -- VoltmeterU {16.0, 30.0}{0.0, 1.0}
|
||||
[401] = "%.4f", -- VoltmeterE {16.0, 30.0}{0.0, 1.0}
|
||||
-- Hydraulic Interface
|
||||
[310] = "%.4f", -- HydIndLeft {0.0, 5000.0} {0.0, 1.0}
|
||||
[311] = "%.4f", -- HydIndRight {0.0, 5000.0} {0.0, 1.0}
|
||||
[242] = "%.4f", -- HydIndBrake {0.0, 1000.0, 2000.0, 3000.0, 4000.0, 5000.0}{0.0, 0.036, 0.338, 0.636, 0.924, 1.0}
|
||||
-- Gear Interface
|
||||
[228] = "%.4f", -- EmergGearDownHandle
|
||||
-- [240] = "%.4f", -- EmergParkBrakeHandle delete
|
||||
-- Instruments --------------------------
|
||||
-- Standby Pressure Altimeter AAU-52/A
|
||||
[218] = "%.4f", -- Altimeter_100_footPtr {0.0, 1000.0} {0.0, 1.0}
|
||||
[220] = "%.4f", -- Altimeter_10000_footCount {0.0, 9.0} {0.0, 1.0}
|
||||
[219] = "%.4f", -- Altimeter_1000_footCount {0.0, 9.0} {0.0, 1.0}
|
||||
[221] = "%.4f", -- pressure_setting_0 {0.0, 10.0} {0.0, 1.0}
|
||||
[222] = "%.4f", -- pressure_setting_1 {0.0, 10.0} {0.0, 1.0}
|
||||
[223] = "%.4f", -- pressure_setting_2 {0.0, 10.0} {0.0, 1.0}
|
||||
-- Indicated Airspeed Indicator AVU-35/A
|
||||
[217] = "%.4f", -- Airspeed {0.0, 60.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 750.0, 800.0, 850.0} {0.0, 0.0445, 0.15, 0.348, 0.586, 0.636, 0.673, 0.715, 0.748, 0.782, 0.819, 0.849, 0.870, 0.898, 0.922, 0.950, 0.976, 1.0}
|
||||
-- Vertical Speed Indicator AVU-53/A
|
||||
[225] = "%.4f", -- Variometer {-6000.0, -4000.0, -3000.0, -2000.0, -1000.0, -500.0, 0.0, 500.0, 1000.0, 2000.0, 3000.0, 4000.0, 6000.0} { -1.0, -0.83, -0.73, -0.605, -0.40, -0.22, 0.0, 0.22, 0.40, 0.605, 0.73, 0.83, 1.0}
|
||||
-- Clock
|
||||
[278] = "%.4f", -- CLOCK_currtime_hour {0.0, 12.0} {0.0, 1.0}
|
||||
[279] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0} {0.0, 1.0}
|
||||
[281] = "%.4f", -- CLOCK_elapsed_time_minutes {0.0, 60.0} {0.0, 1.0}
|
||||
[280] = "%.4f", -- CLOCK_elapsed_time_seconds {0.0, 60.0} {0.0, 1.0}
|
||||
-- ID-2163/A
|
||||
[287] = "%.4f", -- Min_Height_Indicator_ID2163A {-0.03, 0.0, 0.5, 0.8, 1.0} {0.0, 0.031, 0.525, 0.802, 0.982}
|
||||
[286] = "%.4f", -- Altitude_Pointer_ID2163A {-10.0, 0.0, 100.0, 200.0, 300.0, 400.0, 600.0, 800.0, 1000.0, 3000.0, 5000.0, 5100.0} {0.0, 0.048, 0.171, 0.296, 0.416, 0.530, 0.616, 0.706, 0.799, 0.886, 0.974, 0.98}
|
||||
[288] = "%.4f", -- OFF_Flag_ID2163A
|
||||
[290] = "%1d", -- Red_Lamp_ID2163A
|
||||
[289] = "%1d", -- Green_Lamp_ID2163A
|
||||
-- SAI
|
||||
[205] = "%.4f", -- SAI_Pitch {-1.0, 1.0}
|
||||
[206] = "%.4f", -- SAI_Bank {-1.0, 1.0}
|
||||
[209] = "%.4f", -- SAI_attitude_warning_flag
|
||||
[210] = "%.4f", -- SAI_manual_pitch_adjustment {0.0, 1.0} {-1.0, 1.0}
|
||||
[207] = "%.4f", -- SAI_SlipBall {-1.0, 1.0}
|
||||
[208] = "%.4f", -- SAI_RateOfTurn {-3.0, 3.0} {-1.0, 1.0}
|
||||
[211] = "%.4f", -- SAI_vertical_pointer {-1.0, 1.0}
|
||||
[212] = "%.4f", -- SAI_horisontal_pointer {-1.0, 1.0}
|
||||
-- Cockpit Pressure Altimeter
|
||||
[285] = "%.4f", -- CockpitPressureAltimeter {0.0, 5000.0, 10000.0, 15000.0, 20000.0, 25000.0, 30000.0, 35000.0, 40000.0, 45000.0, 50000.0} {0.0, 0.117, 0.2245, 0.3225, 0.411, 0.506, 0.609, 0.717, 0.823, 0.914, 1.0}
|
||||
-- Caution Light Indicator Panel
|
||||
[298] = "%1d", -- CPT_LTS_CK_SEAT
|
||||
[299] = "%1d", -- CPT_LTS_APU_ACC
|
||||
[300] = "%1d", -- CPT_LTS_BATT_SW
|
||||
[301] = "%1d", -- CPT_LTS_FCS_HOT
|
||||
[302] = "%1d", -- CPT_LTS_GEN_TIE
|
||||
[303] = "%1d", -- CPT_LTS_SPARE_CTN1
|
||||
[304] = "%1d", -- CPT_LTS_FUEL_LO
|
||||
[305] = "%1d", -- CPT_LTS_FCES
|
||||
[306] = "%1d", -- CPT_LTS_SPARE_CTN2
|
||||
[307] = "%1d", -- CPT_LTS_L_GEN
|
||||
[308] = "%1d", -- CPT_LTS_R_GEN
|
||||
[309] = "%1d", -- CPT_LTS_SPARE_CTN3
|
||||
-- LH Advisory and Threat Warning Indicator Panel
|
||||
[13] = "%1d", -- CPT_LTS_MASTER_CAUTION
|
||||
[10] = "%1d", -- CPT_LTS_FIRE_LEFT
|
||||
[15] = "%1d", -- CPT_LTS_GO
|
||||
[16] = "%1d", -- CPT_LTS_NO_GO
|
||||
[17] = "%1d", -- CPT_LTS_L_BLEED
|
||||
[18] = "%1d", -- CPT_LTS_R_BLEED
|
||||
[19] = "%1d", -- CPT_LTS_SPD_BRK
|
||||
[20] = "%1d", -- CPT_LTS_STBY
|
||||
[21] = "%1d", -- CPT_LTS_L_BAR_RED
|
||||
[22] = "%1d", -- CPT_LTS_REC
|
||||
[23] = "%1d", -- CPT_LTS_L_BAR_GREEN
|
||||
[24] = "%1d", -- CPT_LTS_XMIT
|
||||
[25] = "%1d", -- CPT_LTS_ASPJ_OH
|
||||
-- RH Advisory and Threat Warning Indicator Panel
|
||||
[29] = "%1d", -- CPT_LTS_FIRE_APU
|
||||
[26] = "%1d", -- CPT_LTS_FIRE_RIGHT
|
||||
[31] = "%1d", -- CPT_LTS_RCDR_ON
|
||||
[32] = "%1d", -- CPT_LTS_DISP
|
||||
[38] = "%1d", -- CPT_LTS_SAM
|
||||
[39] = "%1d", -- CPT_LTS_AI
|
||||
[40] = "%1d", -- CPT_LTS_AAA
|
||||
[41] = "%1d", -- CPT_LTS_CW
|
||||
[33] = "%1d", -- CPT_LTS_SPARE_RH1
|
||||
[34] = "%1d", -- CPT_LTS_SPARE_RH2
|
||||
[35] = "%1d", -- CPT_LTS_SPARE_RH3
|
||||
[36] = "%1d", -- CPT_LTS_SPARE_RH4
|
||||
[37] = "%1d", -- CPT_LTS_SPARE_RH5
|
||||
-- Flaps, Landing Gear and Stores Indicator Panel
|
||||
[152] = "%1d", -- CPT_LTS_CTR
|
||||
[154] = "%1d", -- CPT_LTS_LI
|
||||
[156] = "%1d", -- CPT_LTS_LO
|
||||
[158] = "%1d", -- CPT_LTS_RI
|
||||
[160] = "%1d", -- CPT_LTS_RO
|
||||
[166] = "%1d", -- CPT_LTS_NOSE_GEAR
|
||||
[165] = "%1d", -- CPT_LTS_LEFT_GEAR
|
||||
[167] = "%1d", -- CPT_LTS_RIGHT_GEAR
|
||||
[163] = "%1d", -- CPT_LTS_HALF_FLAPS
|
||||
[164] = "%1d", -- CPT_LTS_FULL_FLAPS
|
||||
[162] = "%1d", -- CPT_LTS_FLAPS
|
||||
-- Lock/Shoot Light Assy
|
||||
[1] = "%1d", -- CPT_LTS_LOCK
|
||||
[2] = "%1d", -- CPT_LTS_SHOOT
|
||||
[3] = "%1d", -- CPT_LTS_SHOOT_STROBE
|
||||
-- Master Arm Control
|
||||
[47] = "%1d", -- CPT_LTS_AA
|
||||
[48] = "%1d", -- CPT_LTS_AG
|
||||
[45] = "%1d", -- CPT_LTS_DISCH
|
||||
[44] = "%1d", -- CPT_LTS_READY
|
||||
-- Arresting Hook Control Handle
|
||||
[294] = "%1d", -- CPT_LTS_HOOK
|
||||
-- Landing Gear
|
||||
--[] = "%1d", -- CPT_LTS_LDG_GEAR_HANDLE
|
||||
-- APU Control Panel
|
||||
[376] = "%1d", -- CPT_LTS_APU_READY
|
||||
-- ECM Control Panel Assy
|
||||
--[] = "%1d", -- CPT_LTS_SEL
|
||||
-- Map Gain Control Panel Assy
|
||||
[137] = "%1d", -- CPT_LTS_SPN
|
||||
-- Height Indicator
|
||||
[290] = "%1d", -- CPT_LTS_LOW_ALT_WARN
|
||||
-- AoA Indexer Lights
|
||||
[4] = "%1d", -- CPT_LTS_AOA_HIGH
|
||||
[5] = "%1d", -- CPT_LTS_AOA_CENTER
|
||||
[6] = "%1d", -- CPT_LTS_AOA_LOW
|
||||
-- Internal Lights
|
||||
--[460] = "%.1f", -- Console
|
||||
--[461] = "%.1f", -- Flood
|
||||
--[462] = "%.1f", -- NvgFlood
|
||||
--[464] = "%.1f", -- EmerInstr
|
||||
--[465] = "%.1f", -- EngInstFlood
|
||||
--[466] = "%.1f", -- Instrument
|
||||
--[467] = "%.1f", -- StbyCompass
|
||||
--[810] = "%.1f", -- Utility
|
||||
--[463] = "%.1f", -- Chart
|
||||
-- WCAGroupLightness
|
||||
--[521] = "%.1f", -- WCAGroupLightness 1
|
||||
--[522] = "%.1f", -- WCAGroupLightness 2
|
||||
--[523] = "%.1f", -- WCAGroupLightness 3
|
||||
-- IFEI
|
||||
[468] = "%1d", -- IFEI
|
||||
[469] = "%1d", -- IFEI_buttons
|
||||
-- RWR
|
||||
[276] = "%1d", -- Lower
|
||||
[273] = "%1d", -- Limit
|
||||
[274] = "%1d", -- Display
|
||||
--[270] = "%1d", -- SpecialEn
|
||||
[271] = "%1d", -- Special
|
||||
[267] = "%1d", -- Enable
|
||||
[268] = "%1d", -- Offset
|
||||
[264] = "%1d", -- Fail
|
||||
[265] = "%1d", -- Bit
|
||||
[520] = "%.1f", -- RwrLightsBrightness
|
||||
-- CMDS
|
||||
[516] = "%1d", -- ecmJett
|
||||
-- Magnetic compas
|
||||
[149] = "%.4f", -- heading
|
||||
[150] = "%.4f", -- pitch
|
||||
[151] = "%.4f", -- bank
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Control System
|
||||
[345] = "%.2f", -- RUD TRIM Control (Axis) {-1.0, 1.0} in 0.05 Steps
|
||||
[346] = "%1d", -- T/O TRIM Button
|
||||
[349] = "%1d", -- FCS RESET Button
|
||||
[347] = "%1d", -- GAIN Switch, NORM/ORIDE
|
||||
[234] = "%1d", -- FLAP Switch, AUTO/HALF/FULL {-1.0,0.0,1.0}
|
||||
[138] = "%1d", -- Spin Recovery Switch, RCVY/NORM
|
||||
[470] = "%1d", -- FCS BIT Switch
|
||||
[295] = "%1d", -- Wing Fold Control Handle, (RMB)CW/(LMB)CCW
|
||||
[296] = "%1d", -- Wing Fold Control Handle, (MW)PULL/STOW
|
||||
[504] = "%.1f", -- Throttles Friction Adjusting Lever (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Electric system
|
||||
[404] = "%1d", -- Battery Switch, ON/OFF/ORIDE {-1.0,0.0,1.0}
|
||||
[402] = "%1d", -- Left Generator Control Switch, NORM/OFF
|
||||
[403] = "%1d", -- Right Generator Control Switch, NORM/OFF
|
||||
[378] = "%1d", -- Generator TIE Control Switch, NORM/RESET
|
||||
[336] = "%1d", -- External Power Switch, RESET/NORM/OFF {-1.0,0.0,1.0}
|
||||
[332] = "%1d", -- Ground Power Switch 1, A ON/AUTO/B ON {-1.0,0.0,1.0}
|
||||
[333] = "%1d", -- Ground Power Switch 2, A ON/AUTO/B ON {-1.0,0.0,1.0}
|
||||
[334] = "%1d", -- Ground Power Switch 3, A ON/AUTO/B ON {-1.0,0.0,1.0}
|
||||
[335] = "%1d", -- Ground Power Switch 4, A ON/AUTO/B ON {-1.0,0.0,1.0}
|
||||
-- Anti-Ice
|
||||
[409] = "%1d", -- Pitot Heater Switch, ON/AUTO
|
||||
[410] = "%1d", -- Engine Anti-Ice Switch, ON/OFF/TEST {-1.0,0.0,1.0}
|
||||
-- CB
|
||||
[381] = "%1d", -- CB FCS CHAN 1, ON/OFF
|
||||
[382] = "%1d", -- CB FCS CHAN 2, ON/OFF
|
||||
[383] = "%1d", -- CB SPD BRK, ON/OFF
|
||||
[384] = "%1d", -- CB LAUNCH BAR, ON/OFF
|
||||
[454] = "%1d", -- CB FCS CHAN 3, ON/OFF
|
||||
[455] = "%1d", -- CB FCS CHAN 4, ON/OFF
|
||||
[456] = "%1d", -- CB HOOK, ON/OFF
|
||||
[457] = "%1d", -- CB LG, ON/OFF
|
||||
--
|
||||
[368] = "%1d", -- MC Switch, 1 OFF/NORM/2 OFF {-1.0,0.0,1.0}
|
||||
-- Power Plant
|
||||
[375] = "%1d", -- APU Control Switch, ON/OFF
|
||||
[377] = "%1d", -- Engine Crank Switch, LEFT/OFF/RIGHT {-1.0,0.0,1.0}
|
||||
[331] = "%1d", -- Fire and Bleed Air Test Switch, (RMB) TEST A/(LMB) TEST B {-1.0,0.0,1.0}
|
||||
-- Hydraulic system
|
||||
[369] = "%1d", -- Hydraulic Isolate Override Switch, NORM/ORIDE
|
||||
-- Gear system
|
||||
[226] = "%1d", -- Landing Gear Control Handle, (RMB)UP/(LMB)DOWN {-1.0,0.0} ???
|
||||
[228] = "%1d", -- Landing Gear Control Handle, (MW)EMERGENCY DOWN {0.0,1.0} ???
|
||||
[229] = "%1d", -- Down Lock Override Button - Push to unlock
|
||||
[238] = "%1d", -- Anti Skid Switch, ON/OFF
|
||||
[240] = "%.3f", -- Emergency/Parking Brake Handle, (MW)Pull-Stow {0.0,1.0} in 0.001 Steps ???
|
||||
[241] = "%.3f", -- Emergency/Parking Brake Handle, (LMB)Rotate Left/(RMB)Rotate Right ???
|
||||
[233] = "%1d", -- Launch Bar Control Switch, EXTEND/RETRACT
|
||||
[293] = "%1d", -- Arresting Hook Handle, UP/DOWN
|
||||
-- Fuel system
|
||||
[340] = "%1d", -- Internal Wing Tank Fuel Control Switch, INHIBIT/NORM
|
||||
[341] = "%1d", -- Probe Control Switch, EXTEND/RETRACT/EMERG EXTD {-1.0,0.0}
|
||||
[344] = "%1d", -- Fuel Dump Switch, ON/OFF
|
||||
[343] = "%1d", -- External Centerline Tank Fuel Control Switch, STOP/NORM/ORIDE {-1.0,0.0}
|
||||
[342] = "%1d", -- External Wing Tanks Fuel Control Switch, STOP/NORM/ORIDE {-1.0,0.0}
|
||||
-- Cockpit Mechanics
|
||||
[453] = "%1d", -- Canopy Control Switch, OPEN/HOLD/CLOSE {-1.0,0.0,1.0}
|
||||
[43] = "%1d", -- Canopy Jettison Handle Unlock Button - Press to unlock
|
||||
[42] = "%1d", -- Canopy Jettison Handle - Pull to jettison
|
||||
[510] = "%1d", -- Ejection Control Handle (3 times)
|
||||
[511] = "%1d", -- Ejection Seat SAFE/ARMED Handle, SAFE/ARMED
|
||||
[512] = "%1d", -- Ejection Seat Manual Override Handle, PULL/PUSH
|
||||
[513] = "%1d", -- Shoulder Harness Control Handle, LOCK/UNLOCK
|
||||
[514] = "%1d", -- Seat Height Adjustment Switch, UP/HOLD/DOWN {-1.0,0.0,1.0}
|
||||
[260] = "%1d", -- Rudder Pedal Adjust Lever
|
||||
[575] = "%1d", -- Hide Stick toggle
|
||||
-- Exterior Lights
|
||||
[338] = "%.2f", -- POSITION Lights Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[337] = "%.2f", -- FORMATION Lights Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[339] = "%1d", -- STROBE Lights Switch, BRT/OFF/DIM {-1.0,0.0,1.0}
|
||||
[237] = "%1d", -- LDG/TAXI LIGHT Switch, ON/OFF
|
||||
-- Cockpit Lights
|
||||
[413] = "%.2f", -- CONSOLES Lights Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[414] = "%.2f", -- INST PNL Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[415] = "%.2f", -- FLOOD Light Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[419] = "%1d", -- MODE Switch, NVG/NITE/DAY {-1.0,0.0,1.0}
|
||||
[418] = "%.2f", -- CHART Light Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[417] = "%.2f", -- WARN/CAUTION Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[416] = "%1d", -- Lights Test Switch, TEST/OFF
|
||||
[14] = "%1d", -- MASTER CAUTION Reset Button - Press to reset
|
||||
[239] = "%1d", -- HOOK BYPASS Switch, FIELD/CARRIER
|
||||
-- Oxygen System
|
||||
[365] = "%1d", -- OBOGS Control Switch, ON/OFF
|
||||
[366] = "%.2f", -- OXY Flow Knob {0.0,1.0} in 0.5 Steps
|
||||
-- ECS
|
||||
[411] = "%.1f", -- Bleed Air Knob, R OFF/NORM/L OFF/OFF {0.0,0.1,0.2,0.3}
|
||||
[412] = "%1d", -- Bleed Air Knob, AUG PULL
|
||||
[405] = "%1d", -- ECS Mode Switch, AUTO/MAN/ OFF/RAM {-1.0,0.0,1.0}
|
||||
[408] = "%1d", -- Cabin Pressure Switch, NORM/DUMP/ RAM/DUMP {-1.0,0.0,1.0}
|
||||
[451] = "%.2f", -- Defog Handle {0.0,1.0} in 0.1 Steps
|
||||
[407] = "%.2f", -- Cabin Temperature Knob {0.0,1.0} in 0.1 Steps
|
||||
[406] = "%.2f", -- Suit Temperature Knob {0.0,1.0} in 0.1 Steps
|
||||
[297] = "%1d", -- AV COOL Switch, NORM/EMERG
|
||||
[452] = "%1d", -- Windshield Anti-Ice/Rain Switch, ANTI ICE/OFF/RAIN {-1.0,0.0,1.0}
|
||||
[505] = "%.2f", -- Left Louver {0.0,1.0} in 0.1 Steps
|
||||
[506] = "%.2f", -- Right Louver {0.0,1.0} in 0.1 Steps
|
||||
-- HOTAS
|
||||
[494] = "%1d", -- Exterior Lights Switch, ON/OFF
|
||||
-- Master Arm Panel
|
||||
[458] = "%1d", -- Master Mode Button, A/A
|
||||
[459] = "%1d", -- Master Mode Button, A/G
|
||||
[49] = "%1d", -- Master Arm Switch, ARM/SAFE
|
||||
[50] = "%1d", -- Emergency Jettison Button
|
||||
[258] = "%1d", -- Auxiliary Release Switch, ENABLE/NORM
|
||||
[153] = "%1d", -- Station Jettison Select Button, CENTER
|
||||
[155] = "%1d", -- Station Jettison Select Button, LEFT IN
|
||||
[157] = "%1d", -- Station Jettison Select Button, LEFT OUT
|
||||
[159] = "%1d", -- Station Jettison Select Button, RIGHT IN
|
||||
[161] = "%1d", -- Station Jettison Select Button, RIGHT OUT
|
||||
[235] = "%1d", -- Selective Jettison Pushbutton
|
||||
[236] = "%1d", -- Selective Jettison Knob, L FUS MSL/SAFE/R FUS MSL/ RACK/LCHR /STORES {0.0,0.1,0.2,0.3,0.4}
|
||||
[135] = "%.1f", -- IR Cooling Switch, ORIDE/NORM/OFF {0.0,0.1,0.2}
|
||||
-- Fire Systems
|
||||
[46] = "%1d", -- Fire Extinguisher Pushbutton
|
||||
[30] = "%1d", -- APU Fire Warning/Extinguisher Light
|
||||
[11] = "%1d", -- Left Engine/AMAD Fire Warning/Extinguisher Light - (LMB) depress
|
||||
[12] = "%1d", -- Left Engine/AMAD Fire Warning/Extinguisher Light - (RMB) cover control
|
||||
[27] = "%1d", -- Right Engine/AMAD Fire Warning/Extinguisher Light - (LMB) depress
|
||||
[28] = "%1d", -- Right Engine/AMAD Fire Warning/Extinguisher Light - (RMB) cover control
|
||||
-- Multipurpose Display Group -----------
|
||||
-- Head-Up Display
|
||||
[140] = "%1d", -- HUD Symbology Reject Switch, NORM/REJ 1/REJ 2 {0.0,0.1,0.2}
|
||||
[141] = "%.2f", -- HUD Symbology Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[142] = "%1d", -- HUD Symbology Brightness Selector Knob, DAY/NIGHT
|
||||
[143] = "%.2f", -- HUD Black Level Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[144] = "%1d", -- HUD Video Control Switch, W/B /VID/OFF {0.0,0.1,0.2}
|
||||
[145] = "%.2f", -- HUD Balance Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[146] = "%.2f", -- HUD AOA Indexer Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[147] = "%1d", -- HUD Altitude Switch, BARO/RDR
|
||||
[148] = "%1d", -- HUD Attitude Selector Switch, INS/AUTO/STBY {-1.0,0.0,1.0}
|
||||
-- Left MDI
|
||||
[51] = "%1d", -- Left MDI Brightness Selector Knob, OFF/NIGHT/DAY {0.0,0.1,0.2}
|
||||
[52] = "%.2f", -- Left MDI Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[53] = "%.2f", -- Left MDI Contrast Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[54] = "%1d", -- Left MDI PB 1
|
||||
[55] = "%1d", -- Left MDI PB 2
|
||||
[56] = "%1d", -- Left MDI PB 3
|
||||
[57] = "%1d", -- Left MDI PB 4
|
||||
[58] = "%1d", -- Left MDI PB 5
|
||||
[59] = "%1d", -- Left MDI PB 6
|
||||
[60] = "%1d", -- Left MDI PB 7
|
||||
[61] = "%1d", -- Left MDI PB 8
|
||||
[62] = "%1d", -- Left MDI PB 9
|
||||
[63] = "%1d", -- Left MDI PB 10
|
||||
[64] = "%1d", -- Left MDI PB 11
|
||||
[65] = "%1d", -- Left MDI PB 12
|
||||
[66] = "%1d", -- Left MDI PB 13
|
||||
[67] = "%1d", -- Left MDI PB 14
|
||||
[68] = "%1d", -- Left MDI PB 15
|
||||
[69] = "%1d", -- Left MDI PB 16
|
||||
[70] = "%1d", -- Left MDI PB 17
|
||||
[72] = "%1d", -- Left MDI PB 18
|
||||
[73] = "%1d", -- Left MDI PB 19
|
||||
[75] = "%1d", -- Left MDI PB 20
|
||||
[312] = "%1d", -- Heading Set Switch
|
||||
[313] = "%1d", -- Course Set Switch
|
||||
-- Right MDI
|
||||
[76] = "%.1f", -- Right MDI Brightness Selector Knob, OFF/NIGHT/DAY {0.0,0.1,0.2}
|
||||
[77] = "%.2f", -- Right MDI Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[78] = "%.2f", -- Right MDI Contrast Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[79] = "%1d", -- Right MDI PB 1
|
||||
[80] = "%1d", -- Right MDI PB 2
|
||||
[81] = "%1d", -- Right MDI PB 3
|
||||
[82] = "%1d", -- Right MDI PB 4
|
||||
[83] = "%1d", -- Right MDI PB 5
|
||||
[84] = "%1d", -- Right MDI PB 6
|
||||
[85] = "%1d", -- Right MDI PB 7
|
||||
[86] = "%1d", -- Right MDI PB 8
|
||||
[87] = "%1d", -- Right MDI PB 9
|
||||
[88] = "%1d", -- Right MDI PB 10
|
||||
[89] = "%1d", -- Right MDI PB 11
|
||||
[90] = "%1d", -- Right MDI PB 12
|
||||
[91] = "%1d", -- Right MDI PB 13
|
||||
[92] = "%1d", -- Right MDI PB 14
|
||||
[93] = "%1d", -- Right MDI PB 15
|
||||
[94] = "%1d", -- Right MDI PB 16
|
||||
[95] = "%1d", -- Right MDI PB 17
|
||||
[96] = "%1d", -- Right MDI PB 18
|
||||
[97] = "%1d", -- Right MDI PB 19
|
||||
[98] = "%1d", -- Right MDI PB 20
|
||||
-- AMPCD
|
||||
[203] = "%.2f", -- AMPCD Off/Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[177] = "%1d", -- AMPCD Night/Day Brightness Selector, DAY/NGT {1.0,0.0,-1.0}
|
||||
[179] = "%1d", -- AMPCD Symbology Control Switch, UP/DOWN {1.0,0.0,-1.0}
|
||||
[182] = "%1d", -- AMPCD Contrast Control Switch, UP/DOWN {1.0,0.0,-1.0}
|
||||
[180] = "%1d", -- AMPCD Gain Control Switch, UP/DOWN {1.0,0.0,-1.0}
|
||||
[183] = "%1d", -- AMPCD PB 1
|
||||
[184] = "%1d", -- AMPCD PB 2
|
||||
[185] = "%1d", -- AMPCD PB 3
|
||||
[186] = "%1d", -- AMPCD PB 4
|
||||
[187] = "%1d", -- AMPCD PB 5
|
||||
[188] = "%1d", -- AMPCD PB 6
|
||||
[189] = "%1d", -- AMPCD PB 7
|
||||
[190] = "%1d", -- AMPCD PB 8
|
||||
[191] = "%1d", -- AMPCD PB 9
|
||||
[192] = "%1d", -- AMPCD PB 10
|
||||
[193] = "%1d", -- AMPCD PB 11
|
||||
[194] = "%1d", -- AMPCD PB 12
|
||||
[195] = "%1d", -- AMPCD PB 13
|
||||
[196] = "%1d", -- AMPCD PB 14
|
||||
[197] = "%1d", -- AMPCD PB 15
|
||||
[198] = "%1d", -- AMPCD PB 16
|
||||
[199] = "%1d", -- AMPCD PB 17
|
||||
[200] = "%1d", -- AMPCD PB 18
|
||||
[201] = "%1d", -- AMPCD PB 19
|
||||
[202] = "%1d", -- AMPCD PB 20
|
||||
-- Instruments --------------------------
|
||||
-- Standby Pressure Altimeter AAU-52/A
|
||||
[224] = "%.2f", -- AAU-52 Altimeter Pressure Setting Knob {0.0,1.0} in 0.04 Steps
|
||||
-- Radar Altimeter Height Indicator
|
||||
[291] = "%.2f", -- Push to Test Switch, (MW) rotate clockwise to apply power and set low altitude index pointer {0.0,1.0} in 0.1 Steps
|
||||
[292] = "%1d", -- Push to Test Switch, (LMB) activate BIT checks
|
||||
[213] = "%1d", -- SAI Cage Knob, (LMB) Pull to cage
|
||||
[214] = "%.2f", -- SAI Cage Knob, (MW) Adjust miniature airplane {0.0,1.0} in 0.1 Steps
|
||||
[215] = "%1d", -- SAI Test Button - Push to test
|
||||
-- Integrated Fuel/Engine Indicator (IFEI)
|
||||
[168] = "%1d", -- IFEI Mode Button
|
||||
[169] = "%1d", -- IFEI QTY Button
|
||||
[170] = "%1d", -- IFEI Up Arrow Button
|
||||
[171] = "%1d", -- IFEI Down Arrow Button
|
||||
[172] = "%1d", -- IFEI ZONE Button
|
||||
[173] = "%1d", -- IFEI ET Button
|
||||
[174] = "%.2f", -- IFEI Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
-- Sensor panel
|
||||
[440] = "%.1f", -- RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL) {0.0,1.0} {0.0,0.1,0.2,0.3}
|
||||
[443] = "%.1f", -- INS Switch, OFF/CV/GND/NAV/IFA/GYRO/GB/TEST {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7}
|
||||
-- UFC
|
||||
[128] = "%1d", -- UFC Function Selector Pushbutton, A/P
|
||||
[129] = "%1d", -- UFC Function Selector Pushbutton, IFF
|
||||
[130] = "%1d", -- UFC Function Selector Pushbutton, TCN
|
||||
[131] = "%1d", -- UFC Function Selector Pushbutton, ILS
|
||||
[132] = "%1d", -- UFC Function Selector Pushbutton, D/L
|
||||
[133] = "%1d", -- UFC Function Selector Pushbutton, BCN
|
||||
[134] = "%1d", -- UFC Function Selector Pushbutton, ON/OFF
|
||||
[100] = "%1d", -- UFC Option Select Pushbutton 1
|
||||
[101] = "%1d", -- UFC Option Select Pushbutton 2
|
||||
[102] = "%1d", -- UFC Option Select Pushbutton 3
|
||||
[103] = "%1d", -- UFC Option Select Pushbutton 4
|
||||
[106] = "%1d", -- UFC Option Select Pushbutton 5
|
||||
[111] = "%1d", -- UFC Keyboard Pushbutton, 1
|
||||
[112] = "%1d", -- UFC Keyboard Pushbutton, 2
|
||||
[113] = "%1d", -- UFC Keyboard Pushbutton, 3
|
||||
[114] = "%1d", -- UFC Keyboard Pushbutton, 4
|
||||
[115] = "%1d", -- UFC Keyboard Pushbutton, 5
|
||||
[116] = "%1d", -- UFC Keyboard Pushbutton, 6
|
||||
[117] = "%1d", -- UFC Keyboard Pushbutton, 7
|
||||
[118] = "%1d", -- UFC Keyboard Pushbutton, 8
|
||||
[119] = "%1d", -- UFC Keyboard Pushbutton, 9
|
||||
[120] = "%1d", -- UFC Keyboard Pushbutton, 0
|
||||
[121] = "%1d", -- UFC Keyboard Pushbutton, CLR
|
||||
[122] = "%1d", -- UFC Keyboard Pushbutton, ENT
|
||||
[99] = "%1d", -- UFC I/P Pushbutton
|
||||
[110] = "%1d", -- UFC Emission Control Pushbutton
|
||||
[107] = "%1d", -- UFC ADF Function Select Switch, 1/OFF/2 {-1.0,0.0,1.0}
|
||||
[108] = "%.2f", -- UFC COMM 1 Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[123] = "%.2f", -- UFC COMM 2 Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[109] = "%.2f", -- UFC Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[125] = "%1d", -- UFC COMM 1 Channel Selector Knob
|
||||
[124] = "%.2f", -- UFC COMM 1 Channel Selector Knob {0.0,1.0} in 0.2 Steps
|
||||
[127] = "%1d", -- UFC COMM 2 Channel Selector Knob
|
||||
[126] = "%.2f", -- UFC COMM 2 Channel Selector Knob {0.0,1.0} in 0.2 Steps
|
||||
-- intercom
|
||||
[357] = "%.2f", -- VOX Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[358] = "%.2f", -- ICS Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[359] = "%.2f", -- RWR Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[360] = "%.2f", -- WPN Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[361] = "%.2f", -- MIDS B Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[362] = "%.2f", -- MIDS A Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[363] = "%.2f", -- TACAN Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[364] = "%.2f", -- AUX Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[350] = "%1d", -- Comm Relay Switch, CIPHER/OFF/PLAIN {-1.0,0.0,1.0}
|
||||
[351] = "%1d", -- COMM G XMT Switch, COMM 1/OFF/COMM 2 {-1.0,0.0,1.0}
|
||||
[356] = "%1d", -- IFF Master Switch, EMER/NORM
|
||||
[355] = "%1d", -- IFF Mode 4 Switch, DIS/AUD /DIS/OFF {-1.0,0.0,1.0}
|
||||
[354] = "%1d", -- CRYPTO Switch, HOLD/NORM/ZERO {-1.0,0.0,1.0}
|
||||
[353] = "%1d", -- ILS UFC/MAN Switch, UFC/MAN
|
||||
[352] = "%.2f", -- ILS Channel Selector Switch {0.0,0.05,0.10,0.15,0.20,0.25,0.30,0.35,0.40,0.45,0.50,0.55,0.60,0.65,0.70,0.75,0.80,0.85,0.90,0.95}
|
||||
[230] = "%1d", -- Warning Tone Silence Button - Push to silence
|
||||
-- KY-58
|
||||
[444] = "%.1f", -- KY-58 Mode Select Knob, P/C/LD/RV {0.0,0.1,0.2,0.3}
|
||||
[445] = "%.2f", -- KY-58 Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[446] = "%.1f", -- KY-58 Fill Select Knob, Z 1-5/1/2/3/4/5/6/Z ALL {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7}
|
||||
[447] = "%.1f", -- KY-58 Power Select Knob, OFF/ON/TD {0.0,0.1,0.2}
|
||||
-- antenna selector
|
||||
[373] = "%1d", -- COMM 1 Antenna Selector Switch, UPPER/AUTO/LOWER {-1.0,0.0,1.0}
|
||||
[374] = "%1d", -- IFF Antenna Selector Switch, UPPER/BOTH/LOWER {-1.0,0.0,1.0}
|
||||
-- RWR
|
||||
[277] = "%1d", -- ALR-67 POWER Pushbutton
|
||||
[275] = "%1d", -- ALR-67 DISPLAY Pushbutton
|
||||
[272] = "%1d", -- ALR-67 SPECIAL Pushbutton
|
||||
[269] = "%1d", -- ALR-67 OFFSET Pushbutton
|
||||
[266] = "%1d", -- ALR-67 BIT Pushbutton
|
||||
[263] = "%.2f", -- ALR-67 DMR Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[262] = "%.2f", -- ALR-67 AUDIO Control Knob (no function){0.0,1.0} in 0.1 Steps
|
||||
[261] = "%.1f", -- ALR-67 DIS TYPE Switch, N/I/A/U/F {0.0,0.1,0.2,0.3,0.4}
|
||||
[216] = "%.2f", -- ALR-67 RWR Intensity Knob {0.0,1.0} in 0.1 Steps
|
||||
-- CMDS
|
||||
[380] = "%1d", -- Dispense Button - Push to dispense flares and chaff
|
||||
[517] = "%.1f", -- DISPENSER Switch, BYPASS/ON/OFF {0.0,0.1,0.2}
|
||||
[515] = "%1d", -- ECM JETT JETT SEL Button - Push to jettison
|
||||
-- ICMCP
|
||||
[248] = "%.1f", -- ECM Mode Switch, XMIT/REC/BIT/STBY/OFF {0.0,0.1,0.2,0.3,0.4}
|
||||
-- Helmet
|
||||
[136] = "%.2f", -- HMD OFF/BRT Knob {0.0,0.75} in 0.01 Steps
|
||||
-- Targeting Pod, FLIR
|
||||
[439] = "%.1f", -- FLIR Switch, ON/STBY/OFF {0.0,0.5,1.0}
|
||||
[441] = "%.1f", -- LTD/R Switch, ARM/SAFE/AFT {0.0,0.5,1.0}
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000), 2) -- export to Hardware '2' Config
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
|
||||
]]
|
||||
|
||||
--ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
|
||||
-- IFEI - Engine, Fuel and Clock informations
|
||||
local lEngineFuelClock = ExportScript.Tools.getListIndicatorValue(5)
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog('EngineFuelClock: '..ExportScript.Tools.dump(lEngineFuelClock))
|
||||
end
|
||||
|
||||
if lEngineFuelClock ~= nil and lEngineFuelClock.txt_RPM_R ~= nil then
|
||||
-- Engine informations 3 character
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_RPM_R, 3)) -- right RPM
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_RPM_L, 3)) -- left RPM
|
||||
ExportScript.Tools.SendData(2002, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_TEMP_R, 3)) -- right TEMP
|
||||
ExportScript.Tools.SendData(2003, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_TEMP_L, 3)) -- left TEMP
|
||||
ExportScript.Tools.SendData(2004, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FF_R, 3)) -- right Fuel flow
|
||||
ExportScript.Tools.SendData(2005, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FF_L, 3)) -- left Fuel flow
|
||||
ExportScript.Tools.SendData(2006, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_OilPress_R, 3)) -- right OilPress
|
||||
ExportScript.Tools.SendData(2007, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_OilPress_L, 3)) -- left OilPress
|
||||
|
||||
-- Fuel informations 6 character
|
||||
ExportScript.Tools.SendData(2008, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FUEL_UP, 6)) -- up Fuel
|
||||
ExportScript.Tools.SendData(2009, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FUEL_DOWN, 6)) -- down Fuel
|
||||
ExportScript.Tools.SendData(2010, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_BINGO, 6)) -- BINGO
|
||||
|
||||
-- Clock 8 character
|
||||
ExportScript.Tools.SendData(2011, ExportScript.Tools.DisplayFormat(string.format("%s¦%s¦%s", lEngineFuelClock.txt_CLOCK_H, lEngineFuelClock.txt_CLOCK_M, lEngineFuelClock.txt_CLOCK_S), 8)) -- Clock HH:MM:SS
|
||||
else
|
||||
-- Engine informations 3 character
|
||||
ExportScript.Tools.SendData(2000, " ") -- right RPM
|
||||
ExportScript.Tools.SendData(2001, " ") -- left RPM
|
||||
ExportScript.Tools.SendData(2002, " ") -- right TEMP
|
||||
ExportScript.Tools.SendData(2003, " ") -- left TEMP
|
||||
ExportScript.Tools.SendData(2004, " ") -- right Fuel flow
|
||||
ExportScript.Tools.SendData(2005, " ") -- left Fuel flow
|
||||
ExportScript.Tools.SendData(2006, " ") -- right OilPress
|
||||
ExportScript.Tools.SendData(2007, " ") -- left OilPress
|
||||
|
||||
-- Fuel informations 6 character
|
||||
ExportScript.Tools.SendData(2008, " ") -- up Fuel
|
||||
ExportScript.Tools.SendData(2009, " ") -- down Fuel
|
||||
ExportScript.Tools.SendData(2010, " ") -- BINGO
|
||||
|
||||
-- Clock 8 character
|
||||
ExportScript.Tools.SendData(2011, " ") -- Clock HH:MM:SS
|
||||
end
|
||||
|
||||
-- UFC Displays
|
||||
local lUFCDisplays = ExportScript.Tools.getListIndicatorValue(6)
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog('UFC: '..ExportScript.Tools.dump(lUFCDisplays))
|
||||
end
|
||||
|
||||
if lUFCDisplays ~= nil and lUFCDisplays.UFC_MainDummy ~= nil then
|
||||
-- ScratchPadString Displays
|
||||
lUFCDisplays.UFC_ScratchPadString1Display = string.gsub(lUFCDisplays.UFC_ScratchPadString1Display, "_", "-") -- fix weil das ein - sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString2Display = string.gsub(lUFCDisplays.UFC_ScratchPadString2Display, "_", "-") -- fix weil das ein - sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString1Display = string.gsub(lUFCDisplays.UFC_ScratchPadString1Display, "~", "2") -- fix weil das eine 2 sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString2Display = string.gsub(lUFCDisplays.UFC_ScratchPadString2Display, "~", "2") -- fix weil das eine 2 sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString1Display = string.gsub(lUFCDisplays.UFC_ScratchPadString1Display, "`", "1") -- fix weil das eine 1 sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString2Display = string.gsub(lUFCDisplays.UFC_ScratchPadString2Display, "`", "1") -- fix weil das eine 1 sein sollte
|
||||
ExportScript.Tools.SendData(2020, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_ScratchPadString1Display, 2)) -- ScratchPadString1Display 2 character
|
||||
ExportScript.Tools.SendData(2021, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_ScratchPadString2Display, 2)) -- ScratchPadString2Display 2 character
|
||||
ExportScript.Tools.SendData(2022, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_ScratchPadNumberDisplay, 7)) -- ScratchPadNumberDisplay 7 character
|
||||
|
||||
local lTmpCueing = " "
|
||||
-- Option Displays
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing1 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2023, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay1)) -- OptionDisplay1 5 character
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing2 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2024, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay2)) -- OptionDisplay2 5 character
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing3 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2025, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay3)) -- OptionDisplay3 5 character
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing4 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2026, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay4)) -- OptionDisplay4 5 character
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing5 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2027, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay5)) -- OptionDisplay5 5 character
|
||||
|
||||
-- Comm Displays
|
||||
lUFCDisplays.UFC_Comm1Display = string.gsub(lUFCDisplays.UFC_Comm1Display, "~", "2") -- fix weil das eine 2 sein sollte
|
||||
lUFCDisplays.UFC_Comm2Display = string.gsub(lUFCDisplays.UFC_Comm2Display, "~", "2") -- fix weil das eine 2 sein sollte
|
||||
lUFCDisplays.UFC_Comm1Display = string.gsub(lUFCDisplays.UFC_Comm1Display, "`", "1") -- fix weil das eine 1 sein sollte
|
||||
lUFCDisplays.UFC_Comm2Display = string.gsub(lUFCDisplays.UFC_Comm2Display, "`", "1") -- fix weil das eine 1 sein sollte
|
||||
ExportScript.Tools.SendData(2028, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_Comm1Display, 2)) -- Comm1Display 2 character
|
||||
ExportScript.Tools.SendData(2029, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_Comm2Display, 2)) -- Comm2Display 2 character
|
||||
else
|
||||
-- ScratchPadString Displays
|
||||
ExportScript.Tools.SendData(2020, " ") -- ScratchPadString1Display 2 character
|
||||
ExportScript.Tools.SendData(2021, " ") -- ScratchPadString2Display 2 character
|
||||
ExportScript.Tools.SendData(2022, " ") -- ScratchPadNumberDisplay 7 character
|
||||
|
||||
-- Option Displays
|
||||
ExportScript.Tools.SendData(2023, " ") -- OptionDisplay1 5 character
|
||||
ExportScript.Tools.SendData(2024, " ") -- OptionDisplay2 5 character
|
||||
ExportScript.Tools.SendData(2025, " ") -- OptionDisplay3 5 character
|
||||
ExportScript.Tools.SendData(2026, " ") -- OptionDisplay4 5 character
|
||||
ExportScript.Tools.SendData(2027, " ") -- OptionDisplay5 5 character
|
||||
|
||||
-- Comm Displays
|
||||
ExportScript.Tools.SendData(2028, " ") -- Comm1Display 2 character
|
||||
ExportScript.Tools.SendData(2029, " ") -- Comm2Display 2 character
|
||||
end
|
||||
|
||||
local lUHF1Radio = GetDevice(38)
|
||||
ExportScript.Tools.SendData(2030, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF1Radio:get_frequency()/1000000))), 7)
|
||||
|
||||
local lUHF2Radio = GetDevice(39)
|
||||
ExportScript.Tools.SendData(2031, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF2Radio:get_frequency()/1000000), "7.3", false, 0.005)), 7)
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000), 2) -- export to Hardware '2' Config
|
||||
]]
|
||||
|
||||
-- IFEI - Engine, Fuel and Clock informations
|
||||
local lEngineFuelClock = ExportScript.Tools.getListIndicatorValue(5)
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog('EngineFuelClock: '..ExportScript.Tools.dump(lEngineFuelClock))
|
||||
end
|
||||
|
||||
if lEngineFuelClock ~= nil and lEngineFuelClock.txt_RPM_R ~= nil then
|
||||
-- Engine informations 3 character
|
||||
ExportScript.Tools.SendDataDAC(2000, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_RPM_R, 3, "r", true)) -- right RPM
|
||||
ExportScript.Tools.SendDataDAC(2001, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_RPM_L, 3, "r", true)) -- left RPM
|
||||
ExportScript.Tools.SendDataDAC(2002, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_TEMP_R, 3, "r", true)) -- right TEMP
|
||||
ExportScript.Tools.SendDataDAC(2003, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_TEMP_L, 3, "r", true)) -- left TEMP
|
||||
ExportScript.Tools.SendDataDAC(2004, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FF_R, 3, "r", true)) -- right Fuel flow
|
||||
ExportScript.Tools.SendDataDAC(2005, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FF_L, 3, "r", true)) -- left Fuel flow
|
||||
ExportScript.Tools.SendDataDAC(2006, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_OilPress_R, 3, "r", true)) -- right OilPress
|
||||
ExportScript.Tools.SendDataDAC(2007, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_OilPress_L, 3, "r", true)) -- left OilPress
|
||||
|
||||
-- Fuel informations 6 character
|
||||
ExportScript.Tools.SendDataDAC(2008, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FUEL_UP:match("%d+"), 6, "r", true)) -- up Fuel
|
||||
ExportScript.Tools.SendDataDAC(2009, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FUEL_DOWN:match("%d+"), 6, "r", true)) -- down Fuel
|
||||
ExportScript.Tools.SendDataDAC(2010, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_BINGO:match("%d+"), 6, "r", true)) -- BINGO
|
||||
|
||||
-- Clock 8 character
|
||||
ExportScript.Tools.SendDataDAC(2011, ExportScript.Tools.DisplayFormat(string.format("%s.%s.$s", lEngineFuelClock.txt_CLOCK_H, lEngineFuelClock.txt_CLOCK_M, lEngineFuelClock.txt_CLOCK_S)), 8, "r", true) -- Clock HH:MM:SS
|
||||
else
|
||||
-- Engine informations 3 character
|
||||
ExportScript.Tools.SendDataDAC(2000, "-") -- right RPM
|
||||
ExportScript.Tools.SendDataDAC(2001, "-") -- left RPM
|
||||
ExportScript.Tools.SendDataDAC(2002, "-") -- right TEMP
|
||||
ExportScript.Tools.SendDataDAC(2003, "-") -- left TEMP
|
||||
ExportScript.Tools.SendDataDAC(2004, "-") -- right Fuel flow
|
||||
ExportScript.Tools.SendDataDAC(2005, "-") -- left Fuel flow
|
||||
ExportScript.Tools.SendDataDAC(2006, "-") -- right OilPress
|
||||
ExportScript.Tools.SendDataDAC(2007, "-") -- left OilPress
|
||||
|
||||
-- Fuel informations 5 character
|
||||
ExportScript.Tools.SendDataDAC(2008, "-") -- up Fuel
|
||||
ExportScript.Tools.SendDataDAC(2009, "-") -- down Fuel
|
||||
ExportScript.Tools.SendDataDAC(2010, "-") -- BINGO
|
||||
|
||||
-- Clock 8 character
|
||||
ExportScript.Tools.SendDataDAC(2011, "-") -- Clock HH:MM:SS
|
||||
end
|
||||
|
||||
local lUHF1Radio = GetDevice(39)
|
||||
ExportScript.Tools.SendDataDAC(2030, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF1Radio:get_frequency()/1000000))), 7)
|
||||
|
||||
local lUHF2Radio = GetDevice(40)
|
||||
ExportScript.Tools.SendDataDAC(2031, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF2Radio:get_frequency()/1000000), "7.3", false, 0.005)), 7)
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 13, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
--ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 73, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
3109
Scripts/DCS-ExportScript/ExportsModules/FC_AuxiliaryFuntions.lua
Normal file
3109
Scripts/DCS-ExportScript/ExportsModules/FC_AuxiliaryFuntions.lua
Normal file
File diff suppressed because it is too large
Load Diff
301
Scripts/DCS-ExportScript/ExportsModules/FW-190D9.lua
Normal file
301
Scripts/DCS-ExportScript/ExportsModules/FW-190D9.lua
Normal file
@@ -0,0 +1,301 @@
|
||||
-- FW-190D9 Dora
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.FW190D9 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Flight Instruments
|
||||
[36] = "%.4f", -- AirspeedNeedle {0, 100, 150, 200, 250, 300, 350, 400, 500, 600, 700, 750, 800, 850, 900} = {0.0, 0.038, 0.088, 0.150, 0.216, 0.278, 0.333, 0.395, 0.530, 0.660, 0.777,0.836, 0.892, 0.938, 0.988}
|
||||
[42] = "%.4f", -- Variometer {-30, -20, -10, -5, 5, 10, 20, 30} = {-1, -0.770, -0.558, -0.338,0.338,0.558, 0.770, 1.0}
|
||||
--TrimmNeedle
|
||||
[76] = "%.4f", -- TrimmNeedle {-1.0, 1.0}
|
||||
--ADF
|
||||
[29] = "%.4f", -- ADF_Vertical {-1.0, 1.0}
|
||||
[30] = "%.4f", -- ADF_Horizont {-1.0, 1.0}
|
||||
-- Altimeter
|
||||
[35] = "%.4f", -- Altimeter_km {0.0, 10.0} = {0.0, 1.0}
|
||||
[32] = "%.4f", -- Altimeter_m {0.0, 1000.0} = {0.0, 1.0}
|
||||
[33] = "%.4f", -- Altimeter_Pressure {712.56, 780.07} = {0.0, 1.0}
|
||||
-- Artificial horizon
|
||||
[37] = "%.4f", -- AHorizon_Pitch {0.33, -0.33}
|
||||
[38] = "%.4f", -- AHorizon_Bank {1.0, -1.0}
|
||||
[40] = "%.4f", -- TurnNeedle {-1.0, 1.0}
|
||||
[41] = "%.4f", -- Slipball {-1.0, 1.0}
|
||||
--oxygen pressure indicator
|
||||
[112] = "%.4f", -- Oxygen_Pressure {0.0, 250.0} = {0.0, 1.0}
|
||||
--[113] = "%.4f", -- Oxygen_Flow_Blinker {0.0, 1.0}
|
||||
--Remote compass
|
||||
[45] = "%.4f", -- CompassHeading {0.0, 1.0}
|
||||
[44] = "%.4f", -- CommandedCourse {0.0, 1.0}
|
||||
-- Engine
|
||||
[46] = "%.4f", -- Manifold_Pressure {0.5, 2.5} = {0.0, 1.0}
|
||||
[47] = "%.4f", -- Engine_RPM {0.0, 500.0, 1000.0, 1500, 2000, 2500, 3000, 3500, 3600.0} = {0.0, 0.032, 0.082, 0.206, 0.390, 0.601, 0.789, 0.961, 0.983}
|
||||
[96] = "%.4f", -- Coolant_Temperature {10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0, 120.0, 130.0} = {0.070, 0.131, 0.206, 0.289, 0.377, 0.468, 0.564, 0.655, 0.738, 0.811, 0.892, 0.946, 1.0}
|
||||
[97] = "%.4f", -- Oil_Temperature {10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0, 120.0, 130.0} = {0.070, 0.131, 0.206, 0.289, 0.377, 0.468, 0.564, 0.655, 0.738, 0.811, 0.892, 0.946, 1.0}
|
||||
[95] = "%.4f", -- Oil_Pressure {0.0, 15.0} -- at = {0, 1.0}
|
||||
[106] = "%.4f", -- MW50_Pressure {0.0, 0.1, 0.2, 0.3, 0.7, 0.8, 0.9, 1.0} -- at = {0.0, 0.068, 0.169, 0.273, 0.680, 0.780, 0.880, 1.0}
|
||||
-- Fuel
|
||||
[94] = "%.4f", -- Fuel_Pressure {0.0, 3.0} -- at = {0.0, 1.0}
|
||||
[98] = "%.4f", -- FuelScaleUpper {0.0, 50.0, 100.0, 150.0, 200.0, 250.0, 300.0} = {0.0, 0.130, 0.308, 0.50, 0.7, 0.87, 1.0}
|
||||
--???[98] = "%.4f", -- FuelScaleLower {0.0, 50.0, 100.0, 150.0, 200.0, 230.0, 250.0} = {0.0, 0.098, 0.328, 0.576, 0.833, 0.950, 1.0}
|
||||
[100] = "%.4f", -- Fuel_Low_Fwd {0.0, 1.0}
|
||||
[101] = "%.4f", -- Fuel_Low_Rear {0.0, 1.0}
|
||||
[195] = "%.4f", -- Fluor_Light {0.0, 1.0}
|
||||
--Clock
|
||||
[21] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0} = {0.0, 1.0}
|
||||
[22] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0} = {0.0, 1.0}
|
||||
[23] = "%.4f", -- CLOCK_currtime_seconds {0.0, 60.0} = {0.0, 1.0}
|
||||
[27] = "%.4f", -- CLOCK_chrono_minutes {0.0, 15.0} = {0.0, 1.0}
|
||||
--Ammon Counter
|
||||
[52] = "%.4f", -- Ammo_Counter_1 {0.0, 500.0} = {0.0, 1.0}
|
||||
[55] = "%.4f", -- Ammo_Counter_2 {0.0, 500.0} = {0.0, 1.0}
|
||||
[58] = "%.4f", -- Ammo_Counter_3 {0.0, 500.0} = {0.0, 1.0}
|
||||
[61] = "%.4f", -- Ammo_Counter_4 {0.0, 500.0} = {0.0, 1.0}
|
||||
-- Gun_Fire
|
||||
--[50] = "%.4f", -- Gun_Fire_1 {0.0, 1.0}
|
||||
--[164] = "%.4f", -- Gun_Fire_2 {0.0, 1.0}
|
||||
--[165] = "%.4f", -- Gun_Fire_3 {0.0, 1.0}
|
||||
--[166] = "%.4f", -- Gun_Fire_4 {0.0, 1.0}
|
||||
--Target System
|
||||
[133] = "%.4f", -- TargetDist {0.0, 10.0, 100.0, 300.0, 600.0, 700.0, 800.0, 1000.0} = {0.0, 0.0, 0.323, 0.568, 0.709, 0.813, 0.917, 1.0}
|
||||
--Bomb Lamps
|
||||
[196] = "%.f", -- BombLamp_1 {0.0, 1.0}
|
||||
[197] = "%.f", -- BombLamp_2 {0.0, 1.0}
|
||||
[198] = "%.f", -- BombLamp_3 {0.0, 1.0}
|
||||
[199] = "%.f", -- BombLamp_4 {0.0, 1.0}
|
||||
[137] = "%.f", -- RocketEmCvr {0.0, 1.0}
|
||||
--Gear Lamps
|
||||
[68] = "%.f", -- L_GEAR_UP {0.0, 1.0}
|
||||
[69] = "%.f", -- L_GEAR_DOWN {0.0, 1.0}
|
||||
[70] = "%.f", -- R_GEAR_UP {0.0, 1.0}
|
||||
[71] = "%.f", -- R_GEAR_DOWN {0.0, 1.0}
|
||||
--Flaps Lamps
|
||||
[72] = "%.f", -- FLAPS_UP {0.0, 1.0}
|
||||
[73] = "%.f", -- FLAPS_START {0.0, 1.0}
|
||||
[74] = "%1d" -- FLAPS_DOWN {0.0, 1.0}
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
[159] = "%.2f", -- Radiator Flaps Control (axis) 1.0 in 0.4 steps
|
||||
[160] = "%1d", -- Cold Start/Wind Screen Washer {0, 1}
|
||||
--Engine Control Panel
|
||||
[75] = "%.1f", -- Magneto Switch (Off, M1, M2, M1+M2) {0.0, 0.3, 0.6, 0.9}
|
||||
[104] = "%1d", -- Starter Switch Cover {0, 1}
|
||||
[105] = "%.1f", -- Starter Switch. Left Button - Starter Power. Right Button - Magnetic Clutch {0.0, 0.5, 1.0}
|
||||
[91] = "%1d", -- MBG Emergency Mode Handle {0, 1}
|
||||
[85] = "%1d", -- MW-50 Switch {0, 1}
|
||||
--Fuel system
|
||||
[90] = "%.1f", -- Fuel Tank Selector Valve (CLOSE/FORWARD/AFT/BOTH) {0.0, 0.1, 0.2, 0.3}
|
||||
[99] = "%.1f", -- Fuel Gauge Selector (FORWARD/NONE/AFT) {0.0, 0.5, 1.0}
|
||||
[161] = "%1d", -- MW-B4 Selector (Not Functional)
|
||||
[162] = "%1d", -- Primer Pump {0, 1}
|
||||
--electric system
|
||||
[79] = "%1d", -- Electric Kill-switch
|
||||
[163] = "%1d", -- Emergency Equipment Destruction {0, 1}
|
||||
--Circuit Breakers
|
||||
[138] = "%1d", -- Circuit Breakers Cover {0, 1}
|
||||
[141] = "%1d", -- Flaps, Trimmer, Artificial Horizon Power On {0, 1}
|
||||
[142] = "%1d", -- Flaps, Trimmer, Artificial Horizon Power Off {0, 1}
|
||||
[143] = "%1d", -- Landing Gear Power On {0, 1}
|
||||
[144] = "%1d", -- Landing Gear Power Off {0, 1}
|
||||
[145] = "%1d", -- Pitot and Heating Cover On {0, 1}
|
||||
[146] = "%1d", -- Pitot and Heating Cover Off {0, 1}
|
||||
[147] = "%1d", -- FuG25a On {0, 1}
|
||||
[148] = "%1d", -- FuG25a Off {0, 1}
|
||||
[149] = "%1d", -- FuG16ZY On {0, 1}
|
||||
[150] = "%1d", -- FuG16ZY Off {0, 1}
|
||||
[151] = "%1d", -- Instrument Lights, Gun-sight, Indicators, Compass, Starter On {0, 1}
|
||||
[152] = "%1d", -- Instrument Lights, Gun-sight, Indicators, Compass, Starter Off {0, 1}
|
||||
[153] = "%1d", -- Generator On {0, 1}
|
||||
[154] = "%1d", -- Generator Off {0, 1}
|
||||
[155] = "%1d", -- Battery On {0, 1}
|
||||
[156] = "%1d", -- Battery Off {0, 1}
|
||||
--Circuit Breakers of additional panel
|
||||
[121] = "%1d", -- Navigation Lights On {0, 1}
|
||||
[120] = "%1d", -- Navigation Lights Off {0, 1}
|
||||
[123] = "%1d", -- Forward Tank Pump On {0, 1}
|
||||
[122] = "%1d", -- Forward Tank Pump Off {0, 1}
|
||||
[125] = "%1d", -- Rear Tank Pump On {0, 1}
|
||||
[124] = "%1d", -- Rear Tank Pump Off {0, 1}
|
||||
[127] = "%1d", -- Auxiliary Tank Pump On {0, 1}
|
||||
[126] = "%1d", -- Auxiliary Tank Pump Off {0, 1}
|
||||
[129] = "%1d", -- MW-50 On {0, 1}
|
||||
[128] = "%1d", -- MW-50 Off {0, 1}
|
||||
--canopy
|
||||
[115] = "%1d", -- Canopy Emergency Release Handle {0, 1}
|
||||
[114] = "%.2f", -- Canopy Hand Crank (axis)
|
||||
-- Throttle
|
||||
[200] = "", -- Throttle Lock {0, 1}
|
||||
--gauges
|
||||
[34] = "%.2f", -- Altimeter Pressure Set (axis)
|
||||
[39] = "%.2f", -- Horizon Cage (axis) {0.0 - 0.511 in 0.04 steps}
|
||||
[43] = "%.2f", -- Course Set (axis)
|
||||
--flaps
|
||||
[62] = "%1d", -- Flaps Up {0, 1}
|
||||
[63] = "%1d", -- Flaps Take Off {0, 1}
|
||||
[64] = "%1d", -- Flaps Landing {0, 1}
|
||||
--Landing Gears Retraction
|
||||
[65] = "%1d", -- Landing Gears Retraction {0, 1}
|
||||
[66] = "%1d", -- Landing Gears Retraction Cover {0, 1}
|
||||
[67] = "%1d", -- Landing Gears Extending {0, 1}
|
||||
[89] = "%1d", -- Landing Gear Emergency Release Handle {0, 1}
|
||||
--Trimmer
|
||||
[77] = "%1d", -- Stabilizer Trimmer Up/Down {-1, 0, 1}
|
||||
--Clock
|
||||
[24] = "%.4f", -- Turnable Bezel (axis) in 0.2 steps
|
||||
[25] = "%.2f", -- Wind/Set Knob (axis) in 0.1 steps
|
||||
[26] = "%1d", -- Start - Stop Button {0, 1}
|
||||
[28] = "%1d", -- Stopwatch Button {0, 1}
|
||||
--weapons
|
||||
[48] = "%.2f", -- Master Arm
|
||||
[51] = "%.2f", -- Set Gun 1 Ammunition Count (axis) in 0.4 steps
|
||||
[54] = "%.2f", -- Set Gun 2 Ammunition Count (axis) in 0.4 steps
|
||||
[57] = "%.2f", -- Set Gun 3 Ammunition Count (axis) in 0.4 steps
|
||||
[60] = "%.2f", -- Set Gun 4 Ammunition Count (axis) in 0.4 steps
|
||||
[107] = "%1d", -- Main Rocket Switch {0, 1}
|
||||
[108] = "%1d", -- Rocket Emergency Release {0, 1}
|
||||
[109] = "%.2f", -- Bomb Fusing Selector {0.0, 0.1, 0.2, 0.3, 0.4}
|
||||
[92] = "%1d", -- Jettison Fuselage Stores {0, 1}
|
||||
--Gunsight
|
||||
[132] = "%1d", -- EZ42 Power Switch {0, 1}
|
||||
[131] = "%.2f", -- Target Wingspan (axis) in 0.1 steps
|
||||
[134] = "%1d", -- Gunsight Night Filter {0, 1}
|
||||
[4] = "%.2f", -- Target Distance (axis) in 0.1 steps
|
||||
[135] = "%.2f", -- Gunsight Brightness (axis) in 0.1 steps
|
||||
[191] = "%.2f", -- Aiming correction 1 (axis) in 0.1 steps
|
||||
--Instrument Lights Brightness
|
||||
[78] = "", -- Instrument Lights Brightness (axis) in 0.4 steps
|
||||
--Radio
|
||||
[81] = "%.1f", -- Radio Channel Selector {0.0, 0.1, 0.2, 0.3}
|
||||
[83] = "%.2f", -- Radio Volume (axis) in 0.04 steps
|
||||
[84] = "%1d", -- FT FT / Y ZF Mode Switch {0, 1}
|
||||
[82] = "%.2f", -- Radio Tuning (+/-30 kHz) (axis) in 0.04 steps
|
||||
--Oxygen
|
||||
[110] = "%.2f", -- Oxygen Flow Valve (axis) in 0.04 steps
|
||||
[190] = "%1d", -- Oxygen Emergency Knob {0, 1}
|
||||
--IFF
|
||||
[86] = "%1d", -- IFF Channel Selector {-1, 0, 1}
|
||||
[88] = "%1d" -- IFF Check {0, 1}
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
--[50] = "%.4f", -- Gun_Fire_1 {0.0, 1.0}
|
||||
--[164] = "%.4f", -- Gun_Fire_2 {0.0, 1.0}
|
||||
--[165] = "%.4f", -- Gun_Fire_3 {0.0, 1.0}
|
||||
--[166] = "%.4f", -- Gun_Fire_4 {0.0, 1.0}
|
||||
--[113] = "%.4f", -- Oxygen_Flow_Blinker {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(50, string.format("%.4f", mainPanelDevice:get_argument_value(50))) -- Gun_Fire_1 {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(164, string.format("%.4f", mainPanelDevice:get_argument_value(164))) -- Gun_Fire_2 {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(165, string.format("%.4f", mainPanelDevice:get_argument_value(165))) -- Gun_Fire_3 {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(166, string.format("%.4f", mainPanelDevice:get_argument_value(166))) -- Gun_Fire_4 {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(113, string.format("%.4f", mainPanelDevice:get_argument_value(113))) -- Oxygen_Flow_Blinker {0.0, 1.0}
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
ExportScript.Tools.SendData(50, mainPanelDevice:get_argument_value(50) > 0.3 and 1 or 0) -- Gun_Fire_1 {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(164, mainPanelDevice:get_argument_value(164) > 0.3 and 1 or 0) -- Gun_Fire_2 {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(165, mainPanelDevice:get_argument_value(165) > 0.3 and 1 or 0) -- Gun_Fire_3 {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(166, mainPanelDevice:get_argument_value(166) > 0.3 and 1 or 0) -- Gun_Fire_4 {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(113, mainPanelDevice:get_argument_value(113) > 0.3 and 1 or 0) -- Oxygen_Flow_Blinker {0.0, 1.0}
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
727
Scripts/DCS-ExportScript/ExportsModules/J-11A.lua
Normal file
727
Scripts/DCS-ExportScript/ExportsModules/J-11A.lua
Normal file
@@ -0,0 +1,727 @@
|
||||
-- J-11A Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.J11A = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / J-11A --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-MACH Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1600hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer (AOA, GLoad)
|
||||
ExportScript.AF.FC_Russian_AOA_Su2733()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_Old()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI(lDistanceToWay)
|
||||
|
||||
-- Vertical Velocity Indicator (VVI)
|
||||
ExportScript.AF.FC_Russian_VVI_Old()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_20000()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, main scala, second scala, ExportID)
|
||||
ExportScript.AF.FC_TwoNeedlesGauge(lEngineTempLeft, 1200, 100, 70, 71)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, main scala, second scala, ExportID)
|
||||
ExportScript.AF.FC_TwoNeedlesGauge(lEngineTempRight, 1200, 100, 72, 73)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU27(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Fuel Quantity Indicator
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_SU2733(lFunctionTyp)
|
||||
|
||||
-- Mechanical Configuration Indicator
|
||||
ExportScript.AF.MechanicalDevicesIndicator(lFunctionTyp)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 87)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
|
||||
--ExportScript.Tools.WriteToLog('lMechInfo.noseflap.value: '..ExportScript.Tools.dump(lMechInfo.noseflap.value)) -- Vorfluegel, Balkenanzeige neben dem Radarhoehenmesser (0=oben bis 30=unten)
|
||||
end
|
||||
|
||||
-- Airintake
|
||||
ExportScript.AF.FC_Russian_AirIntake()
|
||||
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
--local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
--ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU27(lFunctionTyp)
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
ExportScript.AF.MechanicalDevicesIndicator(lFunctionTyp)
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
ExportScript.AF.FC_EngineLamps_SU2733(lFunctionTyp)
|
||||
ExportScript.AF.StatusLamp()
|
||||
ExportScript.AF.SightingSystem()
|
||||
ExportScript.AF.PPDSPPanel()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.SightingSystem()
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
if lSightingSystemInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo)9
|
||||
--[[
|
||||
[PRF] = {
|
||||
[selection] = string: "ILV"
|
||||
[current] = string: "MED"
|
||||
}
|
||||
[laser_on] = boolean: "false"
|
||||
[scale] = {
|
||||
[azimuth] = number: "0.52359873056412"
|
||||
[distance] = number: "10000"
|
||||
}
|
||||
[radar_on] = boolean: "false"
|
||||
[optical_system_on] = boolean: "false"
|
||||
[LaunchAuthorized] = boolean: "false"
|
||||
[ECM_on] = boolean: "false"
|
||||
[Manufacturer] = string: "RUS"
|
||||
[TDC] = {
|
||||
[y] = number: "0"
|
||||
[x] = number: "0"
|
||||
}
|
||||
[ScanZone] = {
|
||||
[coverage_H] = {
|
||||
[min] = number: "0"
|
||||
[max] = number: "20000"
|
||||
}
|
||||
[size] = {
|
||||
[azimuth] = number: "1.0471974611282"
|
||||
[elevation] = number: "0.17453290522099"
|
||||
}
|
||||
[position] = {
|
||||
[exceeding_manual] = number: "0"
|
||||
[distance_manual] = number: "0"
|
||||
[azimuth] = number: "0"
|
||||
[elevation] = number: "0"
|
||||
}
|
||||
}
|
||||
]]
|
||||
ExportScript.Tools.SendDataDAC("600", lSightingSystemInfo.ECM_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("601", lSightingSystemInfo.laser_on == true and 1 or 0 )
|
||||
--ExportScript.Tools.SendDataDAC("602", lSightingSystemInfo.optical_system_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("603", lSightingSystemInfo.LaunchAuthorized == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("604", lSightingSystemInfo.radar_on == true and 1 or 0 )
|
||||
end
|
||||
|
||||
function ExportScript.AF.PPDSPPanel()
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
if lSnares == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
--[chaff] = number: "96"
|
||||
--[flare] = number: "96"
|
||||
|
||||
local lChaffLED = ExportScript.Tools.round(lSnares.chaff / 12, 0, "ceil") + 1
|
||||
local lFlareLED = ExportScript.Tools.round(lSnares.flare / 12, 0, "ceil") + 1
|
||||
|
||||
ExportScript.Tools.SendDataDAC("800", (lChaffLED <= 1 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("801", (lChaffLED <= 2 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("802", (lChaffLED <= 3 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("803", (lChaffLED <= 4 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("804", (lChaffLED <= 5 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("805", (lChaffLED <= 6 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("806", (lChaffLED <= 7 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("807", (lChaffLED <= 8 and 0 or 1) )
|
||||
|
||||
ExportScript.Tools.SendDataDAC("810", (lFlareLED <= 1 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("811", (lFlareLED <= 2 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("812", (lFlareLED <= 3 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("813", (lFlareLED <= 4 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("814", (lFlareLED <= 5 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("815", (lFlareLED <= 6 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("816", (lFlareLED <= 7 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("817", (lFlareLED <= 8 and 0 or 1) )
|
||||
end
|
||||
|
||||
function ExportScript.AF.StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lAccelerationUnits = LoGetAccelerationUnits()
|
||||
if lAccelerationUnits ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lAccelerationUnits: '..ExportScript.Tools.dump(lAccelerationUnits))
|
||||
ExportScript.Tools.SendDataDAC("732", (lAccelerationUnits.y > 8.0 and 1 or 0) ) -- lamp Over-G warning
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FuelQuantityIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- Fuel quantity shows the fuel remaining in all tanks
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
--[[
|
||||
[fuel_external] = number: "0"
|
||||
[Temperature] = {
|
||||
[left] = number: "626.99444580078"
|
||||
[right] = number: "626.99444580078"
|
||||
}
|
||||
[RPM] = {
|
||||
[left] = number: "87.453765869141"
|
||||
[right] = number: "87.453758239746"
|
||||
}
|
||||
[FuelConsumption] = {
|
||||
[left] = number: "0.1500396137767"
|
||||
[right] = number: "0.1500396137767"
|
||||
}
|
||||
[fuel_internal] = number: "3773.2749023438"
|
||||
[EngineStart] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
[HydraulicPressure] = {
|
||||
[left] = number: "210"
|
||||
[right] = number: "210"
|
||||
}
|
||||
lPayloadInfo.Stations[8].CLSID == E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF -- ext 800l Fuel Tank
|
||||
]]
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("300", string.format("%d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil") * 10) ) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("301", string.format("%d", lEngineInfo.fuel_internal)) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("302", string.format("%d", lEngineInfo.fuel_external)) -- external fuel in kg
|
||||
|
||||
ExportScript.Tools.SendDataDAC("304", (lEngineInfo.fuel_internal < 5600.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendDataDAC("305", (lEngineInfo.fuel_internal < 4500.0 and 1 or 0) ) -- Tank warning 2
|
||||
ExportScript.Tools.SendDataDAC("306", (lEngineInfo.fuel_internal < 1500.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendDataDAC("307", (lEngineInfo.fuel_internal < 800.0 and 1 or 0) ) -- Tank warning 4
|
||||
ExportScript.Tools.SendDataDAC("308", (lEngineInfo.fuel_internal < 600.0 and 1 or 0) ) -- Bingo Fuel
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
local lTotalFuel_9_3 = 0
|
||||
local lTotalFuel_5_0 = 0
|
||||
local lTotalFuel = lEngineInfo.fuel_internal
|
||||
|
||||
if lTotalFuel < 9000 then
|
||||
if lTotalFuel > 3000 then
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 3000 -- minimaler Eingangswert
|
||||
x_max = 9000 -- maximaler Eingangswert
|
||||
x = 8000 -- aktueller Eingangswert
|
||||
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 6000 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 1.66666666666666666666666666667e-4 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = -0,5 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.83333 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lTotalFuel_9_3 = 1.6666666666666666666666666666667e-4 * lTotalFuel + -0.5
|
||||
else
|
||||
lTotalFuel_9_3 = 0.0
|
||||
end
|
||||
else
|
||||
lTotalFuel_9_3 = 1.0
|
||||
end
|
||||
if lTotalFuel < 5000 then
|
||||
lTotalFuel_5_0 = lTotalFuel / 5000
|
||||
else
|
||||
lTotalFuel_5_0 = 1.0
|
||||
end
|
||||
|
||||
-- TotalFuel_5_0
|
||||
-- TotalFuel_9_3
|
||||
-- Light1
|
||||
-- Light2
|
||||
-- Light3
|
||||
-- Light4
|
||||
-- BingoLight
|
||||
ExportScript.Tools.SendData(300, lTotalFuel_5_0)
|
||||
ExportScript.Tools.SendData(301, lTotalFuel_9_3)
|
||||
ExportScript.Tools.SendData(302, (lEngineInfo.fuel_internal < 5600.0 and 1 or 0)) -- Tank warning 1
|
||||
ExportScript.Tools.SendData(303, (lEngineInfo.fuel_internal < 4500.0 and 1 or 0)) -- Tank warning 2
|
||||
ExportScript.Tools.SendData(304, (lEngineInfo.fuel_internal < 1500.0 and 1 or 0)) -- Tank warning 3
|
||||
ExportScript.Tools.SendData(305, (lEngineInfo.fuel_internal < 800.0 and 1 or 0)) -- Tank warning 4
|
||||
ExportScript.Tools.SendData(306, (lEngineInfo.fuel_internal < 600.0 and 1 or 0)) -- Bingo Fuel
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.MechanicalDevicesIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- The mechanical devices indicator shows the position of the landing gear, flaps, leading edge flaps and airbrake
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
--ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
if lMechInfo == nil then
|
||||
return
|
||||
end
|
||||
--[[
|
||||
[hook] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[parachute] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[controlsurfaces] = {
|
||||
[eleron] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "-0.21084336936474"
|
||||
}
|
||||
[elevator] = {
|
||||
[left] = number: "-0"
|
||||
[right] = number: "-0"
|
||||
}
|
||||
[rudder] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
}
|
||||
[airintake] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[canopy] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[refuelingboom] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[wing] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[noseflap] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[gear] = {
|
||||
[value] = number: "0"
|
||||
[nose] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
[main] = {
|
||||
[left] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
[right] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
}
|
||||
[status] = number: "0"
|
||||
}
|
||||
[speedbrakes] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[wheelbrakes] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[flaps] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}]]
|
||||
--local lTrueAirSpeed = LoGetTrueAirSpeed()
|
||||
--ExportScript.Tools.WriteToLog('lTrueAirSpeed: '..ExportScript.Tools.dump(lTrueAirSpeed))
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("500", (((lMechInfo.gear.status == 1 and lMechInfo.gear.value < 1) or (lMechInfo.gear.status == 0 and lMechInfo.gear.value > 0)) and 1 or 0 ) ) -- gear warning light
|
||||
ExportScript.Tools.SendDataDAC("501", (lMechInfo.gear.value > 0.85 and 1 or 0) ) -- nose gear
|
||||
ExportScript.Tools.SendDataDAC("502", (lMechInfo.gear.value > 0.95 and 1 or 0) ) -- left gear
|
||||
ExportScript.Tools.SendDataDAC("503", (lMechInfo.gear.value > 0.97 and 1 or 0) ) -- right gear
|
||||
|
||||
ExportScript.Tools.SendDataDAC("510", (lMechInfo.speedbrakes.value > 0.1 and 1 or 0) ) -- speedbreakes on > 0.1 (0 - 1)
|
||||
|
||||
ExportScript.Tools.SendDataDAC("531", (lMechInfo.flaps.value > 0.93 and 1 or 0) ) -- flap
|
||||
ExportScript.Tools.SendDataDAC("532", ((lMechInfo.gear.value > 0.5 and lMechInfo.gear.nose.rod > 0.02) and 1 or 0) ) -- Intake FOD shields
|
||||
ExportScript.Tools.SendDataDAC("533", ((lMechInfo.gear.status == 0 and lMechInfo.flaps.value > 0.93) and 1 or 0) ) -- Flaps Warning, same light as gear warning light, but blinking light
|
||||
|
||||
ExportScript.Tools.SendDataDAC("541", (lMechInfo.parachute.value < 0.5 and 1 or 0) ) -- Parachute
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
local lWarningLight = 0.0
|
||||
|
||||
--lWarningLight = ((lMechInfo.flaps.value > 0.93 and lTrueAirSpeed > 340) and 0.5 or 0.0) -- Speed Warning for Flaps, same light as gear warning light, but blinking light
|
||||
lWarningLight = ((lMechInfo.gear.status == 0 and lMechInfo.flaps.value > 0.93) and 1.0 or lWarningLight ) -- Speed Warning for Flaps, same light as gear warning light, but blinking light
|
||||
lWarningLight = (((lMechInfo.gear.status == 1 and lMechInfo.gear.value < 1) or (lMechInfo.gear.status == 0 and lMechInfo.gear.value > 0)) and 1.0 or lWarningLight ) -- gear warning light
|
||||
|
||||
ExportScript.Tools.SendData(500, string.format("%.1f", lWarningLight))
|
||||
ExportScript.Tools.SendData(501, (lMechInfo.gear.value > 0.85 and 1 or 0)) -- nose gear
|
||||
ExportScript.Tools.SendData(502, (lMechInfo.gear.value > 0.95 and 1 or 0)) -- left gear
|
||||
ExportScript.Tools.SendData(503, (lMechInfo.gear.value == 1 and 1 or 0)) -- right gear
|
||||
ExportScript.Tools.SendData(510, (lMechInfo.speedbrakes.value > 0.1 and 1 or 0)) -- speedbreakes on > 0.1 (0 - 1)
|
||||
ExportScript.Tools.SendData(531, (lMechInfo.flaps.value > 0.93 and 1 or 0)) -- flap
|
||||
ExportScript.Tools.SendData(532, ((lMechInfo.gear.value > 0.5 and lMechInfo.gear.nose.rod > 0.02) and 1 or 0)) -- Intake FOD shields
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FC_WeaponPanel_SU27(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanelPresend == nil then
|
||||
ExportScript.AF.TmpWeaponPanelPresend = {[101] = 0, [102] = 0, [103] = 0, [104] = 0, [105] = 0, [106] = 0, [107] = 0, [108] = 0, [109] = 0, [110] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanelActive == nil then
|
||||
ExportScript.AF.TmpWeaponPanelActive = {[201] = 0, [202] = 0, [203] = 0, [204] = 0, [205] = 0, [206] = 0, [207] = 0, [208] = 0, [209] = 0, [210] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanel == nil then
|
||||
ExportScript.AF.TmpWeaponPanel = {[231] = 0, [232] = 0, [233] = 0, [234] = 0, [235] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.EventNumberFC_WeaponPanel == nil then
|
||||
ExportScript.AF.EventNumberFC_WeaponPanel = 0
|
||||
end
|
||||
|
||||
if(ExportScript.AF.EventNumberFC_WeaponPanel < ExportScript.AF.EventNumber) then
|
||||
ExportScript.AF.EventNumberFC_WeaponPanel = ExportScript.AF.EventNumber
|
||||
|
||||
-- defination
|
||||
ExportScript.AF.PayloadInfo = LoGetPayloadInfo()
|
||||
if ExportScript.AF.PayloadInfo ~= nil then
|
||||
if ExportScript.AF.CurrentStationTmp == nil then
|
||||
ExportScript.AF.CurrentStationTmp = -1
|
||||
end
|
||||
|
||||
if ExportScript.AF.PayloadInfo.CurrentStation > 0 and
|
||||
ExportScript.AF.CurrentStationTmp ~= ExportScript.AF.PayloadInfo.CurrentStation then
|
||||
ExportScript.AF.CurrentStationTmp = ExportScript.AF.PayloadInfo.CurrentStation
|
||||
|
||||
ExportScript.AF.TmpStationToPanel = {}
|
||||
ExportScript.AF.TmpStationToPanel[1] = {Panel = 1, StationID = 101, CurrentID = 201 } -- left
|
||||
ExportScript.AF.TmpStationToPanel[2] = {Panel = 10, StationID = 110, CurrentID = 210 } -- right
|
||||
ExportScript.AF.TmpStationToPanel[3] = {Panel = 2, StationID = 102, CurrentID = 202 }
|
||||
ExportScript.AF.TmpStationToPanel[4] = {Panel = 9, StationID = 109, CurrentID = 209 }
|
||||
ExportScript.AF.TmpStationToPanel[5] = {Panel = 3, StationID = 103, CurrentID = 203 }
|
||||
ExportScript.AF.TmpStationToPanel[6] = {Panel = 8, StationID = 108, CurrentID = 208 }
|
||||
ExportScript.AF.TmpStationToPanel[7] = {Panel = 4, StationID = 104, CurrentID = 204 }
|
||||
ExportScript.AF.TmpStationToPanel[8] = {Panel = 7, StationID = 107, CurrentID = 207 }
|
||||
ExportScript.AF.TmpStationToPanel[9] = {Panel = 5, StationID = 105, CurrentID = 205 }
|
||||
ExportScript.AF.TmpStationToPanel[10] = {Panel = 6, StationID = 106, CurrentID = 206 }
|
||||
|
||||
-- ExportScript.AF.TmpWeaponPanelActive reset
|
||||
for i = 201, 210, 1 do
|
||||
ExportScript.AF.TmpWeaponPanelActive[i] = 0
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpStationToPanel[ExportScript.AF.PayloadInfo.CurrentStation] ~= nil then
|
||||
ExportScript.AF.TmpWeaponPanelActive[ExportScript.AF.TmpStationToPanel[ExportScript.AF.PayloadInfo.CurrentStation].CurrentID] = 1 -- currrent value
|
||||
|
||||
table.foreach(ExportScript.AF.PayloadInfo.Stations, ExportScript.AF.WeaponStatusPanel_selectCurrentPayloadStation) -- corresponding station
|
||||
end
|
||||
end
|
||||
|
||||
local lWeaponType = 0.0 -- transversely striped
|
||||
if ExportScript.AF.PayloadInfo.CurrentStation > 0 then
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level1 == 4 then
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 4 then -- Weapon type Missle
|
||||
lWeaponType = 0.1 -- MSL
|
||||
elseif ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 7 then -- Weapon type NURS with Container
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level3 == 33 then -- Weapon type Rocket
|
||||
lWeaponType = 0.2 -- RCT
|
||||
end
|
||||
elseif ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 5 then -- Weapon type Bomb
|
||||
lWeaponType = 0.3 -- BB
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
Weapon Panel
|
||||
|
|
||||
---------------------------------------------------
|
||||
| | | | | | | | | | |
|
||||
1 2 3 4 5 C 6 7 8 9 10 -- display
|
||||
1 3 5 7 9 10 8 6 4 2 -- Paylod ID
|
||||
]]
|
||||
-- Payload Info
|
||||
-- weapon stations (panel) 1 (left) - 10 (right), no lamp for center station
|
||||
|
||||
-- WeaponPresend1 {0, 1}
|
||||
-- WeaponPresend2 {0, 1}
|
||||
-- WeaponPresend3 {0, 1}
|
||||
-- WeaponPresend4 {0, 1}
|
||||
-- WeaponPresend5 {0, 1}
|
||||
-- WeaponPresend6 {0, 1}
|
||||
-- WeaponPresend7 {0, 1}
|
||||
-- WeaponPresend8 {0, 1}
|
||||
-- WeaponPresend9 {0, 1}
|
||||
-- WeaponPresend10 {0, 1}
|
||||
-- WeaponActive1 {0, 1}
|
||||
-- WeaponActive2 {0, 1}
|
||||
-- WeaponActive3 {0, 1}
|
||||
-- WeaponActive4 {0, 1}
|
||||
-- WeaponActive5 {0, 1}
|
||||
-- WeaponActive6 {0, 1}
|
||||
-- WeaponActive7 {0, 1}
|
||||
-- WeaponActive8 {0, 1}
|
||||
-- WeaponActive9 {0, 1}
|
||||
-- WeaponActive10 {0, 1}
|
||||
|
||||
ExportScript.AF.TmpWeaponPanelPresend[101] = (ExportScript.AF.PayloadInfo.Stations[1].count > 0 and 1 or 0) -- weapon presend panel 1
|
||||
ExportScript.AF.TmpWeaponPanelPresend[102] = (ExportScript.AF.PayloadInfo.Stations[3].count > 0 and 1 or 0) -- weapon presend panel 2
|
||||
ExportScript.AF.TmpWeaponPanelPresend[103] = (ExportScript.AF.PayloadInfo.Stations[5].count > 0 and 1 or 0) -- weapon presend panel 3
|
||||
ExportScript.AF.TmpWeaponPanelPresend[104] = (ExportScript.AF.PayloadInfo.Stations[7].count > 0 and 1 or 0) -- weapon presend panel 4
|
||||
ExportScript.AF.TmpWeaponPanelPresend[105] = (ExportScript.AF.PayloadInfo.Stations[9].count > 0 and 1 or 0) -- weapon presend panel 5
|
||||
ExportScript.AF.TmpWeaponPanelPresend[106] = (ExportScript.AF.PayloadInfo.Stations[10].count > 0 and 1 or 0) -- weapon presend panel 6
|
||||
ExportScript.AF.TmpWeaponPanelPresend[107] = (ExportScript.AF.PayloadInfo.Stations[8].count > 0 and 1 or 0) -- weapon presend panel 7
|
||||
ExportScript.AF.TmpWeaponPanelPresend[108] = (ExportScript.AF.PayloadInfo.Stations[6].count > 0 and 1 or 0) -- weapon presend panel 8
|
||||
ExportScript.AF.TmpWeaponPanelPresend[109] = (ExportScript.AF.PayloadInfo.Stations[4].count > 0 and 1 or 0) -- weapon presend panel 9
|
||||
ExportScript.AF.TmpWeaponPanelPresend[110] = (ExportScript.AF.PayloadInfo.Stations[2].count > 0 and 1 or 0) -- weapon presend panel 10
|
||||
--ExportScript.AF.TmpWeaponPanelActive[201] -- weapon active panel 1
|
||||
--ExportScript.AF.TmpWeaponPanelActive[202] -- weapon active panel 2
|
||||
--ExportScript.AF.TmpWeaponPanelActive[203] -- weapon active panel 3
|
||||
--ExportScript.AF.TmpWeaponPanelActive[204] -- weapon active panel 4
|
||||
--ExportScript.AF.TmpWeaponPanelActive[205] -- weapon active panel 5
|
||||
--ExportScript.AF.TmpWeaponPanelActive[206] -- weapon active panel 6
|
||||
--ExportScript.AF.TmpWeaponPanelActive[207] -- weapon active panel 7
|
||||
--ExportScript.AF.TmpWeaponPanelActive[208] -- weapon active panel 8
|
||||
--ExportScript.AF.TmpWeaponPanelActive[209] -- weapon active panel 9
|
||||
--ExportScript.AF.TmpWeaponPanelActive[210] -- weapon active panel 10
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelPresend) do
|
||||
ExportScript.Tools.SendData(key, value)
|
||||
end
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelActive) do
|
||||
ExportScript.Tools.SendData(key, value)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelPresend) do
|
||||
ExportScript.Tools.SendDataDAC(key, value)
|
||||
end
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelActive) do
|
||||
ExportScript.Tools.SendDataDAC(key, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
465
Scripts/DCS-ExportScript/ExportsModules/JF-17.lua
Normal file
465
Scripts/DCS-ExportScript/ExportsModules/JF-17.lua
Normal file
@@ -0,0 +1,465 @@
|
||||
-- JF-17 Export Module Revision CKN200515A
|
||||
-- Feel free to use, modify and repost in any way you desire.
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.JF17 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
[130] = "%1d", -- Master Warning Light, OFF/ON {0,1}
|
||||
[131] = "%1d", -- Fire Warning Light, OFF/ON {0,1}
|
||||
[132] = "%1d", -- FCS Warning Light, OFF/ON {0,1}
|
||||
[242] = "%1d", -- OXY BLINK Warning Light, OFF/ON {0,1}
|
||||
[250] = "%.2f", -- Stick Pitch Position, MIN..MAX {0..1}
|
||||
[251] = "%.2f", -- Stick Bank Position, MIN..MAX {0..1}
|
||||
[254] = "%.2f", -- Throttle Position, MIN..MAX {-1..1}
|
||||
[256] = "%.2f", -- Left Toe Brake Position, MIN..MAX {0..1}
|
||||
[257] = "%.2f", -- Right Toe Brake Position, MIN..MAX {0..1}
|
||||
[259] = "%.2f", -- Rudder Pedal Left-Right Position, MIN..MAX {-1..1}
|
||||
[290] = "%.2f", -- Oxygen Gauge Needle Position, MIN..MAX {0..1}
|
||||
[291] = "%.2f", -- Pneumatic Gauge M Needle Position, MIN..MAX {0..1}
|
||||
[292] = "%.2f", -- Pneumatic Gauge E Needle Position, MIN..MAX {0..1}
|
||||
[293] = "%.4f", -- Magnetic Heading Backup Compass, MIN..MAX {0..1}
|
||||
[504] = "%.2f", -- Landing Gear Indicator Light Knob, MIN..MAX {0..1} (0=0, 0.25=90, 0.5=180, 0.75=270)
|
||||
[532] = "%1d", -- Yaw Trim Switch, LEFT/CENTER/RIGHT {-1,0,1}
|
||||
[538] = "%1d", -- Flare Dispense Button, OUT/IN {0,1}
|
||||
--- Radio Panel ---
|
||||
[545] = "%.2f", -- Radio Volume Knob, MIN..MAX {0..1}
|
||||
[547] = "%.1f", -- Radio Mode Selector, OFF/TR/TR+G/ADF/GD/SET {0,0.2,0.4,0.6,0.8,1}
|
||||
[549] = "%1d", -- Radio 1/TONE Button, OUT/IN {0,1}
|
||||
[550] = "%1d", -- Radio 2/- Button, OUT/IN {0,1}
|
||||
[551] = "%1d", -- Radio 3/+ Button, OUT/IN {0,1}
|
||||
[552] = "%1d", -- Radio 4/H Button, OUT/IN {0,1}
|
||||
[553] = "%1d", -- Radio 5/A Button, OUT/IN {0,1}
|
||||
[554] = "%1d", -- Radio 6/M Button, OUT/IN {0,1}
|
||||
[555] = "%1d", -- Radio 7/P Button, OUT/IN {0,1}
|
||||
[556] = "%1d", -- Radio 8/C Button, OUT/IN {0,1}
|
||||
[557] = "%1d", -- Radio 9/T Button, OUT/IN {0,1}
|
||||
[558] = "%1d", -- Radio <-/MAN Button, OUT/IN {0,1}
|
||||
[559] = "%1d", -- Radio 0/PRE Button, OUT/IN {0,1}
|
||||
[560] = "%1d", -- Radio ->/ENT Button, OUT/IN {0,1}
|
||||
---
|
||||
[570] = "%.2f", -- Throttle Friction Handle, MIN..MAX {0..1}
|
||||
--- UFCP ---
|
||||
[700] = "%1d", -- UFCP PFL/1 Button, OUT/IN {0,1}
|
||||
[701] = "%1d", -- UFCP VRC/2 Button, OUT/IN {0,1}
|
||||
[702] = "%1d", -- UFCP 3 Button, OUT/IN {0,1}
|
||||
[703] = "%1d", -- UFCP L1 Button, OUT/IN {0,1}
|
||||
[704] = "%1d", -- UFCP R1 Button, OUT/IN {0,1}
|
||||
[705] = "%1d", -- UFCP OAP Button, OUT/IN {0,1}
|
||||
[706] = "%1d", -- UFCP MRK Button, OUT/IN {0,1}
|
||||
[707] = "%1d", -- UFCP DST/4 Button, OUT/IN {0,1}
|
||||
[708] = "%1d", -- UFCP TOT/5 Button, OUT/IN {0,1}
|
||||
[709] = "%1d", -- UFCP TOD/6 Button, OUT/IN {0,1}
|
||||
[710] = "%1d", -- UFCP L2 Button, OUT/IN {0,1}
|
||||
[711] = "%1d", -- UFCP R2 Button, OUT/IN {0,1}
|
||||
[712] = "%1d", -- UFCP RU Button, OUT/IN {0,1}
|
||||
[713] = "%1d", -- UFCP HNS Button, OUT/IN {0,1}
|
||||
[714] = "%1d", -- UFCP FUL/7 Button, OUT/IN {0,1}
|
||||
[715] = "%1d", -- UFCP IFF/8 Button, OUT/IN {0,1}
|
||||
[716] = "%1d", -- UFCP 9 Button, OUT/IN {0,1}
|
||||
[717] = "%1d", -- UFCP L3 Button, OUT/IN {0,1}
|
||||
[718] = "%1d", -- UFCP R3 Button, OUT/IN {0,1}
|
||||
[719] = "%1d", -- UFCP A/P Button, OUT/IN {0,1}
|
||||
[720] = "%1d", -- UFCP FPM Button, OUT/IN {0,1}
|
||||
[721] = "%1d", -- UFCP RTN Button, OUT/IN {0,1}
|
||||
[722] = "%1d", -- UFCP 0 Button, OUT/IN {0,1}
|
||||
[723] = "%1d", -- UFCP N/A Button, OUT/IN {0,1}
|
||||
[724] = "%1d", -- UFCP L4 Button, OUT/IN {0,1}
|
||||
[725] = "%1d", -- UFCP R4 Button, OUT/IN {0,1}
|
||||
[726] = "%1d", -- UFCP N/A Button, OUT/IN {0,1}
|
||||
[727] = "%1d", -- UFCP N/A Button, OUT/IN {0,1}
|
||||
[728] = "%.2f", -- HUD Contrast Knob, MIN..MAX {0..1}
|
||||
[729] = "%.2f", -- HUD Brightness Knob, MIN..MAX {0..1}
|
||||
[730] = "%1d", -- UFCP +/- Momentary Switch {1,0,-1}
|
||||
[731] = "%.2f", -- HUD Backup Reticle Knob, MIN..MAX {0..1}
|
||||
[732] = "%.2f", -- UFCP Brightness Knob, MIN..MAX {0..1}
|
||||
--- MFCD ---
|
||||
[734] = "%1d", -- Left MFCD SYM + Button, OUT/IN {0,1}
|
||||
[735] = "%1d", -- Left MFCD SYM - Button, OUT/IN {0,1}
|
||||
[736] = "%1d", -- Left MFCD U1 Button, OUT/IN {0,1}
|
||||
[737] = "%1d", -- Left MFCD U2 Button, OUT/IN {0,1}
|
||||
[738] = "%1d", -- Left MFCD U3 Button, OUT/IN {0,1}
|
||||
[739] = "%1d", -- Left MFCD U4 Button, OUT/IN {0,1}
|
||||
[740] = "%1d", -- Left MFCD U5 Button, OUT/IN {0,1}
|
||||
[741] = "%1d", -- Left MFCD Power Switch, OFF/ON {0,1}
|
||||
[742] = "%1d", -- Left MFCD L1 Button, OUT/IN {0,1}
|
||||
[743] = "%1d", -- Left MFCD L2 Button, OUT/IN {0,1}
|
||||
[744] = "%1d", -- Left MFCD L3 Button, OUT/IN {0,1}
|
||||
[745] = "%1d", -- Left MFCD L4 Button, OUT/IN {0,1}
|
||||
[746] = "%1d", -- Left MFCD L5 Button, OUT/IN {0,1}
|
||||
[747] = "%1d", -- Left MFCD L6 Button, OUT/IN {0,1}
|
||||
[748] = "%1d", -- Left MFCD L7 Button, OUT/IN {0,1}
|
||||
[749] = "%1d", -- Left MFCD L8 Button, OUT/IN {0,1}
|
||||
[750] = "%1d", -- Left MFCD R1 Button, OUT/IN {0,1}
|
||||
[751] = "%1d", -- Left MFCD R2 Button, OUT/IN {0,1}
|
||||
[752] = "%1d", -- Left MFCD R3 Button, OUT/IN {0,1}
|
||||
[753] = "%1d", -- Left MFCD R4 Button, OUT/IN {0,1}
|
||||
[754] = "%1d", -- Left MFCD R5 Button, OUT/IN {0,1}
|
||||
[755] = "%1d", -- Left MFCD R6 Button, OUT/IN {0,1}}
|
||||
[756] = "%1d", -- Left MFCD R7 Button, OUT/IN {0,1}
|
||||
[757] = "%1d", -- Left MFCD R8 Button, OUT/IN {0,1}
|
||||
[758] = "%1d", -- Left MFCD CONT + Button, OUT/IN {0,1}
|
||||
[759] = "%1d", -- Left MFCD CONT - Button, OUT/IN {0,1}
|
||||
[760] = "%1d", -- Left MFCD D1 Button, OUT/IN {0,1}
|
||||
[761] = "%1d", -- Left MFCD D2 Button, OUT/IN {0,1}
|
||||
[762] = "%1d", -- Left MFCD D3 Button, OUT/IN {0,1}
|
||||
[763] = "%1d", -- Left MFCD D4 Button, OUT/IN {0,1}
|
||||
[764] = "%1d", -- Left MFCD D5 Button, OUT/IN {0,1}
|
||||
[765] = "%1d", -- Left MFCD BRT + Button, OUT/IN {0,1}
|
||||
[766] = "%1d", -- Left MFCD BRT - Button, OUT/IN {0,1}
|
||||
[767] = "%1d", -- Center MFCD SYM + Button, OUT/IN {0,1}
|
||||
[768] = "%1d", -- Center MFCD SYM - Button, OUT/IN {0,1}
|
||||
[769] = "%1d", -- Center MFCD U1 Button, OUT/IN {0,1}
|
||||
[770] = "%1d", -- Center MFCD U2 Button, OUT/IN {0,1}
|
||||
[771] = "%1d", -- Center MFCD U3 Button, OUT/IN {0,1}
|
||||
[772] = "%1d", -- Center MFCD U4 Button, OUT/IN {0,1}
|
||||
[773] = "%1d", -- Center MFCD U5 Button, OUT/IN {0,1}
|
||||
[774] = "%1d", -- Center MFCD Power Switch, OFF/ON {0,1}
|
||||
[775] = "%1d", -- Center MFCD L1 Button, OUT/IN {0,1}
|
||||
[776] = "%1d", -- Center MFCD L2 Button, OUT/IN {0,1}
|
||||
[777] = "%1d", -- Center MFCD L3 Button, OUT/IN {0,1}
|
||||
[778] = "%1d", -- Center MFCD L4 Button, OUT/IN {0,1}
|
||||
[779] = "%1d", -- Center MFCD L5 Button, OUT/IN {0,1}
|
||||
[780] = "%1d", -- Center MFCD L6 Button, OUT/IN {0,1}
|
||||
[781] = "%1d", -- Center MFCD L7 Button, OUT/IN {0,1}
|
||||
[782] = "%1d", -- Center MFCD L8 Button, OUT/IN {0,1}
|
||||
[783] = "%1d", -- Center MFCD R1 Button, OUT/IN {0,1}
|
||||
[784] = "%1d", -- Center MFCD R2 Button, OUT/IN {0,1}
|
||||
[785] = "%1d", -- Center MFCD R3 Button, OUT/IN {0,1}
|
||||
[786] = "%1d", -- Center MFCD R4 Button, OUT/IN {0,1}
|
||||
[787] = "%1d", -- Center MFCD R5 Button, OUT/IN {0,1}
|
||||
[788] = "%1d", -- Center MFCD R6 Button, OUT/IN {0,1}
|
||||
[789] = "%1d", -- Center MFCD R7 Button, OUT/IN {0,1}
|
||||
[790] = "%1d", -- Center MFCD R8 Button, OUT/IN {0,1}
|
||||
[791] = "%1d", -- Center MFCD D1 Button, OUT/IN {0,1}
|
||||
[792] = "%1d", -- Center MFCD D2 Button, OUT/IN {0,1}
|
||||
[793] = "%1d", -- Center MFCD D3 Button, OUT/IN {0,1}
|
||||
[794] = "%1d", -- Center MFCD D4 Button, OUT/IN {0,1}
|
||||
[795] = "%1d", -- Center MFCD D5 Button, OUT/IN {0,1}
|
||||
[796] = "%1d", -- Center MFCD CONT + Button, OUT/IN {0,1}
|
||||
[797] = "%1d", -- Center MFCD CONT - Button, OUT/IN {0,1}
|
||||
[798] = "%1d", -- Center MFCD BRT + Button, OUT/IN {0,1}
|
||||
[799] = "%1d", -- Center MFCD BRT - Button, OUT/IN {0,1}
|
||||
[800] = "%1d", -- Right MFCD SYM + Button, OUT/IN {0,1}
|
||||
[801] = "%1d", -- Right MFCD SYM - Button, OUT/IN {0,1}
|
||||
[802] = "%1d", -- Right MFCD U1 Button, OUT/IN {0,1}
|
||||
[803] = "%1d", -- Right MFCD U2 Button, OUT/IN {0,1}
|
||||
[804] = "%1d", -- Right MFCD U3 Button, OUT/IN {0,1}
|
||||
[805] = "%1d", -- Right MFCD U4 Button, OUT/IN {0,1}
|
||||
[806] = "%1d", -- Right MFCD U5 Button, OUT/IN {0,1}
|
||||
[807] = "%1d", -- Right MFCD Power Switch, OFF/ON {0,1}
|
||||
[808] = "%1d", -- Right MFCD L1 Button, OUT/IN {0,1}
|
||||
[809] = "%1d", -- Right MFCD L2 Button, OUT/IN {0,1}
|
||||
[810] = "%1d", -- Right MFCD L3 Button, OUT/IN {0,1}
|
||||
[811] = "%1d", -- Right MFCD L4 Button, OUT/IN {0,1}
|
||||
[812] = "%1d", -- Right MFCD L5 Button, OUT/IN {0,1}
|
||||
[813] = "%1d", -- Right MFCD L6 Button, OUT/IN {0,1}
|
||||
[814] = "%1d", -- Right MFCD L7 Button, OUT/IN {0,1}
|
||||
[815] = "%1d", -- Right MFCD L8 Button, OUT/IN {0,1}
|
||||
[816] = "%1d", -- Right MFCD R1 Button, OUT/IN {0,1}
|
||||
[817] = "%1d", -- Right MFCD R2 Button, OUT/IN {0,1}
|
||||
[818] = "%1d", -- Right MFCD R3 Button, OUT/IN {0,1}
|
||||
[819] = "%1d", -- Right MFCD R4 Button, OUT/IN {0,1}
|
||||
[820] = "%1d", -- Right MFCD R5 Button, OUT/IN {0,1}
|
||||
[821] = "%1d", -- Right MFCD R6 Button, OUT/IN {0,1}
|
||||
[822] = "%1d", -- Right MFCD R7 Button, OUT/IN {0,1}
|
||||
[823] = "%1d", -- Right MFCD R8 Button, OUT/IN {0,1}
|
||||
[824] = "%1d", -- Right MFCD D1 Button, OUT/IN {0,1}
|
||||
[825] = "%1d", -- Right MFCD D2 Button, OUT/IN {0,1}
|
||||
[826] = "%1d", -- Right MFCD D3 Button, OUT/IN {0,1}
|
||||
[827] = "%1d", -- Right MFCD D4 Button, OUT/IN {0,1}
|
||||
[828] = "%1d", -- Right MFCD D5 Button, OUT/IN {0,1}
|
||||
[829] = "%1d", -- Right MFCD CONT + Button, OUT/IN {0,1}
|
||||
[830] = "%1d", -- Right MFCD CONT - Button, OUT/IN {0,1}
|
||||
[831] = "%1d", -- Right MFCD BRT + Button, OUT/IN {0,1}
|
||||
[832] = "%1d", -- Right MFCD BRT - Button, OUT/IN {0,1}
|
||||
---
|
||||
[840] = "%.5f", -- BARO Altitude Setting, MIN..MAX {0..~0.31} ***WARNING - As of 15th May 2020, this crashes DCS if value is outside 0 to ~0.31 range***
|
||||
[841] = "%.2f", -- Emergency Brake Handle, MIN..MAX {0..1}
|
||||
[846] = "%1d", -- Digital Clock Brightness + Button, OUT/IN {0,1}
|
||||
[847] = "%1d", -- Digital Clock Brightness - Button, OUT/IN {0,1}
|
||||
[901] = "%.2f", -- Warning Panel Brightness Knob, MIN..MAX {0..1}
|
||||
[903] = "%.2f", -- Oxygen Indicator Brightness Knob, MIN..MAX {0..1}
|
||||
[909] = "%.2f", -- AAP Brightness Knob, MIN..MAX {0..1}
|
||||
[934] = "%.2f", -- COM1 Volume Knob, MIN..MAX {0..1}
|
||||
[938] = "%.2f", -- COM2 Volume Knob, MIN..MAX {0..1}
|
||||
[939] = "%.2f", -- TCN/ILS Volume Knob, MIN..MAX {0..1}
|
||||
[940] = "%.2f", -- MSL Volume Knob, MIN..MAX {0..1}
|
||||
[941] = "%.2f", -- Air Temp Knob Selector, MIN..MAX {0..0.91666666666667}
|
||||
[944] = "%.2f", -- Inst. Light Knob, MIN..MAX {0..1}
|
||||
[945] = "%.2f", -- Console Light Knob, MIN..MAX {0..1}
|
||||
[946] = "%.2f", -- Flood Light Knob, MIN..MAX {0..1}
|
||||
[959] = "%.2f", -- Canopy Manual Open/Close Crank, MIN..MAX {0..1}
|
||||
[964] = "%.2f", -- AAR Light Brightness Knob, MIN..MAX {0..1}
|
||||
[965] = "%.2f", -- Right Forward Flood Light Direction, MIN..MAX {0..1}
|
||||
[966] = "%.2f", -- Right Aft Light Direction, MIN..MAX {0..1}
|
||||
[967] = "%.2f", -- Left Forward Flood Light Direction, MIN..MAX {0..1}
|
||||
[968] = "%.2f", -- Left Aft Flood Light Direction, MIN..MAX {0..1}
|
||||
[976] = "%.2f", -- Oxygen Supply Valve, MIN..MAX {0..1}
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--- Landing Gear Panel Lights
|
||||
[100] = "%1d", -- Landing Gear In Transition Light, OFF/ON {0,1}
|
||||
[101] = "%1d", -- Landing Gear Deployed Left Light, OFF/ON {0,1}
|
||||
[102] = "%1d", -- Landing Gear Deployed Nose Light, OFF/ON {0,1}
|
||||
[103] = "%1d", -- Landing Gear Deployed Right Light, OFF/ON {0,1}
|
||||
[104] = "%1d", -- S/B Deployed Light, OFF/ON {0,1}
|
||||
[105] = "%1d", -- D/CH Deployed Light, OFF/ON {0,1}
|
||||
[106] = "%1d", -- TEF Deployed Light, OFF/ON {0,1}
|
||||
[107] = "%1d", -- Landing Gear Handle Light, OFF/ON {0,1}
|
||||
[108] = "%.2f", -- Landing Gear Indicator Lights Brightness, MIN..MAX {0..1}
|
||||
---
|
||||
[110] = "%1d", -- FCS RESET Light, OFF/ON {0,1}
|
||||
[120] = "%.2f", -- Console Backlight Brightness, MIN..MAX {0..1}
|
||||
[121] = "%.2f", -- Instrument Backlight Brightness, MIN..MAX {0..1}
|
||||
[122] = "%.2f", -- Clock Backlight Brightness, MIN..MAX {0..1}
|
||||
[125] = "%.2f", -- Flood Light Brightness, MIN..MAX {0..1}
|
||||
[140] = "%1d", -- Left MFCD Backlight, OFF/ON {0,1}
|
||||
[141] = "%.2f", -- Left MFCD Backlight Brightness, MIN..MAX {0..1}
|
||||
[142] = "%1d", -- Center MFCD Backlight, OFF/ON {0,1}
|
||||
[143] = "%.2f", -- Center MFCD Backlight Brightness, MIN..MAX {0..1}
|
||||
[144] = "%1d", -- Right MFCD Backlight, OFF/ON {0,1}
|
||||
[145] = "%.2f", -- Right MFCD Backlight Brightness, MIN..MAX {0..1}
|
||||
--- UFCP Lights ---
|
||||
[150] = "%1d", -- UFCP OAP Light, OFF/ON {0,1}
|
||||
[151] = "%1d", -- UFCP MRK Light, OFF/ON {0,1}
|
||||
[152] = "%1d", -- UFCP P.U Light, OFF/ON {0,1}
|
||||
[153] = "%1d", -- UFCP HNS Light, OFF/ON {0,1}
|
||||
[154] = "%1d", -- UFCP AP Light, OFF/ON {0,1}
|
||||
[155] = "%1d", -- UFCP FPM Light, OFF/ON {0,1}
|
||||
[156] = "%1d", -- UFCP NULL1 Light, OFF/ON {0,1}
|
||||
[157] = "%1d", -- UFCP NULL2 Light, OFF/ON {0,1}
|
||||
[158] = "%.2f", -- UFCP Brightness, MIN..MAX {0..1}
|
||||
--- Status Lights Panel ---
|
||||
[160] = "%1d", -- PITCH TRIM Status Light, OFF/ON {0,1}
|
||||
[161] = "%1d", -- ROLL TRIM Status Light, OFF/ON {0,1}
|
||||
[162] = "%1d", -- YAW TRIM Status Light, OFF/ON {0,1}
|
||||
[163] = "%1d", -- A/A Status Light, OFF/ON {0,1}
|
||||
[164] = "%1d", -- A/G1 Status Light, OFF/ON {0,1}
|
||||
[165] = "%1d", -- A/G2 Status Light, OFF/ON {0,1}
|
||||
[166] = "%1d", -- EFCS Status Light, OFF/ON {0,1}
|
||||
[167] = "%1d", -- No.3 TANK Status Light, OFF/ON {0,1}
|
||||
[168] = "%1d", -- No.1 TANK Status Light, OFF/ON {0,1}
|
||||
[169] = "%1d", -- WING D/T Status Light, OFF/ON {0,1}
|
||||
[170] = "%1d", -- CTR D/T Status Light, OFF/ON {0,1}
|
||||
[171] = "%1d", -- NULL Status Light, OFF/ON {0,1}
|
||||
[172] = "%1d", -- START Status Light, OFF/ON {0,1}
|
||||
[173] = "%1d", -- AB Status Light, OFF/ON {0,1}
|
||||
[174] = "%1d", -- COMBAT Status Light, OFF/ON {0,1}
|
||||
[175] = "%1d", -- EMG HYD Status Light, OFF/ON {0,1}
|
||||
[176] = "%1d", -- NWS Status Light, OFF/ON {0,1}
|
||||
[177] = "%1d", -- ADVISORY Status Light, OFF/ON {0,1}
|
||||
[178] = "%.2f", -- Status Lights Brightness, MIN..MAX {0..1}
|
||||
--- Warning Lights Panel ---
|
||||
[200] = "%1d", -- NULL Warning Light, OFF/ON {0,1}
|
||||
[201] = "%1d", -- OXY LOW Warning Light, OFF/ON {0,1}
|
||||
[202] = "%1d", -- CANOPY Warning Light, OFF/ON {0,1}
|
||||
[203] = "%1d", -- HYD LOW Warning Light, OFF/ON {0,1}
|
||||
[204] = "%1d", -- AIR DATA Warning Light, OFF/ON {0,1}
|
||||
[205] = "%1d", -- LOW FUEL Warning Light, OFF/ON {0,1}
|
||||
[206] = "%1d", -- CABIN PRESS Warning Light, OFF/ON {0,1}
|
||||
[207] = "%1d", -- REDUCE RPM Warning Light, OFF/ON {0,1}
|
||||
[208] = "%1d", -- CONFIG Warning Light, OFF/ON {0,1}
|
||||
[209] = "%1d", -- FUEL PUMP Warning Light, OFF/ON {0,1}
|
||||
[210] = "%1d", -- AC SYS Warning Light, OFF/ON {0,1}
|
||||
[211] = "%1d", -- OIL Warning Light, OFF/ON {0,1}
|
||||
[212] = "%1d", -- DL Warning Light, OFF/ON {0,1}
|
||||
[213] = "%1d", -- START PUMP Warning Light, OFF/ON {0,1}
|
||||
[214] = "%1d", -- DC GEN Warning Light, OFF/ON {0,1}
|
||||
[215] = "%1d", -- STARTER Warning Light, OFF/ON {0,1}
|
||||
[216] = "%1d", -- FCS 3 Warning Light, OFF/ON {0,1}
|
||||
[217] = "%1d", -- BRAKE Warning Light, OFF/ON {0,1}
|
||||
[218] = "%1d", -- BATT Warning Light, OFF/ON {0,1}
|
||||
[219] = "%1d", -- ENG TEMP Warning Light, OFF/ON {0,1}
|
||||
[220] = "%1d", -- FCS 2 Warning Light, OFF/ON {0,1}
|
||||
[221] = "%1d", -- ANTI-SKID Warning Light, OFF/ON {0,1}
|
||||
[222] = "%1d", -- TRU Warning Light, OFF/ON {0,1}
|
||||
[223] = "%1d", -- ANTI-SURGE Warning Light, OFF/ON {0,1}
|
||||
[224] = "%1d", -- FCS 1 Warning Light, OFF/ON {0,1}
|
||||
[225] = "%1d", -- NWS Warning Light, OFF/ON {0,1}
|
||||
[226] = "%1d", -- STATIC INV Warning Light, OFF/ON {0,1}
|
||||
[227] = "%1d", -- ANTI-ICING Warning Light, OFF/ON {0,1}
|
||||
[228] = "%1d", -- ROLL CAS Warning Light, OFF/ON {0,1}
|
||||
[229] = "%1d", -- ECS Warning Light, OFF/ON {0,1}
|
||||
[230] = "%1d", -- EMMC Warning Light, OFF/ON {0,1}
|
||||
[231] = "%1d", -- SEC Warning Light, OFF/ON {0,1}
|
||||
[232] = "%1d", -- YAW CAS Warning Light, OFF/ON {0,1}
|
||||
[233] = "%1d", -- EQUIP HOT Warning Light, OFF/ON {0,1}
|
||||
[234] = "%1d", -- LWC Warning Light, OFF/ON {0,1}
|
||||
[235] = "%1d", -- EDU Warning Light, OFF/ON {0,1}
|
||||
[236] = "%1d", -- AUTOPILOT Warning Light, OFF/ON {0,1}
|
||||
[237] = "%1d", -- PITOT HEAT Warning Light, OFF/ON {0,1}
|
||||
[238] = "%1d", -- AVIONS Warning Light, OFF/ON {0,1}
|
||||
[239] = "%1d", -- DEEC Warning Light, OFF/ON {0,1}
|
||||
[240] = "%1d", -- EFCS Warning Light, OFF/ON {0,1}
|
||||
[241] = "%1d", -- SEAT Warning Light, OFF/ON {0,1}
|
||||
[243] = "%.2f", -- Warning Lights Brightness, MIN..MAX {0..1}
|
||||
-- AAP Panel Lights
|
||||
[260] = "%1d", -- AAP ACMI Light, OFF/ON {0,1}
|
||||
[261] = "%1d", -- AAP NULL1 Light, OFF/ON {0,1}
|
||||
[262] = "%1d", -- AAP NULL2 Light, OFF/ON {0,1}
|
||||
[263] = "%1d", -- AAP NULL3 Light, OFF/ON {0,1}
|
||||
[264] = "%1d", -- AAP HMD Light, OFF/ON {0,1}
|
||||
[265] = "%1d", -- AAP SPJ Light, OFF/ON {0,1}
|
||||
[266] = "%1d", -- AAP CLDP Light, OFF/ON {0,1}
|
||||
[267] = "%1d", -- AAP IRST Light, OFF/ON {0,1}
|
||||
[268] = "%1d", -- AAP RDR Light, OFF/ON {0,1}
|
||||
[269] = "%1d", -- AAP SLNK Light, OFF/ON {0,1}
|
||||
[270] = "%1d", -- AAP OESP Light, OFF/ON {0,1}
|
||||
[271] = "%1d", -- AAP RWR Light, OFF/ON {0,1}
|
||||
[272] = "%1d", -- AAP COM1 Light, OFF/ON {0,1}
|
||||
[273] = "%1d", -- AAP COM2 Light, OFF/ON {0,1}
|
||||
[274] = "%1d", -- AAP NAV Light, OFF/ON {0,1}
|
||||
[275] = "%1d", -- AAP IFF Light, OFF/ON {0,1}
|
||||
[276] = "%1d", -- AAP INS Light, OFF/ON {0,1}
|
||||
[277] = "%1d", -- AAP VMMC1 Light, OFF/ON {0,1}
|
||||
[278] = "%1d", -- AAP VMMC2 Light, OFF/ON {0,1}
|
||||
[279] = "%1d", -- AAP SAIU Light, OFF/ON {0,1}
|
||||
[280] = "%1d", -- AAP CMBT Light, OFF/ON {0,1}
|
||||
[281] = "%1d", -- AAP TRAIN Light, OFF/ON {0,1}
|
||||
[282] = "%.2f", -- AAP Buttons Brightness, MIN..MAX {0..1}
|
||||
---
|
||||
[295] = "%1d", -- Radio Panel Error Light, OFF/ON {0,1}
|
||||
[500] = "%.3f", -- Backup SAIU Knob Selector Knob, OFF/BOMB/IR/GUN {0,0.333,0.666,0.999}
|
||||
[501] = "%1d", -- Landing Gear Indicator Light Test Button, OUT/IN {0,1}}
|
||||
[502] = "%1d", -- Landing Gear Override Button Cover, COVERED/UNCOVERED {0,1}
|
||||
[503] = "%1d", -- Landing Gear Override Switch, OFF/ON {0,1}}
|
||||
[505] = "%1d", -- Landing Gear Lever, DOWN/UP {0,1}
|
||||
[506] = "%1d", -- Ground Jettison Switch, OFF/ENABLE {0,1}}
|
||||
[507] = "%1d", -- Emergency Jettison Button Cover, COVERED/UNCOVERED {0,1}
|
||||
[508] = "%1d", -- Emergency Jettison Button, OUT/IN {0,1}
|
||||
[509] = "%1d", -- Master Arm Switch, SIM/OFF/ARM {-1,0,1}
|
||||
[510] = "%1d", -- Brake Test Switch, OFF/ON/TEST {-1,0,1}
|
||||
[511] = "%1d", -- Parking Brake, NORM/PARK {-1,1}
|
||||
[512] = "%1d", -- Light Switch, LAND/OFF/TAXI {-1,0,1}
|
||||
[513] = "%1d", -- Flap Switch, DOWN/UP {-1,1}
|
||||
[514] = "%1d", -- Feed Cut-off Valve Cover, COVERED/UNCOVERED {0,1}
|
||||
[515] = "%1d", -- Feed Cut-off Valve Switch, OFF/ON {0,1}
|
||||
[516] = "%1d", -- Active Fuel Cut-off Valve Cover, COVERED/UNCOVERED {0,1}
|
||||
[517] = "%1d", -- Active Fuel Cut-off Valve Switch, OFF/ON {0,1}
|
||||
[518] = "%1d", -- Fuel Pump Switch, OFF/ON {0,1}
|
||||
[519] = "%1d", -- Engine Control Switch, OFF/ON {0,1}
|
||||
[520] = "%1d", -- Air Start Switch, OFF/ON {0,1}
|
||||
[521] = "%1d", -- Ground Start Button, OUT/IN {0,1}}
|
||||
[522] = "%1d", -- Engine Mode Switch, TRG/C+T/CMBT {-1,0,1}
|
||||
[523] = "%1d", -- SEC EEC Switch, OFF/ON {0,1}
|
||||
[524] = "%1d", -- Afterburner Switch, OFF/ON {0,1}
|
||||
[525] = "%1d", -- Anti-Surge Switch, OFF/ON {0,1}
|
||||
[526] = "%1d", -- Start Mode Selector, ENG COLD/START/STARTER COLD {-1,0,1}
|
||||
[527] = "%1d", -- Record Switch, OUT/IN {0,1}
|
||||
[528] = "%1d", -- EFCS Switch, OFF/AUTO {0,1}
|
||||
[529] = "%1d", -- Yaw/Roll CAS Switch, OFF/ON {0,1}
|
||||
[530] = "%1d", -- Direct Mode Switch, OFF/ON {0,1}
|
||||
[531] = "%1d", -- BIT Switch, OUT/IN {0,1}
|
||||
[533] = "%1d", -- Flight Test I Switch, OFF/ON {0,1}
|
||||
[534] = "%1d", -- Flight Test II Switch, OFF/ON {0,1}
|
||||
[535] = "%1d", -- AG1/AG2 Switch, A-AG2/A-AG1 {0,1}
|
||||
[536] = "%1d", -- AA/AG Switch, A-G/A-A {0,1}
|
||||
[537] = "%1d", -- Flare Dispense Button Cover, COVERED/UNCOVERED {0,1}
|
||||
[539] = "%1d", -- Emergency Hydralic Pump Switch, OFF/ON {0,1}
|
||||
[540] = "%1d", -- SHARS Switch, OFF/ON {0,1}
|
||||
[541] = "%1d", -- Ejection Seat Activate Destruct Switch, DISABLE/ENABLE {0,1}
|
||||
[542] = "%1d", -- Self Destruct Button Cover, COVERED/UNCOVERED {0,1}
|
||||
[543] = "%1d", -- Self Destruct Button, OUT/IN {0,1}}
|
||||
[544] = "%1d", -- FCS Reset Button,???OUT/IN??? {0,1}
|
||||
[546] = "%1d", -- Squelch, SQL-ACKN/OFF {0,1}
|
||||
[548] = "%1d", -- Radio Control Handover Button, OUT/IN {0,1}
|
||||
[561] = "%1d", -- Air Start Button Cover, COVERED/UNCOVERED {0,1}
|
||||
[562] = "%1d", -- CSS Handle, STOVED/PULLED {0,1}
|
||||
[563] = "%1d", -- P.H. Test Switch, AUTO/ON {0,1}
|
||||
[564] = "%1d", -- AAR Switch, INT/OFF/ALL {-1,0,1}
|
||||
[571] = "%1d", -- Throttle Uncage: Stop to Idle, CAGE/IDLE {0,1}
|
||||
[572] = "%1d", -- Throttle Cage: Idle To Stop, IDLE/CAGE {0,1}
|
||||
[573] = "%1d", -- Throttle Emergency Button, OUT/IN {0,1}
|
||||
[733] = "%1d", -- Deploy/Jettison Parachute Switch, JETT/OFF/DEPLOY {-1,0,1}
|
||||
[842] = "%1d", -- Master Warning Button, OUT/IN {0,1}
|
||||
[843] = "%1d", -- Fire Warning Button, OUT/IN {0,1}
|
||||
[844] = "%1d", -- FCS Warning Button, OUT/IN {0,1}
|
||||
[845] = "%1d", -- Digital Clock Switch, OFF/ON {0,1}
|
||||
[848] = "%1d", -- Digital Clock UTC Button, OUT/IN {0,1}
|
||||
[849] = "%1d", -- Digital Clock CHR Button, OUT/IN {0,1}
|
||||
[900] = "%1d", -- Warning Panel Day/Night Switch, NIGHT/DAY {0,1}
|
||||
[902] = "%1d", -- Warning Panel Test Button, OUT/IN {0,1}
|
||||
[904] = "%1d", -- Battery Switch, OFF/ON {0,1}
|
||||
[905] = "%1d", -- Main AC Gen Switch, OFF/ON {0,1}
|
||||
[906] = "%1d", -- Main DC Gen Switch, OFF/ON {0,1}
|
||||
[907] = "%1d", -- HUD/MFCD Day/Night Switch, NIGHT/DAY {0,1}
|
||||
[908] = "%.3f", -- INS Mode Selector Knob, STBY/FAST/NAV/GC {0,0.333,0.666,0.999}
|
||||
[910] = "%1d", -- HUD Symbology Reject, NORM/DCLT {0,1}
|
||||
-- AAP Panel Buttons
|
||||
[911] = "%1d", -- AAP ACMI, OFF/ON {0,1}
|
||||
[912] = "%1d", -- AAP N/A, OFF/ON {0,1}
|
||||
[913] = "%1d", -- AAP N/A, OFF/ON {0,1}
|
||||
[914] = "%1d", -- AAP N/A, OFF/ON {0,1}
|
||||
[915] = "%1d", -- AAP HMD, OFF/ON {0,1}
|
||||
[916] = "%1d", -- AAP SPJ, OFF/ON {0,1}
|
||||
[917] = "%1d", -- AAP CLDP, OFF/ON {0,1}
|
||||
[918] = "%1d", -- AAP IRST, OFF/ON {0,1}
|
||||
[919] = "%1d", -- AAP RDR, OFF/ON {0,1}
|
||||
[920] = "%1d", -- AAP SLNK, OFF/ON {0,1}
|
||||
[921] = "%1d", -- AAP OESP, OFF/ON {0,1}
|
||||
[922] = "%1d", -- AAP RWR, OFF/ON {0,1}
|
||||
[923] = "%1d", -- AAP COM1, OFF/ON {0,1}
|
||||
[924] = "%1d", -- AAP COM2, OFF/ON {0,1}
|
||||
[925] = "%1d", -- AAP NAV, OFF/ON {0,1}
|
||||
[926] = "%1d", -- AAP IFF, OFF/ON {0,1}
|
||||
[927] = "%1d", -- AAP INS, OFF/ON {0,1}
|
||||
[928] = "%1d", -- AAP WMMC1, OFF/ON {0,1}
|
||||
[929] = "%1d", -- AAP WMMC2, OFF/ON {0,1}
|
||||
[930] = "%1d", -- AAP SAIU, OFF/ON {0,1}
|
||||
[931] = "%1d", -- AAP CMBT, OFF/ON {0,1}
|
||||
[932] = "%1d", -- AAP TRAIN, OFF/ON {0,1}
|
||||
[933] = "%1d", -- AAP OFF, OFF/ON {0,1}
|
||||
---
|
||||
[935] = "%1d", -- Intercom Switch, OFF/ON {0,1}
|
||||
[936] = "%1d", -- Radio Top/Bottom Antenna Switch, LOWER/UPPER {0,1}
|
||||
[937] = "%1d", -- Speaker Control Box Channel Antenna Switch, STBY/MAIN {0,1}
|
||||
[942] = "%.3f", -- ECS Mode Knob Selector, DE-SMK/NORM/OFF/RAM {0,0.333,0.666,0.999}
|
||||
[943] = "%1d", -- Defog Button, OUT/IN {0,1}
|
||||
[947] = "%1d", -- Exterior Light Master Switch, NVG/OFF/NORMAL {-1,0,1}
|
||||
[948] = "%.1f", -- Formation Light Knob Selector, OFF/1/2/3/4/BRT {0,0.2,0.4,0.6,0.8,1}
|
||||
[949] = "%.1f", -- Anti-Collision Light Knob Selector, OFF/1/2/3/4/CODE {0,0.2,0.4,0.6,0.8,1}
|
||||
[950] = "%1d", -- Navigation Light Switch, DIM/OFF/BRIGHT {-1,0,1}
|
||||
[951] = "%1d", -- Navigation Light Switch, STEADY/FLASH {-1,1}
|
||||
[952] = "%1d", -- Light Switch, TOW/OFF/ANTI-COLLISION {-1,0,1}
|
||||
[953] = "%1d", -- DTC Card Insertion {0,1}
|
||||
[954] = "%1d", -- Emergency Landing Gear Cover, COVERED/UNCOVERED {0,1}
|
||||
[955] = "%.2f", -- Emergency Landing Gear Handle, STOVED/RELEASED/PARTIAL PULL/TWIST/FULL PULL AND TWIST {0,0.25,0.5,0.75,1}
|
||||
[957] = "%1d", -- Canopy Seal Handle, OFF/SEAL {0,1}
|
||||
[958] = "%.3f", -- Canopy Open/Close Handle, OPEN/HOLD/CLOSE/LOCK {0,0.333,0.666,0.999}
|
||||
[960] = "%.2f", -- Right Mirror Position, MIN..MAX {0..1}
|
||||
[961] = "%.2f", -- Center Mirror Position, MIN..MAX {0..1}
|
||||
[962] = "%.2f", -- Left Mirror Position, MIN..MAX {0..1}
|
||||
[963] = "%1d", -- AAR Light Switch, OFF/ON {-1,1}
|
||||
[969] = "%1d", -- Flash Light, OFF/ON {0,1}
|
||||
[970] = "%1d", -- Stick Show/Hide, HIDDEN/VISIBLE {0,1}
|
||||
[971] = "%1d", -- S7: A/P Disengage Paddle Switch, OUT/IN {0,1}
|
||||
[972] = "%1d", -- Eject Seat Handle, SAFE/ARM {0,1}
|
||||
[973] = "%1d", -- Eject Seat Firing Handle Safety Pin, OUT/IN {0,1}
|
||||
[974] = "%1d", -- DTC Card Ejection Button, OUT/IN {0,1}
|
||||
[975] = "%1d", -- Oxygen Tube Connector, OFF/ON {0,1}
|
||||
[977] = "%1d", -- Oxygen 100% O2 Switch, OFF/ON {0,1}
|
||||
[978] = "%1d", -- Eject Seat Emergency O2 Switch, OFF/ON {0,1}
|
||||
}
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
end
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
end
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
|
||||
ExportScript.RadioTile(mainPanelDevice)
|
||||
|
||||
end
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
end
|
||||
|
||||
function ExportScript.RadioTile(mainPanelDevice) --https://streamable.com/nnjgpt
|
||||
|
||||
local radio1 = (GetDevice(25):get_frequency())/1000000 --left radio freq unrounded
|
||||
local radio2 = (GetDevice(26):get_frequency())/1000000 --right radio freq unrounded
|
||||
|
||||
ExportScript.Tools.SendData(3001, radio1)
|
||||
ExportScript.Tools.SendData(3002, radio2)
|
||||
end
|
||||
1346
Scripts/DCS-ExportScript/ExportsModules/Ka-50.lua
Normal file
1346
Scripts/DCS-ExportScript/ExportsModules/Ka-50.lua
Normal file
File diff suppressed because it is too large
Load Diff
852
Scripts/DCS-ExportScript/ExportsModules/L-39C.lua
Normal file
852
Scripts/DCS-ExportScript/ExportsModules/L-39C.lua
Normal file
@@ -0,0 +1,852 @@
|
||||
-- L-39C
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.L39C = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
-- Front Seat
|
||||
-- Mechanic clock
|
||||
[67] = "%.4f", -- CLOCK currtime hours
|
||||
[68] = "%.4f", -- CLOCK currtime minutes
|
||||
[70] = "%.4f", -- CLOCK seconds meter time seconds
|
||||
[73] = "%.4f", -- CLOCK flight time meter status
|
||||
[71] = "%.4f", -- CLOCK flight hours
|
||||
[72] = "%.4f", -- CLOCK flight minutes
|
||||
[69] = "%.4f", -- CLOCK seconds meter time minutes
|
||||
-- Radar altimeter RV-5
|
||||
[58] = "%.4f", -- RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0}
|
||||
[59] = "%.4f", -- RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0}
|
||||
[62] = "%.4f", -- RV-5 warning flag
|
||||
[63] = "%.f", -- RV-5 DangerRALT lamp
|
||||
-- Variometer
|
||||
[74] = "%.4f", -- Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0}
|
||||
[76] = "%.4f", -- Variometer sideslip {-1.0, 1.0}
|
||||
[75] = "%.4f", -- Variometer turn {-1.0, -0.58, -0.275, 0.275, 0.58, 1.0} {-math.rad(5.7), math.rad(-3.8), math.rad(-1.9), math.rad(1.9), math.rad(3.8), math.rad(5.7)}
|
||||
-- KPP (ADI)
|
||||
[38] = "%.4f", -- KPP 1273K roll {-1.0, 1.0} {-math.pi, math.pi}
|
||||
--[31] = "%.4f", -- KPP 1273K pitch {-0.5, 0.5} {-math.pi / 2.0, math.pi / 2.0}
|
||||
--[40] = "%.4f", -- KPP 1273K sideslip {-1.0, 1.0}
|
||||
[35] = "%.4f", -- KPP Course Deviation Bar {-1.0, 1.0}
|
||||
[34] = "%.4f", -- KPP Alt Deviation Bar {-1.0, 1.0}
|
||||
[36] = "%1d", -- KPP Glide Beacon
|
||||
[37] = "%1d", -- KPP Localizer Beacon
|
||||
[29] = "%.4f", -- KPP Arretir
|
||||
[32] = "%.4f", -- KPP SDU Roll {-1.0, 1.0}
|
||||
[33] = "%.4f", -- KPP SDU Pitch {-1.0, 1.0}
|
||||
-- NPP (HSI)
|
||||
--[41] = "%.4f", -- HSI heading {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
--[42] = "%.4f", -- HSI commanded course needle (yellow needle) {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
[43] = "%.4f", -- HSI bearing needle {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
[47] = "%.4f", -- HSI Course Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[45] = "%.4f", -- HSI Alt Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[46] = "%.4f", -- HSI Glide Beacon G
|
||||
[44] = "%.4f", -- HSI Localizer Beacon K
|
||||
-- RSBN
|
||||
--[189] = "%.4f", -- RSBN NAV Chan {0.0, 0.39} {1.0, 40.0}
|
||||
--[190] = "%.4f", -- RSBN LAND Chan {0.0, 0.39} {1.0, 40.0}
|
||||
[66] = "%.4f", -- RSBN Range 100
|
||||
[65] = "%.4f", -- RSBN Range 10
|
||||
[64] = "%.4f", -- RSBN Range 1
|
||||
[580] = "%.4f", -- RSBN PanelLightsLmp
|
||||
-- Barometric altimeter VD-20
|
||||
[52] = "%.4f", -- VD-20 km {0.0, 1.0}{0.0, 20.0}
|
||||
[53] = "%.4f", -- VD-20 m {0.0, 1.0}{0.0, 1000.0}
|
||||
[54] = "%.4f", -- VD-20 km Ind {0.0, 1.0}{0.0, 20.0}
|
||||
[55] = "%.4f", -- VD-20 m Ind {0.0, 1.0}{0.0, 1000.0}
|
||||
--[56] = "%.4f", -- VD-20 PRESS {0.0, 1.0}{670.0, 826.0}
|
||||
-- Barometric altimeter
|
||||
-- Altimeter Feet , copy of A-10 altimeter
|
||||
[637] = "%.4f", -- Altimeter_100_footPtr {0.0, 1.0}{0.0, 1000.0}
|
||||
[632] = "%.4f", -- Altimeter_10000_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[631] = "%.4f", -- Altimeter_1000_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[630] = "%.4f", -- Altimeter_100_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[636] = "%.4f", -- pressure_setting_0 {0.0, 1.0}{0.0, 10.0}
|
||||
[635] = "%.4f", -- pressure_setting_1 {0.0, 1.0}{0.0, 10.0}
|
||||
[634] = "%.4f", -- pressure_setting_2 {0.0, 1.0}{0.0, 10.0}
|
||||
[633] = "%.4f", -- pressure_setting_3 {0.0, 1.0}{0.0, 10.0}
|
||||
-- AIRSPEED AND MACH
|
||||
[49] = "%.4f", -- IAS {0.0, 0.08, 0.186, 0.296, 0.436, 0.55, 0.635, 0.705, 0.765, 0.824, 1.0}{0.0, 100.0, 150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 1200.0}
|
||||
[50] = "%.4f", -- TAS {0.0, 0.08, 0.186, 0.296, 0.436, 0.55, 0.635, 0.705, 0.765, 0.824, 1.0}{0.0, 100.0, 150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 1200.0}
|
||||
[51] = "%.4f", -- MACH
|
||||
-- RKL-41
|
||||
[77] = "%.4f", -- RKL-41 needle {0.0, 1.0}{0.0, math.pi * 2.0}
|
||||
[156] = "%.4f", -- RKL-41 Signal
|
||||
[531] = "%.4f", -- KM-8 heading {0.0, 1.0}{0.0, math.pi * 2.0}
|
||||
[530] = "%.4f", -- KM-8 variation {1.0, -1.0}{-math.pi, math.pi}
|
||||
-- electric interface
|
||||
[92] = "%.4f", -- Voltmeter {0.0, 1.0}{0.0, 40.0}
|
||||
[93] = "%.4f", -- Ampermeter {0.0, 1.0}{-100.0, 300.0}
|
||||
-- oxygen interface
|
||||
[301] = "%.4f", -- OxygenPressure {0.0, 0.025, 0.925, 1.0}{0.0, 10.0, 150.0, 160.0}
|
||||
[302] = "%.4f", -- FlowBlinker
|
||||
-- accelerometer
|
||||
[86] = "%.4f", -- Acceleration {0.0, 1.0}{-5.0, 10.0}
|
||||
[88] = "%.4f", -- AccelerationMin {0.31, 0.695}{-5.0, 1.0}
|
||||
[87] = "%.4f", -- AccelerationMax {0.0, 1.0}{-5.0, 10.0}
|
||||
--
|
||||
[95] = "%.4f", -- CockpitAlt {0.0, 1.0}{0.0, 20000.0}
|
||||
[96] = "%.4f", -- PressDiff {0.0, 0.102, 0.202, 0.398, 0.779, 1.0}{-0.04, -0.02, 0.0, 0.1, 0.4, 0.6}
|
||||
-- Hydro Pressure
|
||||
[198] = "%.4f", -- MainHydro PRESS {0.0, 1.0}{0.0, 200.0}
|
||||
[200] = "%.4f", -- AuxHydro PRESS {0.0, 1.0}{0.0, 200.0}
|
||||
[98] = "%.4f", -- BrakeLMainHydro PRESS {0.0, 1.0}{0.0, 60.0}
|
||||
[99] = "%.4f", -- BrakeRMainHydro PRESS {0.0, 1.0}{0.0, 60.0}
|
||||
[100] = "%.4f", -- BrakeAuxHydro PRESS {0.0, 1.0}{0.0, 60.0}
|
||||
-- Fuel Quantity
|
||||
[91] = "%.4f", -- Fuel Quantity {0.0, 0.127, 0.239, 0.35, 0.458, 0.56, 0.685, 0.82, 1.0}{0.0, 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 825.0}
|
||||
-- Fan RPM
|
||||
[85] = "%.4f", -- Fan RPM {0.0, 0.09, 0.18, 0.28, 0.372, 0.468, 0.555, 0.645, 0.733, 0.822, 0.909, 1.0}{0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}
|
||||
-- Compressor RPM
|
||||
[84] = "%.4f", -- Compressor RPM {0.0, 0.09, 0.18, 0.28, 0.372, 0.468, 0.555, 0.645, 0.733, 0.822, 0.909, 1.0}{0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}
|
||||
-- Oil
|
||||
[83] = "%.4f", -- Oil Temp {0.0, 0.323, 0.576, 0.817, 1.0}{-50.0, 0.0, 50.0, 100.0, 150.0}
|
||||
[82] = "%.4f", -- Oil Press {0.0, 0.077, 1.0}{-1.0, 0.0, 6.0}
|
||||
-- Fuel Press
|
||||
[81] = "%.4f", -- Fuel Press {0.0, 0.06, 0.148, 0.323, 0.547, 0.659, 0.801, 1.0}{-1.0, 0.0, 20.0, 40.0, 60.0, 70.0, 80.0, 100.0}
|
||||
-- Engine Temp
|
||||
[90] = "%.4f", -- Engine Temp {0.0, 1.0}{0.0, 900.0}
|
||||
-- EngineVibration
|
||||
[94] = "%.4f", -- EngineVibration {0.0, 1.0}{0.0, 100.0}
|
||||
-- PitchTrimInd
|
||||
[247] = "%.4f", -- PitchTrimInd {1.0, -1.0}{-1.0, 1.0}
|
||||
-- lights system
|
||||
--[533] = "%.4f", -- CptInstrumentLightsIntensity
|
||||
--[558] = "%.4f", -- CompassLightIntensity
|
||||
--[555] = "%.4f", -- EmergencyLightIntensity
|
||||
-- RKL-41 Radio Compass
|
||||
[561] = "%.f", -- FarNDBSelectorLamp
|
||||
[570] = "%.f", -- NearNDBSelectorLamp
|
||||
[563] = "%.f", -- PanelLights
|
||||
-- BrakeHandle
|
||||
[127] = "%.4f", -- BrakeHandle
|
||||
-- Lamps
|
||||
[18] = "%.f", -- MRP 56
|
||||
[6] = "%.f", -- MainGenerator
|
||||
[9] = "%.f", -- ReserveGennerator
|
||||
[12] = "%.f", -- Inverter115
|
||||
[16] = "%.f", -- Inverter363
|
||||
[316] = "%.f", -- GroundPower
|
||||
[278] = "%.f", -- FlapsUp
|
||||
[279] = "%.f", -- FlapsTO
|
||||
[280] = "%.f", -- FlapsDn
|
||||
[117] = "%.f", -- AirBrakes
|
||||
[113] = "%.f", -- GearDown front
|
||||
[112] = "%.f", -- GearDown left
|
||||
[114] = "%.f", -- GearDown right
|
||||
[110] = "%.f", -- GearUp front
|
||||
[109] = "%.f", -- GearUp left
|
||||
[111] = "%.f", -- GearUp right
|
||||
[115] = "%.f", -- ExtendGears
|
||||
[116] = "%.f", -- DoorsOut
|
||||
[185] = "%.f", -- RSBN Azim Correction
|
||||
[186] = "%.f", -- RSBN Range Correction
|
||||
[15] = "%.f", -- BreakdownFinished
|
||||
[123] = "%.f", -- GA TILT
|
||||
[206] = "%.f", -- GA TILT PU26
|
||||
[2] = "%.f", -- DangerAltitude
|
||||
[27] = "%.f", -- EmergFuel
|
||||
[23] = "%.f", -- TurboStarter
|
||||
[4] = "%.f", -- Remain150
|
||||
[7] = "%.f", -- DoNotStart
|
||||
[26] = "%.f", -- FuelFilter
|
||||
[14] = "%.f", -- WingTanks
|
||||
[246] = "%.f", -- TrimmerRollNeutral
|
||||
[3] = "%.f", -- MachMeterLamp
|
||||
[10] = "%.f", -- CanopyNotClosed
|
||||
[556] = "%.f", -- LeftPitot
|
||||
[557] = "%.f", -- RightPitot
|
||||
[8] = "%.f", -- Vibration
|
||||
[1] = "%.f", -- Fire
|
||||
[28] = "%.f", -- EngineTemperature700
|
||||
[24] = "%.f", -- EngineTemperature730
|
||||
[20] = "%.f", -- EngineMinOilPressure
|
||||
[359] = "%.f", -- RSBN Azim Correct
|
||||
[362] = "%.f", -- RSBN Range Correct
|
||||
[19] = "%.f", -- HSI Accordance
|
||||
[11] = "%.f", -- CockpitPressure
|
||||
[22] = "%.f", -- ConditioningClosed
|
||||
[25] = "%.f", -- Defrost
|
||||
[21] = "%.f", -- Ice
|
||||
[182] = "%.f", -- RIO HeatingOk
|
||||
[5] = "%.f", -- HydraulicPressureDrop
|
||||
[253] = "%.f", -- MasterDanger
|
||||
[17] = "%.f", -- EmergConditioning
|
||||
[562] = "%.f", -- RadioUnderControl
|
||||
-- Back Seat
|
||||
-- Mechanic clock
|
||||
[405] = "%.4f", -- Backseat - CLOCK currtime hours
|
||||
[406] = "%.4f", -- Backseat - CLOCK currtime minutes
|
||||
[408] = "%.4f", -- Backseat - CLOCK seconds meter time seconds
|
||||
[411] = "%.4f", -- Backseat - CLOCK flight time meter status
|
||||
[409] = "%.4f", -- Backseat - CLOCK flight hours
|
||||
[410] = "%.4f", -- Backseat - CLOCK flight minutes
|
||||
[407] = "%.4f", -- Backseat - CLOCK seconds meter time minutes
|
||||
-- Radar altimeter RV-5
|
||||
[396] = "%.4f", -- Backseat - RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0}
|
||||
[397] = "%.4f", -- Backseat - RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0}
|
||||
[400] = "%.4f", -- Backseat - RV-5 warning flag
|
||||
[401] = "%.f", -- Backseat - RV-5 DangerRALT lamp
|
||||
-- Variometer
|
||||
[416] = "%.4f", -- Backseat - Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0}
|
||||
[418] = "%.4f", -- Backseat - Variometer sideslip {-1.0, 1.0}
|
||||
[417] = "%.4f", -- Backseat - Variometer turn {-1.0, 1.0} {-math.rad(6.0), math.rad(6.0)}
|
||||
-- KPP (ADI)
|
||||
[375] = "%.4f", -- Backseat - KPP 1273K roll {-1.0, 1.0} {-math.pi, math.pi}
|
||||
[368] = "%.4f", -- Backseat - KPP 1273K pitch {-0.5, 0.5} {-math.pi / 2.0, math.pi / 2.0}
|
||||
[377] = "%.4f", -- Backseat - KPP 1273K sideslip {-1.0, 1.0}
|
||||
[372] = "%.4f", -- Backseat - KPP Course Deviation Bar {-1.0, 1.0}
|
||||
[373] = "%.4f", -- Backseat - KPP Glide Beacon
|
||||
[374] = "%.4f", -- Backseat - KPP Localizer Beacon
|
||||
[366] = "%.4f", -- Backseat - KPP Arretir
|
||||
[369] = "%.4f", -- Backseat - KPP SDU Roll {-1.0, 1.0}
|
||||
[370] = "%.4f", -- Backseat - KPP SDU Pitch {-1.0, 1.0}
|
||||
-- NPP HSI
|
||||
--[378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
--[379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[380] = "%.4f", -- Backseat - HSI2 bearing needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[384] = "%.4f", -- Backseat - HSI2 Course Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[382] = "%.4f", -- Backseat - HSI2 Alt Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[383] = "%.4f", -- Backseat - HSI2 Glide Beacon
|
||||
[381] = "%.4f", -- Backseat - HSI2 Localizer Beacon
|
||||
-- RSPN
|
||||
[404] = "%.4f", -- Backseat - RSBN Range 100
|
||||
[403] = "%.4f", -- Backseat - RSBN Range 10
|
||||
[402] = "%.4f", -- Backseat - RSBN Range 1
|
||||
-- Barometric altimeter VD-20 instructor
|
||||
[389] = "%.4f", -- Backseat - VD-20 km {0.0, 1.0}{0.0, 20.0}
|
||||
[390] = "%.4f", -- Backseat - VD-20 m {0.0, 1.0}{0.0, 1000.0}
|
||||
[391] = "%.4f", -- Backseat - VD-20 km Ind {0.0, 1.0}{0.0, 20.0}
|
||||
[392] = "%.4f", -- Backseat - VD-20 m Ind {0.0, 1.0}{0.0, 1000.0}
|
||||
--[393] = "%.4f", -- Backseat - VD-20 PRESS {0.0, 1.0}{670.0, 826.0}
|
||||
-- Barometric altimeter
|
||||
-- Altimeter Feet , copy of A-10 altimeter
|
||||
[737] = "%.4f", -- Altimeter_100_footPtr {0.0, 1.0}{0.0, 1000.0}
|
||||
[732] = "%.4f", -- Altimeter_10000_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[731] = "%.4f", -- Altimeter_1000_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[730] = "%.4f", -- Altimeter_100_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[736] = "%.4f", -- pressure_setting_0 {0.0, 1.0}{0.0, 10.0}
|
||||
[735] = "%.4f", -- pressure_setting_1 {0.0, 1.0}{0.0, 10.0}
|
||||
[734] = "%.4f", -- pressure_setting_2 {0.0, 1.0}{0.0, 10.0}
|
||||
[733] = "%.4f", -- pressure_setting_3 {0.0, 1.0}{0.0, 10.0}
|
||||
-- AIRSPEED AND MACH
|
||||
[386] = "%.4f", -- Backseat - IAS {0.0, 0.08, 0.186, 0.296, 0.436, 0.55, 0.635, 0.705, 0.765, 0.824, 1.0}{0.0, 100.0, 150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 1200.0}
|
||||
[387] = "%.4f", -- Backseat - TAS {0.0, 0.08, 0.186, 0.296, 0.436, 0.55, 0.635, 0.705, 0.765, 0.824, 1.0}{0.0, 100.0, 150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 1200.0}
|
||||
[388] = "%.4f", -- Backseat - MACH 2
|
||||
-- RKL-41
|
||||
[420] = "%.4f", -- Backseat - RKL-41 needle {0.0, 1.0}{0.0, math.pi * 2.0}
|
||||
[513] = "%.4f", -- Backseat - RKL-41 Signal
|
||||
-- oxygen interface
|
||||
[477] = "%.4f", -- Backseat - OxygenPressure {0.0, 0.025, 0.925, 1.0}{0.0, 10.0, 150.0, 160.0}
|
||||
[478] = "%.4f", -- Backseat - FlowBlinker
|
||||
-- accelerometer
|
||||
[550] = "%.4f", -- Backseat - CockpitAlt {0.0, 1.0}{0.0, 20000.0}
|
||||
[551] = "%.4f", -- Backseat - PressDiff {0.0, 0.102, 0.202, 0.398, 0.779, 1.0}{-0.04, -0.02, 0.0, 0.1, 0.4, 0.6}
|
||||
-- Fuel Quantity
|
||||
[427] = "%.4f", -- Backseat - Fuel Quantity {0.0, 0.127, 0.239, 0.35, 0.458, 0.56, 0.685, 0.82, 1.0}{0.0, 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 825.0}
|
||||
-- Fan RPM
|
||||
[425] = "%.4f", -- Backseat - Fan RPM {0.0, 0.09, 0.18, 0.28, 0.372, 0.468, 0.555, 0.645, 0.733, 0.822, 0.909, 1.0}{0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}
|
||||
-- Compressor RPM
|
||||
[424] = "%.4f", -- Backseat - Compressor RPM {0.0, 0.09, 0.18, 0.28, 0.372, 0.468, 0.555, 0.645, 0.733, 0.822, 0.909, 1.0}{0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}
|
||||
-- Oil
|
||||
[423] = "%.4f", -- Backseat - Oil Temp {0.0, 0.323, 0.576, 0.817, 1.0}{-50.0, 0.0, 50.0, 100.0, 150.0}
|
||||
[422] = "%.4f", -- Backseat - Oil Press {0.0, 0.077, 1.0}{-1.0, 0.0, 6.0}
|
||||
-- Fuel Press
|
||||
[421] = "%.4f", -- Backseat - Fuel Press {0.0, 0.06, 0.148, 0.323, 0.547, 0.659, 0.801, 1.0}{-1.0, 0.0, 20.0, 40.0, 60.0, 70.0, 80.0, 100.0}
|
||||
-- lights system
|
||||
--[559] = "%.4f", -- Backseat - CptInstrumentLightsIntensity
|
||||
-- RKL-41 Radio Compass
|
||||
[564] = "%.f", -- Backseat - FarNDBSelectorLamp CP
|
||||
[571] = "%.f", -- Backseat - NearNDBSelectorLamp CP
|
||||
[566] = "%.f", -- Backseat - RKL PanelLights
|
||||
-- BrakeHandle
|
||||
[542] = "%.4f", -- Backseat - BrakeHandle CP
|
||||
-- Lamps
|
||||
[358] = "%.f", -- Backseat - MRP 56 Instructor
|
||||
[347] = "%.f", -- Backseat - MainGen Instructor
|
||||
[350] = "%.f", -- Backseat - ReserveGen Instructor
|
||||
[353] = "%.f", -- Backseat - Inverter115 Instructor
|
||||
[357] = "%.f", -- Backseat - Inverter363 Instructor
|
||||
[462] = "%.f", -- Backseat - FlapsUp
|
||||
[463] = "%.f", -- Backseat - FlapsTO
|
||||
[464] = "%.f", -- Backseat - FlapsDn
|
||||
[436] = "%.f", -- Backseat - AirBrakes
|
||||
[432] = "%.f", -- Backseat - GearDown front
|
||||
[431] = "%.f", -- Backseat - GearDown left
|
||||
[433] = "%.f", -- Backseat - GearDown right
|
||||
[429] = "%.f", -- Backseat - GearUp front
|
||||
[428] = "%.f", -- Backseat - GearUp left
|
||||
[430] = "%.f", -- Backseat - GearUp right
|
||||
[434] = "%.f", -- Backseat - ExtendGears
|
||||
[435] = "%.f", -- Backseat - DoorsOu
|
||||
[356] = "%.f", -- Backseat - BreakdownFinished
|
||||
[443] = "%.f", -- Backseat - GA TILT
|
||||
[343] = "%.f", -- Backseat - DangerAltitudeInstructor
|
||||
[365] = "%.f", -- Backseat - EmergFuel
|
||||
[345] = "%.f", -- Backseat - Remain150
|
||||
[348] = "%.f", -- Backseat - DoNotStart
|
||||
[364] = "%.f", -- Backseat - FuelFilter
|
||||
[355] = "%.f", -- Backseat - WingTanks
|
||||
[441] = "%.f", -- Backseat - TrimmerRollNeutral
|
||||
[442] = "%.f", -- Backseat - TrimmerPitchNeutral
|
||||
[344] = "%.f", -- Backseat - MachMeterLamp
|
||||
[351] = "%.f", -- Backseat - CanopyNotClosed
|
||||
[349] = "%.f", -- Backseat - Vibration
|
||||
[342] = "%.f", -- Backseat - Fire
|
||||
[352] = "%.f", -- Backseat - CockpitPressure
|
||||
[361] = "%.f", -- Backseat - ConditioningClosed
|
||||
[363] = "%.f", -- Backseat - Defrost
|
||||
[360] = "%.f", -- Backseat - Ice
|
||||
[346] = "%.f", -- Backseat - HydraulicPressureDrop
|
||||
[455] = "%.f", -- Backseat - MasterDanger
|
||||
[565] = "%.f", -- Backseat - RadioUnderControl
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Front Seat
|
||||
-- ASP-3NMU Gunsight
|
||||
[101] = "%1d", -- ASP-3NMU Gunsight Mode, GYRO/FIXED
|
||||
[102] = "%.1f", -- ASP-3NMU Gunsight Brightness Knob (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[103] = "%.1f", -- ASP-3NMU Gunsight Target Wingspan Adjustment Dial (meters) (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[104] = "%1d", -- ASP-3NMU Gunsight Color Filter, ON/OFF
|
||||
[105] = "%1d", -- ASP-3NMU Gunsight Fixed Reticle Mask Lever
|
||||
[106] = "%.1f", -- ASP-3NMU Gunsight Mirror Depression (Axis) {0.0, 1.0} in 0.05 Steps
|
||||
[107] = "%.1f", -- ASP-3NMU Gunsight Target Distance (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- CLOCK
|
||||
[335] = "%1d", -- Mech clock left lever Button
|
||||
[336] = "%.1f", -- Mech clock left lever (Axis) {0.0, 1.0} in 0.04 Steps
|
||||
[337] = "%1d", -- Mech clock right lever Button
|
||||
[338] = "%.1f", -- Mech clock right lever (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Baro Altimeter
|
||||
[57] = "%.f2", -- Baro pressure QFE knob (Axis) {0.0, 1.0} in 0.6 Steps
|
||||
-- Radar Altimeter
|
||||
[60] = "%1d", -- RV-5M Radio Altimeter Test Button
|
||||
[61] = "%.2f", -- RV-5M Radio Altimeter Decision Height Knob (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- GMK
|
||||
[204] = "%1d", -- GMK-1AE GMC Hemisphere Selection Switch, N(orth)/S(outh)
|
||||
[207] = "%1d", -- GMK-1AE GMC Mode Switch, MC(Magnetic Compass Mode)/GC(Directional Gyro Mode)
|
||||
[205] = "%1d", -- GMK-1AE GMC Test Switch, 0(degrees)/OFF/300(degrees) - Use to check heading indication accuracy {-1.0,0.0,1.0}
|
||||
[208] = "%1d", -- GMK-1AE GMC Course Selector Switch, CCW/OFF/CW {-1.0,0.0,1.0}
|
||||
[209] = "%.2f", -- GMK-1AE GMC Latitude Selector Knob (Axis) {0.0, 1.0} in 0.02 Steps
|
||||
-- Gyro
|
||||
[124] = "%1d", -- MC Synchronization Button - Push to synchronize (level flight only)
|
||||
-- Magnetic Variation
|
||||
[532] = "%.2f", -- Magnetic Declination set Knob (Axis) {0.0, 1.0} in 0.05 Steps
|
||||
-- KPP-1273K (ADI)
|
||||
[30] = "%1d", -- KPP-1273K Attitude Director Indicator (ADI) Cage Button
|
||||
[39] = "%.2f", -- KPP-1273K Attitude Director Indicator (ADI) Pitch Trim Knob {-1.0, 1.0} in 0.05 Steps
|
||||
[177] = "%1d", -- SDU Switch, ON/OFF
|
||||
[460] = "%1d", -- AGD Pitch Failure
|
||||
[461] = "%1d", -- AGD Bank Failure
|
||||
-- NPP (HSI)
|
||||
[48] = "%.2f", -- HSI Course set Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[526] = "%1d", -- Course Accordance
|
||||
[458] = "%1d", -- GMK Failure
|
||||
-- ISKRA (RSBN)
|
||||
[178] = "%.1f", -- RSBN Mode Switch, LANDING/NAVIGATION/GLIDE PATH {0.0,0.1,0.2}
|
||||
[179] = "%1d", -- RSBN Identification Button
|
||||
[180] = "%1d", -- RSBN Test Button - Push to test
|
||||
[181] = "%.2f", -- RSBN Control Box Lighting Intensity Knob (Axis) {0.0, 0.8} in 0.04 Steps
|
||||
[184] = "%.2f", -- RSBN Volume Knob (Axis) {0.0, 0.8} in 0.04 Steps
|
||||
[187] = "%1d", -- Initial Azimuth {-1.0,0.0,1.0}
|
||||
[188] = "%1d", -- Initial Range {-1.0,0.0,1.0}
|
||||
[191] = "%.3f", -- RSBN Navigation Channel Selector Knob (Axis) {0.0, 1.0} in 0.025 Steps
|
||||
[192] = "%1d", -- RSBN Landing Channel Selector Knob (Axis) {0.0, 1.0} in 0.025 Steps
|
||||
[193] = "%1d", -- Set 0 Azimuth
|
||||
[201] = "%.2f", -- RSBN Field Elevation Knob (Axis) {0.0, 1.0} in 0.02 Steps
|
||||
[297] = "%1d", -- RSBN Listen Callsign Button - Push to listen
|
||||
[527] = "%1d", -- RSBN Emergency Landing Switch, ON/OFF
|
||||
-- Variometer
|
||||
[569] = "%.1f", -- Variometer adjustment knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- RKL-41
|
||||
[119] = "%1d", -- RKL-41 ADF Outer-Inner Beacon (Far-Near NDB) Switch
|
||||
[157] = "%.2f", -- RKL-41 ADF Volume Knob (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[161] = "%1d", -- RKL-41 ADF Brightness Knob (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[159] = "%1d", -- RKL-41 ADF Mode Switch, TLF(A3)/TLG(A1,A2)
|
||||
[160] = "%.1f", -- RKL-41 ADF Function Selector Switch, OFF/COMP(AUTO)/COMP(MAN)/ANT/LOOP {0.0,0.1,0.2,0.3,0.4}
|
||||
[162] = "%1d", -- RKL-41 ADF Loop Switch, LEFT/OFF/RIGHT {-1.0,0.0,1.0}
|
||||
[158] = "%1d", -- RKL-41 ADF Control Switch, TAKE CONTROL/HAND OVER CONTROL
|
||||
[165] = "%.2f", -- RKL-41 ADF Far NDB Frequency Tune (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[163] = "%.4f", -- RKL-41 ADF Far NDB 100kHz rotary (Axis) {0.0,0.938} in 0.0588 Steps
|
||||
[164] = "%.1f", -- RKL-41 ADF Far NDB 10kHz rotary (Axis) {0.0,0.9} in 0.1 Steps
|
||||
[168] = "%.2f", -- RKL-41 ADF Near NDB Frequency Tune (Axis) {0.0,1.0} in 0.05 Steps
|
||||
[166] = "%.4f", -- RKL-41 ADF Near NDB 100kHz rotary (Axis) {0.0,0.938} in 0.0588 Steps
|
||||
[167] = "%.1f", -- RKL-41 ADF Near NDB 10kHz rotary (Axis) {0.0,0.9} in 0.1 Steps
|
||||
[459] = "%1d", -- ARK Failure
|
||||
-- electric system
|
||||
[141] = "%1d", -- Battery Switch, ON/OFF
|
||||
[142] = "%1d", -- Main Generator Switch, ON/OFF
|
||||
[143] = "%1d", -- Emergency Generator Switch, ON/OFF
|
||||
[502] = "%1d", -- Net Switch, ON/OFF
|
||||
[169] = "%1d", -- Emergency Engine Instruments Power Switch, ON/OFF
|
||||
[315] = "%1d", -- Turbo Button
|
||||
[313] = "%1d", -- Stop Turbo Switch, ON/OFF
|
||||
[326] = "%1d", -- Engine Button
|
||||
[320] = "%1d", -- Emergency Fuel Switch
|
||||
[322] = "%.1f", -- Engine Start Mode Switch, START/FALSE START/COLD CRANKING {0.0,0.1,0.2}
|
||||
[144] = "%1d", -- CB Engine Switch, ON/OFF
|
||||
[145] = "%1d", -- CB AGD-GMK Switch, ON/OFF
|
||||
[146] = "%1d", -- CB Inverter 1 (AC 115V) Switch, ON/OFF
|
||||
[147] = "%1d", -- CB Inverter 2 (AC 115V) Switch, ON/OFF
|
||||
[148] = "%1d", -- CB RDO (ICS and Radio) Switch, ON/OFF
|
||||
[149] = "%1d", -- CB MRP-RV (Marker Beacon Receiver and Radio Altimeter) Switch, ON/OFF
|
||||
[150] = "%1d", -- CB RSBN (ISKRA) Switch, ON/OFF
|
||||
[151] = "%1d", -- CB IFF (SRO) Emergency Connection Switch, ON/OFF
|
||||
[152] = "%1d", -- CB RSBN (ISKRA) Emergency Connection Switch, ON/OFF
|
||||
[153] = "%1d", -- CB Wing Tanks Switch, ON/OFF
|
||||
[154] = "%1d", -- CB RIO-3 De-Icing Signal Switch, ON/OFF
|
||||
[155] = "%1d", -- CB SDU Switch, ON/OFF
|
||||
[505] = "%1d", -- CB Weapon Switch, ON/OFF
|
||||
[211] = "%1d", -- CB Air Conditioning, ON/OFF
|
||||
[212] = "%1d", -- CB Anti-Ice, ON/OFF
|
||||
[213] = "%1d", -- CB Pitot Left, ON/OFF
|
||||
[214] = "%1d", -- CB Pitot Right, ON/OFF
|
||||
[215] = "%1d", -- CB PT-500C, ON/OFF
|
||||
[216] = "%1d", -- CB ARC, ON/OFF
|
||||
[217] = "%1d", -- CB SRO, ON/OFF
|
||||
[218] = "%1d", -- CB Seat-Helmet, ON/OFF
|
||||
[219] = "%1d", -- CB Gears, ON/OFF
|
||||
[220] = "%1d", -- CB Control, ON/OFF
|
||||
[221] = "%1d", -- CB Signaling, ON/OFF
|
||||
[222] = "%1d", -- CB Nav. Lights, ON/OFF
|
||||
[223] = "%1d", -- CB Spotlight Left, ON/OFF
|
||||
[224] = "%1d", -- CB Spotlight Right, ON/OFF
|
||||
[225] = "%1d", -- CB Red Lights, ON/OFF
|
||||
[226] = "%1d", -- CB White Lights, ON/OFF
|
||||
[227] = "%1d", -- CB Start Panel, ON/OFF
|
||||
[228] = "%1d", -- CB Booster Pump, ON/OFF
|
||||
[229] = "%1d", -- CB Ignition 1, ON/OFF
|
||||
[230] = "%1d", -- CB Ignition 2, ON/OFF
|
||||
[231] = "%1d", -- CB Engine Instruments, ON/OFF
|
||||
[232] = "%1d", -- CB Fire, ON/OFF
|
||||
[233] = "%1d", -- CB Emergency Jettison, ON/OFF
|
||||
[234] = "%1d", -- CB SARPP, ON/OFF
|
||||
[503] = "%1d", -- CB Seat, ON/OFF
|
||||
[504] = "%1d", -- CB Signal, ON/OFF
|
||||
[512] = "%1d", -- CB Ground Intercom, ON/OFF
|
||||
[294] = "%1d", -- Standby (Left) Pitot Tube Heating Button - Push to turn heating on
|
||||
[295] = "%1d", -- Main (Right) Pitot Tube Heating Button - Push to turn heating on
|
||||
[292] = "%1d", -- Standby (Left) Pitot Tube Heating Off Button - Push to turn heating off
|
||||
[293] = "%1d", -- Standby (Left) Pitot Tube Heating Off Button - Push to turn heating off
|
||||
-- lights system
|
||||
[176] = "%.1f", -- Navigation Lights Mode Control Switch, FLICKER/OFF/FIXED {0.0,0.5,1.0}
|
||||
[175] = "%.1f", -- Navigation Lights Intensity Control Switch, DIM(30%)/BRT(60%)/MAX(100%) {0.0,0.5,1.0}
|
||||
[311] = "%1d", -- Taxi and Landing Lights (Searchlights) Control Switch, TAXI/OFF/LANDING {-1.0,0.0,1.0}
|
||||
[330] = "%1d", -- Instrument Lighting Switch, Red/OFF/White {-1.0,0.0,1.0}
|
||||
[331] = "%.1f", -- Instrument Lights Intensity Knob (Axis) {0.1,0.9} in 0.1 Steps
|
||||
[249] = "%1d", -- Emergency Instrument Light Switch, ON/OFF
|
||||
[202] = "%.1f", -- Warning-Light Intensity Knob (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[203] = "%1d", -- Warning-Light Check Button - Push to check
|
||||
-- Weapon System
|
||||
[254] = "%1d", -- CB Armament System Power Switch, ON/OFF
|
||||
[255] = "%1d", -- CB UB-16 Rocket Firing Control Circuit Power Switch, ON/OFF
|
||||
[256] = "%1d", -- CB ASP-FKP (Gunsight and Gun Camera) Power Switch, ON/OFF
|
||||
[257] = "%1d", -- CB Missile Seeker Heating Circuit Power Switch, ON/OFF
|
||||
[258] = "%1d", -- CB Missile Seeker Glowing Circuit Power Switch, ON/OFF
|
||||
[259] = "%.1f", -- Missile Seeker Tone Volume Knob (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[268] = "%1d", -- Arm/Safe Bombs Emergency Jettison Switch, LIVE/BLANK
|
||||
[271] = "%.1f", -- Rockets Firing Mode Selector Switch, AUT./2RS/4RS {0.0,0.1,0.2}
|
||||
[509] = "%1d", -- Arm/Safe Bombs Emergency Jettison Switch, LIVE/BOMBS/BLANK {-1.0,0.0,1.0}
|
||||
[507] = "%1d", -- Emergency Jettison Switch, ON/OFF
|
||||
[273] = "%1d", -- EKSR-46 Signal Flare Dispenser Power Switch, ON/OFF
|
||||
[274] = "%1d", -- EKSR-46 Yellow Signal Flare Launch Button
|
||||
[275] = "%1d", -- EKSR-46 Green Signal Flare Launch Button
|
||||
[276] = "%1d", -- EKSR-46 Red Signal Flare Launch Button
|
||||
[277] = "%1d", -- EKSR-46 White Signal Flare Launch Button
|
||||
[260] = "%1d", -- Missile/Bomb Release Selector Switch, PORT(Left)/STARB-BOTH(Right for Missiles/Both)
|
||||
[270] = "%1d", -- Emergency Jettison Outboard Stations Switch, ON/OFF
|
||||
-- oxygen system
|
||||
[303] = "%1d", -- Emergency Oxygen Switch, ON/OFF
|
||||
[304] = "%1d", -- Diluter Demand Switch, 100% / MIX
|
||||
[307] = "%1d", -- Helmet Ventilation Switch, ON/OFF
|
||||
[306] = "%.2f", -- Oxygen Supply Valve (CLOSE - CW, OPEN - CCW) (Axis) {0.0,1.0} in 0.05 Steps
|
||||
[484] = "%.2f", -- Oxygen Interconnaction Valve (CLOSE - CW, OPEN - CCW) (Axis) {0.0,1.0} in 0.05 Steps
|
||||
-- sarpp
|
||||
[298] = "%1d", -- SARPP Flight Recorder, ON/OFF
|
||||
-- fuel system
|
||||
[296] = "%1d", -- Fuel Shut-Off Lever
|
||||
-- air system
|
||||
[245] = "%.1f", -- ECS and Pressurization Handle, OFF/CANOPIES SEALED/ECS ON (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[172] = "%.2f", -- Cabin Air Conditioning Control Switch, OFF/HEAT/COOL/AUTOMATIC {0.0,0.25} in 0.05 Steps
|
||||
[173] = "%.1f", -- Cabin Air Temperature Controller Rheostat (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[121] = "%.2f", -- Diffuser and Flight Suit Air Conditioning Control Switch, HEAT/AUTO/COOL {0.0,0.25} in 0.05 Steps
|
||||
[120] = "%.1f", -- Diffuser and Flight Suit Temperature Rheostat (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[511] = "%1d", -- Conditioning Shutoff Switch, OPEN/FRONT PILOT CONTROL/CLOSE {-1.0,0.0,1.0}
|
||||
-- anti-icing system
|
||||
[174] = "%1d", -- De-Icing Mode Switch, MANUAL/AUTOMATIC/OFF {0.0,0.1,0.2}
|
||||
[183] = "%1d", -- RIO-3 De-Icing Sensor Heating Circuit Check Button - Push to test
|
||||
-- helmet heating
|
||||
[309] = "%1d", -- Helmet Visor Quick Heating Button - Push to heat
|
||||
[308] = "%1d", -- Helmet Heating Mode Switch, AUTO/OFF/ON {0.0,0.5,1.0}
|
||||
[310] = "%.1f", -- Helmet Heating Temperature Rheostat (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- SPU-9
|
||||
[209] = "%1d", -- Reserve Intercom Switch, ON/OFF
|
||||
[291] = "%1d", -- ADF Audio Switch, ADF/OFF
|
||||
[288] = "%1d", -- Intercom Volume Knob (Axis) {0.0,0.8} in 0.05 Steps
|
||||
[289] = "%1d", -- Radio Volume Knob (Axis) {0.0,0.8} in 0.05 Steps
|
||||
[134] = "%1d", -- Radio Button
|
||||
[133] = "%1d", -- Intercom Button
|
||||
-- R-832M
|
||||
[287] = "%1d", -- Radio Control Switch, ON/OFF
|
||||
[286] = "%1d", -- Squelch Switch, ON/OFF
|
||||
[284] = "%1d", -- R-832M Preset Channel Selector Knob (Axis) {0.0,1.0} in 20 0.05 Steps
|
||||
-- engine systems
|
||||
[329] = "%1d", -- IV-300 Engine Vibration Test Button - Push to test
|
||||
[328] = "%1d", -- Fire Extinguish Button - Push to extinguish
|
||||
[272] = "%1d", -- Fire Warning Signal Test Switch, I/OFF/II {-1.0,0.0,1.0}
|
||||
[324] = "%1d", -- RT-12 JPT Regulator Manual Disable Switch, RT-12 DISABLED/RT-12 ENABLED
|
||||
[243] = "%1d", -- RT-12 JPT Regulator Power Switch, ON/OFF
|
||||
[242] = "%1d", -- RT-12 JPT Regulator Test Switch, I/OFF/II {-1.0,0.0,1.0}
|
||||
[499] = "%1d", -- EGT Indicator Switch, FRONT/REAR
|
||||
-- control system
|
||||
[281] = "%1d", -- Flaps Flight Position (0 degrees) Button
|
||||
[282] = "%1d", -- Flaps Takeoff Position (25 degrees) Button
|
||||
[283] = "%1d", -- Flaps Landing Position (44 degrees) Button
|
||||
[549] = "%1d", -- Throttle Limiter
|
||||
[135] = "%1d", -- Air Brake Switch {0.0,1.0}
|
||||
[136] = "%1d", -- Air Brake Switch (2nd position) {0.0,1.0}
|
||||
[118] = "%1d", -- Landing Gear Control Lever {-1.0,0.0,1.0}
|
||||
[334] = "%.1f", -- Emergency/Parking Wheel Brake Lever {0.0,1.0} in 0.1 Steps
|
||||
[334] = "%1d", -- Parking Brake Lever Flag - Push to remove parking brake
|
||||
[197] = "%1d", -- Main and Emergency Hydraulic Systems Interconnection Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[194] = "%1d", -- Emergency Landing Gear Extension Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[195] = "%1d", -- Emergency Flaps Extension Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[196] = "%1d", -- RAT (Emergency Generator) Emergency Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[456] = "%1d", -- Full Pressure Failure Lever, ON/STBY/FAILURE {-0.5,0.0,0.5}
|
||||
[457] = "%1d", -- Static Pressure Failure Lever, ON/STBY/FAILURE {-0.5,0.0,0.5}
|
||||
-- accelerometer
|
||||
[89] = "%1d", -- Reset Limits
|
||||
-- canopy
|
||||
[998] = "%1d", -- Canopy Handle
|
||||
[285] = "%1d", -- Forward Canopy Lock Handle
|
||||
[244] = "%1d", -- Forward Canopy Emergency Jettison Handle
|
||||
-- Pitot Selector
|
||||
[333] = "%1d", -- Pitot Tube Selector Lever, STBY(Left)/MAIN(Right)
|
||||
-- Back Seat
|
||||
-- CLOCK
|
||||
[412] = "%1d", -- Backseat - Mech clock left lever Button
|
||||
[413] = "%.1f", -- Backseat - Mech clock left lever (Axis) {0.0, 1.0} in 0.04 Steps
|
||||
[414] = "%1d", -- Backseat - Mech clock right lever Button
|
||||
[415] = "%.1f", -- Backseat - Mech clock right lever (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Baro Altimeter
|
||||
[394] = "%.f2", -- Backseat - Baro pressure QFE knob (Axis) {0.0, 1.0} in 0.6 Steps
|
||||
-- Radar Altimeter
|
||||
[398] = "%1d", -- Backseat - RV-5M Radio Altimeter Test Button
|
||||
[399] = "%.2f", -- Backseat - RV-5M Radio Altimeter Decision Height Knob (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- GMK
|
||||
-- Gyro
|
||||
[444] = "%1d", -- Backseat - MC Synchronization Button - Push to synchronize (level flight only)
|
||||
-- KPP-1273K (ADI)
|
||||
[367] = "%1d", -- Backseat - KPP-1273K Attitude Director Indicator (ADI) Cage Button
|
||||
[376] = "%.2f", -- Backseat - KPP-1273K Attitude Director Indicator (ADI) Pitch Trim Knob (Axis) {-1.0, 1.0} in 0.05 Steps
|
||||
-- NPP (HSI)
|
||||
[385] = "%.2f", -- Backseat - HSI Course set knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
-- Variometer
|
||||
[419] = "%.1f", -- Backseat - Variometer adjustment knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- RKL-41
|
||||
[440] = "%1d", -- Backseat - RKL-41 ADF Outer-Inner Beacon (Far-Near NDB) Switch
|
||||
[514] = "%.2f", -- Backseat - RKL-41 ADF Volume Knob (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[518] = "%.2f", -- Backseat - RKL-41 ADF Brightness Knob (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[516] = "%1d", -- Backseat - RKL-41 ADF Mode Switch, TLF(A3)/TLG(A1,A2)
|
||||
[517] = "%.1f", -- Backseat - RKL-41 ADF Function Selector Switch, OFF/COMP(AUTO)/COMP(MAN)/ANT/LOOP {0.0,0.1,0.2,0.3,0.4}
|
||||
[519] = "%1d", -- Backseat - RKL-41 ADF Loop Switch, LEFT/OFF/RIGHT
|
||||
[515] = "%1d", -- Backseat - RKL-41 ADF Control Switch, TAKE CONTROL/HAND OVER CONTROL
|
||||
[522] = "%.2f", -- Backseat - RKL-41 ADF Far NDB Frequency Tune (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[520] = "%.4f", -- Backseat - RKL-41 ADF Far NDB 100kHz rotary (Axis) {0.0,0.938} in 0.0588 Steps
|
||||
[521] = "%.1f", -- Backseat - RKL-41 ADF Far NDB 10kHz rotary (Axis) {0.0,0.9} in 0.1 Steps
|
||||
[525] = "%.2f", -- Backseat - RKL-41 ADF Near NDB Frequency Tune (Axis) {0.0,1.0} in 0.05 Steps
|
||||
[523] = "%.4f", -- Backseat - RKL-41 ADF Near NDB 100kHz rotary (Axis) {0.0,0.938} in 0.0588 Steps
|
||||
[524] = "%.1f", -- Backseat - RKL-41 ADF Near NDB 10kHz rotary (Axis) {0.0,0.9} in 0.1 Steps
|
||||
-- electric system
|
||||
[488] = "%1d", -- Backseat - Turbo Button
|
||||
[494] = "%1d", -- Backseat - Engine Button
|
||||
[490] = "%1d", -- Backseat - Stop Engine Switch
|
||||
[492] = "%1d", -- Backseat - Emergency Fuel Switch
|
||||
-- lights system
|
||||
[486] = "%1d", -- Backseat - Taxi and Landing Lights (Searchlights) Control Switch, TAXI/OFF/LANDING {-1.0,0.0,1.0}
|
||||
[497] = "%1d", -- Backseat - Instrument Lighting Switch, Red/OFF/White {-1.0,0.0,1.0}
|
||||
[498] = "%.1f", -- Backseat - Instrument Lights Intensity Knob (Axis) {0.1,0.9} in 0.1 Steps
|
||||
[537] = "%.1f", -- Backseat - Warning-Light Intensity Knob (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[538] = "%1d", -- Backseat - Warning-Light Check Button - Push to check
|
||||
-- oxygen system
|
||||
[479] = "%1d", -- Backseat - Emergency Oxygen Switch, ON/OFF
|
||||
[480] = "%1d", -- Backseat - Diluter Demand Switch, 100% / MIX
|
||||
[482] = "%.4f", -- Backseat - Oxygen Supply Valve (CLOSE - CW, OPEN - CCW) (Axis) {0.0,1.0} in 0.05 Steps
|
||||
-- fuel system
|
||||
[475] = "%1d", -- Backseat - Fuel Shut-Off Lever
|
||||
-- air system
|
||||
[245] = "%.1f", -- Backseat - ECS and Pressurization Handle, OFF/CANOPIES SEALED/ECS ON (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- SPU-9
|
||||
[473] = "%1d", -- Backseat - Reserve Intercom Switch, ON/OFF
|
||||
[474] = "%1d", -- Backseat - ADF Audio Switch, ADF/OFF
|
||||
[471] = "%1d", -- Backseat - Intercom Volume Knob (Axis) {0.0,0.8} in 0.05 Steps
|
||||
[472] = "%1d", -- Backseat - Radio Volume Knob (Axis) {0.0,0.8} in 0.05 Steps
|
||||
[547] = "%1d", -- Backseat - Radio Button
|
||||
[546] = "%1d", -- Backseat - Intercom Button
|
||||
-- R-832M
|
||||
[470] = "%1d", -- Backseat - Radio Control Switch, ON/OFF
|
||||
[469] = "%1d", -- Backseat - Squelch Switch, ON/OFF
|
||||
[468] = "%1d", -- Backseat - R-832M Preset Channel Selector Knob (Axis) {0.0,1.0} in 20 0.05 Steps
|
||||
-- control system
|
||||
[465] = "%1d", -- Backseat - Flaps Flight Position (0 degrees) Button
|
||||
[466] = "%1d", -- Backseat - Flaps Takeoff Position (25 degrees) Button
|
||||
[467] = "%1d", -- Backseat - Flaps Landing Position (44 degrees) Button
|
||||
[548] = "%1d", -- Backseat - Air Brake Switch {-1.0, 0.0, 1.0}
|
||||
[437] = "%1d", -- Backseat - Landing Gear Control Lever {0.0,0.5,1.0} ??? eigentlich 4 Positionen
|
||||
[501] = "%.1f", -- Backseat - Emergency Wheel Brake Lever {0.0,1.0} in 0.1 Steps
|
||||
[536] = "%1d", -- Backseat - Main and Emergency Hydraulic Systems Interconnection Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[533] = "%1d", -- Backseat - Emergency Landing Gear Extension Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[534] = "%1d", -- Backseat - Emergency Flaps Extension Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[535] = "%1d", -- Backseat - RAT (Emergency Generator) Emergency Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
-- canopy
|
||||
[999] = "%1d", -- Backseat - Canopy Handle
|
||||
[485] = "%1d", -- Backseat - Canopy Lock Handle
|
||||
[539] = "%1d", -- Backseat - Canopy Emergency Jettison Handle
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- Front Seat
|
||||
|
||||
-- ADI correction
|
||||
--[31] = "%.4f", -- KPP 1273K pitch {-0.5, 0.5} {-math.pi / 2.0, math.pi / 2.0}
|
||||
--[40] = "%.4f", -- KPP 1273K sideslip {-1.0, 1.0}
|
||||
local lPitch = mainPanelDevice:get_argument_value(31)
|
||||
|
||||
lPitch = lPitch * 2
|
||||
|
||||
ExportScript.Tools.SendData(31, string.format("%.4f", lPitch))
|
||||
ExportScript.Tools.SendData(40, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(40)))) -- negate
|
||||
|
||||
-- HSI correction
|
||||
--[41] = "%.4f", -- HSI heading {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
--[42] = "%.4f", -- HSI commanded course needle (wihte needle) {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
local lCommandCourse = mainPanelDevice:get_argument_value(42)
|
||||
|
||||
lCommandCourse = lCommandCourse + 0.5 -- 180 degree turn
|
||||
|
||||
ExportScript.Tools.SendData(41, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(41)))) -- negate
|
||||
ExportScript.Tools.SendData(42, string.format("%.4f", lCommandCourse))
|
||||
|
||||
-- Back Seat
|
||||
|
||||
-- ADI correction
|
||||
--[368] = "%.4f", -- KPP 1273K pitch {-0.5, 0.5} {-math.pi / 2.0, math.pi / 2.0}
|
||||
--[377] = "%.4f", -- KPP 1273K sideslip {-1.0, 1.0}
|
||||
local lPitch2 = mainPanelDevice:get_argument_value(368)
|
||||
|
||||
lPitch2 = lPitch2 * 2
|
||||
|
||||
ExportScript.Tools.SendData(368, string.format("%.4f", lPitch2))
|
||||
ExportScript.Tools.SendData(377, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(377)))) -- negate
|
||||
|
||||
-- HSI correction
|
||||
--[378] = "%.4f", -- HSI heading {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
--[379] = "%.4f", -- HSI commanded course needle (wihte needle) {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
local lCommandCourse2 = mainPanelDevice:get_argument_value(379)
|
||||
|
||||
lCommandCourse2 = lCommandCourse2 + 0.5 -- 180 degree turn
|
||||
|
||||
ExportScript.Tools.SendData(378, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(378))))-- negate
|
||||
ExportScript.Tools.SendData(379, string.format("%.4f", lCommandCourse2))
|
||||
|
||||
-- VD-20 Presseure correction
|
||||
--[56] = "%.4f", -- VD-20 PRESS {0.0, 1.0}{670.0, 826.0}
|
||||
local lVD_20_PRESS = mainPanelDevice:get_argument_value(56)
|
||||
--ExportScript.Tools.WriteToLog('Pressure: '..ExportScript.Tools.dump(lVD_20_PRESS))
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 0.89 -- maximaler Ausgabewert
|
||||
x_min = 0.0 -- minimaler Eingangswert
|
||||
x_max = 0.76793104410172 -- maximaler Eingangswert
|
||||
x = 0.57506740093231 -- aktueller Eingangswert
|
||||
|
||||
d_y = 0.89 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 0.76793104410172 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 1.158958225267568124678891052043 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = 0.0000000000000000000000000000002387929418604 (2.387929418604e-32) -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.66648 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
if gVD_20_PRESS ~= lVD_20_PRESS then
|
||||
gVD_20_PRESS = lVD_20_PRESS
|
||||
lVD_20_PRESS = 1.158958225267568124678891052043 * lVD_20_PRESS + 0.0000000000000000000000000000002387929418604
|
||||
--ExportScript.Tools.WriteToLog('Pressure2: '..ExportScript.Tools.dump(lVD_20_PRESS))
|
||||
ExportScript.Tools.SendData(56, string.format("%.4f", lVD_20_PRESS))
|
||||
end
|
||||
|
||||
--[393] = "%.4f", -- Backseat - VD-20 PRESS {0.0, 1.0}{670.0, 826.0}
|
||||
local lVD_20_PRESS_Backseat = mainPanelDevice:get_argument_value(393)
|
||||
--ExportScript.Tools.WriteToLog('Pressure: '..ExportScript.Tools.dump(lVD_20_PRESS_Backseat))
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 0.89 -- maximaler Ausgabewert
|
||||
x_min = 0.0 -- minimaler Eingangswert
|
||||
x_max = 0.76793104410172 -- maximaler Eingangswert
|
||||
x = 0.57506740093231 -- aktueller Eingangswert
|
||||
|
||||
d_y = 0.89 -- Delta Ausga
|
||||
d_x = 0.76793104410172 -- Delta Eingangswerte (x_max
|
||||
m = 1.158958225267568124678891052043 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = 0.0000000000000000000000000000002387929418604 (2.387929418604e-32) -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.66648 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
if gVD_20_PRESS_Backseat ~= lVD_20_PRESS_Backseat then
|
||||
gVD_20_PRESS_Backseat = lVD_20_PRESS_Backseat
|
||||
lVD_20_PRESS_Backseat = 1.158958225267568124678891052043 * lVD_20_PRESS_Backseat + 0.0000000000000000000000000000002387929418604
|
||||
--ExportScript.Tools.WriteToLog('Pressure2: '..ExportScript.Tools.dump(lVD_20_PRESS_Backseat))
|
||||
ExportScript.Tools.SendData(393, string.format("%.4f", lVD_20_PRESS_Backseat))
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- R_832M Channel
|
||||
local R_832M = {[0.0]="0",[0.05]="1",[0.1]="2",[0.15]="3",[0.2]="4",[0.25]="5",[0.3]="6",[0.35]="7",[0.4]="8",[0.45]="9",[0.5]="10",[0.55]="11",[0.6]="12",[0.65]="13",[0.7]="14",[0.75]="15",[0.8]="16",[0.85]="17",[0.9]="18",[0.95]="19"}
|
||||
ExportScript.Tools.SendData(2000, R_832M[ExportScript.Tools.round(mainPanelDevice:get_argument_value(284), 2)])
|
||||
--ExportScript.Tools.WriteToLog('R_832M Channel: '..ExportScript.Tools.dump(mainPanelDevice:get_argument_value(284))..', '..R_832M[ExportScript.Tools.round(mainPanelDevice:get_argument_value(284), 2)])
|
||||
|
||||
-- R_832M Frequency
|
||||
local lR_832M_F = GetDevice(19)
|
||||
if lR_832M_F:is_on() then
|
||||
--ExportScript.Tools.SendData(2001, string.format("%7.3f", lR_832M_F:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.RoundFreqeuncy(lR_832M_F:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('R_832M Frequency: '..ExportScript.Tools.dump(string.format("%7.3f", lR_832M_F:get_frequency()/1000000)))
|
||||
else
|
||||
ExportScript.Tools.SendData(2001, " ")
|
||||
end
|
||||
|
||||
-- RSBN
|
||||
--[189] = "%.4f", -- RSBN NAV Chan {0.0, 0.39} {1.0, 40.0}
|
||||
--[190] = "%.4f", -- RSBN LAND Chan {0.0, 0.39} {1.0, 40.0}
|
||||
local lRSBN_Chan = {[0.0]="01",[0.01]="02",[0.02]="03",[0.03]="04",[0.04]="05",[0.05]="06",[0.06]="07",[0.07]="08",[0.08]="09",[0.09]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20",[0.20]="21",[0.21]="22",[0.22]="23",[0.23]="24",[0.24]="25",[0.25]="26",[0.26]="27",[0.27]="28",[0.28]="29",[0.29]="30",[0.30]="31",[0.31]="32",[0.32]="33",[0.33]="34",[0.34]="35",[0.35]="36",[0.36]="37",[0.37]="38",[0.38]="39",[0.39]="40"}
|
||||
ExportScript.Tools.SendData(189, lRSBN_Chan[ExportScript.Tools.round(mainPanelDevice:get_argument_value(189), 2)])
|
||||
--ExportScript.Tools.WriteToLog('RSBN 1: '..ExportScript.Tools.dump(mainPanelDevice:get_argument_value(189)))
|
||||
--ExportScript.Tools.WriteToLog('RSBN 2: '..ExportScript.Tools.dump(ExportScript.Tools.round(mainPanelDevice:get_argument_value(189), 2)))
|
||||
|
||||
ExportScript.Tools.SendData(190, lRSBN_Chan[ExportScript.Tools.round(mainPanelDevice:get_argument_value(190), 2)])
|
||||
--ExportScript.Tools.WriteToLog('RSBN 1: '..ExportScript.Tools.dump(mainPanelDevice:get_argument_value(190)))
|
||||
--ExportScript.Tools.WriteToLog('RSBN 2: '..ExportScript.Tools.dump(ExportScript.Tools.round(mainPanelDevice:get_argument_value(190), 2)))
|
||||
|
||||
-- Cockpit Light
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {222, 225, 226, 497})
|
||||
-- CB Nav. Lights, CB Red Lights, CB White Lights, Backseat - Instrument Lighting Switch
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF RADIO:get frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- R_832M Channel
|
||||
local R_832M = {[0.0]="0",[0.05]="1",[0.1]="2",[0.15]="3",[0.2]="4",[0.25]="5",[0.3]="6",[0.35]="7",[0.4]="8",[0.45]="9",[0.5]="10",[0.55]="11",[0.6]="12",[0.65]="13",[0.7]="14",[0.75]="15",[0.8]="16",[0.85]="17",[0.9]="18",[0.95]="19"}
|
||||
ExportScript.Tools.SendDataDAC(2000, R_832M[ExportScript.Tools.round(mainPanelDevice:get_argument_value(284), 2)])
|
||||
--ExportScript.Tools.WriteToLog('R_832M Channel: '..ExportScript.Tools.dump(mainPanelDevice:get_argument_value(284))..', '..R_832M[ExportScript.Tools.round(mainPanelDevice:get_argument_value(284), 2)])
|
||||
|
||||
|
||||
-- R_832M Frequency
|
||||
local lR_832M_F = GetDevice(19)
|
||||
if lR_832M_F:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC(2001, string.format("%7.3f", lR_832M_F:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC(2001, ExportScript.Tools.RoundFreqeuncy(lR_832M_F:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('R_832M Frequency: '..ExportScript.Tools.dump(string.format("%7.3f", lR_832M_F:get_frequency()/1000000)))
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC(2001, " ")
|
||||
end
|
||||
|
||||
-- RSBN
|
||||
--[189] = "%.4f", -- RSBN NAV Chan {0.0, 0.39} {1.0, 40.0}
|
||||
--[190] = "%.4f", -- RSBN LAND Chan {0.0, 0.39} {1.0, 40.0}
|
||||
local lRSBN_Chan = {[0.0]="01",[0.01]="02",[0.02]="03",[0.03]="04",[0.04]="05",[0.05]="06",[0.06]="07",[0.07]="08",[0.08]="09",[0.09]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20",[0.20]="21",[0.21]="22",[0.22]="23",[0.23]="24",[0.24]="25",[0.25]="26",[0.26]="27",[0.27]="28",[0.28]="29",[0.29]="30",[0.30]="31",[0.31]="32",[0.32]="33",[0.33]="34",[0.34]="35",[0.35]="36",[0.36]="37",[0.37]="38",[0.38]="39",[0.39]="40"}
|
||||
ExportScript.Tools.SendDataDAC(189, lRSBN_Chan[ExportScript.Tools.round(mainPanelDevice:get_argument_value(189), 2)])
|
||||
|
||||
ExportScript.Tools.SendDataDAC(190, lRSBN_Chan[ExportScript.Tools.round(mainPanelDevice:get_argument_value(190), 2)])
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-- global VD-20 Pressure variable
|
||||
gVD_20_PRESS = 0
|
||||
gVD_20_PRESS_Backseat = 0
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
852
Scripts/DCS-ExportScript/ExportsModules/L-39ZA.lua
Normal file
852
Scripts/DCS-ExportScript/ExportsModules/L-39ZA.lua
Normal file
@@ -0,0 +1,852 @@
|
||||
-- L-39ZA
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.L39ZA = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
-- Front Seat
|
||||
-- Mechanic clock
|
||||
[67] = "%.4f", -- CLOCK currtime hours
|
||||
[68] = "%.4f", -- CLOCK currtime minutes
|
||||
[70] = "%.4f", -- CLOCK seconds meter time seconds
|
||||
[73] = "%.4f", -- CLOCK flight time meter status
|
||||
[71] = "%.4f", -- CLOCK flight hours
|
||||
[72] = "%.4f", -- CLOCK flight minutes
|
||||
[69] = "%.4f", -- CLOCK seconds meter time minutes
|
||||
-- Radar altimeter RV-5
|
||||
[58] = "%.4f", -- RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0}
|
||||
[59] = "%.4f", -- RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0}
|
||||
[62] = "%.4f", -- RV-5 warning flag
|
||||
[63] = "%.f", -- RV-5 DangerRALT lamp
|
||||
-- Variometer
|
||||
[74] = "%.4f", -- Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0}
|
||||
[76] = "%.4f", -- Variometer sideslip {-1.0, 1.0}
|
||||
[75] = "%.4f", -- Variometer turn {-1.0, -0.58, -0.275, 0.275, 0.58, 1.0} {-math.rad(5.7), math.rad(-3.8), math.rad(-1.9), math.rad(1.9), math.rad(3.8), math.rad(5.7)}
|
||||
-- KPP (ADI)
|
||||
[38] = "%.4f", -- KPP 1273K roll {-1.0, 1.0} {-math.pi, math.pi}
|
||||
--[31] = "%.4f", -- KPP 1273K pitch {-0.5, 0.5} {-math.pi / 2.0, math.pi / 2.0}
|
||||
--[40] = "%.4f", -- KPP 1273K sideslip {-1.0, 1.0}
|
||||
[35] = "%.4f", -- KPP Course Deviation Bar {-1.0, 1.0}
|
||||
[34] = "%.4f", -- KPP Alt Deviation Bar {-1.0, 1.0}
|
||||
[36] = "%1d", -- KPP Glide Beacon
|
||||
[37] = "%1d", -- KPP Localizer Beacon
|
||||
[29] = "%.4f", -- KPP Arretir
|
||||
[32] = "%.4f", -- KPP SDU Roll {-1.0, 1.0}
|
||||
[33] = "%.4f", -- KPP SDU Pitch {-1.0, 1.0}
|
||||
-- NPP (HSI)
|
||||
--[41] = "%.4f", -- HSI heading {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
--[42] = "%.4f", -- HSI commanded course needle (yellow needle) {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
[43] = "%.4f", -- HSI bearing needle {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
[47] = "%.4f", -- HSI Course Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[45] = "%.4f", -- HSI Alt Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[46] = "%.4f", -- HSI Glide Beacon G
|
||||
[44] = "%.4f", -- HSI Localizer Beacon K
|
||||
-- RSBN
|
||||
[189] = "%.4f", -- RSBN NAV Chan {0.0, 0.39} {1.0, 40.0}
|
||||
[190] = "%.4f", -- RSBN LAND Chan {0.0, 0.39} {1.0, 40.0}
|
||||
[66] = "%.4f", -- RSBN Range 100
|
||||
[65] = "%.4f", -- RSBN Range 10
|
||||
[64] = "%.4f", -- RSBN Range 1
|
||||
[580] = "%.4f", -- RSBN PanelLightsLmp
|
||||
-- Barometric altimeter VD-20
|
||||
[52] = "%.4f", -- VD-20 km {0.0, 1.0}{0.0, 20.0}
|
||||
[53] = "%.4f", -- VD-20 m {0.0, 1.0}{0.0, 1000.0}
|
||||
[54] = "%.4f", -- VD-20 km Ind {0.0, 1.0}{0.0, 20.0}
|
||||
[55] = "%.4f", -- VD-20 m Ind {0.0, 1.0}{0.0, 1000.0}
|
||||
--[56] = "%.4f", -- VD-20 PRESS {0.0, 1.0}{670.0, 826.0}
|
||||
-- Barometric altimeter
|
||||
-- Altimeter Feet , copy of A-10 altimeter
|
||||
[637] = "%.4f", -- Altimeter_100_footPtr {0.0, 1.0}{0.0, 1000.0}
|
||||
[632] = "%.4f", -- Altimeter_10000_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[631] = "%.4f", -- Altimeter_1000_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[630] = "%.4f", -- Altimeter_100_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[636] = "%.4f", -- pressure_setting_0 {0.0, 1.0}{0.0, 10.0}
|
||||
[635] = "%.4f", -- pressure_setting_1 {0.0, 1.0}{0.0, 10.0}
|
||||
[634] = "%.4f", -- pressure_setting_2 {0.0, 1.0}{0.0, 10.0}
|
||||
[633] = "%.4f", -- pressure_setting_3 {0.0, 1.0}{0.0, 10.0}
|
||||
-- AIRSPEED AND MACH
|
||||
[49] = "%.4f", -- IAS {0.0, 0.08, 0.186, 0.296, 0.436, 0.55, 0.635, 0.705, 0.765, 0.824, 1.0}{0.0, 100.0, 150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 1200.0}
|
||||
[50] = "%.4f", -- TAS {0.0, 0.08, 0.186, 0.296, 0.436, 0.55, 0.635, 0.705, 0.765, 0.824, 1.0}{0.0, 100.0, 150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 1200.0}
|
||||
[51] = "%.4f", -- MACH
|
||||
-- RKL-41
|
||||
[77] = "%.4f", -- RKL-41 needle {0.0, 1.0}{0.0, math.pi * 2.0}
|
||||
[156] = "%.4f", -- RKL-41 Signal
|
||||
[531] = "%.4f", -- KM-8 heading {0.0, 1.0}{0.0, math.pi * 2.0}
|
||||
[530] = "%.4f", -- KM-8 variation {1.0, -1.0}{-math.pi, math.pi}
|
||||
-- electric interface
|
||||
[92] = "%.4f", -- Voltmeter {0.0, 1.0}{0.0, 40.0}
|
||||
[93] = "%.4f", -- Ampermeter {0.0, 1.0}{-100.0, 300.0}
|
||||
-- oxygen interface
|
||||
[301] = "%.4f", -- OxygenPressure {0.0, 0.025, 0.925, 1.0}{0.0, 10.0, 150.0, 160.0}
|
||||
[302] = "%.4f", -- FlowBlinker
|
||||
-- accelerometer
|
||||
[86] = "%.4f", -- Acceleration {0.0, 1.0}{-5.0, 10.0}
|
||||
[88] = "%.4f", -- AccelerationMin {0.31, 0.695}{-5.0, 1.0}
|
||||
[87] = "%.4f", -- AccelerationMax {0.0, 1.0}{-5.0, 10.0}
|
||||
--
|
||||
[95] = "%.4f", -- CockpitAlt {0.0, 1.0}{0.0, 20000.0}
|
||||
[96] = "%.4f", -- PressDiff {0.0, 0.102, 0.202, 0.398, 0.779, 1.0}{-0.04, -0.02, 0.0, 0.1, 0.4, 0.6}
|
||||
-- Hydro Pressure
|
||||
[198] = "%.4f", -- MainHydro PRESS {0.0, 1.0}{0.0, 200.0}
|
||||
[200] = "%.4f", -- AuxHydro PRESS {0.0, 1.0}{0.0, 200.0}
|
||||
[98] = "%.4f", -- BrakeLMainHydro PRESS {0.0, 1.0}{0.0, 60.0}
|
||||
[99] = "%.4f", -- BrakeRMainHydro PRESS {0.0, 1.0}{0.0, 60.0}
|
||||
[100] = "%.4f", -- BrakeAuxHydro PRESS {0.0, 1.0}{0.0, 60.0}
|
||||
-- Fuel Quantity
|
||||
[91] = "%.4f", -- Fuel Quantity {0.0, 0.127, 0.239, 0.35, 0.458, 0.56, 0.685, 0.82, 1.0}{0.0, 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 825.0}
|
||||
-- Fan RPM
|
||||
[85] = "%.4f", -- Fan RPM {0.0, 0.09, 0.18, 0.28, 0.372, 0.468, 0.555, 0.645, 0.733, 0.822, 0.909, 1.0}{0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}
|
||||
-- Compressor RPM
|
||||
[84] = "%.4f", -- Compressor RPM {0.0, 0.09, 0.18, 0.28, 0.372, 0.468, 0.555, 0.645, 0.733, 0.822, 0.909, 1.0}{0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}
|
||||
-- Oil
|
||||
[83] = "%.4f", -- Oil Temp {0.0, 0.323, 0.576, 0.817, 1.0}{-50.0, 0.0, 50.0, 100.0, 150.0}
|
||||
[82] = "%.4f", -- Oil Press {0.0, 0.077, 1.0}{-1.0, 0.0, 6.0}
|
||||
-- Fuel Press
|
||||
[81] = "%.4f", -- Fuel Press {0.0, 0.06, 0.148, 0.323, 0.547, 0.659, 0.801, 1.0}{-1.0, 0.0, 20.0, 40.0, 60.0, 70.0, 80.0, 100.0}
|
||||
-- Engine Temp
|
||||
[90] = "%.4f", -- Engine Temp {0.0, 1.0}{0.0, 900.0}
|
||||
-- EngineVibration
|
||||
[94] = "%.4f", -- EngineVibration {0.0, 1.0}{0.0, 100.0}
|
||||
-- PitchTrimInd
|
||||
[247] = "%.4f", -- PitchTrimInd {1.0, -1.0}{-1.0, 1.0}
|
||||
-- lights system
|
||||
--[533] = "%.4f", -- CptInstrumentLightsIntensity
|
||||
--[558] = "%.4f", -- CompassLightIntensity
|
||||
--[555] = "%.4f", -- EmergencyLightIntensity
|
||||
-- RKL-41 Radio Compass
|
||||
[561] = "%.f", -- FarNDBSelectorLamp
|
||||
[570] = "%.f", -- NearNDBSelectorLamp
|
||||
[563] = "%.f", -- PanelLights
|
||||
-- BrakeHandle
|
||||
[127] = "%.4f", -- BrakeHandle
|
||||
-- Lamps
|
||||
[18] = "%.f", -- MRP 56
|
||||
[6] = "%.f", -- MainGenerator
|
||||
[9] = "%.f", -- ReserveGennerator
|
||||
[12] = "%.f", -- Inverter115
|
||||
[16] = "%.f", -- Inverter363
|
||||
[316] = "%.f", -- GroundPower
|
||||
[278] = "%.f", -- FlapsUp
|
||||
[279] = "%.f", -- FlapsTO
|
||||
[280] = "%.f", -- FlapsDn
|
||||
[117] = "%.f", -- AirBrakes
|
||||
[113] = "%.f", -- GearDown front
|
||||
[112] = "%.f", -- GearDown left
|
||||
[114] = "%.f", -- GearDown right
|
||||
[110] = "%.f", -- GearUp front
|
||||
[109] = "%.f", -- GearUp left
|
||||
[111] = "%.f", -- GearUp right
|
||||
[115] = "%.f", -- ExtendGears
|
||||
[116] = "%.f", -- DoorsOut
|
||||
[185] = "%.f", -- RSBN Azim Correction
|
||||
[186] = "%.f", -- RSBN Range Correction
|
||||
[15] = "%.f", -- BreakdownFinished
|
||||
[123] = "%.f", -- GA TILT
|
||||
[206] = "%.f", -- GA TILT PU26
|
||||
[2] = "%.f", -- DangerAltitude
|
||||
[27] = "%.f", -- EmergFuel
|
||||
[23] = "%.f", -- TurboStarter
|
||||
[4] = "%.f", -- Remain150
|
||||
[7] = "%.f", -- DoNotStart
|
||||
[26] = "%.f", -- FuelFilter
|
||||
[14] = "%.f", -- WingTanks
|
||||
[246] = "%.f", -- TrimmerRollNeutral
|
||||
[3] = "%.f", -- MachMeterLamp
|
||||
[10] = "%.f", -- CanopyNotClosed
|
||||
[556] = "%.f", -- LeftPitot
|
||||
[557] = "%.f", -- RightPitot
|
||||
[8] = "%.f", -- Vibration
|
||||
[1] = "%.f", -- Fire
|
||||
[28] = "%.f", -- EngineTemperature700
|
||||
[24] = "%.f", -- EngineTemperature730
|
||||
[20] = "%.f", -- EngineMinOilPressure
|
||||
[359] = "%.f", -- RSBN Azim Correct
|
||||
[362] = "%.f", -- RSBN Range Correct
|
||||
[19] = "%.f", -- HSI Accordance
|
||||
[11] = "%.f", -- CockpitPressure
|
||||
[22] = "%.f", -- ConditioningClosed
|
||||
[25] = "%.f", -- Defrost
|
||||
[21] = "%.f", -- Ice
|
||||
[182] = "%.f", -- RIO HeatingOk
|
||||
[5] = "%.f", -- HydraulicPressureDrop
|
||||
[253] = "%.f", -- MasterDanger
|
||||
[17] = "%.f", -- EmergConditioning
|
||||
[562] = "%.f", -- RadioUnderControl
|
||||
[13] = "%.f", -- EmptyWingFuelTanks
|
||||
-- Back Seat
|
||||
-- Mechanic clock
|
||||
[405] = "%.4f", -- Backseat - CLOCK currtime hours
|
||||
[406] = "%.4f", -- Backseat - CLOCK currtime minutes
|
||||
[408] = "%.4f", -- Backseat - CLOCK seconds meter time seconds
|
||||
[411] = "%.4f", -- Backseat - CLOCK flight time meter status
|
||||
[409] = "%.4f", -- Backseat - CLOCK flight hours
|
||||
[410] = "%.4f", -- Backseat - CLOCK flight minutes
|
||||
[407] = "%.4f", -- Backseat - CLOCK seconds meter time minutes
|
||||
-- Radar altimeter RV-5
|
||||
[396] = "%.4f", -- Backseat - RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0}
|
||||
[397] = "%.4f", -- Backseat - RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0}
|
||||
[400] = "%.4f", -- Backseat - RV-5 warning flag
|
||||
[401] = "%.f", -- Backseat - RV-5 DangerRALT lamp
|
||||
-- Variometer
|
||||
[416] = "%.4f", -- Backseat - Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0}
|
||||
[418] = "%.4f", -- Backseat - Variometer sideslip {-1.0, 1.0}
|
||||
[417] = "%.4f", -- Backseat - Variometer turn {-1.0, 1.0} {-math.rad(6.0), math.rad(6.0)}
|
||||
-- KPP (ADI)
|
||||
[375] = "%.4f", -- Backseat - KPP 1273K roll {-1.0, 1.0} {-math.pi, math.pi}
|
||||
[368] = "%.4f", -- Backseat - KPP 1273K pitch {-0.5, 0.5} {-math.pi / 2.0, math.pi / 2.0}
|
||||
[377] = "%.4f", -- Backseat - KPP 1273K sideslip {-1.0, 1.0}
|
||||
[372] = "%.4f", -- Backseat - KPP Course Deviation Bar {-1.0, 1.0}
|
||||
[373] = "%.4f", -- Backseat - KPP Glide Beacon
|
||||
[374] = "%.4f", -- Backseat - KPP Localizer Beacon
|
||||
[366] = "%.4f", -- Backseat - KPP Arretir
|
||||
[369] = "%.4f", -- Backseat - KPP SDU Roll {-1.0, 1.0}
|
||||
[370] = "%.4f", -- Backseat - KPP SDU Pitch {-1.0, 1.0}
|
||||
-- NPP HSI
|
||||
--[378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
--[379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[380] = "%.4f", -- Backseat - HSI2 bearing needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[384] = "%.4f", -- Backseat - HSI2 Course Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[382] = "%.4f", -- Backseat - HSI2 Alt Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[383] = "%.4f", -- Backseat - HSI2 Glide Beacon
|
||||
[381] = "%.4f", -- Backseat - HSI2 Localizer Beacon
|
||||
-- RSPN
|
||||
[404] = "%.4f", -- Backseat - RSBN Range 100
|
||||
[403] = "%.4f", -- Backseat - RSBN Range 10
|
||||
[402] = "%.4f", -- Backseat - RSBN Range 1
|
||||
-- Barometric altimeter VD-20 instructor
|
||||
[389] = "%.4f", -- Backseat - VD-20 km {0.0, 1.0}{0.0, 20.0}
|
||||
[390] = "%.4f", -- Backseat - VD-20 m {0.0, 1.0}{0.0, 1000.0}
|
||||
[391] = "%.4f", -- Backseat - VD-20 km Ind {0.0, 1.0}{0.0, 20.0}
|
||||
[392] = "%.4f", -- Backseat - VD-20 m Ind {0.0, 1.0}{0.0, 1000.0}
|
||||
--[393] = "%.4f", -- Backseat - VD-20 PRESS {0.0, 1.0}{670.0, 826.0}
|
||||
-- Barometric altimeter
|
||||
-- Altimeter Feet , copy of A-10 altimeter
|
||||
[737] = "%.4f", -- Altimeter_100_footPtr {0.0, 1.0}{0.0, 1000.0}
|
||||
[732] = "%.4f", -- Altimeter_10000_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[731] = "%.4f", -- Altimeter_1000_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[730] = "%.4f", -- Altimeter_100_footCount {0.0, 1.0}{0.0, 10.0}
|
||||
[736] = "%.4f", -- pressure_setting_0 {0.0, 1.0}{0.0, 10.0}
|
||||
[735] = "%.4f", -- pressure_setting_1 {0.0, 1.0}{0.0, 10.0}
|
||||
[734] = "%.4f", -- pressure_setting_2 {0.0, 1.0}{0.0, 10.0}
|
||||
[733] = "%.4f", -- pressure_setting_3 {0.0, 1.0}{0.0, 10.0}
|
||||
-- AIRSPEED AND MACH
|
||||
[386] = "%.4f", -- Backseat - IAS {0.0, 0.08, 0.186, 0.296, 0.436, 0.55, 0.635, 0.705, 0.765, 0.824, 1.0}{0.0, 100.0, 150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 1200.0}
|
||||
[387] = "%.4f", -- Backseat - TAS {0.0, 0.08, 0.186, 0.296, 0.436, 0.55, 0.635, 0.705, 0.765, 0.824, 1.0}{0.0, 100.0, 150.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 1200.0}
|
||||
[388] = "%.4f", -- Backseat - MACH 2
|
||||
-- RKL-41
|
||||
[420] = "%.4f", -- Backseat - RKL-41 needle {0.0, 1.0}{0.0, math.pi * 2.0}
|
||||
[513] = "%.4f", -- Backseat - RKL-41 Signal
|
||||
-- oxygen interface
|
||||
[477] = "%.4f", -- Backseat - OxygenPressure {0.0, 0.025, 0.925, 1.0}{0.0, 10.0, 150.0, 160.0}
|
||||
[478] = "%.4f", -- Backseat - FlowBlinker
|
||||
-- accelerometer
|
||||
[550] = "%.4f", -- Backseat - CockpitAlt {0.0, 1.0}{0.0, 20000.0}
|
||||
[551] = "%.4f", -- Backseat - PressDiff {0.0, 0.102, 0.202, 0.398, 0.779, 1.0}{-0.04, -0.02, 0.0, 0.1, 0.4, 0.6}
|
||||
-- Fuel Quantity
|
||||
[427] = "%.4f", -- Backseat - Fuel Quantity {0.0, 0.127, 0.239, 0.35, 0.458, 0.56, 0.685, 0.82, 1.0}{0.0, 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 825.0}
|
||||
-- Fan RPM
|
||||
[425] = "%.4f", -- Backseat - Fan RPM {0.0, 0.09, 0.18, 0.28, 0.372, 0.468, 0.555, 0.645, 0.733, 0.822, 0.909, 1.0}{0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}
|
||||
-- Compressor RPM
|
||||
[424] = "%.4f", -- Backseat - Compressor RPM {0.0, 0.09, 0.18, 0.28, 0.372, 0.468, 0.555, 0.645, 0.733, 0.822, 0.909, 1.0}{0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0}
|
||||
-- Oil
|
||||
[423] = "%.4f", -- Backseat - Oil Temp {0.0, 0.323, 0.576, 0.817, 1.0}{-50.0, 0.0, 50.0, 100.0, 150.0}
|
||||
[422] = "%.4f", -- Backseat - Oil Press {0.0, 0.077, 1.0}{-1.0, 0.0, 6.0}
|
||||
-- Fuel Press
|
||||
[421] = "%.4f", -- Backseat - Fuel Press {0.0, 0.06, 0.148, 0.323, 0.547, 0.659, 0.801, 1.0}{-1.0, 0.0, 20.0, 40.0, 60.0, 70.0, 80.0, 100.0}
|
||||
-- lights system
|
||||
--[559] = "%.4f", -- Backseat - CptInstrumentLightsIntensity
|
||||
-- RKL-41 Radio Compass
|
||||
[564] = "%.f", -- Backseat - FarNDBSelectorLamp CP
|
||||
[571] = "%.f", -- Backseat - NearNDBSelectorLamp CP
|
||||
[566] = "%.f", -- Backseat - RKL PanelLights
|
||||
-- BrakeHandle
|
||||
[542] = "%.4f", -- Backseat - BrakeHandle CP
|
||||
-- Lamps
|
||||
[358] = "%.f", -- Backseat - MRP 56 Instructor
|
||||
[347] = "%.f", -- Backseat - MainGen Instructor
|
||||
[350] = "%.f", -- Backseat - ReserveGen Instructor
|
||||
[353] = "%.f", -- Backseat - Inverter115 Instructor
|
||||
[357] = "%.f", -- Backseat - Inverter363 Instructor
|
||||
[462] = "%.f", -- Backseat - FlapsUp
|
||||
[463] = "%.f", -- Backseat - FlapsTO
|
||||
[464] = "%.f", -- Backseat - FlapsDn
|
||||
[436] = "%.f", -- Backseat - AirBrakes
|
||||
[432] = "%.f", -- Backseat - GearDown front
|
||||
[431] = "%.f", -- Backseat - GearDown left
|
||||
[433] = "%.f", -- Backseat - GearDown right
|
||||
[429] = "%.f", -- Backseat - GearUp front
|
||||
[428] = "%.f", -- Backseat - GearUp left
|
||||
[430] = "%.f", -- Backseat - GearUp right
|
||||
[434] = "%.f", -- Backseat - ExtendGears
|
||||
[435] = "%.f", -- Backseat - DoorsOu
|
||||
[356] = "%.f", -- Backseat - BreakdownFinished
|
||||
[443] = "%.f", -- Backseat - GA TILT
|
||||
[343] = "%.f", -- Backseat - DangerAltitudeInstructor
|
||||
[365] = "%.f", -- Backseat - EmergFuel
|
||||
[345] = "%.f", -- Backseat - Remain150
|
||||
[348] = "%.f", -- Backseat - DoNotStart
|
||||
[364] = "%.f", -- Backseat - FuelFilter
|
||||
[355] = "%.f", -- Backseat - WingTanks
|
||||
[441] = "%.f", -- Backseat - TrimmerRollNeutral
|
||||
[442] = "%.f", -- Backseat - TrimmerPitchNeutral
|
||||
[344] = "%.f", -- Backseat - MachMeterLamp
|
||||
[351] = "%.f", -- Backseat - CanopyNotClosed
|
||||
[349] = "%.f", -- Backseat - Vibration
|
||||
[342] = "%.f", -- Backseat - Fire
|
||||
[352] = "%.f", -- Backseat - CockpitPressure
|
||||
[361] = "%.f", -- Backseat - ConditioningClosed
|
||||
[363] = "%.f", -- Backseat - Defrost
|
||||
[360] = "%.f", -- Backseat - Ice
|
||||
[346] = "%.f", -- Backseat - HydraulicPressureDrop
|
||||
[455] = "%.f", -- Backseat - MasterDanger
|
||||
[565] = "%.f", -- Backseat - RadioUnderControl
|
||||
[354] = "%.f", -- Backseat - EmptyWingFuelTanks
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Front Seat
|
||||
-- ASP-3NMU Gunsight
|
||||
[101] = "%1d", -- ASP-3NMU Gunsight Mode, GYRO/FIXED
|
||||
[102] = "%.1f", -- ASP-3NMU Gunsight Brightness Knob (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[103] = "%.1f", -- ASP-3NMU Gunsight Target Wingspan Adjustment Dial (meters) (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[104] = "%1d", -- ASP-3NMU Gunsight Color Filter, ON/OFF
|
||||
[105] = "%1d", -- ASP-3NMU Gunsight Fixed Reticle Mask Lever
|
||||
[106] = "%.1f", -- ASP-3NMU Gunsight Mirror Depression (Axis) {0.0, 1.0} in 0.05 Steps
|
||||
[107] = "%.1f", -- ASP-3NMU Gunsight Target Distance (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- CLOCK
|
||||
[335] = "%1d", -- Mech clock left lever Button
|
||||
[336] = "%.1f", -- Mech clock left lever (Axis) {0.0, 1.0} in 0.04 Steps
|
||||
[337] = "%1d", -- Mech clock right lever Button
|
||||
[338] = "%.1f", -- Mech clock right lever (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Baro Altimeter
|
||||
[57] = "%.f2", -- Baro pressure QFE knob (Axis) {0.0, 1.0} in 0.6 Steps
|
||||
-- Radar Altimeter
|
||||
[60] = "%1d", -- RV-5M Radio Altimeter Test Button
|
||||
[61] = "%.2f", -- RV-5M Radio Altimeter Decision Height Knob (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- GMK
|
||||
[204] = "%1d", -- GMK-1AE GMC Hemisphere Selection Switch, N(orth)/S(outh)
|
||||
[207] = "%1d", -- GMK-1AE GMC Mode Switch, MC(Magnetic Compass Mode)/GC(Directional Gyro Mode)
|
||||
[205] = "%1d", -- GMK-1AE GMC Test Switch, 0(degrees)/OFF/300(degrees) - Use to check heading indication accuracy {-1.0,0.0,1.0}
|
||||
[208] = "%1d", -- GMK-1AE GMC Course Selector Switch, CCW/OFF/CW {-1.0,0.0,1.0}
|
||||
[209] = "%.2f", -- GMK-1AE GMC Latitude Selector Knob (Axis) {0.0, 1.0} in 0.02 Steps
|
||||
-- Gyro
|
||||
[124] = "%1d", -- MC Synchronization Button - Push to synchronize (level flight only)
|
||||
-- Magnetic Variation
|
||||
[532] = "%.2f", -- Magnetic Declination set Knob (Axis) {0.0, 1.0} in 0.05 Steps
|
||||
-- KPP-1273K (ADI)
|
||||
[30] = "%1d", -- KPP-1273K Attitude Director Indicator (ADI) Cage Button
|
||||
[39] = "%.2f", -- KPP-1273K Attitude Director Indicator (ADI) Pitch Trim Knob {-1.0, 1.0} in 0.05 Steps
|
||||
[177] = "%1d", -- SDU Switch, ON/OFF
|
||||
[460] = "%1d", -- AGD Pitch Failure
|
||||
[461] = "%1d", -- AGD Bank Failure
|
||||
-- NPP (HSI)
|
||||
[48] = "%.2f", -- HSI Course set Knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[526] = "%1d", -- Course Accordance
|
||||
[458] = "%1d", -- GMK Failure
|
||||
-- ISKRA (RSBN)
|
||||
[178] = "%.1f", -- RSBN Mode Switch, LANDING/NAVIGATION/GLIDE PATH {0.0,0.1,0.2}
|
||||
[179] = "%1d", -- RSBN Identification Button
|
||||
[180] = "%1d", -- RSBN Test Button - Push to test
|
||||
[181] = "%.2f", -- RSBN Control Box Lighting Intensity Knob (Axis) {0.0, 0.8} in 0.04 Steps
|
||||
[184] = "%.2f", -- RSBN Volume Knob (Axis) {0.0, 0.8} in 0.04 Steps
|
||||
[187] = "%1d", -- Initial Azimuth {-1.0,0.0,1.0}
|
||||
[188] = "%1d", -- Initial Range {-1.0,0.0,1.0}
|
||||
[191] = "%.3f", -- RSBN Navigation Channel Selector Knob (Axis) {0.0, 1.0} in 0.025 Steps
|
||||
[192] = "%1d", -- RSBN Landing Channel Selector Knob (Axis) {0.0, 1.0} in 0.025 Steps
|
||||
[193] = "%1d", -- Set 0 Azimuth
|
||||
[201] = "%.2f", -- RSBN Field Elevation Knob (Axis) {0.0, 1.0} in 0.02 Steps
|
||||
[297] = "%1d", -- RSBN Listen Callsign Button - Push to listen
|
||||
[527] = "%1d", -- RSBN Emergency Landing Switch, ON/OFF
|
||||
-- Variometer
|
||||
[569] = "%.1f", -- Variometer adjustment knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- RKL-41
|
||||
[119] = "%1d", -- RKL-41 ADF Outer-Inner Beacon (Far-Near NDB) Switch
|
||||
[157] = "%.2f", -- RKL-41 ADF Volume Knob (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[161] = "%1d", -- RKL-41 ADF Brightness Knob (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[159] = "%1d", -- RKL-41 ADF Mode Switch, TLF(A3)/TLG(A1,A2)
|
||||
[160] = "%.1f", -- RKL-41 ADF Function Selector Switch, OFF/COMP(AUTO)/COMP(MAN)/ANT/LOOP {0.0,0.1,0.2,0.3,0.4}
|
||||
[162] = "%1d", -- RKL-41 ADF Loop Switch, LEFT/OFF/RIGHT {-1.0,0.0,1.0}
|
||||
[158] = "%1d", -- RKL-41 ADF Control Switch, TAKE CONTROL/HAND OVER CONTROL
|
||||
[165] = "%.2f", -- RKL-41 ADF Far NDB Frequency Tune (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[163] = "%.4f", -- RKL-41 ADF Far NDB 100kHz rotary (Axis) {0.0,0.938} in 0.0588 Steps
|
||||
[164] = "%.1f", -- RKL-41 ADF Far NDB 10kHz rotary (Axis) {0.0,0.9} in 0.1 Steps
|
||||
[168] = "%.2f", -- RKL-41 ADF Near NDB Frequency Tune (Axis) {0.0,1.0} in 0.05 Steps
|
||||
[166] = "%.4f", -- RKL-41 ADF Near NDB 100kHz rotary (Axis) {0.0,0.938} in 0.0588 Steps
|
||||
[167] = "%.1f", -- RKL-41 ADF Near NDB 10kHz rotary (Axis) {0.0,0.9} in 0.1 Steps
|
||||
[459] = "%1d", -- ARK Failure
|
||||
-- electric system
|
||||
[141] = "%1d", -- Battery Switch, ON/OFF
|
||||
[142] = "%1d", -- Main Generator Switch, ON/OFF
|
||||
[143] = "%1d", -- Emergency Generator Switch, ON/OFF
|
||||
[502] = "%1d", -- Net Switch, ON/OFF
|
||||
[169] = "%1d", -- Emergency Engine Instruments Power Switch, ON/OFF
|
||||
[315] = "%1d", -- Turbo Button
|
||||
[313] = "%1d", -- Stop Turbo Switch, ON/OFF
|
||||
[326] = "%1d", -- Engine Button
|
||||
[320] = "%1d", -- Emergency Fuel Switch
|
||||
[322] = "%.1f", -- Engine Start Mode Switch, START/FALSE START/COLD CRANKING {0.0,0.1,0.2}
|
||||
[144] = "%1d", -- CB Engine Switch, ON/OFF
|
||||
[145] = "%1d", -- CB AGD-GMK Switch, ON/OFF
|
||||
[146] = "%1d", -- CB Inverter 1 (AC 115V) Switch, ON/OFF
|
||||
[147] = "%1d", -- CB Inverter 2 (AC 115V) Switch, ON/OFF
|
||||
[148] = "%1d", -- CB RDO (ICS and Radio) Switch, ON/OFF
|
||||
[149] = "%1d", -- CB MRP-RV (Marker Beacon Receiver and Radio Altimeter) Switch, ON/OFF
|
||||
[150] = "%1d", -- CB RSBN (ISKRA) Switch, ON/OFF
|
||||
[151] = "%1d", -- CB IFF (SRO) Emergency Connection Switch, ON/OFF
|
||||
[152] = "%1d", -- CB RSBN (ISKRA) Emergency Connection Switch, ON/OFF
|
||||
[153] = "%1d", -- CB Wing Tanks Switch, ON/OFF
|
||||
[154] = "%1d", -- CB RIO-3 De-Icing Signal Switch, ON/OFF
|
||||
[155] = "%1d", -- CB SDU Switch, ON/OFF
|
||||
[628] = "%1d", -- CB Heating AOA Sensor Switch, ON/OFF
|
||||
[505] = "%1d", -- CB Weapon Switch, ON/OFF
|
||||
[211] = "%1d", -- CB Air Conditioning, ON/OFF
|
||||
[212] = "%1d", -- CB Anti-Ice, ON/OFF
|
||||
[213] = "%1d", -- CB Pitot Left, ON/OFF
|
||||
[214] = "%1d", -- CB Pitot Right, ON/OFF
|
||||
[215] = "%1d", -- CB PT-500C, ON/OFF
|
||||
[216] = "%1d", -- CB ARC, ON/OFF
|
||||
[217] = "%1d", -- CB SRO, ON/OFF
|
||||
[218] = "%1d", -- CB Seat-Helmet, ON/OFF
|
||||
[219] = "%1d", -- CB Gears, ON/OFF
|
||||
[220] = "%1d", -- CB Control, ON/OFF
|
||||
[221] = "%1d", -- CB Signaling, ON/OFF
|
||||
[222] = "%1d", -- CB Nav. Lights, ON/OFF
|
||||
[223] = "%1d", -- CB Spotlight Left, ON/OFF
|
||||
[224] = "%1d", -- CB Spotlight Right, ON/OFF
|
||||
[225] = "%1d", -- CB Red Lights, ON/OFF
|
||||
[226] = "%1d", -- CB White Lights, ON/OFF
|
||||
[227] = "%1d", -- CB Start Panel, ON/OFF
|
||||
[228] = "%1d", -- CB Booster Pump, ON/OFF
|
||||
[229] = "%1d", -- CB Ignition 1, ON/OFF
|
||||
[230] = "%1d", -- CB Ignition 2, ON/OFF
|
||||
[231] = "%1d", -- CB Engine Instruments, ON/OFF
|
||||
[232] = "%1d", -- CB Fire, ON/OFF
|
||||
[233] = "%1d", -- CB Emergency Jettison, ON/OFF
|
||||
[234] = "%1d", -- CB SARPP, ON/OFF
|
||||
[503] = "%1d", -- CB Seat, ON/OFF
|
||||
[504] = "%1d", -- CB Signal, ON/OFF
|
||||
[512] = "%1d", -- CB Ground Intercom, ON/OFF
|
||||
[294] = "%1d", -- Standby (Left) Pitot Tube Heating Button - Push to turn heating on
|
||||
[295] = "%1d", -- Main (Right) Pitot Tube Heating Button - Push to turn heating on
|
||||
[292] = "%1d", -- Standby (Left) Pitot Tube Heating Off Button - Push to turn heating off
|
||||
[293] = "%1d", -- Standby (Left) Pitot Tube Heating Off Button - Push to turn heating off
|
||||
-- lights system
|
||||
[176] = "%.1f", -- Navigation Lights Mode Control Switch, FLICKER/OFF/FIXED {0.0,0.5,1.0}
|
||||
[175] = "%.1f", -- Navigation Lights Intensity Control Switch, DIM(30%)/BRT(60%)/MAX(100%) {0.0,0.5,1.0}
|
||||
[311] = "%1d", -- Taxi and Landing Lights (Searchlights) Control Switch, TAXI/OFF/LANDING {-1.0,0.0,1.0}
|
||||
[330] = "%1d", -- Instrument Lighting Switch, Red/OFF/White {-1.0,0.0,1.0}
|
||||
[331] = "%.1f", -- Instrument Lights Intensity Knob (Axis) {0.1,0.9} in 0.1 Steps
|
||||
[249] = "%1d", -- Emergency Instrument Light Switch, ON/OFF
|
||||
[202] = "%.1f", -- Warning-Light Intensity Knob (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[203] = "%1d", -- Warning-Light Check Button - Push to check
|
||||
-- Weapon System
|
||||
[254] = "%1d", -- CB Armament System Power Switch, ON/OFF
|
||||
[255] = "%1d", -- CB Missile Firing Control Circuit Power Switch, ON/OFF
|
||||
[256] = "%1d", -- CB ASP-FKP (Gunsight and Gun Camera) Power Switch, ON/OFF
|
||||
[257] = "%1d", -- CB Missile Seeker Heating Circuit Power Switch, ON/OFF
|
||||
[258] = "%1d", -- CB Missile Seeker Glowing Circuit Power Switch, ON/OFF
|
||||
[259] = "%.1f", -- Missile Seeker Tone Volume Knob (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[268] = "%1d", -- Arm/Safe Bombs Emergency Jettison Switch, LIVE/BLANK
|
||||
[271] = "%.1f", -- Rockets Firing Mode Selector Switch, AUT./2RS/4RS {0.0,0.1,0.2}
|
||||
[509] = "%1d", -- Arm/Safe Bombs Emergency Jettison Switch, LIVE/BOMBS/BLANK {-1.0,0.0,1.0}
|
||||
[507] = "%1d", -- Emergency Jettison Switch, ON/OFF
|
||||
[273] = "%1d", -- EKSR-46 Signal Flare Dispenser Power Switch, ON/OFF
|
||||
[274] = "%1d", -- EKSR-46 Yellow Signal Flare Launch Button
|
||||
[275] = "%1d", -- EKSR-46 Green Signal Flare Launch Button
|
||||
[276] = "%1d", -- EKSR-46 Red Signal Flare Launch Button
|
||||
[277] = "%1d", -- EKSR-46 White Signal Flare Launch Button
|
||||
[260] = "%1d", -- Missile/Bomb Release Selector Switch, PORT(Left)/STARB-BOTH(Right for Missiles/Both)
|
||||
[583] = "%1d", -- Gun+PK3 Switch
|
||||
[590] = "%1d", -- Emergency Jettison Inboard Stations Switch, ON/OFF
|
||||
[607] = "%1d", -- Pyro Charge Apply {0.0,0.5,1.0}
|
||||
[576] = "%1d", -- Gsh-23 Arm/Safe
|
||||
[585] = "%1d", -- Outboard Stations Select
|
||||
[586] = "%1d", -- Outboard Stations Deselect
|
||||
[587] = "%1d", -- Inboard Stations Select
|
||||
[588] = "%1d", -- Inboard Stations Deselect
|
||||
[577] = "%1d", -- Charge Outer Guns
|
||||
[578] = "%1d", -- Charge Inner Guns
|
||||
[592] = "%1d", -- Emergency Launch Missiles
|
||||
[597] = "%1d", -- Arm Outer Guns
|
||||
[598] = "%1d", -- Arm Inner Guns
|
||||
[596] = "%1d", -- Arm Bombs
|
||||
[584] = "%1d", -- Bombs Series {-1.0,0.0,1.0}
|
||||
[270] = "%1d", -- Emergency Jettison Outboard Stations Switch, ON/OFF
|
||||
[629] = "%1d", -- CB Weapon Switch, ON/OFF
|
||||
[599] = "%1d", -- Deblock Guns
|
||||
-- oxygen system
|
||||
[303] = "%1d", -- Emergency Oxygen Switch, ON/OFF
|
||||
[304] = "%1d", -- Diluter Demand Switch, 100% / MIX
|
||||
[307] = "%1d", -- Helmet Ventilation Switch, ON/OFF
|
||||
[306] = "%.2f", -- Oxygen Supply Valve (CLOSE - CW, OPEN - CCW) (Axis) {0.0,1.0} in 0.05 Steps
|
||||
[484] = "%.2f", -- Oxygen Interconnaction Valve (CLOSE - CW, OPEN - CCW) (Axis) {0.0,1.0} in 0.05 Steps
|
||||
-- sarpp
|
||||
[298] = "%1d", -- SARPP Flight Recorder, ON/OFF
|
||||
-- fuel system
|
||||
[296] = "%1d", -- Fuel Shut-Off Lever
|
||||
-- air system
|
||||
[245] = "%.1f", -- ECS and Pressurization Handle, OFF/CANOPIES SEALED/ECS ON (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[172] = "%.2f", -- Cabin Air Conditioning Control Switch, OFF/HEAT/COOL/AUTOMATIC {0.0,0.25} in 0.05 Steps
|
||||
[173] = "%.1f", -- Cabin Air Temperature Controller Rheostat (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[121] = "%.2f", -- Diffuser and Flight Suit Air Conditioning Control Switch, HEAT/AUTO/COOL {0.0,0.25} in 0.05 Steps
|
||||
[120] = "%.1f", -- Diffuser and Flight Suit Temperature Rheostat (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[511] = "%1d", -- Conditioning Shutoff Switch, OPEN/FRONT PILOT CONTROL/CLOSE {-1.0,0.0,1.0}
|
||||
-- anti-icing system
|
||||
[174] = "%1d", -- De-Icing Mode Switch, MANUAL/AUTOMATIC/OFF {0.0,0.1,0.2}
|
||||
[183] = "%1d", -- RIO-3 De-Icing Sensor Heating Circuit Check Button - Push to test
|
||||
-- helmet heating
|
||||
[309] = "%1d", -- Helmet Visor Quick Heating Button - Push to heat
|
||||
[308] = "%1d", -- Helmet Heating Mode Switch, AUTO/OFF/ON {0.0,0.5,1.0}
|
||||
[310] = "%.1f", -- Helmet Heating Temperature Rheostat (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- SPU-9
|
||||
[209] = "%1d", -- Reserve Intercom Switch, ON/OFF
|
||||
[291] = "%1d", -- ADF Audio Switch, ADF/OFF
|
||||
[288] = "%1d", -- Intercom Volume Knob (Axis) {0.0,0.8} in 0.05 Steps
|
||||
[289] = "%1d", -- Radio Volume Knob (Axis) {0.0,0.8} in 0.05 Steps
|
||||
[134] = "%1d", -- Radio Button
|
||||
[133] = "%1d", -- Intercom Button
|
||||
-- R-832M
|
||||
[287] = "%1d", -- Radio Control Switch, ON/OFF
|
||||
[286] = "%1d", -- Squelch Switch, ON/OFF
|
||||
[284] = "%1d", -- R-832M Preset Channel Selector Knob (Axis) {0.0,1.0} in 20 0.05 Steps
|
||||
-- engine systems
|
||||
[329] = "%1d", -- IV-300 Engine Vibration Test Button - Push to test
|
||||
[328] = "%1d", -- Fire Extinguish Button - Push to extinguish
|
||||
[272] = "%1d", -- Fire Warning Signal Test Switch, I/OFF/II {-1.0,0.0,1.0}
|
||||
[324] = "%1d", -- RT-12 JPT Regulator Manual Disable Switch, RT-12 DISABLED/RT-12 ENABLED
|
||||
[243] = "%1d", -- RT-12 JPT Regulator Power Switch, ON/OFF
|
||||
[242] = "%1d", -- RT-12 JPT Regulator Test Switch, I/OFF/II {-1.0,0.0,1.0}
|
||||
[499] = "%1d", -- EGT Indicator Switch, FRONT/REAR
|
||||
-- control system
|
||||
[281] = "%1d", -- Flaps Flight Position (0 degrees) Button
|
||||
[282] = "%1d", -- Flaps Takeoff Position (25 degrees) Button
|
||||
[283] = "%1d", -- Flaps Landing Position (44 degrees) Button
|
||||
[549] = "%1d", -- Throttle Limiter
|
||||
[135] = "%1d", -- Air Brake Switch {0.0,1.0}
|
||||
[136] = "%1d", -- Air Brake Switch (2nd position) {0.0,1.0}
|
||||
[118] = "%1d", -- Landing Gear Control Lever {-1.0,0.0,1.0}
|
||||
[334] = "%.1f", -- Emergency/Parking Wheel Brake Lever {0.0,1.0} in 0.1 Steps
|
||||
[334] = "%1d", -- Parking Brake Lever Flag - Push to remove parking brake
|
||||
[197] = "%1d", -- Main and Emergency Hydraulic Systems Interconnection Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[194] = "%1d", -- Emergency Landing Gear Extension Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[195] = "%1d", -- Emergency Flaps Extension Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[196] = "%1d", -- RAT (Emergency Generator) Emergency Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[456] = "%1d", -- Full Pressure Failure Lever, ON/STBY/FAILURE {-0.5,0.0,0.5}
|
||||
[457] = "%1d", -- Static Pressure Failure Lever, ON/STBY/FAILURE {-0.5,0.0,0.5}
|
||||
-- accelerometer
|
||||
[89] = "%1d", -- Reset Limits
|
||||
-- canopy
|
||||
[998] = "%1d", -- Canopy Handle
|
||||
[285] = "%1d", -- Forward Canopy Lock Handle
|
||||
[244] = "%1d", -- Forward Canopy Emergency Jettison Handle
|
||||
-- Pitot Selector
|
||||
[333] = "%1d", -- Pitot Tube Selector Lever, STBY(Left)/MAIN(Right)
|
||||
-- Back Seat
|
||||
-- CLOCK
|
||||
[412] = "%1d", -- Backseat - Mech clock left lever Button
|
||||
[413] = "%.1f", -- Backseat - Mech clock left lever (Axis) {0.0, 1.0} in 0.04 Steps
|
||||
[414] = "%1d", -- Backseat - Mech clock right lever Button
|
||||
[415] = "%.1f", -- Backseat - Mech clock right lever (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Baro Altimeter
|
||||
[394] = "%.f2", -- Backseat - Baro pressure QFE knob (Axis) {0.0, 1.0} in 0.6 Steps
|
||||
-- Radar Altimeter
|
||||
[398] = "%1d", -- Backseat - RV-5M Radio Altimeter Test Button
|
||||
[399] = "%.2f", -- Backseat - RV-5M Radio Altimeter Decision Height Knob (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- GMK
|
||||
-- Gyro
|
||||
[444] = "%1d", -- Backseat - MC Synchronization Button - Push to synchronize (level flight only)
|
||||
-- KPP-1273K (ADI)
|
||||
[367] = "%1d", -- Backseat - KPP-1273K Attitude Director Indicator (ADI) Cage Button
|
||||
[376] = "%.2f", -- Backseat - KPP-1273K Attitude Director Indicator (ADI) Pitch Trim Knob (Axis) {-1.0, 1.0} in 0.05 Steps
|
||||
-- NPP (HSI)
|
||||
[385] = "%.2f", -- Backseat - HSI Course set knob (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
-- Variometer
|
||||
[419] = "%.1f", -- Backseat - Variometer adjustment knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- RKL-41
|
||||
[440] = "%1d", -- Backseat - RKL-41 ADF Outer-Inner Beacon (Far-Near NDB) Switch
|
||||
[514] = "%.2f", -- Backseat - RKL-41 ADF Volume Knob (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[518] = "%.2f", -- Backseat - RKL-41 ADF Brightness Knob (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[516] = "%1d", -- Backseat - RKL-41 ADF Mode Switch, TLF(A3)/TLG(A1,A2)
|
||||
[517] = "%.1f", -- Backseat - RKL-41 ADF Function Selector Switch, OFF/COMP(AUTO)/COMP(MAN)/ANT/LOOP {0.0,0.1,0.2,0.3,0.4}
|
||||
[519] = "%1d", -- Backseat - RKL-41 ADF Loop Switch, LEFT/OFF/RIGHT
|
||||
[515] = "%1d", -- Backseat - RKL-41 ADF Control Switch, TAKE CONTROL/HAND OVER CONTROL
|
||||
[522] = "%.2f", -- Backseat - RKL-41 ADF Far NDB Frequency Tune (Axis) {1.0, 0.0} in 0.05 Steps
|
||||
[520] = "%.4f", -- Backseat - RKL-41 ADF Far NDB 100kHz rotary (Axis) {0.0,0.938} in 0.0588 Steps
|
||||
[521] = "%.1f", -- Backseat - RKL-41 ADF Far NDB 10kHz rotary (Axis) {0.0,0.9} in 0.1 Steps
|
||||
[525] = "%.2f", -- Backseat - RKL-41 ADF Near NDB Frequency Tune (Axis) {0.0,1.0} in 0.05 Steps
|
||||
[523] = "%.4f", -- Backseat - RKL-41 ADF Near NDB 100kHz rotary (Axis) {0.0,0.938} in 0.0588 Steps
|
||||
[524] = "%.1f", -- Backseat - RKL-41 ADF Near NDB 10kHz rotary (Axis) {0.0,0.9} in 0.1 Steps
|
||||
-- electric system
|
||||
[488] = "%1d", -- Backseat - Turbo Button
|
||||
[494] = "%1d", -- Backseat - Engine Button
|
||||
[490] = "%1d", -- Backseat - Stop Engine Switch
|
||||
[492] = "%1d", -- Backseat - Emergency Fuel Switch
|
||||
-- lights system
|
||||
[486] = "%1d", -- Backseat - Taxi and Landing Lights (Searchlights) Control Switch, TAXI/OFF/LANDING {-1.0,0.0,1.0}
|
||||
[497] = "%1d", -- Backseat - Instrument Lighting Switch, Red/OFF/White {-1.0,0.0,1.0}
|
||||
[498] = "%.1f", -- Backseat - Instrument Lights Intensity Knob (Axis) {0.1,0.9} in 0.1 Steps
|
||||
[537] = "%.1f", -- Backseat - Warning-Light Intensity Knob (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[538] = "%1d", -- Backseat - Warning-Light Check Button - Push to check
|
||||
-- oxygen system
|
||||
[479] = "%1d", -- Backseat - Emergency Oxygen Switch, ON/OFF
|
||||
[480] = "%1d", -- Backseat - Diluter Demand Switch, 100% / MIX
|
||||
[482] = "%.4f", -- Backseat - Oxygen Supply Valve (CLOSE - CW, OPEN - CCW) (Axis) {0.0,1.0} in 0.05 Steps
|
||||
-- fuel system
|
||||
[475] = "%1d", -- Backseat - Fuel Shut-Off Lever
|
||||
-- air system
|
||||
[245] = "%.1f", -- Backseat - ECS and Pressurization Handle, OFF/CANOPIES SEALED/ECS ON (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- SPU-9
|
||||
[473] = "%1d", -- Backseat - Reserve Intercom Switch, ON/OFF
|
||||
[474] = "%1d", -- Backseat - ADF Audio Switch, ADF/OFF
|
||||
[471] = "%1d", -- Backseat - Intercom Volume Knob (Axis) {0.0,0.8} in 0.05 Steps
|
||||
[472] = "%1d", -- Backseat - Radio Volume Knob (Axis) {0.0,0.8} in 0.05 Steps
|
||||
[547] = "%1d", -- Backseat - Radio Button
|
||||
[546] = "%1d", -- Backseat - Intercom Button
|
||||
-- R-832M
|
||||
[470] = "%1d", -- Backseat - Radio Control Switch, ON/OFF
|
||||
[469] = "%1d", -- Backseat - Squelch Switch, ON/OFF
|
||||
[468] = "%1d", -- Backseat - R-832M Preset Channel Selector Knob (Axis) {0.0,1.0} in 20 0.05 Steps
|
||||
-- control system
|
||||
[465] = "%1d", -- Backseat - Flaps Flight Position (0 degrees) Button
|
||||
[466] = "%1d", -- Backseat - Flaps Takeoff Position (25 degrees) Button
|
||||
[467] = "%1d", -- Backseat - Flaps Landing Position (44 degrees) Button
|
||||
[548] = "%1d", -- Backseat - Air Brake Switch {-1.0, 0.0, 1.0}
|
||||
[437] = "%1d", -- Backseat - Landing Gear Control Lever {0.0,0.5,1.0} ??? eigentlich 4 Positionen
|
||||
[501] = "%.1f", -- Backseat - Emergency Wheel Brake Lever {0.0,1.0} in 0.1 Steps
|
||||
[536] = "%1d", -- Backseat - Main and Emergency Hydraulic Systems Interconnection Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[533] = "%1d", -- Backseat - Emergency Landing Gear Extension Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[534] = "%1d", -- Backseat - Emergency Flaps Extension Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
[535] = "%1d", -- Backseat - RAT (Emergency Generator) Emergency Lever, FORWARD(OFF)/BACKWARD(ON)
|
||||
-- canopy
|
||||
[999] = "%1d", -- Backseat - Canopy Handle
|
||||
[485] = "%1d", -- Backseat - Canopy Lock Handle
|
||||
[539] = "%1d", -- Backseat - Canopy Emergency Jettison Handle
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- Front Seat
|
||||
|
||||
-- ADI correction
|
||||
--[31] = "%.4f", -- KPP 1273K pitch {-0.5, 0.5} {-math.pi / 2.0, math.pi / 2.0}
|
||||
--[40] = "%.4f", -- KPP 1273K sideslip {-1.0, 1.0}
|
||||
local lPitch = mainPanelDevice:get_argument_value(31)
|
||||
|
||||
lPitch = lPitch * 2
|
||||
|
||||
ExportScript.Tools.SendData(31, string.format("%.4f", lPitch))
|
||||
ExportScript.Tools.SendData(40, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(40)))) -- negate
|
||||
|
||||
-- HSI correction
|
||||
--[41] = "%.4f", -- HSI heading {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
--[42] = "%.4f", -- HSI commanded course needle (yellow needle) {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
local lCommandCourse = mainPanelDevice:get_argument_value(42)
|
||||
|
||||
lCommandCourse = lCommandCourse + 0.5 -- 180 degree turn
|
||||
|
||||
ExportScript.Tools.SendData(41, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(41)))) -- negate
|
||||
ExportScript.Tools.SendData(42, string.format("%.4f", lCommandCourse))
|
||||
|
||||
-- Back Seat
|
||||
|
||||
-- ADI correction
|
||||
--[368] = "%.4f", -- KPP 1273K pitch {-0.5, 0.5} {-math.pi / 2.0, math.pi / 2.0}
|
||||
--[377] = "%.4f", -- KPP 1273K sideslip {-1.0, 1.0}
|
||||
local lPitch2 = mainPanelDevice:get_argument_value(368)
|
||||
|
||||
lPitch2 = lPitch2 * 2
|
||||
|
||||
ExportScript.Tools.SendData(368, string.format("%.4f", lPitch2))
|
||||
ExportScript.Tools.SendData(377, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(377)))) -- negate
|
||||
|
||||
-- HSI correction
|
||||
--[378] = "%.4f", -- HSI heading {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
--[379] = "%.4f", -- HSI commanded course needle (wihte needle) {1.0, 0.0} {0.0, math.pi * 2.0}
|
||||
local lCommandCourse2 = mainPanelDevice:get_argument_value(379)
|
||||
|
||||
lCommandCourse2 = lCommandCourse2 + 0.5 -- 180 degree turn
|
||||
|
||||
ExportScript.Tools.SendData(378, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(378)))) -- negate
|
||||
ExportScript.Tools.SendData(379, string.format("%.4f", lCommandCourse2))
|
||||
|
||||
-- VD-20 Presseure correction
|
||||
--[56] = "%.4f", -- VD-20 PRESS {0.0, 1.0}{670.0, 826.0}
|
||||
local lVD_20_PRESS = mainPanelDevice:get_argument_value(56)
|
||||
--ExportScript.Tools.WriteToLog('Pressure: '..ExportScript.Tools.dump(lVD_20_PRESS))
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 0.89 -- maximaler Ausgabewert
|
||||
x_min = 0.0 -- minimaler Eingangswert
|
||||
x_max = 0.76793104410172 -- maximaler Eingangswert
|
||||
x = 0.57506740093231 -- aktueller Eingangswert
|
||||
|
||||
d_y = 0.89 -- Delta Ausga
|
||||
d_x = 0.76793104410172 -- Delta Eingangswerte (x_max
|
||||
m = 1.158958225267568124678891052043 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = 0.0000000000000000000000000000002387929418604 (2.387929418604e-32) -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.66648 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
if gVD_20_PRESS ~= lVD_20_PRESS then
|
||||
gVD_20_PRESS = lVD_20_PRESS
|
||||
lVD_20_PRESS = 1.158958225267568124678891052043 * lVD_20_PRESS + 0.0000000000000000000000000000002387929418604
|
||||
--ExportScript.Tools.WriteToLog('Pressure2: '..ExportScript.Tools.dump(lVD_20_PRESS))
|
||||
ExportScript.Tools.SendData(56, string.format("%.4f", lVD_20_PRESS))
|
||||
end
|
||||
|
||||
--[393] = "%.4f", -- Backseat - VD-20 PRESS {0.0, 1.0}{670.0, 826.0}
|
||||
local lVD_20_PRESS_Backseat = mainPanelDevice:get_argument_value(393)
|
||||
--ExportScript.Tools.WriteToLog('Pressure: '..ExportScript.Tools.dump(lVD_20_PRESS_Backseat))
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 0.89 -- maximaler Ausgabewert
|
||||
x_min = 0.0 -- minimaler Eingangswert
|
||||
x_max = 0.76793104410172 -- maximaler Eingangswert
|
||||
x = 0.57506740093231 -- aktueller Eingangswert
|
||||
|
||||
d_y = 0.89 -- Delta Ausga
|
||||
d_x = 0.76793104410172 -- Delta Eingangswerte (x_max
|
||||
m = 1.158958225267568124678891052043 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = 0.0000000000000000000000000000002387929418604 (2.387929418604e-32) -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.66648 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
if gVD_20_PRESS_Backseat ~= lVD_20_PRESS_Backseat then
|
||||
gVD_20_PRESS_Backseat = lVD_20_PRESS_Backseat
|
||||
lVD_20_PRESS_Backseat = 1.158958225267568124678891052043 * lVD_20_PRESS_Backseat + 0.0000000000000000000000000000002387929418604
|
||||
--ExportScript.Tools.WriteToLog('Pressure2: '..ExportScript.Tools.dump(lVD_20_PRESS_Backseat))
|
||||
ExportScript.Tools.SendData(393, string.format("%.4f", lVD_20_PRESS_Backseat))
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF RADIO:get frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- R_832M Channel
|
||||
local R_832M = {[0.0]="0",[0.05]="1",[0.1]="2",[0.15]="3",[0.2]="4",[0.25]="5",[0.3]="6",[0.35]="7",[0.4]="8",[0.45]="9",[0.5]="10",[0.55]="11",[0.6]="12",[0.65]="13",[0.7]="14",[0.75]="15",[0.8]="16",[0.85]="17",[0.9]="18",[0.95]="19"}
|
||||
ExportScript.Tools.SendData(2000, R_832M[ExportScript.Tools.round(mainPanelDevice:get_argument_value(284), 2)])
|
||||
--ExportScript.Tools.WriteToLog('R_832M Channel: '..ExportScript.Tools.dump(mainPanelDevice:get_argument_value(284))..', '..R_832M[ExportScript.Tools.round(mainPanelDevice:get_argument_value(284), 2)])
|
||||
|
||||
-- R_832M Frequency
|
||||
local lR_832M_F = GetDevice(19)
|
||||
if lR_832M_F:is_on() then
|
||||
--ExportScript.Tools.SendData(2001, string.format("%7.3f", lR_832M_F:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.RoundFreqeuncy(lR_832M_F:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('R_832M Frequency: '..ExportScript.Tools.dump(string.format("%7.3f", lR_832M_F:get_frequency()/1000000)))
|
||||
else
|
||||
ExportScript.Tools.SendData(2001, " ")
|
||||
end
|
||||
|
||||
-- Cockpit Light
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {222, 225, 226, 497})
|
||||
-- CB Nav. Lights, CB Red Lights, CB White Lights, Backseat - Instrument Lighting Switch
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF RADIO:get frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- R_832M Channel
|
||||
local R_832M = {[0.0]="0",[0.05]="1",[0.1]="2",[0.15]="3",[0.2]="4",[0.25]="5",[0.3]="6",[0.35]="7",[0.4]="8",[0.45]="9",[0.5]="10",[0.55]="11",[0.6]="12",[0.65]="13",[0.7]="14",[0.75]="15",[0.8]="16",[0.85]="17",[0.9]="18",[0.95]="19"}
|
||||
ExportScript.Tools.SendDataDAC(2000, R_832M[ExportScript.Tools.round(mainPanelDevice:get_argument_value(284), 2)])
|
||||
--ExportScript.Tools.WriteToLog('R_832M Channel: '..ExportScript.Tools.dump(mainPanelDevice:get_argument_value(284))..', '..R_832M[ExportScript.Tools.round(mainPanelDevice:get_argument_value(284), 2)])
|
||||
|
||||
|
||||
-- R_832M Frequency
|
||||
local lR_832M_F = GetDevice(19)
|
||||
if lR_832M_F:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC(2001, string.format("%7.3f", lR_832M_F:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC(2001, ExportScript.Tools.RoundFreqeuncy(lR_832M_F:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('R_832M Frequency: '..ExportScript.Tools.dump(string.format("%7.3f", lR_832M_F:get_frequency()/1000000)))
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC(2001, " ")
|
||||
end
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-- global VD-20 Pressure variable
|
||||
gVD_20_PRESS = 0
|
||||
gVD_20_PRESS_Backseat = 0
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
1325
Scripts/DCS-ExportScript/ExportsModules/M-2000C.lua
Normal file
1325
Scripts/DCS-ExportScript/ExportsModules/M-2000C.lua
Normal file
File diff suppressed because it is too large
Load Diff
1438
Scripts/DCS-ExportScript/ExportsModules/Mi-24P.lua
Normal file
1438
Scripts/DCS-ExportScript/ExportsModules/Mi-24P.lua
Normal file
File diff suppressed because it is too large
Load Diff
1327
Scripts/DCS-ExportScript/ExportsModules/Mi-8MT.lua
Normal file
1327
Scripts/DCS-ExportScript/ExportsModules/Mi-8MT.lua
Normal file
File diff suppressed because it is too large
Load Diff
375
Scripts/DCS-ExportScript/ExportsModules/MiG-15bis.lua
Normal file
375
Scripts/DCS-ExportScript/ExportsModules/MiG-15bis.lua
Normal file
@@ -0,0 +1,375 @@
|
||||
-- MiG-15Bis
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.MiG15bis = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
[225] = "%.4f", -- Canopy
|
||||
[223] = "%.4f", -- LeftCanopyLever
|
||||
[222] = "%.4f", -- RightCanopyLever
|
||||
[224] = "%.4f", -- AftCanopyLever
|
||||
[14] = "%.4f", -- Variometer {-75.0,-60.0,-45.0,-30.0,-15.0,-10.0,-5.0,0.0,5.0,10.0,15.0,30.0,45.0,60.0,75.0} {0.0,0.075,0.151,0.24,0.352,0.401,0.448,0.5,0.553,0.6,0.649,0.76,0.848,0.925,1.0}
|
||||
[28] = "%.4f", -- Altimeter_km {0.0, 10.0}{0.0, 1.0}
|
||||
[29] = "%.4f", -- Altimeter_m {0.0, 1000.0}{0.0, 1.0}
|
||||
[31] = "%.4f", -- Altimeter_Pressure {670, 790}{0.0, 1.0}
|
||||
[15] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0}{0.0, 1.0}
|
||||
[16] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0}{0.0, 1.0}
|
||||
[22] = "%.4f", -- CLOCK_flight_time_meter_status {0.0, 0.2}{0.5, 0.0}
|
||||
[18] = "%.4f", -- CLOCK_flight_hours {0.0, 12.0}{0.0, 1.0}
|
||||
[19] = "%.4f", -- CLOCK_flight_minutes {0.0, 60.0}{0.0, 1.0}
|
||||
[20] = "%.4f", -- CLOCK_seconds_meter_time_minutes {0.0, 60.0}{0.0, 1.0}
|
||||
[17] = "%.4f", -- CLOCK_seconds_meter_time_seconds {0.0, 60.0}{0.0, 1.0}
|
||||
[4] = "%.4f", -- IAS {100.0, 1100.0}{0.0, 1.0}
|
||||
[5] = "%.4f", -- TAS {100.0, 1100.0}{0.0, 1.0}
|
||||
[27] = "%.4f", -- MACH {0.0,0.3,0.95}{0.12,0.215,1.0}
|
||||
[6] = "%.4f", -- AGK_47B_roll {-1.0, 1.0}
|
||||
[7] = "%.4f", -- AGK_47B_pitch {1.0, -1.0}
|
||||
[11] = "%.4f", -- AGK_47B_failure_flag {0.0, 1.0}
|
||||
--[8] = "%.4f", -- AGK_47B_sideslip {-1.0, 1.0}
|
||||
[9] = "%.4f", -- AGK_47B_turn {-1.0, 1.0}
|
||||
[10] = "%.4f", -- AGK_47B_horizon {-1.0, 1.0}
|
||||
[35] = "%.4f", -- PRV_46_RAlt {-10.0, 0.0, 1200.0}{-1.0, 0.0, 1.0}
|
||||
[32] = "%.4f", -- PDK-45 HeadingScale {1.0, 0.0}
|
||||
[33] = "%.4f", -- PDK-45 Heading {1.0, 0.0}
|
||||
-- Weapon System
|
||||
[95] = "%.4f", -- N37D_Ready_Lamp
|
||||
[93] = "%.4f", -- NR23_TOP_Ready_Lamp
|
||||
[94] = "%.4f", -- NR23_BOTTOM_Ready_Lamp
|
||||
[100] = "%.4f", -- Tactical_Rel_Lamp
|
||||
[98] = "%.4f", -- LEFT_BOMB_Lamp
|
||||
[99] = "%.4f", -- RIGHT_BOMB_Lamp
|
||||
-- electric system
|
||||
[83] = "%.4f", -- VoltAmperMeter {-1.0, 0.0, 3.0}{-1.0, 0.0, 1.0}
|
||||
[244] = "%.4f", -- lamps_lightness
|
||||
-- hydraulic system
|
||||
[168] = "%.4f", -- HydraulicPressureMain {0.0, 250.0}{0.0, 1.0}
|
||||
[139] = "%.4f", -- HydraulicPressureGain {0.0, 150.0}{0.0, 1.0}
|
||||
[169] = "%.4f", -- HydraulicPressureAirFlaps {0.0, 80.0}{0.0, 1.0}
|
||||
[165] = "%.4f", -- HydraulicPressureAirGears {0.0, 80.0}{0.0, 1.0}
|
||||
[172] = "%.4f", -- HydraulicPressureMainAir {0.0, 250.0}{0.0, 1.0}
|
||||
-- gear system
|
||||
[121] = "%.4f", -- LeftBrakePressure {0.0, 12.0}{0.0, 1.0}
|
||||
[122] = "%.4f", -- RightBrakePressure {0.0, 12.0}{0.0, 1.0}
|
||||
-- fuel system
|
||||
[47] = "%.4f", -- FuelQuantity {-100.0,0.0,100.0,200.0,300.0,400.0,500.0,600.0,700.0,800.0,1050.0}{0.0,0.047,0.136,0.22,0.38,0.52,0.631,0.755,0.869,0.921,1.0}
|
||||
-- air system
|
||||
[188] = "%.4f", -- CanopyAirValveIndication
|
||||
[39] = "%.4f", -- CockpitAltitude {0.0,8000.0} {0.008,1.0}
|
||||
[40] = "%.4f", -- PressureDifference {-0.04,0.0,0.6} {0.0,0.243,1.0}
|
||||
-- oxygen system
|
||||
[48] = "%.4f", -- OxygenPressure {0.0,250.0} {0.0,1.0}
|
||||
[60] = "%.4f", -- FlowBlinker
|
||||
[49] = "%.4f", -- FlowPressure {0.0,150.0,170.0} {0.0,0.9,1.0}
|
||||
-- Engine
|
||||
[42] = "%.4f", -- EngineTachometer {0.0,15000.0} {0.0,1.0}
|
||||
[41] = "%.4f", -- EngineTemperature {300.0,900.0} {0.0,1.0}
|
||||
[45] = "%.4f", -- OilTemperature {-50.0,150.0} {0.0,1.0}
|
||||
[44] = "%.4f", -- OilPressure {0.0, 10.0} {0.0,1.0}
|
||||
[43] = "%.4f", -- EngineFuelPressure {0.0,100.0} {0.0,1.0}
|
||||
[46] = "%.4f", -- FuelPressure {0.0,10.0} {0.0,1.0}
|
||||
-- radio compass
|
||||
[238] = "%.4f", -- ARK5_Band {0.0, 2.0} {0.0, 0.4}
|
||||
[176] = "%.4f", -- ARK5_TuningMeter
|
||||
[175] = "%.4f", -- ARK5_Tuning {0.0, 0.2} {0.0, 1.0}
|
||||
[38] = "%.4f", -- ARK5_Bearing
|
||||
[239] = "%.4f", -- ARK5_FreqScale {0.0,0.5,1.0,1.5,2.0,2.5,3.0} {0.0,0.0695,0.14,0.2865,0.43,0.7155,1.0}
|
||||
-- Radio RSI-6K
|
||||
[235] = "%.4f", -- RadioAntennaPower
|
||||
[128] = "%.4f", -- RadioReceiverKnob {0.0, 0.2}{0.0, 1.0}
|
||||
[127] = "%.4f", -- RadioReceiverInd {0.0, 1.0}{0.036, 0.961}
|
||||
[144] = "%.4f", -- RadioReceiverGauge {0.0, 1.0}{0.026, 0.957}
|
||||
[245] = "%.4f", -- ASP_3N_Range
|
||||
-- Lamps
|
||||
-- electric system
|
||||
[57] = "%.f", -- lamp_GeneratorOff {-1.0, 1.0}{-1.0, 1.0}
|
||||
[58] = "%.f", -- lamp_Ignition {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- power plant
|
||||
[119] = "%.f", -- lamp_IsolatingValve {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- gear system
|
||||
[75] = "%.f", -- lamp_LeftGearExt {-1.0, 1.0}{-1.0, 1.0}
|
||||
[74] = "%.f", -- lamp_LeftGearRet {-1.0, 1.0}{-1.0, 1.0}
|
||||
[79] = "%.f", -- lamp_RightGearExt {-1.0, 1.0}{-1.0, 1.0}
|
||||
[78] = "%.f", -- lamp_RightGearRet {-1.0, 1.0}{-1.0, 1.0}
|
||||
[77] = "%.f", -- lamp_NoseGearExt {-1.0, 1.0}{-1.0, 1.0}
|
||||
[76] = "%.f", -- lamp_NoseGearRet {-1.0, 1.0}{-1.0, 1.0}
|
||||
[53] = "%.f", -- lamp_ExtendGears {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- fuel system
|
||||
[56] = "%.f", -- lamp_Remain300 {-1.0, 1.0}{-1.0, 1.0}
|
||||
[50] = "%.f", -- lamp_AftEmpty {-1.0, 1.0}{-1.0, 1.0}
|
||||
[52] = "%.f", -- lamp_DropTanks {-1.0, 1.0}{-1.0, 1.0}
|
||||
[51] = "%.f", -- lamp_BoostPressure {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- control system
|
||||
[113] = "%.f", -- lamp_TrimmerNeutral {-1.0, 1.0}{-1.0, 1.0}
|
||||
[59] = "%.f", -- lamp_FlapsExt {-1.0, 1.0}{-1.0, 1.0}
|
||||
[124] = "%.f", -- lamp_AirBrakeExt {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- fire extinguisher system
|
||||
[135] = "%.f", -- lamp_FireDetected {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- ARK-5
|
||||
[183] = "%.f", -- lamp_ARK_5 {-1.0, 1.0}{-1.0, 1.0}
|
||||
[218] = "%.f", -- light_ARK_5_scale {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- MRP-48P
|
||||
[54] = "%.f", -- lamp_Marker {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- Light System
|
||||
[226] = "%.4f", -- light_LeftUV {-1.0, 1.0}{-1.0, 1.0}
|
||||
[215] = "%.4f", -- light_CenterUV {-1.0, 1.0}{-1.0, 1.0}
|
||||
[227] = "%.4f", -- light_RightUV {-1.0, 1.0}{-1.0, 1.0}
|
||||
[217] = "%.4f", -- light_Panels {-1.0, 1.0}{-1.0, 1.0}
|
||||
[216] = "%.4f", -- light_AuxLeftPanel {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- Gun Camera
|
||||
[55] = "%.f" -- lamp_GunCamera {-1.0, 1.0}{-1.0, 1.0}
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
|
||||
-- Cockpit mechanics
|
||||
[221] = "%.4f", -- Emergency Canopy Jettison - Pull to jettison
|
||||
[223] = "%.4f", -- Left Canopy Lever, OPEN/CLOSE
|
||||
[222] = "%.4f", -- Right Canopy Lever, OPEN/CLOSE
|
||||
[224] = "%.4f", -- Aft Canopy Lever, OPEN/CLOSE
|
||||
-- Control system
|
||||
[114] = "%.4f", -- Elevator Trimmer Switch, PULL(CLIMB)/OFF/PUSH(DESCEND)
|
||||
[142] = "%.4f", -- Aileron Trimmer Switch, LEFT/OFF/RIGHT
|
||||
[207] = "%.4f", -- Wing Flaps Handle, RETRACT/NEUTRAL/20 degrees/55 degrees
|
||||
[125] = "%.4f", -- Airbrake Switch, CLOSE/OPEN
|
||||
[203] = "%.4f", -- Hydro Booster Lever, ON/OFF
|
||||
[204] = "%.4f", -- Throttle Friction Lever
|
||||
[198] = "%.4f", -- Airbrake Button, Hold to extend
|
||||
-- Electric system
|
||||
[84] = "%.4f", -- Ampere- & Voltmeter - Push to view Volts
|
||||
[149] = "%.4f", -- Air Start Switch, ON/OFF
|
||||
[81] = "%.4f", -- Pitot and Clock Heater Switch, ON/OFF
|
||||
[200] = "%.4f", -- Engine Start Button - Push to start
|
||||
[214] = "%.4f", -- Engine Start Button Cover
|
||||
-- Circuit Breakers
|
||||
[117] = "%.4f", -- Transfer Pump Switch, ON/OFF
|
||||
[115] = "%.4f", -- Booster Pump Switch, ON/OFF
|
||||
[120] = "%.4f", -- Ignition Switch, ON/OFF
|
||||
[116] = "%.4f", -- Instruments and Lights Switch, ON/OFF
|
||||
-- Right Panel
|
||||
[152] = "%.4f", -- Accumulator Switch, ON/OFF
|
||||
[153] = "%.4f", -- Generator Switch, ON/OFF
|
||||
[151] = "%.4f", -- Nose Light Master Switch, ON/OFF
|
||||
[154] = "%.4f", -- Trim Master Switch, ON/OFF
|
||||
[155] = "%.4f", -- AGK-47B Artificial Horizon + DGMK-3 Switch, ON/OFF
|
||||
[158] = "%.4f", -- Radio Switch, ON/OFF
|
||||
[157] = "%.4f", -- Bombs Switch, ON/OFF
|
||||
[156] = "%.4f", -- Emergency Drop Switch, ON/OFF
|
||||
[159] = "%.4f", -- ARK Switch, ON/OFF
|
||||
[160] = "%.4f", -- RV-2 Radio Altimeter Switch, ON/OFF
|
||||
[161] = "%.4f", -- NR-23 Cannon Switch, ON/OFF
|
||||
[162] = "%.4f", -- N-37D Cannon Switch, ON/OFF
|
||||
[163] = "%.4f", -- ASP-3N Gunsight Switch, ON/OFF
|
||||
[164] = "%.4f", -- S-13 Gun Camera Switch, ON/OFF
|
||||
-- HydroSystem
|
||||
[171] = "%.4f", -- Emergency Flaps Valve
|
||||
[167] = "%.4f", -- Emergency Gears Valve
|
||||
[170] = "%.4f", -- Emergency Flaps Valve Cover
|
||||
[166] = "%.4f", -- Emergency Gears Valve Cover
|
||||
[186] = "%.4f", -- Emergency System Filling Valve
|
||||
[242] = "%.4f", -- Air Net Valve
|
||||
[241] = "%.4f", -- Cockpit Filling Valve
|
||||
-- Gear System
|
||||
[71] = "%.4f", -- Landing Gear Handle, UP/DOWN
|
||||
[72] = "%.4f", -- Gear Lamps Test Button - Push to test
|
||||
[210] = "%.4f", -- Right Emergency Gear Release Handle
|
||||
[209] = "%.4f", -- Left Emergency Gear Release Handle
|
||||
[85] = "%.4f", -- Landing Gear Handle Lock, Lock/Unlock
|
||||
-- Fuel System
|
||||
[82] = "%.4f", -- Drop Tank Signal Switch, ON/OFF
|
||||
[141] = "%.4f", -- Oxygen Supply Valve
|
||||
[143] = "%.4f", -- Air Valve
|
||||
[243] = "%.4f", -- Oxygen Emergency Valve
|
||||
-- Conditioning and Heating System
|
||||
[187] = "%.4f", -- Cockpit Air Valve
|
||||
[86] = "%.4f", -- Ventilation Valve
|
||||
-- Internal Lights System
|
||||
[184] = "%.4f", -- Left UV Light Rheostat
|
||||
[185] = "%.4f", -- Right UV Light Rheostat
|
||||
[220] = "%.4f", -- Panels Light Rheostat
|
||||
-- Nav Lights System
|
||||
[111] = "%.4f", -- External Lights Switch, ON/OFF
|
||||
[80] = "%.4f", -- Nose Light Switch, ON/OFF
|
||||
-- Power Plant
|
||||
[208] = "%.4f", -- Engine Stop, CLOSE/OPEN
|
||||
[118] = "%.4f", -- Isolating Valve Switch, ON/OFF
|
||||
-- Fire Extinguisher System
|
||||
[136] = "%.4f", -- Engine Fire Extinguisher Button Cover
|
||||
[137] = "%.4f", -- Engine Fire Extinguisher Button
|
||||
[138] = "%.4f", -- Engine Fire Warning Light Test Button - Push to test
|
||||
-- Signal Flares
|
||||
[129] = "%.4f", -- Signal Flare Switch, ON/OFF
|
||||
[130] = "%.4f", -- Signal Flare Yellow Button
|
||||
[131] = "%.4f", -- Signal Flare Green Button
|
||||
[132] = "%.4f", -- Signal Flare Red Button
|
||||
[133] = "%.4f", -- Signal Flare White Button
|
||||
----------------------------------------------------
|
||||
-- Devices
|
||||
-- AGK-47B
|
||||
[12] = "%.4f", -- AGK-47B Artificial Horizon Cage - Pull to cage
|
||||
[13] = "%.4f", -- AGK-47B Artificial Horizon Zero Pitch Trim Knob
|
||||
--VD-15
|
||||
[30] = "%.4f", -- Barometric Pressure QFE Knob
|
||||
--PRV-46
|
||||
[36] = "%.4f", -- PRV-46 Radar Altimeter Indicator Range Switch, 120m/1200m AGL
|
||||
[37] = "%.4f", -- PRV-46 Radar Altimeter Indicator Power Switch, ON/OFF
|
||||
--PDK-45
|
||||
[34] = "%.4f", -- Heading Knob
|
||||
[61] = "%.4f", -- Fast Slave Button
|
||||
-- CLOCK
|
||||
[23] = "%.4f", -- AChS-1 Cockpit Chronograph Left Knob (button)
|
||||
[24] = "%.4f", -- AChS-1 Cockpit Chronograph Left Knob (rotary)
|
||||
[25] = "%.4f", -- AChS-1 Cockpit Chronograph Right Knob (button)
|
||||
[26] = "%.4f", -- AChS-1 Cockpit Chronograph Right Knob (rotary)
|
||||
-- Weapon System
|
||||
[92] = "%.4f", -- N-37D Cannon Reload Button
|
||||
[90] = "%.4f", -- NR-23 (Top) Cannon Reload Button
|
||||
[91] = "%.4f", -- NR-23 (Bottom) Cannon Reload Button
|
||||
[96] = "%.4f", -- Tactical Release Switch, ON/OFF
|
||||
[97] = "%.4f", -- Emergency Release Button
|
||||
[104] = "%.4f", -- Emergency Release Button Cover
|
||||
--ASP-3N Gunsight
|
||||
[101] = "%.4f", -- ASP-3N Gunsight Mode, GYRO/FIXED
|
||||
[106] = "%.4f", -- ASP-3N Gunsight Fixed Reticle Mask Lever
|
||||
[103] = "%.4f", -- ASP-3N Gunsight Fixed Reticle Mask Lever (rotary)
|
||||
[102] = "%.4f", -- ASP-3N Gunsight Brightness Knob (rotary)
|
||||
[201] = "%.4f", -- ASP-3N Gunsight Target Distance (rotary)
|
||||
[105] = "%.4f", -- ASP-3N Gunsight Color Filter, ON/OFF
|
||||
-- ARK-5 radio compass
|
||||
[180] = "%.4f", -- ARK-5 Audio Volume Control (rotary)
|
||||
[177] = "%.4f", -- ARK-5 Frequency Band Switch
|
||||
[174] = "%.4f", -- ARK-5 Function Selector Switch, OFF/COMP/ANT./LOOP
|
||||
[178] = "%.4f", -- ARK-5 LOOP L-R Switch
|
||||
--[] = "%.4f", -- ARK-5 Tuning Crank (rotary)
|
||||
[181] = "%.4f", -- ARK-5 Scale Light Control (rotary)
|
||||
[173] = "%.4f", -- ARK-5 TLG-TLF Switch
|
||||
[182] = "%.4f", -- ARK-5 Take Control Button
|
||||
[123] = "%.4f", -- ARK-5 Near/Far NDB Switch
|
||||
[146] = "%.4f", -- ARK-5 NDB 1 Switch
|
||||
[147] = "%.4f", -- ARK-5 NDB 2 Switch
|
||||
[148] = "%.4f", -- ARK-5 NDB 3 Switch
|
||||
-- RSI-6K radio
|
||||
[126] = "%.4f", -- RSI-6K Audio Volume Control (rotary)
|
||||
[232] = "%.4f", -- RSI-6K Wave Control (rotary)
|
||||
[230] = "%.4f", -- RSI-6K Antenna Control (rotary)
|
||||
[231] = "%.4f", -- RSI-6K Wave Lock
|
||||
[233] = "%.4f", -- RSI-6K Antenna Lock
|
||||
[128] = "%.4f", -- RSI-6K Receiver Tuning (rotary)
|
||||
[140] = "%.4f", -- RSI-6K Receive/ARK
|
||||
[240] = "%.4f", -- RSI-6K Forced Mode, ON/OFF
|
||||
[202] = "%.4f", -- Microphone Button
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
-- AGK_47B_sideslip negate
|
||||
--[8] = "%.4f", -- AGK_47B_sideslip {-1.0, 1.0}
|
||||
ExportScript.Tools.SendData(8, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(8)))) -- negate
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- Cockpit Light
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, 220)
|
||||
-- Panels Light Rheostat
|
||||
end
|
||||
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to hardware
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
730
Scripts/DCS-ExportScript/ExportsModules/MiG-21Bis.lua
Normal file
730
Scripts/DCS-ExportScript/ExportsModules/MiG-21Bis.lua
Normal file
@@ -0,0 +1,730 @@
|
||||
-- MiG-21Bis Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.MiG21Bis = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
[239] = "%.1f", -- CANOPY_anti_ice
|
||||
--ALCOHOL, COMPRESSED_AIR other similar stuff == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[411] = "%.1f", -- ALCOHOL
|
||||
[413] = "%.1f", -- COMPRESSED_AIR_main
|
||||
[414] = "%.1f", -- COMPRESSED_AIR_aux
|
||||
-- OXYGENE SYSTEM (pilot only, engine O2 separated) == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[59] = "%.1f", -- OXYGENE_instrument_IK52
|
||||
[60] = "%.1f", -- OXYGENE_instrument_IK52_blinking_lungs
|
||||
[58] = "%.1f", -- OXYGENE_instrument_M2000
|
||||
--GEAR LIGHTS == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
--[9] = "%.f", -- GEAR_NOSE_UP_LIGHT
|
||||
[12] = "%.f", -- GEAR_NOSE_DOWN_LIGHT
|
||||
--[10] = "%.f", -- GEAR_LEFT_UP_LIGHT
|
||||
[13] = "%.f", -- GEAR_LEFT_DOWN_LIGHT
|
||||
--[11] = "%.f", -- GEAR_RIGHT_UP_LIGHT
|
||||
[14] = "%.f", -- GEAR_RIGHT_DOWN_LIGHT
|
||||
-- AIRBRAKES == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[316] = "%.1f", -- AIRBRAKES_button
|
||||
[7] = "%.1f", -- AIRBRAKES_3D
|
||||
-- INSTRUMENTS == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[100] = "%.4f", -- IAS_indicator
|
||||
[101] = "%.4f", -- TAS_indicator
|
||||
[102] = "%.4f", -- M_indicator
|
||||
-- Baro altimeter subgroup --------------------------------------------------------------------------------------------------------------------------
|
||||
[104] = "%.4f", -- H_indicator_needle_m
|
||||
[112] = "%.4f", -- H_indicator_needle_km
|
||||
--/N/ KSI subgroup (NPP) --------------------------------------------------------------------------------------------------------------------------
|
||||
[178] = "%.1f", -- KSI_switch
|
||||
[258] = "%.1f", -- KSI_adjust_button
|
||||
[111] = "%.4f", -- KSI_course_indicator
|
||||
[68] = "%.4f", -- KSI_course_set_needle
|
||||
-- RSBN subgroup ------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
[176] = "%.1f", -- RSBN_switch
|
||||
[548] = "%.1f", -- RSBN_azimut_korekcija_LIGHT
|
||||
[549] = "%.1f", -- RSBN_dalnost_korekcija_LIGHT
|
||||
[417] = "%.1f", -- RSBN_distance_meter
|
||||
[355] = "%.1f", -- RSBN_distance_meter_Hundreds
|
||||
[356] = "%.1f", -- RSBN_distance_meter_Tens
|
||||
[357] = "%.1f", -- RSBN_distance_meter_Singles
|
||||
[587] = "%.1f", -- RSBN_NPP_kurs_blinker
|
||||
[588] = "%.1f", -- RSBN_NPP_glisada_blinker
|
||||
[590] = "%.4f", -- RSBN_NPP_kurs_needle
|
||||
[589] = "%.4f", -- RSBN_NPP_glisada_needle
|
||||
[567] = "%.1f", -- RSBN_KPP_kren_blinker
|
||||
[568] = "%.1f", -- RSBN_KPP_tangaz_blinker
|
||||
--[565] = "%.4f", -- RSBN_KPP_kurs_director
|
||||
--[566] = "%.4f", -- RSBN_KPP_glisada_director
|
||||
--/N/ ARK subgroup ---------------------------------------------------------------------------------------------------------------------------------
|
||||
[174] = "%.1f", -- ARK_switch
|
||||
[254] = "%.1f", -- ARK_dal_bliz_selector
|
||||
[36] = "%.4f", -- ARK_RSBN_needle
|
||||
-- Radio-altimeter subgroup ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
[175] = "%.1f", -- RADIO_ALTIMETER_MARKER_switch
|
||||
[103] = "%.4f", -- RADIO_ALTIMETER_indicator
|
||||
[500] = "%.f", -- LOW_ALT_LIGHT
|
||||
-- UUA and SUA subgroup -----------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
[105] = "%.4f", -- UUA_indicator
|
||||
[537] = "%.f", -- AOA_WARNING_LIGHT
|
||||
-- DA-200 subgroup ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
[107] = "%.6f", -- DA200_TurnNeedle
|
||||
[106] = "%.4f", -- DA200_VerticalVelocity
|
||||
[31] = "%.4f", -- DA200_Slipball
|
||||
[177] = "%.1f", -- KPP_switch
|
||||
[259] = "%.1f", -- KPP_ARRETIR
|
||||
[535] = "%.1f", -- KPP_ARRETIR_light
|
||||
[108] = "%.4f", -- KPP_Bank
|
||||
[109] = "%.4f", -- KPP_Pitch
|
||||
-- ACCELEROMETER == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[110] = "%.4f", -- ACCELEROMETER
|
||||
[228] = "%.4f", -- RESET_G_needle
|
||||
[113] = "%.4f", -- MAX_G_needle
|
||||
[114] = "%.4f", -- MIN_G_needle
|
||||
--TRIMMER == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[172] = "%.1f", -- TRIMMER_switch
|
||||
[519] = "%.f", -- TRIMMER_light
|
||||
--PITOT TUBES == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[229] = "%.1f", -- PITOT_TUBES_SELECTOR
|
||||
[279] = "%.1f", -- PITOT_TUBES_HEATING_main
|
||||
[280] = "%.1f", -- PITOT_TUBES_HEATING_aux
|
||||
[406] = "%.1f", -- PITOT_TUBES_STATUS
|
||||
-- FREEZING EFFECTS == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[410] = "%.1f", -- FREEZING_level_absolute
|
||||
[543] = "%.1f", -- FREEZING_EFFECTS_canopy
|
||||
--/N/ DC bus == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[124] = "%.4f", -- DC_BUS_V_needle
|
||||
[165] = "%.1f", -- DC_BUS_battery
|
||||
[155] = "%.1f", -- DC_BUS_battery_heat
|
||||
[510] = "%.f", -- DC_GENERATOR_LIGHT
|
||||
[16666] = "%.1f", -- DC_GENERATOR
|
||||
[563] = "%.1f", -- DC_BUS
|
||||
[55] = "%.1f", -- DC_BUS_ISA_K
|
||||
--/N/ AC bus == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[564] = "%.1f", -- AC_BUS
|
||||
[15366] = "%.1f", -- AC_BUS_PO7501
|
||||
[15466] = "%.1f", -- AC_BUS_PO7502
|
||||
[16466] = "%.1f", -- AC_BUS_Emerg_Inverter
|
||||
[16966] = "%.1f", -- AC_GENERATOR
|
||||
[511] = "%.f", -- AC_GENERATOR_LIGHT
|
||||
--/N/ FUEL PUMPS & FUEL SYSTEM == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[159] = "%.1f", -- FUEL_PUMP_3
|
||||
[160] = "%.1f", -- FUEL_PUMP_1
|
||||
[161] = "%.1f", -- FUEL_PUMP_RASHOD
|
||||
[402] = "%.4f", -- FUEL_PRESSURE { 0, 45 } ????
|
||||
[52] = "%.4f", -- FUEL_METER
|
||||
--FUEL LIGHTS (in connection with previous) == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[501] = "%.f", -- FUEL_LIGHT_FUELPODC
|
||||
[502] = "%.f", -- FUEL_LIGHT_1GR
|
||||
[503] = "%.f", -- FUEL_LIGHT_450
|
||||
[504] = "%.f", -- FUEL_LIGHT_3GR
|
||||
[505] = "%.f", -- FUEL_LIGHT_FUELPODW
|
||||
[506] = "%.f", -- FUEL_LIGHT_RASHOD
|
||||
--ENGINE START DEVICE == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[403] = "%.1f", -- ENGINE_START_DEVICE_STATUS { -1, 0, 1, 2 }
|
||||
[509] = "%.f", -- START_DEVICE_ZAZIG_LIGHT
|
||||
[415] = "%.1f", -- ENGINE_OXYGENE_STATUS
|
||||
[61] = "%.4f", -- ENGINE_OXYGENE_manometer
|
||||
-- ENGINE and THROTTLE == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[624] = "%.1f", -- SPS_state
|
||||
[625] = "%.4f", -- KONUS_efficiency
|
||||
[626] = "%.4f", -- SOPLO_efficiency
|
||||
--[50] = "%.4f", -- ENGINE_RPM
|
||||
[670] = "%.4f", -- ENGINE_RPM2
|
||||
[51] = "%.4f", -- ENGINE_TEMP
|
||||
[404] = "%.4f", -- ENGINE_STRESS
|
||||
[507] = "%.f", -- FORSAZ_1_LIGHT
|
||||
[508] = "%.f", -- FORSAZ_2_LIGHT
|
||||
[512] = "%.f", -- NOZZLE_LIGHT
|
||||
[517] = "%.f", -- KONUS_LIGHT
|
||||
[513] = "%.f", -- OIL_LIGHT
|
||||
[627] = "%.4f", -- OIL_PRESSURE
|
||||
[534] = "%.f", -- FIRE_LIGHT
|
||||
[405] = "%.1f", -- ENGINE_SURGE_DOORS_POZITION { -1, 0, 1 }
|
||||
-- GIDRO == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[418] = "%.4f", -- PRIMARY_GIDRO_Pressure
|
||||
[419] = "%.4f", -- SECONDARY_GIDRO_Pressure
|
||||
[126] = "%.4f", -- PRIMARY_GIDRO_Pressure_needle
|
||||
[125] = "%.4f", -- SECONDARY_GIDRO_Pressure_needle
|
||||
[171] = "%.1f", -- GIDRO_NR27_switch
|
||||
[319] = "%.1f", -- GIDRO_ailerones_busters_switch
|
||||
[515] = "%.f", -- HYDRAULIC_LIGHT
|
||||
[514] = "%.f", -- BUSTER_LIGHT
|
||||
--HELMET == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[306] = "%.1f", -- HELMET_heat_man_auto_switch
|
||||
[310] = "%.1f", -- HELMET_quick_heat_button
|
||||
[595] = "%.1f", -- HELMET_visor_switch
|
||||
--AIR CONDITIONING == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[412] = "%.4f", -- AIR_CONDITION_cockpit_temperature
|
||||
-- WARNING LIGHTS == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[541] = "%.f", -- CANOPY_WARNING_LIGHT
|
||||
[542] = "%.f", -- SORC_LIGHT
|
||||
[407] = "%.f", -- WARNING_LIGHTS_CHECK_STATE
|
||||
[516] = "%.f", -- MARKER_LIGHT
|
||||
[518] = "%.f", -- STABILISATOR_LIGHT
|
||||
[520] = "%.f", -- CHECK_GEAR_LIGHT
|
||||
[521] = "%.f", -- FLAPS_LIGHT
|
||||
[522] = "%.f", -- AIRBRAKE_LIGHT
|
||||
[523] = "%.f", -- CENTRAL_PYLON_LIGHT
|
||||
[524] = "%.f", -- RATO_L_LIGHT
|
||||
[525] = "%.f", -- RATO_R_LIGHT
|
||||
[526] = "%.f", -- PYLON_1_ON_LIGHT
|
||||
[527] = "%.f", -- PYLON_2_ON_LIGHT
|
||||
[528] = "%.f", -- PYLON_3_ON_LIGHT
|
||||
[529] = "%.f", -- PYLON_4_ON_LIGHT
|
||||
[530] = "%.f", -- PYLON_1_OFF_LIGHT
|
||||
[531] = "%.f", -- PYLON_2_OFF_LIGHT
|
||||
[532] = "%.f", -- PYLON_3_OFF_LIGHT
|
||||
[533] = "%.f", -- PYLON_4_OFF_LIGHT
|
||||
-- GIRO DEVICES == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[536] = "%.1f", -- GIRO_ARRETIR
|
||||
[408] = "%.1f", -- GIRO_AGD_KSI_SAU_RLS_STATE
|
||||
[409] = "%.1f", -- GIRO_DA200_KSI_SAU_RLS_STATE
|
||||
[162] = "%.1f", -- GIRO_AGD_KSI_SAU_RLS_switch
|
||||
[163] = "%.1f", -- GIRO_DA200_KSI_SAU_RLS_switch
|
||||
-- ASP == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[539] = "%.1f", -- ASP_TGT_ACQUIRED_LIGHT
|
||||
[538] = "%.1f", -- ASP_LAUNCH
|
||||
[540] = "%.1f", -- ASP_DISENGAGE
|
||||
[67] = "%.1f", -- GUN_camera_3D
|
||||
[551] = "%.1f", -- ASP_DISTANCE
|
||||
[552] = "%.4f", -- ASP_DISTANCE_MISSILE
|
||||
[553] = "%.1f", -- RADAR_ERROR
|
||||
[554] = "%.1f", -- RADAR_LOW_ALT
|
||||
[555] = "%.1f", -- RADAR_FIX_BEAM
|
||||
[556] = "%.1f", -- ASP_SCALE_BASE
|
||||
[557] = "%.1f", -- ASP_SCALE_ANGLE
|
||||
[558] = "%.1f", -- RADAR_LAUNCH
|
||||
[559] = "%.1f", -- RADAR_MISSILE_HEAD_RDY
|
||||
[560] = "%.1f", -- RADAR_JAMMED
|
||||
[561] = "%.1f", -- RADAR_BROKEN
|
||||
[562] = "%.1f", -- RADAR_DISENGAGE
|
||||
[571] = "%.1f", -- RADAR_19A_1
|
||||
[572] = "%.1f", -- RADAR_19A_2
|
||||
[573] = "%.1f", -- RADAR_19A_3
|
||||
[574] = "%.1f", -- RADAR_19A_4
|
||||
[575] = "%.1f", -- RADAR_19A_5
|
||||
[576] = "%.1f", -- RADAR_19A_6
|
||||
[577] = "%.1f", -- RADAR_19A_7
|
||||
[578] = "%.1f", -- RADAR_19A_8
|
||||
[579] = "%.1f", -- SEAT_HEIGHT
|
||||
[580] = "%.1f", -- IAB_BOX
|
||||
[581] = "%.1f", -- IAB_LIGHT_1
|
||||
[582] = "%.1f", -- IAB_LIGHT_2
|
||||
[583] = "%.1f", -- IAB_LIGHT_3
|
||||
[584] = "%.1f", -- MISSILE_55_1
|
||||
[585] = "%.1f", -- MISSILE_55_2
|
||||
[586] = "%.1f", -- MISSILE_62
|
||||
[63] = "%.1f", -- TACTICAL_DROP_ARMED
|
||||
[591] = "%.1f", -- SPS_BOX
|
||||
[592] = "%.1f", -- SPS_HIGH
|
||||
[593] = "%.1f", -- SPS_ILLUMINATION
|
||||
[594] = "%.1f", -- SPS_LAUNCH
|
||||
[598] = "%.1f", -- GUV_BOX
|
||||
[701] = "%.1f", -- GUV_LAUNCH
|
||||
-- SARPP == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[193] = "%.1f", -- SARPP_switch
|
||||
-- SAU == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[546] = "%.f", -- SAU_stabilization_LIGHT
|
||||
[547] = "%.f", -- SAU_privedenie_LIGHT
|
||||
[544] = "%.f", -- SAU_landing_COMMAND_LIGHT
|
||||
[545] = "%.f", -- SAU_landing_AUTO_LIGHT
|
||||
-- ARU == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[64] = "%.4f", -- ARU_3G_instrument
|
||||
-- KONUS == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[66] = "%.4f", -- KONUS_UPES_3_instrument
|
||||
-- DRAG CHUTE == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[550] = "%.f", -- GUN_GOTOVN_LIGHT
|
||||
-- SPO == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == =
|
||||
[601] = "%.f", -- SPO_L_F
|
||||
[602] = "%.f", -- SPO_R_F
|
||||
[603] = "%.f", -- SPO_R_B
|
||||
[604] = "%.f", -- SPO_L_B
|
||||
[605] = "%.f", -- SPO_MUTED
|
||||
-- SOD == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[606] = "%.1f", -- SOD_ANSWER
|
||||
[607] = "%.1f", -- SRZO_ON
|
||||
[608] = "%.1f", -- SRZO_CODE
|
||||
[609] = "%.1f", -- SRZO_CIPH
|
||||
[611] = "%.1f", -- SRZO_ERROR
|
||||
[613] = "%.1f", -- ASP_BACKLIGHT_ON
|
||||
[614] = "%.1f", -- ASP_BACKLIGHT_INTENSITY
|
||||
[618] = "%.1f", -- NEEDLES_PHOSPHOR_LIGHT
|
||||
[152] = "%.1f", -- RED_PANELLIGHT
|
||||
[619] = "%.1f", -- RED_FLOODLIGHT
|
||||
[620] = "%.1f", -- WHITE_PANELLIGHT
|
||||
[621] = "%.1f", -- RED_INSTRUMENT
|
||||
[622] = "%.1f", -- ASP_GLASS_LIGHT_INTENSITY
|
||||
[652] = "%.4f", -- H_indicator_needle_max
|
||||
[655] = "%.4f", -- COCKPIT_PRESSURE_ALTIMETER
|
||||
[656] = "%.4f", -- COCKPIT_PRESSURE
|
||||
-- Clock == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==
|
||||
-- currtimeHours; currtimeMinutes; currtimeSeconds; flightTimeMeterStatus;
|
||||
-- flightHours;flightMinutes; secondsMeterTimeMinutes; secondsMeterTimeSeconds;
|
||||
-- 115; 116; 117; 118; 119; 120; 121; 122;
|
||||
[115] = "%.4f", -- currtimeHours
|
||||
[116] = "%.4f", -- currtimeMinutes
|
||||
[117] = "%.4f", -- currtimeSeconds
|
||||
[118] = "%.4f", -- flightTimeMeterStatus
|
||||
[119] = "%.4f", -- flightHours
|
||||
[120] = "%.4f", -- flightMinutes
|
||||
[121] = "%.4f", -- secondsMeterTimeMinutes
|
||||
[122] = "%.4f", -- secondsMeterTimeSeconds
|
||||
-- Gear Brake
|
||||
[56] = "%.4f", -- Gearbrake_needle2
|
||||
[57] = "%.4f", -- Gearbrake_needle1
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- cockpit mechanics
|
||||
--[718] = "%.1f", -- Canopy Switch, OPEN/OFF/CLOSE {-1.0, 1.0}
|
||||
--[818] = "%.1f", -- Emergency Jettison Handle, IN/OUT {0.0, 1.0}
|
||||
|
||||
-- DC & AC buses & giro devices
|
||||
[165] = "%.1f", -- Battery On/Off
|
||||
[155] = "%.1f", -- Battery Heat On/Off
|
||||
[166] = "%.1f", -- DC Generator On/Off
|
||||
[169] = "%.1f", -- AC Generator On/Off
|
||||
[153] = "%.1f", -- PO-750 Inverter #1 On/Off
|
||||
[154] = "%.1f", -- PO-750 Inverter #2 On/Off
|
||||
[164] = "%.1f", -- Emergency Inverter
|
||||
-- GIRO
|
||||
[162] = "%.1f", -- Giro, NPP, SAU, RLS Signal, KPP Power On/Off
|
||||
[163] = "%.1f", -- DA-200 Signal, Giro, NPP, RLS, SAU Power On/Off
|
||||
-- FUEL_PUMPS & FUEL_SYSTEM (merged)
|
||||
[159] = "%.1f", -- Fuel Tanks 3rd Group, Fuel Pump
|
||||
[160] = "%.1f", -- Fuel Tanks 1st Group, Fuel Pump
|
||||
[161] = "%.1f", -- Drain Fuel Tank, Fuel Pump
|
||||
[274] = "%.2f", -- Fuel Quantity Set
|
||||
-- ENGINE START DEVICE
|
||||
[302] = "%.1f", -- APU On/Off
|
||||
[288] = "%.1f", -- Engine Cold / Normal Start
|
||||
[289] = "%.1f", -- Start Engine
|
||||
[301] = "%.1f", -- Engine Emergency Air Start
|
||||
[616] = "%.1f", -- Engine Stop/Lock
|
||||
-- ACCELEROMETER
|
||||
[228] = "%.1f", -- Accelerometer Reset
|
||||
-- PITOT TUBES and related things that use dc bus for heating
|
||||
[229] = "%.1f", -- Pitot tube Selector Main/Emergency
|
||||
[279] = "%.1f", -- Pitot tube/Periscope/Clock Heat
|
||||
[280] = "%.1f", -- Secondary Pitot Tube Heat
|
||||
-- DA-200
|
||||
[261] = "%.4f", -- Variometer Set
|
||||
-- ENGINE
|
||||
[308] = "%.1f", -- Anti surge doors - Auto/Manual
|
||||
[300] = "%.1f", -- Afterburner/Maximum Off/On
|
||||
[320] = "%.1f", -- Emergency Afterburner Off/On
|
||||
-- FIRE EXTINGUISHER
|
||||
[303] = "%.1f", -- Fire Extinguisher Off/On
|
||||
[324] = "%.1f", -- Fire Extinguisher Cover
|
||||
[325] = "%.1f", -- Fire Extinguisher
|
||||
-- LIGHTS
|
||||
[612] = "%.1f", -- Cockpit Texts Back-light default_axis
|
||||
[156] = "%.1f", -- Instruments Back-light default_axis
|
||||
[157] = "%.1f", -- Main Red Lights default_axis
|
||||
[222] = "%.1f", -- Main White Lights default_axis
|
||||
[194] = "%.1f", -- Navigation Lights Off/Min/Med/Max
|
||||
[323] = "%.2f", -- Landing Lights Off/Taxi/Land
|
||||
-- LIGHTS WARNING AXIS
|
||||
[195] = "%.1f", -- Set Warning Light Day/Night T4
|
||||
[196] = "%.1f", -- Set Warning Light Day/Night T10
|
||||
[273] = "%.1f", -- Set Warning Light Day/Night T4-2
|
||||
[282] = "%.1f", -- Set Warning Light Day/Night T4-3
|
||||
[283] = "%.1f", -- Set Warning Light Day/Night T10-2
|
||||
[322] = "%.1f", -- Set Warning Light Day/Night PPS
|
||||
[657] = "%.1f", -- SORC
|
||||
-- LIGHTS WARNING BUTTONS
|
||||
[369] = "%.1f", -- Check Warning Lights T4
|
||||
[370] = "%.1f", -- Check Warning Lights T10
|
||||
[371] = "%.1f", -- Check Warning Lights T4-2
|
||||
[372] = "%.1f", -- Check Warning Lights T4-3
|
||||
[373] = "%.1f", -- Check Warning Lights T10-2
|
||||
[374] = "%.1f", -- Check Warning Lights PPS
|
||||
[255] = "%.1f", -- SORC
|
||||
-- Radio
|
||||
[173] = "%.1f", -- Radio System On/Off
|
||||
[208] = "%.1f", -- Radio / Compass
|
||||
[209] = "%.1f", -- Squelch On/Off
|
||||
[210] = "%.1f", -- Radio Volume
|
||||
[211] = "%.2f", -- Radio Channel
|
||||
[315] = "%.1f", -- Radio PTT
|
||||
-- ARK
|
||||
[174] = "%.1f", -- ARK On/Off
|
||||
[198] = "%.1f", -- ARK Sound
|
||||
[212] = "%.1f", -- ARK Change
|
||||
[213] = "%.1f", -- ARK 1 - 9 {0.1,0.2,...,0.8,0.9}
|
||||
[189] = "%.2f", -- ARK Zone
|
||||
[197] = "%.1f", -- ARK Mode - Antenna / Compass
|
||||
[254] = "%.1f", -- Marker Far/Near
|
||||
-- RSBN
|
||||
[176] = "%.1f", -- RSBN On/Off
|
||||
[240] = "%.1f", -- RSBN Mode Land/Navigation/Descend
|
||||
[340] = "%.1f", -- RSBN / ARK
|
||||
[294] = "%.1f", -- RSBN Identify
|
||||
[347] = "%.1f", -- RSBN self-test
|
||||
--RSBN Panel
|
||||
[345] = "%.1f", -- RSBN Sound
|
||||
[351] = "%.2f", -- RSBN Navigation
|
||||
[352] = "%.2f", -- PRMG Landing
|
||||
[366] = "%.1f", -- RSBN Reset
|
||||
[367] = "%.1f", -- RSBN Bearing
|
||||
[368] = "%.1f", -- RSBN Distance
|
||||
-- SAU
|
||||
[179] = "%.1f", -- SAU On/Off
|
||||
[180] = "%.1f", -- SAU Pitch On/Off
|
||||
[343] = "%.1f", -- SAU - Stabilize
|
||||
[376] = "%.1f", -- SAU cancel current mode
|
||||
[377] = "%.1f", -- SAU - Recovery
|
||||
[344] = "%.1f", -- SAU Preset - Limit Altitude
|
||||
[341] = "%.1f", -- SAU - Landing - Command
|
||||
[342] = "%.1f", -- SAU - Landing - Auto
|
||||
[348] = "%.1f", -- SAU Reset/Off
|
||||
-- SPO
|
||||
[202] = "%.1f", -- SPO-10 RWR On/Off
|
||||
[226] = "%.1f", -- SPO-10 Test
|
||||
[227] = "%.1f", -- SPO-10 Night / Day
|
||||
[225] = "%.1f", -- SPO-10 Volume
|
||||
-- SRZO IFF
|
||||
[188] = "%.1f", -- SRZO IFF Coder/Decoder On/Off
|
||||
[192] = "%.1f", -- SRZO Codes
|
||||
[346] = "%.1f", -- IFF System 'Type 81' On/Off
|
||||
[190] = "%.1f", -- Emergency Transmitter Cover
|
||||
[191] = "%.1f", -- Emergency Transmitter On/Off
|
||||
[427] = "%.1f", -- SRZO Self Destruct Cover
|
||||
[428] = "%.1f", -- SRZO Self Destruct
|
||||
-- SOD
|
||||
[200] = "%.1f", -- SOD IFF On/Off
|
||||
[199] = "%.1f", -- SOD Identify
|
||||
[201] = "%.1f", -- SOD Wave Selector 3/1/2
|
||||
[204] = "%.2f", -- SOD Modes
|
||||
-- RADAR
|
||||
[205] = "%.1f", -- Radar Off/Prep/On
|
||||
[206] = "%.1f", -- Low Altitude Off/Comp/On
|
||||
[207] = "%.1f", -- Locked Beam On/Off
|
||||
[266] = "%.1f", -- Radar Screen Magnetic Reset
|
||||
[330] = "%.1f", -- Radar Interferes - Continues
|
||||
[331] = "%.1f", -- Radar Interferes - Temporary
|
||||
[332] = "%.1f", -- Radar Interferes - Passive
|
||||
[333] = "%.1f", -- Radar Interferes - Weather
|
||||
[334] = "%.1f", -- Radar Interferes - IFF
|
||||
[335] = "%.1f", -- Radar Interferes - Low Speed
|
||||
[336] = "%.1f", -- Radar Interferes - Self-test
|
||||
[337] = "%.1f", -- Radar Interferes - Reset
|
||||
[378] = "%.1f", -- Lock Target
|
||||
[623] = "%.1f", -- Radar Polar Filter
|
||||
-- SPRD
|
||||
[167] = "%.1f", -- SPRD (RATO) System On/Off
|
||||
[168] = "%.1f", -- SPRD (RATO) Drop System On/Off
|
||||
[252] = "%.1f", -- SPRD (RATO) Start Cover
|
||||
[253] = "%.1f", -- SPRD (RATO) Start
|
||||
[317] = "%.1f", -- SPRD (RATO)t Drop Cover
|
||||
[318] = "%.1f", -- SPRD (RATO) Drop
|
||||
-- CONTROL SYSTEM ------------- subsystems --------------------------------------------
|
||||
-- SPS
|
||||
[293] = "%.1f", -- SPS System Off/On
|
||||
-- ARU
|
||||
[295] = "%.1f", -- ARU System - Manual/Auto
|
||||
[296] = "%.1f", -- ARU System - Low Speed/Neutral/High Speed
|
||||
-- Airbrake
|
||||
[316] = "%.1f", -- Airbrake - Out/In
|
||||
-- Gear brakes
|
||||
[299] = "%.1f", -- ABS Off/On
|
||||
[238] = "%.1f", -- Nosegear Brake Off/On
|
||||
[237] = "%.1f", -- Emergency Brake
|
||||
-- Gears
|
||||
[326] = "%.1f", -- Gear Handle Fixator
|
||||
[327] = "%.1f", -- Gear Up/Neutral/Down {-1.0,0.0,1.0}
|
||||
[223] = "%.1f", -- Main Gears Emergency Release Handle
|
||||
[281] = "%.1f", -- Nose Gear Emergency Release Handle
|
||||
-- Flaps
|
||||
[311] = "%.1f", -- Flaps Neutral
|
||||
[312] = "%.1f", -- Flaps Take-Off
|
||||
[313] = "%.1f", -- Flaps Landing
|
||||
[314] = "%.1f", -- Flaps Reset buttons
|
||||
-- Drag chute
|
||||
[298] = "%.1f", -- Release Drag Chute
|
||||
[304] = "%.1f", -- Drop Drag Chute Cover
|
||||
[305] = "%.1f", -- Drop Drag Chute
|
||||
--TRIMMER
|
||||
[172] = "%.1f", -- Trimmer On/Off
|
||||
[379] = "%.1f", -- Trimmer Pitch Up/Down
|
||||
-- KONUS
|
||||
[170] = "%.1f", -- Nosecone On/Off
|
||||
[309] = "%.1f", -- Nosecone Control - Manual/Auto
|
||||
[236] = "%.2f", -- Nosecone manual position controller
|
||||
-- SOPLO
|
||||
[291] = "%.1f", -- Engine Nozzle 2 Position Emergency Control
|
||||
--MAIN_HYDRO and BUSTER_HYDRO == == == == == == == == == == == == == == == == == == == TEMPORARY MERGED == == == == == == == == == == == == == == == == == == == == == ==
|
||||
[171] = "%.1f", -- Emergency Hydraulic Pump On/Off
|
||||
[319] = "%.1f", -- Aileron Booster - Off/On
|
||||
--KPP
|
||||
[177] = "%.1f", -- KPP Main/Emergency
|
||||
[259] = "%.1f", -- KPP Cage
|
||||
[260] = "%.4f", -- KPP Set
|
||||
--IAS / TAS / KSI (NPP)
|
||||
[178] = "%.1f", -- NPP On/Off
|
||||
[258] = "%.1f", -- NPP Adjust
|
||||
[263] = "%.1f", -- NPP Course set
|
||||
-- ALTIMETER and radioALTIMETER
|
||||
[175] = "%.1f", -- Radio Altimeter/Marker On/Off
|
||||
[284] = "%.1f", -- Dangerous Altitude Warning Set
|
||||
[262] = "%.1f", -- Altimeter pressure knob
|
||||
-- OXYGENE_SYSTEM
|
||||
[285] = "%.1f", -- Helmet Air Condition Off/On
|
||||
[286] = "%.1f", -- Emergency Oxygen Off/On
|
||||
[287] = "%.1f", -- Mixture/Oxygen
|
||||
-- CANOPY
|
||||
[328] = "%.1f", -- Hermetize Canopy
|
||||
[329] = "%.1f", -- Secure Canopy
|
||||
[375] = "%.1f", -- Canopy Open
|
||||
[385] = "%.1f", -- Canopy Close
|
||||
[239] = "%.1f", -- Canopy Anti Ice
|
||||
[224] = "%.1f", -- Canopy Emergency Release Handle
|
||||
[649] = "%.1f", -- Canopy Ventilation System
|
||||
-- ASP Gunsight
|
||||
[186] = "%.1f", -- ASP Optical sight On/Off
|
||||
[241] = "%.1f", -- ASP Main Mode - Manual/Auto
|
||||
[242] = "%.1f", -- ASP Mode - Bombardment/Shooting
|
||||
[243] = "%.1f", -- ASP Mode - Missiles-Rockets/Gun
|
||||
[244] = "%.1f", -- ASP Mode - Giro/Missile
|
||||
[249] = "%.1f", -- Pipper On/Off
|
||||
[250] = "%.1f", -- Fix net On/Off
|
||||
[245] = "%.1f", -- Target Size
|
||||
[246] = "%.1f", -- Intercept Angle
|
||||
[247] = "%.1f", -- Scale Backlights control
|
||||
[248] = "%.1f", -- Pipper light control
|
||||
[251] = "%.1f", -- Fix Net light control
|
||||
[384] = "%.1f", -- TDC Range / Pipper Span control
|
||||
-- WEAPON_CONTROL
|
||||
[181] = "%.1f", -- Missiles - Rockets Heat On/Off
|
||||
[182] = "%.1f", -- Missiles - Rockets Launch On/Off
|
||||
[183] = "%.1f", -- Pylon 1-2 Power On/Off
|
||||
[184] = "%.1f", -- Pylon 3-4 Power On/Off
|
||||
[185] = "%.1f", -- GS-23 Gun On/Off
|
||||
[187] = "%.1f", -- Guncam On/Off
|
||||
[277] = "%.1f", -- Tactical Drop Cover
|
||||
[278] = "%.1f", -- Tactical Drop
|
||||
[275] = "%.1f", -- Emergency Missile/Rocket Launcher Cover
|
||||
[276] = "%.1f", -- Emergency Missile/Rocket Launcher
|
||||
[256] = "%.1f", -- Drop Wing Fuel Tanks Cover
|
||||
[257] = "%.1f", -- Drop Wing Fuel Tanks
|
||||
[386] = "%.1f", -- Drop Center Fuel Tank
|
||||
[269] = "%.1f", -- Drop Payload - Outer Pylons Cover
|
||||
[270] = "%.1f", -- Drop Payload - Outer Pylons
|
||||
[271] = "%.1f", -- Drop Payload - Inner Pylons Cover
|
||||
[272] = "%.1f", -- Drop Payload - Inner Pylons
|
||||
[230] = "%.1f", -- Weapon Mode - Air/Ground
|
||||
[231] = "%.1f", -- Weapon Mode - IR Missile/Neutral/SAR Missile
|
||||
[232] = "%.1f", -- Activate Gun Loading Pyro - 1
|
||||
[233] = "%.1f", -- Activate Gun Loading Pyro - 2
|
||||
[234] = "%.1f", -- Activate Gun Loading Pyro - 3
|
||||
[235] = "%.1f", -- Weapon Selector
|
||||
[297] = "%.1f", -- Missile Seeker Sound
|
||||
[381] = "%.1f", -- Fire Gun
|
||||
[382] = "%.1f", -- Release Weapon
|
||||
[383] = "%.1f", -- Release Weapon Cover
|
||||
-- HELMET_VISOR
|
||||
[306] = "%.1f", -- Helmet Heat - Manual/Auto
|
||||
[310] = "%.1f", -- Helmet Quick Heat
|
||||
[369] = "%.1f", -- Helmet visor - off/on
|
||||
-- AIR CONDITIONING
|
||||
[292] = "%.1f", -- Cockpit Air Condition Off/Cold/Auto/Warm
|
||||
-- SARPP
|
||||
[193] = "%.1f", -- SARPP-12 Flight Data Recorder On/Off
|
||||
--avAChS Clock
|
||||
[265] = "%.1f", -- Mech clock left lever
|
||||
[264] = "%.1f", -- Mech clock left lever
|
||||
-- Flight Control
|
||||
|
||||
-- Dummy buttons/switches
|
||||
[632] = "%.1f", -- Radar emission - Cover
|
||||
[633] = "%.1f", -- Radar emission - Combat/Training
|
||||
[634] = "%.1f", -- G-Suit Max/Min valve
|
||||
[635] = "%.1f", -- Electric Bus Nr.1 - Cover
|
||||
[636] = "%.1f", -- Electric Bus Nr.1
|
||||
[637] = "%.1f", -- Electric Bus Nr.2
|
||||
[638] = "%.1f", -- 1.5 Mach Test Button - Cover
|
||||
[639] = "%.1f", -- 1.5 Mach Test Button
|
||||
[640] = "%.1f", -- BU-45 Buster System Separation
|
||||
[642] = "%.1f", -- SOD Control PBU-1
|
||||
[641] = "%.1f", -- SOD Control PBU-2
|
||||
[643] = "%.1f", -- Eject
|
||||
[644] = "%.1f", -- Ejection Seat Emergency Oxygen
|
||||
[645] = "%.1f", -- UK-2M Mic Amplifier M/L
|
||||
[646] = "%.1f", -- UK-2M Mic Amplifier GS/KM
|
||||
[647] = "%.1f", -- Suit Ventilation
|
||||
[648] = "%.1f", -- Harness Separation
|
||||
[650] = "%.1f", -- Harness Loose/Tight
|
||||
[651] = "%.1f", -- Throttle Fixation
|
||||
-- IAB PBK-3
|
||||
[387] = "%.1f", -- Emergency Jettison
|
||||
[388] = "%.1f", -- Emergency Jettison Armed / Not Armed
|
||||
[389] = "%.1f", -- Tactical Jettison
|
||||
[390] = "%.1f", -- Special AB / Missile-Rocket-Bombs-Cannon
|
||||
[391] = "%.1f", -- Brake Chute
|
||||
[392] = "%.1f", -- Detonation Air / Ground
|
||||
-- SPS 141-100
|
||||
[393] = "%.1f", -- "On / Off"
|
||||
[394] = "%.1f", -- Transmit / Receive
|
||||
[395] = "%.1f", -- Program I / II
|
||||
[396] = "%.1f", -- Continuous / Impuls
|
||||
[397] = "%.1f", -- Test
|
||||
[398] = "%.1f", -- Dispenser Auto / Manual
|
||||
[399] = "%.1f", -- Off / Parallel / Full
|
||||
[400] = "%.1f", -- Manual Activation button - Cover
|
||||
[401] = "%.1f", -- Manual Activation button
|
||||
-- GUV Control Box -/N/ GUV is useless, it's mostly anti-infantry weapon
|
||||
[420] = "%.1f", -- On / Off
|
||||
[421] = "%.1f", -- MAIN GUN / UPK Guns
|
||||
[422] = "%.1f", -- LOAD 1
|
||||
[425] = "%.1f", -- LOAD 2
|
||||
[424] = "%.1f", -- LOAD 3
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- ADI/KPP correction
|
||||
ExportScript.Tools.SendData(565, string.format("%.4f", (mainPanelDevice:get_argument_value(565) * 3))) -- RSBN_KPP_kurs_director
|
||||
ExportScript.Tools.SendData(566, string.format("%.4f", (mainPanelDevice:get_argument_value(566) * 3))) -- RSBN_KPP_glisada_director
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
--[50] = "%.4f", -- ENGINE_RPM
|
||||
local lENGINE_RPM = mainPanelDevice:get_argument_value(50)
|
||||
local ltmpENGINE_RPM = lENGINE_RPM
|
||||
--ExportScript.Tools.WriteToLog('ENGINE_RPM: '..ExportScript.Tools.dump(lENGINE_RPM))
|
||||
--[[
|
||||
Export = Input = Anzeige = differenz
|
||||
0.48699209094048 = 0.31 = 3,48 -- Idle
|
||||
0.52623742818832 = 0.36 = 4
|
||||
0.59046465158463 = 0.455 = 5
|
||||
0.65491729974747 = 0.545 = 6
|
||||
0.71658140420914 = 0.635 = 7
|
||||
0.7799117565155 = 0.725 = 8
|
||||
0.84348386526108 = 0.82 = 9
|
||||
0.90568602085114 = 0.903 = 10
|
||||
idle 4 5 6 7 8 9 10 5 - 9
|
||||
y_min = 0,0 0,31 0,36 0,455 0,545 0,635 0,725 0,82 -- minimaler Ausgabewert
|
||||
y_max = 0,31 0,36 0,455 0,545 0,635 0,725 0,82 0,903 -- maximaler Ausgabewert
|
||||
x_min = 0 0,48699209094048 0,52623742818832 0,59046465158463 0,65491729974747 0,71658140420914 0,7799117565155 0,84348386526108 -- minimaler Eingangswert
|
||||
x_max = 0,48699209094048 0,52623742818832 0,59046465158463 0,65491729974747 0,71658140420914 0,7799117565155 0,84348386526108 0,90568602085114 -- maximaler Eingangswert
|
||||
|
||||
d_y = 0,31 0,05 0,095 0,09 0,09 0,09 0,095 0,083 0,09 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 0,48699209094048 0,03924533724784 0,06422722339631 0,06445264816284 0,06166410446167 0,06333035230636 0,06357210874558 0,06220215559006 0,063 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 0,63656064598776 1,27403670107974 1,47912357060508 1,39637396701862 1,45952010145454 1,42111952203622 1,49436603369878 1,33435890143433 1,428571428571 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = -0,000000000000002 -0,3104457969937 -0,4183701837679 -0,3695094679175 -0,4108649637718 -0,3833478226497 -0,4404736382191 -0,3055102038274 -0,38915965216 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0,0171875 0,636 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
if lENGINE_RPM < 0.48699209094048 then
|
||||
ltmpENGINE_RPM = 0.63656064598776 * lENGINE_RPM + -0.000000000000002
|
||||
elseif lENGINE_RPM > 0.48699209094048 and lENGINE_RPM < 0.52623742818832 then
|
||||
ltmpENGINE_RPM = 1.27403670107974 * lENGINE_RPM + -0.3104457969937
|
||||
elseif lENGINE_RPM > 0.52623742818832 and lENGINE_RPM < 0.84348386526108 then
|
||||
ltmpENGINE_RPM = 1.428571428571 * lENGINE_RPM + -0.38915965216
|
||||
elseif lENGINE_RPM > 0.84348386526108 then
|
||||
ltmpENGINE_RPM = 1.33435890143433 * lENGINE_RPM + -0.3055102038274
|
||||
end
|
||||
|
||||
--ExportScript.Tools.WriteToLog('ENGINE_RPM: '..ExportScript.Tools.dump(ltmpENGINE_RPM))
|
||||
ExportScript.Tools.SendData(50, string.format("%.4f", ltmpENGINE_RPM)) -- ENGINE_RPM
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
-- logic error with upper landing gear lights
|
||||
ExportScript.Tools.SendData(9, (mainPanelDevice:get_argument_value(9) == 0 and 1 or 0)) -- GEAR_NOSE_UP_LIGHT
|
||||
ExportScript.Tools.SendData(10, (mainPanelDevice:get_argument_value(10) == 0 and 1 or 0)) -- GEAR_LEFT_UP_LIGHT
|
||||
ExportScript.Tools.SendData(11, (mainPanelDevice:get_argument_value(11) == 0 and 1 or 0)) -- GEAR_RIGHT_UP_LIGHT
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to hardware
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
314
Scripts/DCS-ExportScript/ExportsModules/MiG-29A.lua
Normal file
314
Scripts/DCS-ExportScript/ExportsModules/MiG-29A.lua
Normal file
@@ -0,0 +1,314 @@
|
||||
-- MiG-29A Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.MiG29A = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / MiG-29A --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-TAS Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1000hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer
|
||||
ExportScript.AF.FC_Russian_AOA_MiG29()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_Old()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI(lDistanceToWay)
|
||||
|
||||
-- Vertical Velocity Indicator (VVI, TurnIndicator, SlipBallPosition)
|
||||
ExportScript.AF.FC_Russian_VVI_Old()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1000m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_30000()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft, 70)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight, 71)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
|
||||
-- Machmeter
|
||||
ExportScript.AF.FC_Russian_Mach_MiG29()
|
||||
|
||||
-- Magnetic Compass
|
||||
ExportScript.AF.FC_Russian_Compass2()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
-- Weapon Panel
|
||||
--ExportScript.AF.FC_WeaponPanel_MiG29(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Mechanical Configuration Indicator
|
||||
ExportScript.AF.FC_Russian_MDI_MiG29(lFunctionTyp)
|
||||
|
||||
-- Fuel Quantity Indicator
|
||||
ExportScript.AF.FuelQuantityIndicator_MiG29(lFunctionTyp)
|
||||
|
||||
-- Airintake
|
||||
ExportScript.AF.FC_Russian_AirIntake() -- Bug: Airintake.value always 1
|
||||
|
||||
-- Hydraulic Pressure Indicator
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 87)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 89)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
-- Oxygen Pressure Left
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 89)
|
||||
|
||||
-- Oxygen Pressure Center
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 90)
|
||||
|
||||
-- Oxygen Pressure Right
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 91)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 93)
|
||||
end
|
||||
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
--local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
--ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
ExportScript.AF.FC_Russian_MDI_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FuelQuantityIndicator_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
ExportScript.AF.StatusLamp()
|
||||
ExportScript.AF.SightingSystem_MiG29()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lAccelerationUnits = LoGetAccelerationUnits()
|
||||
if lAccelerationUnits ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lAccelerationUnits: '..ExportScript.Tools.dump(lAccelerationUnits))
|
||||
ExportScript.Tools.SendDataDAC("732", (lAccelerationUnits.y > 8.0 and 1 or 0) ) -- lamp Over-G warning
|
||||
end
|
||||
end
|
||||
314
Scripts/DCS-ExportScript/ExportsModules/MiG-29G.lua
Normal file
314
Scripts/DCS-ExportScript/ExportsModules/MiG-29G.lua
Normal file
@@ -0,0 +1,314 @@
|
||||
-- MiG-29G Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.MiG29G = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / MiG-29G --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-TAS Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1000hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer
|
||||
ExportScript.AF.FC_Russian_AOA_MiG29()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_Old()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI(lDistanceToWay)
|
||||
|
||||
-- Vertical Velocity Indicator (VVI, TurnIndicator, SlipBallPosition)
|
||||
ExportScript.AF.FC_Russian_VVI_Old()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1000m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_30000()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft, 70)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight, 71)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
|
||||
-- Machmeter
|
||||
ExportScript.AF.FC_Russian_Mach_MiG29()
|
||||
|
||||
-- Magnetic Compass
|
||||
ExportScript.AF.FC_Russian_Compass2()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
-- Weapon Panel
|
||||
--ExportScript.AF.FC_WeaponPanel_MiG29(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Mechanical Configuration Indicator
|
||||
ExportScript.AF.FC_Russian_MDI_MiG29(lFunctionTyp)
|
||||
|
||||
-- Fuel Quantity Indicator
|
||||
ExportScript.AF.FuelQuantityIndicator_MiG29(lFunctionTyp)
|
||||
|
||||
-- Airintake
|
||||
ExportScript.AF.FC_Russian_AirIntake() -- Bug: Airintake.value always 1
|
||||
|
||||
-- Hydraulic Pressure Indicator
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 87)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 89)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
-- Oxygen Pressure Left
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 89)
|
||||
|
||||
-- Oxygen Pressure Center
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 90)
|
||||
|
||||
-- Oxygen Pressure Right
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 91)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 93)
|
||||
end
|
||||
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
--local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
--ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
ExportScript.AF.FC_Russian_MDI_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FuelQuantityIndicator_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
ExportScript.AF.StatusLamp()
|
||||
ExportScript.AF.SightingSystem_MiG29()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lAccelerationUnits = LoGetAccelerationUnits()
|
||||
if lAccelerationUnits ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lAccelerationUnits: '..ExportScript.Tools.dump(lAccelerationUnits))
|
||||
ExportScript.Tools.SendDataDAC("732", (lAccelerationUnits.y > 8.0 and 1 or 0) ) -- lamp Over-G warning
|
||||
end
|
||||
end
|
||||
314
Scripts/DCS-ExportScript/ExportsModules/MiG-29S.lua
Normal file
314
Scripts/DCS-ExportScript/ExportsModules/MiG-29S.lua
Normal file
@@ -0,0 +1,314 @@
|
||||
-- MiG-29S Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.MiG29S = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / MiG-29S --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-TAS Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1000hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer
|
||||
ExportScript.AF.FC_Russian_AOA_MiG29()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_Old()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI(lDistanceToWay)
|
||||
|
||||
-- Vertical Velocity Indicator (VVI, TurnIndicator, SlipBallPosition)
|
||||
ExportScript.AF.FC_Russian_VVI_Old()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1000m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_30000()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft, 70)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight, 71)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
|
||||
-- Machmeter
|
||||
ExportScript.AF.FC_Russian_Mach_MiG29()
|
||||
|
||||
-- Magnetic Compass
|
||||
ExportScript.AF.FC_Russian_Compass2()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
-- Weapon Panel
|
||||
--ExportScript.AF.FC_WeaponPanel_MiG29(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Mechanical Configuration Indicator
|
||||
ExportScript.AF.FC_Russian_MDI_MiG29(lFunctionTyp)
|
||||
|
||||
-- Fuel Quantity Indicator
|
||||
ExportScript.AF.FuelQuantityIndicator_MiG29(lFunctionTyp)
|
||||
|
||||
-- Airintake
|
||||
ExportScript.AF.FC_Russian_AirIntake() -- Bug: Airintake.value always 1
|
||||
|
||||
-- Hydraulic Pressure Indicator
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 87)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 89)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
-- Oxygen Pressure Left
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 89)
|
||||
|
||||
-- Oxygen Pressure Center
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 90)
|
||||
|
||||
-- Oxygen Pressure Right
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 91)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 93)
|
||||
end
|
||||
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
--local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
--ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
ExportScript.AF.FC_Russian_MDI_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FuelQuantityIndicator_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
ExportScript.AF.StatusLamp()
|
||||
ExportScript.AF.SightingSystem_MiG29()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lAccelerationUnits = LoGetAccelerationUnits()
|
||||
if lAccelerationUnits ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lAccelerationUnits: '..ExportScript.Tools.dump(lAccelerationUnits))
|
||||
ExportScript.Tools.SendDataDAC("732", (lAccelerationUnits.y > 8.0 and 1 or 0) ) -- lamp Over-G warning
|
||||
end
|
||||
end
|
||||
1629
Scripts/DCS-ExportScript/ExportsModules/MosquitoFBMkVI.lua
Normal file
1629
Scripts/DCS-ExportScript/ExportsModules/MosquitoFBMkVI.lua
Normal file
File diff suppressed because it is too large
Load Diff
471
Scripts/DCS-ExportScript/ExportsModules/P-47D-30.lua
Normal file
471
Scripts/DCS-ExportScript/ExportsModules/P-47D-30.lua
Normal file
@@ -0,0 +1,471 @@
|
||||
--[[
|
||||
P-47D-30 Export Script
|
||||
Created by: nosaMtrevoC of ED Forums (dt1)
|
||||
version 0.14
|
||||
|
||||
For use with DCS-ExportScripts plugin https://github.com/charlestytler/streamdeck-dcs-interface (Awesome work)
|
||||
|
||||
[Changelog]_______________________________________________________________________________________________________________________________________________________
|
||||
Version 0.14 - Changed errors in the Drop Ordinance Arming Panel and added switch cover ID's (thanks to olddog from ED Forums for the find)
|
||||
Version 0.13 - Formatting Changes
|
||||
Version 0.12 - Fixed some string formatting inconsistancies and errors
|
||||
Version 0.11 - Initial Release
|
||||
|
||||
|
||||
Extra ID's created for nice formatted output on Stream Deck See ID Guide Below:
|
||||
For use with ctytler's Stream Deck plugin (requires DCS-ExportScripts) at https://github.com/charlestytler/streamdeck-dcs-interface (Also Awesome)
|
||||
|
||||
The following ID's 2000-4000 in the table below are a work in progress. I figured I'd release the standard export script for people to use while working on this.
|
||||
|
||||
[Formatted for Stream Deck]
|
||||
[ID]______ [Description]__________________________ [Status]_______ [Output e.g.]__________________________________________________________________________________
|
||||
2012 True Heading Value Formatted Working 235
|
||||
2025 Altitude Formatted Working 6544
|
||||
2096 Altitude 50' or below Working 1 or 0 (1 is altitude warning / 0 is no warning) Use this to change altitude warning light
|
||||
2155 Main Fuel Tank In Progress Work in Progress (will output 92gal etc..)
|
||||
2156 Aux. Fuel Tank In Progress Work in Progress (will output 92gal etc..)
|
||||
2011 IAS Airspeed Working 235 mph
|
||||
3011 IAS Overspeed Indicator Working if Airspeed is greater than 475 value is 1 (allows you to show light etc..) P-47 Max IAS is 505 mph
|
||||
3033 Multi Guage In Progress Shows Manifold Press./RPM/Oil Temp/Oil Pressure/Fueel Pressure in one button (on Stream Deck)
|
||||
3032 Multi Guage Warning Light In Progress Monitors if any of the values on the multi guage are out of range (if so 1, if not 0) Allows you to change the button color to yellow if danger.
|
||||
|
||||
[Currently working on]____________________________________________________________________________________________________________________________________________
|
||||
-Documenting ID's and outputs better
|
||||
-Testing output to ensure proper string formatting for each value
|
||||
-Creating formatted outputs for Stream Deck Users (above table of id's)
|
||||
|
||||
]]
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.P47D30 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
|
||||
|
||||
-- [Flight Instruments] -------------------------------------------------------------------
|
||||
[11] = "%.4f", -- Airspeed Indicator {0.0, 900.0} {0.0, 0.9} (IAS from 0-900) scale 10mph from 50-300 and 50mph after maxIAS:505mph
|
||||
[29] = "%.4f", -- Variometer Guage {-6000.0, 6000.0} {-0.6, 0.6} (VSI-Vertical Speed indicator or Rate of Climb Indicator AN5825 0-6000' neg/pos vertical speed in feet per minute)
|
||||
|
||||
-- [Directional Gyro] ---------------------------------------------------------------------
|
||||
[12] = "%.4f", -- DI gauge {0.0, 2.0 * 3.1415926} {0.0, 1.0}
|
||||
|
||||
-- [Altimeter Guage] ----------------------------------------------------------------------
|
||||
[24] = "%.4f", -- Altimeter Hundreds {0.0, 10.0} {0.0, 1.0} (e.g. .9500 is 950 feet)
|
||||
[25] = "%.4f", -- Altimeter Thousands {0.0, 10.0} {0.0, 1.0} (e.g. .0950 is 950 feet)
|
||||
[26] = "%.4f", -- Altimeter Tens of Thousands {0.0, 10.0} {0.0, 1.0} (e.g. .0095 is 950 feet, this value times 100,000 shows feet like 950.0000 feet)
|
||||
--CA [21] = "%.4f", -- Altimeter Set Pressure {28.1, 31.0} {0.0, 1.0} (sea level reference pressure in inches of Mercury (kolsmann window))
|
||||
[171] = "%.4f", -- Altimeter Reference Hundreds {0.0, 10.0} {0.0, 1.0} (100 ft. index triangle markers)
|
||||
[172] = "%.4f", -- Altimeter Reference Thousands {0.0, 10.0} {0.0, 1.0} (1000 ft. index triangle markers)
|
||||
|
||||
-- [Artificial Horizon] -------------------------------------------------------------------
|
||||
[14] = "%.4f", -- AH Bank {-math.pi, math.pi} {1.0, -1.0}
|
||||
[15] = "%.4f", -- AH Pitch {-math.pi / 4.0, math.pi / 4.0} {1.0, -1.0}
|
||||
[136] = "%.4f", -- AH Zero {-10.0 * math.pi / 180.0, 10.0 * math.pi / 180.0} {-1.0, 1.0}
|
||||
[20] = "%0.1f", -- AH Cage {0.0, 1.0} {0.0, 1.0}
|
||||
|
||||
-- [Turn and bank indicator] --------------------------------------------------------------
|
||||
[28] = "%.4f", -- Side Slip Ball {-1.0, 1.0} {-1.0, 1.0}
|
||||
[27] = "%.4f", -- Turn Needle {-1.0, 1.0} {-1.0, 1.0}
|
||||
|
||||
-- [Oxygen Pressure Indicator] ------------------------------------------------------------
|
||||
[33] = "%.4f", -- Oxygen delivery gauge {0.0, 1.0} {0.0, 1.0}
|
||||
[34] = "%.4f", -- Oxygen pressure gauge {0.0, 500.0} {0.0, 1.0}
|
||||
|
||||
-- [Fuel contents gauge] ------------------------------------------------------------------
|
||||
[109] = "%.4f", -- Fuel Reserve main { 0.0, 40.0, 100.0, 150.0, 175.0, 200.0, 225.0, 250.0, 264.0, 270.0} {0.000, 0.144, 0.347, 0.506, 0.599, 0.666, 0.753, 0.828, 0.877, 1.000}
|
||||
[110] = "%.4f", -- Fuel Reserve Aux { 0.0, 10.0, 25.0, 50.0, 75.0, 100.0} {0.000, 0.103, 0.254, 0.506, 0.756, 1.000}
|
||||
|
||||
-- [A-11 clock] ---------------------------------------------------------------------------
|
||||
[4] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0}{0.0, 1.0} (needle position of hours, e.g. 0.5 is 6 pm for hour hand, 0.75 would be 9pm)
|
||||
[5] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0}{0.0, 1.0} (needle position of minutes hand, e.g. 0.5 would be 30 minutes, 0.25 would be 15 minutes etc..)
|
||||
[6] = "%.4f", -- CLOCK_currtime_seconds {0.0, 60.0}{0.0, 1.0} (needle position of seconds hand, e.g. 0.25 would be 15 seconds, 0.75 would be 45 seconds)
|
||||
|
||||
-- [hydraulic pressure] -------------------------------------------------------------------
|
||||
[78] = "%.4f", -- Hydraulic pressure gauge {0.0, 2000.0} {0.0, 1.0}
|
||||
|
||||
-- [Landing gears handle] -----------------------------------------------------------------
|
||||
[150] = "%.4f", -- Landing_Gear_Handle
|
||||
[151] = "%.4f", -- Landing_Gear_Handle_Indoor
|
||||
[80] = "%.f", -- LandingGearGreenLight (Need to test this one)
|
||||
[82] = "%.f", -- LandingGearRedLight
|
||||
|
||||
-- [Guages] -------------------------------------------------------------------------------
|
||||
[23] = "%.4f", -- Tachometer gauge RPM {0.0, 4500.0} {0.0, 1.0}
|
||||
[102] = "%.4f", -- Carburettor temperature gauge {-71.0, -70.0, 150.0} {-0.5, -0.35, 1.0}
|
||||
[103] = "%.4f", -- Turbine tachometer {0.0, 35000.0} {0.0, 1.0}
|
||||
[108] = "%.4f", -- Water pressure gauge {0.0, 5.0} {0.0, 1.0}
|
||||
[9] = "%.4f", -- Vacuum Suction Guage {0.0, 10.0} {0.0, 1.0} (AN5771-5 Vacuum System 0-10 inches of mercury inHg) min:3.85 max:4.15 norm:4.0
|
||||
[10] = "%.4f", -- Manifold pressure gauge {10.0, 75.0} {0.0, 1.0} (Absolute Pressure in inches of mercury inHg from 10-75) norm:32-45 inHg WarEmerg: 64 inHg
|
||||
[104] = "%.4f", -- Ammeter {-150.0, 0.0, 150.0} {1.0, 0.0, 1.0}
|
||||
[111] = "%.4f", -- Cylinder heads temperature gauge {0.0, 350.0} {0.0, 1.0}
|
||||
|
||||
-- [Tri-needle gauge] ---------------------------------------------------------------------
|
||||
[30] = "%.4f", -- Tri Guage Oil Temperature {-71.0, -70.0, 150.0} {-1.0, 0.0, 1.0}
|
||||
[31] = "%.4f", -- Tri Guage Oil Pressure {0.0, 200.0} {0.0, 1.0}
|
||||
[32] = "%.4f", -- Tri Guage Fuel Pressure {0.0, 35.0} {0.0, 1.0}
|
||||
|
||||
-- Accelerometer --------------------------------------------------------------------------
|
||||
[175] = "%.4f", -- Accelerometer Main {-5.0, 12.0} {0.0, 1.0}
|
||||
[177] = "%.4f", -- Accelerometer Minimum {-5.0, 12.0} {0.0, 1.0}
|
||||
[178] = "%.4f", -- Accelerometer Maximum {-5.0, 12.0} {0.0, 1.0}
|
||||
|
||||
-- [Cooling flaps combined indicator] -----------------------------------------------------
|
||||
[89] = "%.4f", -- Intercooler Flap Position {0.0, 1.0} {0.0, 1.0}
|
||||
[90] = "%.4f", -- Oil Cooler Flap Position {0.0, 1.0} {0.0, 1.0}
|
||||
|
||||
--[Other] ---------------------------------------------------------------------------------
|
||||
[180] = "%.4f", -- Panel_Shake_Z
|
||||
[181] = "%.4f", -- Panel_Shake_Y
|
||||
[189] = "%.4f", -- Panel_Rot_X
|
||||
[118] = "%0.1f", -- Canopy_Trucks
|
||||
[38] = "%0.1f", -- Canopy_Visibility
|
||||
[135] = "%0.1f", -- pilot Draw
|
||||
|
||||
-- [Stick] --------------------------------------------------------------------------------
|
||||
[50] = "%.4f", -- StickPitch
|
||||
[51] = "%.4f", -- StickBank
|
||||
|
||||
-- [Rudder Pedals] ------------------------------------------------------------------------
|
||||
[54] = "%.4f", -- RudderPedals
|
||||
[55] = "%.4f", -- Left_Wheel_Brake
|
||||
[56] = "%.4f", -- Right_Wheel_Brake
|
||||
|
||||
-- [K-14 gunsight] ------------------------------------------------------------------------
|
||||
[36] = "%.4f", -- sightRange
|
||||
[188] = "%.4f", -- K_14_Shake_Z
|
||||
[187] = "%.4f", -- K_14_Shake_Y
|
||||
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
|
||||
|
||||
-- [Flight Stick] -------------------------------------------------------------------------
|
||||
[53] = "%d", -- Button A - MG Trigger
|
||||
[52] = "%d", -- Button B2 - Secondary & Drop Ordnance Trigger
|
||||
|
||||
-- [Canopy Controls] ----------------------------------------------------------------------
|
||||
[39] = "%d", -- ["HATCH_ES"] = cabin_rocker(0, _("Cockpit.P47.canopy_es"), devices.CONTROLS, device_commands.Button_13
|
||||
[155] = "%d", -- ["HATCH_LH_H"] = cabin_pull_handle(0, _('Cockpit.Yak52.canopy_operate'), devices.CONTROLS, device_commands.Button_16
|
||||
[156] = "%d", -- ["HATCH_RH_H"] = cabin_pull_handle(0, _('Cockpit.Yak52.canopy_operate'), devices.CONTROLS, device_commands.Button_17
|
||||
[157] = "%d", -- Cockpit Jettison Pull Handle
|
||||
|
||||
-- Main Panel -----------------------------------------------------------------------------
|
||||
-- [Flight Instrument Panel] ----------------------------------------------------------
|
||||
[8] = "%d", -- Winding/Adjustment Clock Button
|
||||
[7] = "%.4f", -- Winding/Adjustment Clock (rotary)
|
||||
|
||||
[63] = "%d", -- Starter Switch Activate
|
||||
|
||||
[64] = "%d", -- Primer Pump ???
|
||||
[65] = "%d", -- Primer Activate ???
|
||||
|
||||
[113] = "%d", -- Cowl Flaps Button
|
||||
[46] = "%.4f", -- Defroster Knob (rotary ???)
|
||||
|
||||
[49] = "%.4f", -- Cockpit Ventilation Knob (rotary ???)
|
||||
[66] = "%0.1f", -- Magneto Selector (0.0=OFF / 0.1=LEFT / 0.2=RIGHT / 0.3=BOTH)
|
||||
[13] = "%.4f", -- DI
|
||||
|
||||
[17] = "%.4f", -- Artificial Horizon (pitch adj. rotary)
|
||||
[18] = "%.4f", -- Artificial Horizon (cage, rotary)
|
||||
|
||||
[22] = "%0.1f", -- Altimeter (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[176] = "%d", -- Accelerometer Reset
|
||||
[21] = "%d", -- Turbine Overspeed Lamp Test Button
|
||||
[83] = "%d", -- Landing Warning Lamp Test Button
|
||||
[81] = "%d", -- Landing Warning Green Lamp Test Button, D-35 specific
|
||||
[83] = "%d", -- Landing Warning Red Lamp Test Button, D-35 specific
|
||||
[70] = "%d", -- Fuel Pressure Lamp Test Button
|
||||
[79] = "%d", -- Battery Switch
|
||||
[162] = "%d", -- Parking Brake Lever
|
||||
|
||||
-- [Drop Ordinance Arming Panel] ------------------------------------------------------
|
||||
[163] = "%d", -- Stores Jettison Pull Handles Jettison Left hand
|
||||
[164] = "%d", -- Stores Jettison Pull Handles Jettison Right Hand
|
||||
[165] = "%d", -- Stores Jettison Pull Handles Jettison Both
|
||||
|
||||
[139] = "%d", -- LH Wing Bomb Switch Cover
|
||||
[140] = "%d", -- LH Wing Bomb Switch
|
||||
[141] = "%d", -- RH Wing Bomb Switch Cover
|
||||
[142] = "%d", -- RH Wing Bomb Switch
|
||||
[143] = "%d", -- Belly Bomb Switch Cover
|
||||
[144] = "%d", -- Belly Bomb Switch
|
||||
[145] = "%d", -- LH Chemical Switch Cover
|
||||
[146] = "%d", -- LH Chemical Switch
|
||||
[147] = "%d", -- RH Chemical Switch Cover
|
||||
[148] = "%d", -- RH Chemical Switch
|
||||
|
||||
-- ----------------------------------------------------------------------------------------
|
||||
|
||||
-- Port Wall ------------------------------------------------------------------------------
|
||||
-- [Throttle Quadrant] ----------------------------------------------------------------
|
||||
[43] = "%.4f", -- Throttle (rotary/slider)
|
||||
[44] = "%d", -- Radio Button / Microphone on (on throttle)
|
||||
[40] = "%d", -- NOS_ES device_commands.Button_1 ???
|
||||
[41] = "%d", -- NOS_ES device_commands.Button_2 ???
|
||||
[46] = "%.4f", -- Airscrew Lever - Prop RPM
|
||||
[45] = "%.4f", -- Airscrew Lever - Prop Lock
|
||||
[58] = "%.4f", -- Boost Lever
|
||||
[49] = "%.4f", -- Boost Lever Lock
|
||||
[48] = "%.4f", -- Mix Lever
|
||||
[57] = "%.4f", -- Frictioner Lever
|
||||
|
||||
-- [Prop Control Box] ----------------------------------------------------------------
|
||||
[72] = "%0.1f", -- Propellor Control Multi Position Switch (test ???)
|
||||
[74] = "%0.1f", -- Propellor Control Multi Position Switch (test ???) (0.1=Minus / 0.2=Plus / 0.3=OFF / 0.4=AUTO)
|
||||
[73] = "%d", -- Propellor Control CB (test ???)
|
||||
|
||||
-- [Recovery Flaps Switch] -----------------------------------------------------------
|
||||
[75] = "%d", -- Reovery Flaps Cover
|
||||
[76] = "%d", -- Recovery Flaps (floating point ???)
|
||||
|
||||
-- [Main Switch Box] -----------------------------------------------------------------
|
||||
[194] = "%.4f", -- Gun Sight Rheostat
|
||||
[195] = "%.4f", -- Compass Light Rheostat
|
||||
[170] = "%.4f", -- UV Instruments Light Rheostat
|
||||
[61] = "%.4f", -- Booster Pump(s) Control Rheostat
|
||||
[197] = "%d", -- Wing Tips Nav. Lights Switch
|
||||
[198] = "%d", -- Tail Nav. Light Switch
|
||||
[199] = "%d", -- Landing Light Switch
|
||||
[71] = "%d", -- Cockpit Light Switch
|
||||
[132] = "%d", -- Cockpit Light Button
|
||||
[200] = "%d", -- Generator Switch
|
||||
[201] = "%d", -- Pitot Heater Switch
|
||||
[62] = "%d", -- Oil Dilution Switch
|
||||
[202] = "%d", -- LG / FL Test Switch
|
||||
[203] = "%d", -- OXY / TRB Test Switch
|
||||
|
||||
-- Circuit Breaker Reset Switches
|
||||
[204] = "%d", -- LH Inboard Guns CB
|
||||
[205] = "%d", -- LH Outboard Guns CB
|
||||
[206] = "%d", -- RH Inboard Guns CB
|
||||
[207] = "%d", -- RH Outboard Guns CB
|
||||
[208] = "%d", -- Fuel Pumps CB
|
||||
[209] = "%d", -- Oil Cooler CB
|
||||
[210] = "%d", -- Intercooler CB
|
||||
[211] = "%d", -- Gun Relay and Gun Camera CB
|
||||
[212] = "%d", -- Gun Sight, Camera Heat & Water Injection CB
|
||||
[213] = "%d", -- Canopy Motor CB
|
||||
[214] = "%d", -- Landing Light CB
|
||||
[215] = "%d", -- Warn. Instruments CB
|
||||
[216] = "%d", -- Internal Lighting CB
|
||||
[217] = "%d", -- Pitot & Starter CB
|
||||
[218] = "%d", -- Position Lights + CB
|
||||
[219] = "%d", -- Recognition Lights + CB
|
||||
[220] = "%d", -- Radio CB
|
||||
[158] = "%d", -- Drop Ordinance CB
|
||||
[159] = "%d", -- Recovery Flaps CB
|
||||
|
||||
[87] = "%d", -- Intercooler Flap Switch
|
||||
[88] = "%d", -- Oil Cooler Flap Switch
|
||||
[67] = "%d", -- Guns Switch Cover
|
||||
[68] = "%d", -- Guns Switch
|
||||
|
||||
-- Trim Control Box
|
||||
[91] = "%.4f", -- Aileron Trim Wheel
|
||||
[92] = "%.4f", -- Elevator Trim Wheel
|
||||
[93] = "%.4f", -- Rudder Trim Wheel
|
||||
|
||||
[153] = "%d", -- Undercarriage Extension Lever
|
||||
[94] = "%d", -- Landing Flaps Lever
|
||||
[166] = "%d", -- LH C5 Assy. Cover
|
||||
-- ----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
-- Starboard Wall -------------------------------------------------------------------------
|
||||
-- [Recognition Lights Control Box] ---------------------------------------------------
|
||||
[96] = "%d", -- Recognition Lights Key Button
|
||||
[97] = "%d", -- Recognition Lights White multipostion Switch
|
||||
[98] = "%d", -- Recognition Lights Red multipostion Switch
|
||||
[99] = "%d", -- Recognition Lights Green multipostion Switch
|
||||
[100] = "%d", -- Recognition Lights Yellow multipostion Switch
|
||||
|
||||
-- [Radio Remote Channel Switcher]
|
||||
[1] = "%d", -- Off Button
|
||||
[2] = "%d", -- A Button
|
||||
[3] = "%d", -- B Button
|
||||
[4] = "%d", -- C Button
|
||||
[5] = "%d", -- D Button
|
||||
[6] = "%d", -- Dimmer Toggle
|
||||
[17] = "%d", -- Transmit Lock Toggle
|
||||
[156] = "%d", -- Mode Selector
|
||||
[77] = "%d", -- Volume Knob
|
||||
|
||||
-- [Detrola Receiver] -----------------------------------------------------------------
|
||||
[137] = "%.4f", -- Detrola Frequency Selector
|
||||
[138] = "%.4f", -- Detrola Volume
|
||||
|
||||
-- [Oxygen Apparatus] -----------------------------------------------------------------
|
||||
[130] = "%d", -- Oxygen Emergency By-pass
|
||||
[131] = "%d", -- Auto-Mix On-Off
|
||||
|
||||
-- [Tail Wheel Lock Lever] ------------------------------------------------------------
|
||||
[101] = "%d", -- Tail Wheel Lock
|
||||
|
||||
-- [Secret Radio Destruction Box] -----------------------------------------------------
|
||||
[185] = "%d", -- IFF_0
|
||||
[186] = "%d", -- IFF_1
|
||||
|
||||
-- [RH C5 Assy. Cover] ----------------------------------------------------------------
|
||||
[168] = "%.4f", --Cockpit.Generic.uv_rotating_cap
|
||||
|
||||
-- ----------------------------------------------------------------------------------------
|
||||
|
||||
-- Deck -----------------------------------------------------------------------------------
|
||||
[85] = "%0.1f", -- Main Fuel Tank Selector (0.0=MAIN / 0.25=EXTERNAL / 0.5=OFF / 0.75=AUX. )
|
||||
[86] = "%0.1f", -- Droptank Selector (0.0=BELLY / 0.5=LEFT / 1.00=RIGHT )
|
||||
[114] = "%d", -- Air Filter By-Pass Lever
|
||||
[160] = "%d", -- Hydraulic System Hand Pump
|
||||
[161] = "%0.1f", -- Carburettor Heater Lever
|
||||
|
||||
-- Gunsight -------------------------------------------------------------------------------
|
||||
[35] = "%.4f", -- Wing Span Selector
|
||||
[36] = "%.4f", -- Target Range Selector
|
||||
[37] = "%d", -- Fixed Reticle Mask Lever
|
||||
}
|
||||
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- ID: [2012] - Heading
|
||||
local trueHeading = string.format("%d", (mainPanelDevice:get_argument_value(12) * 360)) .. "°" .. "\nHDG"
|
||||
ExportScript.Tools.SendData(2012, trueHeading) --True heading
|
||||
|
||||
-- Altitude
|
||||
local digAltitude = mainPanelDevice:get_argument_value(26) * 100000
|
||||
local lowAltitude = 0
|
||||
-- Altitude Fix (needed if pressure isn't set properly)
|
||||
if digAltitude > 90000 then
|
||||
ExportScript.Tools.SendData(2025, "-") --ten thousands
|
||||
else
|
||||
ExportScript.Tools.SendData(2025, string.format("%d", digAltitude)) --ten thousands
|
||||
end
|
||||
|
||||
-- Altitude Warning Light
|
||||
if digAltitude <= 50 then
|
||||
lowAltitude = 1
|
||||
elseif digAltitude > 90000 then
|
||||
lowAltitude = 1
|
||||
else
|
||||
lowAltitude = 0
|
||||
end
|
||||
ExportScript.Tools.SendData(2096, lowAltitude)
|
||||
|
||||
-- Fuel Indicator
|
||||
ExportScript.Tools.SendData(2155, string.format("%d", ExportScript.CalculateFuel(mainPanelDevice:get_argument_value(109))) .. ' gal' ) --155 Left Fuel Tank
|
||||
ExportScript.Tools.SendData(2156, string.format("%d", ExportScript.CalculateFuel(mainPanelDevice:get_argument_value(110))) .. ' gal' ) --156 Right Fuel Tank
|
||||
|
||||
-- Speed IAS in mph
|
||||
local speedNum = mainPanelDevice:get_argument_value(11) * 1000
|
||||
local speedNeedle = string.format("%d", (mainPanelDevice:get_argument_value(11) * 1000)) .. "\nMPH"
|
||||
ExportScript.Tools.SendData(2011, speedNeedle) --Air Speed Needle
|
||||
|
||||
-- Over speed warning Indicator
|
||||
if speedNum < 475 then
|
||||
ExportScript.Tools.SendData(3011, 0) --Within Limits
|
||||
else
|
||||
ExportScript.Tools.SendData(3011, 1) --About to Overspeed
|
||||
end
|
||||
|
||||
-- Multi Guage Indicators
|
||||
local manifold = (mainPanelDevice:get_argument_value(10) * 75) --Manifold pressure gauge {10.0, 75.0} {0.0, 1.0}
|
||||
local rpm = mainPanelDevice:get_argument_value(23) * 4500 -- RPM
|
||||
local tofTemp = (mainPanelDevice:get_argument_value(30) -70) * 150 -- Tri Guage Oil Temperature {-71.0, -70.0, 150.0} {-1.0, 0.0, 1.0}
|
||||
local tofOil = mainPanelDevice:get_argument_value(31) * 200 -- Tri Guage Oil Pressure {0.0, 200.0} {0.0, 1.0}
|
||||
local tofFuel = mainPanelDevice:get_argument_value(32) * 35 -- Tri Guage Fuel Pressure {0.0, 35.0} {0.0, 1.0}
|
||||
|
||||
local FullInfoString = "Man. " .. string.format("%d", manifold) .. " inHg" ..
|
||||
"\nEngRPM " .. string.format("%d", rpm) ..
|
||||
"\nOil Temp " .. string.format("%d", tofTemp) .. " °C" ..
|
||||
"\nOil " .. string.format("%d", tofOil) .. " PSI" ..
|
||||
"\nFuel " .. string.format("%d", tofFuel) .. " PSI"
|
||||
|
||||
ExportScript.Tools.SendData(3033, FullInfoString)
|
||||
|
||||
--SYSTEMS MONITORING FOR ABOVE Multi Guage Indicators (changes stream deck buutton to red for one of the above values out of range (danger))
|
||||
local infoDanger = 0
|
||||
|
||||
if manifold > 64 then --Manifold no more than 64 inches mercury
|
||||
infoDanger = 1
|
||||
elseif rpm > 3025 then --rpm no more than 3000
|
||||
infoDanger = 1
|
||||
elseif tofTemp > 105 then --temp no more than 105c
|
||||
infoDanger = 1
|
||||
elseif tofOil > 90 then --Oil press. no more than 90PSI
|
||||
infoDanger = 1
|
||||
elseif tofOil < 50 then --oil press. no less than 50
|
||||
infoDanger = 1
|
||||
elseif tofFuel > 21 then --fuel press. no more than
|
||||
infoDanger = 1
|
||||
elseif tofFuel < 24.2 then --fuel press. no less than
|
||||
infoDanger = 1
|
||||
end
|
||||
ExportScript.Tools.SendData(3032, infoDanger)
|
||||
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
-- every frame export to DAC
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
-- export in low tick interval to Ikarus
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
-- export in low tick interval to DAC
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.CalculateFuel(fuelNeedlePosition) -- Calculate fuel to nice output
|
||||
-- Fuel Reserve main { 0.0, 40.0, 100.0, 150.0, 175.0, 200.0, 225.0, 250.0, 264.0, 270.0} {0.000, 0.144, 0.347, 0.506, 0.599, 0.666, 0.753, 0.828, 0.877, 1.000}
|
||||
-- Fuel Reserve Aux { 0.0, 10.0, 25.0, 50.0, 75.0, 100.0} {0.000, 0.103, 0.254, 0.506, 0.756, 1.000}
|
||||
local usGallons = fuelNeedlePosition
|
||||
|
||||
-- Calculate fuel needle position into US Gallons here
|
||||
|
||||
return usGallons
|
||||
end
|
||||
331
Scripts/DCS-ExportScript/ExportsModules/P-51D-30-NA.lua
Normal file
331
Scripts/DCS-ExportScript/ExportsModules/P-51D-30-NA.lua
Normal file
@@ -0,0 +1,331 @@
|
||||
-- P-51D-30-NA Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.P51D30NA = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Flight Instruments
|
||||
[11] = "%.4f", -- AirspeedNeedle {0,50,100,150,200,250,300,350,400,450,500,550,600,650,700} {0.0,0.05,0.10,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7}
|
||||
[29] = "%.4f", -- Variometer {-6000,-4000,-2000,2000,4000,6000} {-0.6,-0.4,-0.2,0.2,0.4,0.6}
|
||||
-- Altimeter
|
||||
[97] = "%.4f", -- Altimeter_Pressure {28.1, 31.0}{0.0, 1.0}
|
||||
[96] = "%.4f", -- Altimeter_10000_footPtr {0.0, 100000.0}{0.0, 1.0}
|
||||
[24] = "%.4f", -- Altimeter_1000_footPtr {0.0, 10000.0}{0.0, 1.0}
|
||||
[25] = "%.4f", -- Altimeter_100_footPtr{0.0, 1000.0}{0.0, 1.0}
|
||||
-- Artificial horizon
|
||||
[15] = "%.4f", -- AHorizon_Pitch {1.0, -1.0}
|
||||
[14] = "%.4f", -- AHorizon_Bank {1.0, -1.0}
|
||||
[16] = "%.1f", -- AHorizon_PitchShift {-1.0, 1.0}
|
||||
[20] = "%.1f", -- AHorizon_Caged {0.0, 1.0}
|
||||
-- directional gyro
|
||||
[12] = "%.4f", -- GyroHeading
|
||||
-- turn indicator
|
||||
[27] = "%.4f", -- TurnNeedle {-1.0, 1.0}
|
||||
[28] = "%.4f", -- Slipball {-1.0, 1.0}
|
||||
-- oxygen pressure indicator
|
||||
[34] = "%.4f", -- Oxygen_Pressure {0.0, 500.0} {0.0, 1.0}
|
||||
[33] = "%.4f", -- Oxygen_Flow_Blinker
|
||||
-- fuel system
|
||||
[155] = "%.4f", -- Fuel_Tank_Left {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
|
||||
[156] = "%.4f", -- Fuel_Tank_Right {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
|
||||
[160] = "%.4f", -- Fuel_Tank_Fuselage {0.0,10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,85.0} {0.0,0.12,0.28,0.40,0.51,0.62,0.72,0.83,0.96,1.0}
|
||||
[32] = "%.4f", -- Fuel_Pressure {0.0, 25.0} {0.0, 1.0}
|
||||
-- A-11 clock
|
||||
[4] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0}{0.0, 1.0}
|
||||
[5] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0}{0.0, 1.0}
|
||||
[6] = "%.4f", -- CLOCK_currtime_seconds {0.0, 60.0}{0.0, 1.0}
|
||||
-- AN5730 remote compass
|
||||
[1] = "%.4f", -- CompassHeading
|
||||
[2] = "%.4f", -- CommandedCourse
|
||||
[3] = "%.4f", -- CommandedCourseKnob
|
||||
-- TailRadarWarning
|
||||
[161] = "%.f", -- Lamp TailRadarWarning
|
||||
-- SCR-522A Control panel
|
||||
[122] = "%.f", -- A_channel_light
|
||||
[123] = "%.f", -- B_channel_light
|
||||
[124] = "%.f", -- C_channel_light
|
||||
[125] = "%.f", -- D_channel_light
|
||||
[126] = "%.f", -- Transmit_light
|
||||
-- hydraulic pressure
|
||||
[78] = "%.4f", -- Hydraulic_Pressure {0.0, 2000.0} {0.0, 1.0}
|
||||
-- Landing gears handle
|
||||
[150] = "%.4f", -- Landing_Gear_Handle
|
||||
[151] = "%.4f", -- Landing_Gear_Handle_Indoor
|
||||
[80] = "%.f", -- LandingGearGreenLight
|
||||
[82] = "%.f", -- LandingGearRedLight
|
||||
-- gauges
|
||||
[10] = "%.4f", -- Manifold_Pressure {10.0, 75.0} {0.0, 1.0}
|
||||
[23] = "%.4f", -- Engine_RPM {0.0, 4500.0} {0.0, 1.0}
|
||||
[9] = "%.4f", -- Vacuum_Suction {0.0, 10.0} {0.0, 1.0}
|
||||
[21] = "%.4f", -- Carb_Temperature {-80, 150} {-0, 1}
|
||||
[22] = "%.4f", -- Coolant_Temperature {-80, 150} {-0, 1}
|
||||
[30] = "%.4f", -- Oil_Temperature {0.0, 100.0} {0, 1.0}
|
||||
[31] = "%.4f", -- Oil_Pressure {0.0, 200.0} {0, 1.0}
|
||||
[164] = "%.1f", -- Left_Fluor_Light
|
||||
[165] = "%.1f", -- Right_Fluor_Light
|
||||
[59] = "%.f", -- Hight_Blower_Lamp
|
||||
-- Trimmer
|
||||
[170] = "%.4f", -- Aileron_Trimmer {-1.0, 1.0}
|
||||
[172] = "%.4f", -- Rudder_Trimmer {-1.0, 1.0}
|
||||
[171] = "%.4f", -- Elevator_Trimmer {-1.0, 1.0}
|
||||
[174] = "%.4f", -- Control_Lock_Bracket
|
||||
[175] = "%.4f", -- Accelerometer_main {-5.0, 12.0} {0.0, 1.0}
|
||||
[177] = "%.4f", -- Accelerometer_min {-5.0, 12.0} {0.0, 1.0}
|
||||
[178] = "%.4f", -- Accelerometer_max {-5.0, 12.0} {0.0, 1.0}
|
||||
[101] = "%.4f", -- Ammeter {0.0, 150.0} {0.0, 1.0}
|
||||
-- light
|
||||
[185] = "%.1f", -- Left_cockpit_light
|
||||
[186] = "%.1f", -- Right_cockpit_light
|
||||
[190] = "%.4f", -- warEmergencyPowerLimWire
|
||||
-------------
|
||||
--[181] = "%.4f", -- Panel_Shake_Z
|
||||
--[180] = "%.4f", -- Panel_Shake_Y
|
||||
--[189] = "%.4f", -- Panel_Rot_X
|
||||
--[162] = "%.1f", -- Canopy_Trucks
|
||||
--[163] = "%.1f", -- Canopy_Visibility
|
||||
-- Stick
|
||||
--[50] = "%.4f", -- StickPitch
|
||||
--[51] = "%.4f", -- StickBank
|
||||
-- RudderPedals
|
||||
--[54] = "%.4f", -- RudderPedals
|
||||
--[55] = "%.4f", -- Left_Wheel_Brake
|
||||
--[56] = "%.4f", -- Right_Wheel_Brake
|
||||
-- K-14 gunsight
|
||||
[36] = "%.4f", -- sightRange
|
||||
--[188] = "%.4f", -- K_14_Shake_Z
|
||||
--[187] = "%.4f", -- K_14_Shake_Y
|
||||
-------------
|
||||
--[45] = "%.4f", -- ThrottleTwistGrip
|
||||
-------------
|
||||
[77] = "%.4f", -- Rocket_Counter
|
||||
-------------
|
||||
--[413] = "%.1f", -- WindShieldDamages
|
||||
--[412] = "%.1f", -- WindShieldOil
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Right Swich Panel
|
||||
[102] = "%d", -- Generator Connect/Disconnect
|
||||
[103] = "%d", -- Battery Connect/Disconnect
|
||||
[104] = "%d", -- Gun Heating ON/OFF
|
||||
[105] = "%d", -- Pitot Heating ON/OFF
|
||||
[106] = "%d", -- Wing Position Lights Bright/Off/Dim
|
||||
[107] = "%d", -- Tail Position Lights Bright/Off/Dim
|
||||
[108] = "%d", -- Red Recognition Light Key/Off/Steady
|
||||
[109] = "%d", -- Green Recognition Light Key/Off/Steady
|
||||
[110] = "%d", -- Amber Recognition Light Key/Off/Steady
|
||||
[111] = "%d", -- Recognition Lights Key
|
||||
[112] = "%d", -- Circuit Protectors Reset
|
||||
[100] = "%.4f", -- Right Fluorescent Light (rotary)
|
||||
[90] = "%.4f", -- Left Fluorescent Light (rotary)
|
||||
-- Flight Instrument panel
|
||||
[3] = "%.4f", -- Course Set (rotary)
|
||||
[13] = "%.4f", -- Heading Set/Cage (rotary)
|
||||
[179] = "%d", -- Heading Set/Cage Button
|
||||
[17] = "%.4f", -- Pitch Adjustment (rotary)
|
||||
[18] = "%.4f", -- Cage (rotary)
|
||||
[19] = "%d", -- Cage Button
|
||||
[8] = "%d", -- Winding/Adjustment Clock Button
|
||||
[7] = "%.4f", -- Winding/Adjustment Clock (rotary)
|
||||
[26] = "%.4f", -- Set Pressure (rotary)
|
||||
-- SCR-522A Control panel
|
||||
[117] = "%d", -- Radio ON/OFF
|
||||
[118] = "%d", -- A Channel Activate
|
||||
[119] = "%d", -- B Channel Activate
|
||||
[120] = "%d", -- C Channel Activate
|
||||
[121] = "%d", -- D Channel Activate
|
||||
[127] = "%.4f", -- Radio Lights Dimmer (rotary)
|
||||
[116] = "%.4f", -- Radio Audio Volume (rotary)
|
||||
[44] = "%d", -- Microphone On
|
||||
[200] = "%d", -- Arm rest
|
||||
[129] = "%d", -- Switch Locking Lever
|
||||
[128] = "%d", -- Radio Mode Transmit/Receive/Remote
|
||||
-------------
|
||||
[71] = "%.4f", -- Cockpit Lights (rotary)
|
||||
[66] = "%0.1f", -- Ignition Off/Right/Left/Both
|
||||
[67] = "%d", -- Gun control Gun And Camera On/Gun And Camera OFF/Camera On
|
||||
[72] = "%d", -- Silence Landing Gear Warning Horn Cut Off
|
||||
-- Bomb Arm/Chemical
|
||||
[69] = "%d", -- Left Bomb Arm/Chemical
|
||||
[70] = "%d", -- Right Bomb Arm/Chemical
|
||||
-- Release Mode
|
||||
[68] = "%0.1f", -- Release Mode, Bombs and Rockets Safe/Bombs Train Release/Bombs Both Release/Rockets Arm
|
||||
[73] = "%0.1f", -- Rockets Release Mode Off/Single/Auto
|
||||
[74] = "%d", -- Rockets Delay Switch Delay/Int
|
||||
[75] = "%0.4f", -- Rockets Counter Control
|
||||
-- Engine Control Panel
|
||||
[58] = "%d", -- Supercharger Switch Cover
|
||||
[57] = "%0.1f", -- Supercharger AUTO/LOW/HIGH
|
||||
[60] = "%d", -- High Blower Lamp Test
|
||||
[61] = "%d", -- Fuel Booster On/Off
|
||||
[62] = "%d", -- Oil Dilute Activate
|
||||
[63] = "%d", -- Starter Activate
|
||||
[64] = "%d", -- Starter Switch Cover
|
||||
[65] = "%d", -- Primer Activate
|
||||
-- Oxygen Regulator
|
||||
[131] = "%d", -- Auto-Mix On-Off
|
||||
[130] = "%0.4f", -- Oxygen Emergency By-pass
|
||||
-- Fuel system
|
||||
[85] = "%0.1f", -- Fuel Selector Valve, Select Right Combat Tank/Select Left Main Tank/Select Fuselage Tank/Select Right Main Tank/Select Left Combat Tank
|
||||
[86] = "%d", -- Fuel Shut-Off Valve ON/OFF
|
||||
-- AN/APS-13
|
||||
[114] = "%d", -- ail Warning Radar Power ON/OFF
|
||||
[115] = "%d", -- Tail Warning Radar Test
|
||||
[113] = "%.4f", -- Tail Warning Radar Light Control (rotary)
|
||||
-------------
|
||||
[79] = "%d", -- Hydraulic Release Knob
|
||||
[94] = "%.4f", -- Flaps Control Handle (rotary)
|
||||
[84] = "%d", -- Parking Brake Handle
|
||||
[81] = "%d", -- Safe Landing Gear Light Test
|
||||
[83] = "%d", -- Unsafe Landing Gear Light Test
|
||||
-- Detrola receiver
|
||||
[137] = "%.4f", -- Detrola Frequency Selector (rotary)
|
||||
[138] = "%.4f", -- Detrola Volume (rotary)
|
||||
-- canopy
|
||||
[147] = "%.4f", -- Canopy Hand Crank (rotary)
|
||||
[149] = "%d", -- Canopy Emergency Release Handle
|
||||
-- AN/ARA-8
|
||||
[152] = "%0.1f", -- Homing Adapter Mode TRANSMIT/COMM./HOMING
|
||||
[153] = "%d", -- Homing Adapter Power On/Off
|
||||
[154] = "%d", -- Homing Adapter's Circuit Breaker
|
||||
-- SCR-695
|
||||
[139] = "%0.1f", -- IFF Code Selector Code 1/2/3/4/5/6
|
||||
[140] = "%d", -- IFF Power On/Off
|
||||
[141] = "%d", -- IFF TIME/OFF/ON
|
||||
[142] = "%d", -- IFF Detonator Circuit On/Off
|
||||
[143] = "%d", -- IFF Distress Signal On/Off
|
||||
[145] = "%d", -- IFF Detonator Left
|
||||
[146] = "%d", -- IFF Detonator Right
|
||||
-- Trimmers
|
||||
[91] = "%.4f", -- Aileron Trim (rotary)
|
||||
[92] = "%.4f", -- Elevator Trim (rotary)
|
||||
[93] = "%.4f", -- Rudder Trim (rotary)
|
||||
-------------
|
||||
[157] = "%.4f", -- Defroster (rotary)
|
||||
[158] = "%.4f", -- Cold Air (rotary)
|
||||
[159] = "%.4f", -- Hot Air (rotary)
|
||||
-------------
|
||||
[89] = "%d", -- Landing Light On/Off
|
||||
[168] = "%d", -- Coolant Control Cover
|
||||
[87] = "%0.1f", -- Close Coolant Control/Automatic Coolant Control/Open Coolant Control
|
||||
[169] = "%d", -- Oil Control Cover
|
||||
[88] = "%0.1f", -- Close Oil Control/Automatic Oil Control/Open Oil Control
|
||||
[134] = "%0.1f", -- Carburetor Cold Air Control (rotary)
|
||||
[135] = "%0.1f", -- Carburetor Warm Air Control (rotary)
|
||||
[47] = "%0.1f", -- Mixture Control Select IDLE CUT OFF/RUN/EMERGENCY FULL RICH
|
||||
[43] = "%.4f", -- Throttle (rotary)
|
||||
[46] = "%.4f", -- Propeller RPM (rotary)
|
||||
[173] = "%d", -- Surface Control Lock Plunger. Left Button - Lock Stick in the Forward Position', Right Button - Lock Stick in the Neutral Position
|
||||
[48] = "%.4f", -- Lock Throttle (rotary)
|
||||
[49] = "%.4f", -- Lock Propeller & Mixture (rotary)
|
||||
[176] = "%d", -- G-meter reset
|
||||
[183] = "%d", -- Mirror
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to hardware
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
331
Scripts/DCS-ExportScript/ExportsModules/P-51D.lua
Normal file
331
Scripts/DCS-ExportScript/ExportsModules/P-51D.lua
Normal file
@@ -0,0 +1,331 @@
|
||||
-- P-51D-25-NA Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.P51D25NA = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Flight Instruments
|
||||
[11] = "%.4f", -- AirspeedNeedle {0,50,100,150,200,250,300,350,400,450,500,550,600,650,700} {0.0,0.05,0.10,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7}
|
||||
[29] = "%.4f", -- Variometer {-6000,-4000,-2000,2000,4000,6000} {-0.6,-0.4,-0.2,0.2,0.4,0.6}
|
||||
-- Altimeter
|
||||
[97] = "%.4f", -- Altimeter_Pressure {28.1, 31.0}{0.0, 1.0}
|
||||
[96] = "%.4f", -- Altimeter_10000_footPtr {0.0, 100000.0}{0.0, 1.0}
|
||||
[24] = "%.4f", -- Altimeter_1000_footPtr {0.0, 10000.0}{0.0, 1.0}
|
||||
[25] = "%.4f", -- Altimeter_100_footPtr{0.0, 1000.0}{0.0, 1.0}
|
||||
-- Artificial horizon
|
||||
[15] = "%.4f", -- AHorizon_Pitch {1.0, -1.0}
|
||||
[14] = "%.4f", -- AHorizon_Bank {1.0, -1.0}
|
||||
[16] = "%.1f", -- AHorizon_PitchShift {-1.0, 1.0}
|
||||
[20] = "%.1f", -- AHorizon_Caged {0.0, 1.0}
|
||||
-- directional gyro
|
||||
[12] = "%.4f", -- GyroHeading
|
||||
-- turn indicator
|
||||
[27] = "%.4f", -- TurnNeedle {-1.0, 1.0}
|
||||
[28] = "%.4f", -- Slipball {-1.0, 1.0}
|
||||
-- oxygen pressure indicator
|
||||
[34] = "%.4f", -- Oxygen_Pressure {0.0, 500.0} {0.0, 1.0}
|
||||
[33] = "%.4f", -- Oxygen_Flow_Blinker
|
||||
-- fuel system
|
||||
[155] = "%.4f", -- Fuel_Tank_Left {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
|
||||
[156] = "%.4f", -- Fuel_Tank_Right {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
|
||||
[160] = "%.4f", -- Fuel_Tank_Fuselage {0.0,10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,85.0} {0.0,0.12,0.28,0.40,0.51,0.62,0.72,0.83,0.96,1.0}
|
||||
[32] = "%.4f", -- Fuel_Pressure {0.0, 25.0} {0.0, 1.0}
|
||||
-- A-11 clock
|
||||
[4] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0}{0.0, 1.0}
|
||||
[5] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0}{0.0, 1.0}
|
||||
[6] = "%.4f", -- CLOCK_currtime_seconds {0.0, 60.0}{0.0, 1.0}
|
||||
-- AN5730 remote compass
|
||||
[1] = "%.4f", -- CompassHeading
|
||||
[2] = "%.4f", -- CommandedCourse
|
||||
[3] = "%.4f", -- CommandedCourseKnob
|
||||
-- TailRadarWarning
|
||||
[161] = "%.f", -- Lamp TailRadarWarning
|
||||
-- SCR-522A Control panel
|
||||
[122] = "%.f", -- A_channel_light
|
||||
[123] = "%.f", -- B_channel_light
|
||||
[124] = "%.f", -- C_channel_light
|
||||
[125] = "%.f", -- D_channel_light
|
||||
[126] = "%.f", -- Transmit_light
|
||||
-- hydraulic pressure
|
||||
[78] = "%.4f", -- Hydraulic_Pressure {0.0, 2000.0} {0.0, 1.0}
|
||||
-- Landing gears handle
|
||||
[150] = "%.4f", -- Landing_Gear_Handle
|
||||
[151] = "%.4f", -- Landing_Gear_Handle_Indoor
|
||||
[80] = "%.f", -- LandingGearGreenLight
|
||||
[82] = "%.f", -- LandingGearRedLight
|
||||
-- gauges
|
||||
[10] = "%.4f", -- Manifold_Pressure {10.0, 75.0} {0.0, 1.0}
|
||||
[23] = "%.4f", -- Engine_RPM {0.0, 4500.0} {0.0, 1.0}
|
||||
[9] = "%.4f", -- Vacuum_Suction {0.0, 10.0} {0.0, 1.0}
|
||||
[21] = "%.4f", -- Carb_Temperature {-80, 150} {-0, 1}
|
||||
[22] = "%.4f", -- Coolant_Temperature {-80, 150} {-0, 1}
|
||||
[30] = "%.4f", -- Oil_Temperature {0.0, 100.0} {0, 1.0}
|
||||
[31] = "%.4f", -- Oil_Pressure {0.0, 200.0} {0, 1.0}
|
||||
[164] = "%.1f", -- Left_Fluor_Light
|
||||
[165] = "%.1f", -- Right_Fluor_Light
|
||||
[59] = "%.f", -- Hight_Blower_Lamp
|
||||
-- Trimmer
|
||||
[170] = "%.4f", -- Aileron_Trimmer {-1.0, 1.0}
|
||||
[172] = "%.4f", -- Rudder_Trimmer {-1.0, 1.0}
|
||||
[171] = "%.4f", -- Elevator_Trimmer {-1.0, 1.0}
|
||||
[174] = "%.4f", -- Control_Lock_Bracket
|
||||
[175] = "%.4f", -- Accelerometer_main {-5.0, 12.0} {0.0, 1.0}
|
||||
[177] = "%.4f", -- Accelerometer_min {-5.0, 12.0} {0.0, 1.0}
|
||||
[178] = "%.4f", -- Accelerometer_max {-5.0, 12.0} {0.0, 1.0}
|
||||
[101] = "%.4f", -- Ammeter {0.0, 150.0} {0.0, 1.0}
|
||||
-- light
|
||||
[185] = "%.1f", -- Left_cockpit_light
|
||||
[186] = "%.1f", -- Right_cockpit_light
|
||||
[190] = "%.4f", -- warEmergencyPowerLimWire
|
||||
-------------
|
||||
--[181] = "%.4f", -- Panel_Shake_Z
|
||||
--[180] = "%.4f", -- Panel_Shake_Y
|
||||
--[189] = "%.4f", -- Panel_Rot_X
|
||||
--[162] = "%.1f", -- Canopy_Trucks
|
||||
--[163] = "%.1f", -- Canopy_Visibility
|
||||
-- Stick
|
||||
--[50] = "%.4f", -- StickPitch
|
||||
--[51] = "%.4f", -- StickBank
|
||||
-- RudderPedals
|
||||
--[54] = "%.4f", -- RudderPedals
|
||||
--[55] = "%.4f", -- Left_Wheel_Brake
|
||||
--[56] = "%.4f", -- Right_Wheel_Brake
|
||||
-- K-14 gunsight
|
||||
[36] = "%.4f", -- sightRange
|
||||
--[188] = "%.4f", -- K_14_Shake_Z
|
||||
--[187] = "%.4f", -- K_14_Shake_Y
|
||||
-------------
|
||||
--[45] = "%.4f", -- ThrottleTwistGrip
|
||||
-------------
|
||||
[77] = "%.4f", -- Rocket_Counter
|
||||
-------------
|
||||
--[413] = "%.1f", -- WindShieldDamages
|
||||
--[412] = "%.1f", -- WindShieldOil
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Right Swich Panel
|
||||
[102] = "%d", -- Generator Connect/Disconnect
|
||||
[103] = "%d", -- Battery Connect/Disconnect
|
||||
[104] = "%d", -- Gun Heating ON/OFF
|
||||
[105] = "%d", -- Pitot Heating ON/OFF
|
||||
[106] = "%d", -- Wing Position Lights Bright/Off/Dim
|
||||
[107] = "%d", -- Tail Position Lights Bright/Off/Dim
|
||||
[108] = "%d", -- Red Recognition Light Key/Off/Steady
|
||||
[109] = "%d", -- Green Recognition Light Key/Off/Steady
|
||||
[110] = "%d", -- Amber Recognition Light Key/Off/Steady
|
||||
[111] = "%d", -- Recognition Lights Key
|
||||
[112] = "%d", -- Circuit Protectors Reset
|
||||
[100] = "%.4f", -- Right Fluorescent Light (rotary)
|
||||
[90] = "%.4f", -- Left Fluorescent Light (rotary)
|
||||
-- Flight Instrument panel
|
||||
[3] = "%.4f", -- Course Set (rotary)
|
||||
[13] = "%.4f", -- Heading Set/Cage (rotary)
|
||||
[179] = "%d", -- Heading Set/Cage Button
|
||||
[17] = "%.4f", -- Pitch Adjustment (rotary)
|
||||
[18] = "%.4f", -- Cage (rotary)
|
||||
[19] = "%d", -- Cage Button
|
||||
[8] = "%d", -- Winding/Adjustment Clock Button
|
||||
[7] = "%.4f", -- Winding/Adjustment Clock (rotary)
|
||||
[26] = "%.4f", -- Set Pressure (rotary)
|
||||
-- SCR-522A Control panel
|
||||
[117] = "%d", -- Radio ON/OFF
|
||||
[118] = "%d", -- A Channel Activate
|
||||
[119] = "%d", -- B Channel Activate
|
||||
[120] = "%d", -- C Channel Activate
|
||||
[121] = "%d", -- D Channel Activate
|
||||
[127] = "%.4f", -- Radio Lights Dimmer (rotary)
|
||||
[116] = "%.4f", -- Radio Audio Volume (rotary)
|
||||
[44] = "%d", -- Microphone On
|
||||
[200] = "%d", -- Arm rest
|
||||
[129] = "%d", -- Switch Locking Lever
|
||||
[128] = "%d", -- Radio Mode Transmit/Receive/Remote
|
||||
-------------
|
||||
[71] = "%.4f", -- Cockpit Lights (rotary)
|
||||
[66] = "%0.1f", -- Ignition Off/Right/Left/Both
|
||||
[67] = "%d", -- Gun control Gun And Camera On/Gun And Camera OFF/Camera On
|
||||
[72] = "%d", -- Silence Landing Gear Warning Horn Cut Off
|
||||
-- Bomb Arm/Chemical
|
||||
[69] = "%d", -- Left Bomb Arm/Chemical
|
||||
[70] = "%d", -- Right Bomb Arm/Chemical
|
||||
-- Release Mode
|
||||
[68] = "%0.1f", -- Release Mode, Bombs and Rockets Safe/Bombs Train Release/Bombs Both Release/Rockets Arm
|
||||
[73] = "%0.1f", -- Rockets Release Mode Off/Single/Auto
|
||||
[74] = "%d", -- Rockets Delay Switch Delay/Int
|
||||
[75] = "%0.4f", -- Rockets Counter Control
|
||||
-- Engine Control Panel
|
||||
[58] = "%d", -- Supercharger Switch Cover
|
||||
[57] = "%0.1f", -- Supercharger AUTO/LOW/HIGH
|
||||
[60] = "%d", -- High Blower Lamp Test
|
||||
[61] = "%d", -- Fuel Booster On/Off
|
||||
[62] = "%d", -- Oil Dilute Activate
|
||||
[63] = "%d", -- Starter Activate
|
||||
[64] = "%d", -- Starter Switch Cover
|
||||
[65] = "%d", -- Primer Activate
|
||||
-- Oxygen Regulator
|
||||
[131] = "%d", -- Auto-Mix On-Off
|
||||
[130] = "%0.4f", -- Oxygen Emergency By-pass
|
||||
-- Fuel system
|
||||
[85] = "%0.1f", -- Fuel Selector Valve, Select Right Combat Tank/Select Left Main Tank/Select Fuselage Tank/Select Right Main Tank/Select Left Combat Tank
|
||||
[86] = "%d", -- Fuel Shut-Off Valve ON/OFF
|
||||
-- AN/APS-13
|
||||
[114] = "%d", -- ail Warning Radar Power ON/OFF
|
||||
[115] = "%d", -- Tail Warning Radar Test
|
||||
[113] = "%.4f", -- Tail Warning Radar Light Control (rotary)
|
||||
-------------
|
||||
[79] = "%d", -- Hydraulic Release Knob
|
||||
[94] = "%.4f", -- Flaps Control Handle (rotary)
|
||||
[84] = "%d", -- Parking Brake Handle
|
||||
[81] = "%d", -- Safe Landing Gear Light Test
|
||||
[83] = "%d", -- Unsafe Landing Gear Light Test
|
||||
-- Detrola receiver
|
||||
[137] = "%.4f", -- Detrola Frequency Selector (rotary)
|
||||
[138] = "%.4f", -- Detrola Volume (rotary)
|
||||
-- canopy
|
||||
[147] = "%.4f", -- Canopy Hand Crank (rotary)
|
||||
[149] = "%d", -- Canopy Emergency Release Handle
|
||||
-- AN/ARA-8
|
||||
--[152] = "%0.1f", -- Homing Adapter Mode TRANSMIT/COMM./HOMING
|
||||
--[153] = "%d", -- Homing Adapter Power On/Off
|
||||
--[154] = "%d", -- Homing Adapter's Circuit Breaker
|
||||
-- SCR-695
|
||||
--[139] = "%0.1f", -- IFF Code Selector Code 1/2/3/4/5/6
|
||||
--[140] = "%d", -- IFF Power On/Off
|
||||
--[141] = "%d", -- IFF TIME/OFF/ON
|
||||
--[142] = "%d", -- IFF Detonator Circuit On/Off
|
||||
--[143] = "%d", -- IFF Distress Signal On/Off
|
||||
--[145] = "%d", -- IFF Detonator Left
|
||||
--[146] = "%d", -- IFF Detonator Right
|
||||
-- Trimmers
|
||||
[91] = "%.4f", -- Aileron Trim (rotary)
|
||||
[92] = "%.4f", -- Elevator Trim (rotary)
|
||||
[93] = "%.4f", -- Rudder Trim (rotary)
|
||||
-------------
|
||||
[157] = "%.4f", -- Defroster (rotary)
|
||||
[158] = "%.4f", -- Cold Air (rotary)
|
||||
[159] = "%.4f", -- Hot Air (rotary)
|
||||
-------------
|
||||
[89] = "%d", -- Landing Light On/Off
|
||||
[168] = "%d", -- Coolant Control Cover
|
||||
[87] = "%0.1f", -- Close Coolant Control/Automatic Coolant Control/Open Coolant Control
|
||||
[169] = "%d", -- Oil Control Cover
|
||||
[88] = "%0.1f", -- Close Oil Control/Automatic Oil Control/Open Oil Control
|
||||
[134] = "%0.1f", -- Carburetor Cold Air Control (rotary)
|
||||
[135] = "%0.1f", -- Carburetor Warm Air Control (rotary)
|
||||
[47] = "%0.1f", -- Mixture Control Select IDLE CUT OFF/RUN/EMERGENCY FULL RICH
|
||||
[43] = "%.4f", -- Throttle (rotary)
|
||||
[46] = "%.4f", -- Propeller RPM (rotary)
|
||||
[173] = "%d", -- Surface Control Lock Plunger. Left Button - Lock Stick in the Forward Position', Right Button - Lock Stick in the Neutral Position
|
||||
[48] = "%.4f", -- Lock Throttle (rotary)
|
||||
[49] = "%.4f", -- Lock Propeller & Mixture (rotary)
|
||||
[176] = "%d", -- G-meter reset
|
||||
[183] = "%d", -- Mirror
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to hardware
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
726
Scripts/DCS-ExportScript/ExportsModules/SA342L.lua
Normal file
726
Scripts/DCS-ExportScript/ExportsModules/SA342L.lua
Normal file
@@ -0,0 +1,726 @@
|
||||
-- SA342L
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SA342L = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Gyro Panel
|
||||
[200] = "%.4f", -- Gyro_Needle_State {-1,1} Gyro Panel SYNC
|
||||
[201] = "%.f", -- Gyro_voyant_test Lamp {0,1}
|
||||
[202] = "%.f", -- Gyro_voyant_trim Lamp {0,1}
|
||||
[203] = "%.f", -- Gyro_voyant_bpp Lamp {0,1}
|
||||
-- Autopilot Panel
|
||||
[37] = "%.4f", -- T_Needle_State {-1,1} Pitch correction Indicator
|
||||
[38] = "%.4f", -- R_Needle_State {-1,1} Roll correction Indicator
|
||||
[39] = "%.4f", -- L_Needle_State {-1,1} Yaw correction Indicator
|
||||
--[196] = "%.4f", -- RWR_light {0,1} -- RWR background light
|
||||
--[] = "%.4f", -- PE_fondbright {0,1} ???
|
||||
--[353] = "%.4f", -- NADIR_fondbright {0,1} ???
|
||||
-- Flare Dispenser Lamps
|
||||
[233] = "%.f", -- Voyant_FD_On {0,1} Power On
|
||||
[231] = "%.f", -- Voyant_FD_G {0,1} select Left
|
||||
[232] = "%.f", -- Voyant_FD_D {0,1} select Right
|
||||
[227] = "%.f", -- Voyant_FD_LEU {0,1} Status LEU
|
||||
[223] = "%.f", -- Voyant_FD_G_vide1 {0,1} Status Left G
|
||||
[224] = "%.f", -- Voyant_FD_G_vide2 {0,1} Status Left VIDE
|
||||
[225] = "%.f", -- Voyant_FD_D_vide1 {0,1} Status Right G
|
||||
[226] = "%.f", -- Voyant_FD_D_vide2 {0,1} Status Right VIDE
|
||||
-- ADF Radio
|
||||
[158] = "%0.1f", -- ADF_nav1_centaine {0,1} X00.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[159] = "%0.1f", -- ADF_nav1_dizaine {0,1} 0X0.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[160] = "%0.1f", -- ADF_nav1_unite {0,1} 00X.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[161] = "%0.1f", -- ADF_nav1_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[162] = "%0.1f", -- ADF_nav2_centaine {0,1} X00.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[163] = "%0.1f", -- ADF_nav2_dizaine {0,1} 0X0.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[164] = "%0.1f", -- ADF_nav2_unite {0,1} 00X.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- ADF Gauge
|
||||
[113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0}
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[107] = "%.1f", -- ADF_FlagCAP {0,1}
|
||||
[109] = "%.1f", -- ADF_FlagBut {0,1}
|
||||
[108] = "%.1f", -- ADF_FlagCompteur PX Flag {0,1}
|
||||
[110] = "%0.1f", -- ADF_compteur_Cent {0,1} X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[111] = "%0.1f", -- ADF_compteur_Dix {0,1} 0X0 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[112] = "%0.1f", -- ADF_compteur_Unit {0,1} 00X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- CLOCK
|
||||
[41] = "%.3f", -- CLOCK_HOUR {0,1,2,3,4,5,6,7,8,9,10,11,12}{0,0.081,0.162,0.245,0.33,0.415,0.501,0.587,0.672,0.756,0.838,0.919,1}
|
||||
[42] = "%.3f", -- CLOCK_SECOND {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_MINUTE {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[44] = "%.3f", -- CLOCK_MINI {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30}{0,0.032,0.065,0.098,0.131,0.164,0.198,0.231,0.264,0.297,0.331,0.364,0.397,0.43,0.464,0.497,0.523,0.551,0.576,0.605,0.63,0.659,0.684,0.714,0.758,0.796,0.838,0.879,0.92,0.958,1}
|
||||
[210] = "%.4f", -- Clock_ExtCouronne
|
||||
-- Wipers
|
||||
--[547] = "%.4f", -- EGPilote {-1,1}
|
||||
--[546] = "%.4f", -- EGCopilote {-1,1}
|
||||
-- LIGHTS
|
||||
--[40] = "%.4f", -- Lum_Plafond {0,1} Main Panel Lights
|
||||
--[142] = "%.4f", -- PBOIntensity {0,1} Main Panel Background lights
|
||||
--[144] = "%.4f", -- PUPIntensity {0,1} Lower Panel Background lights
|
||||
-- Baro altimetre
|
||||
[87] = "%.4f", -- Baro_Altimeter_thousands Needle {0.0,1.0}
|
||||
[573] = "%.4f", -- Baro_Altimeter_hundred Needle {0.0,1.0}
|
||||
[88] = "%0.1f", -- Baro_Altimeter_press_unite 000X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[90] = "%0.1f", -- Baro_Altimeter_press_dix 00X0 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[92] = "%0.1f", -- Baro_Altimeter_press_cent 0X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[95] = "%0.1f", -- Baro_Altimeter_press_mille X000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- radar altimetre
|
||||
[94] = "%.4f", -- Radar_Altimeter {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0,0.019,0.035,0.072,0.109,0.147,0.18,0.214,0.247,0.283,0.316,0.345,0.376,0.407,0.438,0.469,0.501,0.564,0.606,0.648,0.676,0.706,0.732,0.756,0.775,0.794,0.811,0.829,0.843,0.858,0.87}
|
||||
[93] = "%.4f", -- DangerRALT_index {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0.0,0.0175,0.0338,0.0715,0.109,0.147,0.182,0.215,0.247,0.282,0.315,0.3445,0.377,0.407,0.439,0.47,0.5005,0.5628,0.6052,0.646,0.675,0.7058,0.7315,0.755,0.7747,0.793,0.8097,0.8272,0.8425,0.8575,0.8693}
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
[98] = "%.f", -- RAlt_flag_Panne OFF Flag{0,1}
|
||||
[99] = "%.1f", -- RAlt_flag_MA A (Test) Flag{0,1}
|
||||
[91] = "%.1f", -- RAlt_knob_MA Power/Test Knop{0,1}
|
||||
-- TORQUE
|
||||
[16] = "%.3f", -- Torque {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110}{0.085,0.13,0.172,0.214,0.253,0.289,0.326,0.362,0.395,0.43,0.466,0.501,0.537,0.573,0.607,0.639,0.676,0.71,0.746,0.785,0.826,0.865,0.908}
|
||||
[55] = "%.3f", -- Torque_Bug {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110}{0.084,0.128,0.171,0.2134,0.252,0.2889,0.325,0.361,0.396,0.431,0.467,0.501,0.535,0.571,0.605,0.639,0.674,0.71,0.745,0.785,0.825,0.865,0.91}
|
||||
[17] = "%.f", -- VOYANT_TORQUE Lamp {0,1}
|
||||
-- Gyro_Compas
|
||||
[26] = "%.3f", -- Gyro_Compas {0,30,60,90,120,150,180,210,240,270,300,330,360}{0,0.083,0.167,0.251,0.334,0.418,0.5,0.583,0.667,0.751,0.832,0.917,1}
|
||||
-- Stby HA ADI
|
||||
[214] = "%.4f", -- StbyHA_Roll {-180,-90,-60,-30,-20,-10,0,10,20,30,60,90,180}{-1,-0.502,-0.335,-0.166,-0.11,-0.052,0,0.055,0.113,0.171,0.334,0.502,1}
|
||||
[213] = "%.4f", -- StbyHA_Pitch {-180,-150,-120,-90,-60,-50,-40,-30,-20,-15,-10,-5,0,5,10,15,20,30,40,50,60,90,120,150,180}{-1,-0.833,-0.667,-0.5,-0.333,-0.278,-0.223,-0.167,-0.111,-0.084,-0.057,-0.003,0,0.028,0.056,0.083,0.111,0.167,0.223,0.278,0.333,0.5,0.667,0.833,1}
|
||||
[211] = "%.1f", -- StdbyHA_Flag Fault Flag {0,1}
|
||||
[212] = "%.4f", -- Stdby_HA_W W Sympol {0,1}
|
||||
[217] = "%.4f", -- Stdby_HA_Curseur Knob Needle {0,1}
|
||||
-- QComb Fuel Indicator
|
||||
[137] = "%.3f", -- QComb {0,50,100,150,200,250,300,350,400,500}{0.093,0.243,0.354,0.428,0.521,0.621,0.692,0.771,0.834,0.932}
|
||||
-- Horizon Artificiel Principal
|
||||
[27] = "%.4f", -- Pitch_HA {-180,-170,-160,-150,-140,-130,-120,-110,-100,-90,-80,-70,-60,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180}{-1,-0.946,-0.898,-0.838,-0.78,-0.723,-0.667,-0.61,-0.556,-0.501,-0.446,-0.393,-0.334,-0.277,-0.223,-0.166,-0.104,-0.054,0,0.054,0.102,0.161,0.22,0.277,0.333,0.389,0.443,0.498,0.553,0.607,0.666,0.722,0.776,0.834,0.896,0.946,1}
|
||||
[28] = "%.4f", -- Roll_HA {-180,-90,-60,-30,-20,-10,0,10,20,30,60,90,180}{-1,-0.498,-0.331,-0.162,-0.111,-0.053,0,0.058,0.112,0.168,0.331,0.498,1}
|
||||
[20] = "%.4f", -- Bille_HA Slip Ball {-1,1}
|
||||
[18] = "%.1f", -- flag_GS_HA GS Flag {0,1}
|
||||
[19] = "%.1f", -- flag_HS_HA Fault Flag {0,1}
|
||||
[29] = "%.1f", -- flag_Lock_HA Lock Flag {0,1}
|
||||
[117] = "%.4f", -- Curseur_HA Knob Needle {0,1}
|
||||
[120] = "%.4f", -- W_HA W Sympol {-1,1}
|
||||
[118] = "%.4f", -- VerBar_HA Vertical Bar {-1,1}
|
||||
[119] = "%.4f", -- HorBar_HA Horizon Bar {-1,1}
|
||||
-- variometre
|
||||
[24] = "%.4f", -- Variometre {-800,-700,-600,-500,-400,-300,-200,-100,-50,0,50,100,200,300,400,500,600,700,800}{-0.481,-0.436,-0.391,-0.338,-0.28,-0.218,-0.153,-0.075,-0.035,0.0,0.035,0.071,0.139,0.202,0.264,0.32,0.372,0.418,0.463}
|
||||
-- IAS
|
||||
[51] = "%.4f", -- IAS {0,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370}{0,0.1,0.133,0.172,0.207,0.243,0.277,0.316,0.35,0.38,0.41,0.439,0.465,0.491,0.517,0.541,0.565,0.587,0.611,0.63,0.651,0.671,0.692,0.712,0.731,0.75,0.77,0.791,0.809,0.829,0.849,0.867,0.886}
|
||||
-- RPM
|
||||
[135] = "%.4f", -- Turbine_RPM large Needle {0,5000,10000,15000,20000,25000,29000,35000,40000,43500,45000,50000}{0.095,0.181,0.263,0.346,0.424,0.505,0.572,0.665,0.748,0.802,0.828,0.909}
|
||||
[52] = "%.4f", -- Rotor_RPM small Needle {0,50,100,150,200,250,262,316.29,361.05,387,400,450}{0.096,0.191,0.283,0.374,0.461,0.549,0.57,0.665,0.748,0.802,0.811,0.904}
|
||||
-- Voltmetre
|
||||
[14] = "%.3f", -- Voltmetre {0,5,10,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}{0.045,0.074,0.103,0.133,0.163,0.192,0.221,0.25,0.281,0.31,0.339,0.368,0.399,0.429,0.458,0.488,0.518,0.547,0.576,0.605,0.635,0.664,0.695,0.724}
|
||||
-- TQuatre Engine temperature Indicator
|
||||
[15] = "%.3f", -- TQuatre Engine Temp {0,100,200,300,400,500,600,700,800}{0.1575,0.228,0.3,0.3845,0.473,0.577,0.676,0.772,0.8625}
|
||||
-- TempExt outside temperature
|
||||
[25] = "%.3f", -- TempExt {-40,-35,-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30,35,40,45,50,55,60,65,70}{-0.758,-0.691,-0.625,-0.558,-0.492,-0.425,-0.359,-0.292,-0.224,-0.158,-0.09,-0.024,0.043,0.11,0.177,0.244,0.31,0.379,0.445,0.512,0.579,0.644,0.712}
|
||||
-- TempThm Oil Temperature Indicator
|
||||
[151] = "%.3f", -- TempThm Oil Temp {-20,-10,0,10,20,30,40,50,60,70,80,85,90,100}{0.046,0.102,0.157,0.213,0.268,0.323,0.38,0.435,0.492,0.547,0.603,0.63,0.659,0.715}
|
||||
-- Fuel Tank Indicator
|
||||
[152] = "%.3f", -- Gauge_RSupp {-1,0,0.25,0.5,0.75,1}{0,0.202,0.426,0.63,0.801,1}
|
||||
-- VHF AM Radio
|
||||
[133] = "%.1f", -- AM_Radio_freq_cent {0,1} X00.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[134] = "%.1f", -- AM_Radio_freq_dix {0,1} 0X0.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[136] = "%.1f", -- AM_Radio_freq_unite {0,1} 00X.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[138] = "%.1f", -- AM_Radio_freq_dixieme {0,1} 000.X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[139] = "%.2f", -- AM_Radio_freq_centieme {0,1} 000.0XX {00,25,50,75,00}{0.0,0.25,0.50,0.75,1.0}
|
||||
-- Lamps
|
||||
-- Voyant_DEM
|
||||
[300] = "%.f", -- Voyant_DEM Start lamp{0,1}
|
||||
-- Voyant_RLT
|
||||
[301] = "%.f", -- Voyant_RLT Idle lamp {0,1}
|
||||
-- Voyant_BLOC
|
||||
[302] = "%.f", -- Voyant_BLOC Blocked Engine lamp {0,1}
|
||||
-- RSUPP Fueltank
|
||||
[320] = "%.f", -- Voyant_RSupp Fueltank lamp {0,1}
|
||||
-- RCONV Convoy Fueltank
|
||||
[321] = "%.f", -- Voyant_RConv Convoy Fueltank lamüp {0,1}
|
||||
-- Voyant_FILTAS Sandfilter lamp
|
||||
[322] = "%.f", -- Voyant_FILTAS sandfilter lamp {0,1}
|
||||
-- Voyant_Alarme Master Alarme lamp
|
||||
[303] = "%.f", -- Voyant_Alarme Master Alarme lamp {0,1}
|
||||
-- AM_RADIO
|
||||
[141] = "%.f", -- AM_Radio_lamp {0,1}
|
||||
-- Tableau Alarme Lamps
|
||||
[1] = "%.f", -- TA_Pitot {0,1}
|
||||
[2] = "%.f", -- TA_Hmot {0,1}
|
||||
[3] = "%.f", -- TA_Hbtp {0,1}
|
||||
[4] = "%.f", -- TA_Hral {0,1}
|
||||
[5] = "%.f", -- TA_Gene {0,1}
|
||||
[6] = "%.f", -- TA_Alter {0,1}
|
||||
[7] = "%.f", -- TA_Bat {0,1}
|
||||
[8] = "%.f", -- TA_PA {0,1}
|
||||
[9] = "%.f", -- TA_Nav {0,1}
|
||||
[10] = "%.f", -- TA_Comb {0,1}
|
||||
[11] = "%.f", -- TA_Bphy {0,1}
|
||||
[12] = "%.f", -- TA_Lim {0,1}
|
||||
[13] = "%.f", -- TA_Filt {0,1}
|
||||
-- Intercomp Lamps
|
||||
[455] = "%.f", -- Intercomp VHF Light
|
||||
[456] = "%.f", -- Intercomp FM1 Light
|
||||
[457] = "%.f", -- Intercomp UHF Light
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- WEAPONS PANEL 1
|
||||
[354] = "%1d", -- WP1 - Off/On/Stsnfby {-1.0,0.0,1.0}
|
||||
[357] = "%.4f", -- WP1 - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- WEAPONS PANEL 2
|
||||
[372] = "%1d", -- WP2 - Ma Left
|
||||
[373] = "%1d", -- WP2 - Ma Left Cover
|
||||
[374] = "%1d", -- WP2 - Ma Right
|
||||
[375] = "%1d", -- WP2 - Ma Right Cover
|
||||
[376] = "%1d", -- WP2 - Seq Ripple selection
|
||||
-- PILOTSIGHT
|
||||
[171] = "%1d", -- PILOTSIGHT - Pilot Sight
|
||||
-- PILOT STICK
|
||||
--[50] = "%1d", -- PILOT STICK - Magnetic Brake
|
||||
--[53] = "%1d", -- PILOT STICK - Wiper once
|
||||
--[209] = "%1d", -- PILOT STICK - Autopilot Button
|
||||
--[293] = "%1d", -- PILOT STICK - Slave
|
||||
--[294] = "%1d", -- PILOT STICK - Auto-Hover
|
||||
-- WSO LEFT SIDE STICK
|
||||
[255] = "%1d", -- PE WSO STICK - Lasing Button Cover
|
||||
[256] = "%1d", -- PE WSO STICK - Lasing Button
|
||||
[257] = "%1d", -- PE WSO STICK - Missile Launch Cover
|
||||
[258] = "%1d", -- PE WSO STICK - Missile Launch Button
|
||||
[259] = "%1d", -- PE WSO STICK - Inversed Symbology Toggle
|
||||
[260] = "%1d", -- PE WSO STICK - Inversed Image Toggle
|
||||
[264] = "%.1f", -- PE WSO STICK - Image Focus {-1.0,1.0}
|
||||
[262] = "%.1f", -- PE WSO STICK - Gain {-1.0,1.0}
|
||||
[263] = "%.1f", -- PE WSO STICK - Image Brightness {-1.0,1.0}
|
||||
[219] = "%.1f", -- PE WSO STICK - Symbology Brightness {-1.0,1.0}
|
||||
-- GYRO
|
||||
[197] = "%1d", -- GYRO - Test Cover
|
||||
[198] = "%1d", -- GYRO - Test Switch On/Off
|
||||
[199] = "%1d", -- GYRO - Left/Center/Right
|
||||
[153] = "%.2f", -- GYRO - CM/A/GM/D/GD {0.0,0.25,0.50,0.75,1.0}
|
||||
-- CLOCK
|
||||
[45] = "%.4f", -- CLOCK - Winder (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[46] = "%1d", -- CLOCK - Start/Stop
|
||||
[47] = "%1d", -- CLOCK - Reset
|
||||
-- PE SA342L/M/Mistral BCV (BOITIER DE COMMANDE VIDEO – video command box)
|
||||
[362] = "%1d", -- PE BCV - Centering
|
||||
[364] = "%1d", -- PE BCV - VDO/VTH
|
||||
[365] = "%.1f", -- PE BCV - Zoom {-1.0,1.0}
|
||||
[366] = "%.1f", -- PE BCV - CTH A/V/M {0.0,0.5,1.0}
|
||||
[367] = "%1d", -- PE BCV - Power
|
||||
[370] = "%.2f", -- PE BCV - Mode A/C/V/PIL/ASS {0.0,0.25,0.50,0.75,1.0}
|
||||
-- NADIR
|
||||
[330] = "%.4f", -- NADIR - Off/Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[331] = "%.2f", -- NADIR - Mode Off/Stby/Ground/Sea/Air Speed Sensor/Ground Test {0.0,0.2,0.4,0.6,0.8,1.0}
|
||||
[332] = "%.2f", -- NADIR - Parameter Wind/Magnetic Heading/Ground Speed/Calculated Time/Current Position/Waypoint {0.0,0.2,0.4,0.6,0.8,1.0}
|
||||
[333] = "%1d", -- NADIR - ENT
|
||||
[334] = "%1d", -- NADIR - DES
|
||||
[335] = "%1d", -- NADIR - AUX
|
||||
[336] = "%1d", -- NADIR - IC
|
||||
[337] = "%1d", -- NADIR - DOWN
|
||||
[351] = "%1d", -- NADIR - 0
|
||||
[338] = "%1d", -- NADIR - 1
|
||||
[339] = "%1d", -- NADIR - 2
|
||||
[340] = "%1d", -- NADIR - 3
|
||||
[342] = "%1d", -- NADIR - 4
|
||||
[343] = "%1d", -- NADIR - 5
|
||||
[344] = "%1d", -- NADIR - 6
|
||||
[346] = "%1d", -- NADIR - 7
|
||||
[347] = "%1d", -- NADIR - 8
|
||||
[348] = "%1d", -- NADIR - 9
|
||||
[341] = "%1d", -- NADIR - POL
|
||||
[345] = "%1d", -- NADIR - GEO
|
||||
[349] = "%1d", -- NADIR - POS
|
||||
[350] = "%1d", -- NADIR - GEL
|
||||
[352] = "%1d", -- NADIR - EFF
|
||||
-- AM_RADIO
|
||||
[128] = "%.2f", -- AM RADIO - Selector {0.0,0.33,0.66,0.99}
|
||||
[129] = "%.4f", -- AM RADIO - Freq decimals (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[130] = "%1d", -- AM RADIO - 25/50kHz Selector
|
||||
[131] = "%.4f", -- AM RADIO - Freq dial (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FM_RADIO
|
||||
[272] = "%.2f", -- FM RADIO - Main Selector {0.0,0.25,0.50,0.75,1.0}
|
||||
[273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0}
|
||||
[274] = "%1d", -- FM RADIO - 7
|
||||
[275] = "%1d", -- FM RADIO - 8
|
||||
[276] = "%1d", -- FM RADIO - 9
|
||||
[277] = "%1d", -- FM RADIO - 0
|
||||
[278] = "%1d", -- FM RADIO - X
|
||||
[279] = "%1d", -- FM RADIO - 4
|
||||
[280] = "%1d", -- FM RADIO - 5
|
||||
[281] = "%1d", -- FM RADIO - 6
|
||||
[282] = "%1d", -- FM RADIO - RC
|
||||
[283] = "%1d", -- FM RADIO - UP
|
||||
[284] = "%1d", -- FM RADIO - 1
|
||||
[285] = "%1d", -- FM RADIO - 2
|
||||
[286] = "%1d", -- FM RADIO - 3
|
||||
[287] = "%1d", -- FM RADIO - VAL
|
||||
[288] = "%1d", -- FM RADIO - DOWN
|
||||
-- TV
|
||||
[124] = "%1d", -- TV - On/Off
|
||||
[125] = "%.4f", -- TV - Contrast (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[123] = "%.4f", -- TV - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
--[126] = "%.4f", -- TV - Cover (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- RWR
|
||||
[148] = "%1d", -- RWR - Off/On/Croc {-1.0,0.0,1.0}
|
||||
[149] = "%1d", -- RWR - Marker
|
||||
[150] = "%1d", -- RWR - Page
|
||||
[121] = "%.4f", -- RWR - Audio (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[122] = "%.4f", -- RWR - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- ADI
|
||||
[115] = "%.4f", -- ADI - Unlock (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[116] = "%1d", -- ADI - Unlock
|
||||
-- Stby ADI
|
||||
[215] = "%.4f", -- STDBY ADI - Unlock (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[216] = "%1d", -- STDBY ADI - Unlock
|
||||
-- ArtVisVhfDop (Source selector for main artificial horizon vertical bar)
|
||||
[218] = "%.2f", -- ADI - Source Off/Camera target point/ADF ermitter/NADIR Waypoint {0.0,0.33,0.66,0.99}
|
||||
-- INTERCOM
|
||||
[452] = "%1d", -- INTERCOM - VHF AM Radio
|
||||
[68] = "%.4f", -- INTERCOM - VHF AM Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[453] = "%1d", -- INTERCOM - FM Radio
|
||||
[69] = "%.4f", -- INTERCOM - FM Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[454] = "%1d", -- INTERCOM - UHF Radio
|
||||
[70] = "%.4f", -- INTERCOM - UHF Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- TORQUE
|
||||
[58] = "%1d", -- TORQUE Bug/Test
|
||||
[54] = "%.4f", -- TORQUE Bug/Test (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- LIGHTS
|
||||
[22] = "%.4f", -- LIGHTS - Main Dashboard Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[21] = "%.4f", -- LIGHTS - Console Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[145] = "%.4f", -- LIGHTS - UV Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[23] = "%1d", -- LIGHTS - NORM/BNL
|
||||
[147] = "%.4f", -- LIGHTS - Roof Lamp Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[154] = "%1d", -- LIGHTS - Red Lens On/Off
|
||||
-- ELECTRIC
|
||||
[264] = "%1d", -- ELECTRIC - Battery
|
||||
[265] = "%1d", -- ELECTRIC - Alternator
|
||||
[268] = "%1d", -- ELECTRIC - Generator
|
||||
[62] = "%1d", -- ELECTRIC - Voltmeter Test
|
||||
[170] = "%1d", -- ELECTRIC - Pitot
|
||||
[271] = "%1d", -- ELECTRIC - Fuel Pump
|
||||
[267] = "%1d", -- ELECTRIC - Additionnal Fuel Tank
|
||||
[56] = "%1d", -- ELECTRIC - Starter Start/Stop/Air {-1.0,0.0,1.0}
|
||||
[57] = "%1d", -- ELECTRIC - Test
|
||||
[48] = "%1d", -- ELECTRIC - Copilot Wiper {-1.0,0.0,1.0}
|
||||
[49] = "%1d", -- ELECTRIC - Pilot Wiper {-1.0,0.0,1.0}
|
||||
[61] = "%1d", -- ELECTRIC - Left from Pitot
|
||||
[59] = "%1d", -- ELECTRIC - HYD Test
|
||||
[66] = "%1d", -- ELECTRIC - Alter Rearm
|
||||
[67] = "%1d", -- ELECTRIC - Gene Rearm
|
||||
[63] = "%1d", -- ELECTRIC - Convoy Tank On/Off
|
||||
[64] = "%1d", -- ELECTRIC - Sand Filter On/Off
|
||||
-- NAVLIGHTS
|
||||
[146] = "%1d", -- NAVLIGHTS - Navigation Lights CLI/OFF/FIX {-1.0,0.0,1.0}
|
||||
[228] = "%1d", -- NAVLIGHTS - Anticollision Light NOR/OFF/ATT {-1.0,0.0,1.0}
|
||||
[105] = "%1d", -- NAVLIGHTS - Landing Light Off/Vario/On {-1.0,0.0,1.0}
|
||||
[106] = "%1d", -- NAVLIGHTS - Landing Light Extend/Retract
|
||||
[382] = "%1d", -- NAVLIGHTS - Panels Lighting On/Off
|
||||
[30] = "%.4f", -- NAVLIGHTS - AntiCollision Light Intensity (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[229] = "%1d", -- NAVLIGHTS - Formation Lights On/Off
|
||||
[230] = "%.4f", -- NAVLIGHTS - Formation Lights Intensity (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FLARE DISPENSER
|
||||
[220] = "%1d", -- FLARE DISPENSER - G/G+D/D {-1.0,0.0,1.0}
|
||||
[221] = "%1d", -- FLARE DISPENSER - Mode
|
||||
[222] = "%1d", -- FLARE DISPENSER - Off/Speed {-1.0,0.0,1.0}
|
||||
[194] = "%1d", -- FLARE DISPENSER - Fire Button Cover
|
||||
[195] = "%1d", -- FLARE DISPENSER - Fire Button
|
||||
-- AUTOPILOT
|
||||
[31] = "%1d", -- AUTOPILOT - Autopilot On/Off
|
||||
[32] = "%1d", -- AUTOPILOT - Pitch On/Off
|
||||
[33] = "%1d", -- AUTOPILOT - Roll On/Off
|
||||
[34] = "%1d", -- AUTOPILOT - Yaw On/Off
|
||||
[35] = "%1d", -- AUTOPILOT - Mode Speed/OFF/Altitude {-1.0,0.0,1.0}
|
||||
[60] = "%1d", -- AUTOPILOT - Trim On/Off
|
||||
[65] = "%1d", -- AUTOPILOT - Magnetic Brake On/Off
|
||||
-- WEAPONS
|
||||
[269] = "%1d", -- WEAPONS - Master arm On/Off
|
||||
-- ROTORS
|
||||
[556] = "%.4f", -- ROTORS - Rotor Brake (Axis) {0.0, 1.0} in 0.055 Steps
|
||||
-- RADIOALTIMETER
|
||||
[96] = "%.4f", -- RADIOALTIMETER - Radar Alt Bug (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[100] = "%1d", -- RADIOALTIMETER - Radar Alt On/Off - Test
|
||||
[91] = "%.4f", -- RADIOALTIMETER - Radar Alt On/Off - Test (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- BAROALTIMETER
|
||||
[89] = "%.4f", -- BAROALTIMETER - Baro pressure QFE knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FUEL SYSTEM
|
||||
[557] = "%.4f", -- FUEL SYSTEM - Fuel Flow Lever (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- ADF RADIO
|
||||
[166] = "%1d", -- ADF RADIO - Select
|
||||
[167] = "%1d", -- ADF RADIO - Tone
|
||||
[178] = "%.2f", -- ADF RADIO - Mode {0.0,0.33,0.66,0.99}
|
||||
[179] = "%.4f", -- ADF RADIO - Gain (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[168] = "%.4f", -- ADF RADIO - Nav1 Hundred (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[169] = "%.4f", -- ADF RADIO - Nav1 Ten (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[173] = "%.4f", -- ADF RADIO - Nav1 Unit (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[174] = "%.4f", -- ADF RADIO - Nav2 Hundred (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[175] = "%.4f", -- ADF RADIO - Nav2 Ten (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[176] = "%.4f", -- ADF RADIO - Nav2 Unit (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- UHF RADIO
|
||||
[383] = "%.3f", -- UHF RADIO - MODE 0/FF/NA/SV/DL/G/EN {0.0,0.167,0.334,0.501,0.668,0.835,1.0}
|
||||
[384] = "%1d", -- UHF RADIO - DRW
|
||||
[385] = "%1d", -- UHF RADIO - VLD
|
||||
[386] = "%.4f", -- UHF RADIO - PAGE (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[387] = "%1d", -- UHF RADIO - CONF
|
||||
[388] = "%1d", -- UHF RADIO - 1
|
||||
[389] = "%1d", -- UHF RADIO - 2
|
||||
[390] = "%1d", -- UHF RADIO - 3
|
||||
[391] = "%1d", -- UHF RADIO - 4
|
||||
[392] = "%1d", -- UHF RADIO - 5
|
||||
[393] = "%1d", -- UHF RADIO - 6
|
||||
[394] = "%1d", -- UHF RADIO - 7
|
||||
[395] = "%1d", -- UHF RADIO - 8
|
||||
[396] = "%1d", -- UHF RADIO - 9
|
||||
[397] = "%1d" -- UHF RADIO - 0
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0))
|
||||
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102)
|
||||
if ADF_Aiguille_large ~= 0 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large + 0.5
|
||||
if ADF_Aiguille_large > 1 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large - 1.0
|
||||
end
|
||||
end
|
||||
ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- UHF Radio
|
||||
---------------------------------------------------
|
||||
local lUHFRadio = GetDevice(31)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2000, string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('UHF_Freq: '..ExportScript.Tools.dump(list_indication(5)))
|
||||
|
||||
local lUHFRadioFreq = ExportScript.Tools.getListIndicatorValue(5)
|
||||
|
||||
if lUHFRadioFreq ~= nil and lUHFRadioFreq.UHF_Freq ~= nil then
|
||||
ExportScript.Tools.SendData(2000, string.format("%s", lUHFRadioFreq.UHF_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2000, " ")
|
||||
end
|
||||
|
||||
-- AM Radio
|
||||
---------------------------------------------------
|
||||
local lAMRadio = GetDevice(5)
|
||||
if lAMRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2001, string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
end
|
||||
|
||||
-- FM Radio PR4G
|
||||
---------------------------------------------------
|
||||
local lFMRadio = GetDevice(28)
|
||||
if lFMRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2002, string.format("%.3f", lFMRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('FM_Freq: '..ExportScript.Tools.dump(list_indication(4)))
|
||||
|
||||
local lFMRadioFreq = ExportScript.Tools.getListIndicatorValue(4)
|
||||
|
||||
if lFMRadioFreq ~= nil and lFMRadioFreq.FM_Freq ~= nil then
|
||||
ExportScript.Tools.SendData(2002, string.format("%s", lFMRadioFreq.FM_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2002, " ")
|
||||
end
|
||||
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
-- [273] = "%.1f", -- FM RADIO - Chanel Selector {0.0,0.2,0.3,0.5,0.6,0.8,0.9,1.1} -- gerundet
|
||||
local lFM_RADIO_PRESET = {[0.0]="1",[0.2]="2",[0.3]="3",[0.5]="4",[0.6]="5",[0.8]="6",[0.9]="0",[1.1]="R"}
|
||||
ExportScript.Tools.SendData(2003, lFM_RADIO_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(273), 1, "ceil")])
|
||||
|
||||
-- Weapon Panel
|
||||
---------------------------------------------------
|
||||
if mainPanelDevice:get_argument_value(354) >= 0.0 then -- Weapon panel is On
|
||||
local lWeaponPanelDisplays = ExportScript.Tools.getListIndicatorValue(8)
|
||||
|
||||
if lWeaponPanelDisplays ~= nil then
|
||||
if lWeaponPanelDisplays.LEFT_screen ~= nil then
|
||||
ExportScript.Tools.SendData(2004, string.format("%s", lWeaponPanelDisplays.LEFT_screen))
|
||||
end
|
||||
if lWeaponPanelDisplays.RIGHT_screen ~= nil then
|
||||
ExportScript.Tools.SendData(2005, string.format("%s", lWeaponPanelDisplays.RIGHT_screen))
|
||||
end
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2004, "-")
|
||||
ExportScript.Tools.SendData(2005, "-")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- UHF Radio
|
||||
---------------------------------------------------
|
||||
local lUHFRadio = GetDevice(31)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC("2000", string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('UHF_Freq: '..ExportScript.Tools.dump(list_indication(5)))
|
||||
|
||||
local lUHFRadioFreq = ExportScript.Tools.getListIndicatorValue(5)
|
||||
|
||||
if lUHFRadioFreq ~= nil and lUHFRadioFreq.UHF_Freq ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%s", lUHFRadioFreq.UHF_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2000", "-")
|
||||
end
|
||||
|
||||
-- AM Radio
|
||||
---------------------------------------------------
|
||||
local lAMRadio = GetDevice(5)
|
||||
if lAMRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC("2001", string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2001", ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
end
|
||||
|
||||
-- FM Radio PR4G
|
||||
---------------------------------------------------
|
||||
local lFMRadio = GetDevice(28)
|
||||
if lFMRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC(2002, string.format("%.3f", lFMRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('FM_Freq: '..ExportScript.Tools.dump(list_indication(4)))
|
||||
|
||||
local lFMRadioFreq = ExportScript.Tools.getListIndicatorValue(4)
|
||||
|
||||
if lFMRadioFreq ~= nil and lFMRadioFreq.FM_Freq ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2002", string.format("%s", lFMRadioFreq.FM_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2002", "-")
|
||||
end
|
||||
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
-- [273] = "%.1f", -- FM RADIO - Chanel Selector {0.0,0.2,0.3,0.5,0.6,0.8,0.9,1.1} -- gerundet
|
||||
local lFM_RADIO_PRESET = {[0.0]="1",[0.2]="2",[0.3]="3",[0.5]="4",[0.6]="5",[0.8]="6",[0.9]="0",[1.1]="R"}
|
||||
ExportScript.Tools.SendDataDAC("2003", lFM_RADIO_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(273), 1, "ceil")])
|
||||
|
||||
-- Weapon Panel
|
||||
---------------------------------------------------
|
||||
if mainPanelDevice:get_argument_value(354) >= 0.0 then -- Weapon panel is On
|
||||
local lWeaponPanelDisplays = ExportScript.Tools.getListIndicatorValue(8)
|
||||
|
||||
if lWeaponPanelDisplays ~= nil then
|
||||
if lWeaponPanelDisplays.LEFT_screen ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2004", string.format("%s", lWeaponPanelDisplays.LEFT_screen))
|
||||
end
|
||||
if lWeaponPanelDisplays.RIGHT_screen ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2005", string.format("%s", lWeaponPanelDisplays.RIGHT_screen))
|
||||
end
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2004", "-")
|
||||
ExportScript.Tools.SendDataDAC("2005", "-")
|
||||
end
|
||||
|
||||
-- generic Radio display and frequency rotarys
|
||||
-------------------------------------------------
|
||||
-- genericRadioConf
|
||||
ExportScript.genericRadioConf = {}
|
||||
ExportScript.genericRadioConf['maxRadios'] = 3 -- numbers of aviables/supported radios
|
||||
ExportScript.genericRadioConf[1] = {} -- first radio
|
||||
ExportScript.genericRadioConf[1]['Name'] = "UHF Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[1]['DeviceID'] = 31 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[1]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[1]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[1]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[1]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[1]['minFrequency'] = 225.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[1]['maxFrequency'] = 399.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[1]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[1]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.167 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[1]['Volume']['ButtonID'] = 3011 -- volume button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset'] = {} -- preset knob active
|
||||
--ExportScript.genericRadioConf[1]['Preset']['ArgumentID'] = 161 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset']['List'] = {[0.0]="01",[0.05]="02",[0.10]="03",[0.15]="04",[0.20]="05",[0.25]="06",[0.30]="07",[0.35]="08",[0.40]="09",[0.45]="10",[0.50]="11",[0.55]="12",[0.60]="13",[0.65]="14",[0.70]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20",[1.00]="01"}
|
||||
--ExportScript.genericRadioConf[1]['Preset']['Step'] = 0.05 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[1]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ArgumentID'] = 170 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ButtonID'] = 3010 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ValueOff'] = 1.0 -- squelch off value from cklickable.lua
|
||||
-- Load Button = VLD Button
|
||||
ExportScript.genericRadioConf[1]['Load'] = {} -- load button preset
|
||||
ExportScript.genericRadioConf[1]['Load']['ButtonID'] = 3003 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ArgumentID'] = 167 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ButtonID'] = 3007 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ValueManual'] = 0.0-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ValuePreset'] = 0.1-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadioConf[2] = {} -- secound radio
|
||||
ExportScript.genericRadioConf[2]['Name'] = "AM Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[2]['DeviceID'] = 5 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[2]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[2]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[2]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[2]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[2]['minFrequency'] = 118.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[2]['maxFrequency'] = 143.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[2]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[2]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Power']['ValueOn'] = 0.33 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[2]['Volume']['ButtonID'] = 3005 -- volume button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset'] = {} -- preset knob active
|
||||
--ExportScript.genericRadioConf[2]['Preset']['ArgumentID'] = 137 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset']['List'] = {[0.0]="01",[0.01]="02",[0.02]="03",[0.03]="04",[0.04]="05",[0.05]="06",[0.06]="07",[0.07]="08",[0.08]="09",[0.09]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20",[0.20]="01"}
|
||||
--ExportScript.genericRadioConf[2]['Preset']['Step'] = 0.01 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[2]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ArgumentID'] = 134 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ButtonID'] = 3008 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ValueOff'] = 1.0 -- squelch off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Load'] = {} -- load button preset
|
||||
--ExportScript.genericRadioConf[2]['Load']['ButtonID'] = 3006 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ArgumentID'] = 135 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ButtonID'] = 3004 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ValueManual'] = 0.2-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ValuePreset'] = 0.3-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadioConf[3] = {} -- secound radio
|
||||
ExportScript.genericRadioConf[3]['Name'] = "FM Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[3]['DeviceID'] = 28 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[3]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[3]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[3]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[3]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[3]['minFrequency'] = 30.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[3]['maxFrequency'] = 87.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[3]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[3]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Power']['ValueOn'] = 0.25 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[3]['Volume']['ButtonID'] = 3005 -- volume button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Preset'] = {} -- preset knob active
|
||||
ExportScript.genericRadioConf[3]['Preset']['ArgumentID'] = 273 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Preset']['ButtonID'] = 3002 -- preset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Preset']['ButtonID2'] = 3002 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
ExportScript.genericRadioConf[3]['Preset']['List'] = {[0.0]="1",[0.143]="2",[0.286]="3",[0.429]="4",[0.572]="5",[0.715]="6",[0.858]="0",[1.0]="-"}
|
||||
ExportScript.genericRadioConf[3]['Preset']['Step'] = 0.143 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[3]['Preset']['Step2'] = -0.01 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[3]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ArgumentID'] = 148 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ButtonID'] = 3008 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ValueOff'] = -1.0 -- squelch off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Load'] = {} -- load button preset
|
||||
--ExportScript.genericRadioConf[3]['Load']['ButtonID'] = 3004 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ArgumentID'] = 149 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ButtonID'] = 3004 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ValueManual'] = 0.2-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ValuePreset'] = 0.3-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadio(nil, nil)
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
743
Scripts/DCS-ExportScript/ExportsModules/SA342M.lua
Normal file
743
Scripts/DCS-ExportScript/ExportsModules/SA342M.lua
Normal file
@@ -0,0 +1,743 @@
|
||||
-- SA342M
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SA342M = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Gyro Panel
|
||||
[200] = "%.4f", -- Gyro_Needle_State {-1,1} Gyro Panel SYNC
|
||||
[201] = "%.f", -- Gyro_voyant_test Lamp {0,1}
|
||||
[202] = "%.f", -- Gyro_voyant_trim Lamp {0,1}
|
||||
[203] = "%.f", -- Gyro_voyant_bpp Lamp {0,1}
|
||||
-- Autopilot Panel
|
||||
[37] = "%.4f", -- T_Needle_State {-1,1} Pitch correction Indicator
|
||||
[38] = "%.4f", -- R_Needle_State {-1,1} Roll correction Indicator
|
||||
[39] = "%.4f", -- L_Needle_State {-1,1} Yaw correction Indicator
|
||||
--[196] = "%.4f", -- RWR_light {0,1} -- RWR background light
|
||||
--[] = "%.4f", -- PE_fondbright {0,1} ???
|
||||
--[353] = "%.4f", -- NADIR_fondbright {0,1} ???
|
||||
-- Flare Dispenser Lamps
|
||||
[233] = "%.f", -- Voyant_FD_On {0,1} Power On
|
||||
[231] = "%.f", -- Voyant_FD_G {0,1} select Left
|
||||
[232] = "%.f", -- Voyant_FD_D {0,1} select Right
|
||||
[227] = "%.f", -- Voyant_FD_LEU {0,1} Status LEU
|
||||
[223] = "%.f", -- Voyant_FD_G_vide1 {0,1} Status Left G
|
||||
[224] = "%.f", -- Voyant_FD_G_vide2 {0,1} Status Left VIDE
|
||||
[225] = "%.f", -- Voyant_FD_D_vide1 {0,1} Status Right G
|
||||
[226] = "%.f", -- Voyant_FD_D_vide2 {0,1} Status Right VIDE
|
||||
-- ADF Radio
|
||||
[158] = "%0.1f", -- ADF_nav1_centaine {0,1} X00.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[159] = "%0.1f", -- ADF_nav1_dizaine {0,1} 0X0.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[160] = "%0.1f", -- ADF_nav1_unite {0,1} 00X.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[161] = "%0.1f", -- ADF_nav1_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[162] = "%0.1f", -- ADF_nav2_centaine {0,1} X00.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[163] = "%0.1f", -- ADF_nav2_dizaine {0,1} 0X0.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[164] = "%0.1f", -- ADF_nav2_unite {0,1} 00X.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- ADF Gauge
|
||||
[113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0}
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[107] = "%.1f", -- ADF_FlagCAP {0,1}
|
||||
[109] = "%.1f", -- ADF_FlagBut {0,1}
|
||||
[108] = "%.1f", -- ADF_FlagCompteur PX Flag {0,1}
|
||||
[110] = "%0.1f", -- ADF_compteur_Cent {0,1} X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[111] = "%0.1f", -- ADF_compteur_Dix {0,1} 0X0 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[112] = "%0.1f", -- ADF_compteur_Unit {0,1} 00X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- CLOCK
|
||||
[41] = "%.3f", -- CLOCK_HOUR {0,1,2,3,4,5,6,7,8,9,10,11,12}{0,0.081,0.162,0.245,0.33,0.415,0.501,0.587,0.672,0.756,0.838,0.919,1}
|
||||
[42] = "%.3f", -- CLOCK_SECOND {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_MINUTE {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[44] = "%.3f", -- CLOCK_MINI {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30}{0,0.032,0.065,0.098,0.131,0.164,0.198,0.231,0.264,0.297,0.331,0.364,0.397,0.43,0.464,0.497,0.523,0.551,0.576,0.605,0.63,0.659,0.684,0.714,0.758,0.796,0.838,0.879,0.92,0.958,1}
|
||||
[210] = "%.4f", -- Clock_ExtCouronne
|
||||
-- Wipers
|
||||
--[547] = "%.4f", -- EGPilote {-1,1}
|
||||
--[546] = "%.4f", -- EGCopilote {-1,1}
|
||||
-- LIGHTS
|
||||
--[40] = "%.4f", -- Lum_Plafond {0,1} Main Panel Lights
|
||||
--[142] = "%.4f", -- PBOIntensity {0,1} Main Panel Background lights
|
||||
--[144] = "%.4f", -- PUPIntensity {0,1} Lower Panel Background lights
|
||||
-- Baro altimetre
|
||||
[87] = "%.4f", -- Baro_Altimeter_thousands Needle {0.0,1.0}
|
||||
[573] = "%.4f", -- Baro_Altimeter_hundred Needle {0.0,1.0}
|
||||
[88] = "%0.1f", -- Baro_Altimeter_press_unite 000X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[90] = "%0.1f", -- Baro_Altimeter_press_dix 00X0 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[92] = "%0.1f", -- Baro_Altimeter_press_cent 0X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[95] = "%0.1f", -- Baro_Altimeter_press_mille X000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- radar altimetre
|
||||
[94] = "%.4f", -- Radar_Altimeter {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0,0.019,0.035,0.072,0.109,0.147,0.18,0.214,0.247,0.283,0.316,0.345,0.376,0.407,0.438,0.469,0.501,0.564,0.606,0.648,0.676,0.706,0.732,0.756,0.775,0.794,0.811,0.829,0.843,0.858,0.87}
|
||||
[93] = "%.4f", -- DangerRALT_index {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0.0,0.0175,0.0338,0.0715,0.109,0.147,0.182,0.215,0.247,0.282,0.315,0.3445,0.377,0.407,0.439,0.47,0.5005,0.5628,0.6052,0.646,0.675,0.7058,0.7315,0.755,0.7747,0.793,0.8097,0.8272,0.8425,0.8575,0.8693}
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
[98] = "%.f", -- RAlt_flag_Panne OFF Flag{0,1}
|
||||
[99] = "%.1f", -- RAlt_flag_MA A (Test) Flag{0,1}
|
||||
[91] = "%.1f", -- RAlt_knob_MA Power/Test Knop{0,1}
|
||||
-- TORQUE
|
||||
[16] = "%.3f", -- Torque {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110}{0.085,0.13,0.172,0.214,0.253,0.289,0.326,0.362,0.395,0.43,0.466,0.501,0.537,0.573,0.607,0.639,0.676,0.71,0.746,0.785,0.826,0.865,0.908}
|
||||
[55] = "%.3f", -- Torque_Bug {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110}{0.084,0.128,0.171,0.2134,0.252,0.2889,0.325,0.361,0.396,0.431,0.467,0.501,0.535,0.571,0.605,0.639,0.674,0.71,0.745,0.785,0.825,0.865,0.91}
|
||||
[17] = "%.f", -- VOYANT_TORQUE Lamp {0,1}
|
||||
-- Gyro_Compas
|
||||
[26] = "%.3f", -- Gyro_Compas {0,30,60,90,120,150,180,210,240,270,300,330,360}{0,0.083,0.167,0.251,0.334,0.418,0.5,0.583,0.667,0.751,0.832,0.917,1}
|
||||
-- Stby HA ADI
|
||||
[214] = "%.4f", -- StbyHA_Roll {-180,-90,-60,-30,-20,-10,0,10,20,30,60,90,180}{-1,-0.502,-0.335,-0.166,-0.11,-0.052,0,0.055,0.113,0.171,0.334,0.502,1}
|
||||
[213] = "%.4f", -- StbyHA_Pitch {-180,-150,-120,-90,-60,-50,-40,-30,-20,-15,-10,-5,0,5,10,15,20,30,40,50,60,90,120,150,180}{-1,-0.833,-0.667,-0.5,-0.333,-0.278,-0.223,-0.167,-0.111,-0.084,-0.057,-0.003,0,0.028,0.056,0.083,0.111,0.167,0.223,0.278,0.333,0.5,0.667,0.833,1}
|
||||
[211] = "%.1f", -- StdbyHA_Flag Fault Flag {0,1}
|
||||
[212] = "%.4f", -- Stdby_HA_W W Sympol {0,1}
|
||||
[217] = "%.4f", -- Stdby_HA_Curseur Knob Needle {0,1}
|
||||
-- QComb Fuel Indicator
|
||||
[137] = "%.3f", -- QComb {0,50,100,150,200,250,300,350,400,500}{0.093,0.243,0.354,0.428,0.521,0.621,0.692,0.771,0.834,0.932}
|
||||
-- Horizon Artificiel Principal
|
||||
[27] = "%.4f", -- Pitch_HA {-180,-170,-160,-150,-140,-130,-120,-110,-100,-90,-80,-70,-60,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180}{-1,-0.946,-0.898,-0.838,-0.78,-0.723,-0.667,-0.61,-0.556,-0.501,-0.446,-0.393,-0.334,-0.277,-0.223,-0.166,-0.104,-0.054,0,0.054,0.102,0.161,0.22,0.277,0.333,0.389,0.443,0.498,0.553,0.607,0.666,0.722,0.776,0.834,0.896,0.946,1}
|
||||
[28] = "%.4f", -- Roll_HA {-180,-90,-60,-30,-20,-10,0,10,20,30,60,90,180}{-1,-0.498,-0.331,-0.162,-0.111,-0.053,0,0.058,0.112,0.168,0.331,0.498,1}
|
||||
[20] = "%.4f", -- Bille_HA Slip Ball {-1,1}
|
||||
[18] = "%.1f", -- flag_GS_HA GS Flag {0,1}
|
||||
[19] = "%.1f", -- flag_HS_HA Fault Flag {0,1}
|
||||
[29] = "%.1f", -- flag_Lock_HA Lock Flag {0,1}
|
||||
[117] = "%.4f", -- Curseur_HA Knob Needle {0,1}
|
||||
[120] = "%.4f", -- W_HA W Sympol {-1,1}
|
||||
[118] = "%.4f", -- VerBar_HA Vertical Bar {-1,1}
|
||||
[119] = "%.4f", -- HorBar_HA Horizon Bar {-1,1}
|
||||
-- variometre
|
||||
[24] = "%.4f", -- Variometre {-800,-700,-600,-500,-400,-300,-200,-100,-50,0,50,100,200,300,400,500,600,700,800}{-0.481,-0.436,-0.391,-0.338,-0.28,-0.218,-0.153,-0.075,-0.035,0.0,0.035,0.071,0.139,0.202,0.264,0.32,0.372,0.418,0.463}
|
||||
-- IAS
|
||||
[51] = "%.4f", -- IAS {0,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370}{0,0.1,0.133,0.172,0.207,0.243,0.277,0.316,0.35,0.38,0.41,0.439,0.465,0.491,0.517,0.541,0.565,0.587,0.611,0.63,0.651,0.671,0.692,0.712,0.731,0.75,0.77,0.791,0.809,0.829,0.849,0.867,0.886}
|
||||
-- RPM
|
||||
[135] = "%.4f", -- Turbine_RPM large Needle {0,5000,10000,15000,20000,25000,29000,35000,40000,43500,45000,50000}{0.095,0.181,0.263,0.346,0.424,0.505,0.572,0.665,0.748,0.802,0.828,0.909}
|
||||
[52] = "%.4f", -- Rotor_RPM small Needle {0,50,100,150,200,250,262,316.29,361.05,387,400,450}{0.096,0.191,0.283,0.374,0.461,0.549,0.57,0.665,0.748,0.802,0.811,0.904}
|
||||
-- Voltmetre
|
||||
[14] = "%.3f", -- Voltmetre {0,5,10,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}{0.045,0.074,0.103,0.133,0.163,0.192,0.221,0.25,0.281,0.31,0.339,0.368,0.399,0.429,0.458,0.488,0.518,0.547,0.576,0.605,0.635,0.664,0.695,0.724}
|
||||
-- TQuatre Engine temperature Indicator
|
||||
[15] = "%.3f", -- TQuatre Engine Temp {0,100,200,300,400,500,600,700,800}{0.1575,0.228,0.3,0.3845,0.473,0.577,0.676,0.772,0.8625}
|
||||
-- TempExt outside temperature
|
||||
[25] = "%.3f", -- TempExt {-40,-35,-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30,35,40,45,50,55,60,65,70}{-0.758,-0.691,-0.625,-0.558,-0.492,-0.425,-0.359,-0.292,-0.224,-0.158,-0.09,-0.024,0.043,0.11,0.177,0.244,0.31,0.379,0.445,0.512,0.579,0.644,0.712}
|
||||
-- TempThm Oil Temperature Indicator
|
||||
[151] = "%.3f", -- TempThm Oil Temp {-20,-10,0,10,20,30,40,50,60,70,80,85,90,100}{0.046,0.102,0.157,0.213,0.268,0.323,0.38,0.435,0.492,0.547,0.603,0.63,0.659,0.715}
|
||||
-- Fuel Tank Indicator
|
||||
[152] = "%.3f", -- Gauge_RSupp {-1,0,0.25,0.5,0.75,1}{0,0.202,0.426,0.63,0.801,1}
|
||||
-- VHF AM Radio
|
||||
[133] = "%.1f", -- AM_Radio_freq_cent {0,1} X00.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[134] = "%.1f", -- AM_Radio_freq_dix {0,1} 0X0.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[136] = "%.1f", -- AM_Radio_freq_unite {0,1} 00X.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[138] = "%.1f", -- AM_Radio_freq_dixieme {0,1} 000.X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[139] = "%.2f", -- AM_Radio_freq_centieme {0,1} 000.0XX {00,25,50,75,00}{0.0,0.25,0.50,0.75,1.0}
|
||||
-- Lamps
|
||||
-- Voyant_DEM
|
||||
[300] = "%.f", -- Voyant_DEM Start lamp{0,1}
|
||||
-- Voyant_RLT
|
||||
[301] = "%.f", -- Voyant_RLT Idle lamp {0,1}
|
||||
-- Voyant_BLOC
|
||||
[302] = "%.f", -- Voyant_BLOC Blocked Engine lamp {0,1}
|
||||
-- RSUPP Fueltank
|
||||
[320] = "%.f", -- Voyant_RSupp Fueltank lamp {0,1}
|
||||
-- RCONV Convoy Fueltank
|
||||
[321] = "%.f", -- Voyant_RConv Convoy Fueltank lamüp {0,1}
|
||||
-- Voyant_FILTAS Sandfilter lamp
|
||||
[322] = "%.f", -- Voyant_FILTAS sandfilter lamp {0,1}
|
||||
-- Voyant_Alarme Master Alarme lamp
|
||||
[303] = "%.f", -- Voyant_Alarme Master Alarme lamp {0,1}
|
||||
-- AM_RADIO
|
||||
[141] = "%.f", -- AM_Radio_lamp {0,1}
|
||||
-- Tableau Alarme Lamps
|
||||
[1] = "%.f", -- TA_Pitot {0,1}
|
||||
[2] = "%.f", -- TA_Hmot {0,1}
|
||||
[3] = "%.f", -- TA_Hbtp {0,1}
|
||||
[4] = "%.f", -- TA_Hral {0,1}
|
||||
[5] = "%.f", -- TA_Gene {0,1}
|
||||
[6] = "%.f", -- TA_Alter {0,1}
|
||||
[7] = "%.f", -- TA_Bat {0,1}
|
||||
[8] = "%.f", -- TA_PA {0,1}
|
||||
[9] = "%.f", -- TA_Nav {0,1}
|
||||
[10] = "%.f", -- TA_Comb {0,1}
|
||||
[11] = "%.f", -- TA_Bphy {0,1}
|
||||
[12] = "%.f", -- TA_Lim {0,1}
|
||||
[13] = "%.f", -- TA_Filt {0,1}
|
||||
-- Intercomp Lamps
|
||||
[455] = "%.f", -- Intercomp VHF Light
|
||||
[456] = "%.f", -- Intercomp FM1 Light
|
||||
[457] = "%.f", -- Intercomp UHF Light
|
||||
-- SA342M HOT3 Weapon Panel Lamps
|
||||
[183] = "%.f", -- HOT3 WP Lamps BON
|
||||
[184] = "%.f", -- HOT3 WP Lamps MAUVAIS
|
||||
[185] = "%.f", -- HOT3 WP Lamps ALIMENTATION
|
||||
[186] = "%.f", -- HOT3 WP Lamps MISSILE PRET
|
||||
[187] = "%.f", -- HOT3 WP Lamps TIR AUTOR.
|
||||
[188] = "%.f", -- HOT3 WP Lamps DEFAUT
|
||||
[189] = "%.f", -- HOT3 WP Lamps TEST I
|
||||
[190] = "%.f", -- HOT3 WP Lamps JOUR
|
||||
[191] = "%.f", -- HOT3 WP Lamps LUMINOSITE
|
||||
[192] = "%.f", -- HOT3 WP Lamps TEST II
|
||||
[193] = "%.f" -- HOT3 WP Lamps NUIT
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- WEAPONS PANEL 1
|
||||
[354] = "%1d", -- WP1 - Off/On/Stsnfby {-1.0,0.0,1.0}
|
||||
[357] = "%.4f", -- WP1 - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- WEAPONS PANEL 2
|
||||
[372] = "%1d", -- WP2 - Ma Left
|
||||
[373] = "%1d", -- WP2 - Ma Left Cover
|
||||
[374] = "%1d", -- WP2 - Ma Right
|
||||
[375] = "%1d", -- WP2 - Ma Right Cover
|
||||
[376] = "%1d", -- WP2 - Seq Ripple selection
|
||||
-- PILOTSIGHT
|
||||
[171] = "%1d", -- PILOTSIGHT - Pilot Sight
|
||||
-- PILOT STICK
|
||||
--[50] = "%1d", -- PILOT STICK - Magnetic Brake
|
||||
--[53] = "%1d", -- PILOT STICK - Wiper once
|
||||
--[209] = "%1d", -- PILOT STICK - Autopilot Button
|
||||
--[293] = "%1d", -- PILOT STICK - Slave
|
||||
--[294] = "%1d", -- PILOT STICK - Auto-Hover
|
||||
-- WSO LEFT SIDE STICK
|
||||
[255] = "%1d", -- PE WSO STICK - Lasing Button Cover
|
||||
[256] = "%1d", -- PE WSO STICK - Lasing Button
|
||||
[257] = "%1d", -- PE WSO STICK - Missile Launch Cover
|
||||
[258] = "%1d", -- PE WSO STICK - Missile Launch Button
|
||||
[259] = "%1d", -- PE WSO STICK - Inversed Symbology Toggle
|
||||
[260] = "%1d", -- PE WSO STICK - Inversed Image Toggle
|
||||
[264] = "%.1f", -- PE WSO STICK - Image Focus {-1.0,1.0}
|
||||
[262] = "%.1f", -- PE WSO STICK - Gain {-1.0,1.0}
|
||||
[263] = "%.1f", -- PE WSO STICK - Image Brightness {-1.0,1.0}
|
||||
[219] = "%.1f", -- PE WSO STICK - Symbology Brightness {-1.0,1.0}
|
||||
-- GYRO
|
||||
[197] = "%1d", -- GYRO - Test Cover
|
||||
[198] = "%1d", -- GYRO - Test Switch On/Off
|
||||
[199] = "%1d", -- GYRO - Left/Center/Right
|
||||
[153] = "%.2f", -- GYRO - CM/A/GM/D/GD {0.0,0.25,0.50,0.75,1.0}
|
||||
-- CLOCK
|
||||
[45] = "%.4f", -- CLOCK - Winder (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[46] = "%1d", -- CLOCK - Start/Stop
|
||||
[47] = "%1d", -- CLOCK - Reset
|
||||
-- SA342M HOT3 only
|
||||
-- PH SA342M HOT3
|
||||
[180] = "%.2f", -- PH - Test II/Test I/Off/Day/Night {0.0,0.25,0.50,0.75,1.0}
|
||||
[181] = "%.3f", -- PH - Station Select 0/1/0/2/0/3/0/4/0 {0.0,0.125,0.250,0,375,0.500,0.625,0.750,0.875,1.0}
|
||||
[182] = "%.4f", -- PH - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- PE SA342L/M/Mistral BCV (BOITIER DE COMMANDE VIDEO – video command box)
|
||||
[362] = "%1d", -- PE BCV - Centering
|
||||
[364] = "%1d", -- PE BCV - VDO/VTH
|
||||
[365] = "%.1f", -- PE BCV - Zoom {-1.0,1.0}
|
||||
[366] = "%.1f", -- PE BCV - CTH A/V/M {0.0,0.5,1.0}
|
||||
[367] = "%1d", -- PE BCV - Power
|
||||
[370] = "%.2f", -- PE BCV - Mode A/C/V/PIL/ASS {0.0,0.25,0.50,0.75,1.0}
|
||||
-- NADIR
|
||||
[330] = "%.4f", -- NADIR - Off/Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[331] = "%.2f", -- NADIR - Mode Off/Stby/Ground/Sea/Air Speed Sensor/Ground Test {0.0,0.2,0.4,0.6,0.8,1.0}
|
||||
[332] = "%.2f", -- NADIR - Parameter Wind/Magnetic Heading/Ground Speed/Calculated Time/Current Position/Waypoint {0.0,0.2,0.4,0.6,0.8,1.0}
|
||||
[333] = "%1d", -- NADIR - ENT
|
||||
[334] = "%1d", -- NADIR - DES
|
||||
[335] = "%1d", -- NADIR - AUX
|
||||
[336] = "%1d", -- NADIR - IC
|
||||
[337] = "%1d", -- NADIR - DOWN
|
||||
[351] = "%1d", -- NADIR - 0
|
||||
[338] = "%1d", -- NADIR - 1
|
||||
[339] = "%1d", -- NADIR - 2
|
||||
[340] = "%1d", -- NADIR - 3
|
||||
[342] = "%1d", -- NADIR - 4
|
||||
[343] = "%1d", -- NADIR - 5
|
||||
[344] = "%1d", -- NADIR - 6
|
||||
[346] = "%1d", -- NADIR - 7
|
||||
[347] = "%1d", -- NADIR - 8
|
||||
[348] = "%1d", -- NADIR - 9
|
||||
[341] = "%1d", -- NADIR - POL
|
||||
[345] = "%1d", -- NADIR - GEO
|
||||
[349] = "%1d", -- NADIR - POS
|
||||
[350] = "%1d", -- NADIR - GEL
|
||||
[352] = "%1d", -- NADIR - EFF
|
||||
-- AM_RADIO
|
||||
[128] = "%.2f", -- AM RADIO - Selector {0.0,0.33,0.66,0.99}
|
||||
[129] = "%.4f", -- AM RADIO - Freq decimals (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[130] = "%1d", -- AM RADIO - 25/50kHz Selector
|
||||
[131] = "%.4f", -- AM RADIO - Freq dial (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FM_RADIO
|
||||
[272] = "%.2f", -- FM RADIO - Main Selector {0.0,0.25,0.50,0.75,1.0}
|
||||
[273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0}
|
||||
[274] = "%1d", -- FM RADIO - 7
|
||||
[275] = "%1d", -- FM RADIO - 8
|
||||
[276] = "%1d", -- FM RADIO - 9
|
||||
[277] = "%1d", -- FM RADIO - 0
|
||||
[278] = "%1d", -- FM RADIO - X
|
||||
[279] = "%1d", -- FM RADIO - 4
|
||||
[280] = "%1d", -- FM RADIO - 5
|
||||
[281] = "%1d", -- FM RADIO - 6
|
||||
[282] = "%1d", -- FM RADIO - RC
|
||||
[283] = "%1d", -- FM RADIO - UP
|
||||
[284] = "%1d", -- FM RADIO - 1
|
||||
[285] = "%1d", -- FM RADIO - 2
|
||||
[286] = "%1d", -- FM RADIO - 3
|
||||
[287] = "%1d", -- FM RADIO - VAL
|
||||
[288] = "%1d", -- FM RADIO - DOWN
|
||||
-- TV
|
||||
[124] = "%1d", -- TV - On/Off
|
||||
[125] = "%.4f", -- TV - Contrast (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[123] = "%.4f", -- TV - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
--[126] = "%.4f", -- TV - Cover (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- RWR
|
||||
[148] = "%1d", -- RWR - Off/On/Croc {-1.0,0.0,1.0}
|
||||
[149] = "%1d", -- RWR - Marker
|
||||
[150] = "%1d", -- RWR - Page
|
||||
[121] = "%.4f", -- RWR - Audio (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[122] = "%.4f", -- RWR - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- ADI
|
||||
[115] = "%.4f", -- ADI - Unlock (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[116] = "%1d", -- ADI - Unlock
|
||||
-- Stby ADI
|
||||
[215] = "%.4f", -- STDBY ADI - Unlock (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[216] = "%1d", -- STDBY ADI - Unlock
|
||||
-- ArtVisVhfDop (Source selector for main artificial horizon vertical bar)
|
||||
[218] = "%.2f", -- ADI - Source Off/Camera target point/ADF ermitter/NADIR Waypoint {0.0,0.33,0.66,0.99}
|
||||
-- INTERCOM
|
||||
[452] = "%1d", -- INTERCOM - VHF AM Radio
|
||||
[68] = "%.4f", -- INTERCOM - VHF AM Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[453] = "%1d", -- INTERCOM - FM Radio
|
||||
[69] = "%.4f", -- INTERCOM - FM Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[454] = "%1d", -- INTERCOM - UHF Radio
|
||||
[70] = "%.4f", -- INTERCOM - UHF Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- TORQUE
|
||||
[58] = "%1d", -- TORQUE Bug/Test
|
||||
[54] = "%.4f", -- TORQUE Bug/Test (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- LIGHTS
|
||||
[22] = "%.4f", -- LIGHTS - Main Dashboard Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[21] = "%.4f", -- LIGHTS - Console Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[145] = "%.4f", -- LIGHTS - UV Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[23] = "%1d", -- LIGHTS - NORM/BNL
|
||||
[147] = "%.4f", -- LIGHTS - Roof Lamp Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[154] = "%1d", -- LIGHTS - Red Lens On/Off
|
||||
-- ELECTRIC
|
||||
[264] = "%1d", -- ELECTRIC - Battery
|
||||
[265] = "%1d", -- ELECTRIC - Alternator
|
||||
[268] = "%1d", -- ELECTRIC - Generator
|
||||
[62] = "%1d", -- ELECTRIC - Voltmeter Test
|
||||
[170] = "%1d", -- ELECTRIC - Pitot
|
||||
[271] = "%1d", -- ELECTRIC - Fuel Pump
|
||||
[267] = "%1d", -- ELECTRIC - Additionnal Fuel Tank
|
||||
[56] = "%1d", -- ELECTRIC - Starter Start/Stop/Air {-1.0,0.0,1.0}
|
||||
[57] = "%1d", -- ELECTRIC - Test
|
||||
[48] = "%1d", -- ELECTRIC - Copilot Wiper {-1.0,0.0,1.0}
|
||||
[49] = "%1d", -- ELECTRIC - Pilot Wiper {-1.0,0.0,1.0}
|
||||
[61] = "%1d", -- ELECTRIC - Left from Pitot
|
||||
[59] = "%1d", -- ELECTRIC - HYD Test
|
||||
[66] = "%1d", -- ELECTRIC - Alter Rearm
|
||||
[67] = "%1d", -- ELECTRIC - Gene Rearm
|
||||
[63] = "%1d", -- ELECTRIC - Convoy Tank On/Off
|
||||
[64] = "%1d", -- ELECTRIC - Sand Filter On/Off
|
||||
-- NAVLIGHTS
|
||||
[146] = "%1d", -- NAVLIGHTS - Navigation Lights CLI/OFF/FIX {-1.0,0.0,1.0}
|
||||
[228] = "%1d", -- NAVLIGHTS - Anticollision Light NOR/OFF/ATT {-1.0,0.0,1.0}
|
||||
[105] = "%1d", -- NAVLIGHTS - Landing Light Off/Vario/On {-1.0,0.0,1.0}
|
||||
[106] = "%1d", -- NAVLIGHTS - Landing Light Extend/Retract
|
||||
[382] = "%1d", -- NAVLIGHTS - Panels Lighting On/Off
|
||||
[30] = "%.4f", -- NAVLIGHTS - AntiCollision Light Intensity (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[229] = "%1d", -- NAVLIGHTS - Formation Lights On/Off
|
||||
[230] = "%.4f", -- NAVLIGHTS - Formation Lights Intensity (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FLARE DISPENSER
|
||||
[220] = "%1d", -- FLARE DISPENSER - G/G+D/D {-1.0,0.0,1.0}
|
||||
[221] = "%1d", -- FLARE DISPENSER - Mode
|
||||
[222] = "%1d", -- FLARE DISPENSER - Off/Speed {-1.0,0.0,1.0}
|
||||
[194] = "%1d", -- FLARE DISPENSER - Fire Button Cover
|
||||
[195] = "%1d", -- FLARE DISPENSER - Fire Button
|
||||
-- AUTOPILOT
|
||||
[31] = "%1d", -- AUTOPILOT - Autopilot On/Off
|
||||
[32] = "%1d", -- AUTOPILOT - Pitch On/Off
|
||||
[33] = "%1d", -- AUTOPILOT - Roll On/Off
|
||||
[34] = "%1d", -- AUTOPILOT - Yaw On/Off
|
||||
[35] = "%1d", -- AUTOPILOT - Mode Speed/OFF/Altitude {-1.0,0.0,1.0}
|
||||
[60] = "%1d", -- AUTOPILOT - Trim On/Off
|
||||
[65] = "%1d", -- AUTOPILOT - Magnetic Brake On/Off
|
||||
-- WEAPONS
|
||||
[269] = "%1d", -- WEAPONS - Master arm On/Off
|
||||
-- ROTORS
|
||||
[556] = "%.4f", -- ROTORS - Rotor Brake (Axis) {0.0, 1.0} in 0.055 Steps
|
||||
-- RADIOALTIMETER
|
||||
[96] = "%.4f", -- RADIOALTIMETER - Radar Alt Bug (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[100] = "%1d", -- RADIOALTIMETER - Radar Alt On/Off - Test
|
||||
[91] = "%.4f", -- RADIOALTIMETER - Radar Alt On/Off - Test (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- BAROALTIMETER
|
||||
[89] = "%.4f", -- BAROALTIMETER - Baro pressure QFE knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FUEL SYSTEM
|
||||
[557] = "%.4f", -- FUEL SYSTEM - Fuel Flow Lever (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- ADF RADIO
|
||||
[166] = "%1d", -- ADF RADIO - Select
|
||||
[167] = "%1d", -- ADF RADIO - Tone
|
||||
[178] = "%.2f", -- ADF RADIO - Mode {0.0,0.33,0.66,0.99}
|
||||
[179] = "%.4f", -- ADF RADIO - Gain (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[168] = "%.4f", -- ADF RADIO - Nav1 Hundred (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[169] = "%.4f", -- ADF RADIO - Nav1 Ten (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[173] = "%.4f", -- ADF RADIO - Nav1 Unit (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[174] = "%.4f", -- ADF RADIO - Nav2 Hundred (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[175] = "%.4f", -- ADF RADIO - Nav2 Ten (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[176] = "%.4f", -- ADF RADIO - Nav2 Unit (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- UHF RADIO
|
||||
[383] = "%.3f", -- UHF RADIO - MODE 0/FF/NA/SV/DL/G/EN {0.0,0.167,0.334,0.501,0.668,0.835,1.0}
|
||||
[384] = "%1d", -- UHF RADIO - DRW
|
||||
[385] = "%1d", -- UHF RADIO - VLD
|
||||
[386] = "%.4f", -- UHF RADIO - PAGE (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[387] = "%1d", -- UHF RADIO - CONF
|
||||
[388] = "%1d", -- UHF RADIO - 1
|
||||
[389] = "%1d", -- UHF RADIO - 2
|
||||
[390] = "%1d", -- UHF RADIO - 3
|
||||
[391] = "%1d", -- UHF RADIO - 4
|
||||
[392] = "%1d", -- UHF RADIO - 5
|
||||
[393] = "%1d", -- UHF RADIO - 6
|
||||
[394] = "%1d", -- UHF RADIO - 7
|
||||
[395] = "%1d", -- UHF RADIO - 8
|
||||
[396] = "%1d", -- UHF RADIO - 9
|
||||
[397] = "%1d" -- UHF RADIO - 0
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0))
|
||||
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102)
|
||||
if ADF_Aiguille_large ~= 0 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large + 0.5
|
||||
if ADF_Aiguille_large > 1 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large - 1.0
|
||||
end
|
||||
end
|
||||
ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- UHF Radio
|
||||
---------------------------------------------------
|
||||
local lUHFRadio = GetDevice(31)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2000, string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('UHF_Freq: '..ExportScript.Tools.dump(list_indication(5)))
|
||||
|
||||
local lUHFRadioFreq = ExportScript.Tools.getListIndicatorValue(5)
|
||||
|
||||
if lUHFRadioFreq ~= nil and lUHFRadioFreq.UHF_Freq ~= nil then
|
||||
ExportScript.Tools.SendData(2000, string.format("%s", lUHFRadioFreq.UHF_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2000, " ")
|
||||
end
|
||||
|
||||
-- AM Radio
|
||||
---------------------------------------------------
|
||||
local lAMRadio = GetDevice(5)
|
||||
if lAMRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2001, string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
end
|
||||
|
||||
-- FM Radio PR4G
|
||||
---------------------------------------------------
|
||||
local lFMRadio = GetDevice(28)
|
||||
if lFMRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2002, string.format("%.3f", lFMRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('FM_Freq: '..ExportScript.Tools.dump(list_indication(4)))
|
||||
|
||||
local lFMRadioFreq = ExportScript.Tools.getListIndicatorValue(4)
|
||||
|
||||
if lFMRadioFreq ~= nil and lFMRadioFreq.FM_Freq ~= nil then
|
||||
ExportScript.Tools.SendData(2002, string.format("%s", lFMRadioFreq.FM_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2002, " ")
|
||||
end
|
||||
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
-- [273] = "%.1f", -- FM RADIO - Chanel Selector {0.0,0.2,0.3,0.5,0.6,0.8,0.9,1.1} -- gerundet
|
||||
local lFM_RADIO_PRESET = {[0.0]="1",[0.2]="2",[0.3]="3",[0.5]="4",[0.6]="5",[0.8]="6",[0.9]="0",[1.1]="R"}
|
||||
ExportScript.Tools.SendData(2003, lFM_RADIO_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(273), 1, "ceil")])
|
||||
|
||||
-- Weapon Panel
|
||||
---------------------------------------------------
|
||||
if mainPanelDevice:get_argument_value(354) >= 0.0 then -- Weapon panel is On
|
||||
local lWeaponPanelDisplays = ExportScript.Tools.getListIndicatorValue(8)
|
||||
|
||||
if lWeaponPanelDisplays ~= nil then
|
||||
if lWeaponPanelDisplays.LEFT_screen ~= nil then
|
||||
ExportScript.Tools.SendData(2004, string.format("%s", lWeaponPanelDisplays.LEFT_screen))
|
||||
end
|
||||
if lWeaponPanelDisplays.RIGHT_screen ~= nil then
|
||||
ExportScript.Tools.SendData(2005, string.format("%s", lWeaponPanelDisplays.RIGHT_screen))
|
||||
end
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2004, "-")
|
||||
ExportScript.Tools.SendData(2005, "-")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- UHF Radio
|
||||
---------------------------------------------------
|
||||
local lUHFRadio = GetDevice(31)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC("2000", string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('UHF_Freq: '..ExportScript.Tools.dump(list_indication(5)))
|
||||
|
||||
local lUHFRadioFreq = ExportScript.Tools.getListIndicatorValue(5)
|
||||
|
||||
if lUHFRadioFreq ~= nil and lUHFRadioFreq.UHF_Freq ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%s", lUHFRadioFreq.UHF_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2000", "-")
|
||||
end
|
||||
|
||||
-- AM Radio
|
||||
---------------------------------------------------
|
||||
local lAMRadio = GetDevice(5)
|
||||
if lAMRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC("2001", string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2001", ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
end
|
||||
|
||||
-- FM Radio PR4G
|
||||
---------------------------------------------------
|
||||
local lFMRadio = GetDevice(28)
|
||||
if lFMRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC(2002, string.format("%.3f", lFMRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('FM_Freq: '..ExportScript.Tools.dump(list_indication(4)))
|
||||
|
||||
local lFMRadioFreq = ExportScript.Tools.getListIndicatorValue(4)
|
||||
|
||||
if lFMRadioFreq ~= nil and lFMRadioFreq.FM_Freq ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2002", string.format("%s", lFMRadioFreq.FM_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2002", "-")
|
||||
end
|
||||
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
-- [273] = "%.1f", -- FM RADIO - Chanel Selector {0.0,0.2,0.3,0.5,0.6,0.8,0.9,1.1} -- gerundet
|
||||
local lFM_RADIO_PRESET = {[0.0]="1",[0.2]="2",[0.3]="3",[0.5]="4",[0.6]="5",[0.8]="6",[0.9]="0",[1.1]="R"}
|
||||
ExportScript.Tools.SendDataDAC("2003", lFM_RADIO_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(273), 1, "ceil")])
|
||||
|
||||
-- Weapon Panel
|
||||
---------------------------------------------------
|
||||
if mainPanelDevice:get_argument_value(354) >= 0.0 then -- Weapon panel is On
|
||||
local lWeaponPanelDisplays = ExportScript.Tools.getListIndicatorValue(8)
|
||||
|
||||
if lWeaponPanelDisplays ~= nil then
|
||||
if lWeaponPanelDisplays.LEFT_screen ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2004", string.format("%s", lWeaponPanelDisplays.LEFT_screen))
|
||||
end
|
||||
if lWeaponPanelDisplays.RIGHT_screen ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2005", string.format("%s", lWeaponPanelDisplays.RIGHT_screen))
|
||||
end
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2004", "-")
|
||||
ExportScript.Tools.SendDataDAC("2005", "-")
|
||||
end
|
||||
|
||||
-- generic Radio display and frequency rotarys
|
||||
-------------------------------------------------
|
||||
-- genericRadioConf
|
||||
ExportScript.genericRadioConf = {}
|
||||
ExportScript.genericRadioConf['maxRadios'] = 3 -- numbers of aviables/supported radios
|
||||
ExportScript.genericRadioConf[1] = {} -- first radio
|
||||
ExportScript.genericRadioConf[1]['Name'] = "UHF Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[1]['DeviceID'] = 31 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[1]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[1]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[1]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[1]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[1]['minFrequency'] = 225.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[1]['maxFrequency'] = 399.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[1]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[1]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.167 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[1]['Volume']['ButtonID'] = 3011 -- volume button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset'] = {} -- preset knob active
|
||||
--ExportScript.genericRadioConf[1]['Preset']['ArgumentID'] = 161 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset']['List'] = {[0.0]="01",[0.05]="02",[0.10]="03",[0.15]="04",[0.20]="05",[0.25]="06",[0.30]="07",[0.35]="08",[0.40]="09",[0.45]="10",[0.50]="11",[0.55]="12",[0.60]="13",[0.65]="14",[0.70]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20",[1.00]="01"}
|
||||
--ExportScript.genericRadioConf[1]['Preset']['Step'] = 0.05 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[1]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ArgumentID'] = 170 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ButtonID'] = 3010 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ValueOff'] = 1.0 -- squelch off value from cklickable.lua
|
||||
-- Load Button = VLD Button
|
||||
ExportScript.genericRadioConf[1]['Load'] = {} -- load button preset
|
||||
ExportScript.genericRadioConf[1]['Load']['ButtonID'] = 3003 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ArgumentID'] = 167 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ButtonID'] = 3007 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ValueManual'] = 0.0-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ValuePreset'] = 0.1-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadioConf[2] = {} -- secound radio
|
||||
ExportScript.genericRadioConf[2]['Name'] = "AM Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[2]['DeviceID'] = 5 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[2]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[2]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[2]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[2]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[2]['minFrequency'] = 118.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[2]['maxFrequency'] = 143.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[2]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[2]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Power']['ValueOn'] = 0.33 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[2]['Volume']['ButtonID'] = 3005 -- volume button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset'] = {} -- preset knob active
|
||||
--ExportScript.genericRadioConf[2]['Preset']['ArgumentID'] = 137 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset']['List'] = {[0.0]="01",[0.01]="02",[0.02]="03",[0.03]="04",[0.04]="05",[0.05]="06",[0.06]="07",[0.07]="08",[0.08]="09",[0.09]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20",[0.20]="01"}
|
||||
--ExportScript.genericRadioConf[2]['Preset']['Step'] = 0.01 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[2]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ArgumentID'] = 134 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ButtonID'] = 3008 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ValueOff'] = 1.0 -- squelch off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Load'] = {} -- load button preset
|
||||
--ExportScript.genericRadioConf[2]['Load']['ButtonID'] = 3006 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ArgumentID'] = 135 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ButtonID'] = 3004 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ValueManual'] = 0.2-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ValuePreset'] = 0.3-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadioConf[3] = {} -- secound radio
|
||||
ExportScript.genericRadioConf[3]['Name'] = "FM Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[3]['DeviceID'] = 28 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[3]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[3]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[3]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[3]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[3]['minFrequency'] = 30.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[3]['maxFrequency'] = 87.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[3]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[3]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Power']['ValueOn'] = 0.25 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[3]['Volume']['ButtonID'] = 3005 -- volume button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Preset'] = {} -- preset knob active
|
||||
ExportScript.genericRadioConf[3]['Preset']['ArgumentID'] = 273 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Preset']['ButtonID'] = 3002 -- preset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Preset']['ButtonID2'] = 3002 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
ExportScript.genericRadioConf[3]['Preset']['List'] = {[0.0]="1",[0.143]="2",[0.286]="3",[0.429]="4",[0.572]="5",[0.715]="6",[0.858]="0",[1.0]="-"}
|
||||
ExportScript.genericRadioConf[3]['Preset']['Step'] = 0.143 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[3]['Preset']['Step2'] = -0.01 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[3]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ArgumentID'] = 148 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ButtonID'] = 3008 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ValueOff'] = -1.0 -- squelch off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Load'] = {} -- load button preset
|
||||
--ExportScript.genericRadioConf[3]['Load']['ButtonID'] = 3004 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ArgumentID'] = 149 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ButtonID'] = 3004 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ValueManual'] = 0.2-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ValuePreset'] = 0.3-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadio(nil, nil)
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
731
Scripts/DCS-ExportScript/ExportsModules/SA342Mistral.lua
Normal file
731
Scripts/DCS-ExportScript/ExportsModules/SA342Mistral.lua
Normal file
@@ -0,0 +1,731 @@
|
||||
-- SA342Mistral
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SA342Mistral = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Gyro Panel
|
||||
[200] = "%.4f", -- Gyro_Needle_State {-1,1} Gyro Panel SYNC
|
||||
[201] = "%.f", -- Gyro_voyant_test Lamp {0,1}
|
||||
[202] = "%.f", -- Gyro_voyant_trim Lamp {0,1}
|
||||
[203] = "%.f", -- Gyro_voyant_bpp Lamp {0,1}
|
||||
-- Autopilot Panel
|
||||
[37] = "%.4f", -- T_Needle_State {-1,1} Pitch correction Indicator
|
||||
[38] = "%.4f", -- R_Needle_State {-1,1} Roll correction Indicator
|
||||
[39] = "%.4f", -- L_Needle_State {-1,1} Yaw correction Indicator
|
||||
--[196] = "%.4f", -- RWR_light {0,1} -- RWR background light
|
||||
--[] = "%.4f", -- PE_fondbright {0,1} ???
|
||||
--[353] = "%.4f", -- NADIR_fondbright {0,1} ???
|
||||
-- Flare Dispenser Lamps
|
||||
[233] = "%.f", -- Voyant_FD_On {0,1} Power On
|
||||
[231] = "%.f", -- Voyant_FD_G {0,1} select Left
|
||||
[232] = "%.f", -- Voyant_FD_D {0,1} select Right
|
||||
[227] = "%.f", -- Voyant_FD_LEU {0,1} Status LEU
|
||||
[223] = "%.f", -- Voyant_FD_G_vide1 {0,1} Status Left G
|
||||
[224] = "%.f", -- Voyant_FD_G_vide2 {0,1} Status Left VIDE
|
||||
[225] = "%.f", -- Voyant_FD_D_vide1 {0,1} Status Right G
|
||||
[226] = "%.f", -- Voyant_FD_D_vide2 {0,1} Status Right VIDE
|
||||
-- ADF Radio
|
||||
[158] = "%0.1f", -- ADF_nav1_centaine {0,1} X00.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[159] = "%0.1f", -- ADF_nav1_dizaine {0,1} 0X0.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[160] = "%0.1f", -- ADF_nav1_unite {0,1} 00X.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[161] = "%0.1f", -- ADF_nav1_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[162] = "%0.1f", -- ADF_nav2_centaine {0,1} X00.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[163] = "%0.1f", -- ADF_nav2_dizaine {0,1} 0X0.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[164] = "%0.1f", -- ADF_nav2_unite {0,1} 00X.0 khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- ADF Gauge
|
||||
[113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0}
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[107] = "%.1f", -- ADF_FlagCAP {0,1}
|
||||
[109] = "%.1f", -- ADF_FlagBut {0,1}
|
||||
[108] = "%.1f", -- ADF_FlagCompteur PX Flag {0,1}
|
||||
[110] = "%0.1f", -- ADF_compteur_Cent {0,1} X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[111] = "%0.1f", -- ADF_compteur_Dix {0,1} 0X0 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[112] = "%0.1f", -- ADF_compteur_Unit {0,1} 00X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- CLOCK
|
||||
[41] = "%.3f", -- CLOCK_HOUR {0,1,2,3,4,5,6,7,8,9,10,11,12}{0,0.081,0.162,0.245,0.33,0.415,0.501,0.587,0.672,0.756,0.838,0.919,1}
|
||||
[42] = "%.3f", -- CLOCK_SECOND {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_MINUTE {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[44] = "%.3f", -- CLOCK_MINI {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30}{0,0.032,0.065,0.098,0.131,0.164,0.198,0.231,0.264,0.297,0.331,0.364,0.397,0.43,0.464,0.497,0.523,0.551,0.576,0.605,0.63,0.659,0.684,0.714,0.758,0.796,0.838,0.879,0.92,0.958,1}
|
||||
[210] = "%.4f", -- Clock_ExtCouronne
|
||||
-- Wipers
|
||||
--[547] = "%.4f", -- EGPilote {-1,1}
|
||||
--[546] = "%.4f", -- EGCopilote {-1,1}
|
||||
-- LIGHTS
|
||||
--[40] = "%.4f", -- Lum_Plafond {0,1} Main Panel Lights
|
||||
--[142] = "%.4f", -- PBOIntensity {0,1} Main Panel Background lights
|
||||
--[144] = "%.4f", -- PUPIntensity {0,1} Lower Panel Background lights
|
||||
-- Baro altimetre
|
||||
[87] = "%.4f", -- Baro_Altimeter_thousands Needle {0.0,1.0}
|
||||
[573] = "%.4f", -- Baro_Altimeter_hundred Needle {0.0,1.0}
|
||||
[88] = "%0.1f", -- Baro_Altimeter_press_unite 000X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[90] = "%0.1f", -- Baro_Altimeter_press_dix 00X0 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[92] = "%0.1f", -- Baro_Altimeter_press_cent 0X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[95] = "%0.1f", -- Baro_Altimeter_press_mille X000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- radar altimetre
|
||||
[94] = "%.4f", -- Radar_Altimeter {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0,0.019,0.035,0.072,0.109,0.147,0.18,0.214,0.247,0.283,0.316,0.345,0.376,0.407,0.438,0.469,0.501,0.564,0.606,0.648,0.676,0.706,0.732,0.756,0.775,0.794,0.811,0.829,0.843,0.858,0.87}
|
||||
[93] = "%.4f", -- DangerRALT_index {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0.0,0.0175,0.0338,0.0715,0.109,0.147,0.182,0.215,0.247,0.282,0.315,0.3445,0.377,0.407,0.439,0.47,0.5005,0.5628,0.6052,0.646,0.675,0.7058,0.7315,0.755,0.7747,0.793,0.8097,0.8272,0.8425,0.8575,0.8693}
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
[98] = "%.f", -- RAlt_flag_Panne OFF Flag{0,1}
|
||||
[99] = "%.1f", -- RAlt_flag_MA A (Test) Flag{0,1}
|
||||
[91] = "%.1f", -- RAlt_knob_MA Power/Test Knop{0,1}
|
||||
-- TORQUE
|
||||
[16] = "%.3f", -- Torque {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110}{0.085,0.13,0.172,0.214,0.253,0.289,0.326,0.362,0.395,0.43,0.466,0.501,0.537,0.573,0.607,0.639,0.676,0.71,0.746,0.785,0.826,0.865,0.908}
|
||||
[55] = "%.3f", -- Torque_Bug {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110}{0.084,0.128,0.171,0.2134,0.252,0.2889,0.325,0.361,0.396,0.431,0.467,0.501,0.535,0.571,0.605,0.639,0.674,0.71,0.745,0.785,0.825,0.865,0.91}
|
||||
[17] = "%.f", -- VOYANT_TORQUE Lamp {0,1}
|
||||
-- Gyro_Compas
|
||||
[26] = "%.3f", -- Gyro_Compas {0,30,60,90,120,150,180,210,240,270,300,330,360}{0,0.083,0.167,0.251,0.334,0.418,0.5,0.583,0.667,0.751,0.832,0.917,1}
|
||||
-- Stby HA ADI
|
||||
[214] = "%.4f", -- StbyHA_Roll {-180,-90,-60,-30,-20,-10,0,10,20,30,60,90,180}{-1,-0.502,-0.335,-0.166,-0.11,-0.052,0,0.055,0.113,0.171,0.334,0.502,1}
|
||||
[213] = "%.4f", -- StbyHA_Pitch {-180,-150,-120,-90,-60,-50,-40,-30,-20,-15,-10,-5,0,5,10,15,20,30,40,50,60,90,120,150,180}{-1,-0.833,-0.667,-0.5,-0.333,-0.278,-0.223,-0.167,-0.111,-0.084,-0.057,-0.003,0,0.028,0.056,0.083,0.111,0.167,0.223,0.278,0.333,0.5,0.667,0.833,1}
|
||||
[211] = "%.1f", -- StdbyHA_Flag Fault Flag {0,1}
|
||||
[212] = "%.4f", -- Stdby_HA_W W Sympol {0,1}
|
||||
[217] = "%.4f", -- Stdby_HA_Curseur Knob Needle {0,1}
|
||||
-- QComb Fuel Indicator
|
||||
[137] = "%.3f", -- QComb {0,50,100,150,200,250,300,350,400,500}{0.093,0.243,0.354,0.428,0.521,0.621,0.692,0.771,0.834,0.932}
|
||||
-- Horizon Artificiel Principal
|
||||
[27] = "%.4f", -- Pitch_HA {-180,-170,-160,-150,-140,-130,-120,-110,-100,-90,-80,-70,-60,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180}{-1,-0.946,-0.898,-0.838,-0.78,-0.723,-0.667,-0.61,-0.556,-0.501,-0.446,-0.393,-0.334,-0.277,-0.223,-0.166,-0.104,-0.054,0,0.054,0.102,0.161,0.22,0.277,0.333,0.389,0.443,0.498,0.553,0.607,0.666,0.722,0.776,0.834,0.896,0.946,1}
|
||||
[28] = "%.4f", -- Roll_HA {-180,-90,-60,-30,-20,-10,0,10,20,30,60,90,180}{-1,-0.498,-0.331,-0.162,-0.111,-0.053,0,0.058,0.112,0.168,0.331,0.498,1}
|
||||
[20] = "%.4f", -- Bille_HA Slip Ball {-1,1}
|
||||
[18] = "%.1f", -- flag_GS_HA GS Flag {0,1}
|
||||
[19] = "%.1f", -- flag_HS_HA Fault Flag {0,1}
|
||||
[29] = "%.1f", -- flag_Lock_HA Lock Flag {0,1}
|
||||
[117] = "%.4f", -- Curseur_HA Knob Needle {0,1}
|
||||
[120] = "%.4f", -- W_HA W Sympol {-1,1}
|
||||
[118] = "%.4f", -- VerBar_HA Vertical Bar {-1,1}
|
||||
[119] = "%.4f", -- HorBar_HA Horizon Bar {-1,1}
|
||||
-- variometre
|
||||
[24] = "%.4f", -- Variometre {-800,-700,-600,-500,-400,-300,-200,-100,-50,0,50,100,200,300,400,500,600,700,800}{-0.481,-0.436,-0.391,-0.338,-0.28,-0.218,-0.153,-0.075,-0.035,0.0,0.035,0.071,0.139,0.202,0.264,0.32,0.372,0.418,0.463}
|
||||
-- IAS
|
||||
[51] = "%.4f", -- IAS {0,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370}{0,0.1,0.133,0.172,0.207,0.243,0.277,0.316,0.35,0.38,0.41,0.439,0.465,0.491,0.517,0.541,0.565,0.587,0.611,0.63,0.651,0.671,0.692,0.712,0.731,0.75,0.77,0.791,0.809,0.829,0.849,0.867,0.886}
|
||||
-- RPM
|
||||
[135] = "%.4f", -- Turbine_RPM large Needle {0,5000,10000,15000,20000,25000,29000,35000,40000,43500,45000,50000}{0.095,0.181,0.263,0.346,0.424,0.505,0.572,0.665,0.748,0.802,0.828,0.909}
|
||||
[52] = "%.4f", -- Rotor_RPM small Needle {0,50,100,150,200,250,262,316.29,361.05,387,400,450}{0.096,0.191,0.283,0.374,0.461,0.549,0.57,0.665,0.748,0.802,0.811,0.904}
|
||||
-- Voltmetre
|
||||
[14] = "%.3f", -- Voltmetre {0,5,10,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35}{0.045,0.074,0.103,0.133,0.163,0.192,0.221,0.25,0.281,0.31,0.339,0.368,0.399,0.429,0.458,0.488,0.518,0.547,0.576,0.605,0.635,0.664,0.695,0.724}
|
||||
-- TQuatre Engine temperature Indicator
|
||||
[15] = "%.3f", -- TQuatre Engine Temp {0,100,200,300,400,500,600,700,800}{0.1575,0.228,0.3,0.3845,0.473,0.577,0.676,0.772,0.8625}
|
||||
-- TempExt outside temperature
|
||||
[25] = "%.3f", -- TempExt {-40,-35,-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30,35,40,45,50,55,60,65,70}{-0.758,-0.691,-0.625,-0.558,-0.492,-0.425,-0.359,-0.292,-0.224,-0.158,-0.09,-0.024,0.043,0.11,0.177,0.244,0.31,0.379,0.445,0.512,0.579,0.644,0.712}
|
||||
-- TempThm Oil Temperature Indicator
|
||||
[151] = "%.3f", -- TempThm Oil Temp {-20,-10,0,10,20,30,40,50,60,70,80,85,90,100}{0.046,0.102,0.157,0.213,0.268,0.323,0.38,0.435,0.492,0.547,0.603,0.63,0.659,0.715}
|
||||
-- Fuel Tank Indicator
|
||||
[152] = "%.3f", -- Gauge_RSupp {-1,0,0.25,0.5,0.75,1}{0,0.202,0.426,0.63,0.801,1}
|
||||
-- VHF AM Radio
|
||||
[133] = "%.1f", -- AM_Radio_freq_cent {0,1} X00.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[134] = "%.1f", -- AM_Radio_freq_dix {0,1} 0X0.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[136] = "%.1f", -- AM_Radio_freq_unite {0,1} 00X.000 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[138] = "%.1f", -- AM_Radio_freq_dixieme {0,1} 000.X00 {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
[139] = "%.2f", -- AM_Radio_freq_centieme {0,1} 000.0XX {00,25,50,75,00}{0.0,0.25,0.50,0.75,1.0}
|
||||
-- Lamps
|
||||
-- Voyant_DEM
|
||||
[300] = "%.f", -- Voyant_DEM Start lamp{0,1}
|
||||
-- Voyant_RLT
|
||||
[301] = "%.f", -- Voyant_RLT Idle lamp {0,1}
|
||||
-- Voyant_BLOC
|
||||
[302] = "%.f", -- Voyant_BLOC Blocked Engine lamp {0,1}
|
||||
-- RSUPP Fueltank
|
||||
[320] = "%.f", -- Voyant_RSupp Fueltank lamp {0,1}
|
||||
-- RCONV Convoy Fueltank
|
||||
[321] = "%.f", -- Voyant_RConv Convoy Fueltank lamüp {0,1}
|
||||
-- Voyant_FILTAS Sandfilter lamp
|
||||
[322] = "%.f", -- Voyant_FILTAS sandfilter lamp {0,1}
|
||||
-- Voyant_Alarme Master Alarme lamp
|
||||
[303] = "%.f", -- Voyant_Alarme Master Alarme lamp {0,1}
|
||||
-- AM_RADIO
|
||||
[141] = "%.f", -- AM_Radio_lamp {0,1}
|
||||
-- Tableau Alarme Lamps
|
||||
[1] = "%.f", -- TA_Pitot {0,1}
|
||||
[2] = "%.f", -- TA_Hmot {0,1}
|
||||
[3] = "%.f", -- TA_Hbtp {0,1}
|
||||
[4] = "%.f", -- TA_Hral {0,1}
|
||||
[5] = "%.f", -- TA_Gene {0,1}
|
||||
[6] = "%.f", -- TA_Alter {0,1}
|
||||
[7] = "%.f", -- TA_Bat {0,1}
|
||||
[8] = "%.f", -- TA_PA {0,1}
|
||||
[9] = "%.f", -- TA_Nav {0,1}
|
||||
[10] = "%.f", -- TA_Comb {0,1}
|
||||
[11] = "%.f", -- TA_Bphy {0,1}
|
||||
[12] = "%.f", -- TA_Lim {0,1}
|
||||
[13] = "%.f", -- TA_Filt {0,1}
|
||||
-- Intercomp Lamps
|
||||
[455] = "%.f", -- VHF Light
|
||||
[456] = "%.f", -- FM1 Light
|
||||
[457] = "%.f", -- UHF Light
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- WEAPONS PANEL 1
|
||||
[354] = "%1d", -- WP1 - Off/On/Stsnfby {-1.0,0.0,1.0}
|
||||
[357] = "%.4f", -- WP1 - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- WEAPONS PANEL 2
|
||||
[372] = "%1d", -- WP2 - Ma Left
|
||||
[373] = "%1d", -- WP2 - Ma Left Cover
|
||||
[374] = "%1d", -- WP2 - Ma Right
|
||||
[375] = "%1d", -- WP2 - Ma Right Cover
|
||||
[376] = "%1d", -- WP2 - Seq Ripple selection
|
||||
-- PILOTSIGHT
|
||||
[171] = "%1d", -- PILOTSIGHT - Pilot Sight
|
||||
-- PILOT STICK
|
||||
--[50] = "%1d", -- PILOT STICK - Magnetic Brake
|
||||
--[53] = "%1d", -- PILOT STICK - Wiper once
|
||||
--[209] = "%1d", -- PILOT STICK - Autopilot Button
|
||||
--[293] = "%1d", -- PILOT STICK - Slave
|
||||
--[294] = "%1d", -- PILOT STICK - Auto-Hover
|
||||
-- WSO LEFT SIDE STICK
|
||||
[255] = "%1d", -- PE WSO STICK - Lasing Button Cover
|
||||
[256] = "%1d", -- PE WSO STICK - Lasing Button
|
||||
[257] = "%1d", -- PE WSO STICK - Missile Launch Cover
|
||||
[258] = "%1d", -- PE WSO STICK - Missile Launch Button
|
||||
[259] = "%1d", -- PE WSO STICK - Inversed Symbology Toggle
|
||||
[260] = "%1d", -- PE WSO STICK - Inversed Image Toggle
|
||||
[264] = "%.1f", -- PE WSO STICK - Image Focus {-1.0,1.0}
|
||||
[262] = "%.1f", -- PE WSO STICK - Gain {-1.0,1.0}
|
||||
[263] = "%.1f", -- PE WSO STICK - Image Brightness {-1.0,1.0}
|
||||
[219] = "%.1f", -- PE WSO STICK - Symbology Brightness {-1.0,1.0}
|
||||
-- GYRO
|
||||
[197] = "%1d", -- GYRO - Test Cover
|
||||
[198] = "%1d", -- GYRO - Test Switch On/Off
|
||||
[199] = "%1d", -- GYRO - Left/Center/Right
|
||||
[153] = "%.2f", -- GYRO - CM/A/GM/D/GD {0.0,0.25,0.50,0.75,1.0}
|
||||
-- CLOCK
|
||||
[45] = "%.4f", -- CLOCK - Winder (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[46] = "%1d", -- CLOCK - Start/Stop
|
||||
[47] = "%1d", -- CLOCK - Reset
|
||||
-- SA342M HOT3 only
|
||||
-- PH SA342M HOT3
|
||||
[180] = "%.2f", -- PH - Test/On/Off {0.0,0.25,0.50,0.75,1.0}
|
||||
[181] = "%.3f", -- PH - Station Select {0.0,0.125,0.250,0,375,0.500,0.625,0.750,0.875,1.0}
|
||||
[182] = "%.4f", -- PH - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- PE SA342L/M/Mistral BCV (BOITIER DE COMMANDE VIDEO – video command box)
|
||||
[362] = "%1d", -- PE BCV - Centering
|
||||
[364] = "%1d", -- PE BCV - VDO/VTH
|
||||
[365] = "%.1f", -- PE BCV - Zoom {-1.0,1.0}
|
||||
[366] = "%.1f", -- PE BCV - CTH A/V/M {0.0,0.5,1.0}
|
||||
[367] = "%1d", -- PE BCV - Power
|
||||
[370] = "%.2f", -- PE BCV - Mode A/C/V/PIL/ASS {0.0,0.25,0.50,0.75,1.0}
|
||||
-- NADIR
|
||||
[330] = "%.4f", -- NADIR - Off/Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[331] = "%.2f", -- NADIR - Mode Off/Stby/Ground/Sea/Air Speed Sensor/Ground Test {0.0,0.2,0.4,0.6,0.8,1.0}
|
||||
[332] = "%.2f", -- NADIR - Parameter Wind/Magnetic Heading/Ground Speed/Calculated Time/Current Position/Waypoint {0.0,0.2,0.4,0.6,0.8,1.0}
|
||||
[333] = "%1d", -- NADIR - ENT
|
||||
[334] = "%1d", -- NADIR - DES
|
||||
[335] = "%1d", -- NADIR - AUX
|
||||
[336] = "%1d", -- NADIR - IC
|
||||
[337] = "%1d", -- NADIR - DOWN
|
||||
[351] = "%1d", -- NADIR - 0
|
||||
[338] = "%1d", -- NADIR - 1
|
||||
[339] = "%1d", -- NADIR - 2
|
||||
[340] = "%1d", -- NADIR - 3
|
||||
[342] = "%1d", -- NADIR - 4
|
||||
[343] = "%1d", -- NADIR - 5
|
||||
[344] = "%1d", -- NADIR - 6
|
||||
[346] = "%1d", -- NADIR - 7
|
||||
[347] = "%1d", -- NADIR - 8
|
||||
[348] = "%1d", -- NADIR - 9
|
||||
[341] = "%1d", -- NADIR - POL
|
||||
[345] = "%1d", -- NADIR - GEO
|
||||
[349] = "%1d", -- NADIR - POS
|
||||
[350] = "%1d", -- NADIR - GEL
|
||||
[352] = "%1d", -- NADIR - EFF
|
||||
-- AM_RADIO
|
||||
[128] = "%.2f", -- AM RADIO - Selector {0.0,0.33,0.66,0.99}
|
||||
[129] = "%.4f", -- AM RADIO - Freq decimals (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[130] = "%1d", -- AM RADIO - 25/50kHz Selector
|
||||
[131] = "%.4f", -- AM RADIO - Freq dial (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FM_RADIO
|
||||
[272] = "%.2f", -- FM RADIO - Main Selector {0.0,0.25,0.50,0.75,1.0}
|
||||
[273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0}
|
||||
[274] = "%1d", -- FM RADIO - 7
|
||||
[275] = "%1d", -- FM RADIO - 8
|
||||
[276] = "%1d", -- FM RADIO - 9
|
||||
[277] = "%1d", -- FM RADIO - 0
|
||||
[278] = "%1d", -- FM RADIO - X
|
||||
[279] = "%1d", -- FM RADIO - 4
|
||||
[280] = "%1d", -- FM RADIO - 5
|
||||
[281] = "%1d", -- FM RADIO - 6
|
||||
[282] = "%1d", -- FM RADIO - RC
|
||||
[283] = "%1d", -- FM RADIO - UP
|
||||
[284] = "%1d", -- FM RADIO - 1
|
||||
[285] = "%1d", -- FM RADIO - 2
|
||||
[286] = "%1d", -- FM RADIO - 3
|
||||
[287] = "%1d", -- FM RADIO - VAL
|
||||
[288] = "%1d", -- FM RADIO - DOWN
|
||||
-- TV
|
||||
[124] = "%1d", -- TV - On/Off
|
||||
[125] = "%.4f", -- TV - Contrast (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[123] = "%.4f", -- TV - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
--[126] = "%.4f", -- TV - Cover (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- RWR
|
||||
[148] = "%1d", -- RWR - Off/On/Croc {-1.0,0.0,1.0}
|
||||
[149] = "%1d", -- RWR - Marker
|
||||
[150] = "%1d", -- RWR - Page
|
||||
[121] = "%.4f", -- RWR - Audio (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[122] = "%.4f", -- RWR - Brightness (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- ADI
|
||||
[115] = "%.4f", -- ADI - Unlock (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[116] = "%1d", -- ADI - Unlock
|
||||
-- Stby ADI
|
||||
[215] = "%.4f", -- STDBY ADI - Unlock (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[216] = "%1d", -- STDBY ADI - Unlock
|
||||
-- ArtVisVhfDop (Source selector for main artificial horizon vertical bar)
|
||||
[218] = "%.2f", -- ADI - Source Off/Camera target point/ADF ermitter/NADIR Waypoint {0.0,0.33,0.66,0.99}
|
||||
-- INTERCOM
|
||||
[452] = "%1d", -- INTERCOM - VHF AM Radio
|
||||
[68] = "%.4f", -- INTERCOM - VHF AM Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[453] = "%1d", -- INTERCOM - FM Radio
|
||||
[69] = "%.4f", -- INTERCOM - FM Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[454] = "%1d", -- INTERCOM - UHF Radio
|
||||
[70] = "%.4f", -- INTERCOM - UHF Radio Volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- TORQUE
|
||||
[58] = "%1d", -- TORQUE Bug/Test
|
||||
[54] = "%.4f", -- TORQUE Bug/Test (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- LIGHTS
|
||||
[22] = "%.4f", -- LIGHTS - Main Dashboard Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[21] = "%.4f", -- LIGHTS - Console Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[145] = "%.4f", -- LIGHTS - UV Lighting (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[23] = "%1d", -- LIGHTS - NORM/BNL
|
||||
[147] = "%.4f", -- LIGHTS - Roof Lamp Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[154] = "%1d", -- LIGHTS - Red Lens On/Off
|
||||
-- ELECTRIC
|
||||
[264] = "%1d", -- ELECTRIC - Battery
|
||||
[265] = "%1d", -- ELECTRIC - Alternator
|
||||
[268] = "%1d", -- ELECTRIC - Generator
|
||||
[62] = "%1d", -- ELECTRIC - Voltmeter Test
|
||||
[170] = "%1d", -- ELECTRIC - Pitot
|
||||
[271] = "%1d", -- ELECTRIC - Fuel Pump
|
||||
[267] = "%1d", -- ELECTRIC - Additionnal Fuel Tank
|
||||
[56] = "%1d", -- ELECTRIC - Starter Start/Stop/Air {-1.0,0.0,1.0}
|
||||
[57] = "%1d", -- ELECTRIC - Test
|
||||
[48] = "%1d", -- ELECTRIC - Copilot Wiper {-1.0,0.0,1.0}
|
||||
[49] = "%1d", -- ELECTRIC - Pilot Wiper {-1.0,0.0,1.0}
|
||||
[61] = "%1d", -- ELECTRIC - Left from Pitot
|
||||
[59] = "%1d", -- ELECTRIC - HYD Test
|
||||
[66] = "%1d", -- ELECTRIC - Alter Rearm
|
||||
[67] = "%1d", -- ELECTRIC - Gene Rearm
|
||||
[63] = "%1d", -- ELECTRIC - Convoy Tank On/Off
|
||||
[64] = "%1d", -- ELECTRIC - Sand Filter On/Off
|
||||
-- NAVLIGHTS
|
||||
[146] = "%1d", -- NAVLIGHTS - Navigation Lights CLI/OFF/FIX {-1.0,0.0,1.0}
|
||||
[228] = "%1d", -- NAVLIGHTS - Anticollision Light NOR/OFF/ATT {-1.0,0.0,1.0}
|
||||
[105] = "%1d", -- NAVLIGHTS - Landing Light Off/Vario/On {-1.0,0.0,1.0}
|
||||
[106] = "%1d", -- NAVLIGHTS - Landing Light Extend/Retract
|
||||
[382] = "%1d", -- NAVLIGHTS - Panels Lighting On/Off
|
||||
[30] = "%.4f", -- NAVLIGHTS - AntiCollision Light Intensity (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[229] = "%1d", -- NAVLIGHTS - Formation Lights On/Off
|
||||
[230] = "%.4f", -- NAVLIGHTS - Formation Lights Intensity (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FLARE DISPENSER
|
||||
[220] = "%1d", -- FLARE DISPENSER - G/G+D/D {-1.0,0.0,1.0}
|
||||
[221] = "%1d", -- FLARE DISPENSER - Mode
|
||||
[222] = "%1d", -- FLARE DISPENSER - Off/Speed {-1.0,0.0,1.0}
|
||||
[194] = "%1d", -- FLARE DISPENSER - Fire Button Cover
|
||||
[195] = "%1d", -- FLARE DISPENSER - Fire Button
|
||||
-- AUTOPILOT
|
||||
[31] = "%1d", -- AUTOPILOT - Autopilot On/Off
|
||||
[32] = "%1d", -- AUTOPILOT - Pitch On/Off
|
||||
[33] = "%1d", -- AUTOPILOT - Roll On/Off
|
||||
[34] = "%1d", -- AUTOPILOT - Yaw On/Off
|
||||
[35] = "%1d", -- AUTOPILOT - Mode Speed/OFF/Altitude {-1.0,0.0,1.0}
|
||||
[60] = "%1d", -- AUTOPILOT - Trim On/Off
|
||||
[65] = "%1d", -- AUTOPILOT - Magnetic Brake On/Off
|
||||
-- WEAPONS
|
||||
[269] = "%1d", -- WEAPONS - Master arm On/Off
|
||||
-- ROTORS
|
||||
[556] = "%.4f", -- ROTORS - Rotor Brake (Axis) {0.0, 1.0} in 0.055 Steps
|
||||
-- RADIOALTIMETER
|
||||
[96] = "%.4f", -- RADIOALTIMETER - Radar Alt Bug (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[100] = "%1d", -- RADIOALTIMETER - Radar Alt On/Off - Test
|
||||
[91] = "%.4f", -- RADIOALTIMETER - Radar Alt On/Off - Test (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- BAROALTIMETER
|
||||
[89] = "%.4f", -- BAROALTIMETER - Baro pressure QFE knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- FUEL SYSTEM
|
||||
[557] = "%.4f", -- FUEL SYSTEM - Fuel Flow Lever (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- ADF RADIO
|
||||
[166] = "%1d", -- ADF RADIO - Select
|
||||
[167] = "%1d", -- ADF RADIO - Tone
|
||||
[178] = "%.2f", -- ADF RADIO - Mode {0.0,0.33,0.66,0.99}
|
||||
[179] = "%.4f", -- ADF RADIO - Gain (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[168] = "%.4f", -- ADF RADIO - Nav1 Hundred (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[169] = "%.4f", -- ADF RADIO - Nav1 Ten (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[173] = "%.4f", -- ADF RADIO - Nav1 Unit (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[174] = "%.4f", -- ADF RADIO - Nav2 Hundred (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[175] = "%.4f", -- ADF RADIO - Nav2 Ten (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[176] = "%.4f", -- ADF RADIO - Nav2 Unit (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
-- UHF RADIO
|
||||
[383] = "%.3f", -- UHF RADIO - MODE 0/FF/NA/SV/DL/G/EN {0.0,0.167,0.334,0.501,0.668,0.835,1.0}
|
||||
[384] = "%1d", -- UHF RADIO - DRW
|
||||
[385] = "%1d", -- UHF RADIO - VLD
|
||||
[386] = "%.4f", -- UHF RADIO - PAGE (Axis) {0.0, 1.0} in 0.2 Steps
|
||||
[387] = "%1d", -- UHF RADIO - CONF
|
||||
[388] = "%1d", -- UHF RADIO - 1
|
||||
[389] = "%1d", -- UHF RADIO - 2
|
||||
[390] = "%1d", -- UHF RADIO - 3
|
||||
[391] = "%1d", -- UHF RADIO - 4
|
||||
[392] = "%1d", -- UHF RADIO - 5
|
||||
[393] = "%1d", -- UHF RADIO - 6
|
||||
[394] = "%1d", -- UHF RADIO - 7
|
||||
[395] = "%1d", -- UHF RADIO - 8
|
||||
[396] = "%1d", -- UHF RADIO - 9
|
||||
[397] = "%1d" -- UHF RADIO - 0
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0))
|
||||
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102)
|
||||
if ADF_Aiguille_large ~= 0 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large + 0.5
|
||||
if ADF_Aiguille_large > 1 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large - 1.0
|
||||
end
|
||||
end
|
||||
ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- UHF Radio
|
||||
---------------------------------------------------
|
||||
local lUHFRadio = GetDevice(31)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2000, string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('UHF_Freq: '..ExportScript.Tools.dump(list_indication(5)))
|
||||
|
||||
local lUHFRadioFreq = ExportScript.Tools.getListIndicatorValue(5)
|
||||
|
||||
if lUHFRadioFreq ~= nil and lUHFRadioFreq.UHF_Freq ~= nil then
|
||||
ExportScript.Tools.SendData(2000, string.format("%s", lUHFRadioFreq.UHF_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2000, " ")
|
||||
end
|
||||
|
||||
-- AM Radio
|
||||
---------------------------------------------------
|
||||
local lAMRadio = GetDevice(5)
|
||||
if lAMRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2001, string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
end
|
||||
|
||||
-- FM Radio PR4G
|
||||
---------------------------------------------------
|
||||
local lFMRadio = GetDevice(28)
|
||||
if lFMRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2002, string.format("%.3f", lFMRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('FM_Freq: '..ExportScript.Tools.dump(list_indication(4)))
|
||||
|
||||
local lFMRadioFreq = ExportScript.Tools.getListIndicatorValue(4)
|
||||
|
||||
if lFMRadioFreq ~= nil and lFMRadioFreq.FM_Freq ~= nil then
|
||||
ExportScript.Tools.SendData(2002, string.format("%s", lFMRadioFreq.FM_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2002, " ")
|
||||
end
|
||||
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
-- [273] = "%.1f", -- FM RADIO - Chanel Selector {0.0,0.2,0.3,0.5,0.6,0.8,0.9,1.1} -- gerundet
|
||||
local lFM_RADIO_PRESET = {[0.0]="1",[0.2]="2",[0.3]="3",[0.5]="4",[0.6]="5",[0.8]="6",[0.9]="0",[1.1]="R"}
|
||||
ExportScript.Tools.SendData(2003, lFM_RADIO_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(273), 1, "ceil")])
|
||||
|
||||
-- Weapon Panel
|
||||
---------------------------------------------------
|
||||
if mainPanelDevice:get_argument_value(354) >= 0.0 then -- Weapon panel is On
|
||||
local lWeaponPanelDisplays = ExportScript.Tools.getListIndicatorValue(8)
|
||||
|
||||
if lWeaponPanelDisplays ~= nil then
|
||||
if lWeaponPanelDisplays.LEFT_screen ~= nil then
|
||||
ExportScript.Tools.SendData(2004, string.format("%s", lWeaponPanelDisplays.LEFT_screen))
|
||||
end
|
||||
if lWeaponPanelDisplays.RIGHT_screen ~= nil then
|
||||
ExportScript.Tools.SendData(2005, string.format("%s", lWeaponPanelDisplays.RIGHT_screen))
|
||||
end
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2004, "-")
|
||||
ExportScript.Tools.SendData(2005, "-")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- UHF Radio
|
||||
---------------------------------------------------
|
||||
local lUHFRadio = GetDevice(31)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC("2000", string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('UHF_Freq: '..ExportScript.Tools.dump(list_indication(5)))
|
||||
|
||||
local lUHFRadioFreq = ExportScript.Tools.getListIndicatorValue(5)
|
||||
|
||||
if lUHFRadioFreq ~= nil and lUHFRadioFreq.UHF_Freq ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%s", lUHFRadioFreq.UHF_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2000", "-")
|
||||
end
|
||||
|
||||
-- AM Radio
|
||||
---------------------------------------------------
|
||||
local lAMRadio = GetDevice(5)
|
||||
if lAMRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC("2001", string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2001", ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
end
|
||||
|
||||
-- FM Radio PR4G
|
||||
---------------------------------------------------
|
||||
local lFMRadio = GetDevice(28)
|
||||
if lFMRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC(2002, string.format("%.3f", lFMRadio:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('FM_Freq: '..ExportScript.Tools.dump(list_indication(4)))
|
||||
|
||||
local lFMRadioFreq = ExportScript.Tools.getListIndicatorValue(4)
|
||||
|
||||
if lFMRadioFreq ~= nil and lFMRadioFreq.FM_Freq ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2002", string.format("%s", lFMRadioFreq.FM_Freq))
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2002", "-")
|
||||
end
|
||||
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
-- [273] = "%.1f", -- FM RADIO - Chanel Selector {0.0,0.2,0.3,0.5,0.6,0.8,0.9,1.1} -- gerundet
|
||||
local lFM_RADIO_PRESET = {[0.0]="1",[0.2]="2",[0.3]="3",[0.5]="4",[0.6]="5",[0.8]="6",[0.9]="0",[1.1]="R"}
|
||||
ExportScript.Tools.SendDataDAC("2003", lFM_RADIO_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(273), 1, "ceil")])
|
||||
|
||||
-- Weapon Panel
|
||||
---------------------------------------------------
|
||||
if mainPanelDevice:get_argument_value(354) >= 0.0 then -- Weapon panel is On
|
||||
local lWeaponPanelDisplays = ExportScript.Tools.getListIndicatorValue(8)
|
||||
|
||||
if lWeaponPanelDisplays ~= nil then
|
||||
if lWeaponPanelDisplays.LEFT_screen ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2004", string.format("%s", lWeaponPanelDisplays.LEFT_screen))
|
||||
end
|
||||
if lWeaponPanelDisplays.RIGHT_screen ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("2005", string.format("%s", lWeaponPanelDisplays.RIGHT_screen))
|
||||
end
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2004", "-")
|
||||
ExportScript.Tools.SendDataDAC("2005", "-")
|
||||
end
|
||||
|
||||
-- generic Radio display and frequency rotarys
|
||||
-------------------------------------------------
|
||||
-- genericRadioConf
|
||||
ExportScript.genericRadioConf = {}
|
||||
ExportScript.genericRadioConf['maxRadios'] = 3 -- numbers of aviables/supported radios
|
||||
ExportScript.genericRadioConf[1] = {} -- first radio
|
||||
ExportScript.genericRadioConf[1]['Name'] = "UHF Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[1]['DeviceID'] = 31 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[1]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[1]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[1]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[1]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[1]['minFrequency'] = 225.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[1]['maxFrequency'] = 399.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[1]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[1]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.167 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[1]['Volume']['ButtonID'] = 3011 -- volume button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset'] = {} -- preset knob active
|
||||
--ExportScript.genericRadioConf[1]['Preset']['ArgumentID'] = 161 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
--ExportScript.genericRadioConf[1]['Preset']['List'] = {[0.0]="01",[0.05]="02",[0.10]="03",[0.15]="04",[0.20]="05",[0.25]="06",[0.30]="07",[0.35]="08",[0.40]="09",[0.45]="10",[0.50]="11",[0.55]="12",[0.60]="13",[0.65]="14",[0.70]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20",[1.00]="01"}
|
||||
--ExportScript.genericRadioConf[1]['Preset']['Step'] = 0.05 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[1]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ArgumentID'] = 170 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ButtonID'] = 3010 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Squelch']['ValueOff'] = 1.0 -- squelch off value from cklickable.lua
|
||||
-- Load Button = VLD Button
|
||||
ExportScript.genericRadioConf[1]['Load'] = {} -- load button preset
|
||||
ExportScript.genericRadioConf[1]['Load']['ButtonID'] = 3003 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ArgumentID'] = 167 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ButtonID'] = 3007 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ValueManual'] = 0.0-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['ManualPreset']['ValuePreset'] = 0.1-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadioConf[2] = {} -- secound radio
|
||||
ExportScript.genericRadioConf[2]['Name'] = "AM Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[2]['DeviceID'] = 5 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[2]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[2]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[2]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[2]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[2]['minFrequency'] = 118.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[2]['maxFrequency'] = 143.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[2]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[2]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Power']['ValueOn'] = 0.33 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[2]['Volume']['ButtonID'] = 3005 -- volume button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset'] = {} -- preset knob active
|
||||
--ExportScript.genericRadioConf[2]['Preset']['ArgumentID'] = 137 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
--ExportScript.genericRadioConf[2]['Preset']['List'] = {[0.0]="01",[0.01]="02",[0.02]="03",[0.03]="04",[0.04]="05",[0.05]="06",[0.06]="07",[0.07]="08",[0.08]="09",[0.09]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20",[0.20]="01"}
|
||||
--ExportScript.genericRadioConf[2]['Preset']['Step'] = 0.01 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[2]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ArgumentID'] = 134 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ButtonID'] = 3008 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Squelch']['ValueOff'] = 1.0 -- squelch off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['Load'] = {} -- load button preset
|
||||
--ExportScript.genericRadioConf[2]['Load']['ButtonID'] = 3006 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ArgumentID'] = 135 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ButtonID'] = 3004 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ValueManual'] = 0.2-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[2]['ManualPreset']['ValuePreset'] = 0.3-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadioConf[3] = {} -- secound radio
|
||||
ExportScript.genericRadioConf[3]['Name'] = "FM Radio" -- name of radio
|
||||
ExportScript.genericRadioConf[3]['DeviceID'] = 28 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[3]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[3]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[3]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[3]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[3]['minFrequency'] = 30.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[3]['maxFrequency'] = 87.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[3]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[3]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Power']['ValueOn'] = 0.25 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[3]['Volume']['ButtonID'] = 3005 -- volume button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Preset'] = {} -- preset knob active
|
||||
ExportScript.genericRadioConf[3]['Preset']['ArgumentID'] = 273 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Preset']['ButtonID'] = 3002 -- preset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Preset']['ButtonID2'] = 3002 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
ExportScript.genericRadioConf[3]['Preset']['List'] = {[0.0]="1",[0.143]="2",[0.286]="3",[0.429]="4",[0.572]="5",[0.715]="6",[0.858]="0",[1.0]="-"}
|
||||
ExportScript.genericRadioConf[3]['Preset']['Step'] = 0.143 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[3]['Preset']['Step2'] = -0.01 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[3]['Squelch'] = {} -- squelch switch active
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ArgumentID'] = 148 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ButtonID'] = 3008 -- squelch button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Squelch']['ValueOff'] = -1.0 -- squelch off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['Load'] = {} -- load button preset
|
||||
--ExportScript.genericRadioConf[3]['Load']['ButtonID'] = 3004 -- load button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset'] = {} -- switch manual or preset active
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ArgumentID'] = 149 -- ManualPreset argument id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ButtonID'] = 3004 -- ManualPreset button id from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ValueManual'] = 0.2-- ManualPreset Manual value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[3]['ManualPreset']['ValuePreset'] = 0.3-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadio(nil, nil)
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
699
Scripts/DCS-ExportScript/ExportsModules/SpitfireLFMkIX.lua
Normal file
699
Scripts/DCS-ExportScript/ExportsModules/SpitfireLFMkIX.lua
Normal file
@@ -0,0 +1,699 @@
|
||||
-- Spitfire LFMk IX
|
||||
|
||||
-------------
|
||||
-- Exports --
|
||||
-------------
|
||||
--[[
|
||||
2000 - Radio Freq
|
||||
2001 - Radio Channel
|
||||
2002 -
|
||||
2003 - Compass readout
|
||||
2004 - Directional Gyro Readout
|
||||
2005 - Oxygen Flow Rate Pilot
|
||||
2006 - isDial_oxygenFlowRatePilotEmergency
|
||||
2007 - dial_oxygenSupplyPilot
|
||||
2008 - isDial_oxygenSupplyPilotRedZone
|
||||
2009 - isPilotOxygenEmergency (either oxygen goes emergency)
|
||||
2010 - Altimeter Altitude
|
||||
2011 - Altimiter Pressure setting
|
||||
2012 - Efficient Climb Airspeed
|
||||
2013 - Gun Wingspan
|
||||
2014 - Gun Range
|
||||
2015 - Optimal Target Aircraft Wingspan
|
||||
2016 - (is) gear lamp down on
|
||||
2017 - (is) gear lamp up on
|
||||
2018 - Elevator Trim readout
|
||||
2019 - Rudder Trim Readout
|
||||
|
||||
|
||||
3000 - RPM and Boost Tile
|
||||
3001 - Compass and Directional Gyro Tile
|
||||
3002 - Oxygen Tile
|
||||
3003 - Channel and Freq Tile
|
||||
3004 - Altimeter Tile
|
||||
3005 - Best Takeoff Tile
|
||||
3006 - Best Combat Tile
|
||||
3007 - Best Nominal Tile
|
||||
3008 - Best Crusing Tile
|
||||
3009 - Best Climb Tile
|
||||
3010 - Gun Sight Solution Tile
|
||||
3011 - Trim Tile
|
||||
|
||||
--]]
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SpitfireLFMkIX = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Flight Instruments
|
||||
[11] = "%.4f", -- OxygenDeliveryGauge {0.0, 0.4}{0.0, 4000.0}
|
||||
[12] = "%.4f", -- OxygenSupplyGauge
|
||||
[17] = "%.4f", -- TrimGauge {-1.0, 1.0}
|
||||
[18] = "%.4f", -- PneumaticPressureGauge {0.0, 1.0}{0.0, 600.0}
|
||||
[19] = "%.4f", -- Left wheel brake pressure gauge {0.0, 1.0}{0.0, 130.0}
|
||||
[20] = "%.4f", -- Right wheel brake pressure gauge {0.0, 1.0}{0.0, 130.0}
|
||||
[21] = "%.4f", -- Airspeed gauge {0.0, 0.5}{0.0, 500.0}
|
||||
[23] = "%.4f", -- Attitude Horizon Bank {-1.0, 1.0}
|
||||
[24] = "%.4f", -- Attitude Horizon Pitch {-1.0, 1.0}
|
||||
[25] = "%.4f", -- Variometer gauge {-1.0, 1.0}{-4000.0, 4000.0}
|
||||
[26] = "%.4f", -- Altimeter gauge Hundreds {0.0, 1.0}{0.0, 10.0}
|
||||
[27] = "%.4f", -- Altimeter gauge Thousands {0.0, 1.0}{0.0, 10.0}
|
||||
[28] = "%.4f", -- Altimeter gauge Tens Thousabds {0.0, 1.0}{0.0, 10.0}
|
||||
[29] = "%.4f", -- Altimeter gauge Pressure {0.0, 1.0}{800.0, 1050.0}
|
||||
[31] = "%.4f", -- DI gauge Directional Gyro {0.0, 1.0}{0.0, 2.0 * 3.1415926}
|
||||
[33] = "%.4f", -- Sideslip gauge {-1.0, 1.0}
|
||||
[34] = "%.4f", -- Turn gauge {-1.0, 1.0}
|
||||
[35] = "%.4f", -- Voltmeter {0.0, 1.0}{0.0, 20.0}
|
||||
[37] = "%.4f", -- Tachometer {0.0, 0.5}{0.0, 5000.0}
|
||||
[39] = "%.4f", -- Boost gauge {0.0, 1.0}{-7.0, 24.0}
|
||||
[40] = "%.4f", -- Oil pressure gauge {0.0, 1.0}{0.0, 150.0}
|
||||
[41] = "%.4f", -- Oil temperature gauge {0.0, 1.0}{0.0, 100.0}
|
||||
[42] = "%.4f", -- Radiator temperature gauge {0.0, 0.7}{0.0, 140.0}
|
||||
[43] = "%.4f", -- Fuel contents gauge {0.0, 0.1, 1.0}{-1.0, 0.0, 37.0}
|
||||
[51] = "%.4f", -- Clock Hour
|
||||
[52] = "%.4f", -- Clock Minute
|
||||
[53] = "%.4f", -- Clock Second
|
||||
[71] = "%.4f", -- Magnetic compass CompassRoseRoll {-1.0, 1.0}{-20.0, 20.0}
|
||||
[72] = "%.4f", -- Magnetic compass CompassRosePitch {-1.0, 1.0}{-20.0, 20.0}
|
||||
[73] = "%.4f", -- Magnetic compass CompassHeading{0.0, 1.0}
|
||||
[120] = "%1d", -- Radio Lamp A
|
||||
[121] = "%1d", -- Radio Lamp B
|
||||
[122] = "%1d", -- Radio Lamp C
|
||||
[123] = "%1d", -- Radio Lamp D
|
||||
[124] = "%1d", -- Radio Lamp R
|
||||
--[131] = "%1d", -- UC_DOWN_C ???
|
||||
[49] = "%1d", -- Gear Lamp Down
|
||||
[48] = "%1d", -- Gear Lamp Up
|
||||
--[62] = "%.4f", -- ???
|
||||
--[63] = "%.4f", -- ???
|
||||
--[59] = "%.4f", -- ???
|
||||
--[45] = "%.4f" -- ???
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
[13] = "%1d", -- Oxygen Apparatus Controls Valve
|
||||
-- Main Panel
|
||||
[30] = "%.1f", -- Altimeter (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[32] = "%.1f", -- DI (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[44] = "%1d", -- Fuel Gauge Button
|
||||
[46] = "%1d", -- Nav. Lights Toggle
|
||||
[47] = "%1d", -- Flaps Lever
|
||||
[50] = "%1d", -- U/C Indicator Blind
|
||||
[54] = "%1d", -- Clock Setter Pinion
|
||||
[55] = "%.1f", -- Clock Setter Pinion (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[56] = "%1d", -- Magnetos Toggles 1
|
||||
[57] = "%1d", -- Magnetos Toggles 2
|
||||
[58] = "%1d", -- Supercharger Mode Toggle
|
||||
[60] = "%.1f", -- Illumination Controls Left (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[61] = "%.1f", -- Illumination Controls Right (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[65] = "%1d", -- Starter Button
|
||||
[67] = "%1d", -- Booster Coil Button
|
||||
[69] = "%1d", -- Primer Pump
|
||||
[68] = "%.2f", -- Primer Pump (Axis) {0.0, 1.0} in 0.04 Steps
|
||||
[70] = "%1d", -- Tank Pressurizer Lever
|
||||
[74] = "%.4f", -- Magnetic Compass Ring (Axis) {0.0, 1.0} in 0.0333 Steps
|
||||
-- Gun Sight and Tertiary Weapons Controls
|
||||
[77] = "%.2f", -- Gun Sight Setter Rings Range (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[78] = "%.2f", -- Gun Sight Setter Rings Base (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[79] = "%1d", -- Gun Sight Tint Screen
|
||||
[80] = "%1d", -- Gun Sight Master Switch
|
||||
[81] = "%.1f", -- Gun Sight Dimmer (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Port Wall
|
||||
[145] = "%.2f", -- Elevator Trim Wheel (Axis) {-1.0, 1.0} in 0.01 Steps
|
||||
[146] = "%.1f", -- Rudder Trim Wheel (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
-- Radio Remote Channel Switcher
|
||||
[115] = "%1d", -- Off Button
|
||||
[116] = "%1d", -- A Button
|
||||
[117] = "%1d", -- B Button
|
||||
[118] = "%1d", -- C Button
|
||||
[119] = "%1d", -- D Button
|
||||
[125] = "%1d", -- Dimmer Toggle
|
||||
[155] = "%1d", -- Transmit Lock Toggle
|
||||
[156] = "%1d", -- Mode Selector
|
||||
-- Throttle Quadrant
|
||||
[126] = "%.1f", -- Throttle Lever (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
[128] = "%1d", -- Bomb Drop Button
|
||||
[129] = "%.1f", -- Airscrew Lever (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
[130] = "%1d", -- Mix Cut-Off Lever
|
||||
[131] = "%1d", -- U/C Indicator Cut-Off Toggle
|
||||
--
|
||||
[133] = "%1d", -- Radiator Control Toggle
|
||||
[134] = "%1d", -- Pitot Heater Toggle
|
||||
[135] = "%1d", -- Fuel Pump Toggle
|
||||
[137] = "%1d", -- Carb. Air Control Lever
|
||||
[158] = "%1d", -- Oil Diluter Button
|
||||
[160] = "%1d", -- Supercharger Mode Test Button
|
||||
[162] = "%1d", -- Radiator Flap Test Button
|
||||
-- Stbd. Wall
|
||||
[87] = "%1d", -- De-Icer Lever
|
||||
[88] = "%1d", -- U/C Emergency Release Lever
|
||||
[90] = "%1d", -- Wobble Type Fuel Pump
|
||||
-- Wobble Type Fuel Pump
|
||||
[92] = "%.1f", -- Upward Lamp Mode Selector {0.0,0.5,1.0}
|
||||
[93] = "%.1f", -- Downward Lamp Mode Selector {0.0,0.5,1.0}
|
||||
[94] = "%1d", -- Morse Key
|
||||
--
|
||||
[148] = "%1d", -- U/C Lever
|
||||
-- I.F.F. Control Box
|
||||
[106] = "%1d", -- I.F.F. Upper Toggle (Type B)
|
||||
[107] = "%1d", -- I.F.F. Lower Toggle (Type D)
|
||||
[109] = "%1d", -- I.F.F. Fore Button (0)
|
||||
[110] = "%1d", -- I.F.F. Aft Button (1)
|
||||
-- Fuel Cocks & Tertiary
|
||||
[100] = "%1d", -- Fuel Cock
|
||||
[98] = "%1d", -- Droptank Cock
|
||||
[99] = "%1d", -- Droptank Release Handle
|
||||
|
||||
[165] = "%1d", -- Pilot ON/OFF. 0 to 1. 1 and 0 are OFF
|
||||
|
||||
[95] = "%1d", -- Gear Handle Fore/Aft
|
||||
[96] = "%1d", -- Gear Handle Left/Right
|
||||
[97] = "%1d", -- Gear UP/DOWN roller
|
||||
|
||||
-- Canopy Controls
|
||||
[149] = "%1d", -- Cockpit Open/Close Control
|
||||
[140] = "%1d", -- Cockpit Jettison Pull Ball
|
||||
[147] = "%1d" -- Cockpit Side Door Open/Close Control
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
|
||||
ExportScript.gearLamp(mainPanelDevice) -- for some reason this does not work at the bottom of this list
|
||||
ExportScript.engLeftRpmTile(mainPanelDevice)
|
||||
ExportScript.oxygenTile(mainPanelDevice)
|
||||
ExportScript.VhfRadioTile(mainPanelDevice)
|
||||
ExportScript.navigation1Tile(mainPanelDevice)
|
||||
ExportScript.altimeterTile(mainPanelDevice)
|
||||
ExportScript.BestPowerTiles(mainPanelDevice)
|
||||
ExportScript.bestClimb(mainPanelDevice)
|
||||
ExportScript.gunnerTile(mainPanelDevice)
|
||||
ExportScript.radioButtonSelection(mainPanelDevice)
|
||||
ExportScript.trimReadouts(mainPanelDevice)
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
-- Cockpit Light
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {163, 62, 63})
|
||||
-- Gauges light, left panel light, right panel light
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
|
||||
-- VHF_Radio
|
||||
local lVHF_Radio = GetDevice(15)
|
||||
if lVHF_Radio:is_on() then
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", lVHF_Radio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy(lVHF_Radio:get_frequency()/1000000))
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2000", " ")
|
||||
end
|
||||
|
||||
--[[
|
||||
[115] = "%1d", -- Off Button
|
||||
[116] = "%1d", -- A Button
|
||||
[117] = "%1d", -- B Button
|
||||
[118] = "%1d", -- C Button
|
||||
[119] = "%1d", -- D Button]]
|
||||
local lVHF_Radio_PRESET = ""
|
||||
if mainPanelDevice:get_argument_value(116) > 0.8 then
|
||||
lVHF_Radio_PRESET = 1
|
||||
elseif mainPanelDevice:get_argument_value(117) > 0.8 then
|
||||
lVHF_Radio_PRESET = 2
|
||||
elseif mainPanelDevice:get_argument_value(118) > 0.8 then
|
||||
lVHF_Radio_PRESET = 3
|
||||
elseif mainPanelDevice:get_argument_value(119) > 0.8 then
|
||||
lVHF_Radio_PRESET = 4
|
||||
else
|
||||
lVHF_Radio_PRESET = ""
|
||||
end
|
||||
ExportScript.Tools.SendDataDAC("2001", lVHF_Radio_PRESET)
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.trimReadouts(mainPanelDevice) --TODO Not working
|
||||
--[145] = "%.2f", -- Elevator Trim Wheel (Axis) {-1.0, 1.0} in 0.01 Steps
|
||||
--[146] = "%.1f", -- Rudder Trim Wheel (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
|
||||
local trimElevatorRaw = mainPanelDevice:get_argument_value(145)
|
||||
local trimElevatorDirection
|
||||
local trimElevatorDirectionShorthand
|
||||
trimElevatorAmt = round(trimElevatorRaw * 100,0)
|
||||
|
||||
|
||||
if trimElevatorAmt > 1 then --trim is positive, which is nose down
|
||||
trimElevatorDirection = "DOWN"
|
||||
trimElevatorDirectionShorthand = "D"
|
||||
elseif trimElevatorAmt < -1 then --trim is negative, which is nose up
|
||||
trimElevatorDirection = "UP"
|
||||
trimElevatorDirectionShorthand = "U"
|
||||
else --trim is basically neutral
|
||||
trimElevatorDirection = " "
|
||||
end
|
||||
|
||||
trimElevatorAmt = math.abs(trimElevatorAmt)
|
||||
ExportScript.Tools.SendData(2018, "ELVTR TRM\n" .. trimElevatorAmt .. "% " .. trimElevatorDirection)
|
||||
|
||||
|
||||
local trimRudderRaw = mainPanelDevice:get_argument_value(146)
|
||||
local trimRudderDirection
|
||||
local trimRudderDirectionShortHand
|
||||
trimRudderAmt = round(trimRudderRaw * 100,0)
|
||||
|
||||
|
||||
if trimRudderAmt > 1 then --trim is positive, which is stbd
|
||||
trimRudderDirection = "STBD"
|
||||
trimRudderDirectionShortHand = "S"
|
||||
elseif trimRudderAmt < -1 then --trim is negative, which is port
|
||||
trimRudderDirection = "PORT"
|
||||
trimRudderDirectionShortHand = "P"
|
||||
else --trim is basically neutral
|
||||
trimRudderDirection = " "
|
||||
end
|
||||
|
||||
trimRudderAmt = math.abs(trimRudderAmt)
|
||||
ExportScript.Tools.SendData(2019, "RDR TRM\n" .. trimRudderAmt .. "% " .. trimRudderDirection)
|
||||
|
||||
--for some reason this does not pop up unless you use trim? TODO investigate
|
||||
ExportScript.Tools.SendData(3011, "TRIM" .. "\n" ..
|
||||
"ELVTR " .. trimElevatorAmt .. "% " .. trimElevatorDirectionShorthand .. "\n" ..
|
||||
"RDR " .. trimRudderAmt .. "% " .. trimRudderDirectionShortHand)
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.engLeftRpmTile(mainPanelDevice) --boost is [39], rpm is [37]
|
||||
|
||||
local guage_rpm = math.floor(mainPanelDevice:get_argument_value(37) * 10000)
|
||||
|
||||
local dial_boostRaw = math.floor(mainPanelDevice:get_argument_value(39))--experemental
|
||||
|
||||
|
||||
local dial_boostLeft = math.floor(dial_boostRaw * 24)
|
||||
|
||||
ExportScript.Tools.SendData(3000, string.format("Eng" .. "\n"
|
||||
.. "RPM ".. guage_rpm .. "\n"
|
||||
.. "Boost ".. dial_boostLeft .. "\n"))
|
||||
end
|
||||
|
||||
|
||||
function ExportScript.oxygenTile(mainPanelDevice)
|
||||
local dial_oxygenFlowRatePilot = math.floor(mainPanelDevice:get_argument_value(11) * 100)
|
||||
ExportScript.Tools.SendData(2005, dial_oxygenFlowRatePilot)
|
||||
|
||||
--numbers above 40 are "EMERGENCY"
|
||||
|
||||
local isDial_oxygenFlowRatePilotEmergency
|
||||
if dial_oxygenFlowRatePilot > 40 then
|
||||
isDial_oxygenFlowRatePilotEmergency = 1
|
||||
else
|
||||
isDial_oxygenFlowRatePilotEmergency = 0
|
||||
end
|
||||
ExportScript.Tools.SendData(2006, isDial_oxygenFlowRatePilotEmergency)
|
||||
|
||||
|
||||
local dial_oxygenSupplyPilotRaw = mainPanelDevice:get_argument_value(12)
|
||||
|
||||
local dial_oxygenSupplyPilot = (
|
||||
|
||||
(87.118 * dial_oxygenSupplyPilotRaw * dial_oxygenSupplyPilotRaw * dial_oxygenSupplyPilotRaw * dial_oxygenSupplyPilotRaw)
|
||||
- (228.16 * dial_oxygenSupplyPilotRaw * dial_oxygenSupplyPilotRaw * dial_oxygenSupplyPilotRaw)
|
||||
+ (189.84 * dial_oxygenSupplyPilotRaw * dial_oxygenSupplyPilotRaw)
|
||||
+ (51.237 * dial_oxygenSupplyPilotRaw)
|
||||
- 0.0026)
|
||||
|
||||
dial_oxygenSupplyPilot = round(dial_oxygenSupplyPilot, 0)
|
||||
|
||||
ExportScript.Tools.SendData(2007, dial_oxygenSupplyPilot)
|
||||
|
||||
--numbers below 12.5 (1/8 on the dial) are red zone
|
||||
local isDial_oxygenSupplyPilotRedZone
|
||||
if dial_oxygenSupplyPilot < 12.5 then
|
||||
isDial_oxygenSupplyPilotRedZone = 1
|
||||
else
|
||||
isDial_oxygenSupplyPilotRedZone = 0
|
||||
end
|
||||
ExportScript.Tools.SendData(2008, isDial_oxygenSupplyPilotRedZone)
|
||||
|
||||
local oxygenTile_output = string.format("Oxy PLT" .. "\n"
|
||||
.. "Flow ".. dial_oxygenFlowRatePilot .. "k ft\n"
|
||||
.. "Amt. ".. dial_oxygenSupplyPilot .. "\n")
|
||||
|
||||
ExportScript.Tools.SendData(3002, oxygenTile_output)
|
||||
|
||||
local isPilotOxygenEmergency
|
||||
if isDial_oxygenSupplyPilotRedZone == 1 or isDial_oxygenFlowRatePilotEmergency == 1 then
|
||||
isPilotOxygenEmergency = 1
|
||||
else
|
||||
isPilotOxygenEmergency = 0
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendData(2009, isPilotOxygenEmergency)
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.VhfRadioTile(mainPanelDevice)
|
||||
-- VHF_Radio
|
||||
local lVHF_Radio = GetDevice(15)
|
||||
local VhfRadioFreq
|
||||
if lVHF_Radio:is_on() then
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lVHF_Radio:get_frequency()/1000000))
|
||||
VhfRadioFreq = ExportScript.Tools.RoundFreqeuncy(lVHF_Radio:get_frequency()/1000000)
|
||||
ExportScript.Tools.SendData(2000, VhfRadioFreq)
|
||||
else
|
||||
ExportScript.Tools.SendData(2000, " ")
|
||||
end
|
||||
|
||||
--[[
|
||||
[115] = "%1d", -- Off Button
|
||||
[116] = "%1d", -- A Button
|
||||
[117] = "%1d", -- B Button
|
||||
[118] = "%1d", -- C Button
|
||||
[119] = "%1d", -- D Button]]
|
||||
local lVHF_Radio_PRESET = ""
|
||||
if mainPanelDevice:get_argument_value(116) > 0.8 then
|
||||
lVHF_Radio_PRESET = "A"
|
||||
elseif mainPanelDevice:get_argument_value(117) > 0.8 then
|
||||
lVHF_Radio_PRESET = "B"
|
||||
elseif mainPanelDevice:get_argument_value(118) > 0.8 then
|
||||
lVHF_Radio_PRESET = "C"
|
||||
elseif mainPanelDevice:get_argument_value(119) > 0.8 then
|
||||
lVHF_Radio_PRESET = "D"
|
||||
else
|
||||
lVHF_Radio_PRESET = ""
|
||||
end
|
||||
ExportScript.Tools.SendData(2001, lVHF_Radio_PRESET)
|
||||
|
||||
ExportScript.Tools.SendData(3003, string.format("Radio " .. lVHF_Radio_PRESET .. "\n" .. VhfRadioFreq))
|
||||
|
||||
end
|
||||
|
||||
|
||||
function ExportScript.navigation1Tile(mainPanelDevice) -- [73]
|
||||
local dial_compass = math.floor(mainPanelDevice:get_argument_value(73) * 360)
|
||||
|
||||
if dial_compass == 0 then
|
||||
dial_compass = 360
|
||||
end
|
||||
|
||||
local dial_compassTxt = dial_compass
|
||||
if string.len(tostring(dial_compassTxt)) == 2 then
|
||||
dial_compass = string.format("0" .. dial_compass)
|
||||
elseif string.len(tostring(dial_compassTxt)) == 1 then
|
||||
dial_compass = string.format("00" .. dial_compass)
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendData(2003, dial_compass)
|
||||
|
||||
|
||||
local dial_directionalGyro = math.floor(mainPanelDevice:get_argument_value(31) * 360)
|
||||
|
||||
if dial_directionalGyro == 0 then
|
||||
dial_directionalGyro = 360
|
||||
end
|
||||
|
||||
local dial_directionalGyroTxt = dial_directionalGyro
|
||||
if string.len(tostring(dial_directionalGyroTxt)) == 2 then
|
||||
dial_directionalGyro = string.format("0" .. dial_directionalGyro)
|
||||
elseif string.len(tostring(dial_directionalGyroTxt)) == 1 then
|
||||
dial_directionalGyro = string.format("00" .. dial_directionalGyro)
|
||||
end
|
||||
ExportScript.Tools.SendData(2004, dial_directionalGyro)
|
||||
|
||||
ExportScript.Tools.SendData(3001, string.format("Comp " .. dial_compass .. "\n"
|
||||
.. "Gyro " .. dial_directionalGyro))
|
||||
end
|
||||
|
||||
|
||||
function ExportScript.altimeterTile(mainPanelDevice)
|
||||
--[26] = "%.4f", -- Altimeter gauge Hundreds {0.0, 1.0}{0.0, 10.0}
|
||||
--[27] = "%.4f", -- Altimeter gauge Thousands {0.0, 1.0}{0.0, 10.0}
|
||||
--[28] = "%.4f", -- Altimeter gauge Tens Thousands {0.0, 1.0}{0.0, 10.0}
|
||||
--[29] = "%.4f", -- Altimeter gauge Pressure {0.0, 1.0}{800.0, 1050.0}
|
||||
local dial_altimeter_tenThousands = math.floor(mainPanelDevice:get_argument_value(28) * 100000)
|
||||
local altitude = dial_altimeter_tenThousands
|
||||
altitude = round(altitude,-1)
|
||||
if altitude > 60000 then
|
||||
altitude = altitude - 100000
|
||||
end
|
||||
|
||||
altitude = format_int(altitude)
|
||||
|
||||
local dial_altimeterPressure = round((mainPanelDevice:get_argument_value(29) * 250) + 800,0)
|
||||
|
||||
if string.find(dial_altimeterPressure, ".") then
|
||||
--the dot was there, dont do anything
|
||||
else --the dot is not there, so add it
|
||||
dial_altimeterPressure = string.format(dial_altimeterPressure .. ".0")
|
||||
end
|
||||
|
||||
|
||||
ExportScript.Tools.SendData(2010, "Altimeter" .. "\n" .. altitude .. "ft")
|
||||
ExportScript.Tools.SendData(2011, "Pressure" .. "\n" ..dial_altimeterPressure .. " mbar")
|
||||
ExportScript.Tools.SendData(3004, "Altitude\n" .. altitude .. " ft" .. "\n" .. dial_altimeterPressure .. " mbar")--mbar == hpa. really!
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.BestPowerTiles(mainPanelDevice)
|
||||
ExportScript.Tools.SendData(3005, "Takeoff 5" .. "\n" .. "RPM 3000\nBoost 12\nAlt 305")
|
||||
ExportScript.Tools.SendData(3006, "Combat 5" .. "\n" .. "RPM 3000\nBoost 18\nAlt 5.5/16.2")
|
||||
ExportScript.Tools.SendData(3007, "Nominal 60" .. "\n" .. "RPM 2850\nBoost 12\nAlt 9/19")
|
||||
ExportScript.Tools.SendData(3008, "Cruse" .. "\n" .. "RPM 2650\nBoost 7\nAlt 12/20.7")
|
||||
end
|
||||
|
||||
function ExportScript.bestClimb(mainPanelDevice)
|
||||
|
||||
local dial_altimeter_tenThousands = math.floor(mainPanelDevice:get_argument_value(28) * 100000)--altitude
|
||||
local efficientAirspeed
|
||||
if dial_altimeter_tenThousands < 12000 then
|
||||
efficientAirspeed = 185
|
||||
elseif dial_altimeter_tenThousands < 15000 then
|
||||
efficientAirspeed = 180
|
||||
elseif dial_altimeter_tenThousands < 20000 then
|
||||
efficientAirspeed = 170
|
||||
elseif dial_altimeter_tenThousands < 25000 then
|
||||
efficientAirspeed = 160
|
||||
elseif dial_altimeter_tenThousands < 30000 then
|
||||
efficientAirspeed = 150
|
||||
elseif dial_altimeter_tenThousands < 33000 then
|
||||
efficientAirspeed = 140
|
||||
elseif dial_altimeter_tenThousands < 37000 then
|
||||
efficientAirspeed = 130
|
||||
elseif dial_altimeter_tenThousands < 40000 then
|
||||
efficientAirspeed = 120
|
||||
else
|
||||
efficientAirspeed = 110
|
||||
end
|
||||
ExportScript.Tools.SendData(3009, "Climb" .. "\n" .. "RPM 2650\nBoost 7\n" .. efficientAirspeed .. " mph")
|
||||
ExportScript.Tools.SendData(2012, "Efficient\nClimb\n" .. efficientAirspeed .. " mph")
|
||||
end
|
||||
|
||||
function ExportScript.gunnerTile(mainPanelDevice)
|
||||
local dial_gunnerWingspan = mainPanelDevice:get_argument_value(78)
|
||||
dial_gunnerWingspan = (-75.229 * dial_gunnerWingspan) + 100.51
|
||||
dial_gunnerWingspan = round(dial_gunnerWingspan,0)
|
||||
ExportScript.Tools.SendData(2013, "Gun\nWingspan\n" .. dial_gunnerWingspan .. " ft")
|
||||
|
||||
local dial_gunnerRange = mainPanelDevice:get_argument_value(77)
|
||||
dial_gunnerRange = (301.1 * dial_gunnerRange * dial_gunnerRange)
|
||||
+ (243.06 * dial_gunnerRange)
|
||||
+ (149.68)
|
||||
dial_gunnerRange = round(dial_gunnerRange,-1)
|
||||
ExportScript.Tools.SendData(2014, "Gun\nRange\n" .. dial_gunnerRange .. " ft")
|
||||
|
||||
--Wingspan in feet
|
||||
local v1_wingspanFt = 19
|
||||
local I16_wingspanFt = 30
|
||||
local BF109_wingspanFt = 32
|
||||
local Fw190_wingspanFt = 34
|
||||
local spitfire_wingspanFt = 32
|
||||
local P40P51_wingspanFt = 51
|
||||
local P47_wingspanFt = 41
|
||||
local mosquito_wingspanFt = 54
|
||||
local B17G_wingspanFt = 104
|
||||
|
||||
local optimalTargetWidthName
|
||||
|
||||
if dial_gunnerWingspan >= (v1_wingspanFt - 1) and dial_gunnerWingspan <= (v1_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "V1"
|
||||
elseif dial_gunnerWingspan >= (I16_wingspanFt - 1) and dial_gunnerWingspan <= (I16_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "I-16"
|
||||
elseif dial_gunnerWingspan >= (BF109_wingspanFt - 1) and dial_gunnerWingspan <= (BF109_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "BF109"
|
||||
elseif dial_gunnerWingspan >= (Fw190_wingspanFt - 1) and dial_gunnerWingspan <= (Fw190_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "Fw109"
|
||||
elseif dial_gunnerWingspan >= (spitfire_wingspanFt - 1) and dial_gunnerWingspan <= (spitfire_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "Spitfire"
|
||||
elseif dial_gunnerWingspan >= (P40P51_wingspanFt - 1) and dial_gunnerWingspan <= (P40P51_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "P-40/51"
|
||||
elseif dial_gunnerWingspan >= (P47_wingspanFt - 1) and dial_gunnerWingspan <= (P47_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "P-47"
|
||||
elseif dial_gunnerWingspan >= (mosquito_wingspanFt - 1) and dial_gunnerWingspan <= (mosquito_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "Mossie"
|
||||
elseif dial_gunnerWingspan >= (B17G_wingspanFt - 1) and dial_gunnerWingspan <= (B17G_wingspanFt + 1) then
|
||||
optimalTargetWidthName = "B-17G"
|
||||
else
|
||||
optimalTargetWidthName = "Tgt - N/A"
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendData(2015, "Optimal\nTarget\n" .. optimalTargetWidthName)
|
||||
|
||||
ExportScript.Tools.SendData(3010, "Gun Sight\nRng " .. dial_gunnerRange .. " ft\n" ..
|
||||
"Base " .. dial_gunnerWingspan .. " ft\n" ..
|
||||
"" .. optimalTargetWidthName)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function ExportScript.gearLamp(mainPanelDevice)
|
||||
--[49] = "%1d", -- Gear Lamp Down
|
||||
--[48] = "%1d", -- Gear Lamp Up
|
||||
|
||||
local gearLampDown = mainPanelDevice:get_argument_value(49)
|
||||
local gearLampUp = mainPanelDevice:get_argument_value(48)
|
||||
|
||||
local isgearLampDownLightOn
|
||||
local isgearLampUpLightOn
|
||||
|
||||
|
||||
if gearLampDown == 1 then
|
||||
isgearLampDownLightOn = 1
|
||||
else
|
||||
isgearLampDownLightOn = 0
|
||||
end
|
||||
|
||||
if gearLampUp == 1 then
|
||||
isgearLampUpLightOn = 1
|
||||
else
|
||||
isgearLampUpLightOn = 0
|
||||
end
|
||||
|
||||
|
||||
ExportScript.Tools.SendData(2016, isgearLampDownLightOn)
|
||||
ExportScript.Tools.SendData(2017, isgearLampUpLightOn)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
-----------------------
|
||||
-- General Functions --
|
||||
-----------------------
|
||||
|
||||
function round(num, numDecimalPlaces) --http://lua-users.org/wiki/SimpleRound
|
||||
local mult = 10^(numDecimalPlaces or 0)
|
||||
return math.floor(num * mult + 0.5) / mult
|
||||
end
|
||||
|
||||
function format_int(number) --https://stackoverflow.com/questions/10989788/format-integer-in-lua
|
||||
|
||||
local i, j, minus, int, fraction = tostring(number):find('([-]?)(%d+)([.]?%d*)')
|
||||
|
||||
-- reverse the int-string and append a comma to all blocks of 3 digits
|
||||
int = int:reverse():gsub("(%d%d%d)", "%1,")
|
||||
|
||||
-- reverse the int-string back remove an optional comma and put the
|
||||
-- optional minus and fractional part back
|
||||
return minus .. int:reverse():gsub("^,", "") .. fraction
|
||||
end
|
||||
269
Scripts/DCS-ExportScript/ExportsModules/SpitfireLFMkIXCW.lua
Normal file
269
Scripts/DCS-ExportScript/ExportsModules/SpitfireLFMkIXCW.lua
Normal file
@@ -0,0 +1,269 @@
|
||||
-- Spitfire LFMk IX CW
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SpitfireLFMkIXCW = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Flight Instruments
|
||||
[11] = "%.4f", -- OxygenDeliveryGauge {0.0, 0.4}{0.0, 4000.0}
|
||||
[12] = "%.4f", -- OxygenSupplyGauge
|
||||
[17] = "%.4f", -- TrimGauge {-1.0, 1.0}
|
||||
[18] = "%.4f", -- PneumaticPressureGauge {0.0, 1.0}{0.0, 600.0}
|
||||
[19] = "%.4f", -- Left wheel brake pressure gauge {0.0, 1.0}{0.0, 130.0}
|
||||
[20] = "%.4f", -- Right wheel brake pressure gauge {0.0, 1.0}{0.0, 130.0}
|
||||
[21] = "%.4f", -- Airspeed gauge {0.0, 0.5}{0.0, 500.0}
|
||||
[23] = "%.4f", -- Attitude Horizon Bank {-1.0, 1.0}
|
||||
[24] = "%.4f", -- Attitude Horizon Pitch {-1.0, 1.0}
|
||||
[25] = "%.4f", -- Variometer gauge {-1.0, 1.0}{-4000.0, 4000.0}
|
||||
[26] = "%.4f", -- Altimeter gauge Hundreds {0.0, 1.0}{0.0, 10.0}
|
||||
[27] = "%.4f", -- Altimeter gauge Thousands {0.0, 1.0}{0.0, 10.0}
|
||||
[28] = "%.4f", -- Altimeter gauge Tens Thousabds {0.0, 1.0}{0.0, 10.0}
|
||||
[29] = "%.4f", -- Altimeter gauge Pressure {0.0, 1.0}{800.0, 1050.0}
|
||||
[31] = "%.4f", -- DI gauge {0.0, 1.0}{0.0, 2.0 * 3.1415926}
|
||||
[33] = "%.4f", -- Sideslip gauge {-1.0, 1.0}
|
||||
[34] = "%.4f", -- Turn gauge {-1.0, 1.0}
|
||||
[35] = "%.4f", -- Voltmeter {0.0, 1.0}{0.0, 20.0}
|
||||
[37] = "%.4f", -- Tachometer {0.0, 0.5}{0.0, 5000.0}
|
||||
[39] = "%.4f", -- Boost gauge {0.0, 1.0}{-7.0, 24.0}
|
||||
[40] = "%.4f", -- Oil pressure gauge {0.0, 1.0}{0.0, 150.0}
|
||||
[41] = "%.4f", -- Oil temperature gauge {0.0, 1.0}{0.0, 100.0}
|
||||
[42] = "%.4f", -- Radiator temperature gauge {0.0, 0.7}{0.0, 140.0}
|
||||
[43] = "%.4f", -- Fuel contents gauge {0.0, 0.1, 1.0}{-1.0, 0.0, 37.0}
|
||||
[51] = "%.4f", -- Clock Hour
|
||||
[52] = "%.4f", -- Clock Minute
|
||||
[53] = "%.4f", -- Clock Second
|
||||
[71] = "%.4f", -- Magnetic compass CompassRoseRoll {-1.0, 1.0}{-20.0, 20.0}
|
||||
[72] = "%.4f", -- Magnetic compass CompassRosePitch {-1.0, 1.0}{-20.0, 20.0}
|
||||
[73] = "%.4f", -- Magnetic compass CompassHeading{0.0, 1.0}
|
||||
[120] = "%1d", -- Radio Lamp A
|
||||
[121] = "%1d", -- Radio Lamp B
|
||||
[122] = "%1d", -- Radio Lamp C
|
||||
[123] = "%1d", -- Radio Lamp D
|
||||
[124] = "%1d", -- Radio Lamp R
|
||||
--[131] = "%1d", -- UC_DOWN_C ???
|
||||
[49] = "%1d", -- Gear Lamp Down
|
||||
[48] = "%1d", -- Gear Lamp Up
|
||||
--[62] = "%.4f", -- ???
|
||||
--[63] = "%.4f", -- ???
|
||||
--[59] = "%.4f", -- ???
|
||||
--[45] = "%.4f" -- GUNSIGHT_RANGE ???
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
[13] = "%1d", -- Oxygen Apparatus Controls Valve
|
||||
-- Main Panel
|
||||
[30] = "%.1f", -- Altimeter (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[32] = "%.1f", -- DI (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[44] = "%1d", -- Fuel Gauge Button
|
||||
[46] = "%1d", -- Nav. Lights Toggle
|
||||
[47] = "%1d", -- Flaps Lever
|
||||
[50] = "%1d", -- U/C Indicator Blind
|
||||
[54] = "%1d", -- Clock Setter Pinion
|
||||
[55] = "%.1f", -- Clock Setter Pinion (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[56] = "%1d", -- Magnetos Toggles 1
|
||||
[57] = "%1d", -- Magnetos Toggles 2
|
||||
[58] = "%1d", -- Supercharger Mode Toggle
|
||||
[60] = "%.1f", -- Illumination Controls Left (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[61] = "%.1f", -- Illumination Controls Right (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[65] = "%1d", -- Starter Button
|
||||
[67] = "%1d", -- Booster Coil Button
|
||||
[69] = "%1d", -- Primer Pump
|
||||
[68] = "%.2f", -- Primer Pump (Axis) {0.0, 1.0} in 0.04 Steps
|
||||
[70] = "%1d", -- Tank Pressurizer Lever
|
||||
[74] = "%.4f", -- Magnetic Compass Ring (Axis) {0.0, 1.0} in 0.0333 Steps
|
||||
-- Gun Sight and Tertiary Weapons Controls
|
||||
[77] = "%.2f", -- Gun Sight Setter Rings Range (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[78] = "%.2f", -- Gun Sight Setter Rings Base (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[79] = "%1d", -- Gun Sight Tint Screen
|
||||
[80] = "%1d", -- Gun Sight Master Switch
|
||||
[81] = "%.1f", -- Gun Sight Dimmer (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Port Wall
|
||||
[145] = "%.2f", -- Elevator Trim Wheel (Axis) {-1.0, 1.0} in 0.01 Steps
|
||||
[146] = "%.1f", -- Rudder Trim Wheel (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
-- Radio Remote Channel Switcher
|
||||
[115] = "%1d", -- Off Button
|
||||
[116] = "%1d", -- A Button
|
||||
[117] = "%1d", -- B Button
|
||||
[118] = "%1d", -- C Button
|
||||
[119] = "%1d", -- D Button
|
||||
[125] = "%1d", -- Dimmer Toggle
|
||||
[155] = "%1d", -- Transmit Lock Toggle
|
||||
[156] = "%1d", -- Mode Selector
|
||||
-- Throttle Quadrant
|
||||
[126] = "%.1f", -- Throttle Lever (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
[128] = "%1d", -- Bomb Drop Button
|
||||
[129] = "%.1f", -- Airscrew Lever (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
[130] = "%1d", -- Mix Cut-Off Lever
|
||||
[131] = "%1d", -- U/C Indicator Cut-Off Toggle
|
||||
--
|
||||
[133] = "%1d", -- Radiator Control Toggle
|
||||
[134] = "%1d", -- Pitot Heater Toggle
|
||||
[135] = "%1d", -- Fuel Pump Toggle
|
||||
[137] = "%1d", -- Carb. Air Control Lever
|
||||
[158] = "%1d", -- Oil Diluter Button
|
||||
[160] = "%1d", -- Supercharger Mode Test Button
|
||||
[162] = "%1d", -- Radiator Flap Test Button
|
||||
-- Stbd. Wall
|
||||
[87] = "%1d", -- De-Icer Lever
|
||||
[88] = "%1d", -- U/C Emergency Release Lever
|
||||
[90] = "%1d", -- Wobble Type Fuel Pump
|
||||
-- Wobble Type Fuel Pump
|
||||
[92] = "%.1f", -- Upward Lamp Mode Selector {0.0,0.5,1.0}
|
||||
[93] = "%.1f", -- Downward Lamp Mode Selector {0.0,0.5,1.0}
|
||||
[94] = "%1d", -- Morse Key
|
||||
--
|
||||
[148] = "%1d", -- U/C Lever
|
||||
-- I.F.F. Control Box
|
||||
[106] = "%1d", -- I.F.F. Upper Toggle (Type B)
|
||||
[107] = "%1d", -- I.F.F. Lower Toggle (Type D)
|
||||
[109] = "%1d", -- I.F.F. Fore Button (0)
|
||||
[110] = "%1d", -- I.F.F. Aft Button (1)
|
||||
-- Fuel Cocks & Tertiary
|
||||
[100] = "%1d", -- Fuel Cock
|
||||
[98] = "%1d", -- Droptank Cock
|
||||
[99] = "%1d", -- Droptank Release Handle
|
||||
-- Canopy Controls
|
||||
[149] = "%1d", -- Cockpit Open/Close Control
|
||||
[140] = "%1d", -- Cockpit Jettison Pull Ball
|
||||
[147] = "%1d" -- Cockpit Side Door Open/Close Control
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
-- Cockpit Light
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {163, 62, 63})
|
||||
-- Gauges light, left panel light, right panel light
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
|
||||
-- VHF_Radio
|
||||
local lVHF_Radio = GetDevice(15)
|
||||
if lVHF_Radio:is_on() then
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", lVHF_Radio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy(lVHF_Radio:get_frequency()/1000000))
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2000", " ")
|
||||
end
|
||||
|
||||
--[[
|
||||
[115] = "%1d", -- Off Button
|
||||
[116] = "%1d", -- A Button
|
||||
[117] = "%1d", -- B Button
|
||||
[118] = "%1d", -- C Button
|
||||
[119] = "%1d", -- D Button]]
|
||||
local lVHF_Radio_PRESET = ""
|
||||
if mainPanelDevice:get_argument_value(116) > 0.8 then
|
||||
lVHF_Radio_PRESET = 1
|
||||
elseif mainPanelDevice:get_argument_value(117) > 0.8 then
|
||||
lVHF_Radio_PRESET = 2
|
||||
elseif mainPanelDevice:get_argument_value(118) > 0.8 then
|
||||
lVHF_Radio_PRESET = 3
|
||||
elseif mainPanelDevice:get_argument_value(119) > 0.8 then
|
||||
lVHF_Radio_PRESET = 4
|
||||
else
|
||||
lVHF_Radio_PRESET = ""
|
||||
end
|
||||
ExportScript.Tools.SendDataDAC("2001", lVHF_Radio_PRESET)
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
488
Scripts/DCS-ExportScript/ExportsModules/Su-25.lua
Normal file
488
Scripts/DCS-ExportScript/ExportsModules/Su-25.lua
Normal file
@@ -0,0 +1,488 @@
|
||||
-- Su-25A Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.Su25 = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / Su-25A --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-TAS Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1100hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer (AOA, GLoad)
|
||||
ExportScript.AF.FC_Russian_AOA_Su25()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_Old()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI_old()
|
||||
|
||||
-- Vertical Velocity Indicator (VVI, TurnIndicator, SlipBallPosition)
|
||||
ExportScript.AF.FC_Russian_VVI_Old()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft, 70)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight, 71)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
|
||||
-- HSI Distance
|
||||
ExportScript.AF.FC_Russian_HSI_Distance_old(lDistanceToWay)
|
||||
|
||||
-- Mach {max, Mach}
|
||||
local lMachTmp = 0
|
||||
if lMachNumber > 0.475 then
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 0.475 -- minimaler Eingangswert
|
||||
x_max = 1.0 -- maximaler Eingangswert
|
||||
x = 0.65 -- aktueller Eingangswert
|
||||
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 0.525 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 1.9047619047619047619047619047619 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = -0.9047619047619047619047619047619 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0,333333333333333333333333333334 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lMachTmp = 1.9047619047619047619047619047619 * lMachNumber + -0.9047619047619047619047619047619
|
||||
else
|
||||
lMachTmp = 0
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendData(72, string.format("%0.4f", 0.665))
|
||||
ExportScript.Tools.SendData(73, string.format("%0.4f", lMachTmp))
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU25(lFunctionTyp)
|
||||
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
end
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Mechanical Configuration Indicator (GearWarningLight, NoseGear, LeftGear, RightGear, Airbreaks, Flaps1, Flaps2)
|
||||
ExportScript.AF.FC_Russian_MDI_SU25(lFunctionTyp)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 87)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
end
|
||||
|
||||
--(x < 0 and 'negative' or 'non-negative')
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
--local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
--ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
ExportScript.AF.FC_WeaponPanel_SU25(lFunctionTyp)
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
ExportScript.AF.FC_Russian_MDI_SU25(lFunctionTyp)
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
|
||||
ExportScript.AF.StatusLamp()
|
||||
ExportScript.AF.SightingSystem()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.SightingSystem()
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
if lSightingSystemInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo)9
|
||||
--[[
|
||||
[PRF] = {
|
||||
[selection] = string: "ILV"
|
||||
[current] = string: "MED"
|
||||
}
|
||||
[laser_on] = boolean: "false"
|
||||
[scale] = {
|
||||
[azimuth] = number: "0.52359873056412"
|
||||
[distance] = number: "10000"
|
||||
}
|
||||
[radar_on] = boolean: "false"
|
||||
[optical_system_on] = boolean: "false"
|
||||
[LaunchAuthorized] = boolean: "false"
|
||||
[ECM_on] = boolean: "false"
|
||||
[Manufacturer] = string: "RUS"
|
||||
[TDC] = {
|
||||
[y] = number: "0"
|
||||
[x] = number: "0"
|
||||
}
|
||||
[ScanZone] = {
|
||||
[coverage_H] = {
|
||||
[min] = number: "0"
|
||||
[max] = number: "20000"
|
||||
}
|
||||
[size] = {
|
||||
[azimuth] = number: "1.0471974611282"
|
||||
[elevation] = number: "0.17453290522099"
|
||||
}
|
||||
[position] = {
|
||||
[exceeding_manual] = number: "0"
|
||||
[distance_manual] = number: "0"
|
||||
[azimuth] = number: "0"
|
||||
[elevation] = number: "0"
|
||||
}
|
||||
}
|
||||
]]
|
||||
ExportScript.Tools.SendDataDAC("600", lSightingSystemInfo.ECM_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("601", lSightingSystemInfo.laser_on == true and 1 or 0 )
|
||||
--ExportScript.Tools.SendDataDAC("602", lSightingSystemInfo.optical_system_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("603", lSightingSystemInfo.LaunchAuthorized == true and 1 or 0 )
|
||||
--ExportScript.Tools.SendDataDAC("604", lSightingSystemInfo.radar_on == true and 1 or 0 )
|
||||
end
|
||||
|
||||
function ExportScript.AF.FlareChaff()
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
if lSnares == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
--[chaff] = number: "128"
|
||||
--[flare] = number: "128"
|
||||
end
|
||||
|
||||
function ExportScript.AF.StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
--WriteToLog('lEngineInfo: '..dump(lEngineInfo))
|
||||
ExportScript.Tools.SendDataDAC("728", lEngineInfo.EngineStart.left ) -- lamp start left engine 1 (0|1)
|
||||
ExportScript.Tools.SendDataDAC("729", lEngineInfo.EngineStart.right ) -- lamp start right engine 1 (0|1)
|
||||
end
|
||||
|
||||
local lAoA = LoGetAngleOfAttack()
|
||||
if lAoA ~= nil then
|
||||
lAoA = lAoA * 57.3
|
||||
ExportScript.Tools.SendDataDAC("730", (lAoA > 20.0 and 1 or 0) ) -- lamp start AOA warning (0|1)
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FuelQuantityIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- Fuel quantity shows the fuel remaining in all tanks
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
--[[
|
||||
[fuel_external] = number: "0"
|
||||
[Temperature] = {
|
||||
[left] = number: "626.99444580078"
|
||||
[right] = number: "626.99444580078"
|
||||
}
|
||||
[RPM] = {
|
||||
[left] = number: "87.453765869141"
|
||||
[right] = number: "87.453758239746"
|
||||
}
|
||||
[FuelConsumption] = {
|
||||
[left] = number: "0.1500396137767"
|
||||
[right] = number: "0.1500396137767"
|
||||
}
|
||||
[fuel_internal] = number: "3773.2749023438"
|
||||
[EngineStart] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
[HydraulicPressure] = {
|
||||
[left] = number: "210"
|
||||
[right] = number: "210"
|
||||
}
|
||||
lPayloadInfo.Stations[8].CLSID == E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF -- ext 800l Fuel Tank
|
||||
]]
|
||||
|
||||
local lTotalFuel = lEngineInfo.fuel_internal
|
||||
local lFuel_leftbar = 1.0
|
||||
local lFuel_rightbar = 1.0
|
||||
local lExtTank1 = 1.0 -- external tanks
|
||||
local lExtTank2 = 1.0 -- inner tanks
|
||||
|
||||
if lTotalFuel < 5000 then
|
||||
if lTotalFuel > 1500 then
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 1500 -- minimaler Eingangswert
|
||||
x_max = 5000 -- maximaler Eingangswert
|
||||
x = 3500 -- aktueller Eingangswert
|
||||
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 3500 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 2.8571428571428571428571428571429e-4 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = -0.42857142857142857142857142857143 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0,57142857142857142857142857142857 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lFuel_leftbar = 2.8571428571428571428571428571429e-4 * lTotalFuel + -0.42857142857142857142857142857143
|
||||
else
|
||||
lFuel_leftbar = 0.0
|
||||
end
|
||||
else
|
||||
lFuel_leftbar = 1.0
|
||||
end
|
||||
if lTotalFuel < 1200 then
|
||||
lFuel_rightbar = lTotalFuel / 1200
|
||||
else
|
||||
lFuel_rightbar = 1.0
|
||||
end
|
||||
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
if lPayloadInfo ~= nil then
|
||||
--WriteToLog('lPayloadInfo: '..dump(lPayloadInfo))
|
||||
if lPayloadInfo.Stations[10].CLSID == "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}" or
|
||||
lPayloadInfo.Stations[9].CLSID == "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}" then -- external tanks presend and full (panel 6 and 5)
|
||||
lExtTank1 = ((lEngineInfo.fuel_external < 1240.0 ) and 1.0 or 0.0)
|
||||
end
|
||||
if lPayloadInfo.Stations[5].CLSID == "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}" or
|
||||
lPayloadInfo.Stations[6].CLSID == "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}" then-- inner tanks presend and full (panel 3 and 8)
|
||||
lExtTank2 = ((lEngineInfo.fuel_external < 1.0 ) and 1.0 or 0.0)
|
||||
end
|
||||
end
|
||||
-- Fuel_leftbar
|
||||
-- Fuel_rightbar
|
||||
-- Light1
|
||||
-- Light2
|
||||
-- Light3
|
||||
-- Light4
|
||||
-- Light5
|
||||
-- BingoLight
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
ExportScript.Tools.SendData(300, string.format("%0.4f", lFuel_leftbar))
|
||||
ExportScript.Tools.SendData(301, string.format("%0.4f", lFuel_rightbar))
|
||||
ExportScript.Tools.SendData(302, lExtTank1) -- external tanks
|
||||
ExportScript.Tools.SendData(303, lExtTank2) -- inner tanks
|
||||
ExportScript.Tools.SendData(304, (lEngineInfo.fuel_internal < 2790.0 and 1 or 0)) -- inner wing tank
|
||||
ExportScript.Tools.SendData(305, (lEngineInfo.fuel_internal < 1840.0 and 1 or 0)) -- inner hull tank
|
||||
ExportScript.Tools.SendData(306, (lEngineInfo.fuel_internal < 600.0 and 1 or 0)) -- Bingo Fuel
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC(300, string.format("%d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil") * 10)) -- total fuel in kg
|
||||
ExportScript.Tools.SendDataDAC(303, lExtTank1) -- external tanks
|
||||
ExportScript.Tools.SendDataDAC(304, lExtTank2) -- inner tanks
|
||||
ExportScript.Tools.SendDataDAC(305, (lEngineInfo.fuel_internal < 2790.0 and 1 or 0)) -- inner wing tank
|
||||
ExportScript.Tools.SendDataDAC(306, (lEngineInfo.fuel_internal < 1840.0 and 1 or 0)) -- inner hull tank
|
||||
ExportScript.Tools.SendDataDAC(307, (lEngineInfo.fuel_internal < 1.0 and 1 or 0)) -- central hull tank
|
||||
ExportScript.Tools.SendDataDAC(308, (lEngineInfo.fuel_internal < 600.0 and 1 or 0)) -- Bingo Fuel
|
||||
end
|
||||
end
|
||||
443
Scripts/DCS-ExportScript/ExportsModules/Su-25T.lua
Normal file
443
Scripts/DCS-ExportScript/ExportsModules/Su-25T.lua
Normal file
@@ -0,0 +1,443 @@
|
||||
-- Su-25T Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.Su25T = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / Su-25T --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ?C
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ?C
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-TAS Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1100hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer
|
||||
ExportScript.AF.FC_Russian_AOA_Su25()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_Old()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI(lDistanceToWay)
|
||||
|
||||
-- Vertical Velocity Indicator (VVI, TurnIndicator, SlipBallPosition)
|
||||
ExportScript.AF.FC_Russian_VVI_Old()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft, 70)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight, 71)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
-- Weapon Panel
|
||||
ExportScript.AF.FC_WeaponPanel_SU25(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Mechanical Configuration Indicator
|
||||
ExportScript.AF.FC_Russian_MDI_SU25(lFunctionTyp)
|
||||
|
||||
-- Fuel Quantity Indicator
|
||||
ExportScript.AF.FC_FuelQuantityIndicator(lFunctionTyp)
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
end
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 87)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
end
|
||||
|
||||
-- (x < 0 and 'negative' or 'non-negative')
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
-- local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
-- ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
-- Weapon Panel
|
||||
ExportScript.AF.FC_WeaponPanel_SU25(lFunctionTyp)
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
-- Mechanical Configuration Indicator
|
||||
ExportScript.AF.FC_Russian_MDI_SU25(lFunctionTyp)
|
||||
-- Fuel
|
||||
ExportScript.AF.FC_FuelQuantityIndicator(lFunctionTyp)
|
||||
|
||||
ExportScript.AF.FC_StatusLamp()
|
||||
ExportScript.AF.FC_SightingSystem()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.FC_SightingSystem()
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
if lSightingSystemInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo)9
|
||||
--[[
|
||||
[PRF] = {
|
||||
[selection] = string: "ILV"
|
||||
[current] = string: "MED"
|
||||
}
|
||||
[laser_on] = boolean: "false"
|
||||
[scale] = {
|
||||
[azimuth] = number: "0.52359873056412"
|
||||
[distance] = number: "10000"
|
||||
}
|
||||
[radar_on] = boolean: "false"
|
||||
[optical_system_on] = boolean: "false"
|
||||
[LaunchAuthorized] = boolean: "false"
|
||||
[ECM_on] = boolean: "false"
|
||||
[Manufacturer] = string: "RUS"
|
||||
[TDC] = {
|
||||
[y] = number: "0"
|
||||
[x] = number: "0"
|
||||
}
|
||||
[ScanZone] = {
|
||||
[coverage_H] = {
|
||||
[min] = number: "0"
|
||||
[max] = number: "20000"
|
||||
}
|
||||
[size] = {
|
||||
[azimuth] = number: "1.0471974611282"
|
||||
[elevation] = number: "0.17453290522099"
|
||||
}
|
||||
[position] = {
|
||||
[exceeding_manual] = number: "0"
|
||||
[distance_manual] = number: "0"
|
||||
[azimuth] = number: "0"
|
||||
[elevation] = number: "0"
|
||||
}
|
||||
}
|
||||
]]
|
||||
ExportScript.Tools.SendDataDAC("600", lSightingSystemInfo.ECM_on == true and 1 or 0 )
|
||||
--ExportScript.Tools.SendDataDAC("601", lSightingSystemInfo.laser_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("602", lSightingSystemInfo.optical_system_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("603", lSightingSystemInfo.LaunchAuthorized == true and 1 or 0 )
|
||||
--ExportScript.Tools.SendDataDAC("604", lSightingSystemInfo.radar_on == true and 1 or 0 )
|
||||
end
|
||||
|
||||
function ExportScript.AF.FC_FlareChaff()
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
if lSnares == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
--[chaff] = number: "128"
|
||||
--[flare] = number: "128"
|
||||
end
|
||||
|
||||
function ExportScript.AF.FC_StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
ExportScript.Tools.SendDataDAC("728", lEngineInfo.EngineStart.left ) -- lamp start left engine 1 (0|1)
|
||||
ExportScript.Tools.SendDataDAC("729", lEngineInfo.EngineStart.right ) -- lamp start right engine 1 (0|1)
|
||||
end
|
||||
|
||||
local lAoA = LoGetAngleOfAttack()
|
||||
if lAoA ~= nil then
|
||||
lAoA = lAoA * 57.3
|
||||
ExportScript.Tools.SendDataDAC("730", (lAoA > 20.0 and 1 or 0) ) -- lamp start AOA warning (0|1)
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FC_FuelQuantityIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- Fuel quantity shows the fuel remaining in all tanks
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
--[[
|
||||
[fuel_external] = number: "0"
|
||||
[Temperature] = {
|
||||
[left] = number: "626.99444580078"
|
||||
[right] = number: "626.99444580078"
|
||||
}
|
||||
[RPM] = {
|
||||
[left] = number: "87.453765869141"
|
||||
[right] = number: "87.453758239746"
|
||||
}
|
||||
[FuelConsumption] = {
|
||||
[left] = number: "0.1500396137767"
|
||||
[right] = number: "0.1500396137767"
|
||||
}
|
||||
[fuel_internal] = number: "3773.2749023438"
|
||||
[EngineStart] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
[HydraulicPressure] = {
|
||||
[left] = number: "210"
|
||||
[right] = number: "210"
|
||||
}
|
||||
lPayloadInfo.Stations[8].CLSID == E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF -- ext 800l Fuel Tank
|
||||
]]
|
||||
|
||||
local lTotalFuel = lEngineInfo.fuel_internal
|
||||
--local lTotalFuel = string.format("%3d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil") * 10)
|
||||
--local lTotalFuel = string.format("%4d", lEngineInfo.fuel_internal) -- total fuel in kg
|
||||
--local lTotalFuel = string.format("%4d", lEngineInfo.fuel_external) -- external fuel in kg
|
||||
local lFuelCounter = {[0] = 0.0, [1] = 0.11, [2] = 0.22, [3] = 0.33, [4] = 0.44, [5] = 0.55, [6] = 0.66, [7] = 0.77, [8] = 0.88, [9] = 0.99}
|
||||
lTotalFuel = string.format("%03d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil")) -- auf drei stellen bringen
|
||||
|
||||
local lExtTank1 = 1.0 -- external tanks
|
||||
local lExtTank2 = 1.0 -- inner tanks
|
||||
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
if lPayloadInfo ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
if lPayloadInfo.Stations[10].CLSID == "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}" or
|
||||
lPayloadInfo.Stations[9].CLSID == "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}" then -- external tanks presend and full (panel 6 and 5)
|
||||
lExtTank1 = ((lEngineInfo.fuel_external < 1240.0 ) and 1.0 or 0.0)
|
||||
end
|
||||
if lPayloadInfo.Stations[5].CLSID == "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}" or
|
||||
lPayloadInfo.Stations[6].CLSID == "{E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF}" then-- inner tanks presend and full (panel 3 and 8)
|
||||
lExtTank2 = ((lEngineInfo.fuel_external < 1.0 ) and 1.0 or 0.0)
|
||||
end
|
||||
end
|
||||
-- TotalFuel_100
|
||||
-- TotalFuel_10
|
||||
-- TotalFuel_1
|
||||
-- Light1
|
||||
-- Light2
|
||||
-- Light3
|
||||
-- Light4
|
||||
-- Light5
|
||||
-- BingoLight
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
ExportScript.Tools.SendData(300, string.format("%0.2f", lFuelCounter[tonumber(string.sub(lTotalFuel, 1, 1))]))
|
||||
ExportScript.Tools.SendData(301, string.format("%0.2f", lFuelCounter[tonumber(string.sub(lTotalFuel, 2, 2))]))
|
||||
ExportScript.Tools.SendData(302, string.format("%0.2f", lFuelCounter[tonumber(string.sub(lTotalFuel, 3, 3))]))
|
||||
ExportScript.Tools.SendData(303, lExtTank1) -- external tanks
|
||||
ExportScript.Tools.SendData(304, lExtTank2) -- inner tanks
|
||||
ExportScript.Tools.SendData(305, (lEngineInfo.fuel_internal < 2800.0 and 1 or 0)) -- inner wing tank
|
||||
ExportScript.Tools.SendData(306, (lEngineInfo.fuel_internal < 1840.0 and 1 or 0)) -- inner hull tank
|
||||
ExportScript.Tools.SendData(307, (lEngineInfo.fuel_internal < 1.0 and 1 or 0)) -- central hull tank
|
||||
ExportScript.Tools.SendData(308, (lEngineInfo.fuel_internal < 600.0 and 1 or 0)) -- Bingo Fuel
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("300", string.format("%d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil") * 10)) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("301", string.format("%d", lEngineInfo.fuel_internal)) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("302", string.format("%d", lEngineInfo.fuel_external)) -- external fuel in kg
|
||||
ExportScript.Tools.SendDataDAC(303, lExtTank1) -- external tanks
|
||||
ExportScript.Tools.SendDataDAC(304, lExtTank2) -- inner tanks
|
||||
ExportScript.Tools.SendDataDAC(305, (lEngineInfo.fuel_internal < 2800.0 and 1 or 0)) -- inner wing tank
|
||||
ExportScript.Tools.SendDataDAC(306, (lEngineInfo.fuel_internal < 1840.0 and 1 or 0)) -- inner hull tank
|
||||
ExportScript.Tools.SendDataDAC(307, (lEngineInfo.fuel_internal < 1.0 and 1 or 0)) -- central hull tank
|
||||
ExportScript.Tools.SendDataDAC(308, (lEngineInfo.fuel_internal < 600.0 and 1 or 0)) -- Bingo Fuel
|
||||
end
|
||||
end
|
||||
727
Scripts/DCS-ExportScript/ExportsModules/Su-27.lua
Normal file
727
Scripts/DCS-ExportScript/ExportsModules/Su-27.lua
Normal file
@@ -0,0 +1,727 @@
|
||||
-- Su-27 Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.Su27 = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / Su-27 --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-MACH Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1600hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer (AOA, GLoad)
|
||||
ExportScript.AF.FC_Russian_AOA_Su2733()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_Old()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI(lDistanceToWay)
|
||||
|
||||
-- Vertical Velocity Indicator (VVI)
|
||||
ExportScript.AF.FC_Russian_VVI_Old()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_20000()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, main scala, second scala, ExportID)
|
||||
ExportScript.AF.FC_TwoNeedlesGauge(lEngineTempLeft, 1200, 100, 70, 71)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, main scala, second scala, ExportID)
|
||||
ExportScript.AF.FC_TwoNeedlesGauge(lEngineTempRight, 1200, 100, 72, 73)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU27(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Fuel Quantity Indicator
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_SU2733(lFunctionTyp)
|
||||
|
||||
-- Mechanical Configuration Indicator
|
||||
ExportScript.AF.MechanicalDevicesIndicator(lFunctionTyp)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 87)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
|
||||
--ExportScript.Tools.WriteToLog('lMechInfo.noseflap.value: '..ExportScript.Tools.dump(lMechInfo.noseflap.value)) -- Vorfluegel, Balkenanzeige neben dem Radarhoehenmesser (0=oben bis 30=unten)
|
||||
end
|
||||
|
||||
-- Airintake
|
||||
ExportScript.AF.FC_Russian_AirIntake()
|
||||
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
--local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
--ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU27(lFunctionTyp)
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
ExportScript.AF.MechanicalDevicesIndicator(lFunctionTyp)
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
ExportScript.AF.FC_EngineLamps_SU2733(lFunctionTyp)
|
||||
ExportScript.AF.StatusLamp()
|
||||
ExportScript.AF.SightingSystem()
|
||||
ExportScript.AF.PPDSPPanel()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.SightingSystem()
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
if lSightingSystemInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo)9
|
||||
--[[
|
||||
[PRF] = {
|
||||
[selection] = string: "ILV"
|
||||
[current] = string: "MED"
|
||||
}
|
||||
[laser_on] = boolean: "false"
|
||||
[scale] = {
|
||||
[azimuth] = number: "0.52359873056412"
|
||||
[distance] = number: "10000"
|
||||
}
|
||||
[radar_on] = boolean: "false"
|
||||
[optical_system_on] = boolean: "false"
|
||||
[LaunchAuthorized] = boolean: "false"
|
||||
[ECM_on] = boolean: "false"
|
||||
[Manufacturer] = string: "RUS"
|
||||
[TDC] = {
|
||||
[y] = number: "0"
|
||||
[x] = number: "0"
|
||||
}
|
||||
[ScanZone] = {
|
||||
[coverage_H] = {
|
||||
[min] = number: "0"
|
||||
[max] = number: "20000"
|
||||
}
|
||||
[size] = {
|
||||
[azimuth] = number: "1.0471974611282"
|
||||
[elevation] = number: "0.17453290522099"
|
||||
}
|
||||
[position] = {
|
||||
[exceeding_manual] = number: "0"
|
||||
[distance_manual] = number: "0"
|
||||
[azimuth] = number: "0"
|
||||
[elevation] = number: "0"
|
||||
}
|
||||
}
|
||||
]]
|
||||
ExportScript.Tools.SendDataDAC("600", lSightingSystemInfo.ECM_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("601", lSightingSystemInfo.laser_on == true and 1 or 0 )
|
||||
--ExportScript.Tools.SendDataDAC("602", lSightingSystemInfo.optical_system_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("603", lSightingSystemInfo.LaunchAuthorized == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("604", lSightingSystemInfo.radar_on == true and 1 or 0 )
|
||||
end
|
||||
|
||||
function ExportScript.AF.PPDSPPanel()
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
if lSnares == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
--[chaff] = number: "96"
|
||||
--[flare] = number: "96"
|
||||
|
||||
local lChaffLED = ExportScript.Tools.round(lSnares.chaff / 12, 0, "ceil") + 1
|
||||
local lFlareLED = ExportScript.Tools.round(lSnares.flare / 12, 0, "ceil") + 1
|
||||
|
||||
ExportScript.Tools.SendDataDAC("800", (lChaffLED <= 1 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("801", (lChaffLED <= 2 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("802", (lChaffLED <= 3 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("803", (lChaffLED <= 4 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("804", (lChaffLED <= 5 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("805", (lChaffLED <= 6 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("806", (lChaffLED <= 7 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("807", (lChaffLED <= 8 and 0 or 1) )
|
||||
|
||||
ExportScript.Tools.SendDataDAC("810", (lFlareLED <= 1 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("811", (lFlareLED <= 2 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("812", (lFlareLED <= 3 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("813", (lFlareLED <= 4 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("814", (lFlareLED <= 5 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("815", (lFlareLED <= 6 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("816", (lFlareLED <= 7 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("817", (lFlareLED <= 8 and 0 or 1) )
|
||||
end
|
||||
|
||||
function ExportScript.AF.StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lAccelerationUnits = LoGetAccelerationUnits()
|
||||
if lAccelerationUnits ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lAccelerationUnits: '..ExportScript.Tools.dump(lAccelerationUnits))
|
||||
ExportScript.Tools.SendDataDAC("732", (lAccelerationUnits.y > 8.0 and 1 or 0) ) -- lamp Over-G warning
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FuelQuantityIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- Fuel quantity shows the fuel remaining in all tanks
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
--[[
|
||||
[fuel_external] = number: "0"
|
||||
[Temperature] = {
|
||||
[left] = number: "626.99444580078"
|
||||
[right] = number: "626.99444580078"
|
||||
}
|
||||
[RPM] = {
|
||||
[left] = number: "87.453765869141"
|
||||
[right] = number: "87.453758239746"
|
||||
}
|
||||
[FuelConsumption] = {
|
||||
[left] = number: "0.1500396137767"
|
||||
[right] = number: "0.1500396137767"
|
||||
}
|
||||
[fuel_internal] = number: "3773.2749023438"
|
||||
[EngineStart] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
[HydraulicPressure] = {
|
||||
[left] = number: "210"
|
||||
[right] = number: "210"
|
||||
}
|
||||
lPayloadInfo.Stations[8].CLSID == E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF -- ext 800l Fuel Tank
|
||||
]]
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("300", string.format("%d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil") * 10) ) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("301", string.format("%d", lEngineInfo.fuel_internal)) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("302", string.format("%d", lEngineInfo.fuel_external)) -- external fuel in kg
|
||||
|
||||
ExportScript.Tools.SendDataDAC("304", (lEngineInfo.fuel_internal < 5600.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendDataDAC("305", (lEngineInfo.fuel_internal < 4500.0 and 1 or 0) ) -- Tank warning 2
|
||||
ExportScript.Tools.SendDataDAC("306", (lEngineInfo.fuel_internal < 1500.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendDataDAC("307", (lEngineInfo.fuel_internal < 800.0 and 1 or 0) ) -- Tank warning 4
|
||||
ExportScript.Tools.SendDataDAC("308", (lEngineInfo.fuel_internal < 600.0 and 1 or 0) ) -- Bingo Fuel
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
local lTotalFuel_9_3 = 0
|
||||
local lTotalFuel_5_0 = 0
|
||||
local lTotalFuel = lEngineInfo.fuel_internal
|
||||
|
||||
if lTotalFuel < 9000 then
|
||||
if lTotalFuel > 3000 then
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 3000 -- minimaler Eingangswert
|
||||
x_max = 9000 -- maximaler Eingangswert
|
||||
x = 8000 -- aktueller Eingangswert
|
||||
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 6000 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 1.66666666666666666666666666667e-4 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = -0,5 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.83333 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lTotalFuel_9_3 = 1.6666666666666666666666666666667e-4 * lTotalFuel + -0.5
|
||||
else
|
||||
lTotalFuel_9_3 = 0.0
|
||||
end
|
||||
else
|
||||
lTotalFuel_9_3 = 1.0
|
||||
end
|
||||
if lTotalFuel < 5000 then
|
||||
lTotalFuel_5_0 = lTotalFuel / 5000
|
||||
else
|
||||
lTotalFuel_5_0 = 1.0
|
||||
end
|
||||
|
||||
-- TotalFuel_5_0
|
||||
-- TotalFuel_9_3
|
||||
-- Light1
|
||||
-- Light2
|
||||
-- Light3
|
||||
-- Light4
|
||||
-- BingoLight
|
||||
ExportScript.Tools.SendData(300, lTotalFuel_5_0)
|
||||
ExportScript.Tools.SendData(301, lTotalFuel_9_3)
|
||||
ExportScript.Tools.SendData(302, (lEngineInfo.fuel_internal < 5600.0 and 1 or 0)) -- Tank warning 1
|
||||
ExportScript.Tools.SendData(303, (lEngineInfo.fuel_internal < 4500.0 and 1 or 0)) -- Tank warning 2
|
||||
ExportScript.Tools.SendData(304, (lEngineInfo.fuel_internal < 1500.0 and 1 or 0)) -- Tank warning 3
|
||||
ExportScript.Tools.SendData(305, (lEngineInfo.fuel_internal < 800.0 and 1 or 0)) -- Tank warning 4
|
||||
ExportScript.Tools.SendData(306, (lEngineInfo.fuel_internal < 600.0 and 1 or 0)) -- Bingo Fuel
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.MechanicalDevicesIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- The mechanical devices indicator shows the position of the landing gear, flaps, leading edge flaps and airbrake
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
--ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
if lMechInfo == nil then
|
||||
return
|
||||
end
|
||||
--[[
|
||||
[hook] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[parachute] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[controlsurfaces] = {
|
||||
[eleron] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "-0.21084336936474"
|
||||
}
|
||||
[elevator] = {
|
||||
[left] = number: "-0"
|
||||
[right] = number: "-0"
|
||||
}
|
||||
[rudder] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
}
|
||||
[airintake] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[canopy] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[refuelingboom] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[wing] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[noseflap] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[gear] = {
|
||||
[value] = number: "0"
|
||||
[nose] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
[main] = {
|
||||
[left] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
[right] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
}
|
||||
[status] = number: "0"
|
||||
}
|
||||
[speedbrakes] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[wheelbrakes] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[flaps] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}]]
|
||||
--local lTrueAirSpeed = LoGetTrueAirSpeed()
|
||||
--ExportScript.Tools.WriteToLog('lTrueAirSpeed: '..ExportScript.Tools.dump(lTrueAirSpeed))
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("500", (((lMechInfo.gear.status == 1 and lMechInfo.gear.value < 1) or (lMechInfo.gear.status == 0 and lMechInfo.gear.value > 0)) and 1 or 0 ) ) -- gear warning light
|
||||
ExportScript.Tools.SendDataDAC("501", (lMechInfo.gear.value > 0.85 and 1 or 0) ) -- nose gear
|
||||
ExportScript.Tools.SendDataDAC("502", (lMechInfo.gear.value > 0.95 and 1 or 0) ) -- left gear
|
||||
ExportScript.Tools.SendDataDAC("503", (lMechInfo.gear.value > 0.97 and 1 or 0) ) -- right gear
|
||||
|
||||
ExportScript.Tools.SendDataDAC("510", (lMechInfo.speedbrakes.value > 0.1 and 1 or 0) ) -- speedbreakes on > 0.1 (0 - 1)
|
||||
|
||||
ExportScript.Tools.SendDataDAC("531", (lMechInfo.flaps.value > 0.93 and 1 or 0) ) -- flap
|
||||
ExportScript.Tools.SendDataDAC("532", ((lMechInfo.gear.value > 0.5 and lMechInfo.gear.nose.rod > 0.02) and 1 or 0) ) -- Intake FOD shields
|
||||
ExportScript.Tools.SendDataDAC("533", ((lMechInfo.gear.status == 0 and lMechInfo.flaps.value > 0.93) and 1 or 0) ) -- Flaps Warning, same light as gear warning light, but blinking light
|
||||
|
||||
ExportScript.Tools.SendDataDAC("541", (lMechInfo.parachute.value < 0.5 and 1 or 0) ) -- Parachute
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
local lWarningLight = 0.0
|
||||
|
||||
--lWarningLight = ((lMechInfo.flaps.value > 0.93 and lTrueAirSpeed > 340) and 0.5 or 0.0) -- Speed Warning for Flaps, same light as gear warning light, but blinking light
|
||||
lWarningLight = ((lMechInfo.gear.status == 0 and lMechInfo.flaps.value > 0.93) and 1.0 or lWarningLight ) -- Speed Warning for Flaps, same light as gear warning light, but blinking light
|
||||
lWarningLight = (((lMechInfo.gear.status == 1 and lMechInfo.gear.value < 1) or (lMechInfo.gear.status == 0 and lMechInfo.gear.value > 0)) and 1.0 or lWarningLight ) -- gear warning light
|
||||
|
||||
ExportScript.Tools.SendData(500, string.format("%.1f", lWarningLight))
|
||||
ExportScript.Tools.SendData(501, (lMechInfo.gear.value > 0.85 and 1 or 0)) -- nose gear
|
||||
ExportScript.Tools.SendData(502, (lMechInfo.gear.value > 0.95 and 1 or 0)) -- left gear
|
||||
ExportScript.Tools.SendData(503, (lMechInfo.gear.value == 1 and 1 or 0)) -- right gear
|
||||
ExportScript.Tools.SendData(510, (lMechInfo.speedbrakes.value > 0.1 and 1 or 0)) -- speedbreakes on > 0.1 (0 - 1)
|
||||
ExportScript.Tools.SendData(531, (lMechInfo.flaps.value > 0.93 and 1 or 0)) -- flap
|
||||
ExportScript.Tools.SendData(532, ((lMechInfo.gear.value > 0.5 and lMechInfo.gear.nose.rod > 0.02) and 1 or 0)) -- Intake FOD shields
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FC_WeaponPanel_SU27(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanelPresend == nil then
|
||||
ExportScript.AF.TmpWeaponPanelPresend = {[101] = 0, [102] = 0, [103] = 0, [104] = 0, [105] = 0, [106] = 0, [107] = 0, [108] = 0, [109] = 0, [110] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanelActive == nil then
|
||||
ExportScript.AF.TmpWeaponPanelActive = {[201] = 0, [202] = 0, [203] = 0, [204] = 0, [205] = 0, [206] = 0, [207] = 0, [208] = 0, [209] = 0, [210] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanel == nil then
|
||||
ExportScript.AF.TmpWeaponPanel = {[231] = 0, [232] = 0, [233] = 0, [234] = 0, [235] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.EventNumberFC_WeaponPanel == nil then
|
||||
ExportScript.AF.EventNumberFC_WeaponPanel = 0
|
||||
end
|
||||
|
||||
if(ExportScript.AF.EventNumberFC_WeaponPanel < ExportScript.AF.EventNumber) then
|
||||
ExportScript.AF.EventNumberFC_WeaponPanel = ExportScript.AF.EventNumber
|
||||
|
||||
-- defination
|
||||
ExportScript.AF.PayloadInfo = LoGetPayloadInfo()
|
||||
if ExportScript.AF.PayloadInfo ~= nil then
|
||||
if ExportScript.AF.CurrentStationTmp == nil then
|
||||
ExportScript.AF.CurrentStationTmp = -1
|
||||
end
|
||||
|
||||
if ExportScript.AF.PayloadInfo.CurrentStation > 0 and
|
||||
ExportScript.AF.CurrentStationTmp ~= ExportScript.AF.PayloadInfo.CurrentStation then
|
||||
ExportScript.AF.CurrentStationTmp = ExportScript.AF.PayloadInfo.CurrentStation
|
||||
|
||||
ExportScript.AF.TmpStationToPanel = {}
|
||||
ExportScript.AF.TmpStationToPanel[1] = {Panel = 1, StationID = 101, CurrentID = 201 } -- left
|
||||
ExportScript.AF.TmpStationToPanel[2] = {Panel = 10, StationID = 110, CurrentID = 210 } -- right
|
||||
ExportScript.AF.TmpStationToPanel[3] = {Panel = 2, StationID = 102, CurrentID = 202 }
|
||||
ExportScript.AF.TmpStationToPanel[4] = {Panel = 9, StationID = 109, CurrentID = 209 }
|
||||
ExportScript.AF.TmpStationToPanel[5] = {Panel = 3, StationID = 103, CurrentID = 203 }
|
||||
ExportScript.AF.TmpStationToPanel[6] = {Panel = 8, StationID = 108, CurrentID = 208 }
|
||||
ExportScript.AF.TmpStationToPanel[7] = {Panel = 4, StationID = 104, CurrentID = 204 }
|
||||
ExportScript.AF.TmpStationToPanel[8] = {Panel = 7, StationID = 107, CurrentID = 207 }
|
||||
ExportScript.AF.TmpStationToPanel[9] = {Panel = 5, StationID = 105, CurrentID = 205 }
|
||||
ExportScript.AF.TmpStationToPanel[10] = {Panel = 6, StationID = 106, CurrentID = 206 }
|
||||
|
||||
-- ExportScript.AF.TmpWeaponPanelActive reset
|
||||
for i = 201, 210, 1 do
|
||||
ExportScript.AF.TmpWeaponPanelActive[i] = 0
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpStationToPanel[ExportScript.AF.PayloadInfo.CurrentStation] ~= nil then
|
||||
ExportScript.AF.TmpWeaponPanelActive[ExportScript.AF.TmpStationToPanel[ExportScript.AF.PayloadInfo.CurrentStation].CurrentID] = 1 -- currrent value
|
||||
|
||||
table.foreach(ExportScript.AF.PayloadInfo.Stations, ExportScript.AF.WeaponStatusPanel_selectCurrentPayloadStation) -- corresponding station
|
||||
end
|
||||
end
|
||||
|
||||
local lWeaponType = 0.0 -- transversely striped
|
||||
if ExportScript.AF.PayloadInfo.CurrentStation > 0 then
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level1 == 4 then
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 4 then -- Weapon type Missle
|
||||
lWeaponType = 0.1 -- MSL
|
||||
elseif ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 7 then -- Weapon type NURS with Container
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level3 == 33 then -- Weapon type Rocket
|
||||
lWeaponType = 0.2 -- RCT
|
||||
end
|
||||
elseif ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 5 then -- Weapon type Bomb
|
||||
lWeaponType = 0.3 -- BB
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
Weapon Panel
|
||||
|
|
||||
---------------------------------------------------
|
||||
| | | | | | | | | | |
|
||||
1 2 3 4 5 C 6 7 8 9 10 -- display
|
||||
1 3 5 7 9 10 8 6 4 2 -- Paylod ID
|
||||
]]
|
||||
-- Payload Info
|
||||
-- weapon stations (panel) 1 (left) - 10 (right), no lamp for center station
|
||||
|
||||
-- WeaponPresend1 {0, 1}
|
||||
-- WeaponPresend2 {0, 1}
|
||||
-- WeaponPresend3 {0, 1}
|
||||
-- WeaponPresend4 {0, 1}
|
||||
-- WeaponPresend5 {0, 1}
|
||||
-- WeaponPresend6 {0, 1}
|
||||
-- WeaponPresend7 {0, 1}
|
||||
-- WeaponPresend8 {0, 1}
|
||||
-- WeaponPresend9 {0, 1}
|
||||
-- WeaponPresend10 {0, 1}
|
||||
-- WeaponActive1 {0, 1}
|
||||
-- WeaponActive2 {0, 1}
|
||||
-- WeaponActive3 {0, 1}
|
||||
-- WeaponActive4 {0, 1}
|
||||
-- WeaponActive5 {0, 1}
|
||||
-- WeaponActive6 {0, 1}
|
||||
-- WeaponActive7 {0, 1}
|
||||
-- WeaponActive8 {0, 1}
|
||||
-- WeaponActive9 {0, 1}
|
||||
-- WeaponActive10 {0, 1}
|
||||
|
||||
ExportScript.AF.TmpWeaponPanelPresend[101] = (ExportScript.AF.PayloadInfo.Stations[1].count > 0 and 1 or 0) -- weapon presend panel 1
|
||||
ExportScript.AF.TmpWeaponPanelPresend[102] = (ExportScript.AF.PayloadInfo.Stations[3].count > 0 and 1 or 0) -- weapon presend panel 2
|
||||
ExportScript.AF.TmpWeaponPanelPresend[103] = (ExportScript.AF.PayloadInfo.Stations[5].count > 0 and 1 or 0) -- weapon presend panel 3
|
||||
ExportScript.AF.TmpWeaponPanelPresend[104] = (ExportScript.AF.PayloadInfo.Stations[7].count > 0 and 1 or 0) -- weapon presend panel 4
|
||||
ExportScript.AF.TmpWeaponPanelPresend[105] = (ExportScript.AF.PayloadInfo.Stations[9].count > 0 and 1 or 0) -- weapon presend panel 5
|
||||
ExportScript.AF.TmpWeaponPanelPresend[106] = (ExportScript.AF.PayloadInfo.Stations[10].count > 0 and 1 or 0) -- weapon presend panel 6
|
||||
ExportScript.AF.TmpWeaponPanelPresend[107] = (ExportScript.AF.PayloadInfo.Stations[8].count > 0 and 1 or 0) -- weapon presend panel 7
|
||||
ExportScript.AF.TmpWeaponPanelPresend[108] = (ExportScript.AF.PayloadInfo.Stations[6].count > 0 and 1 or 0) -- weapon presend panel 8
|
||||
ExportScript.AF.TmpWeaponPanelPresend[109] = (ExportScript.AF.PayloadInfo.Stations[4].count > 0 and 1 or 0) -- weapon presend panel 9
|
||||
ExportScript.AF.TmpWeaponPanelPresend[110] = (ExportScript.AF.PayloadInfo.Stations[2].count > 0 and 1 or 0) -- weapon presend panel 10
|
||||
--ExportScript.AF.TmpWeaponPanelActive[201] -- weapon active panel 1
|
||||
--ExportScript.AF.TmpWeaponPanelActive[202] -- weapon active panel 2
|
||||
--ExportScript.AF.TmpWeaponPanelActive[203] -- weapon active panel 3
|
||||
--ExportScript.AF.TmpWeaponPanelActive[204] -- weapon active panel 4
|
||||
--ExportScript.AF.TmpWeaponPanelActive[205] -- weapon active panel 5
|
||||
--ExportScript.AF.TmpWeaponPanelActive[206] -- weapon active panel 6
|
||||
--ExportScript.AF.TmpWeaponPanelActive[207] -- weapon active panel 7
|
||||
--ExportScript.AF.TmpWeaponPanelActive[208] -- weapon active panel 8
|
||||
--ExportScript.AF.TmpWeaponPanelActive[209] -- weapon active panel 9
|
||||
--ExportScript.AF.TmpWeaponPanelActive[210] -- weapon active panel 10
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelPresend) do
|
||||
ExportScript.Tools.SendData(key, value)
|
||||
end
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelActive) do
|
||||
ExportScript.Tools.SendData(key, value)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelPresend) do
|
||||
ExportScript.Tools.SendDataDAC(key, value)
|
||||
end
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelActive) do
|
||||
ExportScript.Tools.SendDataDAC(key, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
720
Scripts/DCS-ExportScript/ExportsModules/Su-33.lua
Normal file
720
Scripts/DCS-ExportScript/ExportsModules/Su-33.lua
Normal file
@@ -0,0 +1,720 @@
|
||||
-- Su-33 Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.Su33 = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / Su-33 --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-MACH Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1600hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer
|
||||
ExportScript.AF.FC_Russian_AOA_Su2733()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_New()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI(lDistanceToWay)
|
||||
|
||||
-- Vertical Velocity Indicator (VVI)
|
||||
ExportScript.AF.FC_Russian_VVI_New()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_late()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, main scala, second scala, ExportID)
|
||||
ExportScript.AF.FC_TwoNeedlesGauge(lEngineTempLeft, 1200, 100, 70, 71)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, main scala, second scala, ExportID)
|
||||
ExportScript.AF.FC_TwoNeedlesGauge(lEngineTempRight, 1200, 100, 72, 73)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU33(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Fuel Quantity Indicator
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
|
||||
ExportScript.AF.MechanicalDevicesIndicator(lFunctionTyp)
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 300, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 300, 86)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_SU2733(lFunctionTyp)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 300, 87)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 300, 88)
|
||||
|
||||
--ExportScript.Tools.WriteToLog('lMechInfo.noseflap.value: '..ExportScript.Tools.dump(lMechInfo.noseflap.value)) -- Vorfluegel, Balkenanzeige neben dem Radarhoehenmesser (0=oben bis 30=unten)
|
||||
end
|
||||
|
||||
-- Airintake
|
||||
ExportScript.AF.FC_Russian_AirIntake(20)
|
||||
|
||||
-- (x < 0 and 'negative' or 'non-negative')
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
-- local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
-- ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU33(lFunctionTyp)
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
ExportScript.AF.MechanicalDevicesIndicator(lFunctionTyp)
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
ExportScript.AF.FC_EngineLamps_SU2733(lFunctionTyp)
|
||||
ExportScript.AF.StatusLamp()
|
||||
ExportScript.AF.SightingSystem()
|
||||
ExportScript.AF.PPDSPPanel()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.SightingSystem()
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
if lSightingSystemInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo)9
|
||||
--[[
|
||||
[PRF] = {
|
||||
[selection] = string: "ILV"
|
||||
[current] = string: "MED"
|
||||
}
|
||||
[laser_on] = boolean: "false"
|
||||
[scale] = {
|
||||
[azimuth] = number: "0.52359873056412"
|
||||
[distance] = number: "10000"
|
||||
}
|
||||
[radar_on] = boolean: "false"
|
||||
[optical_system_on] = boolean: "false"
|
||||
[LaunchAuthorized] = boolean: "false"
|
||||
[ECM_on] = boolean: "false"
|
||||
[Manufacturer] = string: "RUS"
|
||||
[TDC] = {
|
||||
[y] = number: "0"
|
||||
[x] = number: "0"
|
||||
}
|
||||
[ScanZone] = {
|
||||
[coverage_H] = {
|
||||
[min] = number: "0"
|
||||
[max] = number: "20000"
|
||||
}
|
||||
[size] = {
|
||||
[azimuth] = number: "1.0471974611282"
|
||||
[elevation] = number: "0.17453290522099"
|
||||
}
|
||||
[position] = {
|
||||
[exceeding_manual] = number: "0"
|
||||
[distance_manual] = number: "0"
|
||||
[azimuth] = number: "0"
|
||||
[elevation] = number: "0"
|
||||
}
|
||||
}
|
||||
]]
|
||||
ExportScript.Tools.SendDataDAC("600", lSightingSystemInfo.ECM_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("601", lSightingSystemInfo.laser_on == true and 1 or 0 )
|
||||
--ExportScript.Tools.SendDataDAC("602", lSightingSystemInfo.optical_system_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("603", lSightingSystemInfo.LaunchAuthorized == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("604", lSightingSystemInfo.radar_on == true and 1 or 0 )
|
||||
end
|
||||
|
||||
function ExportScript.AF.PPDSPPanel()
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
if lSnares == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
--[chaff] = number: "48"
|
||||
--[flare] = number: "48"
|
||||
|
||||
local lChaffLED = ExportScript.Tools.round(lSnares.chaff / 6, 0, "ceil") + 1
|
||||
local lFlareLED = ExportScript.Tools.round(lSnares.flare / 6, 0, "ceil") + 1
|
||||
|
||||
ExportScript.Tools.SendDataDAC("800", (lChaffLED <= 1 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("801", (lChaffLED <= 2 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("802", (lChaffLED <= 3 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("803", (lChaffLED <= 4 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("804", (lChaffLED <= 5 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("805", (lChaffLED <= 6 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("806", (lChaffLED <= 7 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("807", (lChaffLED <= 8 and 0 or 1) )
|
||||
|
||||
ExportScript.Tools.SendDataDAC("810", (lFlareLED <= 1 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("811", (lFlareLED <= 2 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("812", (lFlareLED <= 3 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("813", (lFlareLED <= 4 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("814", (lFlareLED <= 5 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("815", (lFlareLED <= 6 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("816", (lFlareLED <= 7 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("817", (lFlareLED <= 8 and 0 or 1) )
|
||||
end
|
||||
|
||||
function ExportScript.AF.StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lAccelerationUnits = LoGetAccelerationUnits()
|
||||
if lAccelerationUnits ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lAccelerationUnits: '..ExportScript.Tools.dump(lAccelerationUnits))
|
||||
ExportScript.Tools.SendDataDAC("732", (lAccelerationUnits.y > 8.0 and 1 or 0) ) -- lamp Over-G warning
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FuelQuantityIndicator(FunctionTyp)
|
||||
-- Fuel quantity shows the fuel remaining in all tanks
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
--[[
|
||||
[fuel_external] = number: "0"
|
||||
[Temperature] = {
|
||||
[left] = number: "626.99444580078"
|
||||
[right] = number: "626.99444580078"
|
||||
}
|
||||
[RPM] = {
|
||||
[left] = number: "87.453765869141"
|
||||
[right] = number: "87.453758239746"
|
||||
}
|
||||
[FuelConsumption] = {
|
||||
[left] = number: "0.1500396137767"
|
||||
[right] = number: "0.1500396137767"
|
||||
}
|
||||
[fuel_internal] = number: "3773.2749023438"
|
||||
[EngineStart] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
[HydraulicPressure] = {
|
||||
[left] = number: "210"
|
||||
[right] = number: "210"
|
||||
}
|
||||
lPayloadInfo.Stations[8].CLSID == E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF -- ext 800l Fuel Tank
|
||||
]]
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
lTotalFuel = lEngineInfo.fuel_internal
|
||||
--ExportScript.Tools.WriteToLog('lTotalFuel: '..ExportScript.Tools.dump(lTotalFuel))
|
||||
--lTotalFuel = string.format("%3d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil") * 10)
|
||||
--lTotalFuel = string.format("%4d", lEngineInfo.fuel_internal) -- total fuel in kg
|
||||
--lTotalFuel = string.format("%4d", lEngineInfo.fuel_external) -- external fuel in kg
|
||||
local lTotalFuel_12_0 = 1.0
|
||||
|
||||
if lTotalFuel < 12000 then
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 0 -- minimaler Eingangswert
|
||||
x_max = 12000 -- maximaler Eingangswert
|
||||
x = 8000 -- aktueller Eingangswert
|
||||
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 12000 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 8.3333333333333333333333333333333e-5 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = 4.e-33 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.66666666666666666666666666666667 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lTotalFuel_12_0 = 8.3333333333333333333333333333333e-5 * lTotalFuel + 4.e-33
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendData("301", string.format("%.4f", lTotalFuel_12_0) )
|
||||
ExportScript.Tools.SendData("304", (lEngineInfo.fuel_internal < 6900.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendData("305", (lEngineInfo.fuel_internal < 5400.0 and 1 or 0) ) -- Tank warning 2
|
||||
ExportScript.Tools.SendData("306", (lEngineInfo.fuel_internal < 4700.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendData("307", (lEngineInfo.fuel_internal < 1500.0 and 1 or 0) ) -- Tank warning 4
|
||||
ExportScript.Tools.SendData("308", (lEngineInfo.fuel_internal < 600.0 and 1 or 0) ) -- Bingo Fuel
|
||||
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.fuel_internal, 10000, 302) -- Standby Fuel Indicator
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("300", string.format("%d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil") * 10) ) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("301", string.format("%d", lEngineInfo.fuel_internal) ) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("302", string.format("%d", lEngineInfo.fuel_external) ) -- external fuel in kg
|
||||
|
||||
ExportScript.Tools.SendDataDAC("304", (lEngineInfo.fuel_internal < 6900.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendDataDAC("305", (lEngineInfo.fuel_internal < 5400.0 and 1 or 0) ) -- Tank warning 2
|
||||
ExportScript.Tools.SendDataDAC("306", (lEngineInfo.fuel_internal < 4700.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendDataDAC("307", (lEngineInfo.fuel_internal < 1500.0 and 1 or 0) ) -- Tank warning 4
|
||||
ExportScript.Tools.SendDataDAC("308", (lEngineInfo.fuel_internal < 600.0 and 1 or 0) ) -- Bingo Fuel
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.MechanicalDevicesIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- The mechanical devices indicator shows the position of the landing gear, flaps, leading edge flaps and airbrake
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
--ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
if lMechInfo == nil then
|
||||
return
|
||||
end
|
||||
--[[
|
||||
[hook] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[parachute] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[controlsurfaces] = {
|
||||
[eleron] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "-0.21084336936474"
|
||||
}
|
||||
[elevator] = {
|
||||
[left] = number: "-0"
|
||||
[right] = number: "-0"
|
||||
}
|
||||
[rudder] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
}
|
||||
[airintake] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[canopy] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[refuelingboom] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[wing] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[noseflap] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[gear] = {
|
||||
[value] = number: "0"
|
||||
[nose] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
[main] = {
|
||||
[left] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
[right] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
}
|
||||
[status] = number: "0"
|
||||
}
|
||||
[speedbrakes] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[wheelbrakes] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[flaps] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}]]
|
||||
--local lTrueAirSpeed = LoGetTrueAirSpeed()
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("500", (((lMechInfo.gear.status == 1 and lMechInfo.gear.value < 1) or (lMechInfo.gear.status == 0 and lMechInfo.gear.value > 0)) and 1 or 0 ) ) -- gear warning light
|
||||
ExportScript.Tools.SendDataDAC("501", (lMechInfo.gear.value > 0.85 and 1 or 0) ) -- nose gear
|
||||
ExportScript.Tools.SendDataDAC("502", (lMechInfo.gear.value > 0.95 and 1 or 0) ) -- left gear
|
||||
ExportScript.Tools.SendDataDAC("503", (lMechInfo.gear.value > 0.97 and 1 or 0) ) -- right gear
|
||||
|
||||
ExportScript.Tools.SendDataDAC("510", (lMechInfo.speedbrakes.value > 0.1 and 1 or 0) ) -- speedbreakes on > 0.1 (0 - 1)
|
||||
|
||||
ExportScript.Tools.SendDataDAC("531", (lMechInfo.flaps.value > 0.93 and 1 or 0) ) -- flap
|
||||
ExportScript.Tools.SendDataDAC("532", ((lMechInfo.gear.value > 0.5 and lMechInfo.gear.nose.rod > 0.02) and 1 or 0) ) -- Intake FOD shields
|
||||
ExportScript.Tools.SendDataDAC("533", ((lMechInfo.gear.status == 0 and lMechInfo.flaps.status > 0) and 1 or 0) ) -- Flaps Warning, same light as gear warning light, but blinking light
|
||||
|
||||
ExportScript.Tools.SendDataDAC("541", (lMechInfo.hook.value > 0.8 and 1 or 0) ) -- Hook
|
||||
ExportScript.Tools.SendDataDAC("551", (lMechInfo.noseflap.value > 20.0 and 1 or 0) )
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
local lWarningLight = 0.0
|
||||
|
||||
--lWarningLight = ((lMechInfo.flaps.value > 0.93 and lTrueAirSpeed > 340) and 1.0 or 0.0) -- Speed Warning for Flaps, same light as gear warning light, but blinking light
|
||||
lWarningLight = ((lMechInfo.gear.status == 0 and lMechInfo.flaps.status > 0) and 1.0 or lWarningLight ) -- Flaps Warning, same light as gear warning light, but blinking light
|
||||
lWarningLight = (((lMechInfo.gear.status == 1 and lMechInfo.gear.value < 1) or (lMechInfo.gear.status == 0 and lMechInfo.gear.value > 0)) and 1.0 or lWarningLight ) -- gear warning light
|
||||
|
||||
ExportScript.Tools.SendData(500, string.format("%.1f", lWarningLight))
|
||||
ExportScript.Tools.SendData(501, (lMechInfo.gear.value > 0.85 and 1 or 0)) -- nose gear
|
||||
ExportScript.Tools.SendData(502, (lMechInfo.gear.value > 0.95 and 1 or 0)) -- left gear
|
||||
ExportScript.Tools.SendData(503, (lMechInfo.gear.value == 1 and 1 or 0)) -- right gear
|
||||
ExportScript.Tools.SendData(510, (lMechInfo.speedbrakes.value > 0.1 and 1 or 0)) -- speedbreakes on > 0.1 (0 - 1)
|
||||
ExportScript.Tools.SendData(531, (lMechInfo.flaps.value > 0.93 and 1 or 0)) -- flap
|
||||
ExportScript.Tools.SendData(532, ((lMechInfo.gear.value > 0.5 and lMechInfo.gear.nose.rod > 0.02) and 1 or 0)) -- Intake FOD shields
|
||||
ExportScript.Tools.SendData(541, (lMechInfo.hook.value > 0.8 and 1 or 0)) -- Hook
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FC_WeaponPanel_SU33(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanelPresend == nil then
|
||||
ExportScript.AF.TmpWeaponPanelPresend = {[101] = 0, [102] = 0, [103] = 0, [104] = 0, [105] = 0, [106] = 0, [107] = 0, [108] = 0, [109] = 0, [110] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanelActive == nil then
|
||||
ExportScript.AF.TmpWeaponPanelActive = {[201] = 0, [202] = 0, [203] = 0, [204] = 0, [205] = 0, [206] = 0, [207] = 0, [208] = 0, [209] = 0, [210] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanel == nil then
|
||||
ExportScript.AF.TmpWeaponPanel = {[231] = 0, [232] = 0, [233] = 0, [234] = 0, [235] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.EventNumberFC_WeaponPanel == nil then
|
||||
ExportScript.AF.EventNumberFC_WeaponPanel = 0
|
||||
end
|
||||
|
||||
if(ExportScript.AF.EventNumberFC_WeaponPanel < ExportScript.AF.EventNumber) then
|
||||
ExportScript.AF.EventNumberFC_WeaponPanel = ExportScript.AF.EventNumber
|
||||
|
||||
-- defination
|
||||
ExportScript.AF.PayloadInfo = LoGetPayloadInfo()
|
||||
if ExportScript.AF.PayloadInfo ~= nil then
|
||||
if ExportScript.AF.CurrentStationTmp == nil then
|
||||
ExportScript.AF.CurrentStationTmp = -1
|
||||
end
|
||||
|
||||
if ExportScript.AF.PayloadInfo.CurrentStation > 0 and
|
||||
ExportScript.AF.CurrentStationTmp ~= ExportScript.AF.PayloadInfo.CurrentStation then
|
||||
ExportScript.AF.CurrentStationTmp = ExportScript.AF.PayloadInfo.CurrentStation
|
||||
|
||||
ExportScript.AF.TmpStationToPanel = {}
|
||||
--ExportScript.AF.TmpStationToPanel[1] = {Panel = 1, StationID = 101, CurrentID = 201 } -- L
|
||||
--ExportScript.AF.TmpStationToPanel[2] = {Panel = 10, StationID = 110, CurrentID = 210 } -- L
|
||||
ExportScript.AF.TmpStationToPanel[3] = {Panel = 10, StationID = 110, CurrentID = 210 }
|
||||
ExportScript.AF.TmpStationToPanel[4] = {Panel = 1, StationID = 101, CurrentID = 201 }
|
||||
ExportScript.AF.TmpStationToPanel[5] = {Panel = 2, StationID = 102, CurrentID = 202 }
|
||||
ExportScript.AF.TmpStationToPanel[6] = {Panel = 9, StationID = 109, CurrentID = 209 }
|
||||
ExportScript.AF.TmpStationToPanel[7] = {Panel = 3, StationID = 103, CurrentID = 203 }
|
||||
ExportScript.AF.TmpStationToPanel[8] = {Panel = 8, StationID = 108, CurrentID = 208 }
|
||||
ExportScript.AF.TmpStationToPanel[9] = {Panel = 4, StationID = 104, CurrentID = 204 }
|
||||
ExportScript.AF.TmpStationToPanel[10] = {Panel = 7, StationID = 107, CurrentID = 207 }
|
||||
ExportScript.AF.TmpStationToPanel[11] = {Panel = 6, StationID = 106, CurrentID = 206 }
|
||||
ExportScript.AF.TmpStationToPanel[12] = {Panel = 5, StationID = 105, CurrentID = 205 }
|
||||
|
||||
-- ExportScript.AF.TmpWeaponPanelActive reset
|
||||
for i = 201, 210, 1 do
|
||||
ExportScript.AF.TmpWeaponPanelActive[i] = 0
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpStationToPanel[ExportScript.AF.PayloadInfo.CurrentStation] ~= nil then
|
||||
ExportScript.AF.TmpWeaponPanelActive[ExportScript.AF.TmpStationToPanel[ExportScript.AF.PayloadInfo.CurrentStation].CurrentID] = 1 -- currrent value
|
||||
|
||||
table.foreach(ExportScript.AF.PayloadInfo.Stations, ExportScript.AF.WeaponStatusPanel_selectCurrentPayloadStation) -- corresponding station
|
||||
end
|
||||
end
|
||||
|
||||
local lWeaponType = 0.0 -- transversely striped
|
||||
if ExportScript.AF.PayloadInfo.CurrentStation > 0 then
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level1 == 4 then
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 4 then -- Weapon type Missle
|
||||
lWeaponType = 0.1 -- MSL
|
||||
elseif ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 7 then -- Weapon type NURS with Container
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level3 == 33 then -- Weapon type Rocket
|
||||
lWeaponType = 0.2 -- RCT
|
||||
end
|
||||
elseif ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 5 then -- Weapon type Bomb
|
||||
lWeaponType = 0.3 -- BB
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
Weapon Panel (Numper = Station number)
|
||||
|
|
||||
-------------------------------------------------------
|
||||
| | | | | | | | | | | |
|
||||
L 1 2 3 4 5 6 7 8 9 10 R -- Panel ID
|
||||
1 4 5 7 9 12 11 10 8 6 3 2 -- gES_PayloadInfo.Station.ID
|
||||
]]
|
||||
-- Payload Info
|
||||
-- weapon stations L and R not on Panel
|
||||
-- weapon station 1 (left) to 10 (right), 5 and 6 center station
|
||||
|
||||
-- WeaponPresend1 {0, 1}
|
||||
-- WeaponPresend2 {0, 1}
|
||||
-- WeaponPresend3 {0, 1}
|
||||
-- WeaponPresend4 {0, 1}
|
||||
-- WeaponPresend5 {0, 1}
|
||||
-- WeaponPresend6 {0, 1}
|
||||
-- WeaponPresend7 {0, 1}
|
||||
-- WeaponPresend8 {0, 1}
|
||||
-- WeaponPresend9 {0, 1}
|
||||
-- WeaponPresend10 {0, 1}
|
||||
-- WeaponActive1 {0, 1}
|
||||
-- WeaponActive2 {0, 1}
|
||||
-- WeaponActive3 {0, 1}
|
||||
-- WeaponActive4 {0, 1}
|
||||
-- WeaponActive5 {0, 1}
|
||||
-- WeaponActive6 {0, 1}
|
||||
-- WeaponActive7 {0, 1}
|
||||
-- WeaponActive8 {0, 1}
|
||||
-- WeaponActive9 {0, 1}
|
||||
-- WeaponActive10 {0, 1}
|
||||
|
||||
--ExportScript.AF.TmpWeaponPanelPresend[] = (ExportScript.AF.PayloadInfo.Stations[1].count > 0 and 1 or 0) -- L
|
||||
--ExportScript.AF.TmpWeaponPanelPresend[] = (ExportScript.AF.PayloadInfo.Stations[2].count > 0 and 1 or 0) -- R
|
||||
ExportScript.AF.TmpWeaponPanelPresend[110] = (ExportScript.AF.PayloadInfo.Stations[3].count > 0 and 1 or 0) -- weapon presend panel 1
|
||||
ExportScript.AF.TmpWeaponPanelPresend[101] = (ExportScript.AF.PayloadInfo.Stations[4].count > 0 and 1 or 0) -- weapon presend panel 10
|
||||
ExportScript.AF.TmpWeaponPanelPresend[102] = (ExportScript.AF.PayloadInfo.Stations[5].count > 0 and 1 or 0) -- weapon presend panel 2
|
||||
ExportScript.AF.TmpWeaponPanelPresend[109] = (ExportScript.AF.PayloadInfo.Stations[6].count > 0 and 1 or 0) -- weapon presend panel 9
|
||||
ExportScript.AF.TmpWeaponPanelPresend[103] = (ExportScript.AF.PayloadInfo.Stations[7].count > 0 and 1 or 0) -- weapon presend panel 3
|
||||
ExportScript.AF.TmpWeaponPanelPresend[108] = (ExportScript.AF.PayloadInfo.Stations[8].count > 0 and 1 or 0) -- weapon presend panel 8
|
||||
ExportScript.AF.TmpWeaponPanelPresend[104] = (ExportScript.AF.PayloadInfo.Stations[9].count > 0 and 1 or 0) -- weapon presend panel 4
|
||||
ExportScript.AF.TmpWeaponPanelPresend[107] = (ExportScript.AF.PayloadInfo.Stations[10].count > 0 and 1 or 0) -- weapon presend panel 7
|
||||
ExportScript.AF.TmpWeaponPanelPresend[106] = (ExportScript.AF.PayloadInfo.Stations[11].count > 0 and 1 or 0) -- weapon presend panel 5
|
||||
ExportScript.AF.TmpWeaponPanelPresend[105] = (ExportScript.AF.PayloadInfo.Stations[12].count > 0 and 1 or 0) -- weapon presend panel 6
|
||||
--ExportScript.AF.TmpWeaponPanelActive[201] -- weapon active panel 1
|
||||
--ExportScript.AF.TmpWeaponPanelActive[202] -- weapon active panel 2
|
||||
--ExportScript.AF.TmpWeaponPanelActive[203] -- weapon active panel 3
|
||||
--ExportScript.AF.TmpWeaponPanelActive[204] -- weapon active panel 4
|
||||
--ExportScript.AF.TmpWeaponPanelActive[205] -- weapon active panel 5
|
||||
--ExportScript.AF.TmpWeaponPanelActive[206] -- weapon active panel 6
|
||||
--ExportScript.AF.TmpWeaponPanelActive[207] -- weapon active panel 7
|
||||
--ExportScript.AF.TmpWeaponPanelActive[208] -- weapon active panel 8
|
||||
--ExportScript.AF.TmpWeaponPanelActive[209] -- weapon active panel 9
|
||||
--ExportScript.AF.TmpWeaponPanelActive[210] -- weapon active panel 10
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelPresend) do
|
||||
ExportScript.Tools.SendData(key, value)
|
||||
end
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelActive) do
|
||||
ExportScript.Tools.SendData(key, value)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelPresend) do
|
||||
ExportScript.Tools.SendDataDAC(key, value)
|
||||
end
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelActive) do
|
||||
ExportScript.Tools.SendDataDAC(key, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
310
Scripts/DCS-ExportScript/ExportsModules/TF-51D.lua
Normal file
310
Scripts/DCS-ExportScript/ExportsModules/TF-51D.lua
Normal file
@@ -0,0 +1,310 @@
|
||||
-- TF-51D Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.TF51D = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Flight Instruments
|
||||
[11] = "%.4f", -- AirspeedNeedle {0,50,100,150,200,250,300,350,400,450,500,550,600,650,700} {0.0,0.05,0.10,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7}
|
||||
[29] = "%.4f", -- Variometer {-6000,-4000,-2000,2000,4000,6000} {-0.6,-0.4,-0.2,0.2,0.4,0.6}
|
||||
-- Altimeter
|
||||
[97] = "%.4f", -- Altimeter_Pressure {28.1, 31.0}{0.0, 1.0}
|
||||
[96] = "%.41f", -- Altimeter_10000_footPtr {0.0, 100000.0}{0.0, 1.0}
|
||||
[24] = "%.4f", -- Altimeter_1000_footPtr {0.0, 10000.0}{0.0, 1.0}
|
||||
[25] = "%.4f", -- Altimeter_100_footPtr{0.0, 1000.0}{0.0, 1.0}
|
||||
-- Artificial horizon
|
||||
[15] = "%.4f", -- AHorizon_Pitch {1.0, -1.0}
|
||||
[14] = "%.4f", -- AHorizon_Bank {1.0, -1.0}
|
||||
[16] = "%.1f", -- AHorizon_PitchShift {-1.0, 1.0}
|
||||
[20] = "%.1f", -- AHorizon_Caged {0.0, 1.0}
|
||||
-- directional gyro
|
||||
[12] = "%.4f", -- GyroHeading
|
||||
-- turn indicator
|
||||
[27] = "%.4f", -- TurnNeedle {-1.0, 1.0}
|
||||
[28] = "%.4f", -- Slipball {-1.0, 1.0}
|
||||
-- oxygen pressure indicator
|
||||
[34] = "%.4f", -- Oxygen_Pressure {0.0, 500.0} {0.0, 1.0}
|
||||
[33] = "%.4f", -- Oxygen_Flow_Blinker
|
||||
-- fuel system
|
||||
[155] = "%.4f", -- Fuel_Tank_Left {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
|
||||
[156] = "%.4f", -- Fuel_Tank_Right {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
|
||||
[32] = "%.4f", -- Fuel_Pressure {0.0, 25.0} {0.0, 1.0}
|
||||
-- A-11 clock
|
||||
[4] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0}{0.0, 1.0}
|
||||
[5] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0}{0.0, 1.0}
|
||||
[6] = "%.4f", -- CLOCK_currtime_seconds {0.0, 60.0}{0.0, 1.0}
|
||||
-- AN5730 remote compass
|
||||
[1] = "%.4f", -- CompassHeading
|
||||
[2] = "%.4f", -- CommandedCourse
|
||||
[3] = "%.4f", -- CommandedCourseKnob
|
||||
-- TailRadarWarning
|
||||
[161] = "%.f", -- Lamp TailRadarWarning
|
||||
-- SCR-522A Control panel
|
||||
[122] = "%.f", -- A_channel_light
|
||||
[123] = "%.f", -- B_channel_light
|
||||
[124] = "%.f", -- C_channel_light
|
||||
[125] = "%.f", -- D_channel_light
|
||||
[126] = "%.f", -- Transmit_light
|
||||
-- hydraulic pressure
|
||||
[78] = "%.4f", -- Hydraulic_Pressure {0.0, 2000.0} {0.0, 1.0}
|
||||
-- Landing gears handle
|
||||
[150] = "%.4f", -- Landing_Gear_Handle
|
||||
[151] = "%.4f", -- Landing_Gear_Handle_Indoor
|
||||
[80] = "%.f", -- LandingGearGreenLight
|
||||
[82] = "%.f", -- LandingGearRedLight
|
||||
-- gauges
|
||||
[10] = "%.4f", -- Manifold_Pressure {10.0, 75.0} {0.0, 1.0}
|
||||
[23] = "%.4f", -- Engine_RPM {0.0, 4500.0} {0.0, 1.0}
|
||||
[9] = "%.4f", -- Vacuum_Suction {0.0, 10.0} {0.0, 1.0}
|
||||
[21] = "%.4f", -- Carb_Temperature {-80, 150} {-0, 1}
|
||||
[22] = "%.4f", -- Coolant_Temperature {-80, 150} {-0, 1}
|
||||
[30] = "%.4f", -- Oil_Temperature {0.0, 100.0} {0, 1.0}
|
||||
[31] = "%.4f", -- Oil_Pressure {0.0, 200.0} {0, 1.0}
|
||||
[164] = "%.1f", -- Left_Fluor_Light
|
||||
[165] = "%.1f", -- Right_Fluor_Light
|
||||
[59] = "%.f", -- Hight_Blower_Lamp
|
||||
-- Trimmer
|
||||
[170] = "%.4f", -- Aileron_Trimmer {-1.0, 1.0}
|
||||
[172] = "%.4f", -- Rudder_Trimmer {-1.0, 1.0}
|
||||
[171] = "%.4f", -- Elevator_Trimmer {-1.0, 1.0}
|
||||
[174] = "%.4f", -- Control_Lock_Bracket
|
||||
[175] = "%.4f", -- Accelerometer_main {-5.0, 12.0} {0.0, 1.0}
|
||||
[177] = "%.4f", -- Accelerometer_min {-5.0, 12.0} {0.0, 1.0}
|
||||
[178] = "%.4f", -- Accelerometer_max {-5.0, 12.0} {0.0, 1.0}
|
||||
[101] = "%.4f", -- Ammeter {0.0, 150.0} {0.0, 1.0}
|
||||
-- light
|
||||
[185] = "%.1f", -- Left_cockpit_light
|
||||
[186] = "%.1f", -- Right_cockpit_light
|
||||
[190] = "%.4f", -- warEmergencyPowerLimWire
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Right Swich Panel
|
||||
[102] = "%d", -- Generator Connect/Disconnect
|
||||
[103] = "%d", -- Battery Connect/Disconnect
|
||||
[104] = "%d", -- Gun Heating ON/OFF
|
||||
[105] = "%d", -- Pitot Heating ON/OFF
|
||||
[106] = "%d", -- Wing Position Lights Bright/Off/Dim
|
||||
[107] = "%d", -- Tail Position Lights Bright/Off/Dim
|
||||
[108] = "%d", -- Red Recognition Light Key/Off/Steady
|
||||
[109] = "%d", -- Green Recognition Light Key/Off/Steady
|
||||
[110] = "%d", -- Amber Recognition Light Key/Off/Steady
|
||||
[111] = "%d", -- Recognition Lights Key
|
||||
[112] = "%d", -- Circuit Protectors Reset
|
||||
[100] = "%.4f", -- Right Fluorescent Light (rotary)
|
||||
[90] = "%.4f", -- Left Fluorescent Light (rotary)
|
||||
-- Flight Instrument panel
|
||||
[3] = "%.4f", -- Course Set (rotary)
|
||||
[13] = "%.4f", -- Heading Set/Cage (rotary)
|
||||
[179] = "%d", -- Heading Set/Cage Button
|
||||
[17] = "%.4f", -- Pitch Adjustment (rotary)
|
||||
[18] = "%.4f", -- Cage (rotary)
|
||||
[19] = "%d", -- Cage Button
|
||||
[8] = "%d", -- Winding/Adjustment Clock Button
|
||||
[7] = "%.4f", -- Winding/Adjustment Clock (rotary)
|
||||
[26] = "%.4f", -- Set Pressure (rotary)
|
||||
-- SCR-522A Control panel
|
||||
[117] = "%d", -- Radio ON/OFF
|
||||
[118] = "%d", -- A Channel Activate
|
||||
[119] = "%d", -- B Channel Activate
|
||||
[120] = "%d", -- C Channel Activate
|
||||
[121] = "%d", -- D Channel Activate
|
||||
[127] = "%.4f", -- Radio Lights Dimmer (rotary)
|
||||
[116] = "%.4f", -- Radio Audio Volume (rotary)
|
||||
[44] = "%d", -- Microphone On
|
||||
[129] = "%d", -- Switch Locking Lever
|
||||
[128] = "%d", -- Radio Mode Transmit/Receive/Remote
|
||||
-------------
|
||||
[71] = "%.4f", -- Cockpit Lights (rotary)
|
||||
[66] = "%0.1f", -- Ignition Off/Right/Left/Both
|
||||
[67] = "%d", -- Gun control Gun And Camera On/Gun And Camera OFF/Camera On
|
||||
[72] = "%d", -- Silence Landing Gear Warning Horn Cut Off
|
||||
-- Bomb Arm/Chemical
|
||||
[69] = "%d", -- Left Bomb Arm/Chemical
|
||||
[70] = "%d", -- Right Bomb Arm/Chemical
|
||||
-- Release Mode
|
||||
[68] = "%0.1f", -- Release Mode, Bombs and Rockets Safe/Bombs Train Release/Bombs Both Release/Rockets Arm
|
||||
-- Engine Control Panel
|
||||
[58] = "%d", -- Supercharger Switch Cover
|
||||
[57] = "%0.1f", -- Supercharger AUTO/LOW/HIGH
|
||||
[60] = "%d", -- High Blower Lamp Test
|
||||
[61] = "%d", -- Fuel Booster On/Off
|
||||
[62] = "%d", -- Oil Dilute Activate
|
||||
[63] = "%d", -- Starter Activate
|
||||
[64] = "%d", -- Starter Switch Cover
|
||||
[65] = "%d", -- Primer Activate
|
||||
-- Oxygen Regulator
|
||||
[131] = "%d", -- Auto-Mix On-Off
|
||||
[130] = "%0.4f", -- Oxygen Emergency By-pass
|
||||
-- Fuel system
|
||||
[85] = "%0.1f", -- Fuel Selector Valve, Select Right Combat Tank/Select Left Main Tank/Select Fuselage Tank/Select Right Main Tank/Select Left Combat Tank
|
||||
[86] = "%d", -- Fuel Shut-Off Valve ON/OFF
|
||||
-- AN/APS-13
|
||||
[114] = "%d", -- ail Warning Radar Power ON/OFF
|
||||
[115] = "%d", -- Tail Warning Radar Test
|
||||
[113] = "%.4f", -- Tail Warning Radar Light Control (rotary)
|
||||
-------------
|
||||
[79] = "%d", -- Hydraulic Release Knob
|
||||
[94] = "%.4f", -- Flaps Control Handle (rotary)
|
||||
[84] = "%d", -- Parking Brake Handle
|
||||
[81] = "%d", -- Safe Landing Gear Light Test
|
||||
[83] = "%d", -- Unsafe Landing Gear Light Test
|
||||
-- Detrola receiver
|
||||
[137] = "%.4f", -- Detrola Frequency Selector (rotary)
|
||||
[138] = "%.4f", -- Detrola Volume (rotary)
|
||||
-- canopy
|
||||
[147] = "%.4f", -- Canopy Hand Crank (rotary)
|
||||
[149] = "%d", -- Canopy Emergency Release Handle
|
||||
-- AN/ARA-8
|
||||
[152] = "%0.1f", -- Homing Adapter Mode TRANSMIT/COMM./HOMING
|
||||
[153] = "%d", -- Homing Adapter Power On/Off
|
||||
[154] = "%d", -- Homing Adapter's Circuit Breaker
|
||||
-- SCR-695
|
||||
[139] = "%0.1f", -- IFF Code Selector Code 1/2/3/4/5/6
|
||||
[140] = "%d", -- IFF Power On/Off
|
||||
[141] = "%d", -- IFF TIME/OFF/ON
|
||||
[142] = "%d", -- IFF Detonator Circuit On/Off
|
||||
[143] = "%d", -- IFF Distress Signal On/Off
|
||||
[145] = "%d", -- IFF Detonator Left
|
||||
[146] = "%d", -- IFF Detonator Right
|
||||
-- Trimmers
|
||||
[91] = "%.4f", -- Aileron Trim (rotary)
|
||||
[92] = "%.4f", -- Elevator Trim (rotary)
|
||||
[93] = "%.4f", -- Rudder Trim (rotary)
|
||||
-------------
|
||||
[157] = "%.4f", -- Defroster (rotary)
|
||||
[158] = "%.4f", -- Cold Air (rotary)
|
||||
[159] = "%.4f", -- Hot Air (rotary)
|
||||
-------------
|
||||
[89] = "%d", -- Landing Light On/Off
|
||||
[168] = "%d", -- Coolant Control Cover
|
||||
[87] = "%0.1f", -- Close Coolant Control/Automatic Coolant Control/Open Coolant Control
|
||||
[169] = "%d", -- Oil Control Cover
|
||||
[88] = "%0.1f", -- Close Oil Control/Automatic Oil Control/Open Oil Control
|
||||
[134] = "%0.1f", -- Carburetor Cold Air Control (rotary)
|
||||
[135] = "%0.1f", -- Carburetor Warm Air Control (rotary)
|
||||
[47] = "%0.1f", -- Mixture Control Select IDLE CUT OFF/RUN/EMERGENCY FULL RICH
|
||||
[43] = "%.4f", -- Throttle (rotary)
|
||||
[46] = "%.4f", -- Propeller RPM (rotary)
|
||||
[173] = "%d", -- Surface Control Lock Plunger. Left Button - Lock Stick in the Forward Position', Right Button - Lock Stick in the Neutral Position
|
||||
[48] = "%.4f", -- Lock Throttle (rotary)
|
||||
[49] = "%.4f", -- Lock Propeller & Mixture (rotary)
|
||||
[176] = "%d", -- G-meter reset
|
||||
[183] = "%d", -- Mirror
|
||||
--Gunsight Selector
|
||||
[41] = "%d", -- Sight On/Off
|
||||
[39] = "%d", -- Fixed Reticle Mask Lever
|
||||
[40] = "%0.1f", -- Sight Mode, Fixed Sight/Fixed-Gyro Sight/Gyro Sight
|
||||
[42] = "%.1f", -- Gun Sight Brightness
|
||||
[35] = "%.1f", -- Wing Span Selector
|
||||
-------------
|
||||
[132] = "%.4f", -- Left Payload Salvo
|
||||
[133] = "%.4f" -- Right Payload Salvo
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to hardware
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
907
Scripts/DCS-ExportScript/ExportsModules/UH-1H.lua
Normal file
907
Scripts/DCS-ExportScript/ExportsModules/UH-1H.lua
Normal file
@@ -0,0 +1,907 @@
|
||||
-- Uh-1H
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.UH1H = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Controlls Pilot
|
||||
--[184] = "%.4f", -- rudder
|
||||
--[187] = "%.4f", -- stick_roll
|
||||
--[186] = "%.4f", -- stick_pitch
|
||||
--[200] = "%.4f", -- collective_position
|
||||
-- Controlls CoPilot
|
||||
--[185] = "%.4f", -- rudder_add
|
||||
--[191] = "%.4f", -- stick_roll_sec
|
||||
--[190] = "%.4f", -- stick_pitch_sec
|
||||
--[207] = "%.4f", -- collective_position_operator
|
||||
-- Gauges Pilot
|
||||
[117] = "%0.4f", -- AIRSPEED_Nose {0.0, 20.0, 30.0, 40.0, 50.0, 60.0, 80.0, 120.0, 150.0} {0.0, 0.075, 0.19, 0.32, 0.395, 0.44, 0.55, 0.825, 1.0}
|
||||
[118] = "%0.4f", -- AIRSPEED_Roof {0.0, 20.0, 30.0, 40.0, 50.0, 60.0, 80.0, 120.0, 150.0} {0.0, 0.075, 0.19, 0.32, 0.395, 0.44, 0.55, 0.825, 1.0}
|
||||
-- Course Indicator ID-1347
|
||||
[151] = "%.4f", -- VerticalBar {-1.0, 1.0} {-0.7, 0.7}
|
||||
[152] = "%.4f", -- HorisontalBar {-1.0, 1.0} {-0.7, 0.7}
|
||||
[153] = "%.4f", -- ToMarker
|
||||
[154] = "%.4f", -- FromMarker
|
||||
[156] = "%.4f", -- RotCourseCard
|
||||
[157] = "%.1f", -- VerticalOFF
|
||||
[158] = "%.1f", -- HorisontalOFF
|
||||
-- ADF_ARN83
|
||||
[45] = "%0.2f", -- ADF_ARN83_Frequency {0.0, 1.0} {0.0, 0.55}
|
||||
[40] = "%.4f", -- ARN83_SignalLevel
|
||||
-- GMC
|
||||
[159] = "%.4f", -- GMC_CoursePointer1
|
||||
[160] = "%.4f", -- GMC_CoursePointer2
|
||||
[162] = "%.4f", -- GMC_HeadingMarker
|
||||
[165] = "%.4f", -- GMC_Heading
|
||||
[166] = "%.4f", -- GMC_Annunciator {-1.0, 1.0} {0.0, 1.0}
|
||||
[167] = "%.2f", -- GMC_PowerFail
|
||||
-- Copilot RMI
|
||||
[266] = "%.4f", -- RMI_CoursePointer1
|
||||
[267] = "%.4f", -- RMI_CoursePointer2
|
||||
[269] = "%.4f", -- RMI_Heading
|
||||
-- Altimeter Indicator AAU-32/A (operator)
|
||||
[168] = "%.4f", -- Pointer {0.0, 1000.0} {0.0, 1.0}
|
||||
[169] = "%.4f", -- Alt1AAU_10000_footCount {0.0, 10.0} {0.0, 1.0}
|
||||
[170] = "%.4f", -- Alt1AAU_1000_footCount {0.0, 10.0} {0.0, 1.0}
|
||||
[171] = "%.4f", -- Alt1AAU_100_footCount {0.0, 10.0} {0.0, 1.0}
|
||||
[174] = "%.2f", -- AAU_32_Drum_Counter {-2.0, 1.0} {0.0, 0.3}
|
||||
[175] = "%.2f", -- AAU_32_Drum_Counter {0.0, 10.0} {0.0, 1.0}
|
||||
[176] = "%.2f", -- AAU_32_Drum_Counter {0.0, 10.0} {0.0, 1.0}
|
||||
[177] = "%.1f", -- CodeOff_flag
|
||||
-- Altimeter Indicator AAU-7/A (pilot) (AAU-31/A)
|
||||
[178] = "%.4f", -- Alt_10000_AAU_7A {0.0, 100000.0} {0.0, 1.0}
|
||||
[179] = "%.4f", -- Alt_1000_AAU_7A {0.0, 10000.0} {0.0, 1.0}
|
||||
[180] = "%.4f", -- Alt_100_AAU_7A {0.0, 1000.0} {0.0, 1.0}
|
||||
[182] = "%.4f", -- Press_AAU_7A {28.1, 31.0} {0.0, 1.0}
|
||||
-- Gauges
|
||||
[113] = "%.4f", -- EngOilPress {-3.0, 0.0, 100.0} {0.0, 0.029, 1.0}
|
||||
[114] = "%.4f", -- EngOilTemp {-70.0, -50.0, 0.0, 100.0, 150.0} {0.0, 0.13, 0.38, 0.71, 1.0}
|
||||
[115] = "%.4f", -- TransmOilPress {-3.0, 0.0, 100.0} {0.0, 0.029, 1.0}
|
||||
[116] = "%.4f", -- TransmOilTemp {-70.0, -50.0, 0.0, 100.0, 150.0} {0.0, 0.13, 0.38, 0.71, 1.0}
|
||||
--[117] = "%.4f", -- AIRSPEED_Nose
|
||||
--[118] = "%.4f", -- AIRSPEED_Roof
|
||||
[121] = "%.4f", -- ExhaustTemp {0.0, 500.0, 600.0, 900.0, 1000.0} {0.0, 0.508, 0.604, 0.904, 1.0}
|
||||
[122] = "%.4f", -- EngineTach {0.0, 7200.0} {0.0, 1.0}
|
||||
[123] = "%.4f", -- RotorTach {0.0, 360.0} {0.0, 1.0}
|
||||
[119] = "%.4f", -- GasProducerTach {0.0, 101.5} {0.0, 1.0}
|
||||
[120] = "%.4f", -- GasProducerTach_U {0.0, 10.0} {0.0, 1.0}
|
||||
[124] = "%.4f", -- TorquePress {-3.0, 0.0, 100.0} {0.0, 0.029, 1.0}
|
||||
[149] = "%.4f", -- VoltageDC {0.0, 30.0} {0.0, 1.0}
|
||||
[150] = "%.4f", -- VoltageAC {0.0, 150.0} {0.0, 1.0}
|
||||
[436] = "%.4f", -- LoadmeterMainGen {-1.5, 0.0, 12.5} {0.0, 0.156, 1.0}
|
||||
[125] = "%.4f", -- LoadmeterSTBYGen {-1.5, 0.0, 12.5} {0.0, 0.09, 1.0}
|
||||
[126] = "%.4f", -- FuelPress {-2.0, 0.0, 50.0} {0.0, 0.015, 1.0}
|
||||
[239] = "%.4f", -- FuelQuantity {0.0, 1580.0} {0.0, 1.0}
|
||||
-- Mechanic clock
|
||||
[127] = "%.4f", -- CLOCK_hours {0.0, 12.0} {0.0, 1.0}
|
||||
[128] = "%.4f", -- CLOCK_minutes {0.0, 60.0} {0.0, 1.0}
|
||||
[129] = "%.4f", -- CLOCK_seconds {0.0, 60.0} {0.0, 1.0}
|
||||
--
|
||||
[132] = "%.4f", -- TurnPtr {-1.0, 1.0}
|
||||
[133] = "%.4f", -- SideSlip {-1.0, 1.0}
|
||||
[134] = "%.4f", -- VertVelocPilot {-4000.0, -3000.0, -1500.0, -1000.0, 1000.0, 1500.0, 3000.0, 4000.0} {-1.0, -0.81, -0.54, -0.36, 0.36, 0.54, 0.81, 1.0}
|
||||
[251] = "%.4f", -- VertVelocCopilot {-4000.0, -3000.0, -1500.0, -1000.0, 1000.0, 1500.0, 3000.0, 4000.0} {-1.0, -0.81, -0.54, -0.36, 0.36, 0.54, 0.81, 1.0}
|
||||
-- ADI - pilot
|
||||
[142] = "%.4f", -- Attitude_Roll {1.0, -1.0}
|
||||
[143] = "%.4f", -- Attitude_Pitch {1.0, -1.0}
|
||||
[148] = "%.1f", -- Attitude_Off_flag
|
||||
-- ADI - operator
|
||||
[135] = "%.4f", -- Attitude_Roll_left {1.0, -1.0}
|
||||
[136] = "%.4f", -- Attitude_Pitch_left {1.0, -1.0}
|
||||
--[141] = "%.1f", -- Attitude_Off_flag_left {0.0, 1.0} {1.0, 0.0}
|
||||
[138] = "%.4f", -- Attitude_PitchShift {0.0, 1.0} {-1.0, 1.0}
|
||||
-- operator
|
||||
--[149] = "%.4f", -- DCVoltmeter
|
||||
--[150] = "%.4f", -- ACVoltmeter
|
||||
-- UHF_ARC51
|
||||
[10] = "%.4f", -- UHF_ARC51_Freq1 {2.0, 3.0} {0.0, 1.0}
|
||||
[11] = "%.4f", -- UHF_ARC51_Freq2 {0.0, 10.0} {0.0, 1.0}
|
||||
[12] = "%.4f", -- UHF_ARC51_Freq3 {0.0, 10.0} {0.0, 1.0}
|
||||
[13] = "%.4f", -- UHF_ARC51_Freq4 {0.0, 10.0} {0.0, 1.0}
|
||||
[14] = "%.4f", -- UHF_ARC51_Freq5 {0.0, 10.0} {0.0, 1.0}
|
||||
-- NAV_ARN82
|
||||
[46] = "%.4f", -- NAV_ARN82_Freq1 {0.0, 10.0} {0.0, 1.0}
|
||||
[47] = "%.4f", -- NAV_ARN82_Freq2 {0.0, 10.0} {0.0, 1.0}
|
||||
[48] = "%.4f", -- NAV_ARN82_Freq3 {0.0, 10.0} {0.0, 1.0}
|
||||
[49] = "%.4f", -- NAV_ARN82_Freq4 {0.0, 10.0} {0.0, 1.0}
|
||||
[50] = "%.4f", -- NAV_ARN82_Freq5 {0.0, 10.0} {0.0, 1.0}
|
||||
-- VHF_ARC134
|
||||
[1] = "%.4f", -- VHF_ARC134_Freq1 {0.0, 10.0} {0.0, 1.0}
|
||||
[2] = "%.4f", -- VHF_ARC134_Freq2 {0.0, 10.0} {0.0, 1.0}
|
||||
[3] = "%.4f", -- VHF_ARC134_Freq3 {0.0, 10.0} {0.0, 1.0}
|
||||
[4] = "%.4f", -- VHF_ARC134_Freq4 {0.0, 10.0} {0.0, 1.0}
|
||||
--
|
||||
[56] = "%.1f", -- Marker_Beacon_Lamp {0.0, 1.0} {0.0, 0.9}
|
||||
-- Panel_Shake
|
||||
--[264] = "%.1f", -- Panel_Shake_Z
|
||||
--[265] = "%.1f", -- Panel_Shake_Y
|
||||
--[282] = "%.1f", -- Panel_Rot_X
|
||||
-- Wiper
|
||||
--[284] = "%.4f", -- Wiper_Pilot
|
||||
--[283] = "%.4f", -- Wiper_Operator
|
||||
-- Pilot Model
|
||||
--[242] = "%.1f", -- Pilot_Model
|
||||
--[245] = "%.1f", -- Operator_Model
|
||||
-- Flexible sight station
|
||||
--[263] = "%.2f", -- FlexSightHeight
|
||||
--[261] = "%.4f", -- FlexSightAzimuth
|
||||
--[262] = "%.4f", -- FlexSightElevation
|
||||
-- Pilot sight station
|
||||
--[438] = "%.4f", -- PilotSightHeight
|
||||
--[442] = "%.2f", -- PilotSightGlass
|
||||
-- Light
|
||||
[279] = "%.4f", -- light_ConsoleLight
|
||||
[410] = "%.4f", -- light_DomeLight
|
||||
[411] = "%.4f", -- light_DomeLightGreen
|
||||
-- Damage
|
||||
--[248] = "%.1f", -- DeadPilot
|
||||
--[249] = "%.1f", -- DeadCoPilot
|
||||
--[414] = "%.4f", -- LeftWindShield
|
||||
--[413] = "%.4f", -- RightWindShield
|
||||
--[412] = "%.4f", -- DownBlisters
|
||||
--[417] = "%.4f", -- UpRightBlister
|
||||
--[418] = "%.4f", -- UpLeftBlister
|
||||
--[415] = "%.4f", -- RightWindow
|
||||
--[416] = "%.4f", -- LeftWindow
|
||||
--[422] = "%.4f", -- RightDoor
|
||||
--[420] = "%.4f", -- LeftDoor
|
||||
--
|
||||
[437] = "%.3f", -- RamTemp
|
||||
-- Radar Altimeter
|
||||
[443] = "%.4f", -- RALT_Needle {0.0, 0.98} {0.0, 0.98}
|
||||
[467] = "%.1f", -- RALT_Off_Flag
|
||||
[447] = "%.f", -- RALT_LO_Lamp
|
||||
[465] = "%.f", -- RALT_HI_Lamp
|
||||
[444] = "%.4f", -- RALT_LO_Index {-0.02, -0.01, -0.0001,0.0, 0.744} {0.97, 0.99, 1.0, 0.0, 0.744}
|
||||
[466] = "%.4f", -- RALT_HI_Index {0.0, 0.744} {0.0, 0.744}
|
||||
[468] = "%0.1f", -- RALT_Digit_1 {0.0, 10.0} {0.0, 1.0}
|
||||
[469] = "%0.1f", -- RALT_Digit_2 {0.0, 10.0} {0.0, 1.0}
|
||||
[470] = "%0.1f", -- RALT_Digit_3 {0.0, 10.0} {0.0, 1.0}
|
||||
[471] = "%0.1f", -- RALT_Digit_4 {0.0, 10.0} {0.0, 1.0}
|
||||
-- FLARE CHAFF
|
||||
[460] = "%.1f", -- FLARE_Digit_1 {0.0, 10.0} {0.0, 1.0}
|
||||
[461] = "%.1f", -- FLARE_Digit_2 {0.0, 10.0} {0.0, 1.0}
|
||||
[462] = "%.1f", -- CHAFF_Digit_1 {0.0, 10.0} {0.0, 1.0}
|
||||
[463] = "%.1f", -- CHAFF_Digit_2 {0.0, 10.0} {0.0, 1.0}
|
||||
-- XM130 Chaff Flare
|
||||
[458] = "%.f", -- lamp_XM130_ARMED
|
||||
-- SIGHTS_FOR_CIVIL
|
||||
[473] = "%.1f", -- SIGHTS_FOR_CIVIL
|
||||
-- Main Panel Lights
|
||||
[277] = "%.f", -- lamp_MASTER
|
||||
[276] = "%.f", -- lamp_LOW_RPM
|
||||
[275] = "%.f", -- lamp_FIRE
|
||||
-- Caution Panel Lights
|
||||
[91] = "%.f", -- lamp_ENGINE_OIL_PRESS
|
||||
[92] = "%.f", -- lamp_ENGINE_ICING
|
||||
[93] = "%.f", -- lamp_ENGINE_ICE_JET
|
||||
[94] = "%.f", -- lamp_ENGINE_CHIP_DET
|
||||
[95] = "%.f", -- lamp_LEFT_FUEL_BOOST
|
||||
[96] = "%.f", -- lamp_RIGHT_FUEL_BOOST
|
||||
[97] = "%.f", -- lamp_ENG_FUEL_PUMP
|
||||
[98] = "%.f", -- lamp_20_MINUTE
|
||||
[99] = "%.f", -- lamp_FUEL_FILTER
|
||||
[100] = "%.f", -- lamp_GOV_EMERG
|
||||
[101] = "%.f", -- lamp_AUX_FUEL_LOW
|
||||
[102] = "%.f", -- lamp_XMSN_OIL_PRESS
|
||||
[103] = "%.f", -- lamp_XMSN_OIL_HOT
|
||||
[104] = "%.f", -- lamp_HYD_PRESSURE
|
||||
[105] = "%.f", -- lamp_ENGINE_INLET_AIR
|
||||
[106] = "%.f", -- lamp_INST_INVERTER
|
||||
[107] = "%.f", -- lamp_DC_GENERATOR
|
||||
[108] = "%.f", -- lamp_EXTERNAL_POWER
|
||||
[109] = "%.f", -- lamp_CHIP_DETECTOR
|
||||
[110] = "%.f", -- lamp_IFF
|
||||
-- M21
|
||||
[254] = "%.f", -- lamp_M21_ARMED
|
||||
[255] = "%.f", -- lamp_M21_SAFE
|
||||
--
|
||||
[76] = "%.f", -- lamp_IFF_REPLY
|
||||
[77] = "%.f", -- lamp_IFF_TEST
|
||||
-- Electic Gauges
|
||||
[526] = "%.4f", -- DC_voltage {0.0, 30.0} {0.0, 1.0}
|
||||
[532] = "%.2f", -- AC_voltage {0.0, 100.0, 150.0, 200.0, 250.0} {0.0, 0.14, 0.31, 0.56, 1.0}
|
||||
[527] = "%.4f", -- DC_battery_I_current {0.0, 400.0} {0.0, 1.0}
|
||||
[528] = "%.4f", -- DC_battery_II_current {0.0, 400.0} {0.0, 1.0}
|
||||
[529] = "%.4f", -- DC_VU_I_current {0.0, 400.0} {0.0, 1.0}
|
||||
[530] = "%.4f", -- DC_VU_II_current {0.0, 400.0} {0.0, 1.0}
|
||||
[531] = "%.4f", -- DC_VU_III_current {0.0, 400.0} {0.0, 1.0}
|
||||
[533] = "%.2f", -- AC_generator_I_current {0.0, 50, 70, 90, 120, 130, 140, 150} {0.0, 0.1, 0.2, 0.36, 0.63, 0.75, 0.86, 1.0}
|
||||
[534] = "%.2f", -- AC_generator_II_current {0.0, 50, 70, 90, 120, 130, 140, 150} {0.0, 0.1, 0.2, 0.36, 0.63, 0.75, 0.86, 1.0}
|
||||
[371] = "%.2f", -- AntiIce_ampermeter {0.0, 50, 70, 90, 120, 130, 140, 150} {0.0, 0.1, 0.2, 0.36, 0.63, 0.75, 0.86, 1.0}
|
||||
-- Magnetic Compass
|
||||
--[272] = "%.4f", -- Heading
|
||||
[273] = "%.4f", -- Roll
|
||||
[274] = "%.4f" -- Pitch
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Electrosystem
|
||||
[219] = "%1d", -- Battery
|
||||
[220] = "%1d", -- Starter/Stdby GEN
|
||||
[218] = "%.1f", -- DC Voltmeter Selector BAT, MAIN GEN, STBY GEN, ESS BUS, NON-ESS BUS {0.0,0.1,0.2,0.3,0.4}
|
||||
[221] = "%1d", -- Non Essential bus
|
||||
[214] = "%.1f", -- AC Voltmeter Selector AB, AC PHASE, BC {0.0,0.1,0.2}
|
||||
[215] = "%1d", -- Inverter MAIN/OFF/SPARE {-1.0,0.0,1.0}
|
||||
-- Electrosystem circuit breakers
|
||||
-- Essential BUS. line 1
|
||||
[285] = "%1d", -- CB IFF APX 1 (N/F)
|
||||
[287] = "%1d", -- CB IFF APX 2 (N/F)
|
||||
[289] = "%1d", -- CB Prox. warn.(N/F)
|
||||
[291] = "%1d", -- CB Marker beacon
|
||||
[293] = "%1d", -- CB VHF Nav. (ARN-82)
|
||||
[295] = "%1d", -- CB LF Nav. (ARN-83)
|
||||
[297] = "%1d", -- CB Intercom CPLT(N/F)
|
||||
[299] = "%1d", -- CB Intercom PLT
|
||||
[349] = "%1d", -- CB ARC-102 HF Static INVTR(N/F)
|
||||
[351] = "%1d", -- CB HF ANT COUPLR(N/F)
|
||||
[353] = "%1d", -- CB HF ARC-102(N/F)
|
||||
[355] = "%1d", -- CB FM Radio
|
||||
[357] = "%1d", -- CB UHF Radio
|
||||
[359] = "%1d", -- CB FM 2 Radio(N/F)
|
||||
[361] = "%1d", -- CB VHF AM Radio
|
||||
[321] = "%1d", -- CB Pitot tube(N/F)
|
||||
[345] = "%1d", -- CB Rescue hoist CTL(N/F)
|
||||
[347] = "%1d", -- CB Rescue hoist cable cutter (N/F)
|
||||
-- Essential BUS. line 2
|
||||
[303] = "%1d", -- CB Wind wiper PLT
|
||||
[301] = "%1d", -- CB Wind wiper CPLT
|
||||
[305] = "%1d", -- CB KY-28 voice security(N/F)
|
||||
[403] = "%1d", -- CB Starter Relay(N/F)
|
||||
[307] = "%1d", -- CB Search light power(N/F)
|
||||
[309] = "%1d", -- CB Landing light power(N/F)
|
||||
[311] = "%1d", -- CB Landing & Search light control(N/F)
|
||||
[313] = "%1d", -- CB Anticollision light(N/F)
|
||||
[363] = "%1d", -- CB Fuselage lights(N/F)
|
||||
[365] = "%1d", -- CB Navigation lights(N/F)
|
||||
[367] = "%1d", -- CB Dome lights(N/F)
|
||||
[369] = "%1d", -- CB Cockpit lights(N/F)
|
||||
[371] = "%1d", -- CB Caution lights(N/F)
|
||||
[373] = "%1d", -- CB Console lights(N/F)
|
||||
[375] = "%1d", -- CB INST Panel lights(N/F)
|
||||
[377] = "%1d", -- CB INST SEC lights(N/F)
|
||||
[323] = "%1d", -- CB Cabin heater (Outlet valve)(N/F)
|
||||
[325] = "%1d", -- CB Cabin heater (Air valve)(N/F)
|
||||
[343] = "%1d", -- CB Rescue hoist PWR(N/F)
|
||||
-- Essential BUS. line 3
|
||||
[327] = "%1d", -- CB RPM Warning system(N/F)
|
||||
[329] = "%1d", -- CB Engine anti-ice(N/F)
|
||||
[331] = "%1d", -- CB Fire detector(N/F)
|
||||
[333] = "%1d", -- CB LH fuel boost pump(N/F)
|
||||
[335] = "%1d", -- CB Turn & Slip indicator
|
||||
[337] = "%1d", -- CB TEMP indicator(N/F)
|
||||
[339] = "%1d", -- CB HYD Control(N/F)
|
||||
[341] = "%1d", -- CB FORCE Trim(N/F)
|
||||
[379] = "%1d", -- CB Cargo hook release(N/F)
|
||||
[381] = "%1d", -- CB EXT Stores jettison(N/F)
|
||||
[383] = "%1d", -- CB Spare inverter PWR(N/F)
|
||||
[385] = "%1d", -- CB Inverter CTRL (N/F)
|
||||
[387] = "%1d", -- CB Main inverter PWR(N/F)
|
||||
[389] = "%1d", -- CB Generator & Bus Reset(N/F)
|
||||
[391] = "%1d", -- CB STBY Generator Field(N/F)
|
||||
[393] = "%1d", -- CB Governor Control(N/F)
|
||||
[395] = "%1d", -- CB IDLE Stop release(N/F)
|
||||
[397] = "%1d", -- CB RH fuel boost pump(N/F)
|
||||
[399] = "%1d", -- CB Fuel TRANS(N/F)
|
||||
[401] = "%1d", -- CB Fuel valves(N/F)
|
||||
-- Non Essential BUS
|
||||
[315] = "%1d", -- CB Heated blanket 1(N/F)
|
||||
[317] = "%1d", -- CB Heated blanket 2(N/F)
|
||||
[319] = "%1d", -- CB Voltmeter Non Ess Bus(N/F)
|
||||
-- other circuit breakers
|
||||
[405] = "%1d", -- CB Ignition system(N/F)
|
||||
-- AC BUS circuit breakers
|
||||
[423] = "%1d", -- CB Pilot ATTD1(N/F)
|
||||
[424] = "%1d", -- CB Pilot ATTD2(N/F)
|
||||
[425] = "%1d", -- CB Copilot ATTD1(N/F)
|
||||
[426] = "%1d", -- CB Copilot ATTD2(N/F)
|
||||
[427] = "%1d", -- CB Gyro Cmps(N/F)
|
||||
[428] = "%1d", -- CB Fuel Quantity(N/F)
|
||||
[429] = "%1d", -- CB 28V Trans(N/F)
|
||||
[430] = "%1d", -- CB Fail Relay(N/F)
|
||||
[431] = "%1d", -- CB Pressure Fuel(N/F)
|
||||
[432] = "%1d", -- CB Pressure Torque(N/F)
|
||||
[433] = "%1d", -- CB Pressure XMSN(N/F)
|
||||
[434] = "%1d", -- CB Pressure Eng(N/F)
|
||||
[435] = "%1d", -- CB Course Ind(N/F)
|
||||
--
|
||||
[238] = "%1d", -- Pitot Heater
|
||||
[216] = "%1d", -- Main generator (ON/OFF/RESET) {-1, 0, 1}
|
||||
[217] = "%1d", -- Main generator switch cover
|
||||
--
|
||||
[111] = "%1d", -- Reset/Test switch {-1, 0, 1}
|
||||
[112] = "%1d", -- Bright/Dim switch {-1, 0, 1}
|
||||
-- Fuel system
|
||||
[81] = "%1d", -- Main Fuel
|
||||
[240] = "%1d", -- Test Fuel Gauge
|
||||
--Transponder APX-72
|
||||
[58] = "%.1f", -- Code ZERO/B/A/HOLD input{-1.0,0.0,1.0} output{0.0,0.1,0.2,0.3}
|
||||
[59] = "%.1f", -- Master OFF/STBY/LOW/NOMR/EMER {0.0,0.1,0.2,0.3,0.4}
|
||||
[60] = "%1d", -- Audio/light
|
||||
|
||||
[61] = "%1d", -- Test M-1 {-1, 0, 1}
|
||||
[62] = "%1d", -- Test M-2 {-1, 0, 1}
|
||||
[63] = "%1d", -- Test M-3A {-1, 0, 1}
|
||||
[64] = "%1d", -- Test M-C {-1, 0, 1}
|
||||
--
|
||||
[65] = "%1d", -- RAD Test/Mon {-1, 0, 1}
|
||||
[66] = "%1d", -- Ident/Mic {-1, 0, 1}
|
||||
-- IFF
|
||||
[67] = "%1d", -- IFF On/Out
|
||||
|
||||
[68] = "%.2f", -- MODE1-WHEEL1 0/1/2/3 {0.0,0.33,0.66,0.99}
|
||||
[69] = "%.2f", -- MODE1-WHEEL2 0/1/2/3/4/5/6/7 {0.0,0.11,0.22,0.33,0.44,0.55,0.66,0.77}
|
||||
|
||||
[70] = "%.2f", -- MODE3A-WHEEL1 0/1/2/3/4/5/6/7 {0.0,0.11,0.22,0.33,0.44,0.55,0.66,0.77}
|
||||
[71] = "%.2f", -- MODE3A-WHEEL2 0/1/2/3/4/5/6/7 {0.0,0.11,0.22,0.33,0.44,0.55,0.66,0.77}
|
||||
[72] = "%.2f", -- MODE3A-WHEEL3 0/1/2/3/4/5/6/7 {0.0,0.11,0.22,0.33,0.44,0.55,0.66,0.77}
|
||||
[73] = "%.2f", -- MODE3A-WHEEL4 0/1/2/3/4/5/6/7 {0.0,0.11,0.22,0.33,0.44,0.55,0.66,0.77}
|
||||
|
||||
[74] = "%1d", -- Reply test, Button
|
||||
[78] = "%.4f", -- Reply test, (Axis) {0.0,1.0} in 0.1 steps
|
||||
|
||||
[75] = "%1d", -- Test test, Button
|
||||
[79] = "%4f", -- Test test, (Axis) {0.0,1.0} in 0.1 steps
|
||||
|
||||
[130] = "%1d", -- Winding/Adjustment Clock (Axis) {0.0,1.0} in 0.04 steps
|
||||
[131] = "%1d", -- Winding/Adjustment Clock, Button
|
||||
-- ENGINE INTERFACE
|
||||
[250] = "%.4f", -- Throttle (Axis) {-1.0, 0.4} in -0.1 steps
|
||||
[206] = "%1d", -- Throttle Stop
|
||||
|
||||
[84] = "%1d", -- De-Ice On/Off
|
||||
[80] = "%1d", -- Low RPM Warning
|
||||
[86] = "%1d", -- Chip Detector {-1, 0, 1}
|
||||
[85] = "%1d", -- Governor Emer/Auto
|
||||
[90] = "%1d", -- Hydraulic Control
|
||||
[89] = "%1d", -- Force Trim
|
||||
[203] = "%1d", -- Governor {-1, 0, 1}
|
||||
[278] = "%1d", -- Fire Test
|
||||
-- ADI OPERATOR
|
||||
-- Copilot's attutude indicator
|
||||
[140] = "%1d", -- Cage Copilot's Attitude Indicator, Button
|
||||
[146] = "%.4f", -- Attitude Indicator Pitch Trim Knob (Axis) {0.0,1.0} in 0.1 steps
|
||||
-- ADI PILOT
|
||||
[145] = "%.4f", -- Attitude Indicator Pitch Trim Knob (Axis) {0.0,1.0} in 0.1 steps
|
||||
[144] = "%.4f", -- Attitude Indicator Roll Trim Knob (Axis) {0.0,1.0} in 0.1 steps
|
||||
-- AAU32
|
||||
-- Copilot's altimeter
|
||||
[172] = "%.4f", -- Pressure Adjustment (Axis) {0.0,1.0} in 0.2 steps
|
||||
-- AAU7
|
||||
-- Pilot's altimeter
|
||||
[181] = "%.4f", -- Pressure Adjustment (Axis) {0.0,1.0} in 0.2 steps
|
||||
-- VHF ARC-134
|
||||
[6] = "%1d", -- Comm Test Button
|
||||
[7] = "%.2f", -- Frequency MHz / Power. Right mouse click to cycle power. Rotate mouse wheel to change frequency value, Button {0.85, 1.0}
|
||||
[5] = "%.1f", -- Frequency MHz / Power. Right mouse click to cycle power. Rotate mouse wheel to change frequency value (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[8] = "%.2f", -- Frequency kHz / Volume. Rotate mouse wheel to change frequency value. Left or Right click to adjust volume (Axis) {0.0, 0.65} in 0.05 Steps
|
||||
[9] = "%.1f", -- Frequency kHz / Volume. Rotate mouse wheel to change frequency value. Left or Right click to adjust volume (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Intercom Control Panel
|
||||
[29] = "%.4f", -- Intercom volume (Axis) {0.3,1.0} in 0.1 Steps
|
||||
[23] = "%1d", -- VHF AM Radio Receiver
|
||||
[24] = "%1d", -- UHF Radio Receiver
|
||||
[25] = "%1d", -- VHF FM Radio Receiver
|
||||
[26] = "%1d", -- Receiver 4 N/F
|
||||
[27] = "%1d", -- INT Receiver
|
||||
[28] = "%1d", -- Receiver NAV
|
||||
[30] = "%.1f", -- Intercom Mode (PVT - hot line; INT - interphone; 1 - VHF FM transmitter; 2 - UHF transmitter; 3 - VHF AM transmitter; 4 - Not used) {0.0,0.1,0.2,0.3,0.4,0.5}
|
||||
[194] = "%.1f", -- Radio/ICS
|
||||
-- ARC 51BX UHF Raido
|
||||
[16] = "%.2f", -- Preset Channel Selector 1/2/.../19/20 {0.0,0.05,...,0.90,0.95}
|
||||
[18] = "%.4f", -- 10 MHz Selector (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[19] = "%.4f", -- 1 MHz Selector (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[20] = "%.4f", -- 50 kHz Selector (Axis) {0.0,1.0} in 0.1 Steps
|
||||
|
||||
[15] = "%.1f", -- Frequency Mode Dial {0.0,0.1,0.2}
|
||||
[17] = "%.1f", -- Function Dial {0.0,0.1,0.2,0.3}
|
||||
[22] = "%1d", -- Squelch
|
||||
[21] = "%.4f", -- Volume (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- VHF ARC 131
|
||||
[31] = "%.1f", -- Frequency Tens MHz {0.3,0.4,0.5,0.6,0.7}
|
||||
[32] = "%.1f", -- Frequency Ones MHz {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9}
|
||||
[33] = "%.1f", -- Frequency Decimals MHz {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9}
|
||||
[34] = "%.1f", -- Frequency Hundredths MHz {0.0,0.1}
|
||||
[35] = "%.1f", -- Mode OFF/TR/RETRAN(N/F)/HOME(N/F) {0.0,0.1,0.2,0.3}
|
||||
[36] = "%.1f", -- quelch Mode {0.0,0.1,0.2}
|
||||
[37] = "%.4f", -- Volume (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- ARN-82
|
||||
[52] = "%.2f", -- Frequency MHz / Power. Right mouse click to cycle power. Rotate mouse wheel to change frequency value, Button {0.8, 1.0}
|
||||
[51] = "%.4f", -- Frequency MHz / Power. Right mouse click to cycle power. Rotate mouse wheel to change frequency value (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[53] = "%.4f", -- Frequency kHz / Volume. Rotate mouse wheel to change frequency value. Left or Right click to adjust volume (Axis) {0.0, 0.65} in 0.15 Steps
|
||||
[54] = "%.4f", -- Frequency kHz / Volume. Rotate mouse wheel to change frequency value. Left or Right click to adjust volume (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- Marker beakon
|
||||
[57] = "%.4f", -- Marker beacon On/Off/Volume (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[55] = "%1d", -- Marker beacon sensing
|
||||
-- AN/ARN-83
|
||||
[42] = "%.1f", -- ADF Loop Antenna speed Left/Nom/Right {0.1,0.2,0.3}
|
||||
[41] = "%1d", -- BFO (N/F)
|
||||
[43] = "%.1f", -- Gain control / Mode. Right mouse click to cycle mode. Rotate mouse wheel to adjust gain (Axis) OFF/ADF/ANT/LOOP {0.0,0.3} in 0.1 Steps
|
||||
[44] = "%.4f", -- Gain control / Mode. Right mouse click to cycle mode. Rotate mouse wheel to adjust gain (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[38] = "%1d", -- Tune control / Band selection. Right mouse click to select a band. Rotate mouse wheel to adjust tune 190/400/800 {-1.0,0.0,1.0}
|
||||
[39] = "%.4f", -- Tune control / Band selection. Right mouse click to select a band. Rotate mouse wheel to adjust tune (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- Nav lights
|
||||
[222] = "%.1f", -- Navigation lights, OFF/1/2/3/4/BRT {0.0,0.1,0.2,0.3,0.4,0.5}
|
||||
[223] = "%1d", -- Position Lights, STEADY/OFF/FLASH {-1.0,0.0,1.0}
|
||||
[224] = "%1d", -- Position Lights, DIM/BRIGHT
|
||||
[225] = "%1d", -- Anti-Collision Lights, ON/OFF
|
||||
[202] = "%1d", -- Landing Light
|
||||
[201] = "%1d", -- Search Light
|
||||
[205] = "%1d", -- Landing Light Ctrl
|
||||
-- Light System
|
||||
[230] = "%.4f", -- Overhead Console Panel Lights Brightness Rheostat (Axis) {0.0,1.0} in 0.2 Steps
|
||||
[231] = "%.4f", -- Pedestal Lights Brightness Rheostat (Axis) {0.0,1.0} in 0.2 Steps
|
||||
[232] = "%.4f", -- Secondary Instrument Lights Brightness Rheostat (Axis) {0.0,1.0} in 0.2 Steps
|
||||
[233] = "%.4f", -- Engine Instrument Lights Brightness Rheostat (Axis) {0.0,1.0} in 0.2 Steps
|
||||
[234] = "%.4f", -- Copilot Instrument Lights Brightness Rheostat (Axis) {0.0,1.0} in 0.2 Steps
|
||||
[235] = "%.4f", -- Pilot Instrument Lights Brightness Rheostat (Axis) {0.0,1.0} in 0.2 Steps
|
||||
[226] = "%1d", -- Dome Light Ctrl
|
||||
-- HEATING SYSTEM
|
||||
[236] = "%.1f", -- Bleed Air, OFF/1/2/3/4 {0.0,0.1,0.2,0.3,0.4}
|
||||
-- GCI(ID-998/ASN)
|
||||
[163] = "%.4f", -- Heading Set Knob (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[161] = "%.4f", -- Compass Synchronizing (Axis) {0.0,1.0} in 0.05 Steps
|
||||
[164] = "%1d", -- ADF/VOR control
|
||||
[241] = "%1d", -- DG/Slave gyro mode
|
||||
-- COURSE IND
|
||||
[155] = "%.4f", -- Course select knob (Axis) {0.0,1.0} in 0.1 Steps
|
||||
-- weapon system
|
||||
[252] = "%1d", -- Armed/Safe/Off {-1.0,0.0,1.0}
|
||||
[253] = "%1d", -- Left/Right/All {-1.0,0.0,1.0}
|
||||
[256] = "%1d", -- 7.62/2.75/40 {-1.0,0.0,1.0}
|
||||
[257] = "%.1f", -- Rocket Pair {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7}
|
||||
[258] = "%1d", -- Rocket Reset
|
||||
[259] = "%1d", -- Jettison Cover
|
||||
[260] = "%1d", -- Jettison
|
||||
-- sighting station
|
||||
[281] = "%.4f", -- Sighting Station Intensity (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[408] = "%1d", -- Sighting Station Lamp Switch BACKUP/OFF/MAIN {-1.0,0.0,1.0}
|
||||
|
||||
--[0] = "%1d", -- Pilot Sight Armed/Safe ??
|
||||
[439] = "%1d", -- Pilot Sight On/Off
|
||||
[440] = "%.4f", -- Pilot Sighting Station Intensity (Axis) {0.0,1.0} in 0.1 Steps
|
||||
[441] = "%.4f", -- Sight Elevation (Axis) {-1.0,1.0} in 0.1 Steps
|
||||
-- Windshield Wipers
|
||||
[227] = "%1d", -- Pilot/Both/Operator {-1.0,0.0,1.0}
|
||||
[229] = "%.1f", -- Wipers Speed PARK/OFF/LOW/MED/HIGH input{-1.0,0.0,1.0} output{0.0,0.1,0.2,0.3,0.4}
|
||||
-- Stick
|
||||
[189] = "%1d", -- Force Trim ON/OFF (Pilot)
|
||||
[193] = "%1d", -- Force Trim ON/OFF (CoPilot)
|
||||
-- Cargo Equipment
|
||||
[195] = "%1d", -- Cargo Release Pilot
|
||||
[198] = "%1d", -- Cargo Release CoPilot
|
||||
[228] = "%1d", -- Cargo Safety
|
||||
-- XM 130 Chaff Flare
|
||||
[450] = "%1d", -- Ripple Fire Cover
|
||||
[451] = "%1d", -- Ripple Fire
|
||||
[456] = "%1d", -- SAFE/ARMED Switcher
|
||||
[459] = "%1d", -- MAN/PGRM Mode
|
||||
[464] = "%1d", -- Flare Dispense
|
||||
[457] = "%1d", -- Armed lamp Test
|
||||
[453] = "%1d", -- Flare counter Reset. Rotate mouse wheel to set Number, Button
|
||||
[452] = "%.4f", -- Flare counter Reset. Rotate mouse wheel to set Number (Axis) {0.0,1.0} in 0.2 Steps
|
||||
[455] = "%1d", -- Chaff counter Reset. Rotate mouse wheel to set Number, Button
|
||||
[454] = "%.4f", -- Chaff counter Reset. Rotate mouse wheel to set Number (Axis) {0.0,1.0} in 0.2 Steps
|
||||
-- Radar Altimeter
|
||||
[449] = "%1d", -- Radar Altimeter Power
|
||||
[445] = "%.4f", -- Turn On. Low Set.
|
||||
[446] = "%1d", -- Test / Hight Set. Left mouse click to Test. Rotate mouse wheel to set Hight, Button
|
||||
[464] = "%.4f", -- Test / Hight Set. Left mouse click to Test. Rotate mouse wheel to set Hight (Axis) {0.0,1.0} in 0.2 Steps
|
||||
-- Doors
|
||||
[419] = "%1d", -- Open Left Doors
|
||||
[421] = "%1d" -- Open Right Doors
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
-- Magnetic Compass
|
||||
--[272] = "%.4f", -- Heading
|
||||
ExportScript.Tools.SendData(272, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(272)))) -- negate
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
-- ADI Pilot
|
||||
--[142] = "%.4f", -- Attitude_Roll {1.0, -1.0}
|
||||
--ExportScript.Tools.SendData(142, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(142)))) -- negate
|
||||
-- ADI - operator
|
||||
--[135] = "%.4f", -- Attitude_Roll_left {1.0, -1.0}
|
||||
--ExportScript.Tools.SendData(135, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(135)))) -- negate
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to GlassCockpit
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- Cockpit Light
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {230, 231, 232, 233, 234, 235})
|
||||
-- Overhead Console Panel Lights Brightness Rheostat, Pedestal Lights Brightness Rheostat, Secondary Instrument Lights Brightness Rheostat, Engine Instrument Lights Brightness Rheostat, Copilot Instrument Lights Brightness Rheostat, Pilot Instrument Lights Brightness Rheostat, Axis
|
||||
|
||||
-- ADI, disable needles and flags
|
||||
ExportScript.Tools.SendData(2100, -1.0) -- Horizontal yellow needle
|
||||
ExportScript.Tools.SendData(2101, -1.0) -- Vertical yellow needle
|
||||
ExportScript.Tools.SendData(2102, -1.0) -- Left white needle
|
||||
|
||||
-- ADI - operator
|
||||
--[141] = "%.1f", -- Attitude_Off_flag_left {0.0, 1.0} {1.0, 0.0}
|
||||
ExportScript.Tools.SendData(141, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(141)))) -- negate
|
||||
|
||||
-- Radio
|
||||
local lVHF_ARC_134 = GetDevice(20)
|
||||
--ExportScript.Tools.SendData(2003, string.format("%7.3f", lVHF_ARC_134:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2003, ExportScript.Tools.RoundFreqeuncy(lVHF_ARC_134:get_frequency()/1000000))
|
||||
|
||||
local lUHF_ARC_51 = GetDevice(22)
|
||||
--ExportScript.Tools.SendData(2000, string.format("%6.2f", lUHF_ARC_51:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy(lUHF_ARC_51:get_frequency()/1000000, "6.2", false, 0.050))
|
||||
|
||||
local lVHF_ARC_131 = GetDevice(23)
|
||||
--ExportScript.Tools.SendData(2002, string.format("%5.2f", lVHF_ARC_131:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2002, ExportScript.Tools.RoundFreqeuncy(lVHF_ARC_131:get_frequency()/1000000, "5.2"))
|
||||
|
||||
ExportScript.Tools.SendData(2005, string.format("%02d", ExportScript.Tools.round(mainPanelDevice:get_argument_value(460) * 10, 0)..ExportScript.Tools.round(mainPanelDevice:get_argument_value(461) * 10, 0))) -- FLARE_Digit_1 -- FLARE_Digit_2
|
||||
ExportScript.Tools.SendData(2006, string.format("%02d", ExportScript.Tools.round(mainPanelDevice:get_argument_value(462) * 10, 0)..ExportScript.Tools.round(mainPanelDevice:get_argument_value(463) * 10, 0))) -- CHAFF_Digit_1 -- CHAFF_Digit_2
|
||||
|
||||
--[[
|
||||
-- ARN_82 VHF Navigation Set NOT FUNCTIONAL
|
||||
--local lARN_82 = GetDevice(26)
|
||||
--ExportScript.Tools.WriteToLog('lARN_82: '..ExportScript.Tools.dump(lARN_82))
|
||||
--ExportScript.Tools.WriteToLog('lARN_82 (metatable): '..ExportScript.Tools.dump(getmetatable(lARN_82)))
|
||||
--ExportScript.Tools.SendData(2004, string.format("%6.2f", lVHF_ARC_134:get_frequency()/1000000))
|
||||
]]
|
||||
--[[
|
||||
-- ADF_ARN83
|
||||
local lpos1, pos2, lpos3, pos4
|
||||
local lADF_ARN83 = ""
|
||||
local lCockpitParams = list_cockpit_params()
|
||||
if lCockpitParams ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lCockpitParams: '..ExportScript.Tools.dump(lCockpitParams))
|
||||
lpos1, pos2 = lCockpitParams:find("ADF_FREQ:", 1)
|
||||
if pos2 ~= nil then
|
||||
lpos3, pos4 = lCockpitParams:find("%c", pos2)
|
||||
if lpos3 ~= nil then
|
||||
lADF_ARN83 = lCockpitParams:sub(pos2 + 1, lpos3 - 2)
|
||||
else
|
||||
lADF_ARN83 = lCockpitParams:sub(pos2 + 1)
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lADF_ARN83: '..ExportScript.Tools.dump(lADF_ARN83))
|
||||
lADF_ARN83 = ExportScript.Tools.round(tonumber(lADF_ARN83) / 1000, 2)
|
||||
end
|
||||
end
|
||||
ExportScript.Tools.SendData(2007, string.format("%s", lADF_ARN83))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to hardware
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- Radio comunication
|
||||
-- UHF_ARC_51
|
||||
local lUHF_ARC_51 = GetDevice(22)
|
||||
--ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", lUHF_ARC_51:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy(lUHF_ARC_51:get_frequency()/1000000, "7.3", false, 0.050))
|
||||
|
||||
local lUHF_ARC_51_PRESET = {[0.00]="1",[0.05]="2",[0.10]="3",[0.15]="4",[0.20]="5",[0.25]="6",[0.30]="7",[0.35]="8",[0.40]="9",[0.45]="10",[0.50]="11",[0.55]="12",[0.60]="13",[0.65]="14",[0.70]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20"}
|
||||
ExportScript.Tools.SendDataDAC("2001", lUHF_ARC_51_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(16), 2)])
|
||||
|
||||
-- VHF_ARC_131
|
||||
local lVHF_ARC_131 = GetDevice(23)
|
||||
--ExportScript.Tools.SendDataDAC("2002", string.format("%7.3f", lVHF_ARC_131:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2002", ExportScript.Tools.RoundFreqeuncy(lVHF_ARC_131:get_frequency()/1000000))
|
||||
|
||||
-- VHF_ARC_134
|
||||
local lVHF_ARC_134 = GetDevice(20)
|
||||
--ExportScript.Tools.SendDataDAC("2003", string.format("%7.3f", lVHF_ARC_134:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2003", ExportScript.Tools.RoundFreqeuncy(lVHF_ARC_134:get_frequency()/1000000))
|
||||
|
||||
-- ARN_82 VHF Navigation Set NOT FUNCTIONAL
|
||||
--local lARN_82 = GetDevice(26)
|
||||
--ExportScript.Tools.WriteToLog('lARN_82: '..ExportScript.Tools.dump(lARN_82))
|
||||
--ExportScript.Tools.WriteToLog('lARN_82 (metatable): '..ExportScript.Tools.dump(getmetatable(lARN_82)))
|
||||
--ExportScript.Tools.SendDataDAC("2004", string.format("%7.3f", lVHF_ARC_134:get_frequency()/1000000))
|
||||
|
||||
-- XM130 FLARE CHAFF
|
||||
ExportScript.Tools.SendDataDAC("2005", string.format("%1d", ExportScript.Tools.round(mainPanelDevice:get_argument_value(460) * 10, 0)..ExportScript.Tools.round(mainPanelDevice:get_argument_value(461) * 10, 0))) -- FLARE_Digit_1 -- FLARE_Digit_2
|
||||
ExportScript.Tools.SendDataDAC("2006", string.format("%1d", ExportScript.Tools.round(mainPanelDevice:get_argument_value(462) * 10, 0)..ExportScript.Tools.round(mainPanelDevice:get_argument_value(463) * 10, 0))) -- CHAFF_Digit_1 -- CHAFF_Digit_2
|
||||
|
||||
-- ADF_ARN83
|
||||
local lpos1, pos2, lpos3, pos4
|
||||
local lADF_ARN83 = ""
|
||||
local lCockpitParams = list_cockpit_params()
|
||||
if lCockpitParams ~= nil then
|
||||
lpos1, pos2 = lCockpitParams:find("ADF_FREQ:", 1)
|
||||
if pos2 ~= nil then
|
||||
lpos3, pos4 = lCockpitParams:find("%c", pos2)
|
||||
if lpos3 ~= nil then
|
||||
lADF_ARN83 = lCockpitParams:sub(pos2 + 1, lpos3 - 2)
|
||||
else
|
||||
lADF_ARN83 = lCockpitParams:sub(pos2 + 1)
|
||||
end
|
||||
lADF_ARN83 = ExportScript.Tools.round(tonumber(lADF_ARN83) / 1000, 2)
|
||||
end
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendDataDAC("2007", string.format("%s", lADF_ARN83))
|
||||
|
||||
-- Radar Altimeter - AN/APN-209
|
||||
-- [468] = "%0.1f", -- RALT_Digit_1
|
||||
-- {0.0, 1.0} 0.0=0, 0.1=1, 0.2=2,..., 0.9=9, 1.0=' '
|
||||
-- [469] = "%0.1f", -- RALT_Digit_2
|
||||
-- {0.0, 1.0} 0.0=0, 0.1=1, 0.2=2,..., 0.9=9, 1.0=' '
|
||||
-- [470] = "%0.1f", -- RALT_Digit_3
|
||||
-- {0.0, 1.0} 0.0=0, 0.1=1, 0.2=2,..., 0.9=9, 1.0=' '
|
||||
-- [471] = "%0.1f", -- RALT_Digit_4
|
||||
-- {0.0, 1.0} 0.0=0, 0.1=1, 0.2=2,..., 0.9=9, 1.0=' '
|
||||
local lAN_APN_209_PRESET = {[0.0]="0",[0.1]="1",[0.2]="2",[0.3]="3",[0.4]="4",[0.5]="5",[0.6]="6",[0.7]="7",[0.8]="8",[0.9]="9",[1.0]=" "}
|
||||
local lAN_APN_209 = ""
|
||||
lAN_APN_209 = lAN_APN_209_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(468), 2)]
|
||||
lAN_APN_209 = lAN_APN_209 .. lAN_APN_209_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(469), 2)]
|
||||
lAN_APN_209 = lAN_APN_209 .. lAN_APN_209_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(470), 2)]
|
||||
lAN_APN_209 = lAN_APN_209 .. lAN_APN_209_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(471), 2)]
|
||||
ExportScript.Tools.SendDataDAC("2008", string.format("%s", lAN_APN_209))
|
||||
|
||||
--ExportScript.Tools.WriteToLog('VHF_ARC_134: '..string.format("%7.3f", lVHF_ARC_134:get_frequency()/1000000))
|
||||
--ExportScript.Tools.WriteToLog('VHF_ARC134_Freq1: '..mainPanelDevice:get_argument_value(1))
|
||||
--ExportScript.Tools.WriteToLog('VHF_ARC134_Freq2: '..mainPanelDevice:get_argument_value(2))
|
||||
--ExportScript.Tools.WriteToLog('VHF_ARC134_Freq3: '..mainPanelDevice:get_argument_value(3))
|
||||
--ExportScript.Tools.WriteToLog('VHF_ARC134_Freq4: '..mainPanelDevice:get_argument_value(4))
|
||||
|
||||
-- generic Radio display and frequency rotarys
|
||||
-------------------------------------------------
|
||||
-- genericRadioConf
|
||||
ExportScript.genericRadioConf = {}
|
||||
ExportScript.genericRadioConf['maxRadios'] = 3 -- numbers of aviables/supported radios
|
||||
ExportScript.genericRadioConf[1] = {} -- first radio
|
||||
ExportScript.genericRadioConf[1]['Name'] = "AN/ARC-131 VHF FM" -- name of radio
|
||||
ExportScript.genericRadioConf[1]['DeviceID'] = 23 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[1]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[1]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[1]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[1]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[1]['minFrequency'] = 100.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[1]['maxFrequency'] = 399.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[1]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[1]['Power']['ButtonID'] = 3008 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.1 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Volume'] = {} -- volume knob active
|
||||
ExportScript.genericRadioConf[1]['Volume']['ButtonID'] = 3006 -- volume button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[1]['Preset'] = {} -- preset knob active
|
||||
-- ExportScript.genericRadioConf[1]['Preset']['ArgumentID'] = 161 -- ManualPreset argument id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[1]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
-- ExportScript.genericRadioConf[1]['Preset']['List'] = {[0.0]="01",[0.05]="02",[0.10]="03",[0.15]="04",[0.20]="05",[0.25]="06",[0.30]="07",[0.35]="08",[0.40]="09",[0.45]="10",[0.50]="11",[0.55]="12",[0.60]="13",[0.65]="14",[0.70]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20",[1.00]="01"}
|
||||
-- ExportScript.genericRadioConf[1]['Preset']['Step'] = 0.05 -- minimal step for preset change
|
||||
ExportScript.genericRadioConf[1]['Squelch'] = {} -- squelch switch active
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ArgumentID'] = 36 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ButtonID'] = 3005 -- squelch button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ValueOn'] = 0.1 -- squelch on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ValueOff'] = 0.0 -- squelch off value from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[1]['Load'] = {} -- load button preset
|
||||
-- ExportScript.genericRadioConf[1]['Load']['ButtonID'] = 3015 -- load button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[1]['ManualPreset'] = {} -- switch manual or preset active
|
||||
-- ExportScript.genericRadioConf[1]['ManualPreset']['ArgumentID'] = 167 -- ManualPreset argument id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[1]['ManualPreset']['ButtonID'] = 3007 -- ManualPreset button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[1]['ManualPreset']['ValueManual'] = 0.0-- ManualPreset Manual value from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[1]['ManualPreset']['ValuePreset'] = 0.1-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadioConf[2] = {} -- secound radio
|
||||
ExportScript.genericRadioConf[2]['Name'] = "AN/ARC-51BX UHF AM" -- name of radio
|
||||
ExportScript.genericRadioConf[2]['DeviceID'] = 22 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[2]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[2]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[2]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[2]['FrequencyStep'] = 50 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[2]['minFrequency'] = 225.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[2]['maxFrequency'] = 399.950 -- highest frequency
|
||||
ExportScript.genericRadioConf[2]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[2]['Power']['ButtonID'] = 3006 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Power']['ValueOn'] = 0.1 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Volume'] = {} -- volume knob active
|
||||
ExportScript.genericRadioConf[2]['Volume']['ButtonID'] = 3008 -- volume button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Preset'] = {} -- preset knob active
|
||||
ExportScript.genericRadioConf[2]['Preset']['ArgumentID'] = 16 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
ExportScript.genericRadioConf[2]['Preset']['List'] = {[0.0]="01",[0.05]="02",[0.10]="03",[0.15]="04",[0.20]="05",[0.25]="06",[0.30]="07",[0.35]="08",[0.40]="09",[0.45]="10",[0.50]="11",[0.55]="12",[0.60]="13",[0.65]="14",[0.70]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20"}
|
||||
ExportScript.genericRadioConf[2]['Preset']['Step'] = 0.05 -- minimal step for preset change
|
||||
ExportScript.genericRadioConf[2]['Squelch'] = {} -- squelch switch active
|
||||
ExportScript.genericRadioConf[2]['Squelch']['ArgumentID'] = 134 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Squelch']['ButtonID'] = 3007 -- squelch button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Squelch']['ValueOn'] = 1.0 -- squelch on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Squelch']['ValueOff'] = 0.0 -- squelch off value from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['Load'] = {} -- load button preset
|
||||
ExportScript.genericRadioConf[2]['Load']['ButtonID'] = 3006 -- load button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['ManualPreset'] = {} -- switch manual or preset active
|
||||
ExportScript.genericRadioConf[2]['ManualPreset']['ArgumentID'] = 135 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['ManualPreset']['ButtonID'] = 3005 -- ManualPreset button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['ManualPreset']['ValueManual'] = 0.1-- ManualPreset Manual value from cklickable.lua
|
||||
ExportScript.genericRadioConf[2]['ManualPreset']['ValuePreset'] = 0.0-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadioConf[3] = {} -- secound radio
|
||||
ExportScript.genericRadioConf[3]['Name'] = "AN/ARC-134 VHF AM" -- name of radio
|
||||
ExportScript.genericRadioConf[3]['DeviceID'] = 20 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[3]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[3]['FrequencyMultiplicator'] = 1000000 -- Multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[3]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[3]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[3]['minFrequency'] = 100.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[3]['maxFrequency'] = 399.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[3]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[3]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Power']['ValueOn'] = 1.0 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Power']['ValueOff'] = 0.85 -- power off value from cklickable.lua
|
||||
ExportScript.genericRadioConf[3]['Volume'] = {} -- volume knob active
|
||||
ExportScript.genericRadioConf[3]['Volume']['ButtonID'] = 3003 -- volume button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['Preset'] = {} -- preset knob active
|
||||
-- ExportScript.genericRadioConf[3]['Preset']['ArgumentID'] = 151 -- ManualPreset argument id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['Preset']['ButtonID2'] = 3002 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
-- ExportScript.genericRadioConf[3]['Preset']['List'] = {[0.0]="01",[0.01]="02",[0.02]="03",[0.03]="04",[0.04]="05",[0.05]="06",[0.06]="07",[0.07]="08",[0.08]="09",[0.09]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20",[0.20]="01"}
|
||||
-- ExportScript.genericRadioConf[3]['Preset']['Step'] = 0.01 -- minimal step for preset change
|
||||
-- ExportScript.genericRadioConf[3]['Preset']['Step2'] = -0.01 -- minimal step for preset change
|
||||
-- ExportScript.genericRadioConf[3]['Squelch'] = {} -- squelch switch active
|
||||
-- ExportScript.genericRadioConf[3]['Squelch']['ArgumentID'] = 148 -- ManualPreset argument id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['Squelch']['ButtonID'] = 3008 -- squelch button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['Squelch']['ValueOff'] = -1.0 -- squelch off value from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['Load'] = {} -- load button preset
|
||||
-- ExportScript.genericRadioConf[3]['Load']['ButtonID'] = 3004 -- load button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['ManualPreset'] = {} -- switch manual or preset active
|
||||
-- ExportScript.genericRadioConf[3]['ManualPreset']['ArgumentID'] = 149 -- ManualPreset argument id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['ManualPreset']['ButtonID'] = 3004 -- ManualPreset button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['ManualPreset']['ValueManual'] = 0.2-- ManualPreset Manual value from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[3]['ManualPreset']['ValuePreset'] = 0.3-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
ExportScript.genericRadio(nil, nil)
|
||||
|
||||
--[[
|
||||
-- ENGINE_INTERFACE
|
||||
local lENGINE_INTERFACE = GetDevice(3)
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_eng_rpm '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_eng_rpm()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_fire_lamp '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_fire_lamp()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_gas_prod_tach '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_gas_prod_tach()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_fire_test_lamp '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_fire_test_lamp()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_trans_oil_temp '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_trans_oil_temp()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_eng_torq '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_eng_torq()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_trans_oil_press '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_trans_oil_press()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_exhaust_temp '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_exhaust_temp()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_low_rpm_lamp '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_low_rpm_lamp()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_eng_oil_temp '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_eng_oil_temp()))
|
||||
ExportScript.Tools.WriteToLog('lENGINE_INTERFACE:get_eng_oil_press '..ExportScript.Tools.dump(lENGINE_INTERFACE:get_eng_oil_press()))
|
||||
|
||||
-- ADI_PILOT
|
||||
local lADI_PILOT = GetDevice(6)
|
||||
ExportScript.Tools.WriteToLog('lADI_PILOT:get_sideslip '..ExportScript.Tools.dump(lADI_PILOT:get_sideslip()))
|
||||
ExportScript.Tools.WriteToLog('lADI_PILOT:get_bank '..ExportScript.Tools.dump(lADI_PILOT:get_bank()))
|
||||
ExportScript.Tools.WriteToLog('lADI_PILOT:get_pitch '..ExportScript.Tools.dump(lADI_PILOT:get_pitch()))
|
||||
|
||||
-- RADAR_ALTIMETER
|
||||
local lRADAR_ALTIMETER = GetDevice(13)
|
||||
ExportScript.Tools.WriteToLog('lRADAR_ALTIMETER:get_distance_limit '..ExportScript.Tools.dump(lRADAR_ALTIMETER:get_distance_limit()))
|
||||
ExportScript.Tools.WriteToLog('lRADAR_ALTIMETER:get_aperture_size '..ExportScript.Tools.dump(lRADAR_ALTIMETER:get_aperture_size()))
|
||||
ExportScript.Tools.WriteToLog('lRADAR_ALTIMETER:get_mode '..ExportScript.Tools.dump(lRADAR_ALTIMETER:get_mode()))
|
||||
ExportScript.Tools.WriteToLog('lRADAR_ALTIMETER:get_altitude '..ExportScript.Tools.dump(lRADAR_ALTIMETER:get_altitude()))
|
||||
]]
|
||||
--[[
|
||||
-- VHF_ARC_134
|
||||
local lVHF_ARC_134 = GetDevice(20)
|
||||
ExportScript.Tools.WriteToLog('lVHF_ARC_134:is_on '..ExportScript.Tools.dump(lVHF_ARC_134:is_on()))
|
||||
ExportScript.Tools.WriteToLog('lVHF_ARC_134:get_frequency '..ExportScript.Tools.dump(lVHF_ARC_134:get_frequency()))
|
||||
--ExportScript.Tools.WriteToLog('lVHF_ARC_134:set_frequency '..ExportScript.Tools.dump(lVHF_ARC_134:set_frequency())) -- test parameters
|
||||
--ExportScript.Tools.WriteToLog('lVHF_ARC_134:set_modulation '..ExportScript.Tools.dump(lVHF_ARC_134:set_modulation())) -- test parameters
|
||||
--ExportScript.Tools.WriteToLog('lVHF_ARC_134:set_channel '..ExportScript.Tools.dump(lVHF_ARC_134:set_channel())) -- test parameters
|
||||
|
||||
-- INTERCOM
|
||||
local lINTERCOM = GetDevice(21)
|
||||
ExportScript.Tools.WriteToLog('lINTERCOM:is_communicator_available '..ExportScript.Tools.dump(lINTERCOM:is_communicator_available()))
|
||||
ExportScript.Tools.WriteToLog('lINTERCOM:get_noise_level '..ExportScript.Tools.dump(lINTERCOM:get_noise_level()))
|
||||
ExportScript.Tools.WriteToLog('lINTERCOM:get_signal_level '..ExportScript.Tools.dump(lINTERCOM:get_signal_level()))
|
||||
--ExportScript.Tools.WriteToLog('lINTERCOM:set_communicator '..ExportScript.Tools.dump(lINTERCOM:set_communicator())) -- test parameters
|
||||
--ExportScript.Tools.WriteToLog('lINTERCOM:set_voip_mode '..ExportScript.Tools.dump(lINTERCOM:set_voip_mode())) -- test parameters
|
||||
|
||||
-- UHF_ARC_51
|
||||
local lUHF_ARC_51 = GetDevice(22)
|
||||
ExportScript.Tools.WriteToLog('lUHF_ARC_51:is_on '..ExportScript.Tools.dump(lUHF_ARC_51:is_on()))
|
||||
ExportScript.Tools.WriteToLog('lUHF_ARC_51:get_frequency '..ExportScript.Tools.dump(lUHF_ARC_51:get_frequency()))
|
||||
--ExportScript.Tools.WriteToLog('lUHF_ARC_51:set_frequency '..ExportScript.Tools.dump(lUHF_ARC_51:set_frequency())) -- test parameters
|
||||
--ExportScript.Tools.WriteToLog('lUHF_ARC_51:set_modulation '..ExportScript.Tools.dump(lUHF_ARC_51:set_modulation())) -- test parameters
|
||||
--ExportScript.Tools.WriteToLog('lUHF_ARC_51:set_channel '..ExportScript.Tools.dump(lUHF_ARC_51:set_channel())) -- test parameters
|
||||
|
||||
-- VHF_ARC_131
|
||||
local lVHF_ARC_131 = GetDevice(23)
|
||||
ExportScript.Tools.WriteToLog('lVHF_ARC_131:is_on '..ExportScript.Tools.dump(lVHF_ARC_131:is_on()))
|
||||
ExportScript.Tools.WriteToLog('lVHF_ARC_131:get_frequency '..ExportScript.Tools.dump(lVHF_ARC_131:get_frequency()))
|
||||
--ExportScript.Tools.WriteToLog('lVHF_ARC_131:set_frequency '..ExportScript.Tools.dump(lVHF_ARC_131:set_frequency())) -- test parameters
|
||||
--ExportScript.Tools.WriteToLog('lVHF_ARC_131:set_modulation '..ExportScript.Tools.dump(lVHF_ARC_131:set_modulation())) -- test parameters
|
||||
--ExportScript.Tools.WriteToLog('lVHF_ARC_131:set_channel '..ExportScript.Tools.dump(lVHF_ARC_131:set_channel())) -- test parameters
|
||||
|
||||
ExportScript.Tools.WriteToLog('Frequency Mode Dial '..ExportScript.Tools.dump(mainPanelDevice:get_argument_value(15)))
|
||||
ExportScript.Tools.WriteToLog('Function Dial '..ExportScript.Tools.dump(mainPanelDevice:get_argument_value(17)))
|
||||
]]
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
39
Scripts/DCS-ExportScript/ExportsModules/_F-14B_Demo.lua
Normal file
39
Scripts/DCS-ExportScript/ExportsModules/_F-14B_Demo.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
-- F-14B Export
|
||||
-- Feel free to use, modify and repost in any way you desire.
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.F14B = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
|
||||
[1011] = "%1d", -- HUD LDG Mode
|
||||
[1012] = "%1d", -- HUD CRUISE Mode
|
||||
[1013] = "%1d", -- HUD A/A Mode
|
||||
[1014] = "%1d", -- HUD A/G Mode
|
||||
[1015] = "%1d", -- HUD Takeoff Mode
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
end
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
end
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
end
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
end
|
||||
1357
Scripts/DCS-ExportScript/ExportsModules/_F-14B_nosaMtrevoC.lua
Normal file
1357
Scripts/DCS-ExportScript/ExportsModules/_F-14B_nosaMtrevoC.lua
Normal file
File diff suppressed because it is too large
Load Diff
43
Scripts/DCS-ExportScript/lib/Maps.lua
Normal file
43
Scripts/DCS-ExportScript/lib/Maps.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
--
|
||||
-- Map Config File
|
||||
--
|
||||
-- Copyright by Michael aka McMicha 2014
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
--
|
||||
-- This file contains the data to identify the loaded map.
|
||||
--
|
||||
-- The data can be read in the editor.
|
||||
-- Load the corresponding map and read the latitude and longitude values and write specify the decimal degree format (convert from degrees, decimal to decimal degrees).
|
||||
-- Lat1 and Long1 contain the coordinates of the upper left corner.
|
||||
-- Lat2 and Long2 contain the coordinates of the lower right corner.
|
||||
--
|
||||
|
||||
ExportScript.Version.Maps = "1.2.1"
|
||||
|
||||
-- Maps
|
||||
ExportScript.Maps = {}
|
||||
-- Caucasus Map
|
||||
ExportScript.Maps.CaucasusBase = {}
|
||||
ExportScript.Maps.CaucasusBase.Lat1 = 48.384867 -- high left Latitude 48° 23. 92 N
|
||||
ExportScript.Maps.CaucasusBase.Long1 = 26.779467 -- high left Longitude 26° 46.768 E
|
||||
ExportScript.Maps.CaucasusBase.Lat2 = 38.865183 -- low right Latitude 38° 51.911 N
|
||||
ExportScript.Maps.CaucasusBase.Long2 = 47.14225 -- low right Longitude 47° 8.535 E
|
||||
-- Nevada (NTTR) Map
|
||||
ExportScript.Maps.Nevada = {} -- Nevada Map
|
||||
ExportScript.Maps.Nevada.Lat1 = 37.578333 -- high left Latitude 37° 34' 42" N
|
||||
ExportScript.Maps.Nevada.Long1 = -119.964722 -- high left Longitude 119° 57' 53" W
|
||||
ExportScript.Maps.Nevada.Lat2 = 34.651667 -- low right Latitude 34° 39' 06" N
|
||||
ExportScript.Maps.Nevada.Long2 = -114.536111 -- low right Longitude 114° 32' 10" W
|
||||
-- Normandy Map
|
||||
ExportScript.Maps.Normandy = {} -- Normandy Map
|
||||
ExportScript.Maps.Normandy.Lat1 = 53.85556 -- high left Latitude 53° 51' 20" N
|
||||
ExportScript.Maps.Normandy.Long1 = -15.02667 -- high left Longitude 15° 01' 36" W
|
||||
ExportScript.Maps.Normandy.Lat2 = 45.07167 -- low right Latitude 45° 04' 18" N
|
||||
ExportScript.Maps.Normandy.Long2 = 8.437222 -- low right Longitude 08° 26' 14" E
|
||||
-- Persian Gulf Map
|
||||
ExportScript.Maps.PersianGulf = {}
|
||||
ExportScript.Maps.PersianGulf.Lat1 = 30.50833 -- high left Latitude 30° 20.630 N
|
||||
ExportScript.Maps.PersianGulf.Long1 = 45.15167 -- high left Longitude 44° 54.906 E
|
||||
ExportScript.Maps.PersianGulf.Lat2 = 22.43528 -- low right Latitude 22° 24.127 N
|
||||
ExportScript.Maps.PersianGulf.Long2 = 61.67306 -- low right Longitude 61° 36.263 E
|
||||
992
Scripts/DCS-ExportScript/lib/Tools.lua
Normal file
992
Scripts/DCS-ExportScript/lib/Tools.lua
Normal file
@@ -0,0 +1,992 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
--
|
||||
-- Tools
|
||||
--
|
||||
-- Copyright by Michael aka McMicha 2014 - 2018
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
|
||||
ExportScript.Tools = {}
|
||||
ExportScript.Version.Tools = "1.2.1"
|
||||
|
||||
function ExportScript.Tools.WriteToLog(message)
|
||||
if ExportScript.logFile then
|
||||
local ltmp, lMiliseconds = math.modf(os.clock())
|
||||
if lMiliseconds==0 then
|
||||
lMiliseconds='000'
|
||||
else
|
||||
lMiliseconds=tostring(lMiliseconds):sub(3,5)
|
||||
end
|
||||
ExportScript.logFile:write(os.date("%X")..":"..lMiliseconds.." : "..message.."\r\n")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.createUDPSender()
|
||||
ExportScript.socket = require("socket")
|
||||
|
||||
local lcreateUDPSender = ExportScript.socket.protect(function()
|
||||
ExportScript.UDPsender = ExportScript.socket.udp()
|
||||
ExportScript.socket.try(ExportScript.UDPsender:setsockname("*", 0))
|
||||
--ExportScript.socket.try(ExportScript.UDPsender:settimeout(.004)) -- set the timeout for reading the socket; 250 fps
|
||||
end)
|
||||
|
||||
local ln, lerror = lcreateUDPSender()
|
||||
if lerror ~= nil then
|
||||
ExportScript.Tools.WriteToLog("createUDPSender protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
return
|
||||
end
|
||||
|
||||
ExportScript.Tools.WriteToLog("Create UDPSender")
|
||||
end
|
||||
|
||||
function ExportScript.Tools.createUDPListner()
|
||||
if ExportScript.Config.Listener then
|
||||
ExportScript.socket = require("socket")
|
||||
|
||||
local lcreateUDPListner = ExportScript.socket.protect(function()
|
||||
ExportScript.UDPListener = ExportScript.socket.udp()
|
||||
ExportScript.socket.try(ExportScript.UDPListener:setsockname("*", ExportScript.Config.ListenerPort))
|
||||
ExportScript.socket.try(ExportScript.UDPListener:settimeout(.001)) -- set the timeout for reading the socket; 250 fps
|
||||
end)
|
||||
|
||||
local ln, lerror = lcreateUDPListner()
|
||||
if lerror ~= nil then
|
||||
ExportScript.Tools.WriteToLog("createUDPListner protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
return
|
||||
end
|
||||
|
||||
ExportScript.Tools.WriteToLog("Create UDPListner")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ProcessInput()
|
||||
local lCommand, lCommandArgs, lDevice
|
||||
-- C1,3001,4
|
||||
-- lComand = C
|
||||
-- lCommandArgs[1] = 1 => lDevice
|
||||
-- lCommandArgs[2] = 3001 => ButtonID
|
||||
-- lCommandArgs[3] = 4 => Value
|
||||
if ExportScript.Config.Listener then
|
||||
--local lInput,from,port = ExportScript.UDPListener:receivefrom()
|
||||
ExportScript.UDPListenerValues = {}
|
||||
|
||||
local lUDPListenerReceivefrom = ExportScript.socket.protect(function()
|
||||
--[[
|
||||
local try = ExportScript.socket.newtry(function()
|
||||
ExportScript.UDPListener:close()
|
||||
ExportScript.Tools.createUDPListner()
|
||||
end)
|
||||
ExportScript.UDPListenerValues.Input, ExportScript.UDPListenerValues.from, ExportScript.UDPListenerValues.port = try(ExportScript.UDPListener:receivefrom())
|
||||
]] -- Bei einer newtry Funktion wird im fehlerfall deren inhalt ausgeführt.
|
||||
ExportScript.UDPListenerValues.Input, ExportScript.UDPListenerValues.from, ExportScript.UDPListenerValues.port = ExportScript.socket.try(ExportScript.UDPListener:receivefrom())
|
||||
end)
|
||||
|
||||
local ln, lerror = lUDPListenerReceivefrom()
|
||||
if lerror ~= nil and lerror ~= "timeout" then
|
||||
ExportScript.Tools.WriteToLog("UDPListenerReceivefrom protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
ExportScript.UDPListener:close()
|
||||
ExportScript.Tools.createUDPListner()
|
||||
end
|
||||
|
||||
local lInput, from, port = ExportScript.UDPListenerValues.Input, ExportScript.UDPListenerValues.from, ExportScript.UDPListenerValues.port
|
||||
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("lInput: "..ExportScript.Tools.dump(lInput)..", from: "..ExportScript.Tools.dump(from)..", port: "..ExportScript.Tools.dump(port))
|
||||
end
|
||||
if lInput then
|
||||
lCommand = string.sub(lInput,1,1)
|
||||
|
||||
if lCommand == "R" then -- R == Reset
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.ResetChangeValues()
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("Reset fuer Ikarus Daten")
|
||||
end
|
||||
end
|
||||
if ExportScript.Config.DACExport then
|
||||
ExportScript.Tools.ResetChangeValuesDAC()
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("Reset fuer DAC Daten")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (lCommand == "C") then
|
||||
lCommandArgs = ExportScript.Tools.StrSplit(string.sub(lInput,2),",")
|
||||
lDeviceID = tonumber(lCommandArgs[1])
|
||||
if lDeviceID < 1000 then
|
||||
-- DCS Modules
|
||||
lDevice = GetDevice(lCommandArgs[1])
|
||||
if ExportScript.FoundDCSModule and type(lDevice) == "table" then
|
||||
lDevice:performClickableAction(lCommandArgs[2],lCommandArgs[3])
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("performClickableAction for Device: "..lCommandArgs[1]..", ButtonID: "..lCommandArgs[2]..", Value: "..lCommandArgs[3])
|
||||
end
|
||||
end
|
||||
elseif lDeviceID == 1000 then
|
||||
-- ExportScript.genericRadio(key, value)
|
||||
if ExportScript.FoundDCSModule then
|
||||
ExportScript.genericRadio(lCommandArgs[2],lCommandArgs[3])
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("genericRadio, ButtonID: "..lCommandArgs[2]..", Value: "..lCommandArgs[3])
|
||||
end
|
||||
end
|
||||
elseif lDeviceID == 2000 then
|
||||
-- Flaming Cliffs Module (Buttons)
|
||||
if ExportScript.FoundFCModule then
|
||||
-- ComamndID > 3000, because DAC or Ikarus add 300 to CommandID
|
||||
local lComandID = (tonumber(lCommandArgs[2]) - 3000)
|
||||
if tonumber(lCommandArgs[3]) == 1.0 then
|
||||
LoSetCommand(lComandID)
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("LoSetCommand, CommandID: "..lComandID)
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif lDeviceID == 2001 then
|
||||
-- Flaming Cliffs Module (analog axies)
|
||||
if ExportScript.FoundFCModule then
|
||||
-- ComamndID > 3000, because DAC or Ikarus add 3000 to CommandID
|
||||
local lComandID = (tonumber(lCommandArgs[2]) - 3000)
|
||||
LoSetCommand(lComandID, lCommandArgs[3])
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("LoSetCommand, CommandID: "..lComandID..", Value: "..lCommandArgs[3])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ProcessOutput()
|
||||
local coStatus
|
||||
--local currentTime = LoGetModelTime()
|
||||
|
||||
local lMyInfo = LoGetSelfData()
|
||||
if lMyInfo ~= nil then
|
||||
if ExportScript.ModuleName ~= lMyInfo.Name then
|
||||
ExportScript.NoLuaExportBeforeNextFrame = false
|
||||
ExportScript.Tools.SelectModule() -- point globals to Module functions and data.
|
||||
return
|
||||
end
|
||||
lMyInfo = nil
|
||||
end
|
||||
|
||||
local lDevice = GetDevice(0)
|
||||
if type(lDevice) == "table" and ExportScript.FoundDCSModule then
|
||||
|
||||
lDevice:update_arguments()
|
||||
|
||||
--if currentTime - ExportScript.lastExportTimeHI > ExportScript.Config.ExportInterval then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run hight importance export universally")
|
||||
ExportScript.Tools.ProcessArguments(lDevice, ExportScript.EveryFrameArguments) -- Module arguments as appropriate
|
||||
else
|
||||
ExportScript.coProcessArguments_EveryFrame = coroutine.create(ExportScript.Tools.ProcessArguments)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessArguments_EveryFrame, lDevice, ExportScript.EveryFrameArguments)
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run hight importance export Ikarus")
|
||||
ExportScript.ProcessIkarusDCSHighImportance(lDevice) -- Module, as appropriate; determined in ExportScript.Tools.SelectModule()
|
||||
else
|
||||
ExportScript.coProcessIkarusDCSHighImportance = coroutine.create(ExportScript.ProcessIkarusDCSHighImportance)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessIkarusDCSHighImportance, lDevice)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run hight importance export DAC")
|
||||
ExportScript.ProcessDACHighImportance(lDevice) -- Module, as appropriate; determined in ExportScript.Tools.SelectModule()
|
||||
else
|
||||
ExportScript.coProcessDACHighImportance = coroutine.create(ExportScript.ProcessDACHighImportance)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessDACHighImportance, lDevice)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.FirstNewDataSend and ExportScript.FirstNewDataSendCount == 0 then
|
||||
if ExportScript.Config.DACExport then
|
||||
ExportScript.Tools.ResetChangeValuesDAC()
|
||||
end
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.WriteToLog("reset dcs ikarus")
|
||||
ExportScript.Tools.ResetChangeValues()
|
||||
end
|
||||
ExportScript.FirstNewDataSend = false
|
||||
else
|
||||
ExportScript.FirstNewDataSendCount = ExportScript.FirstNewDataSendCount - 1
|
||||
end
|
||||
|
||||
--ExportScript.lastExportTimeHI = currentTime
|
||||
ExportScript.lastExportTimeHI = ExportScript.lastExportTimeHI + ExportScript.Config.ExportInterval
|
||||
--end
|
||||
|
||||
--if currentTime - ExportScript.lastExportTimeLI > ExportScript.Config.ExportLowTickInterval then
|
||||
if ExportScript.lastExportTimeHI > ExportScript.Config.ExportLowTickInterval then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run low importance export universally")
|
||||
ExportScript.Tools.ProcessArguments(lDevice, ExportScript.Arguments) -- Module arguments as appropriate
|
||||
else
|
||||
ExportScript.coProcessArguments_Arguments = coroutine.create(ExportScript.Tools.ProcessArguments)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessArguments_Arguments, lDevice, ExportScript.Arguments)
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run low importance export Ikarus")
|
||||
ExportScript.ProcessIkarusDCSLowImportance(lDevice) -- Module as appropriate; determined in ExportScript.Tools.SelectModule()
|
||||
else
|
||||
ExportScript.coProcessIkarusDCSLowImportance = coroutine.create(ExportScript.ProcessIkarusDCSLowImportance)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessIkarusDCSLowImportance, lDevice)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run low importance export DAC")
|
||||
ExportScript.ProcessDACLowImportance(lDevice) -- Module, as appropriate; determined in ExportScript.Tools.SelectModule()
|
||||
else
|
||||
ExportScript.coProcessDACLowImportance = coroutine.create(ExportScript.ProcessDACLowImportance)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessDACLowImportance, lDevice)
|
||||
end
|
||||
end
|
||||
|
||||
--ExportScript.lastExportTimeLI = currentTime
|
||||
ExportScript.lastExportTimeHI = 0
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.FlushData()
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport then
|
||||
for i=1, #ExportScript.Config.DAC, 1 do
|
||||
ExportScript.Tools.FlushDataDAC(i)
|
||||
end
|
||||
end
|
||||
elseif ExportScript.FoundFCModule then -- Assume FC Aircraft
|
||||
|
||||
ExportScript.AF.EventNumber = os.clock() --tonumber(tostring(os.clock()):gsub(".", ""))
|
||||
|
||||
--if currentTime - ExportScript.lastExportTimeHI > ExportScript.Config.ExportInterval then
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run hight importance export Ikarus")
|
||||
ExportScript.ProcessIkarusFCHighImportance()
|
||||
else
|
||||
ExportScript.coProcessGlassCockpitFCHighImportance = coroutine.create(ExportScript.ProcessIkarusFCHighImportance)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessGlassCockpitFCHighImportance)
|
||||
end
|
||||
end
|
||||
if ExportScript.Config.DACExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run hight importance export DAC")
|
||||
ExportScript.ProcessDACHighImportance(lDevice)
|
||||
else
|
||||
ExportScript.coProcessDACHighImportance = coroutine.create(ExportScript.ProcessDACHighImportance)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessDACHighImportance, lDevice)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.FirstNewDataSend and ExportScript.FirstNewDataSendCount == 0 then
|
||||
if ExportScript.Config.DACExport then
|
||||
ExportScript.Tools.ResetChangeValuesDAC()
|
||||
end
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.WriteToLog("reset fc ikarus")
|
||||
ExportScript.Tools.ResetChangeValues()
|
||||
end
|
||||
ExportScript.FirstNewDataSend = false
|
||||
else
|
||||
ExportScript.FirstNewDataSendCount = ExportScript.FirstNewDataSendCount - 1
|
||||
end
|
||||
|
||||
--ExportScript.lastExportTimeHI = currentTime
|
||||
ExportScript.lastExportTimeHI = ExportScript.lastExportTimeHI + ExportScript.Config.ExportInterval
|
||||
--end
|
||||
|
||||
--if currentTime - ExportScript.lastExportTimeLI > ExportScript.Config.ExportLowTickInterval then
|
||||
if ExportScript.lastExportTimeHI > ExportScript.Config.ExportLowTickInterval then
|
||||
if ExportScript.Config.IkarusExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run low importance export Ikarus")
|
||||
ExportScript.ProcessIkarusFCLowImportance()
|
||||
else
|
||||
ExportScript.coProcessIkarusFCLowImportance = coroutine.create(ExportScript.ProcessIkarusFCLowImportance)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessIkarusFCLowImportance)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run low importance export DAC")
|
||||
ExportScript.ProcessDACLowImportance(lDevice)
|
||||
else
|
||||
ExportScript.coProcessDACLowImportance = coroutine.create(ExportScript.ProcessDACLowImportance)
|
||||
coStatus = coroutine.resume( ExportScript.coProcessDACLowImportance, lDevice)
|
||||
end
|
||||
end
|
||||
|
||||
--ExportScript.lastExportTimeLI = currentTime
|
||||
ExportScript.lastExportTimeHI = 0
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.FlushData()
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport then
|
||||
for i=1, #ExportScript.Config.DAC, 1 do
|
||||
ExportScript.Tools.FlushDataDAC(i)
|
||||
end
|
||||
end
|
||||
else -- No Module found
|
||||
if ExportScript.FoundNoModul then
|
||||
ExportScript.Tools.WriteToLog("No Module Found.")
|
||||
ExportScript.Tools.SelectModule() -- point globals to Module functions and data.
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.StrSplit(str, delim, maxNb)
|
||||
-- Eliminate bad cases...
|
||||
if string.find(str, delim) == nil then
|
||||
return { str }
|
||||
end
|
||||
if maxNb == nil or maxNb < 1 then
|
||||
maxNb = 0 -- No limit
|
||||
end
|
||||
local lResult = {}
|
||||
local lPat = "(.-)" .. delim .. "()"
|
||||
local lNb = 0
|
||||
local lLastPos
|
||||
for part, pos in string.gfind(str, lPat) do
|
||||
-- for part, pos in string.gmatch(str, lPat) do -- Lua Version > 5.1
|
||||
lNb = lNb + 1
|
||||
lResult[lNb] = part
|
||||
lLastPos = pos
|
||||
if lNb == maxNb then break end
|
||||
end
|
||||
-- Handle the last field
|
||||
if lNb ~= maxNb then
|
||||
lResult[lNb + 1] = string.sub(str, lLastPos)
|
||||
end
|
||||
return lResult
|
||||
end
|
||||
|
||||
-- remove trailing and leading whitespace from string.
|
||||
function ExportScript.Tools.trim(s)
|
||||
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
|
||||
-- remove leading whitespace from string.
|
||||
function ExportScript.Tools.ltrim(s)
|
||||
return (s:gsub("^%s*", ""))
|
||||
end
|
||||
|
||||
-- remove trailing whitespace from string.
|
||||
function ExportScript.Tools.rtrim(s)
|
||||
local n = #s
|
||||
while n > 0 and s:find("^%s", n) do n = n - 1 end
|
||||
return s:sub(1, n)
|
||||
end
|
||||
-- The following more obvious implementation is generally not
|
||||
-- as efficient, particularly for long strings since Lua pattern matching
|
||||
-- starts at the left (though in special cases it is more efficient).
|
||||
-- Related discussion on p.197 of book "Beginning Lua Programming".
|
||||
--[[
|
||||
function ExportScript.Tools.rtrim(s)
|
||||
return (s:gsub("%s*$", ""))
|
||||
end
|
||||
]]
|
||||
|
||||
-- substitute variables into string.
|
||||
-- Example: subst("a=$(a),b=$(b)", {a=1, b=2}) --> "a=1,b=2".
|
||||
function ExportScript.Tools.subst(s, t)
|
||||
-- note: handle {a=false} substitution
|
||||
s = s:gsub("%$%(([%w_]+)%)", function(name)
|
||||
local val = t[name]
|
||||
return val ~= nil and tostring(val)
|
||||
end)
|
||||
return s
|
||||
end
|
||||
|
||||
--[[
|
||||
function ExportScript.Tools.round(num, idp)
|
||||
local lMult = 10^(idp or 0)
|
||||
return math.floor(num * lMult + 0.5) / lMult
|
||||
end
|
||||
]]
|
||||
|
||||
-- this function negate the numeric input values
|
||||
function ExportScript.Tools.negate(Input)
|
||||
if type(Input) == "number" then
|
||||
return (Input > 0.0 and (0 - Input) or (Input - Input - Input))
|
||||
else
|
||||
return Input
|
||||
end
|
||||
end
|
||||
|
||||
-- Status Gathering Functions
|
||||
function ExportScript.Tools.ProcessArguments(device, arguments)
|
||||
local lArgument , lFormat , lArgumentValue
|
||||
local lCounter = 0
|
||||
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("======Begin========")
|
||||
end
|
||||
|
||||
for lArgument, lFormat in pairs(arguments) do
|
||||
lArgumentValue = string.format(lFormat,device:get_argument_value(lArgument))
|
||||
if ExportScript.Config.Debug then
|
||||
lCounter = lCounter + 1
|
||||
ExportScript.Tools.WriteToLog(lCounter..". ID: "..lArgument..", Fromat: "..lFormat..", Value: "..lArgumentValue)
|
||||
end
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.SendData(lArgument, lArgumentValue)
|
||||
end
|
||||
if ExportScript.Config.DACExport then
|
||||
ExportScript.Tools.SendDataDAC(lArgument, lArgumentValue)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("======End========")
|
||||
end
|
||||
end
|
||||
|
||||
-- Network Functions for GlassCockpit
|
||||
function ExportScript.Tools.SendData(id, value)
|
||||
if id == nil then
|
||||
ExportScript.Tools.WriteToLog("Export id is nil")
|
||||
return
|
||||
end
|
||||
if value == nil then
|
||||
ExportScript.Tools.WriteToLog("Value for id "..id.." is nil")
|
||||
return
|
||||
end
|
||||
|
||||
if string.len(value) > 3 and value == string.sub("-0.00000000",1, string.len(value)) then
|
||||
value = value:sub(2)
|
||||
end
|
||||
|
||||
if ExportScript.LastData[id] == nil or ExportScript.LastData[id] ~= value then
|
||||
local ldata = id .. "=" .. value
|
||||
local ldataLen = string.len(ldata)
|
||||
|
||||
if ldataLen + ExportScript.PacketSize > 576 then
|
||||
ExportScript.Tools.FlushData()
|
||||
end
|
||||
|
||||
table.insert(ExportScript.SendStrings, ldata)
|
||||
ExportScript.LastData[id] = value
|
||||
ExportScript.PacketSize = ExportScript.PacketSize + ldataLen + 1
|
||||
end
|
||||
end
|
||||
|
||||
-- Network Functions for DAC
|
||||
function ExportScript.Tools.SendDataDAC(id, value)
|
||||
for hardware=1, #ExportScript.Config.DAC, 1 do
|
||||
if id == nil then
|
||||
ExportScript.Tools.WriteToLog("Export id is nil")
|
||||
return
|
||||
end
|
||||
if value == nil then
|
||||
ExportScript.Tools.WriteToLog("Value for id "..id.." is nil")
|
||||
return
|
||||
end
|
||||
if ExportScript.Config.DAC[hardware] == nil then
|
||||
ExportScript.Tools.WriteToLog("unknown hardware ID '"..hardware.."' for value: '"..id.."="..value.."'")
|
||||
return
|
||||
end
|
||||
|
||||
if string.len(value) > 3 and value == string.sub("-0.00000000",1, string.len(value)) then
|
||||
value = value:sub(2)
|
||||
end
|
||||
|
||||
if ExportScript.LastDataDAC[hardware][id] == nil or ExportScript.LastDataDAC[hardware][id] ~= value then
|
||||
local ldata = id .. "=" .. value
|
||||
local ldataLen = string.len(ldata)
|
||||
|
||||
if ldataLen + ExportScript.PacketSizeDAC[hardware] > 576 then
|
||||
ExportScript.Tools.FlushDataDAC(hardware)
|
||||
end
|
||||
|
||||
table.insert(ExportScript.SendStringsDAC[hardware], ldata)
|
||||
ExportScript.LastDataDAC[hardware][id] = value
|
||||
ExportScript.PacketSizeDAC[hardware] = ExportScript.PacketSizeDAC[hardware] + ldataLen + 1
|
||||
--ExportScript.Tools.WriteToLog("id=ldata: "..ldata)
|
||||
--ExportScript.Tools.WriteToLog("ExportScript.LastDataDAC["..hardware.."]: "..ExportScript.Tools.dump(ExportScript.LastDataDAC[hardware]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
function ExportScript.Tools.FlushData()
|
||||
if #ExportScript.SendStrings > 0 then
|
||||
local lES_SimID = ""
|
||||
|
||||
lES_SimID = ExportScript.SimID
|
||||
|
||||
local lPacket = lES_SimID .. table.concat(ExportScript.SendStrings, ExportScript.Config.IkarusSeparator) .. "\n"
|
||||
ExportScript.socket.try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.IkarusHost, ExportScript.Config.IkarusPort))
|
||||
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushData: send the following data to host: "..ExportScript.Config.IkarusHost..", Port: "..ExportScript.Config.IkarusPort..", Data: "..lPacket)
|
||||
end
|
||||
|
||||
ExportScript.SendStrings = {}
|
||||
ExportScript.PacketSize = 0
|
||||
else
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushData: nothing sent")
|
||||
end
|
||||
end
|
||||
end
|
||||
]]
|
||||
|
||||
function ExportScript.Tools.FlushData()
|
||||
local lFlushData = ExportScript.socket.protect(function()
|
||||
if #ExportScript.SendStrings > 0 then
|
||||
local lES_SimID = ""
|
||||
|
||||
lES_SimID = ExportScript.SimID
|
||||
|
||||
local lPacket = lES_SimID .. table.concat(ExportScript.SendStrings, ExportScript.Config.IkarusSeparator) .. "\n"
|
||||
--ExportScript.socket.try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.IkarusHost, ExportScript.Config.IkarusPort))
|
||||
local try = ExportScript.socket.newtry(function() ExportScript.UDPsender:close() ExportScript.Tools.createUDPSender() ExportScript.Tools.ResetChangeValues() end)
|
||||
try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.IkarusHost, ExportScript.Config.IkarusPort))
|
||||
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushData: send to host: "..ExportScript.Config.IkarusHost..", Port: "..ExportScript.Config.IkarusPort..", Data: "..lPacket)
|
||||
end
|
||||
|
||||
ExportScript.SendStrings = {}
|
||||
ExportScript.PacketSize = 0
|
||||
else
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushData: nothing sent")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local ln, lerror = lFlushData()
|
||||
if lerror ~= nil then
|
||||
ExportScript.Tools.WriteToLog("FlushData protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function ExportScript.Tools.FlushDataDAC(hardware)
|
||||
hardware = hardware or 1
|
||||
|
||||
if ExportScript.Config.DAC[hardware] == nil then
|
||||
ExportScript.Tools.WriteToLog("FlushDataDAC: unknown hardware ID '"..hardware.."'")
|
||||
return
|
||||
end
|
||||
|
||||
local lFlushDataDAC = ExportScript.socket.protect(function()
|
||||
if #ExportScript.SendStringsDAC[hardware] > 0 then
|
||||
local lPacket = ExportScript.SimID .. table.concat(ExportScript.SendStringsDAC[hardware], ExportScript.Config.DAC[hardware].Separator) .. "\n"
|
||||
--ExportScript.socket.try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.DAC[hardware].Host, ExportScript.Config.DAC[hardware].SendPort))
|
||||
local try = ExportScript.socket.newtry(function() ExportScript.UDPsender:close() ExportScript.Tools.createUDPSender() ExportScript.Tools.ResetChangeValuesDAC() end)
|
||||
try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.DAC[hardware].Host, ExportScript.Config.DAC[hardware].SendPort))
|
||||
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushDataDAC["..hardware.."]: send to host: "..ExportScript.Config.DAC[hardware].Host..", Port: "..ExportScript.Config.DAC[hardware].SendPort..", Data: "..lPacket)
|
||||
end
|
||||
|
||||
ExportScript.SendStringsDAC[hardware] = {}
|
||||
ExportScript.PacketSizeDAC[hardware] = 0
|
||||
else
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushDataDAC["..hardware.."]: nothing sent")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local ln, lerror = lFlushDataDAC()
|
||||
if lerror ~= nil then
|
||||
ExportScript.Tools.WriteToLog("FlushDataDAC protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ResetChangeValues()
|
||||
ExportScript.LastData = {}
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ResetChangeValuesDAC()
|
||||
for i = 1, #ExportScript.Config.DAC, 1 do
|
||||
ExportScript.LastDataDAC[i] = {}
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.SelectModule()
|
||||
-- Select Module...
|
||||
ExportScript.FoundDCSModule = false
|
||||
ExportScript.FoundFCModule = false
|
||||
ExportScript.FoundNoModul = true
|
||||
|
||||
local lMyInfo = LoGetSelfData()
|
||||
if lMyInfo == nil then -- End SelectModule, if don't selected a aircraft
|
||||
return
|
||||
end
|
||||
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("MyInfo: "..ExportScript.Tools.dump(lMyInfo))
|
||||
end
|
||||
|
||||
ExportScript.ModuleName = lMyInfo.Name
|
||||
local lModuleName = ExportScript.ModuleName..".lua"
|
||||
local lModuleFile = ""
|
||||
|
||||
ExportScript.FoundNoModul = false
|
||||
|
||||
for file in lfs.dir(ExportScript.Config.ExportModulePath) do
|
||||
if lfs.attributes(ExportScript.Config.ExportModulePath..file,"mode") == "file" then
|
||||
if file == lModuleName then
|
||||
lModuleFile = ExportScript.Config.ExportModulePath..file
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ExportScript.Tools.WriteToLog("File Path: "..lModuleFile)
|
||||
|
||||
if string.len(lModuleFile) > 1 then
|
||||
ExportScript.Tools.ResetChangeValuesDAC()
|
||||
|
||||
-- load Aircraft File
|
||||
dofile(lModuleFile)
|
||||
if ExportScript.Config.DACExport then
|
||||
ExportScript.Tools.SendDataDAC("File", lMyInfo.Name)
|
||||
for i=1, #ExportScript.Config.DAC, 1 do
|
||||
ExportScript.Tools.FlushDataDAC(i)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.SendData("File", lMyInfo.Name)
|
||||
end
|
||||
|
||||
ExportScript.Tools.WriteToLog("File '"..lModuleFile.."' loaded")
|
||||
|
||||
ExportScript.Tools.WriteToLog("Version:")
|
||||
for k,v in pairs(ExportScript.Version) do
|
||||
ExportScript.Tools.WriteToLog(k..": "..v)
|
||||
end
|
||||
|
||||
ExportScript.FirstNewDataSend = ExportScript.Config.FirstNewDataSend
|
||||
ExportScript.FirstNewDataSendCount = ExportScript.Config.FirstNewDataSendCount
|
||||
|
||||
if ExportScript.FoundDCSModule then
|
||||
local lCounter = 0
|
||||
for k, v in pairs(ExportScript.ConfigEveryFrameArguments) do
|
||||
lCounter = lCounter + 1
|
||||
end
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("ExportScript.ConfigEveryFrameArguments Count: "..lCounter)
|
||||
end
|
||||
if lCounter > 0 then
|
||||
ExportScript.EveryFrameArguments = ExportScript.ConfigEveryFrameArguments
|
||||
else
|
||||
-- no Arguments
|
||||
ExportScript.EveryFrameArguments = {}
|
||||
end
|
||||
lCounter = 0
|
||||
for k, v in pairs(ExportScript.ConfigArguments) do
|
||||
lCounter = lCounter + 1
|
||||
end
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("ExportScript.ConfigArguments Count: "..lCounter)
|
||||
end
|
||||
if lCounter > 0 then
|
||||
ExportScript.Arguments = ExportScript.ConfigArguments
|
||||
else
|
||||
-- no Arguments
|
||||
ExportScript.Arguments = {}
|
||||
end
|
||||
|
||||
ExportScript.ProcessIkarusDCSHighImportance = ExportScript.ProcessIkarusDCSConfigHighImportance
|
||||
ExportScript.ProcessIkarusDCSLowImportance = ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
ExportScript.ProcessDACHighImportance = ExportScript.ProcessDACConfigHighImportance
|
||||
ExportScript.ProcessDACLowImportance = ExportScript.ProcessDACConfigLowImportance
|
||||
|
||||
elseif ExportScript.FoundFCModule then
|
||||
ExportScript.ProcessIkarusFCHighImportance = ExportScript.ProcessIkarusFCHighImportanceConfig
|
||||
ExportScript.ProcessIkarusFCLowImportance = ExportScript.ProcessIkarusFCLowImportanceConfig
|
||||
ExportScript.ProcessDACHighImportance = ExportScript.ProcessDACConfigHighImportance
|
||||
ExportScript.ProcessDACLowImportance = ExportScript.ProcessDACConfigLowImportance
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown Module Type: "..lMyInfo.Name)
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
for Map, LatLong in pairs(ExportScript.Maps) do
|
||||
if lMyInfo.LatLongAlt.Lat > LatLong.Lat2 and lMyInfo.LatLongAlt.Lat < LatLong.Lat1 then
|
||||
if lMyInfo.LatLongAlt.Long > LatLong.Long1 and lMyInfo.LatLongAlt.Long < LatLong.Long2 then
|
||||
ExportScript.Tools.WriteToLog("Detected Map: "..Map)
|
||||
ExportScript.Tools.SendData("Map", Map)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ExportScript.Tools.FlushData()
|
||||
end
|
||||
|
||||
else -- Unknown Module
|
||||
ExportScript.ProcessIkarusDCSHighImportance = ExportScript.ProcessIkarusDCSHighImportanceNoConfig
|
||||
ExportScript.ProcessIkarusDCSLowImportance = ExportScript.ProcessIkarusDCSLowImportanceNoConfig
|
||||
ExportScript.ProcessIkarusFCHighImportance = ExportScript.ProcessIkarusFCHighImportanceNoConfig
|
||||
ExportScript.ProcessIkarusFCLowImportance = ExportScript.ProcessIkarusFCLowImportanceNoConfig
|
||||
ExportScript.ProcessDACHighImportance = ExportScript.ProcessDACHighImportanceNoConfig
|
||||
ExportScript.ProcessDACLowImportance = ExportScript.ProcessDACLowImportanceNoConfig
|
||||
ExportScript.EveryFrameArguments = {}
|
||||
ExportScript.Arguments = {}
|
||||
|
||||
ExportScript.Tools.WriteToLog("Version:")
|
||||
for k,v in pairs(ExportScript.Version) do
|
||||
ExportScript.Tools.WriteToLog(k..": "..v)
|
||||
end
|
||||
ExportScript.Tools.WriteToLog("Unknown Module Name: "..lMyInfo.Name)
|
||||
end
|
||||
end
|
||||
|
||||
-- The ExportScript.Tools.dump function show the content of the specified variable.
|
||||
-- ExportScript.Tools.dump is similar to PHP function dump and show variables from type
|
||||
-- "nil, "number", "string", "boolean, "table", "function", "thread" and "userdata"
|
||||
function ExportScript.Tools.dump(var, depth)
|
||||
depth = depth or 0
|
||||
if type(var) == "string" then
|
||||
return 'string: "' .. var .. '"\n'
|
||||
elseif type(var) == "nil" then
|
||||
return 'nil\n'
|
||||
elseif type(var) == "number" then
|
||||
return 'number: "' .. var .. '"\n'
|
||||
elseif type(var) == "boolean" then
|
||||
return 'boolean: "' .. tostring(var) .. '"\n'
|
||||
elseif type(var) == "function" then
|
||||
if debug and debug.getinfo then
|
||||
fcnname = tostring(var)
|
||||
local info = debug.getinfo(var, "S")
|
||||
if info.what == "C" then
|
||||
return string.format('%q', fcnname .. ', C function') .. '\n'
|
||||
else
|
||||
if (string.sub(info.source, 1, 2) == [[./]]) then
|
||||
return string.format('%q', fcnname .. ', defined in (' .. info.linedefined .. '-' .. info.lastlinedefined .. ')' .. info.source) ..'\n'
|
||||
else
|
||||
return string.format('%q', fcnname .. ', defined in (' .. info.linedefined .. '-' .. info.lastlinedefined .. ')') ..'\n'
|
||||
end
|
||||
end
|
||||
else
|
||||
return 'a function\n'
|
||||
end
|
||||
elseif type(var) == "thread" then
|
||||
return 'thread\n'
|
||||
elseif type(var) == "userdata" then
|
||||
return tostring(var)..'\n'
|
||||
elseif type(var) == "table" then
|
||||
depth = depth + 1
|
||||
out = "{\n"
|
||||
for k,v in pairs(var) do
|
||||
out = out .. (" "):rep(depth*4).. "["..k.."] = " .. ExportScript.Tools.dump(v, depth)
|
||||
end
|
||||
return out .. (" "):rep((depth-1)*4) .. "}\n"
|
||||
else
|
||||
return tostring(var) .. "\n"
|
||||
end
|
||||
end
|
||||
|
||||
-- round function for math libraray
|
||||
-- number : value
|
||||
-- decimals: number of decimal
|
||||
-- method : ceil: Returns the smallest integer larger than or equal to number
|
||||
-- floor: Returns the smallest integer smaller than or equal to number
|
||||
function ExportScript.Tools.round(number, decimals, method)
|
||||
if string.find(number, "%p" ) ~= nil then
|
||||
decimals = decimals or 0
|
||||
local lFactor = 10 ^ decimals
|
||||
if (method == "ceil" or method == "floor") then
|
||||
-- ceil: Returns the smallest integer larger than or equal to number
|
||||
-- floor: Returns the smallest integer smaller than or equal to number
|
||||
return math[method](number * lFactor) / lFactor
|
||||
else
|
||||
return tonumber(("%."..decimals.."f"):format(number))
|
||||
end
|
||||
else
|
||||
return number
|
||||
end
|
||||
end
|
||||
|
||||
-- split function for string libraray
|
||||
-- stringvalue: value
|
||||
-- delimiter : delimiter for split
|
||||
-- for example, see http://www.lua.org/manual/5.1/manual.html#5.4.1
|
||||
function ExportScript.Tools.split(stringvalue, delimiter)
|
||||
result = {};
|
||||
for match in (stringvalue..delimiter):gmatch("(.-)"..delimiter) do
|
||||
table.insert(result, match);
|
||||
end
|
||||
return result;
|
||||
end
|
||||
|
||||
-- the function checks whether the cockpit light should be activated in ikarus on the basis of the parameters
|
||||
-- functional parameters, a single ID, or a table with IDs
|
||||
function ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, ExportIDs)
|
||||
local TmpExportIDs = ExportIDs or 0
|
||||
local TmpLight = false
|
||||
|
||||
if type(mainPanelDevice) ~= "table" then
|
||||
return
|
||||
end
|
||||
|
||||
if type(TmpExportIDs) == "table" then
|
||||
for key,value in pairs(TmpExportIDs) do
|
||||
if type(value) == "number" then
|
||||
if mainPanelDevice:get_argument_value(value) > 0.4 then
|
||||
TmpLight = true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif type(TmpExportIDs) == "number" then
|
||||
if mainPanelDevice:get_argument_value(TmpExportIDs) > 0.4 then
|
||||
TmpLight = true
|
||||
end
|
||||
end
|
||||
|
||||
if TmpLight then
|
||||
ExportScript.Tools.SendData(2222, "1.0") -- Ikarus Cockpit Light on
|
||||
else
|
||||
ExportScript.Tools.SendData(2222, "0.0") -- Ikarus Cockpit Light off
|
||||
end
|
||||
end
|
||||
|
||||
-- The function returns a correctly formatted string with the given radio frequency.
|
||||
-- Frequency: MHz/KHz, format: e.g. "7.3" or "5.2", fill with leading zeros (default false), least value of frequency (default 0.025 (MHz))
|
||||
function ExportScript.Tools.RoundFreqeuncy(Freqeuncy, Format, PrefixZeros, LeastValue)
|
||||
local freqeuncy = Freqeuncy or 0.0
|
||||
local format = Format or "7.3"
|
||||
local prefixzeros = PrefixZeros or false
|
||||
local leastvalue = LeastValue or 0.025
|
||||
local tmpstring = ""
|
||||
local tmp1, tmp2, tmp3, tmp4 = 0, 0, 0, 0
|
||||
|
||||
local from ,to = string.find(format, "%.")
|
||||
tmp1 = string.sub(format, 0, to)
|
||||
tmp2 = string.sub(format, to)
|
||||
tmp1 = tonumber(string.sub(tmp1, string.find(tmp1, "%d+")))
|
||||
tmp2 = tonumber(string.sub(tmp2, string.find(tmp2, "%d+")))
|
||||
|
||||
local tmp3, tmp4 = math.modf(freqeuncy)
|
||||
local bla3, bla4 = math.modf(tmp4 / leastvalue)
|
||||
|
||||
tmpstring = (tmp3 + (bla3 * leastvalue ))
|
||||
|
||||
tmpstring = string.format("%."..tmp2.."f", tmpstring)
|
||||
|
||||
-- while string.len(tmpstring) < tmp1 do
|
||||
-- tmpstring = " "..tmpstring
|
||||
-- end
|
||||
|
||||
tmpstring = string.rep(" ", tmp1 - string.len(tmpstring))..tmpstring
|
||||
|
||||
if prefixzeros then
|
||||
tmpstring = string.gsub(tmpstring, " ", "0")
|
||||
end
|
||||
|
||||
return tmpstring
|
||||
end
|
||||
|
||||
-- The function return a table with values of given indicator
|
||||
-- The value is retrievable via a named index. e.g. TmpReturn.txt_digits
|
||||
function ExportScript.Tools.getListIndicatorValue(IndicatorID)
|
||||
local ListIindicator = list_indication(IndicatorID)
|
||||
local TmpReturn = {}
|
||||
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog('list_indication('..IndicatorID..'): '..ExportScript.Tools.dump(ListIindicator))
|
||||
end
|
||||
|
||||
if ListIindicator == "" then
|
||||
return nil
|
||||
end
|
||||
|
||||
local ListindicatorMatch = ListIindicator:gmatch("-----------------------------------------\n([^\n]+)\n([^\n]*)\n")
|
||||
while true do
|
||||
local Key, Value = ListindicatorMatch()
|
||||
if not Key then
|
||||
break
|
||||
end
|
||||
TmpReturn[Key] = Value
|
||||
end
|
||||
|
||||
return TmpReturn
|
||||
end
|
||||
|
||||
-- The function format a given string for a display
|
||||
-- String: value for show in display, maxChars: Display size (default 5), LEFTorRIGHT: flush with left "l" or right "r" site (default "r")
|
||||
function ExportScript.Tools.DisplayFormat(String, maxChars, LEFTorRight, DAC)
|
||||
local lString = String or ""
|
||||
local lmaxChars = maxChars or 5
|
||||
local lLEFTorRight = LEFTorRight or "r"
|
||||
local lDAC = DAC or false
|
||||
local lTmpLen = 0
|
||||
local lRep = " "
|
||||
|
||||
if lDAC then
|
||||
lRep = "-"
|
||||
end
|
||||
|
||||
lString = ExportScript.utf8.sub(lString, 0, lmaxChars)
|
||||
lTmpLen = ExportScript.utf8.len(lString)
|
||||
|
||||
if lTmpLen < lmaxChars then
|
||||
if string.lower(lLEFTorRight) == "l" then
|
||||
lString = lString..string.rep(" ", lmaxChars - lTmpLen)
|
||||
else
|
||||
lString = string.rep(" ", lmaxChars - lTmpLen)..lString
|
||||
end
|
||||
end
|
||||
|
||||
return lString
|
||||
end
|
||||
|
||||
function ExportScript.Tools.KeyInTable(Table, Key)
|
||||
for key, value in pairs(Table) do
|
||||
if key == Key then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ValueInTable(Table, Value)
|
||||
for key, value in pairs(Table) do
|
||||
if value == Value then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSHighImportance, if the player aircraft is something else
|
||||
function ExportScript.ProcessIkarusDCSHighImportanceNoConfig(mainPanelDevice)
|
||||
end
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSLowImportance, if the player aircraft is something else
|
||||
function ExportScript.ProcessIkarusDCSLowImportanceNoConfig(mainPanelDevice)
|
||||
end
|
||||
|
||||
-- the player aircraft is a Flaming Cliffs or similar aircraft
|
||||
function ExportScript.ProcessIkarusFCHighImportanceNoConfig()
|
||||
end
|
||||
function ExportScript.ProcessIkarusFCLowImportanceNoConfig()
|
||||
end
|
||||
|
||||
-- Hardware exports
|
||||
function ExportScript.ProcessDACHighImportanceNoConfig(mainPanelDevice)
|
||||
end
|
||||
function ExportScript.ProcessDACLowImportanceNoConfig(mainPanelDevice)
|
||||
end
|
||||
411
Scripts/DCS-ExportScript/lib/genericRadio.lua
Normal file
411
Scripts/DCS-ExportScript/lib/genericRadio.lua
Normal file
@@ -0,0 +1,411 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
--
|
||||
-- generic Radio File
|
||||
--
|
||||
-- Copyright by Michael aka McMicha 2014
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
|
||||
ExportScript.Version.genericRadio = "1.2.1"
|
||||
|
||||
--[[
|
||||
-- Config and execute in function ExportScript.ProcessDACConfigLowImportance()
|
||||
|
||||
-- genericRadioConf for example A-10C Radio AN/ARC-164 UHF
|
||||
ExportScript.genericRadioConf = {}
|
||||
ExportScript.genericRadioConf['maxRadios'] = 1 -- numbers of aviables/supported radios
|
||||
ExportScript.genericRadioConf[1] = {} -- first radio
|
||||
ExportScript.genericRadioConf[1]['Name'] = "AN/ARC-164 UHF" -- name of radio
|
||||
ExportScript.genericRadioConf[1]['DeviceID'] = 54 -- DeviceID for GetDevice from device.lua
|
||||
ExportScript.genericRadioConf[1]['setFrequency'] = true -- change frequency active
|
||||
ExportScript.genericRadioConf[1]['FrequencyMultiplicator'] = 1000000 -- multiplicator from Hz to MHz
|
||||
ExportScript.genericRadioConf[1]['FrequencyFormat'] = "%7.3f" -- frequency view format LUA style
|
||||
ExportScript.genericRadioConf[1]['FrequencyStep'] = 25 -- minimal step for frequency change
|
||||
ExportScript.genericRadioConf[1]['minFrequency'] = 220.000 -- lowest frequency
|
||||
ExportScript.genericRadioConf[1]['maxFrequency'] = 314.450 -- highest frequency
|
||||
ExportScript.genericRadioConf[1]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[1]['Power']['ButtonID'] = 3008 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.1 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Volume'] = {} -- volume knob active
|
||||
ExportScript.genericRadioConf[1]['Volume']['ButtonID'] = 3011 -- volume button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Preset'] = {} -- preset knob active
|
||||
ExportScript.genericRadioConf[1]['Preset']['ArgumentID'] = 161 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Preset']['ButtonID'] = 3001 -- preset button id from cklickable.lua
|
||||
-- ExportScript.genericRadioConf[1]['Preset']['ButtonID2'] = 3002 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
ExportScript.genericRadioConf[1]['Preset']['List'] = {[0.0]="01",[0.05]="02",[0.10]="03",[0.15]="04",[0.20]="05",[0.25]="06",[0.30]="07",[0.35]="08",[0.40]="09",[0.45]="10",[0.50]="11",[0.55]="12",[0.60]="13",[0.65]="14",[0.70]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20",[1.00]="01"}
|
||||
ExportScript.genericRadioConf[1]['Preset']['Step'] = 0.05 -- minimal step for preset change
|
||||
-- ExportScript.genericRadioConf[1]['Preset']['Step2'] = -0.05 -- minimal step for preset change
|
||||
ExportScript.genericRadioConf[1]['Squelch'] = {} -- squelch switch active
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ArgumentID'] = 170 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ButtonID'] = 3010 -- squelch button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ValueOn'] = 0.0 -- squelch on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Squelch']['ValueOff'] = 1.0 -- squelch off value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Load'] = {} -- load button preset
|
||||
ExportScript.genericRadioConf[1]['Load']['ButtonID'] = 3015 -- load button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['ManualPreset'] = {} -- switch manual or preset active
|
||||
ExportScript.genericRadioConf[1]['ManualPreset']['ArgumentID'] = 167 -- ManualPreset argument id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['ManualPreset']['ButtonID'] = 3007 -- ManualPreset button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['ManualPreset']['ValueManual'] = 0.0-- ManualPreset Manual value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['ManualPreset']['ValuePreset'] = 0.1-- ManualPreset Preset value from cklickable.lua
|
||||
|
||||
...
|
||||
|
||||
ExportScript.genericRadio(nil, nil)]]
|
||||
|
||||
function ExportScript.genericRadio(key, value)
|
||||
--ExportScript.Tools.WriteToLog('genericRadioConf: '..ExportScript.Tools.dump(ExportScript.genericRadioConf))
|
||||
if type(ExportScript.genericRadioConf) ~= "table" then
|
||||
ExportScript.Tools.WriteToLog("No Radio defined.")
|
||||
return
|
||||
end
|
||||
|
||||
local lRotaryFrequency_1, lRotaryFrequency_2, lVolume, lPreset, lLoad, lSquelch, lManualPreset, lPower, lDevice, lClickAction, lSetFrequency = nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil
|
||||
local lMainPanelDevice = GetDevice(0)
|
||||
|
||||
if ExportScript.AF.genericRadio == nil then
|
||||
ExportScript.AF.genericRadio = 0
|
||||
end
|
||||
if ExportScript.AF.genericRadioFrequency1 == nil then
|
||||
ExportScript.AF.genericRadioFrequency1 = 0.0
|
||||
end
|
||||
if ExportScript.AF.genericRadioFrequency2 == nil then
|
||||
ExportScript.AF.genericRadioFrequency2 = 0.0
|
||||
end
|
||||
if ExportScript.AF.genericRadioPower == nil then
|
||||
ExportScript.AF.genericRadioPower = {}
|
||||
end
|
||||
if ExportScript.AF.genericRadioPresetManual == nil then
|
||||
ExportScript.AF.genericRadioPresetManual = {}
|
||||
end
|
||||
if ExportScript.AF.genericRadioSquelch == nil then
|
||||
ExportScript.AF.genericRadioSquelch = {}
|
||||
end
|
||||
if ExportScript.AF.genericRadioPreset == nil then
|
||||
ExportScript.AF.genericRadioPreset = {}
|
||||
end
|
||||
|
||||
if key == "3001" then
|
||||
ExportScript.AF.genericRadio = tonumber(value)
|
||||
end
|
||||
if key == "3002" then
|
||||
lRotaryFrequency_1 = tonumber(value)
|
||||
end
|
||||
if key == "3003" then
|
||||
lRotaryFrequency_2 = tonumber(value)
|
||||
end
|
||||
if key == "3004" then
|
||||
lVolume = tonumber(value)
|
||||
end
|
||||
if key == "3005" then
|
||||
lPreset = tonumber(value)
|
||||
end
|
||||
if key == "3006" then
|
||||
lLoad = tonumber(value)
|
||||
end
|
||||
if key == "3007" then
|
||||
lSquelch = tonumber(value)
|
||||
end
|
||||
if key == "3008" then
|
||||
lManualPreset = tonumber(value)
|
||||
end
|
||||
if key == "3009" then
|
||||
lPower = tonumber(value)
|
||||
end
|
||||
|
||||
local lPresetChannelFrequency = "-" -- ID 3000
|
||||
local lPresetChannel = "-" -- ID 3001
|
||||
local lFrequency = "-" -- ID 3002
|
||||
|
||||
if ExportScript.AF.genericRadio == 0 or ExportScript.AF.genericRadio > ExportScript.genericRadioConf['maxRadios'] then
|
||||
if ExportScript.AF.genericRadio ~= 0 then
|
||||
ExportScript.Tools.WriteToLog("Radio Nr. "..ExportScript.AF.genericRadio.." not defined.")
|
||||
end
|
||||
ExportScript.Tools.SendDataDAC("3000", lPresetChannelFrequency)
|
||||
ExportScript.Tools.SendDataDAC("3001", lPresetChannel)
|
||||
ExportScript.Tools.SendDataDAC("3002", lFrequency)
|
||||
ExportScript.Tools.SendDataDAC("3010", 0)
|
||||
ExportScript.Tools.SendDataDAC("3011", 0)
|
||||
ExportScript.Tools.SendDataDAC("3012", 0)
|
||||
ExportScript.Tools.SendDataDAC("3013", 0)
|
||||
return
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
local lRADIO = GetDevice(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'])
|
||||
|
||||
-- check status of the radio
|
||||
if ExportScript.AF.genericRadioPower[ExportScript.AF.genericRadio] == nil then
|
||||
if lRADIO:is_on() then
|
||||
ExportScript.AF.genericRadioPower[ExportScript.AF.genericRadio] = 1.0
|
||||
else
|
||||
ExportScript.AF.genericRadioPower[ExportScript.AF.genericRadio] = 0.0
|
||||
end
|
||||
end
|
||||
|
||||
-- check Manual/Preset switch
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['ManualPreset'] ~= nil then
|
||||
if ExportScript.AF.genericRadioPresetManual[ExportScript.AF.genericRadio] == nil then
|
||||
ExportScript.AF.genericRadioPresetManual[ExportScript.AF.genericRadio] = ((ExportScript.Tools.round(lMainPanelDevice:get_argument_value(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['ManualPreset']['ArgumentID']), 1) == ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['ManualPreset']['ValueOn']) and 1 or 0)
|
||||
end
|
||||
else
|
||||
ExportScript.AF.genericRadioPresetManual[ExportScript.AF.genericRadio] = 0
|
||||
end
|
||||
|
||||
-- check Squelch switch
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Squelch'] ~= nil then
|
||||
if ExportScript.AF.genericRadioSquelch[ExportScript.AF.genericRadio] == nil then
|
||||
ExportScript.AF.genericRadioSquelch[ExportScript.AF.genericRadio] = ((ExportScript.Tools.round(lMainPanelDevice:get_argument_value(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Squelch']['ArgumentID']), 1) == ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Squelch']['ValueOn']) and 1 or 0)
|
||||
end
|
||||
else
|
||||
ExportScript.AF.genericRadioSquelch[ExportScript.AF.genericRadio] = 0
|
||||
end
|
||||
|
||||
if ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] == nil then
|
||||
ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] = 0
|
||||
end
|
||||
|
||||
if lRADIO:is_on() then
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset'] ~= nil then
|
||||
--lPresetChannel = string.format("%s", ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['List'][ExportScript.Tools.round(lMainPanelDevice:get_argument_value(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['ArgumentID']), 2)])
|
||||
--ExportScript.Tools.WriteToLog('Preset index: '..ExportScript.Tools.dump(ExportScript.Tools.round(lMainPanelDevice:get_argument_value(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['ArgumentID']), string.match(string.reverse(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['Step']), '.'))))
|
||||
lPresetChannel = string.format("%s", ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['List'][ExportScript.Tools.round(lMainPanelDevice:get_argument_value(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['ArgumentID']), string.match(string.reverse(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['Step']), '.'))])
|
||||
end
|
||||
|
||||
lFrequency = ExportScript.Tools.round(lRADIO:get_frequency()/ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyMultiplicator'] , 3, "floor")
|
||||
lFrequency = string.format(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyFormat'], lFrequency)
|
||||
|
||||
lPresetChannelFrequency = string.format("%s%s", lPresetChannel, lFrequency)
|
||||
lPresetChannelFrequency = lPresetChannelFrequency:gsub(" ", "0")
|
||||
lPresetChannelFrequency = lPresetChannelFrequency:gsub("-", "")
|
||||
--ExportScript.Tools.WriteToLog('lPresetChannel: '..ExportScript.Tools.dump(lPresetChannel))
|
||||
--ExportScript.Tools.WriteToLog('lFrequency: '..ExportScript.Tools.dump(lFrequency))
|
||||
--ExportScript.Tools.WriteToLog('lPresetChannelFrequency: '..ExportScript.Tools.dump(lPresetChannelFrequency))
|
||||
-- setFrequency == true
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['setFrequency'] then
|
||||
-- minimal frequency, for example lMinFrequency1=220, lMinFrequency2=0 from 220.000
|
||||
local lMinFrequency1, lMinFrequency2 = math.modf(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['minFrequency'])
|
||||
lMinFrequency2 = lMinFrequency2 * 1000
|
||||
-- maximal frequency, for example lMaxFrequency1=314, lMaxFrequency2=975 from 314.975
|
||||
local lMaxFrequency1, lMaxFrequency2 = math.modf(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['maxFrequency'])
|
||||
lMaxFrequency2 = lMaxFrequency2 * 1000
|
||||
|
||||
if lRotaryFrequency_1 ~= nil and (lRotaryFrequency_1 >= 0.0 and lRotaryFrequency_1 <= 2.0) then
|
||||
|
||||
local lTmpFrequency = ExportScript.Tools.StrSplit(lFrequency, "%.") -- %. um den Punkt als Punkt zu suchen
|
||||
|
||||
if type(lTmpFrequency) == "table" and lTmpFrequency[1] ~= nil then
|
||||
lTmpFrequency[1] = tonumber(lTmpFrequency[1])
|
||||
if lTmpFrequency[2] == nil then
|
||||
lTmpFrequency[2] = 0
|
||||
else
|
||||
lTmpFrequency[2] = tonumber(lTmpFrequency[2])
|
||||
local ltmp = string.format("%.0f", lTmpFrequency[2] / ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyStep'])
|
||||
lTmpFrequency[2] = ltmp * ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyStep']
|
||||
end
|
||||
if lRotaryFrequency_1 < ExportScript.AF.genericRadioFrequency1 or lRotaryFrequency_1 == 0.0 or lRotaryFrequency_1 == 2.0 then
|
||||
lTmpFrequency[1] = lTmpFrequency[1] - 1
|
||||
if lTmpFrequency[1] == (lMinFrequency1 - 1) then
|
||||
lTmpFrequency[1] = lMaxFrequency1
|
||||
end
|
||||
ExportScript.AF.genericRadioFrequency1 = lRotaryFrequency_1
|
||||
else
|
||||
lTmpFrequency[1] = lTmpFrequency[1] + 1
|
||||
if lTmpFrequency[1] == (lMaxFrequency1 + 1) then
|
||||
lTmpFrequency[1] = lMinFrequency1
|
||||
end
|
||||
ExportScript.AF.genericRadioFrequency1 = lRotaryFrequency_1
|
||||
end
|
||||
|
||||
lTmpFrequency[2] = string.format("%.3f", lTmpFrequency[2] / 1000)
|
||||
lTmpFrequency = string.format("%.3f", lTmpFrequency[1] + lTmpFrequency[2])
|
||||
lTmpFrequency = tonumber(lTmpFrequency)
|
||||
lSetFrequency = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
Frequency = lTmpFrequency * 1000000}
|
||||
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("1. generic "..ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Name'].." Radio, don't split frequency: "..lFrequency)
|
||||
end
|
||||
end
|
||||
|
||||
if lRotaryFrequency_2 ~= nil and (lRotaryFrequency_2 >= 0.0 and lRotaryFrequency_2 <= 2.0) then
|
||||
|
||||
local lTmpFrequency = ExportScript.Tools.StrSplit(lFrequency, "%.")
|
||||
|
||||
if type(lTmpFrequency) == "table" and lTmpFrequency[1] ~= nil then
|
||||
lTmpFrequency[1] = tonumber(lTmpFrequency[1])
|
||||
if lTmpFrequency[2] == nil then
|
||||
lTmpFrequency[2] = 0
|
||||
else
|
||||
lTmpFrequency[2] = tonumber(lTmpFrequency[2])
|
||||
local ltmp = string.format("%.0f", lTmpFrequency[2] / ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyStep'])
|
||||
lTmpFrequency[2] = ltmp * ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyStep']
|
||||
end
|
||||
if lRotaryFrequency_2 < ExportScript.AF.genericRadioFrequency2 or lRotaryFrequency_2 == 0.0 or lRotaryFrequency_2 == 2.0 then
|
||||
lTmpFrequency[2] = lTmpFrequency[2] - ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyStep']
|
||||
if lTmpFrequency[2] == (ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyStep'] * -1) then
|
||||
lTmpFrequency[2] = lMaxFrequency2
|
||||
end
|
||||
ExportScript.AF.genericRadioFrequency2 = lRotaryFrequency_2
|
||||
else
|
||||
lTmpFrequency[2] = lTmpFrequency[2] + ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyStep']
|
||||
if lTmpFrequency[2] == (lMaxFrequency2 + ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['FrequencyStep']) then
|
||||
lTmpFrequency[2] = 0
|
||||
end
|
||||
ExportScript.AF.genericRadioFrequency2 = lRotaryFrequency_2
|
||||
end
|
||||
|
||||
lTmpFrequency[2] = string.format("%.3f", lTmpFrequency[2] / 1000)
|
||||
lTmpFrequency = string.format("%.3f", lTmpFrequency[1] + lTmpFrequency[2])
|
||||
lTmpFrequency = tonumber(lTmpFrequency)
|
||||
lSetFrequency = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
Frequency = lTmpFrequency * 1000000}
|
||||
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("2. generic "..ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Name'].." Radio, don't split frequency: "..lFrequency)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset'] ~= nil then
|
||||
if lPreset ~= nil and (lPreset >= 0.0 and lPreset <= 2.0) then
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['ButtonID2'] == nil and ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['Step2'] == nil then
|
||||
local lTempPresetKeys = {}
|
||||
for k,v in pairs(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['List']) do
|
||||
table.insert(lTempPresetKeys, k)
|
||||
end
|
||||
|
||||
local lMinKey = math.min(unpack(lTempPresetKeys))
|
||||
local lMaxKey = math.max(unpack(lTempPresetKeys))
|
||||
|
||||
if lPreset > ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] then
|
||||
ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] = ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] + ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['Step']
|
||||
if ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] > lMaxKey then
|
||||
ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] = lMinKey
|
||||
end
|
||||
else
|
||||
ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] = ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] - ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['Step']
|
||||
if ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] < lMinKey then
|
||||
ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] = lMaxKey
|
||||
end
|
||||
end
|
||||
lClickAction = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
ButtonID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['ButtonID'],
|
||||
Value = ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio]}
|
||||
else
|
||||
if lPreset < ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] or lPreset == 0.0 or lPreset == 2.0 then
|
||||
lClickAction = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
ButtonID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['ButtonID'],
|
||||
Value = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['Step']}
|
||||
ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] = lPreset
|
||||
else
|
||||
lClickAction = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
ButtonID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['ButtonID2'],
|
||||
Value = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Preset']['Step2']}
|
||||
ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] = lPreset
|
||||
end
|
||||
ExportScript.AF.genericRadioPreset[ExportScript.AF.genericRadio] = lPreset
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Volume'] ~= nil then
|
||||
if lVolume ~= nil and (lVolume >= 0.0 and lVolume <= 2.0) then
|
||||
lVolume = lVolume / 2
|
||||
lClickAction = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
ButtonID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Volume']['ButtonID'],
|
||||
Value = lVolume}
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Load'] ~= nil then
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Load']['ButtonID'] ~= nil then
|
||||
if lLoad ~= nil and (lLoad == 0.0 or lLoad <= 1.0) then
|
||||
lClickAction = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
ButtonID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Load']['ButtonID'],
|
||||
Value = lLoad}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Squelch'] ~= nil then
|
||||
if lSquelch ~= nil and (lSquelch == 0.0 or lSquelch <= 1.0) then
|
||||
if lSquelch == 1.0 and ExportScript.AF.genericRadioSquelch[ExportScript.AF.genericRadio] == 1.0 then
|
||||
-- Squelch off
|
||||
lSquelch = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Squelch']['ValueOff']
|
||||
ExportScript.AF.genericRadioSquelch[ExportScript.AF.genericRadio] = 0
|
||||
elseif lSquelch == 1.0 and ExportScript.AF.genericRadioSquelch[ExportScript.AF.genericRadio] == 0 then
|
||||
-- Squelch on
|
||||
lSquelch = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Squelch']['ValueOn']
|
||||
ExportScript.AF.genericRadioSquelch[ExportScript.AF.genericRadio] = 1.0
|
||||
end
|
||||
lClickAction = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
ButtonID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Squelch']['ButtonID'],
|
||||
Value = lSquelch}
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['ManualPreset'] ~= nil then
|
||||
if lManualPreset ~= nil and (lManualPreset == 0.0 or lManualPreset <= 1.0) then
|
||||
if lManualPreset == 1.0 and ExportScript.AF.genericRadioPresetManual[ExportScript.AF.genericRadio] == 1.0 then
|
||||
-- Manual
|
||||
lManualPreset = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['ManualPreset']['ValueManual']
|
||||
ExportScript.AF.genericRadioPresetManual[ExportScript.AF.genericRadio] = 0
|
||||
elseif lManualPreset == 1.0 and ExportScript.AF.genericRadioPresetManual[ExportScript.AF.genericRadio] == 0 then
|
||||
-- Preset
|
||||
lManualPreset = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['ManualPreset']['ValuePreset']
|
||||
ExportScript.AF.genericRadioPresetManual[ExportScript.AF.genericRadio] = 1.0
|
||||
end
|
||||
lClickAction = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
ButtonID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['ManualPreset']['ButtonID'],
|
||||
Value = lManualPreset}
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Power'] ~= nil then
|
||||
if lPower ~= nil and (lPower == 0.0 or lPower <= 1.0) then
|
||||
if lPower == 1.0 and ExportScript.AF.genericRadioPower[ExportScript.AF.genericRadio] == 1.0 then
|
||||
-- Power off
|
||||
lPower = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Power']['ValueOff']
|
||||
ExportScript.AF.genericRadioPower[ExportScript.AF.genericRadio] = 0
|
||||
elseif lPower == 1.0 and ExportScript.AF.genericRadioPower[ExportScript.AF.genericRadio] == 0 then
|
||||
--Power on
|
||||
lPower = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Power']['ValueOn']
|
||||
ExportScript.AF.genericRadioPower[ExportScript.AF.genericRadio] = 1.0
|
||||
end
|
||||
lClickAction = {DeviceID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['DeviceID'],
|
||||
ButtonID = ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Power']['ButtonID'],
|
||||
Value = lPower}
|
||||
end
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendDataDAC("3000", lPresetChannelFrequency)
|
||||
ExportScript.Tools.SendDataDAC("3001", lPresetChannel)
|
||||
ExportScript.Tools.SendDataDAC("3002", lFrequency)
|
||||
ExportScript.Tools.SendDataDAC("3010", ExportScript.AF.genericRadioPower[ExportScript.AF.genericRadio])
|
||||
ExportScript.Tools.SendDataDAC("3011", ExportScript.AF.genericRadioPresetManual[ExportScript.AF.genericRadio])
|
||||
ExportScript.Tools.SendDataDAC("3012", ExportScript.AF.genericRadioSquelch[ExportScript.AF.genericRadio])
|
||||
-- is only for radios with a lamp for Load button, for example Ka-50 Load Button is Autotune with lamp
|
||||
if ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Load'] ~= nil and ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Load']['ArgumentID'] ~= nil then
|
||||
ExportScript.Tools.SendDataDAC("3013", lMainPanelDevice:get_argument_value(ExportScript.genericRadioConf[ExportScript.AF.genericRadio]['Load']['ArgumentID']))
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("3013", 0)
|
||||
end
|
||||
|
||||
if lClickAction ~= nil then
|
||||
lDevice = GetDevice(lClickAction.DeviceID)
|
||||
if type(lDevice) == "table" then
|
||||
--ExportScript.Tools.WriteToLog("GetDevice("..lClickAction.DeviceID.."):performClickableAction("..lClickAction.ButtonID..", "..lClickAction.Value..") ")
|
||||
lDevice:performClickableAction(lClickAction.ButtonID, lClickAction.Value)
|
||||
end
|
||||
elseif lSetFrequency ~= nil then
|
||||
lDevice = GetDevice(lSetFrequency.DeviceID)
|
||||
if type(lDevice) == "table" and lDevice:is_on() then
|
||||
--ExportScript.Tools.WriteToLog("GetDevice("..lSetFrequency.DeviceID.."):set_frequency("..lSetFrequency.Frequency..") ")
|
||||
lDevice:set_frequency(lSetFrequency.Frequency)
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("GetDevice("..lSetFrequency.DeviceID..") is no table or Radio is not on")
|
||||
end
|
||||
end
|
||||
end
|
||||
161
Scripts/DCS-ExportScript/lib/utf8.lua
Normal file
161
Scripts/DCS-ExportScript/lib/utf8.lua
Normal file
@@ -0,0 +1,161 @@
|
||||
-- Provides UTF-8 aware string functions implemented in pure lua:
|
||||
-- * string.utf8len(s)
|
||||
-- * string.utf8sub(s, i, j)
|
||||
--
|
||||
-- All functions behave as their non UTF-8 aware counterparts with the exception
|
||||
-- that UTF-8 characters are used instead of bytes for all units.
|
||||
--
|
||||
-- Note: all validations had been removed due to awesome usage specifics.
|
||||
--[[
|
||||
Copyright (c) 2006-2007, Kyle Smith
|
||||
Modified by Alexander Yakushev, 2010-2013.
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the author nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--]]
|
||||
|
||||
-- ABNF from RFC 3629
|
||||
--
|
||||
-- UTF8-octets = *( UTF8-char )
|
||||
-- UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
|
||||
-- UTF8-1 = %x00-7F
|
||||
-- UTF8-2 = %xC2-DF UTF8-tail
|
||||
-- UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
|
||||
-- %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
|
||||
-- UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
|
||||
-- %xF4 %x80-8F 2( UTF8-tail )
|
||||
-- UTF8-tail = %x80-BF
|
||||
--
|
||||
|
||||
-- returns the number of bytes used by the UTF-8 character at byte i in s
|
||||
-- also doubles as a UTF-8 character validator
|
||||
|
||||
local utf8 = {}
|
||||
|
||||
function utf8.charbytes (s, i)
|
||||
-- argument defaults
|
||||
i = i or 1
|
||||
local c = string.byte(s, i)
|
||||
|
||||
-- determine bytes needed for character, based on RFC 3629
|
||||
if c > 0 and c <= 127 then
|
||||
-- UTF8-1
|
||||
return 1
|
||||
elseif c >= 194 and c <= 223 then
|
||||
-- UTF8-2
|
||||
local c2 = string.byte(s, i + 1)
|
||||
return 2
|
||||
elseif c >= 224 and c <= 239 then
|
||||
-- UTF8-3
|
||||
local c2 = s:byte(i + 1)
|
||||
local c3 = s:byte(i + 2)
|
||||
return 3
|
||||
elseif c >= 240 and c <= 244 then
|
||||
-- UTF8-4
|
||||
local c2 = s:byte(i + 1)
|
||||
local c3 = s:byte(i + 2)
|
||||
local c4 = s:byte(i + 3)
|
||||
return 4
|
||||
end
|
||||
end
|
||||
|
||||
-- returns the number of characters in a UTF-8 string
|
||||
function utf8.len (s)
|
||||
local pos = 1
|
||||
local bytes = string.len(s)
|
||||
local len = 0
|
||||
|
||||
while pos <= bytes and len ~= chars do
|
||||
local c = string.byte(s,pos)
|
||||
len = len + 1
|
||||
|
||||
pos = pos + utf8.charbytes(s, pos)
|
||||
end
|
||||
|
||||
if chars ~= nil then
|
||||
return pos - 1
|
||||
end
|
||||
|
||||
return len
|
||||
end
|
||||
|
||||
-- functions identically to string.sub except that i and j are UTF-8 characters
|
||||
-- instead of bytes
|
||||
function utf8.sub (s, i, j)
|
||||
j = j or -1
|
||||
|
||||
if i == nil then
|
||||
return ""
|
||||
end
|
||||
|
||||
local pos = 1
|
||||
local bytes = string.len(s)
|
||||
local len = 0
|
||||
|
||||
-- only set l if i or j is negative
|
||||
local l = (i >= 0 and j >= 0) or utf8.len(s)
|
||||
local startChar = (i >= 0) and i or l + i + 1
|
||||
local endChar = (j >= 0) and j or l + j + 1
|
||||
|
||||
-- can't have start before end!
|
||||
if startChar > endChar then
|
||||
return ""
|
||||
end
|
||||
|
||||
-- byte offsets to pass to string.sub
|
||||
local startByte, endByte = 1, bytes
|
||||
|
||||
while pos <= bytes do
|
||||
len = len + 1
|
||||
|
||||
if len == startChar then
|
||||
startByte = pos
|
||||
end
|
||||
|
||||
pos = pos + utf8.charbytes(s, pos)
|
||||
|
||||
if len == endChar then
|
||||
endByte = pos - 1
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
return string.sub(s, startByte, endByte)
|
||||
end
|
||||
|
||||
-- replace UTF-8 characters based on a mapping table
|
||||
function utf8.replace (s, mapping)
|
||||
local pos = 1
|
||||
local bytes = string.len(s)
|
||||
local charbytes
|
||||
local newstr = ""
|
||||
|
||||
while pos <= bytes do
|
||||
charbytes = utf8.charbytes(s, pos)
|
||||
local c = string.sub(s, pos, pos + charbytes - 1)
|
||||
newstr = newstr .. (mapping[c] or c)
|
||||
pos = pos + charbytes
|
||||
end
|
||||
|
||||
return newstr
|
||||
end
|
||||
|
||||
return utf8
|
||||
Reference in New Issue
Block a user