mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
AIRBOSS v0.5.0w
This commit is contained in:
parent
43ec58fe85
commit
7eb98c05eb
@ -255,6 +255,8 @@ AIRBOSS.CarrierType={
|
|||||||
-- @field #number OnSpeed Optimal on-speed AoA.
|
-- @field #number OnSpeed Optimal on-speed AoA.
|
||||||
-- @field #number Fast Fast AoA threshold. Smaller means faster.
|
-- @field #number Fast Fast AoA threshold. Smaller means faster.
|
||||||
-- @field #number Slow Slow AoA threshold. Larger means slower.
|
-- @field #number Slow Slow AoA threshold. Larger means slower.
|
||||||
|
-- @field #number FAST Really fast AoA threshold.
|
||||||
|
-- @field #number SLOW Really slow AoA threshold.
|
||||||
|
|
||||||
--- Pattern steps.
|
--- Pattern steps.
|
||||||
-- @type AIRBOSS.PatternStep
|
-- @type AIRBOSS.PatternStep
|
||||||
@ -1762,25 +1764,31 @@ function AIRBOSS:_GetAircraftAoA(playerData)
|
|||||||
|
|
||||||
if hornet then
|
if hornet then
|
||||||
-- F/A-18C Hornet parameters
|
-- F/A-18C Hornet parameters
|
||||||
|
aoa.SLOW=9.8
|
||||||
aoa.Slow=9.3
|
aoa.Slow=9.3
|
||||||
aoa.OnSpeedMax=8.8
|
aoa.OnSpeedMax=8.8
|
||||||
aoa.OnSpeed=8.1
|
aoa.OnSpeed=8.1
|
||||||
aoa.OnSpeedMin=7.4
|
aoa.OnSpeedMin=7.4
|
||||||
aoa.Fast=6.9
|
aoa.Fast=6.9
|
||||||
|
aoa.FAST=6.3
|
||||||
elseif skyhawk then
|
elseif skyhawk then
|
||||||
-- A-4E-C parameters from https://forums.eagle.ru/showpost.php?p=3703467&postcount=390
|
-- A-4E-C parameters from https://forums.eagle.ru/showpost.php?p=3703467&postcount=390
|
||||||
|
aoa.SLOW=19.0
|
||||||
aoa.Slow=18.5
|
aoa.Slow=18.5
|
||||||
aoa.OnSpeedMax=18.0
|
aoa.OnSpeedMax=18.0
|
||||||
aoa.OnSpeed=17.5
|
aoa.OnSpeed=17.5
|
||||||
aoa.OnSpeedMin=17.0
|
aoa.OnSpeedMin=17.0
|
||||||
aoa.Fast=16.5
|
aoa.Fast=16.5
|
||||||
|
aoa.FAST=16.0
|
||||||
elseif harrier then
|
elseif harrier then
|
||||||
-- TODO: AV-8B parameters! On speed AoA?
|
-- TODO: AV-8B parameters! On speed AoA?
|
||||||
|
aoa.SLOW=14.0
|
||||||
aoa.Slow=13.0
|
aoa.Slow=13.0
|
||||||
aoa.OnSpeedMax=12.0
|
aoa.OnSpeedMax=12.0
|
||||||
aoa.OnSpeed=11.0
|
aoa.OnSpeed=11.0
|
||||||
aoa.OnSpeedMin=10.0
|
aoa.OnSpeedMin=10.0
|
||||||
aoa.Fast=9.0
|
aoa.Fast=9.0
|
||||||
|
aoa.FAST=8.0
|
||||||
end
|
end
|
||||||
|
|
||||||
return aoa
|
return aoa
|
||||||
@ -3837,6 +3845,7 @@ function AIRBOSS:_CheckForLongDownwind(playerData)
|
|||||||
|
|
||||||
-- Sound output.
|
-- Sound output.
|
||||||
self:RadioTransmission(self.LSORadio, AIRBOSS.LSOCall.LONGINGROOVE)
|
self:RadioTransmission(self.LSORadio, AIRBOSS.LSOCall.LONGINGROOVE)
|
||||||
|
self:RadioTransmission(self.LSORadio, AIRBOSS.LSOCall.DEPARTANDREENTER)
|
||||||
|
|
||||||
-- Debrief.
|
-- Debrief.
|
||||||
self:_AddToDebrief(playerData, "Long in the groove - Pattern Wave Off!")
|
self:_AddToDebrief(playerData, "Long in the groove - Pattern Wave Off!")
|
||||||
@ -5059,9 +5068,7 @@ end
|
|||||||
-- @param #number lineupError Error in degrees.
|
-- @param #number lineupError Error in degrees.
|
||||||
function AIRBOSS:_LSOadvice(playerData, glideslopeError, lineupError)
|
function AIRBOSS:_LSOadvice(playerData, glideslopeError, lineupError)
|
||||||
|
|
||||||
-- Player group.
|
-- Advice time.
|
||||||
local player=playerData.unit:GetGroup()
|
|
||||||
|
|
||||||
local advice=0
|
local advice=0
|
||||||
|
|
||||||
-- Glideslope high/low calls.
|
-- Glideslope high/low calls.
|
||||||
@ -5162,10 +5169,10 @@ function AIRBOSS:_LSOgrade(playerData)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Analyse flight data and conver to LSO text.
|
-- Analyse flight data and conver to LSO text.
|
||||||
local GXX,nXX=self:_Flightdata2Text(playerData.groove.XX)
|
local GXX,nXX=self:_Flightdata2Text(playerData, AIRBOSS.GroovePos.XX) --playerData.groove.XX)
|
||||||
local GIM,nIM=self:_Flightdata2Text(playerData.groove.IM)
|
local GIM,nIM=self:_Flightdata2Text(playerData, AIRBOSS.GroovePos.IM) --playerData.groove.IM)
|
||||||
local GIC,nIC=self:_Flightdata2Text(playerData.groove.IC)
|
local GIC,nIC=self:_Flightdata2Text(playerData, AIRBOSS.GroovePos.IC) --playerData.groove.IC)
|
||||||
local GAR,nAR=self:_Flightdata2Text(playerData.groove.AR)
|
local GAR,nAR=self:_Flightdata2Text(playerData, AIRBOSS.GroovePos.AR) --playerData.groove.AR)
|
||||||
|
|
||||||
-- Put everything together.
|
-- Put everything together.
|
||||||
local G=GXX.." "..GIM.." ".." "..GIC.." "..GAR
|
local G=GXX.." "..GIM.." ".." "..GIC.." "..GAR
|
||||||
@ -5241,10 +5248,12 @@ end
|
|||||||
|
|
||||||
--- Grade flight data.
|
--- Grade flight data.
|
||||||
-- @param #AIRBOSS self
|
-- @param #AIRBOSS self
|
||||||
|
-- @param #AIRBOSS.PlayerData playerData Player data.
|
||||||
|
-- @param #string groovestep Step in the groove.
|
||||||
-- @param #AIRBOSS.GrooveData fdata Flight data in the groove.
|
-- @param #AIRBOSS.GrooveData fdata Flight data in the groove.
|
||||||
-- @return #string LSO grade or empty string if flight data table is nil.
|
-- @return #string LSO grade or empty string if flight data table is nil.
|
||||||
-- @return #number Number of deviations from perfect flight path.
|
-- @return #number Number of deviations from perfect flight path.
|
||||||
function AIRBOSS:_Flightdata2Text(fdata)
|
function AIRBOSS:_Flightdata2Text(playerData, groovestep)
|
||||||
|
|
||||||
local function little(text)
|
local function little(text)
|
||||||
return string.format("(%s)",text)
|
return string.format("(%s)",text)
|
||||||
@ -5252,6 +5261,9 @@ function AIRBOSS:_Flightdata2Text(fdata)
|
|||||||
local function underline(text)
|
local function underline(text)
|
||||||
return string.format("_%s_", text)
|
return string.format("_%s_", text)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Data.
|
||||||
|
local fdata=playerData.groove[groovestep]
|
||||||
|
|
||||||
-- No flight data ==> return empty string.
|
-- No flight data ==> return empty string.
|
||||||
if fdata==nil then
|
if fdata==nil then
|
||||||
@ -5265,40 +5277,43 @@ function AIRBOSS:_Flightdata2Text(fdata)
|
|||||||
local GSE=fdata.GSE
|
local GSE=fdata.GSE
|
||||||
local LUE=fdata.LUE
|
local LUE=fdata.LUE
|
||||||
local ROL=fdata.Roll
|
local ROL=fdata.Roll
|
||||||
|
|
||||||
|
-- Aircraft specific AoA values.
|
||||||
|
local acaoa=self:_GetAircraftAoA(playerData)
|
||||||
|
|
||||||
-- Speed.
|
-- Speed.
|
||||||
local S=nil
|
local S=nil
|
||||||
if AOA>9.8 then
|
if AOA>acaoa.SLOW then
|
||||||
S=underline("SLO")
|
S=underline("SLO")
|
||||||
elseif AOA>9.3 then
|
elseif AOA>acaoa.Slow then
|
||||||
S="SLO"
|
S="SLO"
|
||||||
elseif AOA>8.8 then
|
elseif AOA>acaoa.OnSpeedMax then
|
||||||
S=little("SLO")
|
S=little("SLO")
|
||||||
elseif AOA<6.4 then
|
elseif AOA<acaoa.FAST then
|
||||||
S=underline("F")
|
S=underline("F")
|
||||||
elseif AOA<6.9 then
|
elseif AOA<acaoa.Fast then
|
||||||
S="F"
|
S="F"
|
||||||
elseif AOA<7.4 then
|
elseif AOA<acaoa.OnSpeedMin then
|
||||||
S=little("F")
|
S=little("F")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Alitude.
|
-- Glideslope/altitude. Good [-0.25, 0.25]
|
||||||
local A=nil
|
local A=nil
|
||||||
if GSE>1 then
|
if GSE>1 then
|
||||||
A=underline("H")
|
A=underline("H")
|
||||||
elseif GSE>0.5 then
|
elseif GSE>0.5 then
|
||||||
A=little("H")
|
|
||||||
elseif GSE>0.25 then
|
|
||||||
A="H"
|
A="H"
|
||||||
|
elseif GSE>0.25 then
|
||||||
|
A=little("H")
|
||||||
elseif GSE<-1 then
|
elseif GSE<-1 then
|
||||||
A=underline("LO")
|
A=underline("LO")
|
||||||
elseif GSE<-0.5 then
|
elseif GSE<-0.5 then
|
||||||
A=little("LO")
|
|
||||||
elseif GSE<-0.25 then
|
|
||||||
A="LO"
|
A="LO"
|
||||||
|
elseif GSE<-0.25 then
|
||||||
|
A=little("LO")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Line up.
|
-- Line up. Good [-0.5, 0.5]
|
||||||
local D=nil
|
local D=nil
|
||||||
if LUE>3 then
|
if LUE>3 then
|
||||||
D=underline("LUL")
|
D=underline("LUL")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user