Banner Image

Module Ops.EasyGCICAP

Easy CAP/GCI Class, based on OPS classes

Documentation

https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Ops.EasyGCICAP.html


Date: September 2023

Last Update: July 2024

  • Ops - Easy GCI & CAP Manager

Main Features:

  • Automatically create and manage A2A CAP/GCI defenses using an AirWing and Squadrons for one coalition
  • Easy set-up
  • Add additional AirWings on other airbases
  • Each wing can have more than one Squadron - tasking to Squadrons is done on a random basis per AirWing
  • Create borders and zones of engagement
  • Detection can be ground based and/or via AWACS

AUTHOR: applevangelist

Global(s)

Global EASYGCICAP

*“Airspeed, altitude, and brains.

#EASYGCICAP EASYGCICAP

*“Airspeed, altitude, and brains.

Two are always needed to successfully complete the flight.”* -- Unknown.


The EasyGCICAP Concept

The idea of this class is partially to make the OPS classes easier operational for an A2A CAP/GCI defense network, and to replace the legacy AI_A2A_Dispatcher system - not to it's full extent, but make a basic system work very quickly.

Setup

Basic understanding

The basics are, there is one and only one AirWing per airbase. Each AirWing has at least one Squadron, who will do both CAP and GCI tasks. Squadrons will be randomly chosen for the task at hand. Each AirWing has at least one CAP Point that it manages. CAP Points will be covered by the AirWing automatically as long as airframes are available. Detected intruders will be assigned to one AirWing based on proximity (that is, if you have more than one).

Assignment of tasks for intruders

Either a CAP Plane or a newly spawned GCI plane will take care of the intruders. Standard overhead is 0.75, i.e. a group of 3 intrudes will be managed by 2 planes from the assigned AirWing. There is an maximum missions limitation per AirWing, so we do not spam the skies.

Basic set-up code

Prerequisites

You have to put a STATIC WAREHOUSE object on the airbase with the UNIT name according to the name of the airbase. Do not put any other static type or it creates a conflict with the airbase name! E.g. for Kuitaisi this has to have the unit name Kutaisi. This object symbolizes the AirWing HQ. Next put a late activated template group for your CAP/GCI Squadron on the map. Last, put a zone on the map for the CAP operations, let's name it "Blue Zone 1". Size of the zone plays no role. Put an EW radar system on the map and name it aptly, like "Blue EWR".

