From 5ae6495e6949b2a202f0dde1f7b716203d4cb5d1 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 5 Oct 2025 13:51:55 +0200 Subject: [PATCH 1/6] #CSAR Added functionality to determine if a landing took place at a helo base (named "H ..." in newer maps). --- Moose Development/Moose/Ops/CSAR.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Moose Development/Moose/Ops/CSAR.lua b/Moose Development/Moose/Ops/CSAR.lua index d9d743d95..9ba328b5c 100644 --- a/Moose Development/Moose/Ops/CSAR.lua +++ b/Moose Development/Moose/Ops/CSAR.lua @@ -31,7 +31,7 @@ -- @image OPS_CSAR.jpg --- --- Last Update July 2025 +-- Last Update Oct 2025 ------------------------------------------------------------------------- --- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM @@ -315,7 +315,7 @@ CSAR.AircraftType["CH-47Fbl1"] = 31 --- CSAR class version. -- @field #string version -CSAR.version="1.0.33" +CSAR.version="1.0.34" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- ToDo list @@ -1244,7 +1244,10 @@ function CSAR:_EventHandler(EventData) if _place:GetCoalition() == self.coalition or _place:GetCoalition() == coalition.side.NEUTRAL then self:__Landed(2,_event.IniUnitName, _place) - self:_ScheduledSARFlight(_event.IniUnitName,_event.IniGroupName,true,true) + local IsHeloBase = false + local ABName = _place:GetName() + if ABName and string.find(ABName,"^H") then IsHeloBase = true end -- if name starts with an H it's an (possibly elevated) helo base on current maps + self:_ScheduledSARFlight(_event.IniUnitName,_event.IniGroupName,true,true,IsHeloBase) else self:T(string.format("Airfield %d, Unit %d", _place:GetCoalition(), _unit:GetCoalition())) end @@ -1731,8 +1734,9 @@ end -- @param #string heliname Heli name -- @param #string groupname Group name -- @param #boolean isairport If true, EVENT.Landing took place at an airport or FARP --- @param #boolean noreschedule If true, do not try to reschedule this is distances are not ok (coming from landing event) -function CSAR:_ScheduledSARFlight(heliname,groupname, isairport, noreschedule) +-- @param #boolean noreschedule If true, do not try to reschedule this if distances are not ok (coming from landing event) +-- @param #boolean IsHeloBase If true, landing took place at a Helo Base (name "H ..." on current maps) +function CSAR:_ScheduledSARFlight(heliname,groupname, isairport, noreschedule, IsHeloBase) self:T(self.lid .. " _ScheduledSARFlight") self:T({heliname,groupname}) local _heliUnit = self:_GetSARHeli(heliname) @@ -1758,7 +1762,7 @@ function CSAR:_ScheduledSARFlight(heliname,groupname, isairport, noreschedule) self:T(self.lid.."[Drop off debug] Check distance to MASH for "..heliname.." Distance km: "..math.floor(_dist/1000)) - if ( _dist < self.FARPRescueDistance or isairport ) and _heliUnit:InAir() == false then + if ( _dist < self.FARPRescueDistance or isairport ) and ((_heliUnit:InAir() == false) or (IsHeloBase == true)) then self:T(self.lid.."[Drop off debug] Distance ok, door check") if self.pilotmustopendoors and self:_IsLoadingDoorOpen(heliname) == false then self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me out!", self.messageTime, true, true) @@ -1773,7 +1777,7 @@ function CSAR:_ScheduledSARFlight(heliname,groupname, isairport, noreschedule) --queue up if not noreschedule then self:__Returning(5,heliname,_woundedGroupName, isairport) - self:ScheduleOnce(5,self._ScheduledSARFlight,self,heliname,groupname, isairport, noreschedule) + self:ScheduleOnce(5,self._ScheduledSARFlight,self,heliname,groupname, isairport, noreschedule, IsHeloBase) end return self end From db138be5f3da8aa05384e142a22e8f2dd63003f4 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 5 Oct 2025 13:52:22 +0200 Subject: [PATCH 2/6] #SCoRING - suppress autocreation of CSV files better --- Moose Development/Moose/Functional/Scoring.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Functional/Scoring.lua b/Moose Development/Moose/Functional/Scoring.lua index c3f4bd4b6..2c49243f8 100644 --- a/Moose Development/Moose/Functional/Scoring.lua +++ b/Moose Development/Moose/Functional/Scoring.lua @@ -321,7 +321,9 @@ function SCORING:New( GameName, SavePath, AutoSave ) -- Create the CSV file. self.AutoSavePath = SavePath self.AutoSave = AutoSave or true - self:OpenCSV( GameName ) + if self.AutoSave == true then + self:OpenCSV( GameName ) + end return self @@ -1935,7 +1937,7 @@ function SCORING:ScoreCSV( PlayerName, TargetPlayerName, ScoreType, ScoreTimes, TargetUnitType = TargetUnitType or "" TargetUnitName = TargetUnitName or "" - if lfs and io and os and self.AutoSave then + if lfs and io and os and self.AutoSave == true and self.CSVFile ~= nil then self.CSVFile:write( '"' .. self.GameName .. '"' .. ',' .. '"' .. self.RunTime .. '"' .. ',' .. From 6e45ee558e6882ceaf331b26f73b82888a851441 Mon Sep 17 00:00:00 2001 From: smiki Date: Sun, 5 Oct 2025 16:57:33 +0200 Subject: [PATCH 3/6] [FIXED] SPAWNSTATIC not registering script spawned static templates therefore ReSpawn is not working. --- Moose Development/Moose/Core/SpawnStatic.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua index 332e7e464..06a9179e1 100644 --- a/Moose Development/Moose/Core/SpawnStatic.lua +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -633,16 +633,15 @@ function SPAWNSTATIC:_SpawnStatic(Template, CountryID) if self.StaticCopyFrom ~= nil then mystatic.StaticCopyFrom = self.StaticCopyFrom - if not _DATABASE.Templates.Statics[Template.name] then - local TemplateGroup={} - TemplateGroup.units={} - TemplateGroup.units[1]=Template - TemplateGroup.x=Template.x - TemplateGroup.y=Template.y - TemplateGroup.name=Template.name - _DATABASE:_RegisterStaticTemplate( TemplateGroup, self.CoalitionID, self.CategoryID, CountryID ) - end end + + local TemplateGroup={} + TemplateGroup.units={} + TemplateGroup.units[1]=Template + TemplateGroup.x=Template.x + TemplateGroup.y=Template.y + TemplateGroup.name=Template.name + _DATABASE:_RegisterStaticTemplate( TemplateGroup, self.CoalitionID, self.CategoryID, CountryID ) return mystatic end From fd4ea81e46cf8b63fb7f6d9d7eb1e802762b72bc Mon Sep 17 00:00:00 2001 From: frankiep95 <38260710+frankiep95@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:50:56 -0400 Subject: [PATCH 4/6] minor fixes to grading, and BRC callout --- Moose Development/Moose/Ops/Airboss.lua | 47 ++++++++++++++++--------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index fcf723279..f50802de2 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -21,7 +21,7 @@ -- * Multiple carrier support due to object oriented approach. -- * Unlimited number of players. -- * Persistence of player results (optional). LSO grading data is saved to csv file. --- * Trap sheet (optional). +-- * Trap sheet (optional). -- * Finite State Machine (FSM) implementation. -- -- **Supported Carriers:** @@ -6870,6 +6870,9 @@ function AIRBOSS:_AddMarshalGroup( flight, stack ) -- Convert to clock string. local Ccharlie = UTILS.SecondsToClock( flight.Tcharlie ) + -- Make sure brc is never above 360 + brc = brc % 360 + -- Combined marshal call. self:_MarshalCallArrived( flight.onboard, flight.case, brc, alt, Ccharlie, P ) @@ -8062,7 +8065,7 @@ end --- Check current player status. -- @param #AIRBOSS self function AIRBOSS:_CheckPlayerStatus() - + local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B -- Loop over all players. for _playerName, _playerData in pairs( self.players ) do local playerData = _playerData -- #AIRBOSS.PlayerData @@ -8087,9 +8090,13 @@ function AIRBOSS:_CheckPlayerStatus() 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 + elseif math.abs(playerData.unit:GetRoll()) <20 and math.abs(playerData.unit:GetRoll()) >=10 and not tomcat 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 + elseif math.abs(playerData.unit:GetRoll()) <10 and math.abs(playerData.unit:GetRoll()) >=2 and not tomcat 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()) <12 and math.abs(playerData.unit:GetRoll()) >=5 and tomcat 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()) <5 and math.abs(playerData.unit:GetRoll()) >=2 and tomcat 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 @@ -8335,7 +8342,7 @@ end function AIRBOSS:_SetTimeInGroove( playerData ) -- Set time in the groove - if playerData.TIG0 then + if playerData.TIG0 > 2 then --circuit added to prevent negative groove time playerData.Tgroove = timer.getTime() - playerData.TIG0 - 1.5 -- VNAO Edit - Subtracting an extra 1.5 else playerData.Tgroove = 999 @@ -12671,7 +12678,7 @@ function AIRBOSS:_LSOgrade( playerData ) 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 + TIG = self:_EvalGrooveTime( playerData ) or "N/A" --Circuit Added end --Circuit Added local GXX, nXX = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.XX ) local GIM, nIM = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.IM ) @@ -12865,16 +12872,21 @@ function AIRBOSS:_LSOgrade( playerData ) 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 + -- -- 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 + + -- Circuit edit only take points awary from a 1 wire if there are more than 4 other deviations + if playerData.wire == 1 and points >= 3 and N > 4 then + points = points -1 + end env.info("Returning: " .. grade .. " " .. points .. " " .. G) @@ -12950,6 +12962,7 @@ function AIRBOSS:_Flightdata2Text( playerData, groovestep ) -- Speed via AoA. Depends on aircraft type. local S = nil + local A = nil --circuit moved this line to be seen outside of this scope 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 @@ -12970,7 +12983,7 @@ function AIRBOSS:_Flightdata2Text( playerData, groovestep ) 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 From 5404f9ef199b0c2f6df28399650074ba8a340d77 Mon Sep 17 00:00:00 2001 From: frankiep95 <38260710+frankiep95@users.noreply.github.com> Date: Sun, 5 Oct 2025 13:31:18 -0400 Subject: [PATCH 5/6] Minor Fixes to grading fixed high low comments and BRC comment --- Moose Development/Moose/Ops/Airboss.lua | 122 +++--------------------- 1 file changed, 11 insertions(+), 111 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index d602c9018..6a6819600 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -8145,8 +8145,7 @@ end --- Check current player status. -- @param #AIRBOSS self function AIRBOSS:_CheckPlayerStatus() - local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B - -- Loop over all players. + -- Loop over all players. for _playerName, _playerData in pairs( self.players ) do local playerData = _playerData -- #AIRBOSS.PlayerData @@ -8170,13 +8169,9 @@ function AIRBOSS:_CheckPlayerStatus() 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 and not tomcat 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 + 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 and not tomcat 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()) <12 and math.abs(playerData.unit:GetRoll()) >=5 and tomcat 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()) <5 and math.abs(playerData.unit:GetRoll()) >=2 and tomcat 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 + 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 @@ -9651,7 +9646,7 @@ end --- Break entry for case I/II recoveries. -- @param #AIRBOSS self -- @param #AIRBOSS.PlayerData playerData Player data table. -function AIRBOSS:_BreakEntry( playerData ) --Adam Edits begin 7/24/23 +function AIRBOSS:_BreakEntry( playerData ) -- Get distances between carrier and player unit (parallel and perpendicular to direction of movement of carrier) local X, Z = self:_GetDistances( playerData.unit ) @@ -9662,111 +9657,16 @@ function AIRBOSS:_BreakEntry( playerData ) --Adam Edits begin 7/24/23 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--Adam Edits end 7/24/23 +end --- Break. -- @param #AIRBOSS self @@ -10368,19 +10268,19 @@ function AIRBOSS:_Groove( playerData ) if rho >= RAR and rho <= RIM then if gd.LUE > 0.22 and lineupError < -0.22 then env.info " Drift Right across centre ==> DR-" - gd.Drift = " DR" + gd.Drift = "DR" self:T( self.lid .. string.format( "Got Drift Right across centre step %s, d=%.3f: Max LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError ) ) elseif gd.LUE < -0.22 and lineupError > 0.22 then env.info " Drift Left ==> DL-" - gd.Drift = " DL" + gd.Drift = "DL" self:T( self.lid .. string.format( "Got Drift Left across centre at step %s, d=%.3f: Min LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError ) ) elseif gd.LUE > 0.13 and lineupError < -0.14 then env.info " Little Drift Right across centre ==> (DR-)" - gd.Drift = " (DR)" + gd.Drift = "(DR)" self:T( self.lid .. string.format( "Got Little Drift Right across centre at step %s, d=%.3f: Max LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError ) ) elseif gd.LUE < -0.13 and lineupError > 0.14 then env.info " Little Drift Left across centre ==> (DL-)" - gd.Drift = " (DL)" + gd.Drift = "(DL)" self:E( self.lid .. string.format( "Got Little Drift Left across centre at step %s, d=%.3f: Min LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError ) ) end end @@ -12758,7 +12658,7 @@ function AIRBOSS:_LSOgrade( playerData ) 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 ) or "N/A" --Circuit Added + TIG = self:_EvalGrooveTime( playerData ) or "N/A" --Circuit Added end --Circuit Added local GXX, nXX = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.XX ) local GIM, nIM = self:_Flightdata2Text( playerData, AIRBOSS.GroovePos.IM ) From 0f42218681801e9ec4e7665c290db9d32cd11023 Mon Sep 17 00:00:00 2001 From: nasgroup94 Date: Mon, 6 Oct 2025 18:08:23 -0400 Subject: [PATCH 6/6] minor edits --- Moose Development/Moose/Ops/Airboss.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 6a6819600..246e960d1 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -7606,7 +7606,7 @@ function AIRBOSS:_InitPlayer( playerData, step ) playerData.landed = false playerData.Tlso = timer.getTime() playerData.Tgroove = nil - playerData.TIG0 = nil + playerData.TIG0 = 0 --changed to prevent errors in script when player is not in correct spot playerData.wire = nil playerData.flag = -100 playerData.debriefschedulerID = nil @@ -8417,7 +8417,7 @@ end function AIRBOSS:_SetTimeInGroove( playerData ) -- Set time in the groove - if playerData.TIG0 > 2 then --circuit added to prevent negative groove time + if playerData.TIG0 then playerData.Tgroove = timer.getTime() - playerData.TIG0 - 1.5 -- VNAO Edit - Subtracting an extra 1.5 else playerData.Tgroove = 999 @@ -11958,10 +11958,12 @@ function AIRBOSS:GetHeading( magnetic ) hdg = hdg - self.magvar end - -- Adjust negative values. - if hdg < 0 then - hdg = hdg + 360 - end + -- -- Adjust negative values. + -- if hdg < 0 then + -- hdg = hdg + 360 + -- end + + hdg = hdg % 360 -- using this to replace the above function to prevent negative values and BRC higher than 360 return hdg end