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. |
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
- AI_A2A_GCI.New(): Creates a new AI_A2A_GCI object.
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
- **AI.AI_Patrol#AI_PATROL_ZONE.Start**: Start the process.
- **AI.AI_Patrol#AI_PATROL_ZONE.Route**: Route the AI to a new random 3D point within the Patrol Zone.
- **AI_A2A_GCI.Engage**: Let the AI engage the bogeys.
- **AI_A2A_GCI.Abort**: Aborts the engagement and return patrolling in the patrol zone.
- **AI.AI_Patrol#AI_PATROL_ZONE.RTB**: Route the AI to the home base.
- **AI.AI_Patrol#AI_PATROL_ZONE.Detect**: The AI is detecting targets.
- **AI.AI_Patrol#AI_PATROL_ZONE.Detected**: The AI has detected new targets.
- **AI_A2A_GCI.Destroy**: The AI has destroyed a bogey Wrapper.Unit.
- **AI_A2A_GCI.Destroyed**: The AI has destroyed all bogeys Wrapper.Units assigned in the CAS task.
- Status ( Group ): The AI is checking status (fuel and damage). When the thresholds have been reached, the AI will RTB.
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_A2A_GCI | Description |
---|---|
AI_A2A_GCI:CreateAttackUnitTasks(AttackSetUnit, DefenderGroup, EngageAltitude) |
Evaluate the attack and create an AttackUnitTask list. |
Creates a new AI_A2A_GCI object |
|
Creates a new AI_A2A_GCI object |
|
onafter State Transition for Event Patrol. |
Fields and Methods inherited from AI_AIR_ENGAGE | Description |
---|---|
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 |
|
OnAfter Transition Handler for Event Abort. |
|
OnAfter Transition Handler for Event Accomplish. |
|
OnAfter Transition Handler for Event Destroy. |
|
OnAfter Transition Handler for Event Engage. |
|
OnAfter Transition Handler for Event EngageRoute. |
|
OnAfter Transition Handler for Event Fired. |
|
OnBefore Transition Handler for Event Abort. |
|
OnBefore Transition Handler for Event Accomplish. |
|
OnBefore Transition Handler for Event Destroy. |
|
OnBefore Transition Handler for Event Engage. |
|
OnBefore Transition Handler for Event EngageRoute. |
|
OnBefore Transition Handler for Event Fired. |
|
OnEnter Transition Handler for State Engaging. |
|
OnLeave Transition Handler for State Engaging. |
|
Asynchronous Event Trigger for Event Abort. |
|
Asynchronous Event Trigger for Event Accomplish. |
|
Asynchronous Event Trigger for Event Destroy. |
|
Asynchronous Event Trigger for Event Engage. |
|
Asynchronous Event Trigger for Event EngageRoute. |
|
Asynchronous Event Trigger for Event Fired. |
|
onafter event handler for Abort event. |
|
AI_A2A_GCI:onafterDestroy(AIGroup, From, Event, To, EventData) |
|
onafter event handler for Engage event. |
|
AI_A2A_GCI:onafterEngageRoute(DefenderGroup, From, Event, To, AttackSetUnit) |
|
onafter event handler for Start event. |
|
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.
Defined in:
Synchronous Event Trigger for Event Accomplish.
Defined in:
Synchronous Event Trigger for Event Destroy.
Defined in:
Synchronous Event Trigger for Event Engage.
Defined in:
Synchronous Event Trigger for Event EngageRoute.
Defined in:
Synchronous Event Trigger for Event Fired.
Defined in:
Creates a new AI_AIR_ENGAGE object
Defined in:
Parameters:
AI.AI_Air#AI_AIR AI_Air
The AI_AIR FSM.
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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:
Wrapper.Group#GROUP AIGroup
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
OnLeave Transition Handler for State Engaging.
Defined in:
Parameters:
Wrapper.Group#GROUP AIGroup
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
Asynchronous Event Trigger for Event Abort.
Asynchronous Event Trigger for Event Accomplish.
Asynchronous Event Trigger for Event Destroy.
Asynchronous Event Trigger for Event Engage.
Asynchronous Event Trigger for Event EngageRoute.
Asynchronous Event Trigger for Event Fired.
@param Wrapper.Group#GROUP AIControllable
@param Wrapper.Group#GROUP AIControllable
onafter event handler for Abort event.
Defined in:
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.
@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 #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
onafter event handler for Engage event.
Defined in:
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.
@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.
onafter event handler for Start event.
Defined in:
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.
onbefore event handler for Engage event.
Defined in:
Parameters:
Wrapper.Group#GROUP AIGroup
The group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.