Skip to content

Commit 8aab386

Browse files
committed
2020.01.15
1 parent c667719 commit 8aab386

File tree

7 files changed

+115
-58
lines changed

7 files changed

+115
-58
lines changed

Config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ExportScript.Config.Port2 = 5160 -- port for sending data
1515

1616
-- device 3
1717
ExportScript.Config.Export3 = true -- sending data
18-
ExportScript.Config.Export3SD = true -- sendind data from SD
18+
ExportScript.Config.Export3SD = false -- sendind data from SD
1919
ExportScript.Config.Host3 = "192.168.0.16" -- IP for 3rd app
2020
ExportScript.Config.Port3 = 5160 -- port for sending data
2121

Modules/F-5E-3.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ ExportScript.ConfigEveryFrameArguments =
3131
}
3232
ExportScript.ConfigArguments =
3333
{
34+
[340] = "%1d", -- Interval Switch [sec], .06/.10/.14 {-1.0, 0.0, 1.0}
35+
[341] = "%.1f", -- Bombs Arm Switch, SAFE/TAIL/NOSE & TAIL/NOSE {0.0, 0.1, 0.2, 0.3}
36+
[342] = "%1d", -- GUNS MSL Cover 0/1
37+
[343] = "%1d", -- GUNS MSL CAMR / OFF / CAMR ONLY 1/0/-1
38+
[344] = "%.1f", -- External Stores Selector, RIPL/BOMB/SAFE/RKT DISP {0.0,0.1,0.2,0.3}
39+
[345] = "%.2f", -- Missile Volume Knob - Rotate to adjust volume (Axis) {0.0, 1.0} in 0.15 Steps
40+
[346] = "%1d", -- Armament Position Selector Switch - LEFT WINGTIP, ON/OFF
41+
[347] = "%1d", -- Armament Position Selector Switch - LEFT OUTBD, ON/OFF
42+
[348] = "%1d", -- Armament Position Selector Switch - LEFT INBD, ON/OFF
43+
[349] = "%1d", -- Armament Position Selector Switch - CENTERLINE, ON/OFF
44+
[350] = "%1d", -- Armament Position Selector Switch - RIGHT INBD, ON/OFF
45+
[351] = "%1d", -- Armament Position Selector Switch - RIGHT OUTBD, ON/OFF
46+
[352] = "%1d", -- Armament Position Selector Switch - RIGHT WINGTIP, ON/OFF
3447
}
3548

3649
-- Pointed to by ProcessDCSHighImportance

Modules/FC_Functions.lua

Lines changed: 55 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@ function ExportScript.AF.FC_AoA_A10A()
88
-- yellow <= 9
99

1010
if lAoA > 12.6 then
11-
ExportScript.Tools.SendData(1, "1")
12-
ExportScript.Tools.SendData(2, "0")
11+
ExportScript.Tools.SendData(540, "1")
12+
ExportScript.Tools.SendData(541, "0")
1313
end
1414

1515
if lAoA >= 11.5 and lAoA <= 12.6 then
16-
ExportScript.Tools.SendData(1, "1")
17-
ExportScript.Tools.SendData(2, "1")
16+
ExportScript.Tools.SendData(540, "1")
17+
ExportScript.Tools.SendData(541, "1")
1818
end
1919

2020
if lAoA > 9 and lAoA < 11.5 then
21-
ExportScript.Tools.SendData(1, "0")
22-
ExportScript.Tools.SendData(2, "1")
23-
ExportScript.Tools.SendData(3, "0")
21+
ExportScript.Tools.SendData(540, "0")
22+
ExportScript.Tools.SendData(541, "1")
23+
ExportScript.Tools.SendData(542, "0")
2424
end
2525

2626
if lAoA >= 7.5 and lAoA <= 9 then
27-
ExportScript.Tools.SendData(2, "1")
28-
ExportScript.Tools.SendData(3, "1")
27+
ExportScript.Tools.SendData(541, "1")
28+
ExportScript.Tools.SendData(542, "1")
2929
end
3030

3131
if lAoA < 7.5 then
32-
ExportScript.Tools.SendData(2, "0")
33-
ExportScript.Tools.SendData(3, "1")
32+
ExportScript.Tools.SendData(541, "0")
33+
ExportScript.Tools.SendData(542, "1")
3434
end
3535
end
3636

@@ -54,15 +54,16 @@ function ExportScript.AF.FC_AoA_Su33()
5454

