Banner Image

Module AI.AI_A2A_Gci

AI - Models the process of Ground Controlled Interception (GCI) for airplanes.

This is a class used in the AI.AI_A2A_Dispatcher.


Author: FlightControl


Global(s)

Global AI_A2A_GCI

Implements the core functions to intercept intruders.

#AI_A2A_GCI AI_A2A_GCI

Implements the core functions to intercept intruders.

Use the Engage trigger to intercept intruders.

The AI_A2A_GCI is assigned a Wrapper.Group and this must be done before the AI_A2A_GCI process can be started using the Start event.

The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

This cycle will continue.

During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

When enemies are detected, the AI will automatically engage the enemy.

Until a fuel or damage threshold has been reached by the AI, or when the AI is commanded to RTB. When the fuel threshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

1. AI_A2A_GCI constructor

2. AI_A2A_GCI is a FSM

2.1 AI_A2A_GCI States

  • None ( Group ): The process is not started yet.
  • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
  • Engaging ( Group ): The AI is engaging the bogeys.
  • Returning ( Group ): The AI is returning to Base..

2.2 AI_A2A_GCI Events

Developer Note

Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE Therefore, this class is considered to be deprecated


Type(s)

Fields and Methods inherited from AI_AIR_ENGAGE Description

AI_A2A_GCI:Abort()

Synchronous Event Trigger for Event Abort.

AI_A2A_GCI:Accomplish()

Synchronous Event Trigger for Event Accomplish.

AI_A2A_GCI.Accomplished

AI_A2A_GCI:Destroy()

Synchronous Event Trigger for Event Destroy.

AI_A2A_GCI:Engage()

Synchronous Event Trigger for Event Engage.

AI_A2A_GCI.EngageAltType

AI_A2A_GCI.EngageCeilingAltitude

AI_A2A_GCI.EngageFloorAltitude

AI_A2A_GCI.EngageMaxSpeed

AI_A2A_GCI.EngageMinSpeed

AI_A2A_GCI:EngageRoute()

Synchronous Event Trigger for Event EngageRoute.

AI_A2A_GCI.Engaging

AI_A2A_GCI:Fired()

Synchronous Event Trigger for Event Fired.

AI_A2A_GCI:New(AI_Air, AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType)

Creates a new AI_AIR_ENGAGE object