Code it

     -- Set up a basic system for the blue side, we'll reside on Kutaisi, and use GROUP objects with "Blue EWR" in the name as EW Radar Systems.
     local mywing = EASYGCICAP:New("Blue CAP Operations",AIRBASE.Caucasus.Kutaisi,"blue","Blue EWR")

     -- Add a CAP patrol point belonging to our airbase, we'll be at 30k ft doing 400 kn, initial direction 90 degrees (East), leg 20NM
     mywing:AddPatrolPointCAP(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone 1"):GetCoordinate(),30000,400,90,20)

     -- Add a Squadron with template "Blue Sq1 M2000c", 20 airframes, skill good, Modex starting with 102 and skin "Vendee Jeanne"
     mywing:AddSquadron("Blue Sq1 M2000c","CAP Kutaisi",AIRBASE.Caucasus.Kutaisi,20,AI.Skill.GOOD,102,"ec1.5_Vendee_Jeanne_clean")

     -- Add a couple of zones
     -- We'll defend our border
     mywing:AddAcceptZone(ZONE_POLYGON:New( "Blue Border", GROUP:FindByName( "Blue Border" ) ))
     -- We'll attack intruders also here
     mywing:AddAcceptZone(ZONE_POLYGON:New("Red Defense Zone", GROUP:FindByName( "Red Defense Zone" )))
     -- We'll leave the reds alone on their turf
     mywing:AddRejectZone(ZONE_POLYGON:New( "Red Border", GROUP:FindByName( "Red Border" ) ))

     -- Optional - Draw the borders on the map so we see what's going on
     -- Set up borders on map
     local BlueBorder = ZONE_POLYGON:New( "Blue Border", GROUP:FindByName( "Blue Border" ) )
     BlueBorder:DrawZone(-1,{0,0,1},1,FillColor,FillAlpha,1,true)
     local BlueNoGoZone = ZONE_POLYGON:New("Red Defense Zone", GROUP:FindByName( "Red Defense Zone" ))
     BlueNoGoZone:DrawZone(-1,{1,1,0},1,FillColor,FillAlpha,2,true)
     local BlueNoGoZone2 = ZONE_POLYGON:New( "Red Border", GROUP:FindByName( "Red Border" ) )
     BlueNoGoZone2:DrawZone(-1,{1,0,0},1,FillColor,FillAlpha,4,true)

Add a second airwing with squads and own CAP point (optional)

     -- Set this up at Sukhumi
     mywing:AddAirwing(AIRBASE.Caucasus.Sukhumi_Babushara,"Blue CAP Sukhumi")
     -- CAP Point "Blue Zone 2"
     mywing:AddPatrolPointCAP(AIRBASE.Caucasus.Sukhumi_Babushara,ZONE:FindByName("Blue Zone 2"):GetCoordinate(),30000,400,90,20)

     -- This one has two squadrons to choose from
     mywing:AddSquadron("Blue Sq3 F16","CAP Sukhumi II",AIRBASE.Caucasus.Sukhumi_Babushara,20,AI.Skill.GOOD,402,"JASDF 6th TFS 43-8526 Skull Riders")
     mywing:AddSquadron("Blue Sq2 F15","CAP Sukhumi I",AIRBASE.Caucasus.Sukhumi_Babushara,20,AI.Skill.GOOD,202,"390th Fighter SQN")

Add a tanker (optional)

   -- **Note** If you need different tanker types, i.e. Boom and Drogue, set them up at different AirWings!
   -- Add a tanker point
   mywing:AddPatrolPointTanker(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone Tanker"):GetCoordinate(),20000,280,270,50)
   -- Add a tanker squad - Radio 251 AM, TACAN 51Y
   mywing:AddTankerSquadron("Blue Tanker","Tanker Ops Kutaisi",AIRBASE.Caucasus.Kutaisi,20,AI.Skill.EXCELLENT,602,nil,251,radio.modulation.AM,51)

Add an AWACS (optional)

   -- Add an AWACS point
   mywing:AddPatrolPointAwacs(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone AWACS"):GetCoordinate(),25000,300,270,50)
   -- Add an AWACS squad - Radio 251 AM, TACAN 51Y
   mywing:AddAWACSSquadron("Blue AWACS","AWACS Ops Kutaisi",AIRBASE.Caucasus.Kutaisi,20,AI.Skill.AVERAGE,702,nil,271,radio.modulation.AM)        

Fine-Tuning

Change Defaults

Debug and Monitor

     mywing.debug = true -- log information
     mywing.Monitor = true -- show some statistics on screen

Type(s)

Fields and Methods inherited from EASYGCICAP Description

EASYGCICAP:AddAWACSSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation)

Add an AWACS Squadron to an Airwing of the manager

EASYGCICAP:AddAcceptZone(Zone)

Add a zone to the accepted zones set.

EASYGCICAP:AddAirwing(Airbasename, Alias)

Add an AirWing to the manager

EASYGCICAP:AddPatrolPointAwacs(AirbaseName, Coordinate, Altitude, Speed, Heading, LegLength)

Add an AWACS patrol point to a Wing

EASYGCICAP:AddPatrolPointCAP(AirbaseName, Coordinate, Altitude, Speed, Heading, LegLength)

Add a CAP patrol point to a Wing

EASYGCICAP:AddPatrolPointRecon(AirbaseName, Coordinate, Altitude, Speed, Heading, LegLength)

Add a RECON patrol point to a Wing

EASYGCICAP:AddPatrolPointTanker(AirbaseName, Coordinate, Altitude, Speed, Heading, LegLength)

Add a TANKER patrol point to a Wing

EASYGCICAP:AddReconSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery)

Add a Recon Squadron to an Airwing of the manager

EASYGCICAP:AddRejectZone(Zone)

Add a zone to the rejected zones set.

EASYGCICAP:AddSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery)

Add a Squadron to an Airwing of the manager