5555
if lAoA > 9 and lAoA < 10 then
5656
ExportScript.Tools.SendData(1, "0")
57-
ExportScript.Tools.SendData(2, "1")
57+
ExportScript.Tools.SendData(2, "1")
58+
ExportScript.Tools.SendData(3, "0")
5859
end
5960

60-
if lAoA >= 10 and lAoA < 10.5 then
61+
if lAoA >= 10 and lAoA <= 10.5 then
6162
ExportScript.Tools.SendData(2, "1")
6263
ExportScript.Tools.SendData(3, "1")
6364
end
6465

65-
if lAoA >= 10.5 then
66+
if lAoA > 10.5 then
6667
ExportScript.Tools.SendData(2, "0")
6768
ExportScript.Tools.SendData(3, "1")
6869
end
@@ -131,21 +132,21 @@ function ExportScript.AF.FC_SPO15RWR()
131132

132133
-- power of the threat
133134
local lPower = ExportScript.Tools.round(lTWSInfo.Emitters[EmitterIndex].Power * 15, 0, "ceil") + 1
134-
ExportScript.AF.SPO15RWRData[216] = (lPower <= 1 and 0 or 1) -- 1. power lamp
135-
ExportScript.AF.SPO15RWRData[215] = (lPower <= 2 and 0 or 1) -- 2. power lamp
136-
ExportScript.AF.SPO15RWRData[214] = (lPower <= 3 and 0 or 1) -- 3. power lamp
137-
ExportScript.AF.SPO15RWRData[213] = (lPower <= 4 and 0 or 1) -- 4. power lamp
138-
ExportScript.AF.SPO15RWRData[212] = (lPower <= 5 and 0 or 1) -- 5. power lamp
139-
ExportScript.AF.SPO15RWRData[211] = (lPower <= 6 and 0 or 1) -- 6. power lamp
140-
ExportScript.AF.SPO15RWRData[210] = (lPower <= 7 and 0 or 1) -- 7. power lamp
141-
ExportScript.AF.SPO15RWRData[209] = (lPower <= 8 and 0 or 1) -- 8. power lamp
142-
ExportScript.AF.SPO15RWRData[208] = (lPower <= 9 and 0 or 1) -- 9. power lamp
143-
ExportScript.AF.SPO15RWRData[207] = (lPower <= 10 and 0 or 1) -- 10. power lamp
144-
ExportScript.AF.SPO15RWRData[206] = (lPower <= 11 and 0 or 1) -- 11. power lamp
145-
ExportScript.AF.SPO15RWRData[205] = (lPower <= 12 and 0 or 1) -- 12. power lamp
146-
ExportScript.AF.SPO15RWRData[204] = (lPower <= 13 and 0 or 1) -- 13. power lamp
147-
ExportScript.AF.SPO15RWRData[203] = (lPower <= 14 and 0 or 1) -- 14. power lamp
148-
ExportScript.AF.SPO15RWRData[202] = (lPower <= 15 and 0 or 1) -- 15. power lamp
135+
ExportScript.AF.SPO15RWRData[411] = (lPower <= 1 and 0 or 1) -- 1. power lamp
136+
ExportScript.AF.SPO15RWRData[412] = (lPower <= 2 and 0 or 1) -- 2. power lamp
137+
ExportScript.AF.SPO15RWRData[413] = (lPower <= 3 and 0 or 1) -- 3. power lamp
138+
ExportScript.AF.SPO15RWRData[414] = (lPower <= 4 and 0 or 1) -- 4. power lamp
139+
ExportScript.AF.SPO15RWRData[415] = (lPower <= 5 and 0 or 1) -- 5. power lamp
140+
ExportScript.AF.SPO15RWRData[416] = (lPower <= 6 and 0 or 1) -- 6. power lamp
141+
ExportScript.AF.SPO15RWRData[417] = (lPower <= 7 and 0 or 1) -- 7. power lamp
142+
ExportScript.AF.SPO15RWRData[418] = (lPower <= 8 and 0 or 1) -- 8. power lamp
143+
ExportScript.AF.SPO15RWRData[419] = (lPower <= 9 and 0 or 1) -- 9. power lamp
144+
ExportScript.AF.SPO15RWRData[420] = (lPower <= 10 and 0 or 1) -- 10. power lamp
145+
ExportScript.AF.SPO15RWRData[421] = (lPower <= 11 and 0 or 1) -- 11. power lamp
146+
ExportScript.AF.SPO15RWRData[422] = (lPower <= 12 and 0 or 1) -- 12. power lamp
147+
ExportScript.AF.SPO15RWRData[423] = (lPower <= 13 and 0 or 1) -- 13. power lamp
148+
ExportScript.AF.SPO15RWRData[424] = (lPower <= 14 and 0 or 1) -- 14. power lamp
149+
ExportScript.AF.SPO15RWRData[425] = (lPower <= 15 and 0 or 1) -- 15. power lamp
149150

