diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html index e21b9498f..b6fa99328 100644 --- a/docs/Documentation/AI_Patrol.html +++ b/docs/Documentation/AI_Patrol.html @@ -933,6 +933,9 @@ Use the method AIPATROLZONE.M + +

This table contains the targets detected during patrol.

+
diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index b6abf92f7..19046ba83 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -2797,6 +2797,7 @@ The range till cargo will board.

+ CARGO_UNIT.CargoCarrier diff --git a/docs/Documentation/Cas.html b/docs/Documentation/Cas.html deleted file mode 100644 index 4ed9fdf8c..000000000 --- a/docs/Documentation/Cas.html +++ /dev/null @@ -1,1549 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Cas

- -

SP:Y MP:Y AI:Y HU:N TYP:Air -- This module contains the AICASZONE class.

- - - -
- -

1) #AICASZONE class, extends Core.Fsm#FSM_CONTROLLABLE

-

The #AICASZONE class implements the core functions to CAS a Zone by an AIR Controllable Group.

- -

1.1) AICASZONE constructor:

- - - -

1.2) AICASZONE state machine:

-

The AICASZONE is a state machine: it manages the different events and states of the AIControllable it is controlling.

- -

1.2.1) AICASZONE Events:

- - - -

1.2.2) AICASZONE States:

- - -

1.2.3) AICASZONE state transition methods:

- - -

1.3) Manage the AICASZONE parameters:

-

The following methods are available to modify the parameters of an AICASZONE object:

- - - -
- -

API CHANGE HISTORY

- -

The underlying change log documents the API changes. Please read this carefully. The following notation is used:

- -
    -
  • Added parts are expressed in bold type face.
  • -
  • Removed parts are expressed in italic type face.
  • -
- -

Hereby the change log:

- -

2017-01-12: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • Quax: Concept & Testing.
  • -
  • Pikey: Concept & Testing.
  • -
- -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming.
  • -
- - - -

Global(s)

- - - - - - - - - -
AI_CAS_ZONE - -
_NewEngageRoute(AIControllable) - -
-

Type AI_CAS_ZONE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_CAS_ZONE.AIControllable -

The Controllable patrolling.

-
AI_CAS_ZONE:Abort() -

Synchronous Event Trigger for Event Abort.

-
AI_CAS_ZONE:Accomplish() -

Synchronous Event Trigger for Event Accomplish.

-
AI_CAS_ZONE.Accomplished - -
AI_CAS_ZONE.CheckStatus - -
AI_CAS_ZONE.ClassName - -
AI_CAS_ZONE:Destroy() -

Synchronous Event Trigger for Event Destroy.

-
AI_CAS_ZONE.DetectUnits - -
AI_CAS_ZONE:Engage() -

Synchronous Event Trigger for Event Engage.

-
AI_CAS_ZONE.EngageZone - -
AI_CAS_ZONE:Fired() -

Synchronous Event Trigger for Event Fired.

-
AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone) -

Creates a new AICASZONE object

-
AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Abort.

-
AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Accomplish.

-
AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Destroy.

-
AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Engage.

-
AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Fired.

-
AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Abort.

-
AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Accomplish.

-
AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Destroy.

-
AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Engage.

-
AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Fired.

-
AI_CAS_ZONE:OnDead(EventData) - -
AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) -

OnEnter Transition Handler for State Engaging.

-
AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) -

OnLeave Transition Handler for State Engaging.

-
AI_CAS_ZONE.TargetZone -

The Zone where the patrol needs to be executed.

-
AI_CAS_ZONE:__Abort(Delay) -

Asynchronous Event Trigger for Event Abort.

-
AI_CAS_ZONE:__Accomplish(Delay) -

Asynchronous Event Trigger for Event Accomplish.

-
AI_CAS_ZONE:__Destroy(Delay) -

Asynchronous Event Trigger for Event Destroy.

-
AI_CAS_ZONE:__Engage(Delay) -

Asynchronous Event Trigger for Event Engage.

-
AI_CAS_ZONE:__Fired(Delay) -

Asynchronous Event Trigger for Event Fired.

-
AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To) - -
AI_CAS_ZONE:onafterRTB(Controllable, From, Event, To, EventData) - -
AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) -

onafter State Transition for Event Start.

-
AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
- -

Global(s)