EASYGCICAP:AddTankerSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation, TACAN)

Add a Tanker Squadron to an Airwing of the manager

EASYGCICAP.CapFormation

EASYGCICAP.ClassName

EASYGCICAP.DespawnAfterHolding

EASYGCICAP.DespawnAfterLanding

EASYGCICAP.EWRName

EASYGCICAP.GoZoneSet

EASYGCICAP.Intel

EASYGCICAP.ListOfAuftrag

EASYGCICAP.ManagedAW

EASYGCICAP.ManagedCP

EASYGCICAP.ManagedEWR

EASYGCICAP.ManagedREC

EASYGCICAP.ManagedSQ

EASYGCICAP.ManagedTK

EASYGCICAP.MaxAliveMissions

EASYGCICAP.Monitor

EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)

Create a new GCICAP Manager

EASYGCICAP.NoGoZoneSet

EASYGCICAP.ReadyFlightGroups

EASYGCICAP:SetCAPFormation(Formation)

Set CAP formation.

EASYGCICAP:SetCapStartTimeVariation(Start, End)

Set CAP mission start to vary randomly between Start end End seconds.

EASYGCICAP:SetDefaultCAPAlt(Altitude)

Set default CAP Altitude in feet

EASYGCICAP:SetDefaultCAPDirection(Direction)

Set default CAP lieg initial direction in degrees

EASYGCICAP:SetDefaultCAPGrouping(Grouping)

Set default grouping, i.e.

EASYGCICAP:SetDefaultCAPLeg(Leg)

Set default leg length in NM

EASYGCICAP:SetDefaultCAPSpeed(Speed)

Set default CAP Speed in knots

EASYGCICAP:SetDefaultDespawnAfterHolding()

Set default despawning after holding (despawn in air close to AFB).

EASYGCICAP:SetDefaultDespawnAfterLanding()

Set default despawning after landing.

EASYGCICAP:SetDefaultEngageRange(Range)

Set default engage range for intruders detected by CAP flights in NM.

EASYGCICAP:SetDefaultMissionRange(Range)

Set default range planes can fly from their homebase in NM

EASYGCICAP:SetDefaultNumberAlert5Standby(Airframes)

Set default number of airframes standing by for intercept tasks (visible on the airfield)

EASYGCICAP:SetDefaultOverhead(Overhead)

Set default overhead for intercept calculations

EASYGCICAP:SetDefaultRepeatOnFailure(Retries)

Add default repeat attempts if an Intruder intercepts fails.

EASYGCICAP:SetDefaultResurrection(Seconds)

Add default time to resurrect Airwing building if destroyed

EASYGCICAP:SetMaxAliveMissions(Maxiumum)

Set Maximum of alive missions to stop airplanes spamming the map

EASYGCICAP:SetTankerAndAWACSInvisible(Switch)

Set Tanker and AWACS to be invisible to enemy AI eyes

EASYGCICAP.TankerInvisible

EASYGCICAP:_AddAWACSSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation)

(Internal) Add a AWACS Squadron to an Airwing of the manager

EASYGCICAP:_AddAirwing(Airbasename, Alias)

(internal) Create and add another AirWing to the manager

EASYGCICAP:_AddReconSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery)

(Internal) Add a Recon Squadron to an Airwing of the manager

EASYGCICAP:_AddSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation)

(Internal) Add a Squadron to an Airwing of the manager

EASYGCICAP:_AddTankerSquadron(TemplateName, SquadName, AirbaseName, AirFrames, Skill, Modex, Livery, Frequency, Modulation, TACAN)

(Internal) Add a Tanker Squadron to an Airwing of the manager

EASYGCICAP:_AssignIntercept(Cluster)

Here, we'll decide if we need to launch an intercepting flight, and from where

EASYGCICAP:_CreateAirwings()

(Internal) Create actual AirWings from the list

EASYGCICAP:_CreateSquads()

(Internal) Create actual Squadrons from the list

EASYGCICAP:_SetAwacsPatrolPoints()

(Internal) Set actual Awacs Points from the list

EASYGCICAP:_SetCAPPatrolPoints()

