MOOSE/docs/Documentation/AI_A2A_Dispatcher.html
2017-06-22 22:13:31 +02:00

3654 lines
112 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div>
<div id="main">
<div id="navigation">
<h2>Modules</h2>
<ul><li>
<a href="index.html">index</a>
</li></ul>
<ul>
<li><a href="AI_A2A.html">AI_A2A</a></li>
<li><a href="AI_A2A_Cap.html">AI_A2A_Cap</a></li>
<li>AI_A2A_Dispatcher</li>
<li><a href="AI_A2A_GCI.html">AI_A2A_GCI</a></li>
<li><a href="AI_A2A_Patrol.html">AI_A2A_Patrol</a></li>
<li><a href="AI_Bai.html">AI_Bai</a></li>
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
<li><a href="AI_Cap.html">AI_Cap</a></li>
<li><a href="AI_Cas.html">AI_Cas</a></li>
<li><a href="AI_Formation.html">AI_Formation</a></li>
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
<li><a href="Account.html">Account</a></li>
<li><a href="Airbase.html">Airbase</a></li>
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
<li><a href="Assign.html">Assign</a></li>
<li><a href="Base.html">Base</a></li>
<li><a href="Cargo.html">Cargo</a></li>
<li><a href="CleanUp.html">CleanUp</a></li>
<li><a href="Client.html">Client</a></li>
<li><a href="CommandCenter.html">CommandCenter</a></li>
<li><a href="Controllable.html">Controllable</a></li>
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
<li><a href="DCSCommand.html">DCSCommand</a></li>
<li><a href="DCSController.html">DCSController</a></li>
<li><a href="DCSGroup.html">DCSGroup</a></li>
<li><a href="DCSObject.html">DCSObject</a></li>
<li><a href="DCSTask.html">DCSTask</a></li>
<li><a href="DCSTypes.html">DCSTypes</a></li>
<li><a href="DCSUnit.html">DCSUnit</a></li>
<li><a href="DCSVec3.html">DCSVec3</a></li>
<li><a href="DCSWorld.html">DCSWorld</a></li>
<li><a href="DCSZone.html">DCSZone</a></li>
<li><a href="DCScountry.html">DCScountry</a></li>
<li><a href="DCStimer.html">DCStimer</a></li>
<li><a href="DCStrigger.html">DCStrigger</a></li>
<li><a href="Database.html">Database</a></li>
<li><a href="Designate.html">Designate</a></li>
<li><a href="Detection.html">Detection</a></li>
<li><a href="DetectionManager.html">DetectionManager</a></li>
<li><a href="Escort.html">Escort</a></li>
<li><a href="Event.html">Event</a></li>
<li><a href="Fsm.html">Fsm</a></li>
<li><a href="Group.html">Group</a></li>
<li><a href="Identifiable.html">Identifiable</a></li>
<li><a href="Menu.html">Menu</a></li>
<li><a href="Message.html">Message</a></li>
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
<li><a href="Mission.html">Mission</a></li>
<li><a href="Movement.html">Movement</a></li>
<li><a href="Object.html">Object</a></li>
<li><a href="Point.html">Point</a></li>
<li><a href="Positionable.html">Positionable</a></li>
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Radio.html">Radio</a></li>
<li><a href="Route.html">Route</a></li>
<li><a href="Scenery.html">Scenery</a></li>
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>
<li><a href="Set.html">Set</a></li>
<li><a href="Settings.html">Settings</a></li>
<li><a href="Smoke.html">Smoke</a></li>
<li><a href="Spawn.html">Spawn</a></li>
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
<li><a href="Spot.html">Spot</a></li>
<li><a href="Static.html">Static</a></li>
<li><a href="StaticObject.html">StaticObject</a></li>
<li><a href="Task.html">Task</a></li>
<li><a href="Task_A2A.html">Task_A2A</a></li>
<li><a href="Task_A2A_Dispatcher.html">Task_A2A_Dispatcher</a></li>
<li><a href="Task_A2G.html">Task_A2G</a></li>
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
<li><a href="Unit.html">Unit</a></li>
<li><a href="Utils.html">Utils</a></li>
<li><a href="Zone.html">Zone</a></li>
<li><a href="env.html">env</a></li>
<li><a href="land.html">land</a></li>
<li><a href="routines.html">routines</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>AI_A2A_Dispatcher</code></h1>
<p><strong>AI</strong> - The AI<em>A2A</em>DISPATCHER creates an automatic A2A defense system based on an EWR network targets and coordinating CAP and GCI.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia1.JPG" alt="Banner Image"/></p>
<hr/>
<h3>Authors: <strong>Sven Van de Velde (FlightControl)</strong> rework of GCICAP + introduction of new concepts (squadrons).</h3>
<h3>Authors: <strong>Stonehouse</strong>, <strong>SNAFU</strong> in terms of the advice, documentation, and the original GCICAP script.</h3>
<h3>Contributions:</h3>
<hr/>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#AI_A2A_DISPATCHER">AI_A2A_DISPATCHER</a></td>
<td class="summary">
<h1>AI_A2A_DISPATCHER class, extends <a href="Tasking.html##(DETECTION_MANAGER)">Tasking#DETECTION_MANAGER</a></h1>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia1.JPG" alt="Banner Image"/></p>
<p>The <a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a> class is designed to create an automatic air defence system for a coalition.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#AI_A2A_DISPATCHER_GCICAP">AI_A2A_DISPATCHER_GCICAP</a></td>
<td class="summary">
<h1>AI_A2A_DISPATCHER_GCICAP class, extends <a href="AI.html##(AI_A2A_DISPATCHER)">AI#AI<em>A2A</em>DISPATCHER</a></h1>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia1.JPG" alt="Banner Image"/></p>
<p>The <a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a> class is designed to create an automatic air defence system for a coalition.</p>
</td>
</tr>
</table>
<h2><a id="#(AI_A2A_DISPATCHER)">Type <code>AI_A2A_DISPATCHER</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).AddDefenderToSquadron">AI_A2A_DISPATCHER:AddDefenderToSquadron(Squadron, Defender)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).CAP">AI_A2A_DISPATCHER:CAP()</a></td>
<td class="summary">
<p>CAP Trigger for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).CanCAP">AI_A2A_DISPATCHER:CanCAP(SquadronName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).CanGCI">AI_A2A_DISPATCHER:CanGCI(SquadronName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).ClearDefenderTask">AI_A2A_DISPATCHER:ClearDefenderTask(Defender)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).ClearDefenderTaskTarget">AI_A2A_DISPATCHER:ClearDefenderTaskTarget(Defender)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).CountCapAirborne">AI_A2A_DISPATCHER:CountCapAirborne(SquadronName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).CountDefendersEngaged">AI_A2A_DISPATCHER:CountDefendersEngaged(Target)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).CountDefendersToBeEngaged">AI_A2A_DISPATCHER:CountDefendersToBeEngaged(DetectedItem, DefenderCount)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).DefenderSpawns">AI_A2A_DISPATCHER.DefenderSpawns</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).DefenderSquadrons">AI_A2A_DISPATCHER.DefenderSquadrons</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).DefenderTasks">AI_A2A_DISPATCHER.DefenderTasks</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).Defenders">AI_A2A_DISPATCHER.Defenders</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).Detection">AI_A2A_DISPATCHER.Detection</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).ENGAGE">AI_A2A_DISPATCHER:ENGAGE()</a></td>
<td class="summary">
<p>ENGAGE Trigger for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).EvaluateENGAGE">AI_A2A_DISPATCHER:EvaluateENGAGE(DetectedItem)</a></td>
<td class="summary">
<p>Creates an ENGAGE task when there are human friendlies airborne near the targets.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).EvaluateGCI">AI_A2A_DISPATCHER:EvaluateGCI(DetectedItem, Target)</a></td>
<td class="summary">
<p>Creates an GCI task when there are targets for it.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).EvaluateSWEEP">AI_A2A_DISPATCHER:EvaluateSWEEP(DetectedItem)</a></td>
<td class="summary">
<p>Creates an SWEEP task when there are targets for it.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GCI">AI_A2A_DISPATCHER:GCI()</a></td>
<td class="summary">
<p>GCI Trigger for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GciRadius">AI_A2A_DISPATCHER.GciRadius</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetAIFriendliesNearBy">AI_A2A_DISPATCHER:GetAIFriendliesNearBy(DetectedItem)</a></td>
<td class="summary">
<p>Calculates which AI friendlies are nearby the area</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetCAPDelay">AI_A2A_DISPATCHER:GetCAPDelay(SquadronName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetDefenderTask">AI_A2A_DISPATCHER:GetDefenderTask(Defender)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetDefenderTaskFsm">AI_A2A_DISPATCHER:GetDefenderTaskFsm(Defender)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetDefenderTaskTarget">AI_A2A_DISPATCHER:GetDefenderTaskTarget(Defender)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetDefenderTasks">AI_A2A_DISPATCHER:GetDefenderTasks()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetFriendliesNearBy">AI_A2A_DISPATCHER:GetFriendliesNearBy(DetectedItem, Target)</a></td>
<td class="summary">
<p>Calculates which friendlies are nearby the area</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetPlayerFriendliesNearBy">AI_A2A_DISPATCHER:GetPlayerFriendliesNearBy(DetectedItem)</a></td>
<td class="summary">
<p>Calculates which HUMAN friendlies are nearby the area</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetSquadron">AI_A2A_DISPATCHER:GetSquadron(SquadronName)</a></td>
<td class="summary">
<p>Get an item from the Squadron table.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetSquadronFromDefender">AI_A2A_DISPATCHER:GetSquadronFromDefender(Defender)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetSquadronLanding">AI_A2A_DISPATCHER:GetSquadronLanding(SquadronName)</a></td>
<td class="summary">
<p>Gets the method at which flights will land and despawn as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).GetSquadronTakeoff">AI_A2A_DISPATCHER:GetSquadronTakeoff(SquadronName)</a></td>
<td class="summary">
<p>Gets the method at which new flights will spawn and take-off as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).Landing">AI_A2A_DISPATCHER.Landing</a></td>
<td class="summary">
<p>Defnes Landing location.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).New">AI_A2A_DISPATCHER:New(Detection, GroupingRadius)</a></td>
<td class="summary">
<p>AI<em>A2A</em>DISPATCHER constructor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnAfterAssign">AI_A2A_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName)</a></td>
<td class="summary">
<p>OnAfter Transition Handler for Event Assign.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnAfterCAP">AI_A2A_DISPATCHER:OnAfterCAP(From, Event, To)</a></td>
<td class="summary">
<p>CAP Handler OnAfter for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnAfterENGAGE">AI_A2A_DISPATCHER:OnAfterENGAGE(From, Event, To)</a></td>
<td class="summary">
<p>ENGAGE Handler OnAfter for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnAfterGCI">AI_A2A_DISPATCHER:OnAfterGCI(From, Event, To)</a></td>
<td class="summary">
<p>GCI Handler OnAfter for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnBeforeCAP">AI_A2A_DISPATCHER:OnBeforeCAP(From, Event, To)</a></td>
<td class="summary">
<p>CAP Handler OnBefore for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnBeforeENGAGE">AI_A2A_DISPATCHER:OnBeforeENGAGE(From, Event, To)</a></td>
<td class="summary">
<p>ENGAGE Handler OnBefore for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnBeforeGCI">AI_A2A_DISPATCHER:OnBeforeGCI(From, Event, To)</a></td>
<td class="summary">
<p>GCI Handler OnBefore for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnEventCrashOrDead">AI_A2A_DISPATCHER:OnEventCrashOrDead(EventData)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnEventEngineShutdown">AI_A2A_DISPATCHER:OnEventEngineShutdown(EventData)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).OnEventLand">AI_A2A_DISPATCHER:OnEventLand(EventData)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).ProcessDetected">AI_A2A_DISPATCHER:ProcessDetected(Detection)</a></td>
<td class="summary">
<p>Assigns A2A AI Tasks in relation to the detected items.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).RemoveDefenderFromSquadron">AI_A2A_DISPATCHER:RemoveDefenderFromSquadron(Squadron, Defender)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SchedulerCAP">AI_A2A_DISPATCHER.SchedulerCAP(AI_A2A_DISPATCHER, SquadronName, self)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetBorderZone">AI_A2A_DISPATCHER:SetBorderZone(BorderZone)</a></td>
<td class="summary">
<p>Define a border area to simulate a <strong>cold war</strong> scenario.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetDefenderTask">AI_A2A_DISPATCHER:SetDefenderTask(Defender, Type, Fsm, Target)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetDefenderTaskTarget">AI_A2A_DISPATCHER:SetDefenderTaskTarget(AIGroup, Defender, Target)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetEngageRadius">AI_A2A_DISPATCHER:SetEngageRadius(EngageRadius)</a></td>
<td class="summary">
<p>Define the radius to engage any target by airborne friendlies, which are executing cap or returning from an intercept mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetGciRadius">AI_A2A_DISPATCHER:SetGciRadius(GciRadius)</a></td>
<td class="summary">
<p>Define the radius to check if a target can be engaged by an ground controlled intercept.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadron">AI_A2A_DISPATCHER:SetSquadron(SquadronName, AirbaseName, SpawnTemplates, Resources)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronCap">AI_A2A_DISPATCHER:SetSquadronCap(SquadronName, Zone, FloorAltitude, CeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, AltType)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronCapInterval">AI_A2A_DISPATCHER:SetSquadronCapInterval(SquadronName, CapLimit, LowInterval, HighInterval, Probability)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronGci">AI_A2A_DISPATCHER:SetSquadronGci(SquadronName, EngageMinSpeed, EngageMaxSpeed)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronGrouping">AI_A2A_DISPATCHER:SetSquadronGrouping(SquadronName, Grouping)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronLanding">AI_A2A_DISPATCHER:SetSquadronLanding(SquadronName, Landing)</a></td>
<td class="summary">
<p>Defines the method at which flights will land and despawn as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronLandingAtEngineShutdown">AI_A2A_DISPATCHER:SetSquadronLandingAtEngineShutdown(SquadronName)</a></td>
<td class="summary">
<p>Sets flights to land and despawn at engine shutdown, as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronLandingAtRunway">AI_A2A_DISPATCHER:SetSquadronLandingAtRunway(SquadronName)</a></td>
<td class="summary">
<p>Sets flights to land and despawn at the runway, as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronLandingNearAirbase">AI_A2A_DISPATCHER:SetSquadronLandingNearAirbase(SquadronName)</a></td>
<td class="summary">
<p>Sets flights to land and despawn near the airbase in the air, as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronOverhead">AI_A2A_DISPATCHER:SetSquadronOverhead(SquadronName, Overhead)</a></td>
<td class="summary">
<p>Defines the amount of extra planes that will take-off as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoff">AI_A2A_DISPATCHER:SetSquadronTakeoff(SquadronName, Takeoff)</a></td>
<td class="summary">
<p>Defines the method at which new flights will spawn and take-off as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffFromParkingCold">AI_A2A_DISPATCHER:SetSquadronTakeoffFromParkingCold(SquadronName)</a></td>
<td class="summary">
<p>Sets flights to take-off from the airbase at a cold location, as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffFromParkingHot">AI_A2A_DISPATCHER:SetSquadronTakeoffFromParkingHot(SquadronName)</a></td>
<td class="summary">
<p>Sets flights to take-off from the airbase at a hot location, as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffFromRunway">AI_A2A_DISPATCHER:SetSquadronTakeoffFromRunway(SquadronName)</a></td>
<td class="summary">
<p>Sets flights to take-off from the runway, as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffInAir">AI_A2A_DISPATCHER:SetSquadronTakeoffInAir(SquadronName)</a></td>
<td class="summary">
<p>Sets flights to take-off in the air, as part of the defense system.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetTacticalDisplay">AI_A2A_DISPATCHER:SetTacticalDisplay(TacticalDisplay)</a></td>
<td class="summary">
<p>Display a tactical report every 30 seconds about which aircraft are:
* Patrolling
* Engaging
* Returning
* Damaged
* Out of Fuel
* ...</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).TacticalDisplay">AI_A2A_DISPATCHER.TacticalDisplay</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).Takeoff">AI_A2A_DISPATCHER.Takeoff</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).__CAP">AI_A2A_DISPATCHER:__CAP(Delay)</a></td>
<td class="summary">
<p>CAP Asynchronous Trigger for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).__ENGAGE">AI_A2A_DISPATCHER:__ENGAGE(Delay)</a></td>
<td class="summary">
<p>ENGAGE Asynchronous Trigger for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).__GCI">AI_A2A_DISPATCHER:__GCI(Delay)</a></td>
<td class="summary">
<p>GCI Asynchronous Trigger for AI<em>A2A</em>DISPATCHER</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).onafterCAP">AI_A2A_DISPATCHER:onafterCAP(From, Event, To, SquadronName)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).onafterENGAGE">AI_A2A_DISPATCHER:onafterENGAGE(From, Event, To, Target, AIGroups)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).onafterGCI">AI_A2A_DISPATCHER:onafterGCI(From, Event, To, Target, DefendersMissing, AIGroups)</a></td>
<td class="summary">
</td>
</tr>
</table>
<h2><a id="#(AI_A2A_DISPATCHER_GCICAP)">Type <code>AI_A2A_DISPATCHER_GCICAP</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER_GCICAP).New">AI_A2A_DISPATCHER_GCICAP:New(<, GroupingRadius, EWRPrefixes)</a></td>
<td class="summary">
<p>AI<em>A2A</em>DISPATCHER_GCICAP constructor.</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(AI_A2A_DISPATCHER)">#AI_A2A_DISPATCHER</a></em>
<a id="AI_A2A_DISPATCHER" >
<strong>AI_A2A_DISPATCHER</strong>
</a>
</dt>
<dd>
<h1>AI_A2A_DISPATCHER class, extends <a href="Tasking.html##(DETECTION_MANAGER)">Tasking#DETECTION_MANAGER</a></h1>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia1.JPG" alt="Banner Image"/></p>
<p>The <a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a> class is designed to create an automatic air defence system for a coalition.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia3.JPG" alt="Banner Image"/></p>
<p>It includes automatic spawning of Combat Air Patrol aircraft (CAP) and Ground Controlled Intercept aircraft (GCI) in response to enemy air movements that are detected by a ground based radar network.
CAP flights will take off and proceed to designated CAP zones where they will remain on station until the ground radars direct them to intercept detected enemy aircraft or they run short of fuel and must return to base (RTB). When a CAP flight leaves their zone to perform an interception or return to base a new CAP flight will spawn to take their place.
If all CAP flights are engaged or RTB then additional GCI interceptors will scramble to intercept unengaged enemy aircraft under ground radar control.
With a little time and with a little work it provides the mission designer with a convincing and completely automatic air defence system.
In short it is a plug in very flexible and configurable air defence module for DCS World.</p>
<p>Note that in order to create a two way A2A defense system, two AI_A2A_DISPATCHER defense system may need to be created, for each coalition one.
This is a good implementation, because maybe in the future, more coalitions may become available in DCS world.</p>
<h2>1. AI_A2A_DISPATCHER constructor:</h2>
<p>The <a href="##(AI_A2A_DISPATCHER).New">AI<em>A2A</em>DISPATCHER.New</a>() method creates a new AI_A2A_DISPATCHER instance.</p>
<h3>1.1. Define the <strong>EWR network</strong>:</h3>
<p>As part of the AI_A2A_DISPATCHER constructor, an EWR network must be given as the first parameter.
An EWR network, or, Early Warning Radar network, is used to early detect potential airborne targets and to understand the position of patrolling targets of the enemy.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia5.JPG" alt="Banner Image"/></p>
<p>Typically EWR networks are setup using 55G6 EWR, 1L13 EWR, Hawk sr and Patriot str ground based radar units.
These radars have different ranges and 55G6 EWR and 1L13 EWR radars are Eastern Bloc units (eg Russia, Ukraine, Georgia) while the Hawk and Patriot radars are Western (eg US).
Additionally, ANY other radar capable unit can be part of the EWR network! Also AWACS airborne units, planes, helicopters can help to detect targets, as long as they have radar.
The position of these units is very important as they need to provide enough coverage
to pick up enemy aircraft as they approach so that CAP and GCI flights can be tasked to intercept them.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia7.JPG" alt="Banner Image"/></p>
<p>Additionally in a hot war situation where the border is no longer respected the placement of radars has a big effect on how fast the war escalates.
For example if they are a long way forward and can detect enemy planes on the ground and taking off
they will start to vector CAP and GCI flights to attack them straight away which will immediately draw a response from the other coalition.
Having the radars further back will mean a slower escalation because fewer targets will be detected and
therefore less CAP and GCI flights will spawn and this will tend to make just the border area active rather than a melee over the whole map.
It all depends on what the desired effect is. </p>
<p>EWR networks are <strong>dynamically constructed</strong>, that is, they form part of the <a href="Functional.html##(DETECTION_BASE)">Functional#DETECTION_BASE</a> object that is given as the input parameter of the AI_A2A_DISPATCHER class.
By defining in a <strong>smart way the names or name prefixes of the groups</strong> with EWR capable units, these groups will be <strong>automatically added or deleted</strong> from the EWR network,
increasing or decreasing the radar coverage of the Early Warning System.</p>
<p>See the following example to setup an EWR network containing EWR stations and AWACS.</p>
<pre><code>-- Define a SET_GROUP object that builds a collection of groups that define the EWR network.
-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR.
DetectionSetGroup = SET_GROUP:New()
DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
DetectionSetGroup:FilterStart()
-- Setup the detection.
Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 )
-- Setup the A2A dispatcher, and initialize it.
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
</code></pre>
<p>The above example creates a SET_GROUP instance, and stores this in the variable (object) <strong>DetectionSetGroup</strong>.
<strong>DetectionSetGroup</strong> is then being configured to filter all active groups with a group name starting with <strong>DF CCCP AWACS</strong> or <strong>DF CCCP EWR</strong> to be included in the Set.
<strong>DetectionSetGroup</strong> is then being ordered to start the dynamic filtering. Note that any destroy or new spawn of a group with the above names will be removed or added to the Set.
Then a new Detection object is created from the class DETECTION_AREAS. A grouping radius of 30000 is choosen, which is 30km.
The <strong>Detection</strong> object is then passed to the <a href="##(AI_A2A_DISPATCHER).New">AI<em>A2A</em>DISPATCHER.New</a>() method to indicate the EWR network configuration and setup the A2A defense detection mechanism.</p>
<h3>2. Define the detected <strong>target grouping radius</strong>:</h3>
<p>The target grouping radius is a property of the Detection object, that was passed to the AI_A2A_DISPATCHER object, but can be changed.
The grouping radius should not be too small, but also depends on the types of planes and the era of the simulation.
Fast planes like in the 80s, need a larger radius than WWII planes. <br/>
Typically I suggest to use 30000 for new generation planes and 10000 for older era aircraft.</p>
<p>Note that detected targets are constantly re-grouped, that is, when certain detected aircraft are moving further than the group radius, then these aircraft will become a separate
group being detected. This may result in additional GCI being started by the dispatcher! So don't make this value too small!</p>
<h2>3. Set the <strong>Engage radius</strong>:</h2>
<p>Define the radius to engage any target by airborne friendlies, which are executing cap or returning from an intercept mission.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia10.JPG" alt="Banner Image"/></p>
<p>So, if there is a target area detected and reported,
then any friendlies that are airborne near this target area,
will be commanded to (re-)engage that target when available (if no other tasks were commanded).
For example, if 100000 is given as a value, then any friendly that is airborne within 100km from the detected target,
will be considered to receive the command to engage that target area.
You need to evaluate the value of this parameter carefully.
If too small, more intercept missions may be triggered upon detected target areas.
If too large, any airborne cap may not be able to reach the detected target area in time, because it is too far.</p>
<h2>4. Set the <strong>Intercept radius</strong> or <strong>Gci radius</strong>:</h2>
<p>When targets are detected that are still really far off, you don't want the AI<em>A2A</em>DISPATCHER to launch intercepts just yet.
You want it to wait until a certain intercept range is reached, which is the distance of the closest airbase to targer being smaller than the <strong>Gci radius</strong>.
The Gci radius is by default defined as 200km. This value can be overridden using the method <a href="##(AI_A2A_DISPATCHER).SetGciRadius">AI<em>A2A</em>DISPATCHER.SetGciRadius</a>().
Override the default Gci radius when the era of the warfare is early, or, when you don't want to let the AI<em>A2A</em>DISPATCHER react immediately when
a certain border or area is not being crossed.</p>
<h2>5. Set the <strong>borders</strong>:</h2>
<p>According to the tactical and strategic design of the mission broadly decide the shape and extent of red and blue territories.
They should be laid out such that a border area is created between the two coalitions.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia4.JPG" alt="Banner Image"/></p>
<p>Define a border area to simulate a <strong>cold war</strong> scenario and use the method <a href="##(AI_A2A_DISPATCHER).SetBorderZone">AI<em>A2A</em>DISPATCHER.SetBorderZone</a>() to create a border zone for the dispatcher.</p>
<p>A <strong>cold war</strong> is one where CAP aircraft patrol their territory but will not attack enemy aircraft or launch GCI aircraft unless enemy aircraft enter their territory. In other words the EWR may detect an enemy aircraft but will only send aircraft to attack it if it crosses the border.
A <strong>hot war</strong> is one where CAP aircraft will intercept any detected enemy aircraft and GCI aircraft will launch against detected enemy aircraft without regard for territory. In other words if the ground radar can detect the enemy aircraft then it will send CAP and GCI aircraft to attack it.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia9.JPG" alt="Banner Image"/></p>
<p>If its a cold war then the <strong>borders of red and blue territory</strong> need to be defined using a <a href="zone.html">zone</a> object derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>.
If a hot war is chosen then <strong>no borders</strong> actually need to be defined using the helicopter units other than
it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are.
In a hot war the borders are effectively defined by the ground based radar coverage of a coalition.</p>
<h2>6. Squadrons:</h2>
<p>The AI_A2A_DISPATCHER works with <strong>Squadrons</strong>, that need to be defined using the different methods available.</p>
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetSquadron">AI<em>A2A</em>DISPATCHER.SetSquadron</a>() to <strong>setup a new squadron</strong> active at an airfield,
while defining which plane types are being used by the squadron and how many resources are available.</p>
<p>Squadrons:</p>
<ul>
<li>Have name (string) that is the identifier or key of the squadron.</li>
<li>Have specific plane types.</li>
<li>Are located at one airbase.</li>
<li>Have a limited set of resources.</li>
</ul>
<p>The name of the squadron given acts as the <strong>squadron key</strong> in the AI_A2A_DISPATCHER:Squadron...() methods.</p>
<p>Additionally, squadrons have specific configuration options to:</p>
<ul>
<li>Control how new aircraft are taking off from the airfield (in the air, cold, hot, at the runway).</li>
<li>Control how returning aircraft are landing at the airfield (in the air near the airbase, after landing, after engine shutdown).</li>
<li>Control the <strong>grouping</strong> of new aircraft spawned at the airfield. If there is more than one aircraft to be spawned, these may be grouped.</li>
<li>Control the <strong>overhead</strong> or defensive strength of the squadron. Depending on the types of planes and amount of resources, the mission designer can choose to increase or reduce the amount of planes spawned.</li>
</ul>
<p>For performance and bug workaround reasons within DCS, squadrons have different methods to spawn new aircraft or land returning or damaged aircraft.</p>
<h3>6.1. Set squadron take-off methods</h3>
<p>Use the various SetSquadronTakeoff... methods to control how squadrons are taking-off from the airfield:</p>
<ul>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoff">AI<em>A2A</em>DISPATCHER.SetSquadronTakeoff</a>() is the generic configuration method to control takeoff from the air, hot, cold or from the runway. See the method for further details.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffInAir">AI<em>A2A</em>DISPATCHER.SetSquadronTakeoffInAir</a>() will spawn new aircraft from the squadron directly in the air.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffFromParkingCold">AI<em>A2A</em>DISPATCHER.SetSquadronTakeoffFromParkingCold</a>() will spawn new aircraft in without running engines at a parking spot at the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffFromParkingHot">AI<em>A2A</em>DISPATCHER.SetSquadronTakeoffFromParkingHot</a>() will spawn new aircraft in with running engines at a parking spot at the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffFromRunway">AI<em>A2A</em>DISPATCHER.SetSquadronTakeoffFromRunway</a>() will spawn new aircraft at the runway at the airfield.</li>
</ul>
<p>Use these methods to fine-tune for specific airfields that are known to create bottlenecks, or have reduced airbase efficiency.
The more and the longer aircraft need to taxi at an airfield, the more risk there is that:</p>
<ul>
<li>aircraft will stop waiting for each other or for a landing aircraft before takeoff.</li>
<li>aircraft may get into a "dead-lock" situation, where two aircraft are blocking each other.</li>
<li>aircraft may collide at the airbase.</li>
<li>aircraft may be awaiting the landing of a plane currently in the air, but never lands ...</li>
</ul>
<p>Currently within the DCS engine, the airfield traffic coordination is erroneous and contains a lot of bugs.
If you experience while testing problems with aircraft take-off or landing, please use one of the above methods as a solution to workaround these issues!</p>
<h3>6.2. Set squadron landing methods</h3>
<p>In analogy with takeoff, the landing methods are to control how squadrons land at the airfield:</p>
<ul>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronLanding">AI<em>A2A</em>DISPATCHER.SetSquadronLanding</a>() is the generic configuration method to control landing, namely despawn the aircraft near the airfield in the air, right after landing, or at engine shutdown.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronLandingNearAirbase">AI<em>A2A</em>DISPATCHER.SetSquadronLandingNearAirbase</a>() will despawn the returning aircraft in the air when near the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronLandingAtRunway">AI<em>A2A</em>DISPATCHER.SetSquadronLandingAtRunway</a>() will despawn the returning aircraft directly after landing at the runway.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronLandingAtEngineShutdown">AI<em>A2A</em>DISPATCHER.SetSquadronLandingAtEngineShutdown</a>() will despawn the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines.</li>
</ul>
<p>You can use these methods to minimize the airbase coodination overhead and to increase the airbase efficiency.
When there are lots of aircraft returning for landing, at the same airbase, the takeoff process will be halted, which can cause a complete failure of the
A2A defense system, as no new CAP or GCI planes can takeoff.
Note that the method <a href="##(AI_A2A_DISPATCHER).SetSquadronLandingNearAirbase">AI<em>A2A</em>DISPATCHER.SetSquadronLandingNearAirbase</a>() will only work for returning aircraft, not for damaged or out of fuel aircraft.
Damaged or out-of-fuel aircraft are returning to the nearest friendly airbase and will land, and are out of control from ground control.</p>
<h3>6.3. Set squadron grouping</h3>
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetSquadronGrouping">AI<em>A2A</em>DISPATCHER.SetSquadronGrouping</a>() to set the amount of CAP or GCI flights that will take-off when spawned.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia12.JPG" alt="Banner Image"/></p>
<p>In the case of GCI, the <a href="##(AI_A2A_DISPATCHER).SetSquadronGrouping">AI<em>A2A</em>DISPATCHER.SetSquadronGrouping</a>() method has additional behaviour. When there aren't enough CAP flights airborne, a GCI will be initiated for the remaining
targets to be engaged. Depending on the grouping parameter, the spawned flights for GCI are grouped into this setting. <br/>
For example with a group setting of 2, if 3 targets are detected and cannot be engaged by CAP or any airborne flight,
a GCI needs to be started, the GCI flights will be grouped as follows: Group 1 of 2 flights and Group 2 of one flight!</p>
<p>The <strong>grouping value is set for a Squadron</strong>, and can be <strong>dynamically adjusted</strong> during mission execution, so to adjust the defense flights grouping when the tactical situation changes.</p>
<h3>6.4. Balance or setup effectiveness of the air defenses in case of GCI</h3>
<p>The effectiveness can be set with the <strong>overhead parameter</strong>. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
The <strong>default value</strong> of the overhead parameter is 1.0, which means <strong>equal balance</strong>. </p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia11.JPG" alt="Banner Image"/></p>
<p>However, depending on the (type of) aircraft (strength and payload) in the squadron and the amount of resources available, this parameter can be changed.</p>
<p>The <a href="##(AI_A2A_DISPATCHER).SetOverhead">AI<em>A2A</em>DISPATCHER.SetOverhead</a>() method can be used to tweak the defense strength,
taking into account the plane types of the squadron. </p>
<p>For example, a MIG-31 with full long-distance A2A missiles payload, may still be less effective than a F-15C with short missiles...
So in this case, one may want to use the <a href="##(AI_A2A_DISPATCHER).SetOverhead">AI<em>A2A</em>DISPATCHER.SetOverhead</a>() method to allocate more defending planes as the amount of detected attacking planes.
The overhead must be given as a decimal value with 1 as the neutral value, which means that overhead values: </p>
<ul>
<li>Higher than 1.0, for example 1.5, will increase the defense unit amounts. For 4 planes detected, 6 planes will be spawned.</li>
<li>Lower than 1, for example 0.75, will decrease the defense unit amounts. For 4 planes detected, only 3 planes will be spawned.</li>
</ul>
<p>The amount of defending units is calculated by multiplying the amount of detected attacking planes as part of the detected group
multiplied by the Overhead and rounded up to the smallest integer. </p>
<p>The <strong>overhead value is set for a Squadron</strong>, and can be <strong>dynamically adjusted</strong> during mission execution, so to adjust the defense overhead when the tactical situation changes.</p>
<h2>7. Setup a squadron for CAP</h2>
<h3>7.1. Set the CAP zones</h3>
<p>CAP zones are patrol areas where Combat Air Patrol (CAP) flights loiter until they either return to base due to low fuel or are assigned an interception task by ground control.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia6.JPG" alt="Banner Image"/></p>
<ul>
<li><p>As the CAP flights wander around within the zone waiting to be tasked, these zones need to be large enough that the aircraft are not constantly turning
but do not have to be big and numerous enough to completely cover a border.</p></li>
<li><p>CAP zones can be of any type, and are derived from the <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> class. Zones can be <a href="Zone.html##(ZONE)">Zone#ZONE</a>, <a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a>, <a href="Zone.html##(ZONE_UNIT)">Zone#ZONE_UNIT</a>, <a href="Zone.html##(ZONE_GROUP)">Zone#ZONE_GROUP</a>, etc.
This allows to setup <strong>static, moving and/or complex zones</strong> wherein aircraft will perform the CAP.</p></li>
<li><p>Typically 20000-50000 metres width is used and they are spaced so that aircraft in the zone waiting for tasks dont have to far to travel to protect their coalitions important targets.
These targets are chosen as part of the mission design and might be an important airfield or town etc.
Zone size is also determined somewhat by territory size, plane types
(eg WW2 aircraft might mean smaller zones or more zones because they are slower and take longer to intercept enemy aircraft).</p></li>
<li><p>In a <strong>cold war</strong> it is important to make sure a CAP zone doesnt intrude into enemy territory as otherwise CAP flights will likely cross borders
and spark a full scale conflict which will escalate rapidly.</p></li>
<li><p>CAP flights do not need to be in the CAP zone before they are “on station” and ready for tasking. </p></li>
<li><p>Typically if a CAP flight is tasked and therefore leaves their zone empty while they go off and intercept their target another CAP flight will spawn to take their place.</p></li>
</ul>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia7.JPG" alt="Banner Image"/></p>
<p>The following example illustrates how CAP zones are coded:</p>
<pre><code> -- CAP Squadron execution.
CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
</code></pre>
<p>Note the different <a href="Zone.html">Zone</a> MOOSE classes being used to create zones of different types. Please click the <a href="Zone.html">Zone</a> link for more information about the different zone types.
Zones can be circles, can be setup in the mission editor using trigger zones, but can also be setup in the mission editor as polygons and in this case GROUP objects are being used!</p>
<h2>7.2. Set the squadron to execute CAP:</h2>
<p>The method <a href="##(AI_A2A_DISPATCHER).SetSquadronCap">AI<em>A2A</em>DISPATCHER.SetSquadronCap</a>() defines a CAP execution for a squadron.</p>
<p>Setting-up a CAP zone also requires specific parameters:</p>
<ul>
<li>The minimum and maximum altitude</li>
<li>The minimum speed and maximum patrol speed</li>
<li>The minimum and maximum engage speed</li>
<li>The type of altitude measurement</li>
</ul>
<p>These define how the squadron will perform the CAP while partrolling. Different terrain types requires different types of CAP. </p>
<p>The <a href="##(AI_A2A_DISPATCHER).SetSquadronCapInterval">AI<em>A2A</em>DISPATCHER.SetSquadronCapInterval</a>() method specifies <strong>how much</strong> and <strong>when</strong> CAP flights will takeoff.</p>
<p>It is recommended not to overload the air defense with CAP flights, as these will decrease the performance of the overall system. </p>
<p>For example, the following setup will create a CAP for squadron "Sochi":</p>
<p> A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )</p>
<h2>8. Setup a squadron for GCI:</h2>
<p>The method <a href="##(AI_A2A_DISPATCHER).SetSquadronGci">AI<em>A2A</em>DISPATCHER.SetSquadronGci</a>() defines a GCI execution for a squadron.</p>
<p>Setting-up a GCI readiness also requires specific parameters:</p>
<ul>
<li>The minimum speed and maximum patrol speed</li>
</ul>
<p>Essentially this controls how many flights of GCI aircraft can be active at any time.
Note allowing large numbers of active GCI flights can adversely impact mission performance on low or medium specification hosts/servers.
GCI needs to be setup at strategic airbases. Too far will mean that the aircraft need to fly a long way to reach the intruders,
too short will mean that the intruders may have alraedy passed the ideal interception point!</p>
<p>For example, the following setup will create a GCI for squadron "Sochi":</p>
<p> A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )</p>
<h2>9. Other configuration options</h2>
<h3>9.1. Set a tactical display panel:</h3>
<p>Every 30 seconds, a tactical display panel can be shown that illustrates what the status is of the different groups controlled by AI_A2A_DISPATCHER.
Use the method <a href="##(AI_A2A_DISPATCHER).SetTacticalDisplay">AI<em>A2A</em>DISPATCHER.SetTacticalDisplay</a>() to switch on the tactical display panel. The default will not show this panel.
Note that there may be some performance impact if this panel is shown.</p>
<h2>10. Mission Editor Guide:</h2>
<p>The following steps need to be followed, in order to setup the different borders, templates and groups within the mission editor:</p>
<h3>10.1. Define your EWR network:</h3>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia14.JPG" alt="Banner Image"/></p>
<p>At strategic positions within the battlefield, position the correct groups of units that have radar detection capability in the battlefield.
Create the naming of these groups as such, that these can be easily recognized and included as a prefix within your lua MOOSE mission script.
These prefixes should be unique, so that accidentally no other groups would be incorporated within the EWR network.</p>
<h3>10.2. Define the border zone:</h3>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia15.JPG" alt="Banner Image"/></p>
<p>For a cold war situation, define your border zone.
You can do this in many ways, as the <a href="Zone.html">Zone</a> capability within MOOSE outlines. However, the best practice is to create a ZONE_POLYGON class.
To do this, you need to create a zone using a helicopter group, that is late activated, and has a unique group name.
Place the helicopter where the border zone should start, and draw using the waypoints the polygon zone around the area that is considered the border.
The helicopter group name is included as the reference within your lua MOOSE mission script, so ensure that the name is unique and is easily recognizable.</p>
<h3>10.3. Define the plane templates:</h3>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia16.JPG" alt="Banner Image"/></p>
<p>Define the templates of the planes that define the format of planes that will take part in the A2A defenses of your coalition.
These plane templates will never be activated, but are used to create a diverse airplane portfolio allocated to your squadrons.</p>
<p>IMPORTANT! <strong>Plane templates MUST be of ONE unit, and must have the Late Activated flag switched on!</strong></p>
<p>Plane templates are used to diversify the defending squadrons with:</p>
<ul>
<li>different airplane types</li>
<li>different airplane skins</li>
<li>different skill levels</li>
<li>different weapon payloads</li>
<li>different fuel and other characteristics</li>
</ul>
<p>Place these airplane templates are good visible locations within your mission, so you can easily retrieve them back.</p>
<h3>10.4. Define the CAP zones:</h3>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia17.JPG" alt="Banner Image"/></p>
<p>Similar as with the border zone, define the CAP zones using helicopter group templates. Its waypoints define the polygon zones.
But you can also define other zone types instead, like moving zones.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia18.JPG" alt="Banner Image"/></p>
<p>Or you can define also zones using trigger zones.</p>
<h3>10.5. "Script it":</h3>
<p>Find the following mission script as an example:</p>
<pre><code> -- Define a SET_GROUP object that builds a collection of groups that define the EWR network.
-- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR.
DetectionSetGroup = SET_GROUP:New()
DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
DetectionSetGroup:FilterStart()
-- Here we define detection to be done by area, with a grouping radius of 3000.
Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 )
-- Setup the A2A dispatcher, and initialize it.
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
-- Initialize the dispatcher, setting up a border zone. This is a polygon,
-- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area.
-- Any enemy crossing this border will be engaged.
CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) )
A2ADispatcher:SetBorderZone( { CCCPBorderZone } )
-- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly
-- without an assignment within 100km radius from a detected target, will engage that target.
A2ADispatcher:SetEngageRadius( 300000 )
-- Setup the squadrons.
A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 )
A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 )
A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 )
A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 )
A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 )
-- Setup the overhead
A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 )
A2ADispatcher:SetSquadronOverhead( "Maykop", 1 )
A2ADispatcher:SetSquadronOverhead( "Mozdok", 1.5 )
A2ADispatcher:SetSquadronOverhead( "Sochi", 1 )
A2ADispatcher:SetSquadronOverhead( "Novo", 1 )
-- Setup the Grouping
A2ADispatcher:SetSquadronGrouping( "Mineralnye", 2 )
A2ADispatcher:SetSquadronGrouping( "Sochi", 2 )
A2ADispatcher:SetSquadronGrouping( "Novo", 3 )
-- Setup the Takeoff methods
A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air )
A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" )
A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" )
A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" )
A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" )
-- Setup the Landing methods
A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" )
A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" )
A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" )
A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" )
A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway )
-- CAP Squadron execution.
CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
-- GCI Squadron execution.
A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
</code></pre>
<h4>10.5.1. Script the EWR network</h4>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia20.JPG" alt="Banner Image"/></p>
<h4>10.5.2. Script the AI_A2A_DISPATCHER object and configure it</h4>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia21.JPG" alt="Banner Image"/></p>
<h4>10.5.3. Script the squadrons</h4>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia22.JPG" alt="Banner Image"/></p>
<p>Create the squadrons using the <a href="##(AI_A2A_DISPATCHER).SetSquadron">AI<em>A2A</em>DISPATCHER.SetSquadron</a> objects using:</p>
<ul>
<li><a href="Zone.html##(ZONE)">Zone#ZONE</a> class to create a zone using a trigger zone set in the mission editor.</li>
<li><a href="Zone.html##(ZONE_UNIT)">Zone#ZONE_UNIT</a> class to create a zone around a unit object.</li>
<li><a href="Zone.html##(ZONE_GROUP)">Zone#ZONE_GROUP</a> class to create a zone around a group object.</li>
<li><a href="Zone.html##(ZONE_POLYGON)">Zone#ZONE_POLYGON</a> class to create a polygon zone using a late activated group object.</li>
</ul>
<p>Use the @{#AI<em>A2A</em>DISPATCHER.SetSquadronCap)() method to define CAP execution for the squadron, within the CAP zone defined.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia26.JPG" alt="Banner Image"/></p>
<p>Use the @{#AI<em>A2A</em>DISPATCHER.SetSquadronCapInterval)() method to define how many CAP groups can be airborne at the same time, and the timing intervals.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia27.JPG" alt="Banner Image"/></p>
<p>Use the @{#AI<em>A2A</em>DISPATCHER.SetSquadronGci)() method to define GCI execution for the squadron.</p>
<h2>11. Q &amp; A:</h2>
<h3>11.1. Which countries will be selected for each coalition?</h3>
<p>Which countries are assigned to a coalition influences which units are available to the coalition.
For example because the mission calls for a EWR radar on the blue side the Ukraine might be chosen as a blue country
so that the 55G6 EWR radar unit is available to blue. <br/>
Some countries assign different tasking to aircraft, for example Germany assigns the CAP task to F-4E Phantoms but the USA does not. <br/>
Therefore if F4s are wanted as a coalitions CAP or GCI aircraft Germany will need to be assigned to that coalition. </p>
<h3>11.2. Country, type, load out, skill and skins for CAP and GCI aircraft?</h3>
<ul>
<li>Note these can be from any countries within the coalition but must be an aircraft with one of the main tasks being “CAP”.</li>
<li>Obviously skins which are selected must be available to all players that join the mission otherwise they will see a default skin.</li>
<li>Load outs should be appropriate to a CAP mission eg perhaps drop tanks for CAP flights and extra missiles for GCI flights. </li>
<li>These decisions will eventually lead to template aircraft units being placed as late activation units that the script will use as templates for spawning CAP and GCI flights. Up to 4 different aircraft configurations can be chosen for each coalition. The spawned aircraft will inherit the characteristics of the template aircraft.</li>
<li>The selected aircraft type must be able to perform the CAP tasking for the chosen country. </li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(AI_A2A_DISPATCHER_GCICAP)">#AI_A2A_DISPATCHER_GCICAP</a></em>
<a id="AI_A2A_DISPATCHER_GCICAP" >
<strong>AI_A2A_DISPATCHER_GCICAP</strong>
</a>
</dt>
<dd>
<h1>AI_A2A_DISPATCHER_GCICAP class, extends <a href="AI.html##(AI_A2A_DISPATCHER)">AI#AI<em>A2A</em>DISPATCHER</a></h1>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia1.JPG" alt="Banner Image"/></p>
<p>The <a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a> class is designed to create an automatic air defence system for a coalition.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia3.JPG" alt="Banner Image"/></p>
<p>It includes automatic spawning of Combat Air Patrol aircraft (CAP) and Ground Controlled Intercept aircraft (GCI) in response to enemy air movements that are detected by a ground based radar network.
CAP flights will take off and proceed to designated CAP zones where they will remain on station until the ground radars direct them to intercept detected enemy aircraft or they run short of fuel and must return to base (RTB). When a CAP flight leaves their zone to perform an interception or return to base a new CAP flight will spawn to take their place.
If all CAP flights are engaged or RTB then additional GCI interceptors will scramble to intercept unengaged enemy aircraft under ground radar control.
With a little time and with a little work it provides the mission designer with a convincing and completely automatic air defence system.
In short it is a plug in very flexible and configurable air defence module for DCS World.</p>
<p>Note that in order to create a two way A2A defense system, two AI_A2A_DISPATCHER_GCICAP defense system may need to be created, for each coalition one.
This is a good implementation, because maybe in the future, more coalitions may become available in DCS world.</p>
<h2>1. AI_A2A_DISPATCHER_GCICAP constructor:</h2>
<p>The <a href="##(AI_A2A_DISPATCHER_GCICAP).New">AI<em>A2A</em>DISPATCHER_GCICAP.New</a>() method creates a new AI_A2A_DISPATCHER_GCICAP instance.
There are two parameters required, a list of prefix group names that collects the groups of the EWR network, and a radius in meters,
that will be used to group the detected targets.</p>
<h3>1.1. Define the <strong>EWR network</strong>:</h3>
<p>As part of the AI_A2A_DISPATCHER_GCICAP constructor, a list of prefixes must be given of the group names defined within the mission editor,
that define the EWR network.</p>
<p>An EWR network, or, Early Warning Radar network, is used to early detect potential airborne targets and to understand the position of patrolling targets of the enemy.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia5.JPG" alt="Banner Image"/></p>
<p>Typically EWR networks are setup using 55G6 EWR, 1L13 EWR, Hawk sr and Patriot str ground based radar units.
These radars have different ranges and 55G6 EWR and 1L13 EWR radars are Eastern Bloc units (eg Russia, Ukraine, Georgia) while the Hawk and Patriot radars are Western (eg US).
Additionally, ANY other radar capable unit can be part of the EWR network! Also AWACS airborne units, planes, helicopters can help to detect targets, as long as they have radar.
The position of these units is very important as they need to provide enough coverage
to pick up enemy aircraft as they approach so that CAP and GCI flights can be tasked to intercept them.</p>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia7.JPG" alt="Banner Image"/></p>
<p>Additionally in a hot war situation where the border is no longer respected the placement of radars has a big effect on how fast the war escalates.
For example if they are a long way forward and can detect enemy planes on the ground and taking off
they will start to vector CAP and GCI flights to attack them straight away which will immediately draw a response from the other coalition.
Having the radars further back will mean a slower escalation because fewer targets will be detected and
therefore less CAP and GCI flights will spawn and this will tend to make just the border area active rather than a melee over the whole map.
It all depends on what the desired effect is. </p>
<p>EWR networks are <strong>dynamically maintained</strong>. By defining in a <strong>smart way the names or name prefixes of the groups</strong> with EWR capable units, these groups will be <strong>automatically added or deleted</strong> from the EWR network,
increasing or decreasing the radar coverage of the Early Warning System.</p>
<p>See the following example to setup an EWR network containing EWR stations and AWACS.</p>
<pre><code>-- Setup the A2A GCICAP dispatcher, and initialize it.
A2ADispatcher = AI_A2A_DISPATCHER_GCICAP:New( { "DF CCCP AWACS", "DF CCCP EWR" }, 30000 )
</code></pre>
<p>The above example creates a new AI<em>A2A</em>DISPATCHER_GCICAP instance, and stores this in the variable (object) <strong>A2ADispatcher</strong>.
The first parameter is are the prefixes of the group names that define the EWR network.
The A2A dispatcher will filter all active groups with a group name starting with <strong>DF CCCP AWACS</strong> or <strong>DF CCCP EWR</strong> to be included in the EWR network.</p>
<h3>1.2. Define the detected <strong>target grouping radius</strong>:</h3>
<p>As a second parameter of the <a href="##(AI_A2A_DISPATCHER_GCICAP).New">AI<em>A2A</em>DISPATCHER_GCICAP.New</a>() method, a radius in meters must be given. The radius indicates that detected targets need to be grouped within a radius of 30km.
The grouping radius should not be too small, but also depends on the types of planes and the era of the simulation.
Fast planes like in the 80s, need a larger radius than WWII planes. <br/>
Typically I suggest to use 30000 for new generation planes and 10000 for older era aircraft.</p>
<p>Note that detected targets are constantly re-grouped, that is, when certain detected aircraft are moving further than the group radius, then these aircraft will become a separate
group being detected. This may result in additional GCI being started by the dispatcher! So don't make this value too small!</p>
<h2>2. AI<em>A2A</em>DISPATCHER_DOCUMENTATION is derived from <a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>,</h2>
<p>so all further documentation needs to be consulted in this class
for documentation consistency.</p>
</dd>
</dl>
<h2><a id="#(AI_A2A_Dispatcher)" >Type <code>AI_A2A_Dispatcher</code></a></h2>
<h2><a id="#(AI_A2A_DISPATCHER)" >Type <code>AI_A2A_DISPATCHER</code></a></h2>
<p>AI<em>A2A</em>DISPATCHER class.</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).AddDefenderToSquadron" >
<strong>AI_A2A_DISPATCHER:AddDefenderToSquadron(Squadron, Defender)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Squadron </em></code>: </p>
</li>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).CAP" >
<strong>AI_A2A_DISPATCHER:CAP()</strong>
</a>
</dt>
<dd>
<p>CAP Trigger for AI<em>A2A</em>DISPATCHER</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).CanCAP" >
<strong>AI_A2A_DISPATCHER:CanCAP(SquadronName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The squadron name.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em>
DefenderSquadron</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).CanGCI" >
<strong>AI_A2A_DISPATCHER:CanGCI(SquadronName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The squadron name.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em>
DefenderSquadron</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).ClearDefenderTask" >
<strong>AI_A2A_DISPATCHER:ClearDefenderTask(Defender)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).ClearDefenderTaskTarget" >
<strong>AI_A2A_DISPATCHER:ClearDefenderTaskTarget(Defender)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).CountCapAirborne" >
<strong>AI_A2A_DISPATCHER:CountCapAirborne(SquadronName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> SquadronName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).CountDefendersEngaged" >
<strong>AI_A2A_DISPATCHER:CountDefendersEngaged(Target)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Target </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).CountDefendersToBeEngaged" >
<strong>AI_A2A_DISPATCHER:CountDefendersToBeEngaged(DetectedItem, DefenderCount)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> DetectedItem </em></code>: </p>
</li>
<li>
<p><code><em> DefenderCount </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(AI_A2A_DISPATCHER).DefenderSpawns" >
<strong>AI_A2A_DISPATCHER.DefenderSpawns</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(AI_A2A_DISPATCHER).DefenderSquadrons" >
<strong>AI_A2A_DISPATCHER.DefenderSquadrons</strong>
</a>
</dt>
<dd>
<p> The Defender Squadrons.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(AI_A2A_DISPATCHER).DefenderTasks" >
<strong>AI_A2A_DISPATCHER.DefenderTasks</strong>
</a>
</dt>
<dd>
<p> The Defenders Tasks.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).Defenders" >
<strong>AI_A2A_DISPATCHER.Defenders</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="Functional.Detection.html##(DETECTION_AREAS)">Functional.Detection#DETECTION_AREAS</a></em>
<a id="#(AI_A2A_DISPATCHER).Detection" >
<strong>AI_A2A_DISPATCHER.Detection</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).ENGAGE" >
<strong>AI_A2A_DISPATCHER:ENGAGE()</strong>
</a>
</dt>
<dd>
<p>ENGAGE Trigger for AI<em>A2A</em>DISPATCHER</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).EvaluateENGAGE" >
<strong>AI_A2A_DISPATCHER:EvaluateENGAGE(DetectedItem)</strong>
</a>
</dt>
<dd>
<p>Creates an ENGAGE task when there are human friendlies airborne near the targets.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Functional.Detection.html##(DETECTION_BASE.DetectedItem)">Functional.Detection#DETECTION_BASE.DetectedItem</a> DetectedItem </em></code>: </p>
</li>
</ul>
<h3>Return values</h3>
<ol>
<li>
<p><em><a href="Set.html##(SET_UNIT)">Set#SET_UNIT</a>:</em>
TargetSetUnit: The target set of units.</p>
</li>
<li>
<p><em>#nil:</em>
If there are no targets to be set.</p>
</li>
</ol>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).EvaluateGCI" >
<strong>AI_A2A_DISPATCHER:EvaluateGCI(DetectedItem, Target)</strong>
</a>
</dt>
<dd>
<p>Creates an GCI task when there are targets for it.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Functional.Detection.html##(DETECTION_BASE.DetectedItem)">Functional.Detection#DETECTION_BASE.DetectedItem</a> DetectedItem </em></code>: </p>
</li>
<li>
<p><code><em> Target </em></code>: </p>
</li>
</ul>
<h3>Return values</h3>
<ol>
<li>
<p><em><a href="Set.html##(SET_UNIT)">Set#SET_UNIT</a>:</em>
TargetSetUnit: The target set of units.</p>
</li>
<li>
<p><em>#nil:</em>
If there are no targets to be set.</p>
</li>
</ol>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).EvaluateSWEEP" >
<strong>AI_A2A_DISPATCHER:EvaluateSWEEP(DetectedItem)</strong>
</a>
</dt>
<dd>
<p>Creates an SWEEP task when there are targets for it.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Functional.Detection.html##(DETECTION_BASE.DetectedItem)">Functional.Detection#DETECTION_BASE.DetectedItem</a> DetectedItem </em></code>: </p>
</li>
</ul>
<h3>Return values</h3>
<ol>
<li>
<p><em><a href="Set.html##(SET_UNIT)">Set#SET_UNIT</a>:</em>
TargetSetUnit: The target set of units.</p>
</li>
<li>
<p><em>#nil:</em>
If there are no targets to be set.</p>
</li>
</ol>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GCI" >
<strong>AI_A2A_DISPATCHER:GCI()</strong>
</a>
</dt>
<dd>
<p>GCI Trigger for AI<em>A2A</em>DISPATCHER</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GciRadius" >
<strong>AI_A2A_DISPATCHER.GciRadius</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetAIFriendliesNearBy" >
<strong>AI_A2A_DISPATCHER:GetAIFriendliesNearBy(DetectedItem)</strong>
</a>
</dt>
<dd>
<p>Calculates which AI friendlies are nearby the area</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> DetectedItem </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number, <a href="Core.CommandCenter.html##(REPORT)">Core.CommandCenter#REPORT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetCAPDelay" >
<strong>AI_A2A_DISPATCHER:GetCAPDelay(SquadronName)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The squadron name.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetDefenderTask" >
<strong>AI_A2A_DISPATCHER:GetDefenderTask(Defender)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetDefenderTaskFsm" >
<strong>AI_A2A_DISPATCHER:GetDefenderTaskFsm(Defender)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetDefenderTaskTarget" >
<strong>AI_A2A_DISPATCHER:GetDefenderTaskTarget(Defender)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetDefenderTasks" >
<strong>AI_A2A_DISPATCHER:GetDefenderTasks()</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetFriendliesNearBy" >
<strong>AI_A2A_DISPATCHER:GetFriendliesNearBy(DetectedItem, Target)</strong>
</a>
</dt>
<dd>
<p>Calculates which friendlies are nearby the area</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> DetectedItem </em></code>: </p>
</li>
<li>
<p><code><em> Target </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number, <a href="Core.CommandCenter.html##(REPORT)">Core.CommandCenter#REPORT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetPlayerFriendliesNearBy" >
<strong>AI_A2A_DISPATCHER:GetPlayerFriendliesNearBy(DetectedItem)</strong>
</a>
</dt>
<dd>
<p>Calculates which HUMAN friendlies are nearby the area</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> DetectedItem </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number, <a href="Core.CommandCenter.html##(REPORT)">Core.CommandCenter#REPORT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetSquadron" >
<strong>AI_A2A_DISPATCHER:GetSquadron(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Get an item from the Squadron table.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> SquadronName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetSquadronFromDefender" >
<strong>AI_A2A_DISPATCHER:GetSquadronFromDefender(Defender)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetSquadronLanding" >
<strong>AI_A2A_DISPATCHER:GetSquadronLanding(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Gets the method at which flights will land and despawn as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number:</em>
Landing The landing method which can be NearAirbase, AtRunway, AtEngineShutdown</p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let new flights take-off in the air.
local LandingMethod = Dispatcher:GetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.NearAirbase )
if LandingMethod == AI_A2A_Dispatcher.Landing.NearAirbase then
...
end
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).GetSquadronTakeoff" >
<strong>AI_A2A_DISPATCHER:GetSquadronTakeoff(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Gets the method at which new flights will spawn and take-off as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#number:</em>
Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.</p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let new flights take-off in the air.
local TakeoffMethod = Dispatcher:GetSquadronTakeoff( "SquadronName" )
if TakeOffMethod == , AI_A2A_Dispatcher.Takeoff.InAir then
...
end
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(AI_A2A_DISPATCHER).Landing" >
<strong>AI_A2A_DISPATCHER.Landing</strong>
</a>
</dt>
<dd>
<p>Defnes Landing location.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).New" >
<strong>AI_A2A_DISPATCHER:New(Detection, GroupingRadius)</strong>
</a>
</dt>
<dd>
<p>AI<em>A2A</em>DISPATCHER constructor.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Functional.Detection.html##(DETECTION_BASE)">Functional.Detection#DETECTION_BASE</a> Detection </em></code>:
The DETECTION object that will detects targets using the the Early Warning Radar network.</p>
</li>
<li>
<p><code><em>#number GroupingRadius </em></code>:
The radius in meters wherein detected planes are being grouped as one target area.
For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em>
self</p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Set a new AI A2A Dispatcher object, based on an EWR network with a 6 km grouping radius.
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnAfterAssign" >
<strong>AI_A2A_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName)</strong>
</a>
</dt>
<dd>
<p>OnAfter Transition Handler for Event Assign.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>:
The From State string.</p>
</li>
<li>
<p><code><em>#string Event </em></code>:
The Event string.</p>
</li>
<li>
<p><code><em>#string To </em></code>:
The To State string.</p>
</li>
<li>
<p><code><em><a href="Tasking.Task_A2A.html##(AI_A2A)">Tasking.Task<em>A2A#AI</em>A2A</a> Task </em></code>: </p>
</li>
<li>
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
</li>
<li>
<p><code><em>#string PlayerName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnAfterCAP" >
<strong>AI_A2A_DISPATCHER:OnAfterCAP(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>CAP Handler OnAfter for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnAfterENGAGE" >
<strong>AI_A2A_DISPATCHER:OnAfterENGAGE(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>ENGAGE Handler OnAfter for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnAfterGCI" >
<strong>AI_A2A_DISPATCHER:OnAfterGCI(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>GCI Handler OnAfter for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnBeforeCAP" >
<strong>AI_A2A_DISPATCHER:OnBeforeCAP(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>CAP Handler OnBefore for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnBeforeENGAGE" >
<strong>AI_A2A_DISPATCHER:OnBeforeENGAGE(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>ENGAGE Handler OnBefore for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnBeforeGCI" >
<strong>AI_A2A_DISPATCHER:OnBeforeGCI(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>GCI Handler OnBefore for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnEventCrashOrDead" >
<strong>AI_A2A_DISPATCHER:OnEventCrashOrDead(EventData)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnEventEngineShutdown" >
<strong>AI_A2A_DISPATCHER:OnEventEngineShutdown(EventData)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).OnEventLand" >
<strong>AI_A2A_DISPATCHER:OnEventLand(EventData)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).ProcessDetected" >
<strong>AI_A2A_DISPATCHER:ProcessDetected(Detection)</strong>
</a>
</dt>
<dd>
<p>Assigns A2A AI Tasks in relation to the detected items.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Functional.Detection.html##(DETECTION_BASE)">Functional.Detection#DETECTION_BASE</a> Detection </em></code>:
The detection created by the <a href="Detection.html##(DETECTION_BASE)">Detection#DETECTION_BASE</a> derived object.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
Return true if you want the task assigning to continue... false will cancel the loop.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).RemoveDefenderFromSquadron" >
<strong>AI_A2A_DISPATCHER:RemoveDefenderFromSquadron(Squadron, Defender)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Squadron </em></code>: </p>
</li>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SchedulerCAP" >
<strong>AI_A2A_DISPATCHER.SchedulerCAP(AI_A2A_DISPATCHER, SquadronName, self)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> AI<em>A2A</em>DISPATCHER </em></code>: </p>
</li>
<li>
<p><code><em>#string SquadronName </em></code>:
The squadron name.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetBorderZone" >
<strong>AI_A2A_DISPATCHER:SetBorderZone(BorderZone)</strong>
</a>
</dt>
<dd>
<p>Define a border area to simulate a <strong>cold war</strong> scenario.</p>
<p>A <strong>cold war</strong> is one where CAP aircraft patrol their territory but will not attack enemy aircraft or launch GCI aircraft unless enemy aircraft enter their territory. In other words the EWR may detect an enemy aircraft but will only send aircraft to attack it if it crosses the border.
A <strong>hot war</strong> is one where CAP aircraft will intercept any detected enemy aircraft and GCI aircraft will launch against detected enemy aircraft without regard for territory. In other words if the ground radar can detect the enemy aircraft then it will send CAP and GCI aircraft to attack it.
If its a cold war then the <strong>borders of red and blue territory</strong> need to be defined using a <a href="zone.html">zone</a> object derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>. This method needs to be used for this.
If a hot war is chosen then <strong>no borders</strong> actually need to be defined using the helicopter units other than it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are. In a hot war the borders are effectively defined by the ground based radar coverage of a coalition. Set the noborders parameter to 1</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a> BorderZone </em></code>:
An object derived from ZONE_BASE, that defines a zone between</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Set a polygon zone as the border for the A2A dispatcher.
local BorderZone = ZONE_POLYGON( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -- The GROUP object is a late activate helicopter unit.
Dispatcher:SetBorderZone( BorderZone )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetDefenderTask" >
<strong>AI_A2A_DISPATCHER:SetDefenderTask(Defender, Type, Fsm, Target)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
<li>
<p><code><em> Type </em></code>: </p>
</li>
<li>
<p><code><em> Fsm </em></code>: </p>
</li>
<li>
<p><code><em> Target </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetDefenderTaskTarget" >
<strong>AI_A2A_DISPATCHER:SetDefenderTaskTarget(AIGroup, Defender, Target)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> AIGroup </em></code>: </p>
</li>
<li>
<p><code><em> Defender </em></code>: </p>
</li>
<li>
<p><code><em> Target </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetEngageRadius" >
<strong>AI_A2A_DISPATCHER:SetEngageRadius(EngageRadius)</strong>
</a>
</dt>
<dd>
<p>Define the radius to engage any target by airborne friendlies, which are executing cap or returning from an intercept mission.</p>
<p>So, if there is a target area detected and reported,
then any friendlies that are airborne near this target area,
will be commanded to (re-)engage that target when available (if no other tasks were commanded).
For example, if 100000 is given as a value, then any friendly that is airborne within 100km from the detected target,
will be considered to receive the command to engage that target area.
You need to evaluate the value of this parameter carefully.
If too small, more intercept missions may be triggered upon detected target areas.
If too large, any airborne cap may not be able to reach the detected target area in time, because it is too far.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number EngageRadius </em></code>:
(Optional, Default = 100000) The radius to report friendlies near the target.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Set 50km as the radius to engage any target by airborne friendlies.
Dispatcher:SetEngageRadius( 50000 )
-- Set 100km as the radius to engage any target by airborne friendlies.
Dispatcher:SetEngageRadius() -- 100000 is the default value.
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetGciRadius" >
<strong>AI_A2A_DISPATCHER:SetGciRadius(GciRadius)</strong>
</a>
</dt>
<dd>
<p>Define the radius to check if a target can be engaged by an ground controlled intercept.</p>
<p>So, if there is a target area detected and reported,
and a GCI is to be executed,
then it will be check if the target is within the GCI from the nearest airbase.
For example, if 150000 is given as a value, then any airbase within 150km from the detected target,
will be considered to receive the command to GCI.
You need to evaluate the value of this parameter carefully.
If too small, intercept missions may be triggered too late.
If too large, intercept missions may be triggered when the detected target is too far.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number GciRadius </em></code>:
(Optional, Default = 200000) The radius to ground control intercept detected targets from the nearest airbase.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Set 100km as the radius to ground control intercept detected targets from the nearest airbase.
Dispatcher:SetGciRadius( 100000 )
-- Set 200km as the radius to ground control intercept.
Dispatcher:SetGciRadius() -- 200000 is the default value.
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadron" >
<strong>AI_A2A_DISPATCHER:SetSquadron(SquadronName, AirbaseName, SpawnTemplates, Resources)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> SquadronName </em></code>: </p>
</li>
<li>
<p><code><em> AirbaseName </em></code>: </p>
</li>
<li>
<p><code><em> SpawnTemplates </em></code>: </p>
</li>
<li>
<p><code><em> Resources </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronCap" >
<strong>AI_A2A_DISPATCHER:SetSquadronCap(SquadronName, Zone, FloorAltitude, CeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, AltType)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The squadron name.</p>
</li>
<li>
<p><code><em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a> Zone </em></code>:
The <a href="Zone.html">Zone</a> object derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a> that defines the zone wherein the CAP will be executed.</p>
</li>
<li>
<p><code><em>#number FloorAltitude </em></code>:
The minimum altitude at which the cap can be executed.</p>
</li>
<li>
<p><code><em>#number CeilingAltitude </em></code>:
the maximum altitude at which the cap can be executed.</p>
</li>
<li>
<p><code><em>#number PatrolMinSpeed </em></code>:
The minimum speed at which the cap can be executed.</p>
</li>
<li>
<p><code><em>#number PatrolMaxSpeed </em></code>:
The maximum speed at which the cap can be executed.</p>
</li>
<li>
<p><code><em>#number EngageMinSpeed </em></code>:
The minimum speed at which the engage can be executed.</p>
</li>
<li>
<p><code><em>#number EngageMaxSpeed </em></code>:
The maximum speed at which the engage can be executed.</p>
</li>
<li>
<p><code><em>#number AltType </em></code>:
The altitude type, which is a string "BARO" defining Barometric or "RADIO" defining radio controlled altitude.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- CAP Squadron execution.
CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronCapInterval" >
<strong>AI_A2A_DISPATCHER:SetSquadronCapInterval(SquadronName, CapLimit, LowInterval, HighInterval, Probability)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The squadron name.</p>
</li>
<li>
<p><code><em> CapLimit </em></code>: </p>
</li>
<li>
<p><code><em> LowInterval </em></code>: </p>
</li>
<li>
<p><code><em> HighInterval </em></code>: </p>
</li>
<li>
<p><code><em> Probability </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- CAP Squadron execution.
CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronGci" >
<strong>AI_A2A_DISPATCHER:SetSquadronGci(SquadronName, EngageMinSpeed, EngageMaxSpeed)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The squadron name.</p>
</li>
<li>
<p><code><em>#number EngageMinSpeed </em></code>:
The minimum speed at which the gci can be executed.</p>
</li>
<li>
<p><code><em>#number EngageMaxSpeed </em></code>:
The maximum speed at which the gci can be executed.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- GCI Squadron execution.
A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronGrouping" >
<strong>AI_A2A_DISPATCHER:SetSquadronGrouping(SquadronName, Grouping)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
<li>
<p><code><em>#number Grouping </em></code>:
The level of grouping that will be applied of the CAP or GCI defenders. </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
Dispatcher:SetSquadronGrouping( "SquadronName", 2 )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronLanding" >
<strong>AI_A2A_DISPATCHER:SetSquadronLanding(SquadronName, Landing)</strong>
</a>
</dt>
<dd>
<p>Defines the method at which flights will land and despawn as part of the defense system.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
<li>
<p><code><em>#number Landing </em></code>:
The landing method which can be NearAirbase, AtRunway, AtEngineShutdown</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let new flights take-off in the air.
Dispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.NearAirbase )
-- Let new flights take-off from the runway.
Dispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.AtRunway )
-- Let new flights take-off from the airbase hot.
Dispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.AtEngineShutdown )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronLandingAtEngineShutdown" >
<strong>AI_A2A_DISPATCHER:SetSquadronLandingAtEngineShutdown(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Sets flights to land and despawn at engine shutdown, as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let flights land and despawn at engine shutdown.
Dispatcher:SetSquadronLandingAtEngineShutdown( "SquadronName" )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronLandingAtRunway" >
<strong>AI_A2A_DISPATCHER:SetSquadronLandingAtRunway(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Sets flights to land and despawn at the runway, as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let flights land at the runway and despawn.
Dispatcher:SetSquadronLandingAtRunway( "SquadronName" )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronLandingNearAirbase" >
<strong>AI_A2A_DISPATCHER:SetSquadronLandingNearAirbase(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Sets flights to land and despawn near the airbase in the air, as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let flights land in the air and despawn.
Dispatcher:SetSquadronLandingNearAirbase( "SquadronName" )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronOverhead" >
<strong>AI_A2A_DISPATCHER:SetSquadronOverhead(SquadronName, Overhead)</strong>
</a>
</dt>
<dd>
<p>Defines the amount of extra planes that will take-off as part of the defense system.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
<li>
<p><code><em>#number Overhead </em></code>:
The %-tage of Units that dispatching command will allocate to intercept in surplus of detected amount of units.
The default overhead is 1, so equal balance. The <a href="##(AI_A2A_DISPATCHER).SetOverhead">AI<em>A2A</em>DISPATCHER.SetOverhead</a>() method can be used to tweak the defense strength,
taking into account the plane types of the squadron. For example, a MIG-31 with full long-distance A2A missiles payload, may still be less effective than a F-15C with short missiles...
So in this case, one may want to use the Overhead method to allocate more defending planes as the amount of detected attacking planes.
The overhead must be given as a decimal value with 1 as the neutral value, which means that Overhead values: </p>
<ul>
<li>Higher than 1, will increase the defense unit amounts.</li>
<li>Lower than 1, will decrease the defense unit amounts.</li>
</ul>
<p>The amount of defending units is calculated by multiplying the amount of detected attacking planes as part of the detected group
multiplied by the Overhead and rounded up to the smallest integer. </p>
<p>The Overhead value set for a Squadron, can be programmatically adjusted (by using this SetOverhead method), to adjust the defense overhead during mission execution.</p>
<p>See example below.
</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- An overhead of 1,5 with 1 planes detected, will allocate 2 planes ( 1 * 1,5 ) = 1,5 =&gt; rounded up gives 2.
-- An overhead of 1,5 with 2 planes detected, will allocate 3 planes ( 2 * 1,5 ) = 3 =&gt; rounded up gives 3.
-- An overhead of 1,5 with 3 planes detected, will allocate 5 planes ( 3 * 1,5 ) = 4,5 =&gt; rounded up gives 5 planes.
-- An overhead of 1,5 with 4 planes detected, will allocate 6 planes ( 4 * 1,5 ) = 6 =&gt; rounded up gives 6 planes.
Dispatcher:SetSquadronOverhead( 1,5 )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronTakeoff" >
<strong>AI_A2A_DISPATCHER:SetSquadronTakeoff(SquadronName, Takeoff)</strong>
</a>
</dt>
<dd>
<p>Defines the method at which new flights will spawn and take-off as part of the defense system.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
<li>
<p><code><em>#number Takeoff </em></code>:
From the airbase hot, from the airbase cold, in the air, from the runway.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let new flights take-off in the air.
Dispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Air )
-- Let new flights take-off from the runway.
Dispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Runway )
-- Let new flights take-off from the airbase hot.
Dispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Hot )
-- Let new flights take-off from the airbase cold.
Dispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Cold )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronTakeoffFromParkingCold" >
<strong>AI_A2A_DISPATCHER:SetSquadronTakeoffFromParkingCold(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Sets flights to take-off from the airbase at a cold location, as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let new flights take-off in the air.
Dispatcher:SetSquadronTakeoffFromParkingCold( "SquadronName" )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronTakeoffFromParkingHot" >
<strong>AI_A2A_DISPATCHER:SetSquadronTakeoffFromParkingHot(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Sets flights to take-off from the airbase at a hot location, as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let new flights take-off in the air.
Dispatcher:SetSquadronTakeoffFromParkingHot( "SquadronName" )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronTakeoffFromRunway" >
<strong>AI_A2A_DISPATCHER:SetSquadronTakeoffFromRunway(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Sets flights to take-off from the runway, as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let new flights take-off in the air.
Dispatcher:SetSquadronTakeoffFromRunway( "SquadronName" )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetSquadronTakeoffInAir" >
<strong>AI_A2A_DISPATCHER:SetSquadronTakeoffInAir(SquadronName)</strong>
</a>
</dt>
<dd>
<p>Sets flights to take-off in the air, as part of the defense system.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string SquadronName </em></code>:
The name of the squadron.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- Let new flights take-off in the air.
Dispatcher:SetSquadronTakeoffInAir( "SquadronName" )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetTacticalDisplay" >
<strong>AI_A2A_DISPATCHER:SetTacticalDisplay(TacticalDisplay)</strong>
</a>
</dt>
<dd>
<p>Display a tactical report every 30 seconds about which aircraft are:
* Patrolling
* Engaging
* Returning
* Damaged
* Out of Fuel
* ...</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#boolean TacticalDisplay </em></code>:
Provide a value of <strong>true</strong> to display every 30 seconds a tactical overview.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(AI_A2A_DISPATCHER).TacticalDisplay" >
<strong>AI_A2A_DISPATCHER.TacticalDisplay</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(AI_A2A_DISPATCHER.Takeoff)">#AI_A2A_DISPATCHER.Takeoff</a></em>
<a id="#(AI_A2A_DISPATCHER).Takeoff" >
<strong>AI_A2A_DISPATCHER.Takeoff</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).__CAP" >
<strong>AI_A2A_DISPATCHER:__CAP(Delay)</strong>
</a>
</dt>
<dd>
<p>CAP Asynchronous Trigger for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Delay </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).__ENGAGE" >
<strong>AI_A2A_DISPATCHER:__ENGAGE(Delay)</strong>
</a>
</dt>
<dd>
<p>ENGAGE Asynchronous Trigger for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Delay </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).__GCI" >
<strong>AI_A2A_DISPATCHER:__GCI(Delay)</strong>
</a>
</dt>
<dd>
<p>GCI Asynchronous Trigger for AI<em>A2A</em>DISPATCHER</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Delay </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).onafterCAP" >
<strong>AI_A2A_DISPATCHER:onafterCAP(From, Event, To, SquadronName)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> From </em></code>: </p>
</li>
<li>
<p><code><em> Event </em></code>: </p>
</li>
<li>
<p><code><em> To </em></code>: </p>
</li>
<li>
<p><code><em> SquadronName </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).onafterENGAGE" >
<strong>AI_A2A_DISPATCHER:onafterENGAGE(From, Event, To, Target, AIGroups)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> From </em></code>: </p>
</li>
<li>
<p><code><em> Event </em></code>: </p>
</li>
<li>
<p><code><em> To </em></code>: </p>
</li>
<li>
<p><code><em> Target </em></code>: </p>
</li>
<li>
<p><code><em> AIGroups </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).onafterGCI" >
<strong>AI_A2A_DISPATCHER:onafterGCI(From, Event, To, Target, DefendersMissing, AIGroups)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> From </em></code>: </p>
</li>
<li>
<p><code><em> Event </em></code>: </p>
</li>
<li>
<p><code><em> To </em></code>: </p>
</li>
<li>
<p><code><em> Target </em></code>: </p>
</li>
<li>
<p><code><em> DefendersMissing </em></code>: </p>
</li>
<li>
<p><code><em> AIGroups </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<h2><a id="#(AI_A2A_DISPATCHER.Takeoff)" >Type <code>AI_A2A_DISPATCHER.Takeoff</code></a></h2>
<p>Enumerator for spawns at airbases</p>
<h2><a id="#(AI_A2A_DISPATCHER_GCICAP)" >Type <code>AI_A2A_DISPATCHER_GCICAP</code></a></h2>
<p>AI<em>A2A</em>DISPATCHER_GCICAP class.</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER_GCICAP).New" >
<strong>AI_A2A_DISPATCHER_GCICAP:New(<, GroupingRadius, EWRPrefixes)</strong>
</a>
</dt>
<dd>
<p>AI<em>A2A</em>DISPATCHER_GCICAP constructor.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="##(list)">#list</a> &lt; </em></code>:
string> EWRPrefixes A list of prefixes that of groups that setup the Early Warning Radar network.</p>
</li>
<li>
<p><code><em>#number GroupingRadius </em></code>:
The radius in meters wherein detected planes are being grouped as one target area.
For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.</p>
</li>
<li>
<p><code><em> EWRPrefixes </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER_GCICAP)">#AI<em>A2A</em>DISPATCHER_GCICAP</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Set a new AI A2A Dispatcher object, based on an EWR network with a 30 km grouping radius
-- This for ground and awacs installations.
A2ADispatcher = AI_A2A_DISPATCHER_GCICAP:New( { "BlueEWRGroundRadars", "BlueEWRAwacs" }, 30000 )
</code></pre>
</dd>
</dl>
<h2><a id="#(list)" >Type <code>list</code></a></h2>
</div>
</div>
</body>
</html>