-
-
- - #AI_CAS_ZONE - -AI_CAS_ZONE - -
-
- - - -
-
-
-
- - -_NewEngageRoute(AIControllable) - -
-
- - - -

Parameter

- -
-
-

Type Cas

- -

Type AI_CAS_ZONE

- -

AICASZONE class

- -

Field(s)

-
-
- - Wrapper.Controllable#CONTROLLABLE - -AI_CAS_ZONE.AIControllable - -
-
- -

The Controllable patrolling.

- -
-
-
-
- - -AI_CAS_ZONE:Abort() - -
-
- -

Synchronous Event Trigger for Event Abort.

- -
-
-
-
- - -AI_CAS_ZONE:Accomplish() - -
-
- -

Synchronous Event Trigger for Event Accomplish.

- -
-
-
-
- - #boolean - -AI_CAS_ZONE.Accomplished - -
-
- - - -
-
-
-
- - #boolean - -AI_CAS_ZONE.CheckStatus - -
-
- - - -
-
-
-
- - #string - -AI_CAS_ZONE.ClassName - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE:Destroy() - -
-
- -

Synchronous Event Trigger for Event Destroy.

- -
-
-
-
- - #boolean - -AI_CAS_ZONE.DetectUnits - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE:Engage() - -
-
- -

Synchronous Event Trigger for Event Engage.

- -
-
-
-
- - - -AI_CAS_ZONE.EngageZone - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE:Fired() - -
-
- -

Synchronous Event Trigger for Event Fired.

- -
-
-
-
- - -AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone) - -
-
- -

Creates a new AICASZONE object

- -

Parameters

- -

Return value

- -

#AICASZONE: -self

- -
-
-
-
- - -AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Abort.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Accomplish.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Destroy.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Engage.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Fired.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Abort.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable 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_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Accomplish.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable 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_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Destroy.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable 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_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Engage.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable 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_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Fired.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable 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_CAS_ZONE:OnDead(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) - -
-
- -

OnEnter Transition Handler for State Engaging.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) - -
-
- -

OnLeave Transition Handler for State Engaging.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable 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.

- -
-
-
-
- - Core.Zone#ZONE_BASE - -AI_CAS_ZONE.TargetZone - -
-
- -

The Zone where the patrol needs to be executed.

- -
-
-
-
- - -AI_CAS_ZONE:__Abort(Delay) - -
-
- -

Asynchronous Event Trigger for Event Abort.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Accomplish(Delay) - -
-
- -

Asynchronous Event Trigger for Event Accomplish.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Destroy(Delay) - -
-
- -

Asynchronous Event Trigger for Event Destroy.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Engage(Delay) - -
-
- -

Asynchronous Event Trigger for Event Engage.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Fired(Delay) - -
-
- -

Asynchronous Event Trigger for Event Fired.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable 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_CAS_ZONE:onafterEngage(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterRTB(Controllable, From, Event, To, EventData) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
  • - -

    EventData :

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) - -
-
- -

onafter State Transition for Event Start.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index dc52c4036..75eb0145f 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -2172,6 +2172,7 @@ self

+ #number DETECTION_BASE.DetectedItemCount @@ -2185,6 +2186,7 @@ self

+ #number DETECTION_BASE.DetectedItemMax diff --git a/docs/Documentation/MOVEMENT.html b/docs/Documentation/Movement.html similarity index 100% rename from docs/Documentation/MOVEMENT.html rename to docs/Documentation/Movement.html diff --git a/docs/Documentation/Patrol.html b/docs/Documentation/Patrol.html deleted file mode 100644 index 1e60bd6a1..000000000 --- a/docs/Documentation/Patrol.html +++ /dev/null @@ -1,771 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Patrol

- -

(AI) (FSM) Make AI patrol routes or zones.

- - - -
- -

1) #AI_PATROLZONE class, extends Core.Fsm#FSM_CONTROLLABLE

-

The #AI_PATROLZONE class implements the core functions to patrol a Zone by an AIR Controllable Group. -The patrol algorithm works that for each airplane patrolling, upon arrival at the patrol zone, -a random point is selected as the route point within the 3D space, within the given boundary limits. -The airplane 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 random 3D point, a new 3D random point will be selected within the patrol zone using the given limits. -This cycle will continue until a fuel treshold has been reached by the airplane. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

- -

1.1) AI_PATROLZONE constructor:

- - - -

1.2) AI_PATROLZONE state machine:

-

The AI_PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling.

- -

