diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index d47e6da06..fcf723279 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -1444,6 +1444,7 @@ AIRBOSS.PatternStep = { GROOVE_IC = "Groove In Close", GROOVE_AR = "Groove At the Ramp", GROOVE_IW = "Groove In the Wires", + GROOVE_IWs = "Groove In the Wires stopped?", -- VNAO Edit - Added GROOVE_AL = "Groove Abeam Landing Spot", GROOVE_LC = "Groove Level Cross", BOLTER = "Bolter Pattern", @@ -3080,12 +3081,12 @@ end --- Set up SRS for usage without sound files -- @param #AIRBOSS self --- @param #string PathToSRS Path to SRS TTS folder, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio". +-- @param #string PathToSRS Path to SRS folder, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone". -- @param #number Port Port of the SRS server, defaults to 5002. -- @param #string Culture (Optional, Airboss Culture) Culture, defaults to "en-US". -- @param #string Gender (Optional, Airboss Gender) Gender, e.g. "male" or "female". Defaults to "male". -- @param #string Voice (Optional, Airboss Voice) Set to use a specific voice. Will **override gender and culture** settings. --- @param #string GoogleCreds (Optional) Path to Google credentials, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio\\yourgooglekey.json". +-- @param #string GoogleCreds (Optional) Path to Google credentials, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone\\yourgooglekey.json". -- @param #number Volume (Optional) E.g. 0.75. Defaults to 1.0 (loudest). -- @param #table AltBackend (Optional) See MSRS for details. -- @return #AIRBOSS self @@ -4502,7 +4503,7 @@ function AIRBOSS:_InitStennis() -- Early break. self.BreakEarly.name = "Early Break" self.BreakEarly.Xmin = -UTILS.NMToMeters( 1 ) -- Not more than 1 NM behind the boat. Last check was at 0. - self.BreakEarly.Xmax = UTILS.NMToMeters( 5 ) -- Not more than 5 NM in front of the boat. Enough for late breaks? + self.BreakEarly.Xmax = UTILS.NMToMeters( 7 ) -- Not more than 5 NM in front of the boat. Enough for late breaks? -- VNAO EDIT - original value 5 self.BreakEarly.Zmin = -UTILS.NMToMeters( 2 ) -- Not more than 2 NM port. self.BreakEarly.Zmax = UTILS.NMToMeters( 1 ) -- Not more than 1 NM starboard. self.BreakEarly.LimitXmin = 0 -- Check and next step 0.2 NM port and in front of boat. @@ -4513,7 +4514,7 @@ function AIRBOSS:_InitStennis() -- Late break. self.BreakLate.name = "Late Break" self.BreakLate.Xmin = -UTILS.NMToMeters( 1 ) -- Not more than 1 NM behind the boat. Last check was at 0. - self.BreakLate.Xmax = UTILS.NMToMeters( 5 ) -- Not more than 5 NM in front of the boat. Enough for late breaks? + self.BreakLate.Xmax = UTILS.NMToMeters( 7 ) -- Not more than 5 NM in front of the boat. Enough for late breaks? -- VNAO EDIT - original value 5 self.BreakLate.Zmin = -UTILS.NMToMeters( 2 ) -- Not more than 2 NM port. self.BreakLate.Zmax = UTILS.NMToMeters( 1 ) -- Not more than 1 NM starboard. self.BreakLate.LimitXmin = 0 -- Check and next step 0.8 NM port and in front of boat. @@ -4524,7 +4525,7 @@ function AIRBOSS:_InitStennis() -- Abeam position. self.Abeam.name = "Abeam Position" self.Abeam.Xmin = -UTILS.NMToMeters( 5 ) -- Not more then 5 NM astern of boat. Should be LIG call anyway. - self.Abeam.Xmax = UTILS.NMToMeters( 5 ) -- Not more then 5 NM ahead of boat. + self.Abeam.Xmax = UTILS.NMToMeters( 7 ) -- Not more then 5 NM ahead of boat. --VNAO EDIT - original value 5 self.Abeam.Zmin = -UTILS.NMToMeters( 2 ) -- Not more than 2 NM port. self.Abeam.Zmax = 500 -- Not more than 500 m starboard. Must be port! self.Abeam.LimitXmin = -200 -- Check and next step 200 meters behind the ship. @@ -4603,7 +4604,7 @@ function AIRBOSS:_InitNimitz() self.carrierparam.wire1 = 55 -- Distance from stern to first wire. self.carrierparam.wire2 = 67 self.carrierparam.wire3 = 79 - self.carrierparam.wire4 = 92 + self.carrierparam.wire4 = 96 -- VNAO Edit - original value was 92 -- Landing distance. self.carrierparam.landingdist = self.carrierparam.sterndist+self.carrierparam.wire3 @@ -5096,6 +5097,7 @@ function AIRBOSS:SetVoiceOversLSOByRaynor( mizfolder ) self.LSOCall.N8.duration = 0.38 self.LSOCall.N9.duration = 0.34 self.LSOCall.PADDLESCONTACT.duration = 0.91 + self.LSOCall.POWERsoft.duration=0.9 -- VNAO Edit - Added self.LSOCall.POWER.duration = 0.45 self.LSOCall.RADIOCHECK.duration = 0.90 self.LSOCall.RIGHTFORLINEUP.duration = 0.70 @@ -5154,6 +5156,7 @@ function AIRBOSS:SetVoiceOversLSOByFF( mizfolder ) self.LSOCall.N9.duration = 0.40 self.LSOCall.PADDLESCONTACT.duration = 1.00 self.LSOCall.POWER.duration = 0.50 + self.LSOCall.POWERsoft.duration=0.9 -- VNAO Edit - Added self.LSOCall.RADIOCHECK.duration = 1.10 self.LSOCall.RIGHTFORLINEUP.duration = 0.80 self.LSOCall.ROGERBALL.duration = 1.00 @@ -5246,6 +5249,7 @@ function AIRBOSS:_InitVoiceOvers() HIGH = { file = "LSO-High", suffix = "ogg", loud = true, subtitle = "You're high", duration = 0.65, subduration = 1 }, LOW = { file = "LSO-Low", suffix = "ogg", loud = true, subtitle = "You're low", duration = 0.50, subduration = 1 }, POWER = { file = "LSO-Power", suffix = "ogg", loud = true, subtitle = "Power", duration = 0.50, subduration = 1 }, -- duration 0.45 was too short + POWERsoft={ file="LSO-Power-soft", suffix="ogg", loud=false, subtitle="Power-soft", duration=0.90, subduration=1 }, -- VNAO Edit - Added SLOW = { file = "LSO-Slow", suffix = "ogg", loud = true, subtitle = "You're slow", duration = 0.65, subduration = 1 }, FAST = { file = "LSO-Fast", suffix = "ogg", loud = true, subtitle = "You're fast", duration = 0.70, subduration = 1 }, ROGERBALL = { file = "LSO-RogerBall", suffix = "ogg", loud = false, subtitle = "Roger ball", duration = 1.00, subduration = 2 }, @@ -5407,13 +5411,13 @@ function AIRBOSS:_GetAircraftAoA( playerData ) elseif tomcat then -- F-14A/B Tomcat parameters (taken from NATOPS). Converted from units 0-30 to degrees. -- Currently assuming a linear relationship with 0=-10 degrees and 30=+40 degrees as stated in NATOPS. - aoa.SLOW = self:_AoAUnit2Deg( playerData, 17.0 ) -- 18.33 --17.0 units - aoa.Slow = self:_AoAUnit2Deg( playerData, 16.0 ) -- 16.67 --16.0 units - aoa.OnSpeedMax = self:_AoAUnit2Deg( playerData, 15.5 ) -- 15.83 --15.5 units + aoa.SLOW = self:_AoAUnit2Deg( playerData, 17.5 ) -- 18.33 --17.0 units -- VNAO Edit - Original value 17 + aoa.Slow = self:_AoAUnit2Deg( playerData, 16.5 ) -- 16.67 --16.0 units -- VNAO Edit - Original value 16 + aoa.OnSpeedMax = self:_AoAUnit2Deg( playerData, 16.0 ) -- 15.83 --15.5 units -- VNAO Edit - Original value 15.5 aoa.OnSpeed = self:_AoAUnit2Deg( playerData, 15.0 ) -- 15.0 --15.0 units - aoa.OnSpeedMin = self:_AoAUnit2Deg( playerData, 14.5 ) -- 14.17 --14.5 units - aoa.Fast = self:_AoAUnit2Deg( playerData, 14.0 ) -- 13.33 --14.0 units - aoa.FAST = self:_AoAUnit2Deg( playerData, 13.0 ) -- 11.67 --13.0 units + aoa.OnSpeedMin = self:_AoAUnit2Deg( playerData, 14.0 ) -- 14.17 --14.5 units -- VNAO Edit - Original value 14.5 + aoa.Fast = self:_AoAUnit2Deg( playerData, 13.5 ) -- 13.33 --14.0 units -- VNAO Edit - Original value 14 + aoa.FAST = self:_AoAUnit2Deg( playerData, 12.5 ) -- 11.67 --13.0 units -- VNAO Edit - Original value 13 elseif goshawk then -- T-45C Goshawk parameters. aoa.SLOW = 8.00 -- 19 @@ -5427,13 +5431,13 @@ function AIRBOSS:_GetAircraftAoA( playerData ) -- A-4E-C Skyhawk parameters from https://forums.eagle.ru/showpost.php?p=3703467&postcount=390 -- Note that these are arbitrary UNITS and not degrees. We need a conversion formula! -- Github repo suggests they simply use a factor of two to get from degrees to units. - aoa.SLOW = 9.50 -- =19.0/2 - aoa.Slow = 9.25 -- =18.5/2 - aoa.OnSpeedMax = 9.00 -- =18.0/2 - aoa.OnSpeed = 8.75 -- =17.5/2 8.1 - aoa.OnSpeedMin = 8.50 -- =17.0/2 - aoa.Fast = 8.25 -- =17.5/2 - aoa.FAST = 8.00 -- =16.5/2 + aoa.SLOW = 10.50 -- =19.0/2 -- VNAO Edit - Original value 9.50 + aoa.Slow = 9.50 -- =18.5/2 -- VNAO Edit - Original value 9.25 + aoa.OnSpeedMax = 9.25 -- =18.0/2 -- VNAO Edit - Original value 9.00 + aoa.OnSpeed = 8.75 -- =17.5/2 8.1 -- VNAO Edit - Original value 8.75 + aoa.OnSpeedMin = 8.25 -- =17.0/2 -- VNAO Edit - Original value 8.50 + aoa.Fast = 8.00 -- =17.5/2 -- VNAO Edit - Original value 8.25 + aoa.FAST = 7.00 -- =16.5/2 -- VNAO Edit - Original value 8.0 elseif harrier then -- AV-8B Harrier parameters. Tuning done on the Fast AoA to allow for abeam and ninety at Nozzles 55. Pene testing aoa.SLOW = 16.0 @@ -8075,6 +8079,32 @@ function AIRBOSS:_CheckPlayerStatus() -- TODO: This might cause problems if the CCA is set to be very small! if unit:IsInZone( self.zoneCCA ) then + -- VNAO Edit - Added wrapped up call to LSO grading + if playerData.step==AIRBOSS.PatternStep.WAKE then-- VNAO Edit - Added + if math.abs(playerData.unit:GetRoll())>35 and math.abs(playerData.unit:GetRoll())<=40 then-- VNAO Edit - Added + playerData.wrappedUpAtWakeLittle = true -- VNAO Edit - Added + elseif math.abs(playerData.unit:GetRoll()) >40 and math.abs(playerData.unit:GetRoll())<=45 then-- VNAO Edit - Added + playerData.wrappedUpAtWakeFull = true-- VNAO Edit - Added + elseif math.abs(playerData.unit:GetRoll()) >45 then-- VNAO Edit - Added + playerData.wrappedUpAtWakeUnderline = true -- VNAO Edit - Added + elseif math.abs(playerData.unit:GetRoll()) <20 and math.abs(playerData.unit:GetRoll()) >=10 then -- VNAO Edit - Added a new AA comment based on discussion with Lipps today, and going to replace the AA at the X with the original LUL comments + playerData.AAatWakeLittle = true -- VNAO Edit - Added + elseif math.abs(playerData.unit:GetRoll()) <10 and math.abs(playerData.unit:GetRoll()) >=2 then -- VNAO Edit - Added a new AA comment based on discussion with Lipps today, and going to replace the AA at the X with the original LUL comments + playerData.AAatWakeFull = true -- VNAO Edit - Added + elseif math.abs(playerData.unit:GetRoll()) <2 then -- VNAO Edit - Added a new AA comment based on discussion with Lipps today, and going to replace the AA at the X with the original LUL comments + playerData.AAatWakeUnderline = true -- VNAO Edit - Added + else -- VNAO Edit - Added + end -- VNAO Edit - Added + + if math.abs(playerData.unit:GetAoA())>= 15 then -- VNAO Edit - Added + playerData.AFU = true -- VNAO Edit - Added + elseif math.abs(playerData.unit:GetAoA())<= 5 then -- VNAO Edit - Added + playerData.AFU = true -- VNAO Edit - Added + else -- VNAO Edit - Added + end -- VNAO Edit - Added + end-- VNAO Edit - Added + + -- Display aircraft attitude and other parameters as message text. if playerData.attitudemonitor then self:_AttitudeMonitor( playerData ) @@ -8306,7 +8336,7 @@ function AIRBOSS:_SetTimeInGroove( playerData ) -- Set time in the groove if playerData.TIG0 then - playerData.Tgroove = timer.getTime() - playerData.TIG0 + playerData.Tgroove = timer.getTime() - playerData.TIG0 - 1.5 -- VNAO Edit - Subtracting an extra 1.5 else playerData.Tgroove = 999 end @@ -9427,7 +9457,19 @@ function AIRBOSS:_DirtyUp( playerData ) if inzone then -- Hint for player about altitude, AoA etc. - self:_PlayerHint( playerData ) + playerData.Tgroove = timer.getTime() - playerData.TIG0 - 1.5 -- VNAO Edit - Subtracting an extra 1.5 + + -- VNAO Edit - Added wrapped up call to LSO grading + playerData.wrappedUpAtWakeLittle = false -- VNAO Edit - Added + playerData.wrappedUpAtWakeFull = false -- VNAO Edit - Added + playerData.wrappedUpAtWakeUnderline = false -- VNAO Edit - Added + playerData.wrappedUpAtStartLittle = false -- VNAO Edit - Added + playerData.wrappedUpAtStartFull = false -- VNAO Edit - Added + playerData.wrappedUpAtStartUnderline = false -- VNAO Edit - Added + playerData.AAatWakeLittle = false -- VNAO Edit - Added + playerData.AAatWakeFull = false -- VNAO Edit - Added + playerData.AAatWakeUnderline = false -- VNAO Edit - Added + playerData.AFU = false -- VNAO Edit - Added -- Radio call "Say/Fly needles". Delayed by 10/15 seconds. if playerData.actype == AIRBOSS.AircraftCarrier.HORNET @@ -9522,7 +9564,7 @@ end --- Break entry for case I/II recoveries. -- @param #AIRBOSS self -- @param #AIRBOSS.PlayerData playerData Player data table. -function AIRBOSS:_BreakEntry( playerData ) +function AIRBOSS:_BreakEntry( playerData ) --Adam Edits begin 7/24/23 -- Get distances between carrier and player unit (parallel and perpendicular to direction of movement of carrier) local X, Z = self:_GetDistances( playerData.unit ) @@ -9533,17 +9575,111 @@ function AIRBOSS:_BreakEntry( playerData ) return end + local stern = self:_GetSternCoord() + local coord = playerData.unit:GetCoordinate() + local dist = coord:Get2DDistance( stern ) + + --adam edits + local playerCallsign = playerData.unit:GetCallsign() + --trigger.action.outText(' Hornet is hook down on pre-break entry for testing hook argument ', 5) + --trigger.action.outText(' Hornet callsign is '..playerCallsign, 5) + local playerName = playerData.name + local unit = playerData.unit + + --local playerName = unit:GetName() + --trigger.action.outText(' Hornet name is '..playerName, 5) + local unitClient = Unit.getByName(unit:GetName()) + local hookArgument = unitClient:getDrawArgumentValue(25) + local hookArgument_Tomcat = unitClient:getDrawArgumentValue(1305) + local speedMPS = playerData.unit:GetVelocityMPS() + local speedKTS = UTILS.MpsToKnots( speedMPS ) + local player_alt = playerData.unit:GetAltitude() + + player_alt_feet = player_alt * 3.28 + player_alt_feet = player_alt_feet/10 + player_alt_feet = math.floor(player_alt_feet)*10 + + local player_velocity_round = speedKTS * 1.00 + player_velocity_round = player_velocity_round/10 + player_velocity_round = math.floor(player_velocity_round)*10 + + local player_alt_feet = player_alt * 3.28 + player_alt_feet = player_alt_feet/10 + player_alt_feet = math.floor(player_alt_feet)*10 + + local Play_SH_Sound = USERSOUND:New( "Airboss Soundfiles/GreatBallsOfFire.ogg" ) + local Play_666SH_Sound = USERSOUND:New( "Airboss Soundfiles/Runninwiththedevil.ogg" ) + local playerType = playerData.actype + + + + if dist <1000 and clientSHBFlag == false then + + if speedKTS > 450 and speedKTS < 590 then + if player_alt_feet < 1500 then + if hookArgument > 0 or hookArgument_Tomcat > 0 then + --trigger.action.outText(' 1 - Hornet is hook down so SHB!!!! Hook argument is: '..hookArgument, 5) + playerData.shb = true + trigger.action.outText(playerName..' performing a Sierra Hotel Break in a '..playerType, 10) + local sh_message_to_discord = ('**'..playerName..' is performing a Sierra Hotel Break in a '..playerType..' at '..player_velocity_round..' knots and '..player_alt_feet..' feet!**') + HypeMan.sendBotMessage(sh_message_to_discord) + Play_SH_Sound:ToAll() + clientSHBFlag = true + else + --trigger.action.outText(' Hornet is hook up on initial and just fast so no SHB. Hook argument is: '..hookArgument, 5) + playerData.shb = false + end + -- Next step: Early Break. + else + end + elseif speedKTS > 589 then + if player_alt_feet < 625 and player_alt_feet >575 then --SHB 666 + if hookArgument > 0 or hookArgument_Tomcat > 0 then + --trigger.action.outText(' 1 - Hornet is hook down so SHB!!!! Hook argument is: '..hookArgument, 5) + playerData.shb = true + trigger.action.outText(playerName..' performing a 666 Sierra Hotel Break in a '..playerType, 10) + local sh_message_to_discord = ('**'..playerName..' is performing a 666 Sierra Hotel Break in a '..playerType..' at '..player_velocity_round..' knots and '..player_alt_feet..' feet!**') + HypeMan.sendBotMessage(sh_message_to_discord) + Play_666SH_Sound:ToAll() + clientSHBFlag = true + else + --trigger.action.outText(' Hornet is hook up on initial and just fast so no SHB. Hook argument is: '..hookArgument, 5) + playerData.shb = false + end + else + if hookArgument > 0 or hookArgument_Tomcat > 0 then + --trigger.action.outText(' 1 - Hornet is hook down so SHB!!!! Hook argument is: '..hookArgument, 5) + playerData.shb = true + trigger.action.outText(playerName..' performing a Sierra Hotel Break in a '..playerType, 10) + local sh_message_to_discord = ('**'..playerName..' is performing a Sierra Hotel Break in a '..playerType..' at '..player_velocity_round..' knots and '..player_alt_feet..' feet!**') + HypeMan.sendBotMessage(sh_message_to_discord) + Play_SH_Sound:ToAll() + clientSHBFlag = true + else + --trigger.action.outText(' Hornet is hook up on initial and just fast so no SHB. Hook argument is: '..hookArgument, 5) + playerData.shb = false + end + end + else + --trigger.action.outText(' Hornet is less than 400 kts so not SHB.... ', 5) + end + else + --trigger.action.outText(' ******TEST OF of Break Entry and distance to CVN is: '..dist, 5) + + end + + -- Check if we are in front of the boat (diffX > 0). if self:_CheckLimits( X, Z, self.BreakEntry ) then + --trigger.action.outText(' 2 - Hornet is hook down on break entry for testing hook argument ', 5) -- Hint for player about altitude, AoA etc. self:_PlayerHint( playerData ) - - -- Next step: Early Break. self:_SetPlayerStep( playerData, AIRBOSS.PatternStep.EARLYBREAK ) + clientSHBFlag = false end -end +end--Adam Edits end 7/24/23 --- Break. -- @param #AIRBOSS self @@ -9679,6 +9815,18 @@ end -- @param #AIRBOSS.PlayerData playerData Player data table. function AIRBOSS:_Ninety( playerData ) + -- VNAO Edit - Added wrapped up call to LSO grading + playerData.wrappedUpAtWakeLittle = false -- VNAO Edit - Added + playerData.wrappedUpAtWakeFull = false -- VNAO Edit - Added + playerData.wrappedUpAtWakeUnderline = false -- VNAO Edit - Added + playerData.wrappedUpAtStartLittle = false -- VNAO Edit - Added + playerData.wrappedUpAtStartFull = false -- VNAO Edit - Added + playerData.wrappedUpAtStartUnderline = false -- VNAO Edit - Added + playerData.AAatWakeLittle = false -- VNAO Edit - Added + playerData.AAatWakeFull = false -- VNAO Edit - Added + playerData.AAatWakeUnderline = false -- VNAO Edit - Added + playerData.AFU = false -- VNAO Edit - Added + -- Get distances between carrier and player unit (parallel and perpendicular to direction of movement of carrier) local X, Z = self:_GetDistances( playerData.unit ) @@ -9782,6 +9930,9 @@ function AIRBOSS:_GetGrooveData( playerData ) groovedata.AoA = playerData.unit:GetAoA() groovedata.GSE = self:_Glideslope( playerData.unit ) groovedata.LUE = self:_Lineup( playerData.unit, true ) + groovedata.LUEwire = self:_LineupWIRE( playerData.unit, true ) -- VNAO Edit - Added + groovedata.LeftNozzle = self:_NozzleArgumentLeft( playerData.unit ) -- VNAO Edit - Added + groovedata.RightNozzle = self:_NozzleArgumentRight( playerData.unit ) -- VNAO Edit - Added groovedata.Roll = playerData.unit:GetRoll() groovedata.Pitch = playerData.unit:GetPitch() groovedata.Yaw = playerData.unit:GetYaw() @@ -9863,6 +10014,7 @@ function AIRBOSS:_Groove( playerData ) local RIM = UTILS.NMToMeters( 0.500 ) -- In the Middle 0.50 = 926 m (middle one third of the glideslope) local RIC = UTILS.NMToMeters( 0.250 ) -- In Close 0.25 = 463 m (last one third of the glideslope) local RAR = UTILS.NMToMeters( 0.040 ) -- At the Ramp. 0.04 = 75 m + local RIW = UTILS.NMToMeters( -0.020 ) -- In the wires. 0.04 = 75 m -- VNAO Edit - Added -- Groove data. local groovedata = self:_GetGrooveData( playerData ) @@ -9886,7 +10038,8 @@ function AIRBOSS:_Groove( playerData ) local glideslopeError = groovedata.GSE local AoA = groovedata.AoA - if rho <= RXX and playerData.step == AIRBOSS.PatternStep.GROOVE_XX and (math.abs( groovedata.Roll ) <= 4.0 and playerData.unit:IsInZone( self:_GetZoneLineup() )) then + -- if rho <= RXX and playerData.step == AIRBOSS.PatternStep.GROOVE_XX and (math.abs( groovedata.Roll ) <= 4.0 or playerData.unit:IsInZone( self:_GetZoneLineup() )) then -- VNAO Edit - Commented out + if rho <= RXX and playerData.step == AIRBOSS.PatternStep.GROOVE_XX and (math.abs( groovedata.Roll ) <= 3.5 or playerData.unit:IsInZone( self:_GetZoneLineup() )) then -- VNAO Edit - Added -- Start time in groove playerData.TIG0 = timer.getTime() @@ -9936,7 +10089,8 @@ function AIRBOSS:_Groove( playerData ) else self:_SetPlayerStep( playerData, AIRBOSS.PatternStep.GROOVE_IW ) end - + elseif rho <= RIW and playerData.step == AIRBOSS.PatternStep.GROOVE_IW then -- VNAO Edit - Added + playerData.groove.IW = UTILS.DeepCopy( groovedata ) -- VNAO Edit - Added elseif rho <= RAR and playerData.step == AIRBOSS.PatternStep.GROOVE_AL then -- Store data. @@ -10071,6 +10225,58 @@ function AIRBOSS:_Groove( playerData ) -- Distance in NM. local d = UTILS.MetersToNM( rho ) + -- VNAO Edit - Added wrapped up call to LSO grading + if playerData.case ~=3 then -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - playerData.case ~= 3, proceeding with checks") -- VNAO Edit - Added + if playerData.wrappedUpAtWakeUnderline == true or playerData.wrappedUpAtStartUnderline == true then -- VNAO Edit - Added + gd.WrappedUp="_WU_" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - UNDERLINE WU comment should be added for player: "..playerData.name) -- VNAO Edit - Added + elseif playerData.wrappedUpAtWakeUnderline == false and playerData.wrappedUpAtStartUnderline == false then -- VNAO Edit - Added + if playerData.wrappedUpAtWakeFull == true or playerData.wrappedUpAtStartFull == true then -- VNAO Edit - Added + gd.WrappedUp="WU" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - FULL WU comment should be added for player: "..playerData.name) -- VNAO Edit - Added + elseif playerData.wrappedUpAtStartFull == false then -- VNAO Edit - Added + if playerData.wrappedUpAtWakeLittle == true or playerData.wrappedUpAtStartLittle == true then -- VNAO Edit - Added + gd.WrappedUp="(WU)" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - little WU comment should be added for player: "..playerData.name) -- VNAO Edit - Added + end -- VNAO Edit - Added + end -- VNAO Edit - Added + else -- VNAO Edit - Added + -- gd.WrappedUp="" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - NO WU comment should be added for player: "..playerData.name) -- VNAO Edit - Added + end -- VNAO Edit - Added + + if playerData.AAatWakeUnderline == true then -- VNAO Edit - Added + gd.AngledApch="_AA_" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - UNDERLINE AA comment should be added for player: "..playerData.name) -- VNAO Edit - Added + elseif playerData.AAatWakeUnderline == false then -- VNAO Edit - Added + if playerData.AAatWakeFull == true then -- VNAO Edit - Added + gd.AngledApch="AA" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - FULL AA comment should be added for player: "..playerData.name) -- VNAO Edit - Added + elseif playerData.AAatWakeFull == false then -- VNAO Edit - Added + if playerData.AAatWakeLittle == true then -- VNAO Edit - Added + gd.AngledApch="(AA)" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - little AA comment should be added for player: "..playerData.name) -- VNAO Edit - Added + end -- VNAO Edit - Added + end -- VNAO Edit - Added + else -- VNAO Edit - Added + -- gd.AngledApch="" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - NO AA comment should be added for player: "..playerData.name) -- VNAO Edit - Added + end -- VNAO Edit - Added + + if playerData.AFU == true then -- VNAO Edit - Added + gd.AFU="AFU" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - AFU comment should be added for player: "..playerData.name) -- VNAO Edit - Added + else -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - NO AFU comment should be added for player: "..playerData.name) -- VNAO Edit - Added + end -- VNAO Edit - Added + else -- VNAO Edit - Added + -- gd.WrappedUp="" -- VNAO Edit - Added + -- gd.AngledApch="" -- VNAO Edit - Added + --gd.AFU="" -- VNAO Edit - Added + -- env.info("ADAM AIRBOSS EDIT- function AIRBOSS:_Groove(playerData) - CASE 3, don't add WU, AA or AFU comments at all for player: "..playerData.name) -- VNAO Edit - Added + end + -- Drift on lineup. if rho >= RAR and rho <= RIM then if gd.LUE > 0.22 and lineupError < -0.22 then @@ -10608,13 +10814,13 @@ function AIRBOSS:_Trapped( playerData ) -- Message to player. local text = string.format( "Trapped %d-wire.", wire ) if wire == 3 then - text = text .. " Well done!" + text = text .. " " -- VNAO Edit - Removed comment text elseif wire == 2 then - text = text .. " Not bad, maybe you even get the 3rd next time." + text = text .. " " -- VNAO Edit - Removed comment text elseif wire == 4 then - text = text .. " That was scary. You can do better than this!" + text = text .. " " -- VNAO Edit - Removed comment text elseif wire == 1 then - text = text .. " Try harder next time!" + text = text .. " " -- VNAO Edit - Removed comment text end -- Message to player. @@ -11363,6 +11569,41 @@ function AIRBOSS:_AttitudeMonitor( playerData ) text = text .. string.format( "\nGamma=%.1f° | Rho=%.1f°", relhead, phi ) end + -- VNAO Edit: for testing the damn line up in the wires! + -- VNAO Edit: F-14A Nozzle: R-433, L-434, R Burner- 435, L Burner - 436 + local lueWire = self:_LineupWIRE( playerData.unit, true ) + text = text .. string.format( "\nLineUpForWireCalls=%.2f° | lineup for Groove calls=%.2f°", lueWire or 0, lue or 0)-- VNAO Edit - Added + + local unitClient = Unit.getByName(unit:GetName()) -- VNAO Edit - Added + local hornet = playerData.actype == AIRBOSS.AircraftCarrier.HORNET -- VNAO Edit - Added + local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B -- VNAO Edit - Added + + if hornet then -- VNAO Edit - Added + local nozzlePosL = 0 -- VNAO Edit - Added + local burnerPosL = unitClient:getDrawArgumentValue(28) -- VNAO Edit - Added + if burnerPosL < 0.2 then -- VNAO Edit - Added + nozzlePosL = unitClient:getDrawArgumentValue(89) -- VNAO Edit - Added + else -- VNAO Edit - Added + nozzlePosL = 0 -- VNAO Edit - Added + end -- VNAO Edit - Added + + local nozzlePosR = 0 -- VNAO Edit - Added + local burnerPosR = unitClient:getDrawArgumentValue(29) -- VNAO Edit - Added + if burnerPosR < 0.2 then -- VNAO Edit - Added + nozzlePosR = unitClient:getDrawArgumentValue(90) -- VNAO Edit - Added + else -- VNAO Edit - Added + nozzlePosR = 0 -- VNAO Edit - Added + end -- VNAO Edit - Added + + text = text .. string.format( "\n Left Nozzle position=%.2f | Right Nozzle position=%.2f ", nozzlePosL, nozzlePosR ) -- VNAO Edit - Added + end -- VNAO Edit - Added + + if tomcat then -- VNAO Edit - Added + local nozzlePosL = unitClient:getDrawArgumentValue(434) -- VNAO Edit - Added + local nozzlePosR = unitClient:getDrawArgumentValue(433) -- VNAO Edit - Added + text = text .. string.format( "\n Left Nozzle position=%.2f | Right Nozzle position=%.2f ", nozzlePosL, nozzlePosR ) -- VNAO Edit - Added + end -- VNAO Edit - Added + MESSAGE:New( text, 1, nil, true ):ToClient( playerData.client ) end @@ -11495,6 +11736,111 @@ function AIRBOSS:_Lineup( unit, runway ) return lineup end +-- VNAO Edit - Added this function +--- Get line up of player wrt to carrier. +-- @param #AIRBOSS self +-- @param Wrapper.Unit#UNIT unit Aircraft unit. +-- @param #boolean runway If true, include angled runway. +-- @return #number Line up with runway heading in degrees. 0 degrees = perfect line up. +1 too far left. -1 too far right. +function AIRBOSS:_LineupWIRE( unit, runway ) -- VNAO Edit - Added + + -- Landing coordinate + local landingcoord = self:_GetOptLandingCoordinateWIRE() -- VNAO Edit - Added + + -- Vector to landing coord. + local A = landingcoord:GetVec3() -- VNAO Edit - Added + + -- Vector to player. + local B = unit:GetVec3() -- VNAO Edit - Added + + -- Vector from player to carrier. + local C = UTILS.VecSubstract( A, B ) -- VNAO Edit - Added + + -- Only in 2D plane. + C.y = 0.0 -- VNAO Edit - Added + + -- Orientation of carrier. + local X = self.carrier:GetOrientationX() -- VNAO Edit - Added + X.y = 0.0 -- VNAO Edit - Added + + -- Rotate orientation to angled runway. + if runway then -- VNAO Edit - Added + X = UTILS.Rotate2D( X, -self.carrierparam.rwyangle ) -- VNAO Edit - Added + end -- VNAO Edit - Added + + -- Projection of player pos on x component. + local x = UTILS.VecDot( X, C ) -- VNAO Edit - Added + + -- Orientation of carrier. + local Z = self.carrier:GetOrientationZ() -- VNAO Edit - Added + Z.y = 0.0 -- VNAO Edit - Added + + -- Rotate orientation to angled runway. + if runway then -- VNAO Edit - Added + Z = UTILS.Rotate2D( Z, -self.carrierparam.rwyangle ) -- VNAO Edit - Added + end -- VNAO Edit - Added + + -- Projection of player pos on z component. + local z = UTILS.VecDot( Z, C ) -- VNAO Edit - Added + + --- + local lineup = math.deg( math.atan2( z, x ) ) -- VNAO Edit - Added + + return lineup -- VNAO Edit - Added +end -- VNAO Edit - Added + +-- VNAO Edit - Added this function +--- Get L/R Nozzle Position from Argument and L/R Burner Argument +-- @param #AIRBOSS self +-- @param Wrapper.Unit#UNIT unit Aircraft unit. +-- @return #number Left Nozzle position argument +function AIRBOSS:_NozzleArgumentLeft( unit ) -- VNAO Edit - Added + --Arguments for HORNET L burner and R burner are 28 and 29 respectively and >.2 indicates burner active + --Nozzle position greater than 0.3 for the hornet indicates either idle or burner + --if Lnoz > 0.6 and Rnoz > 0.6 is current check for EG + local unitClient = Unit.getByName(unit:GetName()) -- VNAO Edit - Added + local typeName = unit:GetTypeName() -- VNAO Edit - Added + local nozzlePosL = 0 -- VNAO Edit - Added + local burnerPosL = 0 -- VNAO Edit - Added + if typeName == "FA-18C_hornet" then -- VNAO Edit - Added + burnerPosL = unitClient:getDrawArgumentValue(28) -- VNAO Edit - Added + if burnerPosL < 0.2 then -- VNAO Edit - Added + nozzlePosL = unitClient:getDrawArgumentValue(89) -- VNAO Edit - Added + else -- VNAO Edit - Added + nozzlePosL = 0 -- VNAO Edit - Added + end -- VNAO Edit - Added + elseif typeName == "F-14A-135-GR" or typeName == "F-14B" then -- VNAO Edit - Added + nozzlePosL = unitClient:getDrawArgumentValue(434) -- VNAO Edit - Added + end -- VNAO Edit - Added + + return nozzlePosL -- VNAO Edit - Added +end -- VNAO Edit - Added + +-- VNAO Edit - Added this function +--- Get L/R Nozzle Position from Argument and L/R Burner Argument +-- @param #AIRBOSS self +-- @param Wrapper.Unit#UNIT unit Aircraft unit. +-- @return #number Right Nozzle position argument +function AIRBOSS:_NozzleArgumentRight( unit ) -- VNAO Edit - Added + local unitClient = Unit.getByName(unit:GetName()) -- VNAO Edit - Added + local typeName = unit:GetTypeName() -- VNAO Edit - Added + local nozzlePosR = 0 -- VNAO Edit - Added + local burnerPosR = 0 -- VNAO Edit - Added + + if typeName == "FA-18C_hornet" then -- VNAO Edit - Added + burnerPosR = unitClient:getDrawArgumentValue(29) -- VNAO Edit - Added + if burnerPosR < 0.2 then -- VNAO Edit - Added + nozzlePosR = unitClient:getDrawArgumentValue(90) -- VNAO Edit - Added + else -- VNAO Edit - Added + nozzlePosR = 0 -- VNAO Edit - Added + end -- VNAO Edit - Added + elseif typeName == "F-14A-135-GR" or typeName == "F-14B" then -- VNAO Edit - Added + nozzlePosR = unitClient:getDrawArgumentValue(433) -- VNAO Edit - Added + end -- VNAO Edit - Added + return nozzlePosR -- VNAO Edit - Added +end -- VNAO Edit - Added + + --- Get altitude of aircraft wrt carrier deck. Should give zero when the aircraft touched down. -- @param #AIRBOSS self -- @param Wrapper.Unit#UNIT unit Aircraft unit. @@ -11560,6 +11906,39 @@ function AIRBOSS:_GetOptLandingCoordinate() return self.landingcoord end +-- VNAO Edit - dded this whole function +--- Get optimal landing position of the aircraft. Usually between second and third wire. In case of Tarawa, Canberrra, Juan Carlos and America we take the abeam landing spot 120 ft above and 21 ft abeam the 7.5 position, for the Juan Carlos I, HMS Invincible, and HMS Hermes and Invincible it is 120 ft above and 21 ft abeam the 5 position. For CASE III it is 120ft directly above the landing spot. +-- @param #AIRBOSS self +-- @return Core.Point#COORDINATE Optimal landing coordinate. +function AIRBOSS:_GetOptLandingCoordinateWIRE() + + -- Start with stern coordiante. + self.landingcoord:UpdateFromCoordinate( self:_GetSternCoord() ) + + -- Final bearing. + local FB=self:GetFinalBearing(false) + + -- Cse + local case=self.case + + -- set Case III V/STOL abeam landing spot over deck -- Pene Testing + + + + -- Ideally we want to land between 2nd and 3rd wire. + if self.carrierparam.wire3 then + -- We take the position of the 3rd wire to approximately account for the length of the aircraft. + self.landingcoord:Translate( self.carrierparam.wire3 + 500, FB, true, true )-- adding 80 meter to wire to see if this is far enough to keep tracking a good lineup error (50 meters not enough), went from 250 meters to 500 meters 12/23/23, the more distance out front the less the error sensitivity down deck. I've checked the location of the landing spot 500 meters out front of 3 wire on CL with flares and smoke, appears to be dead on. Not sure why there's still this small difference between lined up left and right differences. + end + + -- Add 2 meters to account for aircraft height. + self.landingcoord.y = self.landingcoord.y + 2 + + + --self.landingcoord:FlareGreen() --for testing the lineup spot translated out in front of the carrier landing area by 500 meters. Appears good. + return self.landingcoord +end + --- Get landing spot on Tarawa and others. -- @param #AIRBOSS self -- @return Core.Point#COORDINATE Primary landing spot coordinate. @@ -11861,7 +12240,8 @@ function AIRBOSS:GetHeadingIntoWind_new( vdeck, magnetic, coord ) local magvar= magnetic and self.magvar or 0 -- Ship heading so cross wind is min for the given wind. - local intowind = (540 + (windto - magvar + math.deg(theta) )) % 360 + -- local intowind = (540 + (windto - magvar + math.deg(theta) )) % 360 -- VNAO Edit: Using old heading into wind algorithm + local intowind = self:GetHeadingIntoWind_old(vdeck) -- VNAO Edit: Using old heading into wind algorithm return intowind, v end @@ -12137,6 +12517,10 @@ function AIRBOSS:_LSOadvice( playerData, glideslopeError, lineupError ) -- "Power." self:RadioTransmission( self.LSORadio, self.LSOCall.POWER, false, nil, nil, true ) advice = advice + self.LSOCall.POWER.duration + elseif glideslopeError= 25 then --Circuit added + grade = "_LIG_" --Circuit added + -- Time in groove for AV-8B elseif playerData.actype == AIRBOSS.AircraftCarrier.AV8B and t < 55 then -- VSTOL Late Hover stop selection too fast to Abeam LDG Spot AV-8B. grade = "FAST V/STOL Groove" @@ -12253,7 +12644,7 @@ function AIRBOSS:_EvalGrooveTime( playerData ) end -- The unicorn! - if t >= 16.4 and t <= 16.6 then + if t >= 16.49 and t <= 16.6 then grade = "_OK_" end @@ -12277,21 +12668,28 @@ function AIRBOSS:_LSOgrade( playerData ) local function count( base, pattern ) return select( 2, string.gsub( base, pattern, "" ) ) end - + local TIG = "" -- Analyse flight data and convert to LSO text. + if playerData.Tgroove and playerData.Tgroove <= 360 and playerData.case < 3 then --Circuit Added + TIG = self:_EvalGrooveTime( playerData ) --Circuit Added + end --Circuit Added local GXX, nXX = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.XX ) local GIM, nIM = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.IM ) local GIC, nIC = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.IC ) local GAR, nAR = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.AR ) + local GIW, nIW = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.IW ) -- VNAO Edit - Added -- VTOL approach, which is graded differently (currently only Harrier). local vtol=playerData.actype==AIRBOSS.AircraftCarrier.AV8B -- Put everything together. - local G = GXX .. " " .. GIM .. " " .. " " .. GIC .. " " .. GAR + local G = GXX .. " " .. GIM .. " " .. " " .. GIC .. " " .. GAR .. " " .. GIW .. " " .. TIG -- VNAO Edit - Added .. " " .. GIW Circuit added TIG + + local gradeWithDeviations = GXX .. "[" .. nXX .. "] " .. GIM .. "[" .. nIM .. "] " .. GIC .. "[" .. nIC .. "] " .. GAR .. "[" .. nAR .. "] " .. GIW .. "[" .. nIW .. "]" -- VNAO Edit - Added + env.info("LSO Grade [with deviation count]: " .. gradeWithDeviations) -- VNAO Edit - Added -- Count number of minor/small nS, normal nN and major/large deviations nL. - local N=nXX+nIM+nIC+nAR + local N=nXX+nIM+nIC+nAR+nIW -- VNAO Edit - Added +nIW local nL=count(G, '_')/2 local nS=count(G, '%(') local nN=N-nS-nL @@ -12299,17 +12697,30 @@ function AIRBOSS:_LSOgrade( playerData ) -- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn. local Tgroove=playerData.Tgroove - local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false + local TgrooveUnicorn=Tgroove and (Tgroove>=16.49 and Tgroove<=16.59) or false -- VNAO Edit - Original values 15.0/18.99 local TgrooveVstolUnicorn=Tgroove and (Tgroove>=60.0 and Tgroove<=65.0)and playerData.actype==AIRBOSS.AircraftCarrier.AV8B or false local grade local points - if N == 0 and (TgrooveUnicorn or TgrooveVstolUnicorn or playerData.case==3) then - -- No deviations, should be REALLY RARE! - grade = "_OK_" - points = 5.0 - G = "Unicorn" - else + -- if N == 0 and (TgrooveUnicorn or TgrooveVstolUnicorn or playerData.case==3) then -- VNAO Edit - Removed TgrooveUnicorn and case 3 as a factor + if N == 0 and TgrooveVstolUnicorn then -- VNAO Edit - Removed TgrooveUnicorn and case 3 as a factor + -- No deviations, should be REALLY RARE! + grade = "_OK_" + points = 5.0 + G = "Unicorn" + end -- VNAO Edit - Added + if N==0 and TgrooveUnicorn then -- VNAO Edit - Added + -- No deviations, should be REALLY RARE! -- VNAO Edit - Added + if playerData.wire == 3 then -- VNAO Edit - Added + grade="_OK_" -- VNAO Edit - Added + points=5.0 -- VNAO Edit - Added + G="Unicorn" -- VNAO Edit - Added + else -- VNAO Edit - Added + grade="OK" -- VNAO Edit - Added + points=4.0 -- VNAO Edit - Added + end -- VNAO Edit - Added + + else if vtol then @@ -12384,6 +12795,7 @@ function AIRBOSS:_LSOgrade( playerData ) text = text .. "# of normal deviations = " .. nN .. "\n" text = text .. "# of small deviations ( = " .. nS .. "\n" self:T2( self.lid .. text ) + env.info(text)-- VNAO Edit - Added -- Special cases. if playerData.wop then @@ -12452,6 +12864,20 @@ function AIRBOSS:_LSOgrade( playerData ) end end + + -- VNAO EDIT: Subtract 1pt from overall grade if it is a 1 wire. If it's already a 1pt pass, ignore. + if playerData.wire == 1 and points > 1 then -- VNAO EDIT: added + if points == 4 then -- VNAO EDIT: added + points = 3 -- VNAO EDIT: added + grade = "(OK)" -- VNAO EDIT: added + elseif points == 3 then -- VNAO EDIT: added + points = 2 -- VNAO EDIT: added + grade = "--" -- VNAO EDIT: added + end -- VNAO EDIT: added + end -- VNAO EDIT: added + + env.info("Returning: " .. grade .. " " .. points .. " " .. G) + return grade, points, G end @@ -12485,26 +12911,34 @@ function AIRBOSS:_Flightdata2Text( playerData, groovestep ) local AOA = fdata.AoA local GSE = fdata.GSE local LUE = fdata.LUE + local LUEwire = fdata.LUEwire -- VNAO Edit - Added + local Lnoz = fdata.LeftNozzle -- VNAO Edit - Added + local Rnoz = fdata.RightNozzle -- VNAO Edit - Added local ROL = fdata.Roll + local GT = fdata.GT -- Circuit Added -- Aircraft specific AoA values. local acaoa = self:_GetAircraftAoA( playerData ) -- Angled Approach. - local P = nil - if step == AIRBOSS.PatternStep.GROOVE_XX and ROL <= 4.0 and playerData.case < 3 then - if LUE > self.lue.RIGHT then - P = underline( "AA" ) - elseif LUE > self.lue.RightMed then - P = "AA " - elseif LUE > self.lue.Right then - P = little( "AA" ) + -- VNAO Edit - changed this to regualr LUL at X, made my own Angled Approach check starting at the wake based on angle of bank less than 15 degrees/10 degrees/2 degrees + local P = nil -- VNAO Edit - Added + if step == AIRBOSS.PatternStep.GROOVE_XX and ROL <= 3.5 and playerData.case < 3 then -- VNAO Edit - Changed, original ROL val 4.0 + if LUE > 3.2 then -- VNAO Edit - Original value self.lue.RIGHT + -- P = underline( "AA" ) + P = underline( "LUL") -- VNAO Edit - Added + elseif LUE > 2.2 then -- VNAO Edit - Original value self.lue.RightMed + -- P = "AA " + P="LUL" -- VNAO Edit - Added + elseif LUE > 1.2 then -- VNAO Edit - Original value self.lue.Right + -- P = little( "AA" ) + P= little( "LUL") -- VNAO Edit - Added end end -- Overshoot Start. local O = nil - if step == AIRBOSS.PatternStep.GROOVE_XX then + if step == AIRBOSS.PatternStep.GROOVE_XX and playerData.case < 3 then -- VNAO Edit - Added case 3 check if LUE < self.lue.LEFT then O = underline( "OS" ) elseif LUE < self.lue.Left then @@ -12516,100 +12950,262 @@ function AIRBOSS:_Flightdata2Text( playerData, groovestep ) -- Speed via AoA. Depends on aircraft type. local S = nil - if AOA > acaoa.SLOW then - S = underline( "SLO" ) - elseif AOA > acaoa.Slow then - S = "SLO" - elseif AOA > acaoa.OnSpeedMax then - S = little( "SLO" ) - elseif AOA < acaoa.FAST then - S = underline( "F" ) - elseif AOA < acaoa.Fast then - S = "F" - elseif AOA < acaoa.OnSpeedMin then - S = little( "F" ) - end + if step~=AIRBOSS.PatternStep.GROOVE_IW then -- VNAO Edit - Added To avoid getting an AOA or GS grade in the wires... let's just check left or right in the wires + if AIRBOSS.PatternStep.GROOVE_AR and playerData.waveoff == true and playerData.owo == true then -- VNAO Edit - Added + -- env.info('Adam MOOSE Edit -AR and waved off so do not add AOA or GS errors to comments ') -- VNAO Edit - Added + else -- VNAO Edit - Added + -- Speed via AoA. Depends on aircraft type. + if AOA > acaoa.SLOW then + S = underline( "SLO" ) + elseif AOA > acaoa.Slow then + S = "SLO" + elseif AOA > acaoa.OnSpeedMax then + S = little( "SLO" ) + elseif AOA < acaoa.FAST then + S = underline( "F" ) + elseif AOA < acaoa.Fast then + S = "F" + elseif AOA < acaoa.OnSpeedMin then + S = little( "F" ) + end - -- Glideslope/altitude. Good [-0.3, 0.4] asymmetric! - local A = nil - if GSE > self.gle.HIGH then - A = underline( "H" ) - elseif GSE > self.gle.High then - A = "H" - elseif GSE > self.gle._max then - A = little( "H" ) - elseif GSE < self.gle.LOW then - A = underline( "LO" ) - elseif GSE < self.gle.Low then - A = "LO" - elseif GSE < self.gle._min then - A = little( "LO" ) - end + -- Glideslope/altitude. Good [-0.3, 0.4] asymmetric! + local A = nil + if GSE > self.gle.HIGH then + A = underline( "H" ) + elseif GSE > self.gle.High then + A = "H" + elseif GSE > self.gle._max then + A = little( "H" ) + elseif GSE < self.gle.LOW then + A = underline( "LO" ) + elseif GSE < self.gle.Low then + A = "LO" + elseif GSE < self.gle._min then + A = little( "LO" ) + end + end -- VNAO Edit - Added + end -- VNAO Edit - Added + + local stepMod=self:_GS(step) -- VNAO Edit - Added - -- Line up. XX Step replaced by Overshoot start (OS). Good [-0.5, 0.5] local D = nil - if LUE > self.lue.RIGHT then - D = underline( "LUL" ) - elseif LUE > self.lue.Right then - D = "LUL" - elseif LUE > self.lue._max then - D = little( "LUL" ) - elseif playerData.case < 3 then - if LUE < self.lue.LEFT and step ~= AIRBOSS.PatternStep.GROOVE_XX then - D = underline( "LUR" ) - elseif LUE < self.lue.Left and step ~= AIRBOSS.PatternStep.GROOVE_XX then - D = "LUR" - elseif LUE < self.lue._min and step ~= AIRBOSS.PatternStep.GROOVE_XX then - D = little( "LUR" ) - end - elseif playerData.case == 3 then - if LUE < self.lue.LEFT then - D = underline( "LUR" ) - elseif LUE < self.lue.Left then - D = "LUR" - elseif LUE < self.lue._min then - D = little( "LUR" ) - end + local DW = nil + local Rol = nil -- VNAO Edit - Added + local Noz = nil -- VNAO Edit - Added + -- VNAO Edit - Now replacing LUL with AA at Groove start for case 1 and 2, to fix problem with getting a full LUL with an (AA) and still getting a 4.0 OK + -- if playerData.case < 3 then -- VNAO Edit - Added + if AIRBOSS.PatternStep.GROOVE_AR and playerData.waveoff == true and playerData.owo == true then + -- env.info('Adam MOOSE Edit -AR and waved off so do not add LU errors to comments ') + else + if LUE > self.lue.RIGHT and step ~= AIRBOSS.PatternStep.GROOVE_XX and step~=AIRBOSS.PatternStep.GROOVE_IW then -- VNAO Edit - Changed + D = underline( "LUL" ) -- VNAO Edit - Changed + elseif LUE > self.lue.Right and step ~= AIRBOSS.PatternStep.GROOVE_XX and step~=AIRBOSS.PatternStep.GROOVE_IW then -- VNAO Edit - Changed + D = "LUL" -- VNAO Edit - Changed + elseif LUE > self.lue._max and step ~= AIRBOSS.PatternStep.GROOVE_XX and step~=AIRBOSS.PatternStep.GROOVE_IW then -- VNAO Edit - Changed + D = little( "LUL" ) -- VNAO Edit - Changed + elseif LUE < self.lue.LEFT and step ~= AIRBOSS.PatternStep.GROOVE_XX and step~=AIRBOSS.PatternStep.GROOVE_IW then -- VNAO Edit - Changed + D = underline( "LUR" ) -- VNAO Edit - Changed + elseif LUE < self.lue.Left and step ~= AIRBOSS.PatternStep.GROOVE_XX and step~=AIRBOSS.PatternStep.GROOVE_IW then -- VNAO Edit - Changed + D = "LUR" -- VNAO Edit - Changed + elseif LUE < self.lue._min and step ~= AIRBOSS.PatternStep.GROOVE_XX and step~=AIRBOSS.PatternStep.GROOVE_IW then -- VNAO Edit - Changed + D = little( "LUR" ) -- VNAO Edit - Changed + end -- VNAO Edit - Changed end + --[[ + elseif playerData.case == 3 then -- VNAO Edit - Changed + if LUE>self.lue.RIGHT then -- VNAO Edit - Changed + D=underline("LUL") -- VNAO Edit - Changed + elseif LUE>self.lue.Right then -- VNAO Edit - Changed + D="LUL" -- VNAO Edit - Changed + elseif LUE>self.lue._max then -- VNAO Edit - Changed + D=little("LUL") -- VNAO Edit - Changed + elseif LUE < self.lue.LEFT then -- VNAO Edit - Changed + D = underline( "LUR" ) -- VNAO Edit - Changed + elseif LUE < self.lue.Left then -- VNAO Edit - Changed + D = "LUR" -- VNAO Edit - Changed + elseif LUE < self.lue._min then -- VNAO Edit - Changed + D = little( "LUR" ) -- VNAO Edit - Changed + end -- VNAO Edit - Changed + end -- VNAO Edit - Changed +--]] + if step == AIRBOSS.PatternStep.GROOVE_IW and playerData.waveoff == false and playerData.owo == false then -- VNAO Edit - Added check for waveoff so we don't get any IN THE WIRE comments if its a WO + -- env.info('Adam MOOSE Edit -IW code: checking for Landing Left or Landing Right, lue: '..LUEwire) + -- env.info("Adam MOOSE Edit -IW code: ROLL IN THE WIRES: "..ROL) + + if LUEwire>1.2 then -- VNAO Edit - Added by using real time attitude monitor and using the ladders as a reference for distance down the deck, focusing on ladder rungs 4-8 but using specifiically values at ((rung 4 12/24/23) 12/24/23), average rung 3 and 4 after testing 12/27 + -- env.info("Adam MOOSE Edit -IW code: Line up > 1.2, _LL_") + DW=underline("LL")-- VNAO Edit - Added + elseif LUEwire>0.4 then -- VNAO Edit - Added by using real time attitude monitor and using the ladders as a reference for distance down the deck, focusing on ladder rungs 4-8 but using specifiically values at (rung 4 12/24/23), average rung 3 and 4 after testing 12/27 + -- env.info("Adam MOOSE Edit -IW code: Line up > 0.4, LL") + DW="LL"-- VNAO Edit - Added + elseif LUEwire>0.25 then -- VNAO Edit - Added by using real time attitude monitor and using the ladders as a reference for distance down the deck, focusing on ladder rungs 4-8 but using specifiically values at (rung 4 12/24/23), average rung 3 and 4 after testing 12/27 + -- env.info("Adam MOOSE Edit -IW code: Line up > 0.25, (LL)") + DW=little("LL")-- VNAO Edit - Added + elseif LUEwire<-1.17 then -- VNAO Edit - Added by using real time attitude monitor and using the ladders as a reference for distance down the deck, focusing on ladder rungs 4-8 but using specifiically values at (rung 4 12/24/23), average rung 3 and 4 after testing 12/27 + -- env.info("Adam MOOSE Edit -IW code: Line up < -1.17, _LR_") + DW=underline("LR")-- VNAO Edit - Added + elseif LUEwire<-0.46 then -- VNAO Edit - Added by using real time attitude monitor and using the ladders as a reference for distance down the deck, focusing on ladder rungs 4-8 but using specifiically values at (rung 4 12/24/23), average rung 3 and 4 after testing 12/27 + -- env.info("Adam MOOSE Edit -IW code: Line up < -0.46, LR") + DW="LR"-- VNAO Edit - Added + elseif LUEwire<-0.25 then -- VNAO Edit - Added by using real time attitude monitor and using the ladders as a reference for distance down the deck, focusing on ladder rungs 4-8 but using specifiically values at (rung 4 12/24/23), average rung 3 and 4 after testing 12/27 + -- env.info("Adam MOOSE Edit -IW code: Line up < -0.25, (LR)") + DW=little("LR")-- VNAO Edit - Added + else-- VNAO Edit - Added + -- env.info('Adam MOOSE Edit -IW code: checking for Landing Left or Landing Right: NO LINEUP ERROR DECTECTED ') + -- env.info("Adam MOOSE Edit -IW code: NO LINEUP ERORR DECTECTED ") + end-- VNAO Edit - Added + + if ROL > 5 and ROL <= 10 then-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: ROLL GREATER THAN 5 DEGREES, maybe a (LRWD) ") + Rol=little("LRWD")-- VNAO Edit - Added + elseif ROL > 10 and ROL <= 15 then-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: ROLL GREATER THAN 10 DEGREES, maybe a LRWD ") + Rol=("LRWD")-- VNAO Edit - Added + elseif ROL > 15 then-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: ROLL GREATER THAN 20 DEGREES, maybe a _LRWD_ ") + Rol=underline("LRWD")-- VNAO Edit - Added + elseif ROL < -5 and ROL >= -10 then-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: ROLL GREATER THAN 5 DEGREES, maybe a (LLWD) ") + Rol=little("LLWD")-- VNAO Edit - Added + elseif ROL < -10 and ROL >= -15 then-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: ROLL GREATER THAN 10 DEGREES, maybe a LLWD ") + Rol=("LLWD")-- VNAO Edit - Added + elseif ROL < -15 then-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: ROLL GREATER THAN 20 DEGREES, maybe a _LLWD_ ") + Rol=underline("LLWD")-- VNAO Edit - Added + else-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: ROLL is acceptable, less than 5 degrees left or right ") + end-- VNAO Edit - Added + + + + local hornet = playerData.actype == AIRBOSS.AircraftCarrier.HORNET-- VNAO Edit - Added + local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B-- VNAO Edit - Added + + if hornet then-- VNAO Edit - Added + if Lnoz > 0.6 and Rnoz > 0.6 then -- VNAO Edit - Added check them both, it's possilbe there could be a single engine landing and one is in idle perhaps? + -- env.info("Adam MOOSE Edit -IW code: Throttles maybe close to idle? EGIW? L:"..Lnoz.." R: "..Rnoz) + Noz = underline("EG")-- VNAO Edit - Added + else-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: Throttles ok position- L:"..Lnoz.." R: "..Rnoz) + end-- VNAO Edit - Added + end-- VNAO Edit - Added + + --[[ if tomcat then-- VNAO Edit - Added + if Lnoz > 0.9 and Rnoz > 0.9 then -- VNAO Edit - Added Appears that when engines are idle nozzle arguments are Zero. Anything more than idle is close to 1 (0.95 to be exact) and Burner reduces to 0.3 + -- env.info("Adam MOOSE Edit -IW code: Throttles maybe close to idle? EGIW? L:"..Lnoz.." R: "..Rnoz) + Noz = underline("EG")-- VNAO Edit - Added + else-- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code: Throttles ok position- L:"..Lnoz.." R: "..Rnoz) + end-- VNAO Edit - Added + end-- VNAO Edit - Added ]] + + if playerData.Tgroove and playerData.Tgroove <= 360 and playerData.case < 3 then --Circuit Added + local grooveTime = playerData.Tgroove --Circuit Added + if grooveTime > 19 or grooveTime < 15 then --Circuit Added + GT = "" --Circuit Added + end --Circuit Added + end --Circuit Added + + end-- VNAO Edit - Added -- Compile. local G = "" local n = 0 - -- Fly trough. + + -- VNAO Edit - Added WU, AA and AFU calls to LSO grading + if stepMod == "XX" then -- VNAO Edit - Added + if playerData.case < 3 then -- VNAO Edit - Added + if fdata.WrappedUp then -- VNAO Edit - Added + env.info("Adding WrappedUp deviation.") + G=G..fdata.WrappedUp -- VNAO Edit - Added + n=n + 1 -- VNAO Edit - Added + -- env.info('MOOSE/AIRBOSS- MOD - GRADE.... you`RE GETTING WU`D') + end -- VNAO Edit - Added + if fdata.AngledApch then -- VNAO Edit - Added + env.info("Adding AngledApch deviation.") + G=G..fdata.AngledApch -- VNAO Edit - Added + n=n+1 -- VNAO Edit - Added + -- env.info('Adam MOOSE Edit -AA code: Function- _Flightdata2Text: Trying to add AA comment only to the "Start" in comments for player: '..playerData.name) + -- env.info('MOOSE/AIRBOSS- MOD - GRADE.... you`RE GETTING AA`D') + end -- VNAO Edit - Added + if fdata.AFU then -- VNAO Edit - Added + env.info("Adding AFU deviation.") + G=G..fdata.AFU -- VNAO Edit - Added + n=n+1 -- VNAO Edit - Added + -- env.info('Adam MOOSE Edit -AFU code: Function- _Flightdata2Text: Trying to add AFU comment only to the "Start" in comments for player: '..playerData.name) + -- env.info('MOOSE/AIRBOSS- MOD - GRADE....you`RE GETTING AFU`D') + end + end -- VNAO Edit - Added + end -- VNAO Edit - Added + + -- Fly through. if fdata.FlyThrough then G = G .. fdata.FlyThrough end -- Angled Approach - doesn't affect score, advisory only. - if P then - G = G .. P - n = n - end + -- if P then -- VNAO Edit - Commented out + -- G = G .. P -- VNAO Edit - Commented out + -- n = n + 1 -- VNAO Edit - Added + 1 -- VNAO Edit - Commented out + -- end -- VNAO Edit - Commented out -- Speed. if S then + env.info("Adding speed deviation.")--VNAO Added G = G .. S n = n + 1 end -- Glide slope. if A then + env.info("Adding altitude deviation.")--VNAO Added G = G .. A n = n + 1 end -- Line up. if D then + env.info("Adding line up deviation.")--VNAO Added G = G .. D n = n + 1 end -- Drift in Lineup if fdata.Drift then + env.info("Adding drift deviation.")--VNAO Added G = G .. fdata.Drift n = n -- Drift doesn't affect score, advisory only. end -- Overshoot. if O then + env.info("Adding overshoot deviation.")--VNAO Added G = G .. O n = n + 1 end + if DW then -- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code:TRYING TO ADD COMMENT LANDED LEFT/RIGHT OF CENTER LINE ") -- VNAO Edit - Added + env.info("Adding landed L/R deviation.") + G = G .. DW -- VNAO Edit - Added + n = n + 1 -- VNAO Edit - Added + end -- VNAO Edit - Added + + if Rol then -- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code:TRYING TO ADD COMMENT LANDED LEFT/RIGHT WING DOWN ") -- VNAO Edit - Added + env.info("Adding landed rol deviation.") + G = G .. Rol -- VNAO Edit - Added + n = n + 1 -- VNAO Edit - Added + end -- VNAO Edit - Added + + if Noz then -- VNAO Edit - Added + -- env.info("Adam MOOSE Edit -IW code:TRYING TO ADD COMMENT EG ") -- VNAO Edit - Added + env.info("Adding eased guns deviation.") + G = G .. Noz -- VNAO Edit - Added + n = n + 1-- try to add 3 to get an automatic no grade. -- VNAO Edit - Added + end -- VNAO Edit - Added + + if GT then --Circuit Added + G = G .. GT --Circuit Added + n = n + 1 --Circuit Added + end --Circuit Added + -- Add current step. local step = self:_GS( step ) step = step:gsub( "XX", "X" ) @@ -13324,6 +13920,7 @@ function AIRBOSS:_Debrief( playerData ) Points = points end + -- My LSO grade. local mygrade = {} -- #AIRBOSS.LSOgrade mygrade.grade = grade @@ -13380,7 +13977,8 @@ function AIRBOSS:_Debrief( playerData ) -- Time in the groove. Only Case I/II and not pattern WO. if playerData.Tgroove and playerData.Tgroove <= 360 and playerData.case < 3 then - text = text .. string.format( "\nTime in the groove %.1f seconds: %s", playerData.Tgroove, self:_EvalGrooveTime( playerData ) ) + -- text = text .. string.format( "\nTime in the groove %.1f seconds: %s", playerData.Tgroove, self:_EvalGrooveTime( playerData ) ) --Circuit changed removed groove comment + text = text .. string.format( "\nTime in the groove %.1f seconds.", playerData.Tgroove ) end end @@ -16835,6 +17433,17 @@ function AIRBOSS:_RequestEmergency( _unitName ) -- Cleared. text = "affirmative, you can bypass the pattern and are cleared for final approach!" + -- VNAO Edit - Added wrapped up call to LSO grading + playerData.wrappedUpAtWakeLittle = false -- VNAO Edit - Added + playerData.wrappedUpAtWakeFull = false -- VNAO Edit - Added + playerData.wrappedUpAtWakeUnderline = false -- VNAO Edit - Added + playerData.wrappedUpAtStartLittle = false -- VNAO Edit - Added + playerData.wrappedUpAtStartFull = false -- VNAO Edit - Added + playerData.wrappedUpAtStartUnderline = false -- VNAO Edit - Added + playerData.AAatWakeLittle = false -- VNAO Edit - Added + playerData.AAatWakeFull = false -- VNAO Edit - Added + playerData.AAatWakeUnderline = false -- VNAO Edit - Added + -- Now, if player is in the marshal or waiting queue he will be removed. But the new leader should stay in or not. local lead = self:_GetFlightLead( playerData ) @@ -18717,8 +19326,4 @@ function AIRBOSS:onafterLSOGrade(From, Event, To, playerData, grade) self.funkmanSocket:SendTable(result) end -end - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +end \ No newline at end of file