mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'develop' into FF/Ops
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
-- * [F-14A/B Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI)
|
||||
-- * [A-4E Skyhawk Community Mod](https://forums.eagle.ru/showthread.php?t=224989) (Player & AI)
|
||||
-- * [AV-8B N/A Harrier](https://forums.eagle.ru/forumdisplay.php?f=555) (Player & AI) [**WIP**]
|
||||
-- * [T-45C Goshawk (VNAO)(Player & AI)]
|
||||
-- * [T-45C Goshawk](https://www.vnao-cvw-7.com/t-45-goshawk) (VNAO)(Player & AI) [**WIP**]
|
||||
-- * F/A-18C Hornet (AI)
|
||||
-- * F-14A Tomcat (AI)
|
||||
-- * E-2D Hawkeye (AI)
|
||||
@@ -573,7 +573,10 @@
|
||||
-- * **L**ined **U**p **L**eft or **R**ight: LUL, LUR
|
||||
-- * Too **H**igh or too **LO**w: H, LO
|
||||
-- * Too **F**ast or too **SLO**w: F, SLO
|
||||
-- * **Fly through** glideslope **down** or **up**: \\ , /
|
||||
-- * **O**ver**S**hoot: OS, only referenced during **X**
|
||||
-- * **Fly through** glideslope **down** or **up**: \\ , /, advisory only
|
||||
-- * **D**rift **L**eft or **R**ight:DL, DR, advisory only
|
||||
-- * **A**ngled **A**pproach: Angled approach (wings level and LUL): AA, advisory only
|
||||
--
|
||||
-- Each grading, x, is subdivided by
|
||||
--
|
||||
@@ -634,7 +637,7 @@
|
||||
--
|
||||
-- ## Foul Deck Waveoff
|
||||
--
|
||||
-- A foul deck waveoff is called by the LSO if an aircraft is detected within the landing area when an approaching aircraft is crossing the ship's wake during Case I/II operations,
|
||||
-- A foul deck waveoff is called by the LSO if an aircraft is detected within the landing area when an approaching aircraft is at position IM-IC during Case I/II operations,
|
||||
-- or with an aircraft approaching the 3/4 NM during Case III operations.
|
||||
--
|
||||
-- The approaching aircraft will be notified via LSO radio comms and is supposed to overfly the landing area to enter the Bolter pattern. **This pass is not graded**.
|
||||
@@ -1264,6 +1267,7 @@ AIRBOSS = {
|
||||
-- @field #string S3BTANKER Lockheed S-3B Viking tanker.
|
||||
-- @field #string E2D Grumman E-2D Hawkeye AWACS.
|
||||
-- @field #string C2A Grumman C-2A Greyhound from Military Aircraft Mod.
|
||||
-- @field #string T45C T-45C by VNAO
|
||||
AIRBOSS.AircraftCarrier={
|
||||
AV8B="AV8BNA",
|
||||
HORNET="FA-18C_hornet",
|
||||
@@ -1340,6 +1344,8 @@ AIRBOSS.CarrierType={
|
||||
-- @field #number _min Min _OK_ value. Default -0.5 deg.
|
||||
-- @field #number Left (LUR) threshold. Default -1.0 deg.
|
||||
-- @field #number Right (LUL) threshold. Default 1.0 deg.
|
||||
-- @field #number LeftMed threshold for AA/OS measuring. Default -2.0 deg.
|
||||
-- @field #number RightMed threshold for AA/OS measuring. Default 2.0 deg.
|
||||
-- @field #number LEFT LUR threshold. Default -3.0 deg.
|
||||
-- @field #number RIGHT LUL threshold. Default 3.0 deg.
|
||||
|
||||
@@ -2650,10 +2656,10 @@ end
|
||||
|
||||
--- Set multiplayer environment wire correction.
|
||||
-- @param #AIRBOSS self
|
||||
-- @param #number Dcorr Correction distance in meters. Default 8.7 m.
|
||||
-- @param #number Dcorr Correction distance in meters. Default 12 m.
|
||||
-- @return #AIRBOSS self
|
||||
function AIRBOSS:SetMPWireCorrection(Dcorr)
|
||||
self.mpWireCorrection=Dcorr or 8.7
|
||||
self.mpWireCorrection=Dcorr or 12
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -2815,16 +2821,20 @@ end
|
||||
-- @param #number _max
|
||||
-- @param #number _min
|
||||
-- @param #number Left
|
||||
-- @param #number LeftMed
|
||||
-- @param #number LEFT
|
||||
-- @param #number Right
|
||||
-- @param #number RightMed
|
||||
-- @param #number RIGHT
|
||||
-- @return #AIRBOSS self
|
||||
function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LEFT, Right, RIGHT)
|
||||
function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LeftMed, LEFT, Right, RightMed, RIGHT)
|
||||
self.lue._max=_max or 0.5
|
||||
self.lue._min=_min or -0.5
|
||||
self.lue.Left=Left or -1.0
|
||||
self.lue.LeftMed=LeftMed or -2.0
|
||||
self.lue.LEFT=LEFT or -3.0
|
||||
self.lue.Right=Right or 1.0
|
||||
self.lue.RightMed=RightMed or 2.0
|
||||
self.lue.RIGHT=RIGHT or 3.0
|
||||
return self
|
||||
end
|
||||
@@ -10096,6 +10106,27 @@ function AIRBOSS:_Groove(playerData)
|
||||
-- Distance in NM.
|
||||
local d=UTILS.MetersToNM(rho)
|
||||
|
||||
-- Drift on lineup.
|
||||
if rho>=RAR and rho<=RIM then
|
||||
if gd.LUE>0.21 and lineupError<-0.21 then
|
||||
env.info" Drift Right across centre ==> 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.21 and lineupError>0.21 then
|
||||
env.info" Drift Left ==> 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.12 and lineupError<-0.12 then
|
||||
env.info" Little Drift Right across centre ==> (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.12 and lineupError>0.12 then
|
||||
env.info" Little Drift Left across centre ==> (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
|
||||
|
||||
-- Update max deviation of line up error.
|
||||
if math.abs(lineupError)>math.abs(gd.LUE) then
|
||||
self:T(self.lid..string.format("Got bigger LUE at step %s, d=%.3f: LUE %.3f>%.3f", gs, d, lineupError, gd.LUE))
|
||||
@@ -12092,7 +12123,7 @@ function AIRBOSS:_LSOgrade(playerData)
|
||||
local nS=count(G, '%(')
|
||||
local nN=N-nS-nL
|
||||
|
||||
-- Groove time 16-18 sec for a unicorn.
|
||||
-- Groove time 15-18.99 sec for a unicorn.
|
||||
local Tgroove=playerData.Tgroove
|
||||
local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false
|
||||
|
||||
@@ -12227,7 +12258,35 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep)
|
||||
|
||||
-- Aircraft specific AoA values.
|
||||
local acaoa=self:_GetAircraftAoA(playerData)
|
||||
|
||||
|
||||
--Angled Approach.
|
||||
local P=nil
|
||||
if step==AIRBOSS.PatternStep.GROOVE_XX and ROL<=4.0 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")
|
||||
end
|
||||
end
|
||||
|
||||
--Overshoot Start.
|
||||
local O=nil
|
||||
if step==AIRBOSS.PatternStep.GROOVE_XX then
|
||||
if LUE<self.lue.LEFT then
|
||||
O=underline("OS")
|
||||
elseif
|
||||
LUE<self.lue.Left then
|
||||
O="OS"
|
||||
elseif
|
||||
LUE<self.lue._min then
|
||||
O=little("OS")
|
||||
end
|
||||
end
|
||||
|
||||
-- Speed via AoA. Depends on aircraft type.
|
||||
local S=nil
|
||||
if AOA>acaoa.SLOW then
|
||||
@@ -12260,7 +12319,7 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep)
|
||||
A=little("LO")
|
||||
end
|
||||
|
||||
-- Line up. Good [-0.5, 0.5]
|
||||
-- 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")
|
||||
@@ -12268,11 +12327,11 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep)
|
||||
D="LUL"
|
||||
elseif LUE>self.lue._max then
|
||||
D=little("LUL")
|
||||
elseif LUE<self.lue.LEFT then
|
||||
elseif LUE<self.lue.LEFT and step~=AIRBOSS.PatternStep.GROOVE_XX then
|
||||
D=underline("LUR")
|
||||
elseif LUE<self.lue.Left then
|
||||
elseif LUE<self.lue.Left and step~=AIRBOSS.PatternStep.GROOVE_XX then
|
||||
D="LUR"
|
||||
elseif LUE<self.lue._min then
|
||||
elseif LUE<self.lue._min and step~=AIRBOSS.PatternStep.GROOVE_XX then
|
||||
D=little("LUR")
|
||||
end
|
||||
|
||||
@@ -12283,6 +12342,11 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep)
|
||||
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
|
||||
-- Speed.
|
||||
if S then
|
||||
G=G..S
|
||||
@@ -12298,7 +12362,17 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep)
|
||||
G=G..D
|
||||
n=n+1
|
||||
end
|
||||
|
||||
--Drift in Lineup
|
||||
if fdata.Drift then
|
||||
G=G..fdata.Drift
|
||||
n=n -- Drift doesn't affect score, advisory only.
|
||||
end
|
||||
-- Overshoot.
|
||||
if O then
|
||||
G=G..O
|
||||
n=n+1
|
||||
end
|
||||
|
||||
-- Add current step.
|
||||
local step=self:_GS(step)
|
||||
step=step:gsub("XX","X")
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
--- **Ops** - Office of Military Intelligence.
|
||||
--
|
||||
-- **Main Features:**
|
||||
-- ## Main Features:
|
||||
--
|
||||
-- * Stuff
|
||||
-- * Detect and track contacts consistently
|
||||
-- * Detect and track clusters of contacts consistently
|
||||
-- * Use FSM events to link functionality into your scripts
|
||||
-- * Easy setup
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
@@ -41,9 +44,42 @@
|
||||
-- 
|
||||
--
|
||||
-- # The INTEL Concept
|
||||
--
|
||||
-- * Lightweight replacement for @{Functional.Detection#DETECTION}
|
||||
-- * Detect and track contacts consistently
|
||||
-- * Detect and track clusters of contacts consistently
|
||||
-- * Once detected and still alive, planes will be tracked 10 minutes, helicopters 20 minutes, ships and trains 1 hour, ground units 2 hours
|
||||
-- * Use FSM events to link functionality into your scripts
|
||||
--
|
||||
-- # Basic Usage
|
||||
--
|
||||
--
|
||||
--
|
||||
-- ## set up a detection SET_GROUP
|
||||
--
|
||||
-- `Red_DetectionSetGroup = SET_GROUP:New()`
|
||||
-- `Red_DetectionSetGroup:FilterPrefixes( { "Red EWR" } )`
|
||||
-- `Red_DetectionSetGroup:FilterOnce()`
|
||||
--
|
||||
-- ## New Intel type detection for the red side, logname "KGB"
|
||||
--
|
||||
-- `RedIntel = INTEL:New(Red_DetectionSetGroup,"red","KGB")`
|
||||
-- `RedIntel:SetClusterAnalysis(true,true)`
|
||||
-- `RedIntel:SetVerbosity(2)`
|
||||
-- `RedIntel:Start()`
|
||||
--
|
||||
-- ## Hook into new contacts found
|
||||
--
|
||||
-- `function RedIntel:OnAfterNewContact(From, Event, To, Contact)`
|
||||
-- `local text = string.format("NEW contact %s detected by %s", Contact.groupname, Contact.recce or "unknown")`
|
||||
-- `local m = MESSAGE:New(text,15,"KGB"):ToAll()`
|
||||
-- `end`
|
||||
--
|
||||
-- ## And/or new clusters found
|
||||
--
|
||||
-- `function RedIntel:OnAfterNewCluster(From, Event, To, Contact, Cluster)`
|
||||
-- `local text = string.format("NEW cluster %d size %d with contact %s", Cluster.index, Cluster.size, Contact.groupname)`
|
||||
-- `local m = MESSAGE:New(text,15,"KGB"):ToAll()`
|
||||
-- `end`
|
||||
--
|
||||
-- @field #INTEL
|
||||
INTEL = {
|
||||
ClassName = "INTEL",
|
||||
@@ -57,7 +93,7 @@ INTEL = {
|
||||
ContactsUnknown = {},
|
||||
Clusters = {},
|
||||
clustercounter = 1,
|
||||
clusterradius = 15,
|
||||
clusterradius = 10,
|
||||
}
|
||||
|
||||
--- Detected item info.
|
||||
@@ -314,7 +350,7 @@ function INTEL:RemoveRejectZone(RejectZone)
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set forget contacts time interval.
|
||||
--- Set forget contacts time interval. For unknown contacts only.
|
||||
-- Previously known contacts that are not detected any more, are "lost" after this time.
|
||||
-- This avoids fast oscillations between a contact being detected and undetected.
|
||||
-- @param #INTEL self
|
||||
@@ -429,7 +465,7 @@ end
|
||||
-- @param #number radius The radius of the clusters
|
||||
-- @return #INTEL self
|
||||
function INTEL:SetClusterRadius(radius)
|
||||
local radius = radius or 15
|
||||
local radius = radius or 10
|
||||
self.clusterradius = radius
|
||||
return self
|
||||
end
|
||||
@@ -1046,7 +1082,7 @@ function INTEL:CalcClusterThreatlevelSum(cluster)
|
||||
threatlevel=threatlevel+contact.threatlevel
|
||||
|
||||
end
|
||||
|
||||
cluster.threatlevelSum = threatlevel
|
||||
return threatlevel
|
||||
end
|
||||
|
||||
@@ -1058,7 +1094,7 @@ function INTEL:CalcClusterThreatlevelAverage(cluster)
|
||||
|
||||
local threatlevel=self:CalcClusterThreatlevelSum(cluster)
|
||||
threatlevel=threatlevel/cluster.size
|
||||
|
||||
cluster.threatlevelAve = threatlevel
|
||||
return threatlevel
|
||||
end
|
||||
|
||||
@@ -1078,7 +1114,7 @@ function INTEL:CalcClusterThreatlevelMax(cluster)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
cluster.threatlevelMax = threatlevel
|
||||
return threatlevel
|
||||
end
|
||||
|
||||
@@ -1119,7 +1155,7 @@ function INTEL:IsContactConnectedToCluster(contact, cluster)
|
||||
--local dist=Contact.position:Get2DDistance(contact.position)
|
||||
local dist=Contact.position:DistanceFromPointVec2(contact.position)
|
||||
|
||||
local radius = self.clusterradius or 15
|
||||
local radius = self.clusterradius or 10
|
||||
if dist<radius*1000 then
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user