7 Commits

Author SHA1 Message Date
McMicha e1a9f574a4 change to new (pre)release version 2019-02-14 01:14:53 +01:00
McMicha e6656b02a2 change to new (pre)release version 2019-02-14 01:11:42 +01:00
McMicha b8ed48b517 change PDF docu to version 1.2 2019-02-14 01:10:37 +01:00
McMicha e398ec8f83 change functions call for new special function 2019-02-14 01:09:40 +01:00
McMicha 96dbbd34c0 change many functions call for new or changed gauges 2019-02-14 01:08:41 +01:00
McMicha acd8897db9 Change many functions for MiG-29A/G/S gauges
ExportScript.AF.FC_Russian_BarometricAltimeter_late()
ExportScript.AF.FC_Russian_AOA_MiG29()
ExportScript.AF.FC_Russian_Compass2()
ExportScript.AF.FC_Russian_FlareChaff_MiG29()
ExportScript.AF.FuelQuantityIndicator_MiG29()

Change functions for SU-25/T gauges
ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
2019-02-14 01:03:13 +01:00
McMicha e03cc16901 Change UHF 1/2 radio device... 2019-02-14 01:01:50 +01:00
11 changed files with 512 additions and 94 deletions
+4 -4
View File
@@ -24,11 +24,11 @@ Der Export von Daten wird für folgende Module unterstützt:
- Mirage 2000
- P-51D 25/30-NA
- SA342L/M/Mistral
- SpitfireLFMkIX
- SpitfireLFMkIX/CW
- Su-25T
- TF-51D
- UH-1H
- alle Flaming Cliffs Flugzeuge
- alle Flaming Cliffs Flugzeuge + J-11A
Kompatibel zur DCS World 2.5.4 und BETA Version
@@ -57,11 +57,11 @@ Following moduls are supported:
- Mirage 2000
- P-51D 25/30-NA
- SA342L/M/Mistral
- SpitfireLFMkIX
- SpitfireLFMkIX/CW
- Su-25T
- TF-51D
- UH-1H
- all Flaming Cliffs aircrafts
- all Flaming Cliffs aircrafts + J-11A
Compatible with DCS World 2.5.4 and BETA version
@@ -1,7 +1,7 @@
-- F/A-18C Export
ExportScript.FoundDCSModule = true
ExportScript.Version.FA18C_hornet = "1.2.0"
ExportScript.Version.FA18C_hornet = "1.2.1"
ExportScript.ConfigEveryFrameArguments =
{
@@ -646,10 +646,10 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
ExportScript.Tools.SendData(2029, " ") -- Comm2Display 2 character
end
local lUHF1Radio = GetDevice(39)
local lUHF1Radio = GetDevice(38)
ExportScript.Tools.SendData(2030, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF1Radio:get_frequency()/1000000))), 7)
local lUHF2Radio = GetDevice(40)
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
@@ -1,6 +1,6 @@
-- Flaming Cliffs Auxiliary Functons
ExportScript.Version.FC_AuxiliaryFunctions = "1.2.0"
ExportScript.Version.FC_AuxiliaryFunctions = "1.2.1"
-- Workaround for engine start-up
ExportScript.AF.LeftEngineOn = false
@@ -626,7 +626,7 @@ function ExportScript.AF.FC_Russian_RadarAltimeter_1000m(warningflag)
ExportScript.Tools.SendData(28, lDangerRALT_Lamp)
end
-- Barometric Altimeter for SU-25A, SU25-T
-- Barometric Altimeter for SU-33
function ExportScript.AF.FC_Russian_BarometricAltimeter_late()
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE (mm Hg)
@@ -636,6 +636,42 @@ function ExportScript.AF.FC_Russian_BarometricAltimeter_late()
lAltBar = lAltBar - ((9.5 * (760 - lBasicAtmospherePressure)) / 2) -- 9.5 m per 1mmHg difference
lBasicAtmospherePressure = lBasicAtmospherePressure * 1.33322 -- mmHg to hPa
-- if lAltBar > 10000 then
-- lAltBar_kilometer_needle = lAltBar / 100000
-- else
lAltBar_kilometer_needle = lAltBar / 10000
-- end
-- if lAltBar > 1000 then
-- lAltBar_meter_needle = lAltBar / 1000
-- lAltBar_meter_needle = lAltBar_meter_needle - ExportScript.Tools.round(lAltBar_meter_needle, 0, "floor")
-- else
lAltBar_meter_needle = lAltBar / 1000
-- end
lAltBar = lAltBar / 1000
-- AltBar_kilometer_needle {0.0,1.0}
-- AltBar_meter_needle {0.0,1.0}
-- BasicAtmospherePressure {947, 1080} hPa
-- AltBar_kilometer {0, 99} km
ExportScript.Tools.SendData(30, string.format("%.4f", lAltBar_kilometer_needle))
ExportScript.Tools.SendData(31, string.format("%.4f", lAltBar_meter_needle))
ExportScript.Tools.SendData(32, string.format("%04d", ExportScript.Tools.round(lBasicAtmospherePressure, 0, "floor")))
ExportScript.Tools.SendData(33, string.format("%02d", ExportScript.Tools.round(lAltBar, 0, "floor")))
end
-- Barometric Altimeter for SU-25A, SU25-T
function ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE (mm Hg)
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
local lAltBar_kilometer_needle = 0
local lAltBar_meter_needle = 0
lAltBar = lAltBar - ((9.5 * (760 - lBasicAtmospherePressure)) / 2) -- 9.5 m per 1mmHg difference
-- if lAltBar > 10000 then
-- lAltBar_kilometer_needle = lAltBar / 100000
-- else
@@ -651,16 +687,16 @@ function ExportScript.AF.FC_Russian_BarometricAltimeter_late()
-- AltBar_kilometer_needle {0.0,1.0}
-- AltBar_meter_needle {0.0,1.0}
-- BasicAtmospherePressure {600.0, 800.0}
-- AltBar_kilometer {0.0, 99.9}
-- BasicAtmospherePressure {600, 780} mm Hg
-- AltBar_kilometer {0, 99} km
ExportScript.Tools.SendData(30, string.format("%.4f", lAltBar_kilometer_needle))
ExportScript.Tools.SendData(31, string.format("%.4f", lAltBar_meter_needle))
ExportScript.Tools.SendData(32, string.format("%.4f", lBasicAtmospherePressure))
ExportScript.Tools.SendData(33, string.format("%.4f", lAltBar))
ExportScript.Tools.SendData(32, string.format("%04d", ExportScript.Tools.round(lBasicAtmospherePressure, 0, "floor")))
ExportScript.Tools.SendData(33, string.format("%02d", ExportScript.Tools.round(lAltBar, 0, "floor")))
end
-- Barometric Altimeter for SU-27, SU-33
-- Barometric Altimeter for SU-27
function ExportScript.AF.FC_Russian_BarometricAltimeter_20000()
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE (mm Hg)
@@ -1266,6 +1302,13 @@ function ExportScript.AF.FC_Russian_AOA_MiG29()
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
if ExportScript.AF.TmpAOAMiG29GLoadMin == nil then
ExportScript.AF.TmpAOAMiG29GLoadMin = 0
end
if ExportScript.AF.TmpAOAMiG29GLoadMax == nil then
ExportScript.AF.TmpAOAMiG29GLoadMax = 0
end
if lAoA > 0.0 then -- positive AOA
--[[
@@ -1334,9 +1377,18 @@ function ExportScript.AF.FC_Russian_AOA_MiG29()
]]
lAccelerationUnits = 0.09672619047619047619047619047619 * lAccelerationUnits
end
if lAccelerationUnits > ExportScript.AF.TmpAOAMiG29GLoadMax then
ExportScript.AF.TmpAOAMiG29GLoadMax = lAccelerationUnits
end
if lAccelerationUnits < ExportScript.AF.TmpAOAMiG29GLoadMin then
ExportScript.AF.TmpAOAMiG29GLoadMin = lAccelerationUnits
end
ExportScript.Tools.SendData(50, string.format("%.4f", lAoA))
ExportScript.Tools.SendData(51, string.format("%.4f", lAccelerationUnits))
ExportScript.Tools.SendData(52, string.format("%.4f", ExportScript.AF.TmpAOAMiG29GLoadMin))
ExportScript.Tools.SendData(53, string.format("%.4f", ExportScript.AF.TmpAOAMiG29GLoadMax))
end
-- Russian Clock ACS-1 for KA-50, SU-25A, MIG-29A , MIG-29S
@@ -1402,7 +1454,7 @@ function ExportScript.AF.FC_Russian_Clock_late()
ExportScript.Tools.SendData(55, string.format("%.4f", lCurrentHours))
ExportScript.Tools.SendData(56, string.format("%.4f", lCurrentMinutes))
ExportScript.Tools.SendData(57, string.format("%.4f", lCurrentSeconds))
ExportScript.Tools.SendData(58, lDefaultNull) -- red/white flag
--ExportScript.Tools.SendData(58, lDefaultNull) -- red/white flag
ExportScript.Tools.SendData(59, string.format("%.4f", lFlightTimeHours))
ExportScript.Tools.SendData(60, string.format("%.4f", lFlightTimeMinutes))
ExportScript.Tools.SendData(61, string.format("%.4f", lCurrentSeconds))
@@ -1456,6 +1508,29 @@ function ExportScript.AF.FC_Russian_EGT_1000gc(egttemp, exportid)
ExportScript.Tools.SendData(lExportID, string.format("%.4f", lEGTtemp))
end
-- US Standby Compass for MiG-29A/S/G
function ExportScript.AF.FC_Russian_Compass2()
local lDefaultNull = 0.0
local lHeading = math.deg(LoGetSelfData().Heading) -- HEADING (Radian to Grad)
--local lHeading = math.deg(LoGetMagneticYaw()) -- HEADING (Radian to Grad)
--ExportScript.Tools.WriteToLog('lHeading: '..ExportScript.Tools.dump(lHeading))
local lPitch = LoGetSelfData().Pitch -- Pitch
local lBank = LoGetSelfData().Bank -- Bank
if lHeading <= 180 then
lHeading = lHeading / 180
else
lHeading = (lHeading / 180) - 2
end
lPitch = lPitch / 1.31 -- korrektur der maximal Werte
lBank = lBank / 6.26 -- korrektur der maximal Werte
ExportScript.Tools.SendData(67, string.format("%.4f", lHeading)) -- heading
ExportScript.Tools.SendData(68, string.format("%.4f", lPitch)) -- pitch
ExportScript.Tools.SendData(69, string.format("%.4f", lBank)) -- bank
end
-- Russian Mechanical Device Indicator for SU-25A+T
function ExportScript.AF.FC_Russian_MDI_SU25(FunctionTyp)
local lFunctionTyp = FunctionTyp or "Ikarus"
@@ -1575,7 +1650,7 @@ function ExportScript.AF.FC_Russian_FlareChaff_MiG29(FunctionTyp)
end
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
ExportScript.Tools.SendDataDAC(800, lSnares.chaff + lSnares.flare )
ExportScript.Tools.SendData(800, lSnares.chaff + lSnares.flare )
end
end
@@ -1587,6 +1662,20 @@ function ExportScript.AF.FuelQuantityIndicator_MiG29(FunctionTyp)
if lEngineInfo == nil then
return
end
local lPayloadInfo = LoGetPayloadInfo()
local lRange = 0
local lStation5Tank = false
local lStation6Tank = false
local lStation7Tank = false
if lEngineInfo ~= nil then
lStation5Tank = (lPayloadInfo.Stations[5].CLSID == "{C0FF4842-FBAC-11d5-9190-00A0249B6F00}" and true or false)
lStation6Tank = (lPayloadInfo.Stations[6].CLSID == "{C0FF4842-FBAC-11d5-9190-00A0249B6F00}" and true or false)
lStation7Tank = (lPayloadInfo.Stations[7].CLSID == "{2BEC576B-CDF5-4B7F-961F-B0FA4312B841}" and true or false)
end
--ExportScript.Tools.WriteToLog('lStation7Tank: '..ExportScript.Tools.dump(lStation7Tank))
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
--[[
[fuel_external] = number: "0"
@@ -1617,89 +1706,88 @@ function ExportScript.AF.FuelQuantityIndicator_MiG29(FunctionTyp)
local lTotalFuel = lEngineInfo.fuel_internal + lEngineInfo.fuel_external
--ExportScript.Tools.WriteToLog('lTotalFuel: '..ExportScript.Tools.dump(lTotalFuel))
-- Fuel value correction, difference 3D cockpit gauges and export value
-- 3000kg = 2740 1,10
-- 2500kg = 2260 <- Lamp 2 1,11
-- 1000kg = 890 1,12
-- 800kg = 700 <- Lamp 3 1,14
-- 650kg = 550 <- Lamp 4 1,18
if lTotalFuel > 2740 then
lTotalFuel = lTotalFuel * 1.1
elseif lTotalFuel > 2260 and lTotalFuel < 2740 then
lTotalFuel = lTotalFuel * 1.11
elseif lTotalFuel > 890 and lTotalFuel < 2260 then
lTotalFuel = lTotalFuel * 1.12
elseif lTotalFuel > 700 and lTotalFuel < 290 then
lTotalFuel = lTotalFuel * 1.14
elseif lTotalFuel > 0 and lTotalFuel < 700 then
lTotalFuel = lTotalFuel * 1.18
end
-- Internal Fuel: 3370
-- max external Fuel: 2930
-- max totak Fuel: 6300
-- 1400 Liter center tank = 1163kg, station 7, CLSID {2BEC576B-CDF5-4B7F-961F-B0FA4312B841}
-- 1150 Liter tank = 891kg, station 5,6, CLSID {C0FF4842-FBAC-11d5-9190-00A0249B6F00}
--lEngineInfo.fuel_external < 1770 -- Tank warning 1
--lEngineInfo.fuel_external == 0 -- Tank warning 2
--lEngineInfo.fuel_internal < 2500 -- Tank warning 3
--lEngineInfo.fuel_internal < 800 -- Tank warning 4
--lEngineInfo.fuel_internal < 650 -- Tank warning 5
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
ExportScript.Tools.SendDataDAC("300", string.format("%d", ExportScript.Tools.round(((lTotalFuel) / 10), 0, "ceil") * 10) ) -- total fuel in kg
ExportScript.Tools.SendDataDAC("304", (lTotalFuel < 3800.0 and 1 or 0) ) -- Tank warning 1
ExportScript.Tools.SendDataDAC("305", (lTotalFuel < 2550.0 and 1 or 0) ) -- Tank warning 2
ExportScript.Tools.SendDataDAC("306", (lTotalFuel < 800.0 and 1 or 0) ) -- Tank warning 3
ExportScript.Tools.SendDataDAC("307", (lTotalFuel < 650.0 and 1 or 0) ) -- Tank warning 4
if lStation7Tank and (lStation5Tank or lStation6Tank) then
ExportScript.Tools.SendDataDAC("304", (lEngineInfo.fuel_external < 1770.0 and 1 or 0) ) -- Tank warning 1
ExportScript.Tools.SendDataDAC("305", (lEngineInfo.fuel_external < 1.0 and 1 or 0) ) -- Tank warning 2
elseif lStation7Tank and not(lStation5Tank or lStation6Tank) then
ExportScript.Tools.SendDataDAC("304", (lEngineInfo.fuel_external < 1.0 and 1 or 0) ) -- Tank warning 1
ExportScript.Tools.SendDataDAC("305", 0 ) -- Tank warning 2
end
ExportScript.Tools.SendDataDAC("306", (lEngineInfo.fuel_internal < 2500.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 < 650.0 and 1 or 0) ) -- Tank warning 5
end
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
local lTotalFuel_5_4 = 0
local lTotalFuel_4_0 = 0
local lTotalFuel_7_5 = 0
local lTotalFuel_5_0 = 0
if lTotalFuel < 5500 then
if lTotalFuel > 4000 then
--[[
y_min = 0.0 -- minimaler Ausgabewert
y_max = 1.0 -- maximaler Ausgabewert
x_min = 4000 -- minimaler Eingangswert
x_max = 5500 -- maximaler Eingangswert
if lTotalFuel > 5000 then -- internal and external
--[[
y_min = 0.0 -- minimaler Ausgabewert
y_max = 1.0 -- maximaler Ausgabewert
x_min = 5000 -- minimaler Eingangswert
x_max = 7500 -- maximaler Eingangswert
x = 5000 -- aktueller Eingangswert
x = 6300 -- aktueller Eingangswert
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
d_x = 1500 -- Delta Eingangswerte (x_max - x_min)
m = 0.00066667 -- Steigung der linearen Funktion (d_y / d_x)
n = -2.666685 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
d_x = 2500 -- Delta Eingangswerte (x_max - x_min)
m = 0.0004 -- Steigung der linearen Funktion (d_y / d_x)
n = -2.0 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
y = 0.666665 -- Ergebnis (m * x + n)
]]
lTotalFuel_5_4 = 0.00066667 * lTotalFuel + -2.666685
else
lTotalFuel_5_4 = 0.0
end
y = 0.52 -- Ergebnis (m * x + n)
]]
lTotalFuel_7_5 = 0.0004 * lTotalFuel + -2.0
lTotalFuel_5_0 = 1
else
lTotalFuel_5_4 = 1.0
end
if lTotalFuel < 4000 then
--[[
y_min = 0.0 -- minimaler Ausgabewert
y_max = 1.0 -- maximaler Ausgabewert
x_min = 0 -- minimaler Eingangswert
x_max = 4000 -- maximaler Eingangswert
x_max = 5000 -- maximaler Eingangswert
x = 3000 -- aktueller Eingangswert
x = 3500 -- aktueller Eingangswert
d_y = 1.0 -- Delta Ausgabewerte (y_max - y_min)
d_x = 4000 -- Delta Eingangswerte (x_max - x_min)
m = 0.00025 -- Steigung der linearen Funktion (d_y / d_x)
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
d_x = 5000 -- Delta Eingangswerte (x_max - x_min)
m = 0.0002 -- Steigung der linearen Funktion (d_y / d_x)
n = 0.0 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
y = 0.75 -- Ergebnis (m * x + n)
y = 0.52 -- Ergebnis (m * x + n)
]]
lTotalFuel_4_0 = 0.00025 * lTotalFuel
else
lTotalFuel_4_0 = 1.0
lTotalFuel_5_0 = 0.0002 * lTotalFuel + 0
lTotalFuel_7_5 = 0
end
ExportScript.Tools.SendData(301, string.format("%0.4f", lTotalFuel_5_4) )
ExportScript.Tools.SendData(302, string.format("%0.4f", lTotalFuel_4_0) )
ExportScript.Tools.SendData(301, string.format("%0.4f", lTotalFuel_7_5) )
ExportScript.Tools.SendData(302, string.format("%0.4f", lTotalFuel_5_0) )
ExportScript.Tools.SendData(304, (lTotalFuel < 3800.0 and 1 or 0) ) -- Tank warning 1
ExportScript.Tools.SendData(305, (lTotalFuel < 2550.0 and 1 or 0) ) -- Tank warning 2
ExportScript.Tools.SendData(306, (lTotalFuel < 800.0 and 1 or 0) ) -- Tank warning 3
ExportScript.Tools.SendData(307, (lTotalFuel < 650.0 and 1 or 0) ) -- Tank warning 4
if lStation7Tank and (lStation5Tank or lStation6Tank) then
ExportScript.Tools.SendData(304, (lEngineInfo.fuel_external < 1770.0 and 1 or 0) ) -- Tank warning 1
ExportScript.Tools.SendData(305, (lEngineInfo.fuel_external < 1.0 and 1 or 0) ) -- Tank warning 2
elseif lStation7Tank and not(lStation5Tank or lStation6Tank) then
ExportScript.Tools.SendData(304, (lEngineInfo.fuel_external < 1.0 and 1 or 0) ) -- Tank warning 1
ExportScript.Tools.SendData(305, 0 ) -- Tank warning 2
end
ExportScript.Tools.SendData(306, (lEngineInfo.fuel_internal < 2500.0 and 1 or 0) ) -- Tank warning 3
ExportScript.Tools.SendData(307, (lEngineInfo.fuel_internal < 800.0 and 1 or 0) ) -- Tank warning 4
ExportScript.Tools.SendData(308, (lEngineInfo.fuel_internal < 650.0 and 1 or 0) ) -- Tank warning 4
ExportScript.Tools.SendData(303, lRange ) -- Range in km
end
end
@@ -2133,6 +2221,8 @@ function ExportScript.AF.FC_US_Compass()
local lHeading = math.deg(LoGetSelfData().Heading) -- HEADING (Radian to Grad)
--local lHeading = math.deg(LoGetMagneticYaw()) -- HEADING (Radian to Grad)
--lHeading = 360 - lHeading -- muss umgerechnet werden??
local lPitch = LoGetSelfData().Pitch -- Pitch
local lBank = LoGetSelfData().Bank -- Bank
--[[
y_min = 1.0 -- minimaler Ausgabewert
@@ -2150,9 +2240,9 @@ function ExportScript.AF.FC_US_Compass()
]]
lHeading = -0.00555555555555555555555555555556 * lHeading + 1.0
ExportScript.Tools.SendData(31, string.format("%.4f", lHeading)) -- heading
ExportScript.Tools.SendData(32, string.format("%.4f", lDefaultNull)) -- pitch
ExportScript.Tools.SendData(33, string.format("%.4f", lDefaultNull)) -- bank
ExportScript.Tools.SendData(31, string.format("%.4f", lHeading)) -- heading
ExportScript.Tools.SendData(32, string.format("%.4f", lDefaultNull)) -- bank
ExportScript.Tools.SendData(33, string.format("%.4f", lDefaultNull)) -- pitch
end
-- US F-15C Exaust Gas Temperature
@@ -1,7 +1,7 @@
-- MiG-29A Export
ExportScript.FoundFCModule = true
ExportScript.Version.MiG29A = "1.2.0"
ExportScript.Version.MiG29A = "1.2.1"
-- auxiliary function
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
@@ -105,6 +105,9 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
-- Machmeter
ExportScript.AF.FC_Russian_Mach_MiG29()
-- Magnetic Compass
ExportScript.AF.FC_Russian_Compass2()
else
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
end
@@ -145,21 +148,38 @@ function ExportScript.ProcessIkarusFCLowImportanceConfig()
-- 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, 240, 87)
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
-- Wheelbrakes Hydraulic Pressure Right
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
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))
@@ -1,7 +1,7 @@
-- MiG-29G Export
ExportScript.FoundFCModule = true
ExportScript.Version.MiG29G = "1.2.0"
ExportScript.Version.MiG29G = "1.2.1"
-- auxiliary function
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
@@ -99,12 +99,15 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
-- 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
@@ -145,21 +148,38 @@ function ExportScript.ProcessIkarusFCLowImportanceConfig()
-- 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, 240, 87)
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
-- Wheelbrakes Hydraulic Pressure Right
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
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))
@@ -1,7 +1,7 @@
-- MiG-29S Export
ExportScript.FoundFCModule = true
ExportScript.Version.MiG29S = "1.2.0"
ExportScript.Version.MiG29S = "1.2.1"
-- auxiliary function
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
@@ -99,12 +99,15 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
-- 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
@@ -145,21 +148,38 @@ function ExportScript.ProcessIkarusFCLowImportanceConfig()
-- 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, 240, 87)
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
-- Wheelbrakes Hydraulic Pressure Right
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
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))
@@ -0,0 +1,268 @@
-- Spitfire LFMk IX CW
ExportScript.FoundDCSModule = true
ExportScript.Version.SpitfireLFMkIXCW = "1.2.0"
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 --
-----------------------------
@@ -90,7 +90,7 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
-- Barometric Altimeter
ExportScript.AF.FC_Russian_BarometricAltimeter_late()
ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
-- Tachometer (RPM)
ExportScript.AF.FC_Russian_EngineRPM()
@@ -88,7 +88,7 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
-- Barometric Altimeter
ExportScript.AF.FC_Russian_BarometricAltimeter_late()
ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
-- Tachometer (RPM)
ExportScript.AF.FC_Russian_EngineRPM()
Binary file not shown.
Binary file not shown.