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))
@ -2364,14 +2366,14 @@ emitter_table =
if(#lTWSInfo.Emitters > 0) then if(#lTWSInfo.Emitters > 0) then
ExportScript.AF.SPO15_FoundErmitter = true ExportScript.AF.SPO15_FoundErmitter = true
for EmitterIndex = 1, #lTWSInfo.Emitters, 1 do for EmitterIndex = 1, #lTWSInfo.Emitters, 1 do
if(lTWSInfo.Emitters[EmitterIndex].Priority > lPriorityTmp) then if(lTWSInfo.Emitters[EmitterIndex].Priority > lPriorityTmp) then
lPriorityTmp = lTWSInfo.Emitters[EmitterIndex].Priority lPriorityTmp = lTWSInfo.Emitters[EmitterIndex].Priority
lPrimaryThreatTmp = EmitterIndex lPrimaryThreatTmp = EmitterIndex
end end
end end
for EmitterIndex = 1, #lTWSInfo.Emitters, 1 do for EmitterIndex = 1, #lTWSInfo.Emitters, 1 do
local lAzimut = ExportScript.Tools.round(lTWSInfo.Emitters[EmitterIndex].Azimuth * 90, 1) local lAzimut = ExportScript.Tools.round(lTWSInfo.Emitters[EmitterIndex].Azimuth * 90, 1)
@ -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,63 +2539,115 @@ function ExportScript.AF.FindRadarTypeForSPO15(lTWSInfo, PrimaryThreat)
lReturn.AIR = 1 -- primary Air or Weapon lReturn.AIR = 1 -- primary Air or Weapon
end end
if lType.level1 == 2 or lType.level1 == 3 then if lNameByType ~= nil then
-- ground or navy if lType.level1 == 2 or lType.level1 == 3 then
if lType.level2 == 16 then -- ground or navy
local lAn, lEn if lType.level2 == 16 then
-- Ground SAM local lAn, lEn
lAn, lEn = string.find("s300 sr,s300 tr,an/mpq-53", lNameByType, 0, true) -- Ground SAM
-- long range radar -- RU: s-300ps 64h6e sr,s-300ps 40b6m tr
if lAn ~= nil then -- US: patriot str
lReturn.LRR = 1 lAn, lEn = string.find("s-300ps 64h6e sr,s-300ps 40b6m tr,an/mpq-53,patriot str", lNameByType, 0, true)
end -- long range radar
if lAn ~= nil then
lReturn.LRR = 1
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
-- mid range radar -- Ru: s-300ps 40b6md sr,buk 9s18m1 sr,buk 9a310m1 ln,PATRIOT-RLS_P_1,MT-LB_P_1,kub 1s91 str
if lAn ~= nil then -- PATRIOT-RLS_P_1 = SA-3 S-125 SR
lReturn.MRR = 1 -- MT-LB_P_1 = SA-3-3 S-125 TR
end 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
if lAn ~= nil then
lReturn.MRR = 1
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
-- short range radar -- RU: Dog Ear Radar,tor 9a331,tunguska 2c6m,osa 9a33 ln,shilka zsu-23-4
if lAn ~= nil then 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)
lReturn.SRR = 1 -- short range radar
end if lAn ~= nil then
--[[ if lType.level4 == 27 or -- Dog Ear Radar lReturn.SRR = 1
lType.level4 == 31 or -- roland ads end
lType.level4 == 32 or -- roland radar --[[ if lType.level4 == 27 or -- Dog Ear Radar
lType.level4 == 38 then -- gepard lType.level4 == 31 or -- roland ads
lReturn.SRR = 1 lType.level4 == 32 or -- roland radar
end lType.level4 == 38 then -- gepard
]] lReturn.SRR = 1
lAn, lEn = string.find("1l13 ewr station,55G6", lNameByType, 0, true) end
-- EWR ]]
if lAn ~= nil then -- RU: 1l13 ewr station,55g6 ewr station
lReturn.EWR = 1 lAn, lEn = string.find("1l13 ewr station,55g6 ewr station", lNameByType, 0, true)
end -- EWR
if lAn ~= nil then
lReturn.EWR = 1
end
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)
-- long range radar -- US Ships: FFG-7 Oliver H. Perry class,SG-47 Ticonderoga class
if lAn ~= nil then lAn, lEn = string.find("Moscow,Piotr Velikiy,Rezky (Krivak-2),FFG-7 Oliver H. Perry class,SG-47 Ticonderoga class", lNameByType, 0, true)
lReturn.LRR = 1 -- long range radar
end if lAn ~= nil then
lReturn.LRR = 1
end
lAn, lEn = string.find("CVN-70 Vinson", lNameByType, 0, true) -- RU Ships: Albatros (Grisha-5),TAKR Kuznetsov,Molniya (Tarantul-3),Neustrashimy
-- short range radar -- US Ships: CVN-70 Vinson
if lAn ~= nil then lAn, lEn = string.find("Albatros (Grisha-5),TAKR Kuznetsov,Molniya (Tarantul-3),Neustrashimy,CVN-70 Vinson", lNameByType, 0, true)
lReturn.SRR = 1 -- short range radar
if lAn ~= nil then
lReturn.SRR = 1
end
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 end
elseif lType.level1 == 1 and lType.level2 == 1 and lType.level3 == 5 then else -- if lNameByType == nil
if lType.level4 == 26 or lType.level4 == 27 or lType.level4 == 41 then if lType.level1 == 2 or lType.level1 == 3 then
-- AWACS -- ground or navy
-- level4 26: A-50 if lType.level2 == 16 then
-- level4 27: E-3 -- Ground SAM
-- level4 41: E-2C -- long range radar
lReturn.AWACS = 1
-- 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
end end
-- primary threat handling only -- primary threat handling only