1.2.1) AI_PATROLZONE Events:

- -
    -
  • AI_PATROLZONE.Route( AIControllable ): A new 3D route point is selected and the AIControllable will fly towards that point with the given speed.
  • -
  • AI_PATROLZONE.Patrol( AIControllable ): The AIControllable reports it is patrolling. This event is called every 30 seconds.
  • -
  • AI_PATROLZONE.RTB( AIControllable ): The AIControllable will report return to base.
  • -
  • AI_PATROLZONE.End( AIControllable ): The end of the AI_PATROLZONE process.
  • -
  • AI_PATROLZONE.Dead( AIControllable ): The AIControllable is dead. The AI_PATROLZONE process will be ended.
  • -
- -

1.2.2) AI_PATROLZONE States:

- -
    -
  • Route: A new 3D route point is selected and the AIControllable will fly towards that point with the given speed.
  • -
  • Patrol: The AIControllable is patrolling. This state is set every 30 seconds, so every 30 seconds, a state transition method can be used.
  • -
  • RTB: The AIControllable reports it wants to return to the base.
  • -
  • Dead: The AIControllable is dead ...
  • -
  • End: The process has come to an end.
  • -
- -

1.2.3) AI_PATROLZONE state transition methods:

- -

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

- -
    -
  • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

  • -
  • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

  • -
- -

An example how to manage a state transition for an AI_PATROLZONE object Patrol for the state RTB:

- -
 local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone" )
- local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup )
-
- local PatrolSpawn = SPAWN:New( "Patrol Group" )
- local PatrolGroup = PatrolSpawn:Spawn()
-
- local Patrol = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 )
- Patrol:SetControllable( PatrolGroup )
- Patrol:ManageFuel( 0.2, 60 )
-
- -

OnBeforeRTB( AIGroup ) will be called by the AIPATROLZONE object when the AIGroup reports RTB, but before the RTB default action is processed by the AIPATROLZONE object.

- -
 --- State transition function for the AI_PATROLZONE **Patrol** object
- -- @param #AI_PATROLZONE self 
- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup
- -- @return #boolean If false is returned, then the OnAfter state transition method will not be called.
- function Patrol:OnBeforeRTB( AIGroup )
-   AIGroup:MessageToRed( "Returning to base", 20 )
- end
-
- -

OnAfterRTB( AIGroup ) will be called by the AIPATROLZONE object when the AIGroup reports RTB, but after the RTB default action was processed by the AIPATROLZONE object.

- -
 --- State transition function for the AI_PATROLZONE **Patrol** object
- -- @param #AI_PATROLZONE self 
- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup
- -- @return #Wrapper.Controllable#CONTROLLABLE The new AIGroup object that is set to be patrolling the zone.
- function Patrol:OnAfterRTB( AIGroup )
-   return PatrolSpawn:Spawn()
- end 
-
- -

1.3) Manage the AI_PATROLZONE parameters:

-

The following methods are available to modify the parameters of a AI_PATROLZONE object:

- - - -

1.3) Manage the out of fuel in the AI_PATROLZONE:

-

When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. -Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -Once the time is finished, the old AIControllable will return to the base. -Use the method AI_PATROLZONE.ManageFuel() to have this proces in place.

- -
- -

API CHANGE HISTORY

- -

The underlying change log documents the API changes. Please read this carefully. The following notation is used:

- -
    -
  • Added parts are expressed in bold type face.
  • -
  • Removed parts are expressed in italic type face.
  • -
- -

Hereby the change log:

- -

2016-09-01: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • DutchBaron: Testing.
  • -
  • Pikey: Testing and API concept review.
  • -
- -

Authors:

- -
    -
  • FlightControl: Design & Programming.
  • -
- - - -

Global(s)

- - - - - - - - - -
AI_PATROLZONE - -
_NewPatrolRoute(AIControllable) - -
-

Type AI_PATROLZONE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_PATROLZONE.AIControllable -

The Controllable patrolling.

-
AI_PATROLZONE.ClassName - -
AI_PATROLZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) -

When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base.

-
AI_PATROLZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed) -

Creates a new AI_PATROLZONE object

-
AI_PATROLZONE:OnAfterRoute(Controllable) -

OnAfter State Transition Function

-
AI_PATROLZONE:OnBeforeRoute(Controllable) -

OnBefore State Transition Function

-
AI_PATROLZONE.PatrolCeilingAltitude -

