@@ -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
3535end
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
0 commit comments