- Added SPAWN:InitRandomizeZones() method.

- Renamed SPAWN:CleanUp() method to SPAWN:InitCleanUp() method.

- Reviewed documentation of the PatrolZone module and PATROLZONE class.

- Reviewed all test missions
This commit is contained in:
Sven Van de Velde 2016-08-16 10:17:35 +02:00
parent 0c15f92210
commit 3861362ed9
127 changed files with 56115 additions and 302 deletions

View File

@ -2,21 +2,28 @@
--
-- ===
--
-- 1) @{Patrol#PATROLZONE} class, extends @{Base#BASE}
-- 1) @{#PATROLZONE} class, extends @{Base#BASE}
-- ===================================================
-- The @{Patrol#PATROLZONE} class implements the core functions to patrol a @{Zone}.
-- The @{#PATROLZONE} class implements the core functions to patrol a @{Zone} by air units.
-- The PATROLZONE class will guide the airplanes towards the patrolzone.
-- 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 point using a randomly selected speed within given boundary limits.
-- Upon arrival at the random point, a new random point will be selected within the patrol zone within boundary 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) PATROLZONE constructor:
-- ----------------------------
-- @{PatrolZone#PATROLZONE.New}(): Creates a new PATROLZONE object.
-- @{#PATROLZONE.New}(): Creates a new PATROLZONE object.
--
-- 1.2) Modify the PATROLZONE parameters:
-- --------------------------------------
-- The following methods are available to modify the parameters of a PATROLZONE object:
--
-- * @{PatrolZone#PATROLZONE.SetGroup}(): Set the AI Patrol Group.
-- * @{PatrolZone#PATROLZONE.SetSpeed}(): Set the patrol speed of the AI, for the next patrol.
-- * @{PatrolZone#PATROLZONE.SetAltitude}(): Set altitude of the AI, for the next patrol.
-- * @{#PATROLZONE.SetGroup}(): Set the AI Patrol Group.
-- * @{#PATROLZONE.SetSpeed}(): Set the patrol speed of the AI, for the next patrol.
-- * @{#PATROLZONE.SetAltitude}(): Set altitude of the AI, for the next patrol.
--
-- 1.3) Manage the out of fuel in the PATROLZONE:
-- ----------------------------------------------
@ -24,12 +31,37 @@
-- 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 PatrolGroup will continue for a given time its patrol task in orbit, while a new PatrolGroup is targetted to the PATROLZONE.
-- Once the time is finished, the old PatrolGroup will return to the base.
-- Use the method @{PatrolZone#PATROLZONE.ManageFuel}() to have this proces in place.
-- Use the method @{#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-07-01: Initial class and API.
--
-- ===
--
-- AUTHORS and CONTRIBUTIONS
-- =========================
--
-- ### Contributions:
--
-- * DutchBaron: Testing.
--
-- ### Authors:
--
-- * FlightControl: Design & Programming
--
--
-- @module PatrolZone
-- @author FlightControl
--- PATROLZONE class

View File

@ -26,9 +26,10 @@
--
-- 1.1) SPAWN construction methods
-- -------------------------------
-- Create a new SPAWN object with the @{#SPAWN.New} or the @{#SPAWN.NewWithAlias} methods:
-- Create a new SPAWN object with the @{#SPAWN.New}() or the @{#SPAWN.NewWithAlias}() methods:
--
-- * @{#SPAWN.New}: Creates a new SPAWN object taking the name of the group that represents the GROUP Template (definition).
-- * @{#SPAWN.New}(): Creates a new SPAWN object taking the name of the group that represents the GROUP Template (definition).
-- * @{#SPAWN.NewWithAlias}(): Creates a new SPAWN object taking the name of the group that represents the GROUP Template (definition), and gives each spawned @{Group} an different name.
--
-- It is important to understand how the SPAWN class works internally. The SPAWN object created will contain internally a list of groups that will be spawned and that are already spawned.
-- The initialization methods will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons.
@ -38,27 +39,27 @@
-- ---------------------------------
-- A spawn object will behave differently based on the usage of **initialization** methods, which all start with the **Init** prefix:
--
-- * @{#SPAWN.InitLimit}: Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.
-- * @{#SPAWN.InitRandomizeRoute}: Randomize the routes of spawned groups, and for air groups also optionally the height.
-- * @{#SPAWN.InitRandomizeTemplate}: Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined.
-- * @{#SPAWN.InitUncontrolled}: Spawn plane groups uncontrolled.
-- * @{#SPAWN.InitArray}: Make groups visible before they are actually activated, and order these groups like a batallion in an array.
-- * @{#SPAWN.InitRepeat}: Re-spawn groups when they land at the home base. Similar methods are @{#SPAWN.InitRepeatOnLanding} and @{#SPAWN.InitRepeatOnEngineShutDown}.
-- * @{#SPAWN.InitRandomizeUnits}: Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius.
-- * @{#SPAWN.InitRandomizeZones}: Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor.
-- * @{#SPAWN.InitLimit}(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.
-- * @{#SPAWN.InitRandomizeRoute}(): Randomize the routes of spawned groups, and for air groups also optionally the height.
-- * @{#SPAWN.InitRandomizeTemplate}(): Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined.
-- * @{#SPAWN.InitUncontrolled}(): Spawn plane groups uncontrolled.
-- * @{#SPAWN.InitArray}(): Make groups visible before they are actually activated, and order these groups like a batallion in an array.
-- * @{#SPAWN.InitRepeat}(): Re-spawn groups when they land at the home base. Similar methods are @{#SPAWN.InitRepeatOnLanding} and @{#SPAWN.InitRepeatOnEngineShutDown}.
-- * @{#SPAWN.InitRandomizeUnits}(): Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius.
-- * @{#SPAWN.InitRandomizeZones}(): Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor.
--
-- 1.3) SPAWN spawning methods
-- ---------------------------
-- Groups can be spawned at different times and methods:
--
-- * @{#SPAWN.Spawn}: Spawn one new group based on the last spawned index.
-- * @{#SPAWN.ReSpawn}: Re-spawn a group based on a given index.
-- * @{#SPAWN.SpawnScheduled}: Spawn groups at scheduled but randomized intervals. You can use @{#SPAWN.SpawnScheduleStart} and @{#SPAWN.SpawnScheduleStop} to start and stop the schedule respectively.
-- * @{#SPAWN.SpawnFromVec3}: Spawn a new group from a Vec3 coordinate. (The group will can be spawned at a point in the air).
-- * @{#SPAWN.SpawnFromVec2}: Spawn a new group from a Vec2 coordinate. (The group will be spawned at land height ).
-- * @{#SPAWN.SpawnFromStatic}: Spawn a new group from a structure, taking the position of a @{STATIC}.
-- * @{#SPAWN.SpawnFromUnit}: Spawn a new group taking the position of a @{UNIT}.
-- * @{#SPAWN.SpawnInZone}: Spawn a new group in a @{ZONE}.
-- * @{#SPAWN.Spawn}(): Spawn one new group based on the last spawned index.
-- * @{#SPAWN.ReSpawn}(): Re-spawn a group based on a given index.
-- * @{#SPAWN.SpawnScheduled}(): Spawn groups at scheduled but randomized intervals. You can use @{#SPAWN.SpawnScheduleStart}() and @{#SPAWN.SpawnScheduleStop}() to start and stop the schedule respectively.
-- * @{#SPAWN.SpawnFromVec3}(): Spawn a new group from a Vec3 coordinate. (The group will can be spawned at a point in the air).
-- * @{#SPAWN.SpawnFromVec2}(): Spawn a new group from a Vec2 coordinate. (The group will be spawned at land height ).
-- * @{#SPAWN.SpawnFromStatic}(): Spawn a new group from a structure, taking the position of a @{Static}.
-- * @{#SPAWN.SpawnFromUnit}(): Spawn a new group taking the position of a @{Unit}.
-- * @{#SPAWN.SpawnInZone}(): Spawn a new group in a @{Zone}.
--
-- Note that @{#SPAWN.Spawn} and @{#SPAWN.ReSpawn} return a @{GROUP#GROUP.New} object, that contains a reference to the DCSGroup object.
-- You can use the @{GROUP} object to do further actions with the DCSGroup.
@ -69,27 +70,27 @@
-- Every time a SPAWN object spawns a new GROUP object, a reference to the GROUP object is added to an internal table of GROUPS.
-- SPAWN provides methods to iterate through that internal GROUP object reference table:
--
-- * @{#SPAWN.GetFirstAliveGroup}: Will find the first alive GROUP it has spawned, and return the alive GROUP object and the first Index where the first alive GROUP object has been found.
-- * @{#SPAWN.GetNextAliveGroup}: Will find the next alive GROUP object from a given Index, and return a reference to the alive GROUP object and the next Index where the alive GROUP has been found.
-- * @{#SPAWN.GetLastAliveGroup}: Will find the last alive GROUP object, and will return a reference to the last live GROUP object and the last Index where the last alive GROUP object has been found.
-- * @{#SPAWN.GetFirstAliveGroup}(): Will find the first alive GROUP it has spawned, and return the alive GROUP object and the first Index where the first alive GROUP object has been found.
-- * @{#SPAWN.GetNextAliveGroup}(): Will find the next alive GROUP object from a given Index, and return a reference to the alive GROUP object and the next Index where the alive GROUP has been found.
-- * @{#SPAWN.GetLastAliveGroup}(): Will find the last alive GROUP object, and will return a reference to the last live GROUP object and the last Index where the last alive GROUP object has been found.
--
-- You can use the methods @{#SPAWN.GetFirstAliveGroup} and sequently @{#SPAWN.GetNextAliveGroup} to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example.
-- The method @{#SPAWN.GetGroupFromIndex} will return the GROUP object reference from the given Index, dead or alive...
-- You can use the methods @{#SPAWN.GetFirstAliveGroup}() and sequently @{#SPAWN.GetNextAliveGroup}() to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example.
-- The method @{#SPAWN.GetGroupFromIndex}() will return the GROUP object reference from the given Index, dead or alive...
--
-- 1.5) SPAWN object cleaning
-- --------------------------
-- Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive.
-- In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't,
-- and it may occur that no new groups are or can be spawned as limits are reached.
-- To prevent this, a @{#SPAWN.CleanUp} initialization method has been defined that will silently monitor the status of each spawned group.
-- To prevent this, a @{#SPAWN.InitCleanUp}() initialization method has been defined that will silently monitor the status of each spawned group.
-- Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time.
-- There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"...
-- In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically.
-- This models AI that has succesfully returned to their airbase, to restart their combat activities.
-- Check the @{#SPAWN.CleanUp} for further info.
-- Check the @{#SPAWN.InitCleanUp}() for further info.
--
-- 1.6) Catch the @{Group} Spawn event!
-- ------------------------------------
-- 1.6) Catch the @{Group} spawn event in a callback function!
-- -----------------------------------------------------------
-- When using the SpawnScheduled method, new @{Group}s are created following the schedule timing parameters.
-- When a new @{Group} is spawned, you maybe want to execute actions with that group spawned at the spawn event.
-- To SPAWN class supports this functionality through the @{#SPAWN.OnSpawnGroup}( **function( SpawnedGroup ) end ** ) method, which takes a function as a parameter that you can define locally.
@ -109,7 +110,12 @@
--
-- Hereby the change log:
--
-- 2016-08-15: SPAWN:**InitRandomizeZones( SpawnZones ) added.
-- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval )
--
-- * Want to ensure that the methods starting with **Init** are the first called methods before any _Spawn_ method is called!
-- * This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
--
-- 2016-08-15: SPAWN:**InitRandomizeZones( SpawnZones )** added.
--
-- * This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types.
--
@ -184,7 +190,8 @@
--
--
-- @module Spawn
-- @author FlightControl
--- SPAWN Class
-- @type SPAWN
@ -478,7 +485,7 @@ end
-- @param #string SpawnCleanUpInterval The interval to check for inactive groups within seconds.
-- @return #SPAWN self
-- @usage Spawn_Helicopter:CleanUp( 20 ) -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.
function SPAWN:CleanUp( SpawnCleanUpInterval )
function SPAWN:InitCleanUp( SpawnCleanUpInterval )
self:F( { self.SpawnTemplatePrefix, SpawnCleanUpInterval } )
self.SpawnCleanUpInterval = SpawnCleanUpInterval
@ -1238,6 +1245,8 @@ function SPAWN:_RandomizeRoute( SpawnIndex )
end
end
self:_RandomizeZones( SpawnIndex )
return self
end
@ -1288,8 +1297,12 @@ function SPAWN:_RandomizeZones( SpawnIndex )
local SpawnVec2 = SpawnZone:GetRandomVec2()
self:T( { SpawnVec2 = SpawnVec2 } )
local SpawnTemplate = self.SpawnGroups[SpawnIndex].SpawnTemplate
self:T( { Route = SpawnTemplate.route } )
for UnitID = 1, #SpawnTemplate.units do
local UnitTemplate = SpawnTemplate.units[UnitID]
self:T( 'Before Translation SpawnTemplate.units['..UnitID..'].x = ' .. UnitTemplate.x .. ', SpawnTemplate.units['..UnitID..'].y = ' .. UnitTemplate.y )
@ -1310,10 +1323,9 @@ function SPAWN:_RandomizeZones( SpawnIndex )
SpawnTemplate.route.points[1].x = SpawnVec2.x
SpawnTemplate.route.points[1].y = SpawnVec2.y
end
self:_RandomizeRoute( SpawnIndex )
return self
end
function SPAWN:_TranslateRotate( SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle )

View File

@ -547,19 +547,20 @@ end
function ZONE_UNIT:GetRandomVec2()
self:F( self.ZoneName )
local Point = {}
local PointVec2 = self.ZoneUNIT:GetPointVec2()
if not PointVec2 then
PointVec2 = self.LastVec2
local RandomVec2 = {}
local Vec2 = self.ZoneUNIT:GetVec2()
if not Vec2 then
Vec2 = self.LastVec2
end
local angle = math.random() * math.pi*2;
Point.x = PointVec2.x + math.cos( angle ) * math.random() * self:GetRadius();
Point.y = PointVec2.y + math.sin( angle ) * math.random() * self:GetRadius();
RandomVec2.x = Vec2.x + math.cos( angle ) * math.random() * self:GetRadius();
RandomVec2.y = Vec2.y + math.sin( angle ) * math.random() * self:GetRadius();
self:T( { Point } )
self:T( { RandomVec2 } )
return Point
return RandomVec2
end
--- Returns the @{DCSTypes#Vec3} of the ZONE_UNIT.

View File

@ -22,6 +22,10 @@
- Added ZONE_BASE:GetZoneMaybe() method.
- Added SPAWN:InitRandomizeZones() method.
- Renamed SPAWN:CleanUp() method to SPAWN:InitCleanUp() method.
- Reviewed documentation of the PatrolZone module and PATROLZONE class.
2016-08-14

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,23 +2,41 @@
-- 100 groups of 1 unit will be spawned.
-- The test is about testing the zone randomization, and the place where the units are created.
local Iterations = 100
local Iteration = 1
local ZoneUnit = UNIT:FindByName( "ZoneUnit" )
-- The PolygonGroup route defines zone 1
local ZonePolygonGroup = GROUP:FindByName( "ZonePolygon" )
-- The ZoneUnit defines zone 4.
local ZoneUnit = UNIT:FindByName( "ZoneUnit" )
-- The ZoneGroup defines zone 5
local ZoneGroup = GROUP:FindByName( "ZoneGroup" )
-- This is the array that models the different zones types.
-- The selection of the zones is done by taking into account the probability of the zone.
-- The zone probabibility is 0 = 0%, 1 = 100%
-- The default value of the probability is 1.
-- Note that the SetZoneProbability is a method, that returns the self object of the zone,
-- allowing to use the method within the zone array declaration!
local SpawnZones = {
ZONE:New( "GroundZone1" ):SetZoneProbability( 0.2 ),
ZONE_UNIT:New( "GroundZone2", ZoneUnit, 1000 ):SetZoneProbability( 0.6 ),
ZONE_POLYGON:New( "GroundZone3", ZonePolygonGroup ):SetZoneProbability( 0.8 )
ZONE_POLYGON:New( "Zone 1", ZonePolygonGroup ):SetZoneProbability( 0.8 ),
ZONE_RADIUS:New( "Zone 2", ZONE:New( "GroundZone2" ):GetVec2(), 5000 ):SetZoneProbability( 0.2 ),
ZONE:New( "GroundZone3" ):SetZoneProbability( 0.2 ),
ZONE_UNIT:New( "Zone 4", ZoneUnit, 5000 ):SetZoneProbability( 0.6 ),
ZONE_GROUP:New( "Zone 5", ZoneGroup, 5000 ):SetZoneProbability( 0.4 ),
}
HeightLimit = 500
SpawnGrounds = SPAWN:New("Ground"):InitLimit( 100, 100 ):InitRandomizeZones( SpawnZones )
SpawnGrounds = SPAWN
:New("Ground")
:InitLimit( 100, 100 )
-- This method will randomize the selection of the zones for each spawned Group during initialization,
-- taking into account the probability factors.
-- When you explore the code behind this method, you'll see that the GetZoneMaybe() method is used to select "maybe" the zone.
:InitRandomizeZones( SpawnZones )
--- Spawns these groups slowly.
SCHEDULER:New( nil,

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>
@ -92,29 +91,67 @@
<hr/>
<h1>1) <a href="Patrol.html##(PATROLZONE)">Patrol#PATROLZONE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>The <a href="Patrol.html##(PATROLZONE)">Patrol#PATROLZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a>.</p>
<h1>1) <a href="##(PATROLZONE)">#PATROLZONE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>The <a href="##(PATROLZONE)">#PATROLZONE</a> class implements the core functions to patrol a <a href="Zone.html">Zone</a> by air units.
The PATROLZONE class will guide the airplanes towards the patrolzone.
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 point using a randomly selected speed within given boundary limits.
Upon arrival at the random point, a new random point will be selected within the patrol zone within boundary 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.</p>
<h2>1.1) PATROLZONE constructor:</h2>
<p><a href="PatrolZone.html##(PATROLZONE).New">PatrolZone#PATROLZONE.New</a>(): Creates a new PATROLZONE object.</p>
<p><a href="##(PATROLZONE).New">PATROLZONE.New</a>(): Creates a new PATROLZONE object.</p>
<h2>1.2) Modify the PATROLZONE parameters:</h2>
<p>The following methods are available to modify the parameters of a PATROLZONE object:</p>
<pre><code>* &lt;a href="PatrolZone.html##(PATROLZONE).SetGroup"&gt;PatrolZone#PATROLZONE.SetGroup&lt;/a&gt;(): Set the AI Patrol Group.
* &lt;a href="PatrolZone.html##(PATROLZONE).SetSpeed"&gt;PatrolZone#PATROLZONE.SetSpeed&lt;/a&gt;(): Set the patrol speed of the AI, for the next patrol.
* &lt;a href="PatrolZone.html##(PATROLZONE).SetAltitude"&gt;PatrolZone#PATROLZONE.SetAltitude&lt;/a&gt;(): Set altitude of the AI, for the next patrol.
</code></pre>
<ul>
<li><a href="##(PATROLZONE).SetGroup">PATROLZONE.SetGroup</a>(): Set the AI Patrol Group.</li>
<li><a href="##(PATROLZONE).SetSpeed">PATROLZONE.SetSpeed</a>(): Set the patrol speed of the AI, for the next patrol.</li>
<li><a href="##(PATROLZONE).SetAltitude">PATROLZONE.SetAltitude</a>(): Set altitude of the AI, for the next patrol.</li>
</ul>
<h2>1.3) Manage the out of fuel in the PATROLZONE:</h2>
<p>When the PatrolGroup is out of fuel, it is required that a new PatrolGroup is started, before the old PatrolGroup 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 PatrolGroup will continue for a given time its patrol task in orbit, while a new PatrolGroup is targetted to the PATROLZONE.
Once the time is finished, the old PatrolGroup will return to the base.
Use the method <a href="PatrolZone.html##(PATROLZONE).ManageFuel">PatrolZone#PATROLZONE.ManageFuel</a>() to have this proces in place.</p>
Use the method <a href="##(PATROLZONE).ManageFuel">PATROLZONE.ManageFuel</a>() to have this proces in place.</p>
<hr/>
<h1><strong>API CHANGE HISTORY</strong></h1>
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
<ul>
<li><strong>Added</strong> parts are expressed in bold type face.</li>
<li><em>Removed</em> parts are expressed in italic type face.</li>
</ul>
<p>Hereby the change log:</p>
<p>2016-07-01: Initial class and API.</p>
<hr/>
<h1>AUTHORS and CONTRIBUTIONS</h1>
<h3>Contributions:</h3>
<ul>
<li>DutchBaron: Testing.</li>
</ul>
<h3>Authors:</h3>
<ul>
<li>FlightControl: Design &amp; Programming</li>
</ul>
<h2>Global(s)</h2>
<table class="function_list">

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

View File

@ -59,7 +59,6 @@
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Process_Smoke.html">Process_Smoke</a></li>
<li><a href="STAGE.html">STAGE</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>

Some files were not shown because too many files have changed in this diff Show More