The highest altitude in meters where to execute the patrol.

-
AI_PATROLZONE.PatrolFloorAltitude -

The lowest altitude in meters where to execute the patrol.

-
AI_PATROLZONE.PatrolFuelTresholdPercentage - -
AI_PATROLZONE.PatrolManageFuel - -
AI_PATROLZONE.PatrolMaxSpeed -

The maximum speed of the Controllable in km/h.

-
AI_PATROLZONE.PatrolMinSpeed -

The minimum speed of the Controllable in km/h.

-
AI_PATROLZONE.PatrolOutOfFuelOrbitTime - -
AI_PATROLZONE.PatrolZone -

The Zone where the patrol needs to be executed.

-
AI_PATROLZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) -

Sets the floor and ceiling altitude of the patrol.

-
AI_PATROLZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) -

Sets (modifies) the minimum and maximum speed of the patrol.

-
AI_PATROLZONE:onenterPatrol() - -
AI_PATROLZONE:onenterRoute() -

Defines a new patrol route using the Process_PatrolZone parameters and settings.

-
- -

Global(s)

-
-
- - #AI_PATROLZONE - -AI_PATROLZONE - -
-
- - - -
-
-
-
- - -_NewPatrolRoute(AIControllable) - -
-
- - - -

Parameter

- -
-
-

Type Patrol

- -

Type AI_PATROLZONE

- -

AI_PATROLZONE class

- -

Field(s)

-
-
- - Wrapper.Controllable#CONTROLLABLE - -AI_PATROLZONE.AIControllable - -
-
- -

The Controllable patrolling.

- -
-
-
-
- - #string - -AI_PATROLZONE.ClassName - -
-
- - - -
-
-
-
- - -AI_PATROLZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) - -
-
- -

When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base.

- - -

Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -Once the time is finished, the old AIControllable will return to the base.

- -

Parameters

-
    -
  • - -

    #number PatrolFuelTresholdPercentage : -The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.

    - -
  • -
  • - -

    #number PatrolOutOfFuelOrbitTime : -The amount of seconds the out of fuel AIControllable will orbit before returning to the base.

    - -
  • -
-

Return value

- -

#AI_PATROLZONE: -self

- -
-
-
-
- - -AI_PATROLZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed) - -
-
- -

Creates a new AI_PATROLZONE object

- -

Parameters

- -

Return value

- -

#AI_PATROLZONE: -self

- -

Usage:

-
-- Define a new AI_PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
-PatrolZone = ZONE:New( 'PatrolZone' )
-PatrolSpawn = SPAWN:New( 'Patrol Group' )
-PatrolArea = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
- -
-
-
-
- - -AI_PATROLZONE:OnAfterRoute(Controllable) - -
-
- -

OnAfter State Transition Function

- -

Parameter

- -
-
-
-
- - -AI_PATROLZONE:OnBeforeRoute(Controllable) - -
-
- -

OnBefore State Transition Function

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - Dcs.DCSTypes#Altitude - -AI_PATROLZONE.PatrolCeilingAltitude - -
-
- -

The highest altitude in meters where to execute the patrol.

- -
-
-
-
- - Dcs.DCSTypes#Altitude - -AI_PATROLZONE.PatrolFloorAltitude - -
-
- -

The lowest altitude in meters where to execute the patrol.

- -
-
-
-
- - - -AI_PATROLZONE.PatrolFuelTresholdPercentage - -
-
- - - -
-
-
-
- - #boolean - -AI_PATROLZONE.PatrolManageFuel - -
-
- - - -
-
-
-
- - Dcs.DCSTypes#Speed - -AI_PATROLZONE.PatrolMaxSpeed - -
-
- -

The maximum speed of the Controllable in km/h.

- -
-
-
-
- - Dcs.DCSTypes#Speed - -AI_PATROLZONE.PatrolMinSpeed - -
-
- -

The minimum speed of the Controllable in km/h.

- -
-
-
-
- - - -AI_PATROLZONE.PatrolOutOfFuelOrbitTime - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -AI_PATROLZONE.PatrolZone - -
-
- -

The Zone where the patrol needs to be executed.

- -
-
-
-
- - -AI_PATROLZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) - -
-
- -

Sets the floor and ceiling altitude of the patrol.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Altitude PatrolFloorAltitude : -The lowest altitude in meters where to execute the patrol.

    - -
  • -
  • - -

    Dcs.DCSTypes#Altitude PatrolCeilingAltitude : -The highest altitude in meters where to execute the patrol.

    - -
  • -