AI_A2A_GCI:OnAfterAbort(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Abort.

AI_A2A_GCI:OnAfterAccomplish(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Accomplish.

AI_A2A_GCI:OnAfterDestroy(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Destroy.

AI_A2A_GCI:OnAfterEngage(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Engage.

AI_A2A_GCI:OnAfterEngageRoute(AIGroup, From, Event, To)

OnAfter Transition Handler for Event EngageRoute.

AI_A2A_GCI:OnAfterFired(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Fired.

AI_A2A_GCI:OnBeforeAbort(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Abort.

AI_A2A_GCI:OnBeforeAccomplish(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Accomplish.

AI_A2A_GCI:OnBeforeDestroy(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Destroy.

AI_A2A_GCI:OnBeforeEngage(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Engage.

AI_A2A_GCI:OnBeforeEngageRoute(AIGroup, From, Event, To)

OnBefore Transition Handler for Event EngageRoute.

AI_A2A_GCI:OnBeforeFired(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Fired.

AI_A2A_GCI:OnEnterEngaging(AIGroup, From, Event, To)

OnEnter Transition Handler for State Engaging.

AI_A2A_GCI:OnEventDead(EventData)

AI_A2A_GCI:OnLeaveEngaging(AIGroup, From, Event, To)

OnLeave Transition Handler for State Engaging.

AI_A2A_GCI.Resume(AIEngage, Fsm)

AI_A2A_GCI:__Abort(Delay)

Asynchronous Event Trigger for Event Abort.

AI_A2A_GCI:__Accomplish(Delay)

Asynchronous Event Trigger for Event Accomplish.

AI_A2A_GCI:__Destroy(Delay)

Asynchronous Event Trigger for Event Destroy.

AI_A2A_GCI:__Engage(Delay)

Asynchronous Event Trigger for Event Engage.

AI_A2A_GCI:__EngageRoute(Delay)

Asynchronous Event Trigger for Event EngageRoute.

AI_A2A_GCI:__Fired(Delay)

Asynchronous Event Trigger for Event Fired.

AI_A2A_GCI.___Engage(AIGroup, Fsm, AttackSetUnit)

AI_A2A_GCI.___EngageRoute(AIGroup, Fsm, AttackSetUnit)

AI_A2A_GCI:onafterAbort(AIGroup, From, Event, To)

onafter event handler for Abort event.

AI_A2A_GCI:onafterAccomplish(AIGroup, From, Event, To)

AI_A2A_GCI:onafterDestroy(AIGroup, From, Event, To, EventData)

AI_A2A_GCI:onafterEngage(AIGroup, From, Event, To)

onafter event handler for Engage event.

AI_A2A_GCI:onafterEngageRoute(DefenderGroup, From, Event, To, AttackSetUnit)

AI_A2A_GCI:onafterStart(AIGroup, From, Event, To)

onafter event handler for Start event.

AI_A2A_GCI:onbeforeEngage(AIGroup, From, Event, To)

onbefore event handler for Engage event.

Field(s)

Function(s)

Evaluate the attack and create an AttackUnitTask list.

Defined in:

AI_A2A_GCI

Parameters:

Core.Set#SET_UNIT AttackSetUnit

The set of units to attack.

Wrapper.Group#GROUP DefenderGroup

The group of defenders.

#number EngageAltitude

The altitude to engage the targets.

Return value:

self

Creates a new AI_A2A_GCI object

Defined in:

AI_A2A_GCI

Parameters:

Wrapper.Group#GROUP AIIntercept

DCS#Speed EngageMinSpeed

The minimum speed of the Wrapper.Group in km/h when engaging a target.

DCS#Speed EngageMaxSpeed

The maximum speed of the Wrapper.Group in km/h when engaging a target.

DCS#Altitude EngageFloorAltitude

The lowest altitude in meters where to execute the engagement.

DCS#Altitude EngageCeilingAltitude

The highest altitude in meters where to execute the engagement.

DCS#AltitudeType EngageAltType

The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to "RADIO".

Return value:

Creates a new AI_A2A_GCI object

Defined in:

AI_A2A_GCI

Parameters:

Wrapper.Group#GROUP AIIntercept

DCS#Speed EngageMinSpeed

The minimum speed of the Wrapper.Group in km/h when engaging a target.

DCS#Speed EngageMaxSpeed

The maximum speed of the Wrapper.Group in km/h when engaging a target.

DCS#Altitude EngageFloorAltitude

The lowest altitude in meters where to execute the engagement.

DCS#Altitude EngageCeilingAltitude

The highest altitude in meters where to execute the engagement.

DCS#AltitudeType EngageAltType

The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to "RADIO".

Return value:

onafter State Transition for Event Patrol.

Defined in:

AI_A2A_GCI

Parameters:

Wrapper.Group#GROUP AIIntercept

The AI Group managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Field(s)

Function(s)

Synchronous Event Trigger for Event Abort.

Synchronous Event Trigger for Event Accomplish.

Synchronous Event Trigger for Event Destroy.

Synchronous Event Trigger for Event Engage.

Synchronous Event Trigger for Event EngageRoute.

Synchronous Event Trigger for Event Fired.

Creates a new AI_AIR_ENGAGE object

Defined in:

Parameters:

The AI_AIR FSM.

The AI group.

DCS#Speed EngageMinSpeed

(optional, default = 50% of max speed) The minimum speed of the Wrapper.Group in km/h when engaging a target.

DCS#Speed EngageMaxSpeed

(optional, default = 75% of max speed) The maximum speed of the Wrapper.Group in km/h when engaging a target.

DCS#Altitude EngageFloorAltitude

(optional, default = 1000m ) The lowest altitude in meters where to execute the engagement.

DCS#Altitude EngageCeilingAltitude

(optional, default = 1500m ) The highest altitude in meters where to execute the engagement.

DCS#AltitudeType EngageAltType

The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to "RADIO".

Return value:

OnAfter Transition Handler for Event Abort.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnAfter Transition Handler for Event Accomplish.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnAfter Transition Handler for Event Destroy.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnAfter Transition Handler for Event Engage.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnAfter Transition Handler for Event EngageRoute.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnAfter Transition Handler for Event Fired.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnBefore Transition Handler for Event Abort.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnBefore Transition Handler for Event Accomplish.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnBefore Transition Handler for Event Destroy.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnBefore Transition Handler for Event Engage.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnBefore Transition Handler for Event EngageRoute.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnBefore Transition Handler for Event Fired.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnEnter Transition Handler for State Engaging.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

@param #AI_AIR_ENGAGE self @param Core.Event#EVENTDATA EventData

Defined in:

Parameter:

EventData

OnLeave Transition Handler for State Engaging.

Defined in:

Parameters:

The Group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

@param Wrapper.Group#GROUP AIEngage

Defined in:

Parameters:

AIEngage

Fsm

Asynchronous Event Trigger for Event Abort.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Asynchronous Event Trigger for Event Accomplish.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Asynchronous Event Trigger for Event Destroy.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Asynchronous Event Trigger for Event Engage.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Asynchronous Event Trigger for Event EngageRoute.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Asynchronous Event Trigger for Event Fired.

Defined in:

Parameter:

#number Delay

The delay in seconds.

@param Wrapper.Group#GROUP AIControllable

Defined in:

Parameters:

AIGroup

Fsm

AttackSetUnit

@param Wrapper.Group#GROUP AIControllable

Defined in:

Parameters:

AIGroup

Fsm

AttackSetUnit

onafter event handler for Abort event.

Defined in:

Parameters:

The AI Group managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

@param #AI_AIR_ENGAGE self @param Wrapper.Group#GROUP AIGroup The Group Object managed by the FSM. @param #string From The From State string. @param #string Event The Event string. @param #string To The To State string.

Defined in:

Parameters:

AIGroup

From

Event

To

@param #AI_AIR_ENGAGE self @param Wrapper.Group#GROUP AIGroup The Group Object managed by the FSM. @param #string From The From State string. @param #string Event The Event string. @param #string To The To State string. @param Core.Event#EVENTDATA EventData

Defined in:

Parameters:

AIGroup

From

Event

To

EventData

onafter event handler for Engage event.

Defined in:

Parameters:

The AI Group managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

@param #AI_AIR_ENGAGE self @param Wrapper.Group#GROUP DefenderGroup The GroupGroup managed by the FSM. @param #string From The From State string. @param #string Event The Event string. @param #string To The To State string. @param Core.Set#SET_UNIT AttackSetUnit Unit set to be attacked.

Defined in:

Parameters:

DefenderGroup

From

Event

To

AttackSetUnit

onafter event handler for Start event.

Defined in:

Parameters:

The AI group managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

onbefore event handler for Engage event.

Defined in:

Parameters:

The group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.