negate VVI SlipBallPosition for SU-25/25T, Su-27, MiG-29...

This commit is contained in:
mcmicha 2016-09-12 01:13:39 +02:00
parent 225aa9e0d8
commit e569ade723

View File

@ -1039,6 +1039,8 @@ function ExportScript.AF.FC_Russian_VVI_Old()
lBank = lBank / 45 lBank = lBank / 45
lBank = (lBank < -1.0 and -1.0 or lBank) -- the result is limited to -1.0 lBank = (lBank < -1.0 and -1.0 or lBank) -- the result is limited to -1.0
end end
lSlipBallPosition = (lSlipBallPosition > 0.0 and (0 - lSlipBallPosition) or (lSlipBallPosition - lSlipBallPosition - lSlipBallPosition)) -- slipball muss negiert werden
--lTurn = lTAS / 187.628865979 -- TRUE AIRSPEED (Meter/Second) / 187.628865979 m/s = Turn-Winkel or True Airspeed in Knots/min / 364 Knots --lTurn = lTAS / 187.628865979 -- TRUE AIRSPEED (Meter/Second) / 187.628865979 m/s = Turn-Winkel or True Airspeed in Knots/min / 364 Knots
--ExportScript.Tools.WriteToLog('lTurn: '..ExportScript.Tools.dump(lTurn)) --ExportScript.Tools.WriteToLog('lTurn: '..ExportScript.Tools.dump(lTurn))
--ExportScript.Tools.WriteToLog('lVVI: '..ExportScript.Tools.dump(lVVI)..', lBank :'..ExportScript.Tools.dump(lBank)) --ExportScript.Tools.WriteToLog('lVVI: '..ExportScript.Tools.dump(lVVI)..', lBank :'..ExportScript.Tools.dump(lBank))
@ -2431,7 +2433,6 @@ emitter_table =
ExportScript.AF.SPO15RWRData[443] = lPrimaryTypeTmp.BottomHemisphere -- bottom hemisphere ExportScript.AF.SPO15RWRData[443] = lPrimaryTypeTmp.BottomHemisphere -- bottom hemisphere
lPrimaryTypeTmp = nil lPrimaryTypeTmp = nil
end end
ExportScript.AF.SPO15RWR_SendData(451, lAzimut <= -170.0) -- left back side ExportScript.AF.SPO15RWR_SendData(451, lAzimut <= -170.0) -- left back side
@ -2538,24 +2539,33 @@ function ExportScript.AF.FindRadarTypeForSPO15(lTWSInfo, PrimaryThreat)
lReturn.AIR = 1 -- primary Air or Weapon lReturn.AIR = 1 -- primary Air or Weapon
end end
if lNameByType ~= nil then
if lType.level1 == 2 or lType.level1 == 3 then if lType.level1 == 2 or lType.level1 == 3 then
-- ground or navy -- ground or navy
if lType.level2 == 16 then if lType.level2 == 16 then
local lAn, lEn local lAn, lEn
-- Ground SAM -- Ground SAM
lAn, lEn = string.find("s300 sr,s300 tr,an/mpq-53", lNameByType, 0, true) -- RU: s-300ps 64h6e sr,s-300ps 40b6m tr
-- US: patriot str
lAn, lEn = string.find("s-300ps 64h6e sr,s-300ps 40b6m tr,an/mpq-53,patriot str", lNameByType, 0, true)
-- long range radar -- long range radar
if lAn ~= nil then if lAn ~= nil then
lReturn.LRR = 1 lReturn.LRR = 1
end end
lAn, lEn = string.find("p19,snr-125,kub,hawk sr,hawk tr,buk sr,buk tr,5n66m sr", lNameByType, 0, true) -- US: hawk sr,hawk tr
-- Ru: s-300ps 40b6md sr,buk 9s18m1 sr,buk 9a310m1 ln,PATRIOT-RLS_P_1,MT-LB_P_1,kub 1s91 str
-- PATRIOT-RLS_P_1 = SA-3 S-125 SR
-- MT-LB_P_1 = SA-3-3 S-125 TR
lAn, lEn = string.find("s-300ps 40b6md sr,buk 9s18m1 sr,buk 9a310m1 ln,PATRIOT-RLS_P_1,MT-LB_P_1,kub 1s91 str,hawk sr,hawk tr", lNameByType, 0, true)
-- mid range radar -- mid range radar
if lAn ~= nil then if lAn ~= nil then
lReturn.MRR = 1 lReturn.MRR = 1
end end
lAn, lEn = string.find("M163 Vulcan,shilka zsu-23-4,gepard,roland ads,roland radar,osa 9a33 ln,2c6m,9a331,Dog Ear Radar", lNameByType, 0, true) -- US: M163 Vulcan,roland ads,roland radar,gepard
-- RU: Dog Ear Radar,tor 9a331,tunguska 2c6m,osa 9a33 ln,shilka zsu-23-4
lAn, lEn = string.find("M163 Vulcan,gepard,roland ads,roland radar,Dog Ear Radar,tor 9a331,tunguska 2c6m,osa 9a33 ln,shilka zsu-23-4", lNameByType, 0, true)
-- short range radar -- short range radar
if lAn ~= nil then if lAn ~= nil then
lReturn.SRR = 1 lReturn.SRR = 1
@ -2567,7 +2577,8 @@ function ExportScript.AF.FindRadarTypeForSPO15(lTWSInfo, PrimaryThreat)
lReturn.SRR = 1 lReturn.SRR = 1
end end
]] ]]
lAn, lEn = string.find("1l13 ewr station,55G6", lNameByType, 0, true) -- RU: 1l13 ewr station,55g6 ewr station
lAn, lEn = string.find("1l13 ewr station,55g6 ewr station", lNameByType, 0, true)
-- EWR -- EWR
if lAn ~= nil then if lAn ~= nil then
lReturn.EWR = 1 lReturn.EWR = 1
@ -2576,13 +2587,17 @@ function ExportScript.AF.FindRadarTypeForSPO15(lTWSInfo, PrimaryThreat)
elseif lType.level2 == 12 then elseif lType.level2 == 12 then
local lAn, lEn local lAn, lEn
-- Ship -- Ship
lAn, lEn = string.find("FFG-7 Oliver H. Perry class,SG-47 Ticonderoga class", lNameByType, 0, true) -- RU Ships: Moscow,Piotr Velikiy,Rezky (Krivak-2)
-- US Ships: FFG-7 Oliver H. Perry class,SG-47 Ticonderoga class
lAn, lEn = string.find("Moscow,Piotr Velikiy,Rezky (Krivak-2),FFG-7 Oliver H. Perry class,SG-47 Ticonderoga class", lNameByType, 0, true)
-- long range radar -- long range radar
if lAn ~= nil then if lAn ~= nil then
lReturn.LRR = 1 lReturn.LRR = 1
end end
lAn, lEn = string.find("CVN-70 Vinson", lNameByType, 0, true) -- RU Ships: Albatros (Grisha-5),TAKR Kuznetsov,Molniya (Tarantul-3),Neustrashimy
-- US Ships: CVN-70 Vinson
lAn, lEn = string.find("Albatros (Grisha-5),TAKR Kuznetsov,Molniya (Tarantul-3),Neustrashimy,CVN-70 Vinson", lNameByType, 0, true)
-- short range radar -- short range radar
if lAn ~= nil then if lAn ~= nil then
lReturn.SRR = 1 lReturn.SRR = 1
@ -2591,12 +2606,50 @@ function ExportScript.AF.FindRadarTypeForSPO15(lTWSInfo, PrimaryThreat)
elseif lType.level1 == 1 and lType.level2 == 1 and lType.level3 == 5 then elseif lType.level1 == 1 and lType.level2 == 1 and lType.level3 == 5 then
if lType.level4 == 26 or lType.level4 == 27 or lType.level4 == 41 then if lType.level4 == 26 or lType.level4 == 27 or lType.level4 == 41 then
-- AWACS -- AWACS
-- level4 26: A-50 -- level4 26: a-50
-- level4 27: E-3 -- level4 27: e-3a
-- level4 41: E-2C -- level4 41: e-2c hawkeye
lReturn.AWACS = 1 lReturn.AWACS = 1
end end
end end
else -- if lNameByType == nil
if lType.level1 == 2 or lType.level1 == 3 then
-- ground or navy
if lType.level2 == 16 then
-- Ground SAM
-- long range radar
-- mid range radar
if lType.level4 == 42 then -- SAM Hawk CWAR /MPQ-55
lReturn.MRR = 1
end
-- short range radar
--[[ if lType.level4 == 27 or -- Dog Ear Radar
lType.level4 == 31 or -- roland ads
lType.level4 == 32 or -- roland radar
lType.level4 == 38 then -- gepard
lReturn.SRR = 1
end
]]
-- EWR
elseif lType.level2 == 12 then
-- long range radar
-- short range radar
end
elseif lType.level1 == 1 and lType.level2 == 1 and lType.level3 == 5 then
if lType.level4 == 26 or lType.level4 == 27 or lType.level4 == 41 then
-- AWACS
-- level4 26: a-50
-- level4 27: e-3a
-- level4 41: e-2c hawkeye
lReturn.AWACS = 1
end
end
end
-- primary threat handling only -- primary threat handling only
if lPrimaryThreat ~= 0 then if lPrimaryThreat ~= 0 then
if lTWSInfo.Emitters[lPrimaryThreat].SignalType == "lock" then if lTWSInfo.Emitters[lPrimaryThreat].SignalType == "lock" then