-

Return value

- -

#AI_PATROLZONE: -self

- -
-
-
-
- - -AI_PATROLZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) - -
-
- -

Sets (modifies) the minimum and maximum speed of the patrol.

- -

Parameters

- -

Return value

- -

#AI_PATROLZONE: -self

- -
-
-
-
- - -AI_PATROLZONE:onenterPatrol() - -
-
- - - -
-
-
-
- - -AI_PATROLZONE:onenterRoute() - -
-
- -

Defines a new patrol route using the Process_PatrolZone parameters and settings.

- -

Return value

- -

#AI_PATROLZONE: -self

- -
-
- -
- -
- - diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index 8eade306d..b321acabb 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -1367,6 +1367,7 @@ The new calculated POINT_VEC2.

+ POINT_VEC2.z diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index b8d4286eb..b82a161cb 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -2584,6 +2584,9 @@ when nothing was spawned.

+ +

By default, no InitLimit

+
@@ -2619,7 +2622,7 @@ when nothing was spawned.

- + #number SPAWN.SpawnMaxGroups @@ -2636,7 +2639,7 @@ when nothing was spawned.

- + #number SPAWN.SpawnMaxUnitsAlive diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html index 5413f9a2e..99a7e20af 100644 --- a/docs/Documentation/SpawnStatic.html +++ b/docs/Documentation/SpawnStatic.html @@ -442,6 +442,7 @@ ptional) The name of the new static.

+ #number SPAWNSTATIC.SpawnIndex diff --git a/docs/Documentation/Task_CARGO.html b/docs/Documentation/Task_Cargo.html similarity index 100% rename from docs/Documentation/Task_CARGO.html rename to docs/Documentation/Task_Cargo.html diff --git a/docs/Documentation/Task_SEAD.html b/docs/Documentation/Task_SEAD.html deleted file mode 100644 index a998527ee..000000000 --- a/docs/Documentation/Task_SEAD.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Task_SEAD

- -

This module contains the TASK_SEAD classes.

- - - -

1) #TASK_SEAD class, extends Task#TASK

-

The #TASK_SEAD class defines a SEAD task for a Set of Target Units, located at a Target Zone, -based on the tasking capabilities defined in Task#TASK. -The TASK_SEAD is implemented using a Statemachine#FSM_TASK, and has the following statuses:

- -
    -
  • None: Start of the process
  • -
  • Planned: The SEAD task is planned. Upon Planned, the sub-process ProcessFsm.Assign#ACTASSIGN_ACCEPT is started to accept the task.
  • -
  • Assigned: The SEAD task is assigned to a Group#GROUP. Upon Assigned, the sub-process ProcessFsm.Route#ACTROUTE is started to route the active Units in the Group to the attack zone.
  • -
  • Success: The SEAD task is successfully completed. Upon Success, the sub-process ProcessSEAD#PROCESSSEAD is started to follow-up successful SEADing of the targets assigned in the task.
  • -
  • Failed: The SEAD task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • -
- -
- -

Authors: FlightControl - Design and Programming

- - -

Global(s)

- - - - - -
TASK_SEAD - -
-

Type TASK_SEAD

- - - - - - - - - - - - - - - - - -
TASK_SEAD.ClassName - -
TASK_SEAD:GetPlannedMenuText() - -
TASK_SEAD:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetZone, TargetSetUnit) -

Instantiates a new TASK_SEAD.

-
TASK_SEAD.TargetSetUnit - -
- -

Global(s)

-
-
- - #TASK_SEAD - -TASK_SEAD - -
-
- - - -
-
-

Type Task_SEAD

- -

Type TASK_SEAD

- -

The TASK_SEAD class

- -

Field(s)

-
-
- - #string - -TASK_SEAD.ClassName - -
-
- - - -
-
-
-
- - -TASK_SEAD:GetPlannedMenuText() - -
-
- - - -
-
-
-
- - -TASK_SEAD:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetZone, TargetSetUnit) - -
-
- -

Instantiates a new TASK_SEAD.

- -

Parameters

- -

Return value

- -

#TASK_SEAD: -self

- -
-
-
-
- - Set#SET_UNIT - -TASK_SEAD.TargetSetUnit - -
-
- - - -
-
- -
- -
- -