Module AI_A2A_GCI

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

This is a class used in the AI_A2A_Dispatcher.


Author: FlightControl


Global(s)

AI_A2A_GCI

AIA2AGCI class, extends AI_A2A#AI_A2A

The AIA2AGCI class implements the core functions to intercept intruders.

Type AI_A2A_GCI

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.AttackSetUnit
AI_A2A_GCI:Destroy()

Synchronous Event Trigger for Event Destroy.

AI_A2A_GCI:Engage()

Synchronous Event Trigger for Event Engage.

AI_A2A_GCI.EngageMaxSpeed
AI_A2A_GCI.EngageMinSpeed
AI_A2A_GCI.Engaging
AI_A2A_GCI:Fired()

Synchronous Event Trigger for Event Fired.

AI_A2A_GCI.InterceptRoute(AIControllable, AIIntercept, Fsm)
AI_A2A_GCI:New(AIIntercept, EngageMinSpeed, EngageMaxSpeed)

Creates a new AIA2AGCI object

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

OnAfter Transition Handler for Event Abort.

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

OnAfter Transition Handler for Event Accomplish.

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

OnAfter Transition Handler for Event Destroy.

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

OnAfter Transition Handler for Event Engage.

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

OnAfter Transition Handler for Event Fired.

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

OnBefore Transition Handler for Event Abort.

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

OnBefore Transition Handler for Event Accomplish.

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

OnBefore Transition Handler for Event Destroy.

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

OnBefore Transition Handler for Event Engage.

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

OnBefore Transition Handler for Event Fired.

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

OnEnter Transition Handler for State Engaging.

AI_A2A_GCI:OnEventDead(EventData)
AI_A2A_GCI:OnLeaveEngaging(AIIntercept, From, Event, To)

OnLeave Transition Handler for State Engaging.

AI_A2A_GCI.PatrolAltType
AI_A2A_GCI.PatrolMaxSpeed
AI_A2A_GCI.PatrolMinSpeed
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:__Fired(Delay)

Asynchronous Event Trigger for Event Fired.

AI_A2A_GCI:onafterAbort(AIIntercept, From, Event, To)
AI_A2A_GCI:onafterAccomplish(AIIntercept, From, Event, To)
AI_A2A_GCI:onafterDestroy(AIIntercept, From, Event, To, EventData)
AI_A2A_GCI:onafterEngage(AIIntercept, From, Event, To)

onafter State Transition for Event Patrol.

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

onafter State Transition for Event Patrol.

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

Global(s)

#AI_A2A_GCI AI_A2A_GCI

AIA2AGCI class, extends AI_A2A#AI_A2A

The AIA2AGCI class implements the core functions to intercept intruders.

The Engage function will intercept intruders.

Process

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

Process

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.

Process

This cycle will continue.

Process

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

Process

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

Process

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

Process

1. AIA2AGCI constructor

2. AIA2AGCI is a FSM

Process

2.1 AIA2AGCI 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 AIA2AGCI Events

3. Set the Range of Engagement

Range

An optional range can be set in meters, that will define when the AI will engage with the detected airborne enemy targets. The range can be beyond or smaller than the range of the Patrol Zone. The range is applied at the position of the AI. Use the method AI_GCI#AI_A2A_GCI.SetEngageRange() to define that range.

4. Set the Zone of Engagement

Zone

An optional Zone can be set, that will define when the AI will engage with the detected airborne enemy targets. Use the method AI_Cap#AI_A2A_GCI.SetEngageZone() to define that Zone.


Type AI_A2A_GCI

Extends AI.AI_A2A#AI_A2A

Field(s)

AI_A2A_GCI:Abort()

Synchronous Event Trigger for Event Abort.

AI_A2A_GCI:Accomplish()

Synchronous Event Trigger for Event Accomplish.

#boolean AI_A2A_GCI.Accomplished
Core.Set#SET_UNIT AI_A2A_GCI.AttackSetUnit
AI_A2A_GCI:Destroy()

Synchronous Event Trigger for Event Destroy.

AI_A2A_GCI:Engage()

Synchronous Event Trigger for Event Engage.

AI_A2A_GCI.EngageMaxSpeed
AI_A2A_GCI.EngageMinSpeed
#boolean AI_A2A_GCI.Engaging
AI_A2A_GCI:Fired()

Synchronous Event Trigger for Event Fired.

AI_A2A_GCI.InterceptRoute(AIControllable, AIIntercept, Fsm)

Parameters

AI_A2A_GCI:New(AIIntercept, EngageMinSpeed, EngageMaxSpeed)

Creates a new AIA2AGCI object

Parameters

Return value

#AI_A2A_GCI:

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

OnAfter Transition Handler for Event Abort.

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

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

OnAfter Transition Handler for Event Accomplish.

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

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

OnAfter Transition Handler for Event Destroy.

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

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

OnAfter Transition Handler for Event Engage.

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

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

OnAfter Transition Handler for Event Fired.

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

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

OnBefore Transition Handler for Event Abort.

Parameters

  • Wrapper.Group#GROUP AIIntercept : 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.

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

OnBefore Transition Handler for Event Accomplish.

Parameters

  • Wrapper.Group#GROUP AIIntercept : 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.

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

OnBefore Transition Handler for Event Destroy.

Parameters

  • Wrapper.Group#GROUP AIIntercept : 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.

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

OnBefore Transition Handler for Event Engage.

Parameters

  • Wrapper.Group#GROUP AIIntercept : 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.

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

OnBefore Transition Handler for Event Fired.

Parameters

  • Wrapper.Group#GROUP AIIntercept : 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.

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

OnEnter Transition Handler for State Engaging.

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

AI_A2A_GCI:OnEventDead(EventData)

Parameter

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

OnLeave Transition Handler for State Engaging.

Parameters

  • Wrapper.Group#GROUP AIIntercept : 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.

#string AI_A2A_GCI.PatrolAltType
AI_A2A_GCI.PatrolMaxSpeed
AI_A2A_GCI.PatrolMinSpeed
AI_A2A_GCI:__Abort(Delay)

Asynchronous Event Trigger for Event Abort.

Parameter

  • #number Delay : The delay in seconds.

AI_A2A_GCI:__Accomplish(Delay)

Asynchronous Event Trigger for Event Accomplish.

Parameter

  • #number Delay : The delay in seconds.

AI_A2A_GCI:__Destroy(Delay)

Asynchronous Event Trigger for Event Destroy.

Parameter

  • #number Delay : The delay in seconds.

AI_A2A_GCI:__Engage(Delay)

Asynchronous Event Trigger for Event Engage.

Parameter

  • #number Delay : The delay in seconds.

AI_A2A_GCI:__Fired(Delay)

Asynchronous Event Trigger for Event Fired.

Parameter

  • #number Delay : The delay in seconds.

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

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.

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

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

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

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

  • Core.Event#EVENTDATA EventData :

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

onafter State Transition for Event Patrol.

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.

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

onafter State Transition for Event Patrol.

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.

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

Parameters

  • Wrapper.Group#GROUP AIIntercept : The Group Object managed by the FSM.

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.