(Internal) Set actual PatrolPoints from the list

EASYGCICAP:_SetReconPatrolPoints()

(Internal) Set actual PatrolPoints from the list

EASYGCICAP:_SetTankerPatrolPoints()

(Internal) Set actual Tanker Points from the list

EASYGCICAP:_StartIntel()

(Internal) Start detection.

EASYGCICAP:_TryAssignIntercept(ReadyFlightGroups, InterceptAuftrag, Group, WingSize)

(Internal) Try to assign the intercept to a FlightGroup already in air and ready.

EASYGCICAP.airbase

EASYGCICAP.airbasename

EASYGCICAP.alias

EASYGCICAP.capOptionVaryEndTime

EASYGCICAP.capOptionVaryStartTime

EASYGCICAP.capalt

EASYGCICAP.capdir

EASYGCICAP.capgrouping

EASYGCICAP.capleg

EASYGCICAP.capspeed

EASYGCICAP.coalition

EASYGCICAP.coalitionname

EASYGCICAP.debug

EASYGCICAP.engagerange

EASYGCICAP.lid

EASYGCICAP.maxinterceptsize

EASYGCICAP.missionrange

EASYGCICAP.noalert5

EASYGCICAP:onafterStart(From, Event, To)

(Internal) FSM Function onafterStart

EASYGCICAP:onafterStatus(From, Event, To)

(Internal) FSM Function onafterStatus

EASYGCICAP:onafterStop(From, Event, To)

(Internal) FSM Function onafterStop

EASYGCICAP:onbeforeStatus(From, Event, To)

(Internal) FSM Function onbeforeStatus

EASYGCICAP.overhead

EASYGCICAP.repeatsonfailure

EASYGCICAP.resurrection

EASYGCICAP.version

EASYGCICAP class version.

EASYGCICAP.wings

Fields and Methods inherited from FSM Description

EASYGCICAP:AddEndState(State)

Adds an End state.

EASYGCICAP:AddProcess(From, Event, Process, ReturnEvents)

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

EASYGCICAP:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

EASYGCICAP:AddScoreProcess(From, Event, State, ScoreText, Score)

Adds a score for the FSM_PROCESS to be achieved.

EASYGCICAP:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

EASYGCICAP.CallScheduler

EASYGCICAP.Events

EASYGCICAP:GetCurrentState()

Get current state.

EASYGCICAP:GetEndStates()

Returns the End states.

EASYGCICAP:GetProcess(From, Event)

EASYGCICAP:GetProcesses()

Returns a table of the SubFSM rules defined within the FSM.

EASYGCICAP:GetScores()

Returns a table with the scores defined.

EASYGCICAP:GetStartState()

Returns the start state of the FSM.

EASYGCICAP:GetState()

Get current state.

EASYGCICAP:GetSubs()

Returns a table with the Subs defined.

EASYGCICAP:GetTransitions()

Returns a table of the transition rules defined within the FSM.

EASYGCICAP:Is(State)

Check if FSM is in state.

EASYGCICAP:LoadCallBacks(CallBackTable)

Load call backs.

EASYGCICAP:New()

Creates a new FSM object.

EASYGCICAP.Scores

EASYGCICAP:SetProcess(From, Event, Fsm)

EASYGCICAP:SetStartState(State)

Sets the start state of the FSM.

EASYGCICAP._EndStates

EASYGCICAP._EventSchedules

EASYGCICAP._Processes

EASYGCICAP._Scores

EASYGCICAP._StartState

EASYGCICAP._Transitions

EASYGCICAP:_add_to_map(Map, Event)

Add to map.

EASYGCICAP:_call_handler(step, trigger, params, EventName)

Call handler.

EASYGCICAP:_create_transition(EventName)

Create transition.

EASYGCICAP:_delayed_transition(EventName)

Delayed transition.

EASYGCICAP:_eventmap(Events, EventStructure)

Event map.

EASYGCICAP:_gosub(ParentFrom, ParentEvent)

Go sub.

EASYGCICAP:_handler(EventName, ...)

Handler.

EASYGCICAP:_isendstate(Current)

Is end state.

EASYGCICAP:_submap(subs, sub, name)

