Module AI_A2A_GCI
AI -- Execute Ground Controlled Interception (GCI).
AI A2A_INTEREPT class makes AI Groups execute an Intercept.
There are the following types of GCI classes defined:
- #AIA2AGCI: Perform a GCI in a zone.
Author: Sven Van de Velde (FlightControl)
Contributions:
Global(s)
| AI_A2A_GCI |
AIA2AGCI class, extends AIA2A#AIA2AThe AIA2AGCI class implements the core functions to intercept intruders. |
Type AI_A2A_GCI
Global(s)
- #AI_A2A_GCI AI_A2A_GCI
-
AIA2AGCI class, extends AIA2A#AIA2A
The AIA2AGCI class implements the core functions to intercept intruders.
The Engage function will intercept intruders.
The AIA2AGCI is assigned a Group and this must be done before the AIA2AGCI 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 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.
1. AIA2AGCI constructor
- AIA2AGCI.New(): Creates a new AIA2AGCI object.
2. AIA2AGCI is a FSM
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
- **AIPatrol#AIPATROL_ZONE.Start**: Start the process.
- **AIPatrol#AIPATROL_ZONE.Route**: Route the AI to a new random 3D point within the Patrol Zone.
- **AIA2AGCI.Engage**: Let the AI engage the bogeys.
- **AIA2AGCI.Abort**: Aborts the engagement and return patrolling in the patrol zone.
- **AIPatrol#AIPATROL_ZONE.RTB**: Route the AI to the home base.
- **AIPatrol#AIPATROL_ZONE.Detect**: The AI is detecting targets.
- **AIPatrol#AIPATROL_ZONE.Detected**: The AI has detected new targets.
- **AIA2AGCI.Destroy**: The AI has destroyed a bogey Unit.
- **AIA2AGCI.Destroyed**: The AI has destroyed all bogeys Units assigned in the CAS task.
- Status ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
3. Set the Range of Engagement
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 AIGCI#AIA2A_GCI.SetEngageRange() to define that range.
4. Set the Zone of Engagement
An optional Zone can be set, that will define when the AI will engage with the detected airborne enemy targets. Use the method AICap#AIA2A_GCI.SetEngageZone() to define that Zone.
Type AI_A2A_GCI
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
- AI_A2A_GCI:Destroy()
-
Synchronous Event Trigger for Event Destroy.
- AI_A2A_GCI:Engage()
-
Synchronous Event Trigger for Event Engage.
- #boolean AI_A2A_GCI.Engaging
- AI_A2A_GCI:Fired()
-
Synchronous Event Trigger for Event Fired.
- AI_A2A_GCI.InterceptRoute(AIControllable, AIGroup, Fsm)
-
Parameters
-
Wrapper.Group#GROUP AIControllable: -
AIGroup: -
Fsm:
-
- AI_A2A_GCI:New(AIGroup, EngageMinSpeed, EngageMaxSpeed)
-
Creates a new AIA2AGCI object
Parameters
-
Wrapper.Group#GROUP AIGroup: -
EngageMinSpeed: -
EngageMaxSpeed:
Return value
-
- AI_A2A_GCI:OnAfterAbort(AIGroup, From, Event, To)
-
OnAfter Transition Handler for Event Abort.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnAfter Transition Handler for Event Accomplish.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnAfter Transition Handler for Event Destroy.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnAfter Transition Handler for Event Engage.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnAfter Transition Handler for Event Fired.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnBefore Transition Handler for Event Abort.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnBefore Transition Handler for Event Accomplish.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnBefore Transition Handler for Event Destroy.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnBefore Transition Handler for Event Engage.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnBefore Transition Handler for Event Fired.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
OnEnter Transition Handler for State Engaging.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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
-
Core.Event#EVENTDATA EventData:
-
- AI_A2A_GCI:OnLeaveEngaging(AIGroup, From, Event, To)
-
OnLeave Transition Handler for State Engaging.
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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:__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(AIGroup, From, Event, To)
-
Parameters
-
Wrapper.Group#GROUP AIGroup: 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(AIGroup, From, Event, To)
-
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To, EventData)
-
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup 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(AIGroup, From, Event, To)
-
onafter State Transition for Event Patrol.
Parameters
-
Wrapper.Group#GROUP AIGroup: 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(AIGroup, From, Event, To)
-
Parameters
-
Wrapper.Group#GROUP AIGroup: The AIGroup Object managed by the FSM. -
#string From: The From State string. -
#string Event: The Event string. -
#string To: The To State string.
-