150151
-- type of the threat
151152
local lPrimaryTypeTmp = ExportScript.AF.FindRadarTypeForSPO15(lTWSInfo, lPrimaryThreatTmp)
@@ -164,14 +165,27 @@ function ExportScript.AF.FC_SPO15RWR()
164165
ExportScript.AF.SPO15RWRData[440] = 1
165166
ExportScript.AF.SPO15RWRData[441] = 0 -- blinking lights off
166167
end
168+
169+
-- Lock
170+
ExportScript.AF.SPO15RWRData[444] = 0 -- off
171+
if ExportScript.AF.SPO15RWRData[440] == 1 then
172+
ExportScript.AF.SPO15RWRData[444] = 1 -- Lock
173+
elseif ExportScript.AF.SPO15RWRData[441] == 1 then
174+
ExportScript.AF.SPO15RWRData[444] = 0.5 -- Missle on air
175+
end
176+
177+
if lPrimaryTypeTmp.Lock == 0 then
178+
ExportScript.AF.SPO15RWRData[444] = 0
179+
end
180+
167181
-- hemisphere
168182
ExportScript.AF.SPO15RWRData[442] = lPrimaryTypeTmp.TopHemisphere -- top hemisphere
169183
ExportScript.AF.SPO15RWRData[443] = lPrimaryTypeTmp.BottomHemisphere -- bottom hemisphere
170184

171185
lPrimaryTypeTmp = nil
172186
end
173187
--if EmitterIndex == 2 then
174-
-- Secondary Thread direction
188+
-- Secondary Thread direction
175189
ExportScript.AF.SPO15RWR_SendData(451, lAzimut <= -170.0) -- left back side
176190
ExportScript.AF.SPO15RWR_SendData(452, (lAzimut <= -90.0 and lAzimut >= -170.0 )) -- left 90 degree
177191
ExportScript.AF.SPO15RWR_SendData(453, (lAzimut <= -55.0 and lAzimut >= -125.0 )) -- left 50 degree
@@ -183,18 +197,18 @@ function ExportScript.AF.FC_SPO15RWR()
183197
ExportScript.AF.SPO15RWR_SendData(459, (lAzimut >= 90.0 and lAzimut <= 170.0 )) -- right 90 degree
184198
ExportScript.AF.SPO15RWR_SendData(460, lAzimut >= 170.0) -- right back side
185199
--end
186-
187-
188-
end
200+
end
201+
202+
-- type of the secondary threat
203+
local lSecondaryTypeTmp = ExportScript.AF.FindRadarTypeForSPO15(lTWSInfo)
204+
ExportScript.AF.SPO15RWRData[470] = (lSecondaryTypeTmp.AIR == 1 and 1 or 0) -- secondary Air or Weapon
205+
ExportScript.AF.SPO15RWRData[471] = (lSecondaryTypeTmp.LRR == 1 and 1 or 0) -- long range radar
206+
ExportScript.AF.SPO15RWRData[472] = (lSecondaryTypeTmp.MRR == 1 and 1 or 0) -- mid range radar
207+
ExportScript.AF.SPO15RWRData[473] = (lSecondaryTypeTmp.SRR == 1 and 1 or 0) -- short range radar
208+
ExportScript.AF.SPO15RWRData[474] = (lSecondaryTypeTmp.EWR == 1 and 1 or 0) -- EWR
209+
ExportScript.AF.SPO15RWRData[475] = (lSecondaryTypeTmp.AWACS == 1 and 1 or 0) -- AWACS
210+
lSecondaryTypeTmp = nil
189211