Sub maps.

EASYGCICAP:can(e)

Check if can do an event.

EASYGCICAP:cannot(e)

Check if cannot do an event.

EASYGCICAP.current

EASYGCICAP.endstates

EASYGCICAP:is(State, state)

Check if FSM is in state.

EASYGCICAP.options

EASYGCICAP.subs

Fields and Methods inherited from EASYGCICAP.Wing Description

EASYGCICAP.Wing.AirbaseName

EASYGCICAP.Wing.Alias

EASYGCICAP.Wing.CapZoneName

EASYGCICAP Class

Field(s)

#list<Ops.Auftrag#AUFTRAG> EASYGCICAP.ListOfAuftrag
#boolean EASYGCICAP.debug
EASYGCICAP.lid

Set some string id for output to DCS.log file.

#string EASYGCICAP.version

EASYGCICAP class version.

Function(s)

Add an AWACS Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio Frequency to be used.

#number Modulation

(optional) Radio Modulation to be used, e.g. radio.modulation.AM or radio.modulation.FM

Return value:

self

Add a zone to the accepted zones set.

Defined in:

EASYGCICAP

Parameter:

Return value:

self

Add an AirWing to the manager

Defined in:

EASYGCICAP

Parameters:

#string Airbasename

#string Alias

Return value:

self

Add an AWACS patrol point to a Wing

Defined in:

EASYGCICAP

Parameters:

#string AirbaseName

Name of the Wing's airbase

#number Altitude

Defaults to 25000 feet.

#number Speed

Defaults to 300 knots.

#number Heading

Defaults to 90 degrees (East).

#number LegLength

Defaults to 15 NM.

Return value:

self

Add a CAP patrol point to a Wing

Defined in:

EASYGCICAP

Parameters:

#string AirbaseName

Name of the Wing's airbase

#number Altitude

Defaults to 25000 feet ASL.

#number Speed

Defaults to 300 knots TAS.

#number Heading

Defaults to 90 degrees (East).

#number LegLength

Defaults to 15 NM.

Return value:

self

Add a RECON patrol point to a Wing

Defined in:

EASYGCICAP

Parameters:

#string AirbaseName

Name of the Wing's airbase

#number Altitude

Defaults to 25000 feet.

#number Speed

Defaults to 300 knots.

#number Heading

Defaults to 90 degrees (East).

#number LegLength

Defaults to 15 NM.

Return value:

self

Add a TANKER patrol point to a Wing

Defined in:

EASYGCICAP

Parameters:

#string AirbaseName

Name of the Wing's airbase

#number Altitude

Defaults to 25000 feet.

#number Speed

Defaults to 300 knots.

#number Heading

Defaults to 90 degrees (East).

#number LegLength

Defaults to 15 NM.

Return value:

self

Add a Recon Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

Return value:

self

Add a zone to the rejected zones set.

Defined in:

EASYGCICAP

Parameter:

Return value:

self

Add a Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

Return value:

self

Add a Tanker Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio Frequency to be used.

#number Modulation

(optional) Radio Modulation to be used, e.g. radio.modulation.AM or radio.modulation.FM

#number TACAN

(optional) TACAN channel, e.g. 71, resulting in Channel 71Y

Return value:

self

Create a new GCICAP Manager

Defined in:

EASYGCICAP

Parameters:

#string Alias

A Name for this GCICAP

#string AirbaseName

Name of the Home Airbase

#string Coalition

Coalition, e.g. "blue" or "red"

#string EWRName

(Partial) group name of the EWR system of the coalition, e.g. "Red EWR"

Return value:

self

Set CAP formation.

Defined in:

EASYGCICAP

Parameter:

#number Formation

Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group

Return value:

self

Set CAP mission start to vary randomly between Start end End seconds.

Defined in:

EASYGCICAP

Parameters:

#number Start

#number End

Return value:

self

Set default CAP Altitude in feet

Defined in:

EASYGCICAP

Parameter:

#number Altitude

Altitude defaults to 25000

Return value:

self

Set default CAP lieg initial direction in degrees

Defined in:

EASYGCICAP

Parameter:

#number Direction

Direction defaults to 90 (East)

