From 1e4cfd473c26826e6f846cc496bc806724e1323c Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 6 May 2024 16:11:33 +0200 Subject: [PATCH 1/4] Update Airboss.lua --- Moose Development/Moose/Ops/Airboss.lua | 34 ++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index a930cd0c3..aebb483da 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -6474,7 +6474,7 @@ function AIRBOSS:_LandAI( flight ) or flight.actype == AIRBOSS.AircraftCarrier.RHINOF or flight.actype == AIRBOSS.AircraftCarrier.GROWLER then Speed = UTILS.KnotsToKmph( 200 ) - elseif flight.actype == AIRBOSS.AircraftCarrier.E2D then + elseif flight.actype == AIRBOSS.AircraftCarrier.E2D or flight.actype == AIRBOSS.AircraftCarrier.C2A then Speed = UTILS.KnotsToKmph( 150 ) elseif flight.actype == AIRBOSS.AircraftCarrier.F14A_AI or flight.actype == AIRBOSS.AircraftCarrier.F14A or flight.actype == AIRBOSS.AircraftCarrier.F14B then Speed = UTILS.KnotsToKmph( 175 ) @@ -11547,10 +11547,28 @@ end --- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway. -- @param #AIRBOSS self +-- @param #number vdeck Desired wind velocity over deck in knots. -- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned. -- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position. -- @return #number Carrier heading in degrees. -function AIRBOSS:GetHeadingIntoWind_old( magnetic, coord ) +-- @return #number Carrier speed in knots to reach desired wind speed on deck. +function AIRBOSS:GetHeadingIntoWind(vdeck, magnetic, coord ) + + if self.intowindold then + self:GetHeadingIntoWind_old(vdeck, magnetic, coord) + else + self:GetHeadingIntoWind_new(vdeck, magnetic, coord) + end + +end + + +--- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway. +-- @param #AIRBOSS self +-- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned. +-- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position. +-- @return #number Carrier heading in degrees. +function AIRBOSS:GetHeadingIntoWind_old( vdeck, magnetic, coord ) local function adjustDegreesForWindSpeed(windSpeed) local degreesAdjustment = 0 @@ -11607,7 +11625,13 @@ function AIRBOSS:GetHeadingIntoWind_old( magnetic, coord ) intowind = intowind + 360 end - return intowind + -- Wind speed. + local _, vwind = self:GetWind() + + -- Speed of carrier in m/s but at least 4 knots. + local vtot = math.max(UTILS.MpsToKnots(vdeck - vwind), 4) + + return intowind, vtot end --- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway. @@ -11618,7 +11642,7 @@ end -- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position. -- @return #number Carrier heading in degrees. -- @return #number Carrier speed in knots to reach desired wind speed on deck. -function AIRBOSS:GetHeadingIntoWind( vdeck, magnetic, coord ) +function AIRBOSS:GetHeadingIntoWind_new( vdeck, magnetic, coord ) -- Default offset angle. local Offset=self.carrierparam.rwyangle or 0 @@ -14279,6 +14303,8 @@ function AIRBOSS:_GetACNickname( actype ) nickname = "Harrier" elseif actype == AIRBOSS.AircraftCarrier.E2D then nickname = "Hawkeye" + elseif actype == AIRBOSS.AircraftCarrier.C2A then + nickname = "Greyhound" elseif actype == AIRBOSS.AircraftCarrier.F14A_AI or actype == AIRBOSS.AircraftCarrier.F14A or actype == AIRBOSS.AircraftCarrier.F14B then nickname = "Tomcat" elseif actype == AIRBOSS.AircraftCarrier.FA18C or actype == AIRBOSS.AircraftCarrier.HORNET then From 22c6a0316165943b0661959917551acedb936115 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 9 May 2024 11:09:29 +0200 Subject: [PATCH 2/4] Update Airboss.lua --- Moose Development/Moose/Ops/Airboss.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index aebb483da..022ff2945 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -255,6 +255,7 @@ -- @field #boolean skipperUturn U-turn on/off via menu. -- @field #number skipperOffset Holding offset angle in degrees for Case II/III manual recoveries. -- @field #number skipperTime Recovery time in min for manual recovery. +-- @field #boolean intowindold If true, use old into wind calculation. -- @extends Core.Fsm#FSM --- Be the boss! @@ -2724,6 +2725,15 @@ function AIRBOSS:SetLSOCallInterval( TimeInterval ) return self end +--- Set if old into wind calculation is used when carrier turns into the wind for a recovery. +-- @param #AIRBOSS self +-- @param #boolean SwitchOn If `true`, use old into wind calculation. +-- @return #AIRBOSS self +function AIRBOSS:SetIntoWindLegacy( SwitchOn ) + self.intowindold=SwitchOn + return self +end + --- Airboss is a rather nice guy and not strictly following the rules. Fore example, he does allow you into the landing pattern if you are not coming from the Marshal stack. -- @param #AIRBOSS self -- @param #boolean Switch If true or nil, Airboss bends the rules a bit. From 3e8c7ad1df8bebe44af11f59387ee8881ea99884 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 9 May 2024 12:54:20 +0200 Subject: [PATCH 3/4] AIRBOSS into wind - Added option to use the "old" into wind calculation `:SetIntoWindLegacy()` --- Moose Development/Moose/Ops/Airboss.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 022ff2945..008b96b0f 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -2727,9 +2727,12 @@ end --- Set if old into wind calculation is used when carrier turns into the wind for a recovery. -- @param #AIRBOSS self --- @param #boolean SwitchOn If `true`, use old into wind calculation. +-- @param #boolean SwitchOn If `true` or `nil`, use old into wind calculation. -- @return #AIRBOSS self function AIRBOSS:SetIntoWindLegacy( SwitchOn ) + if SwitchOn==nil then + SwitchOn=true + end self.intowindold=SwitchOn return self end @@ -11485,7 +11488,7 @@ end --- Get wind direction and speed at carrier position. -- @param #AIRBOSS self --- @param #number alt Altitude ASL in meters. Default 15 m. +-- @param #number alt Altitude ASL in meters. Default 18 m. -- @param #boolean magnetic Direction including magnetic declination. -- @param Core.Point#COORDINATE coord (Optional) Coordinate at which to get the wind. Default is current carrier position. -- @return #number Direction the wind is blowing **from** in degrees. @@ -11565,9 +11568,11 @@ end function AIRBOSS:GetHeadingIntoWind(vdeck, magnetic, coord ) if self.intowindold then - self:GetHeadingIntoWind_old(vdeck, magnetic, coord) + --env.info("FF use OLD into wind") + return self:GetHeadingIntoWind_old(vdeck, magnetic, coord) else - self:GetHeadingIntoWind_new(vdeck, magnetic, coord) + --env.info("FF use NEW into wind") + return self:GetHeadingIntoWind_new(vdeck, magnetic, coord) end end @@ -11575,6 +11580,7 @@ end --- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway. -- @param #AIRBOSS self +-- @param #number vdeck Desired wind velocity over deck in knots. -- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned. -- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position. -- @return #number Carrier heading in degrees. @@ -11636,10 +11642,10 @@ function AIRBOSS:GetHeadingIntoWind_old( vdeck, magnetic, coord ) end -- Wind speed. - local _, vwind = self:GetWind() + --local _, vwind = self:GetWind() -- Speed of carrier in m/s but at least 4 knots. - local vtot = math.max(UTILS.MpsToKnots(vdeck - vwind), 4) + local vtot = math.max(vdeck-UTILS.MpsToKnots(vwind), 4) return intowind, vtot end From d0728afee7dfd03d459a2ff43d028e7f5d254756 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 9 May 2024 16:57:20 +0200 Subject: [PATCH 4/4] Update Airboss.lua - Added C2 Greyhound radio call --- Moose Development/Moose/Ops/Airboss.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 008b96b0f..1105fa26f 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -5213,6 +5213,7 @@ function AIRBOSS:_InitVoiceOvers() TOMCAT = { file = "PILOT-Tomcat", suffix = "ogg", loud = false, subtitle = "", duration = 0.66, subduration = 5 }, HORNET = { file = "PILOT-Hornet", suffix = "ogg", loud = false, subtitle = "", duration = 0.56, subduration = 5 }, VIKING = { file = "PILOT-Viking", suffix = "ogg", loud = false, subtitle = "", duration = 0.61, subduration = 5 }, + GREYHOUND = { file = "PILOT-Greyhound", suffix = "ogg", loud = false, subtitle = "", duration = 0.61, subduration = 5 }, BALL = { file = "PILOT-Ball", suffix = "ogg", loud = false, subtitle = "", duration = 0.50, subduration = 5 }, BINGOFUEL = { file = "PILOT-BingoFuel", suffix = "ogg", loud = false, subtitle = "", duration = 0.80 }, GASATDIVERT = { file = "PILOT-GasAtDivert", suffix = "ogg", loud = false, subtitle = "", duration = 1.80 },