190-
-- Lock
191-
ExportScript.AF.SPO15RWRData[444] = 0 -- off
192-
if ExportScript.AF.SPO15RWRData[440] == 1 then
193-
ExportScript.AF.SPO15RWRData[444] = 1 -- Lock
194-
elseif ExportScript.AF.SPO15RWRData[441] == 1 then
195-
ExportScript.AF.SPO15RWRData[444] = 0.5 -- Missle on air
196-
end
197-
198212
-- Ermitter Power Triangle
199213
if ExportScript.AF.SPO15RWRData[411] == 1 then
200214
ExportScript.AF.SPO15RWRData[426] = 1

Modules/Ka-50.lua

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,37 @@ ExportScript.FoundDCSModule = true
33

44
ExportScript.ConfigEveryFrameArguments =
55
{
6-
[315] = "%0.1f", -- Waypoints LED
7-
[519] = "%0.1f", -- Inflight INU Realignment LED
8-
[316] = "%0.1f", -- Fixpoints LED
9-
[520] = "%0.1f", -- Precise INU Alignment LED
10-
[317] = "%0.1f", -- Airfields LED
11-
[521] = "%0.1f", -- Normal INU Alignment LED
12-
[318] = "%0.1f", -- Targets LED
13-
[313] = "%0.1f", -- Enter LED
14-
[314] = "%0.1f", -- Cancel LED
15-
[522] = "%0.1f", -- Initial Nav Pos LED
16-
[319] = "%0.1f", -- Self coordinates LED
17-
[320] = "%0.1f", -- Course:Course Deviation/Time/Range to WPT LED
18-
[321] = "%0.1f", -- Wind Heading/Speed LED
19-
[322] = "%0.1f", -- True Heading/Time/Range to final WPT LED
20-
[323] = "%0.1f", -- Bearing/Range to target LED
6+
-- Datalink
7+
[159] = "%.1f", -- Send/Memory LED
8+
[150] = "%.1f", -- Ingress to targetLED
9+
[161] = "%.1f", -- Erase LED
10+
[15] = "%.1f", -- N/A LED
11+
[16] = "%.1f", -- To all LED
12+
[17] = "%.1f", -- Wingman 1 LED
13+
[18] = "%.1f", -- Wingman 2 LED
14+
[19] = "%.1f", -- Wingman 3 LED
15+
[20] = "%.1f", -- Wingman 4 LED
16+
[21] = "%.1f", -- Target #1/Vehicle LED
17+
[22] = "%.1f", -- Target #2/SAM LED
18+
[23] = "%.1f", -- Target #3/Other type LED
19+
[50] = "%.1f", -- Ingress point LED
20+
21+
-- PVI-800
22+
[315] = "%.1f", -- Waypoints LED
23+
[519] = "%.1f", -- Inflight INU Realignment LED
24+
[316] = "%.1f", -- Fixpoints LED
25+
[520] = "%.1f", -- Precise INU Alignment LED
26+
[317] = "%.1f", -- Airfields LED
27+
[521] = "%.1f", -- Normal INU Alignment LED
28+
[318] = "%.1f", -- Targets LED
29+
[313] = "%.1f", -- Enter LED
30+
[314] = "%.1f", -- Cancel LED
31+
[522] = "%.1f", -- Initial Nav Pos LED
32+
[319] = "%.1f", -- Self coordinates LED
33+
[320] = "%.1f", -- Course:Course Deviation/Time/Range to WPT LED
34+
[321] = "%.1f", -- Wind Heading/Speed LED
35+
[322] = "%.1f", -- True Heading/Time/Range to final WPT LED
36+
[323] = "%.1f", -- Bearing/Range to target LED
2137
}
2238

2339
ExportScript.ConfigArguments =

Modules/MiG-29G.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- MIG-29G
2+
ExportScript.FoundFCModule = true
3+
4+
-- auxiliary function
5+
dofile(ExportScript.Config.ExportModulePath.."FC_Functions.lua")
6+
7+
function ExportScript.ProcessFCHighImportanceConfig()
8+
end
9+
10+
function ExportScript.ProcessFCLowImportanceConfig()
11+
-- SPO15 Radar Warning Reciver
12+
ExportScript.AF.FC_SPO15RWR()
13+
end

update_modules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ MiG-15bis.lua
2929
MiG-19P.lua
3030
MiG-21Bis.lua
3131
MiG-29A.lua
32+
MiG-29G.lua
3233
MiG-29S.lua
3334
P-51D.lua
3435
SA342M.lua

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.01.02
1+
2021.01.15

0 commit comments

Comments
 (0)