Return value:

self

Set default grouping, i.e.

how many airplanes per CAP point

Defined in:

EASYGCICAP

Parameter:

#number Grouping

Grouping defaults to 2

Return value:

self

Set default leg length in NM

Defined in:

EASYGCICAP

Parameter:

#number Leg

Leg defaults to 15

Return value:

self

Set default CAP Speed in knots

Defined in:

EASYGCICAP

Parameter:

#number Speed

Speed defaults to 300

Return value:

self

Set default despawning after holding (despawn in air close to AFB).

Defined in:

EASYGCICAP

Return value:

self

Set default despawning after landing.

Defined in:

EASYGCICAP

Return value:

self

Set default engage range for intruders detected by CAP flights in NM.

Defined in:

EASYGCICAP

Parameter:

#number Range

defaults to 50NM

Return value:

self

Set default range planes can fly from their homebase in NM

Defined in:

EASYGCICAP

Parameter:

#number Range

Range defaults to 100 NM

Return value:

self

Set default number of airframes standing by for intercept tasks (visible on the airfield)

Defined in:

EASYGCICAP

Parameter:

#number Airframes

defaults to 2

Return value:

self

Set default overhead for intercept calculations

Defined in:

EASYGCICAP

Parameter:

#number Overhead

The overhead to use.

Return value:

self

Usage:

Either a CAP Plane or a newly spawned GCI plane will take care of intruders. Standard overhead is 0.75, i.e. a group of 3 intrudes will
be managed by 2 planes from the assigned AirWing. There is an maximum missions limitation per AirWing, so we do not spam the skies.

Add default repeat attempts if an Intruder intercepts fails.

Defined in:

EASYGCICAP

Parameter:

#number Retries

Retries, defaults to 3

Return value:

self

Add default time to resurrect Airwing building if destroyed

Defined in:

EASYGCICAP

Parameter:

#number Seconds

Seconds, defaults to 900

Return value:

self

Set Maximum of alive missions to stop airplanes spamming the map

Defined in:

EASYGCICAP

Parameter:

#number Maxiumum

Maxmimum number of parallel missions allowed. Count is Cap-Missions + Intercept-Missions + Alert5-Missionsm default is 6

Return value:

self

Set Tanker and AWACS to be invisible to enemy AI eyes

Defined in:

EASYGCICAP

Parameter:

#boolean Switch

Set to true or false, by default this is set to true already

Return value:

self

(Internal) Add a AWACS Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio frequency of the AWACS

#number Modulation

(Optional) Radio modulation of the AWACS

Return value:

self

(internal) Create and add another AirWing to the manager

Defined in:

EASYGCICAP

Parameters:

#string Airbasename

#string Alias

Return value:

self

(Internal) Add a Recon Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

Return value:

self

(Internal) Add a Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio Frequency to be used.

#number Modulation

(optional) Radio Modulation to be used, e.g. radio.modulation.AM or radio.modulation.FM

Return value:

self

(Internal) Add a Tanker Squadron to an Airwing of the manager

Defined in:

EASYGCICAP

Parameters:

#string TemplateName

Name of the group template.

#string SquadName

Squadron name - must be unique!

#string AirbaseName

Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi

#number AirFrames

Number of available airframes, e.g. 20.

#string Skill

optional) Skill level, e.g. AI.Skill.AVERAGE

#string Modex

(optional) Modex to be used,e.g. 402.

#string Livery

(optional) Livery name to be used.

#number Frequency

(optional) Radio frequency of the Tanker

#number Modulation

(Optional) Radio modulation of the Tanker

#number TACAN

(Optional) TACAN Channel to be used, will always be an "Y" channel

Return value:

self

Here, we'll decide if we need to launch an intercepting flight, and from where

Defined in:

EASYGCICAP

Parameter:

Return value:

self

(Internal) Create actual AirWings from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Create actual Squadrons from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Set actual Awacs Points from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Set actual PatrolPoints from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Set actual PatrolPoints from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Set actual Tanker Points from the list

Defined in:

EASYGCICAP

Return value:

self

(Internal) Start detection.

Defined in:

EASYGCICAP

Return value:

self

(Internal) Try to assign the intercept to a FlightGroup already in air and ready.

Defined in:

EASYGCICAP

Parameters:

#table ReadyFlightGroups

ReadyFlightGroups

Ops.Auftrag#AUFTRAG InterceptAuftrag

The Auftrag

The Target

#number WingSize

Calculated number of Flights

Return values:

#boolean:

assigned

#number:

leftover

(Internal) FSM Function onafterStart

Defined in:

EASYGCICAP

Parameters:

#string From

#string Event

#string To

Return value:

self

(Internal) FSM Function onafterStatus

Defined in:

EASYGCICAP

Parameters:

#string From

#string Event

#string To

Return value:

self

(Internal) FSM Function onafterStop

Defined in:

EASYGCICAP

Parameters:

#string From

#string Event

#string To

Return value:

self

(Internal) FSM Function onbeforeStatus

Defined in:

EASYGCICAP

Parameters:

#string From

#string Event

#string To

Return value:

self

Field(s)

#list<Ops.Auftrag#AUFTRAG> EASYGCICAP.ListOfAuftrag
#boolean EASYGCICAP.debug
EASYGCICAP.lid

Set some string id for output to DCS.log file.

#string EASYGCICAP.version

EASYGCICAP class version.

Function(s)

Adds an End state.

Defined in:

Parameter:

#string State

The FSM state.

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

An sub-process FSM.

#table ReturnEvents

A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

Return value:

The SubFSM.

Adds a score for the FSM to be achieved.

Defined in:

Parameters:

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Adds a score for the FSM_PROCESS to be achieved.

Defined in:

Parameters:

#string From

is the From State of the main process.

#string Event

is the Event of the main process.

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Add a new transition rule to the FSM.

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

#string To

The To state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns the End states.

Defined in:

Return value:

#table:

End states.

Defined in:

Parameters:

From

Event

Returns a table of the SubFSM rules defined within the FSM.

Defined in:

Return value:

#table:

Sub processes.

Returns a table with the scores defined.

Defined in:

Return value:

#table:

Scores.

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns a table with the Subs defined.

Defined in:

Return value:

#table:

Sub processes.

Returns a table of the transition rules defined within the FSM.

Defined in:

Return value:

#table:

Transitions.

Check if FSM is in state.

Defined in:

Parameter:

#string State

State name.

Return value:

#boolean:

If true, FSM is in this state.

Load call backs.

Defined in:

Parameter:

#table CallBackTable

Table of call backs.

Creates a new FSM object.

Defined in:

Return value:

#FSM:

Defined in:

Parameters:

From

Event

Fsm

Sets the start state of the FSM.

Defined in:

Parameter:

#string State

A string defining the start state.

Add to map.

Defined in:

Parameters:

#table Map

Map.

#table Event

Event table.

Call handler.

Defined in:

Parameters:

#string step

Step "onafter", "onbefore", "onenter", "onleave".

#string trigger

Trigger.

#table params

Parameters.

#string EventName

Event name.

Return value:

Value.

Create transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Delayed transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Event map.

Defined in:

Parameters:

#table Events

Events.

#table EventStructure

Event structure.

Go sub.

Defined in:

Parameters:

#string ParentFrom

Parent from state.

#string ParentEvent

Parent event name.

Return value:

#table:

Subs.

Handler.

Defined in:

Parameters:

#string EventName

Event name.

...

Arguments.

Is end state.

Defined in:

Parameter:

#string Current

Current state name.

Return values:

#table:

FSM parent.

#string:

Event name.

Sub maps.

Defined in:

Parameters:

#table subs

Subs.

#table sub

Sub.

#string name

Name.

Check if can do an event.

Defined in:

Parameter:

#string e

Event name.

Return values:

#boolean:

If true, FSM can do the event.

#string:

To state.

Check if cannot do an event.

Defined in:

Parameter:

#string e

Event name.

Return value:

#boolean:

If true, FSM cannot do the event.

Check if FSM is in state.

Defined in:

Parameters:

#string State

State name.

state

Return value:

#boolean:

If true, FSM is in this state.

Internal Wing data type

Field(s)

Function(s)