Update AI_A2G_Dispatcher.lua

More updates and fixes.

Update AI_A2G_Dispatcher.lua

General documentation updates.
This commit is contained in:
Tommy Carlsson 2021-12-01 11:22:36 +04:00
parent 1ad7c54ace
commit 48e8b1a9b3

View File

@ -7,14 +7,14 @@
-- * Setup quickly an A2G defense system for a coalition. -- * Setup quickly an A2G defense system for a coalition.
-- * Setup multiple defense zones to defend specific coordinates in your battlefield. -- * Setup multiple defense zones to defend specific coordinates in your battlefield.
-- * Setup (SEAD) Suppression of Air Defense squadrons, to gain control in the air of enemy grounds. -- * Setup (SEAD) Suppression of Air Defense squadrons, to gain control in the air of enemy grounds.
-- * Setup (CAS) Controlled Air Support squadrons, to attack closeby enemy ground units near friendly installations.
-- * Setup (BAI) Battleground Air Interdiction squadrons to attack remote enemy ground units and targets. -- * Setup (BAI) Battleground Air Interdiction squadrons to attack remote enemy ground units and targets.
-- * Setup (CAS) Controlled Air Support squadrons, to attack close by enemy ground units near friendly installations.
-- * Define and use a detection network controlled by recce. -- * Define and use a detection network controlled by recce.
-- * Define A2G defense squadrons at airbases, farps and carriers. -- * Define A2G defense squadrons at airbases, FARPs and carriers.
-- * Enable airbases for A2G defenses. -- * Enable airbases for A2G defenses.
-- * Add different planes and helicopter templates to squadrons. -- * Add different planes and helicopter templates to squadrons.
-- * Assign squadrons to execute a specific engagement type depending on threat level of the detected ground enemy unit composition. -- * Assign squadrons to execute a specific engagement type depending on threat level of the detected ground enemy unit composition.
-- * Add multiple squadrons to different airbases, farps or carriers. -- * Add multiple squadrons to different airbases, FARPs or carriers.
-- * Define different ranges to engage upon. -- * Define different ranges to engage upon.
-- * Establish an automatic in air refuel process for planes using refuel tankers. -- * Establish an automatic in air refuel process for planes using refuel tankers.
-- * Setup default settings for all squadrons and A2G defenses. -- * Setup default settings for all squadrons and A2G defenses.
@ -40,10 +40,10 @@
-- --
-- AI_A2G_DISPATCHER is the main A2G defense class that models the A2G defense system. -- AI_A2G_DISPATCHER is the main A2G defense class that models the A2G defense system.
-- --
-- Before you start using the AI_A2G_DISPATCHER, ask youself the following questions. -- Before you start using the AI_A2G_DISPATCHER, ask yourself the following questions:
-- --
-- --
-- ## 1. Which coalition am I modeling an A2G defense system for? blue or red? -- ## 1. Which coalition am I modeling an A2G defense system for? Blue or red?
-- --
-- One AI_A2G_DISPATCHER object can create a defense system for **one coalition**, which is blue or red. -- One AI_A2G_DISPATCHER object can create a defense system for **one coalition**, which is blue or red.
-- If you want to create a **mutual defense system**, for both blue and red, then you need to create **two** AI_A2G_DISPATCHER **objects**, -- If you want to create a **mutual defense system**, for both blue and red, then you need to create **two** AI_A2G_DISPATCHER **objects**,
@ -88,7 +88,7 @@
-- --
-- ## 4. How do the defenses decide **when and where to engage** on approaching enemy units? -- ## 4. How do the defenses decide **when and where to engage** on approaching enemy units?
-- --
-- The A2G dispacher needs you to setup (various) defense coordinates, which are strategic positions in the battle field to be defended. -- The A2G dispatcher needs you to setup (various) defense coordinates, which are strategic positions in the battle field to be defended.
-- Any ground based enemy approaching within the proximity of such a defense point, may trigger for a defensive action by friendly air units. -- Any ground based enemy approaching within the proximity of such a defense point, may trigger for a defensive action by friendly air units.
-- --
-- There are 2 important parameters that play a role in the defensive decision making: defensiveness and reactivity. -- There are 2 important parameters that play a role in the defensive decision making: defensiveness and reactivity.
@ -108,7 +108,7 @@
-- ## 5. Are defense coordinates and defense reactivity the only parameters? -- ## 5. Are defense coordinates and defense reactivity the only parameters?
-- --
-- No, depending on the target type, and the threat level of the target, the probability of defense will be higher. -- No, depending on the target type, and the threat level of the target, the probability of defense will be higher.
-- In other words, when a SAM-10 radar emitter is detected, its probabilty for defense will be much higher than when a BMP-1 vehicle is -- In other words, when a SAM-10 radar emitter is detected, its probability for defense will be much higher than when a BMP-1 vehicle is
-- detected, even when both enemies are at the same distance from a defense coordinate. -- detected, even when both enemies are at the same distance from a defense coordinate.
-- This will ensure optimal defenses, SEAD tasks will be launched much more quicker against engaging radar emitters, to ensure air superiority. -- This will ensure optimal defenses, SEAD tasks will be launched much more quicker against engaging radar emitters, to ensure air superiority.
-- Approaching main battle tanks will be engaged much faster, than a group of approaching trucks. -- Approaching main battle tanks will be engaged much faster, than a group of approaching trucks.
@ -117,25 +117,26 @@
-- ## 6. Which Squadrons will I create and which name will I give each Squadron? -- ## 6. Which Squadrons will I create and which name will I give each Squadron?
-- --
-- The A2G defense system works with **Squadrons**. Each Squadron must be given a unique name, that forms the **key** to the squadron. -- The A2G defense system works with **Squadrons**. Each Squadron must be given a unique name, that forms the **key** to the squadron.
-- Several options and activities can be set per Squadron. A free format name can be given, but always ensure that the name is meaningfull -- Several options and activities can be set per Squadron. A free format name can be given, but always ensure that the name is meaningful
-- for your mission, and remember that squadron names are used for communication to the players of your mission. -- for your mission, and remember that squadron names are used for communication to the players of your mission.
-- --
-- There are mainly 3 types of defenses: **SEAD**, **CAS** and **BAI**. -- There are mainly 3 types of defenses: **SEAD**, **BAI**, and **CAS**.
-- --
-- Suppression of Air Defenses (SEAD) are effective agains radar emitters. Close Air Support (CAS) is launched when the enemy is close near friendly units. -- Suppression of Air Defenses (SEAD) are effective against radar emitters.
-- Battleground Air Interdiction (BAI) tasks are launched when there are no friendlies around. -- Battleground Air Interdiction (BAI) tasks are launched when there are no friendlies around.
-- Close Air Support (CAS) is launched when the enemy is close near friendly units.
-- --
-- Depending on the defense type, different payloads will be needed. See further points on squadron definition. -- Depending on the defense type, different payloads will be needed. See further points on squadron definition.
-- --
-- --
-- ## 7. Where will the Squadrons be located? On Airbases? On Carrier Ships? On Farps? -- ## 7. Where will the Squadrons be located? On Airbases? On Carriers? On FARPs?
-- --
-- Squadrons are placed at the **home base** on an **airfield**, **carrier** or **farp**. -- Squadrons are placed at the **home base** on an **airfield**, **carrier** or **FARP**.
-- Carefully plan where each Squadron will be located as part of the defense system required for mission effective defenses. -- Carefully plan where each Squadron will be located as part of the defense system required for mission effective defenses.
-- If the home base of the squadron is too far from assumed enemy positions, then the defenses will be too late. -- If the home base of the squadron is too far from assumed enemy positions, then the defenses will be too late.
-- The home bases must be **behind** enemy lines, you want to prevent your home bases to be engaged by enemies! -- The home bases must be **behind** enemy lines, you want to prevent your home bases to be engaged by enemies!
-- Depending on the units applied for defenses, the home base can be further or closer to the enemies. -- Depending on the units applied for defenses, the home base can be further or closer to the enemies.
-- Any airbase, farp or carrier can act as the launching platform for A2G defenses. -- Any airbase, FARP, or carrier can act as the launching platform for A2G defenses.
-- Carefully plan which airbases will take part in the coalition. Color each airbase **in the color of the coalition**, using the mission editor, -- Carefully plan which airbases will take part in the coalition. Color each airbase **in the color of the coalition**, using the mission editor,
-- or your air units will not return for landing at the airbase! -- or your air units will not return for landing at the airbase!
-- --
@ -146,7 +147,7 @@
-- These are late activated groups with one airplane or helicopter that start with a specific name, called the **template prefix**. -- These are late activated groups with one airplane or helicopter that start with a specific name, called the **template prefix**.
-- The A2G defense system will select from the given templates a random template to spawn a new plane (group). -- The A2G defense system will select from the given templates a random template to spawn a new plane (group).
-- --
-- A squadron will perform specific task types (SEAD, CAS or BAI). So, squadrons will require specific templates for the -- A squadron will perform specific task types (SEAD, BAI or CAS). So, squadrons will require specific templates for the
-- task types it will perform. A squadron executing SEAD defenses, will require a payload with long range anti-radar seeking missiles. -- task types it will perform. A squadron executing SEAD defenses, will require a payload with long range anti-radar seeking missiles.
-- --
-- --
@ -160,7 +161,7 @@
-- ## 10. How do squadrons engage in a defensive action? -- ## 10. How do squadrons engage in a defensive action?
-- --
-- There are two ways how squadrons engage and execute your A2G defenses. -- There are two ways how squadrons engage and execute your A2G defenses.
-- Squadrons can start the defense directly from the airbase, farp or carrier. When a squadron launches a defensive group, that group -- Squadrons can start the defense directly from the airbase, FARP or carrier. When a squadron launches a defensive group, that group
-- will start directly from the airbase. The other way is to launch early on in the mission a patrolling mechanism. -- will start directly from the airbase. The other way is to launch early on in the mission a patrolling mechanism.
-- Squadrons will launch air units to patrol in specific zone(s), so that when ground enemy targets are detected, that the airborne -- Squadrons will launch air units to patrol in specific zone(s), so that when ground enemy targets are detected, that the airborne
-- A2G defenses can come immediately into action. -- A2G defenses can come immediately into action.
@ -180,7 +181,7 @@
-- ## 12. Are moving defense coordinates possible? -- ## 12. Are moving defense coordinates possible?
-- --
-- Yes, different COORDINATE types are possible to be used. -- Yes, different COORDINATE types are possible to be used.
-- The COORDINATE_UNIT will help you to specify a defense coodinate that is attached to a moving unit. -- The COORDINATE_UNIT will help you to specify a defense coordinate that is attached to a moving unit.
-- --
-- --
-- ## 13. How many defense coordinates do I need to create? -- ## 13. How many defense coordinates do I need to create?
@ -227,17 +228,17 @@
-- * Despawn after engine shutdown after landing -- * Despawn after engine shutdown after landing
-- --
-- **The default landing method is to despawn when near the airbase when returning.** -- **The default landing method is to despawn when near the airbase when returning.**
-- This landing method is the most useful if you want to avoid airplane clutter at airbases, but it is the least realistic one. -- This landing method is the most useful if you want to avoid aircraft clutter at airbases, but it is the least realistic one.
-- --
-- --
-- ## 19. For each Squadron, which **defense overhead** will I use? -- ## 19. For each Squadron, which **defense overhead** will I use?
-- --
-- For each Squadron, depending on the helicopter or airplane type (modern, old) and payload, which overhead is required to provide any defense? -- For each Squadron, depending on the helicopter or airplane type (modern, old) and payload, which overhead is required to provide any defense?
-- --
-- In other words, if **X** enemy ground units are detected, how many **Y** defense helicpters or airplanes need to engage (per squadron)? -- In other words, if **X** enemy ground units are detected, how many **Y** defense helicopters or airplanes need to engage (per squadron)?
-- The **Y** is dependent on the type of airplane (era), payload, fuel levels, skills etc. -- The **Y** is dependent on the type of aircraft (era), payload, fuel levels, skills etc.
-- But the most important factor is the payload, which is the amount of A2G weapons the defense can carry to attack the enemy ground units. -- But the most important factor is the payload, which is the amount of A2G weapons the defense can carry to attack the enemy ground units.
-- For example, a Ka-50 can carry 16 vikrs, that means, that it potentially can destroy at least 8 ground units without a reload of ammunication. -- For example, a Ka-50 can carry 16 Vikhrs, this means that it potentially can destroy at least 8 ground units without a reload of ammunition.
-- That means, that one defender can destroy more enemy ground units. -- That means, that one defender can destroy more enemy ground units.
-- Thus, the overhead is a **factor** that will calculate dynamically how many **Y** defenses will be required based on **X** attackers detected. -- Thus, the overhead is a **factor** that will calculate dynamically how many **Y** defenses will be required based on **X** attackers detected.
-- --
@ -277,7 +278,7 @@ do -- AI_A2G_DISPATCHER
-- Multiple defense coordinates can be setup. Defense coordinates can be strategic or tactical positions or references to strategic units or scenery. -- Multiple defense coordinates can be setup. Defense coordinates can be strategic or tactical positions or references to strategic units or scenery.
-- The A2G dispatcher will evaluate every x seconds the tactical situation around each defense coordinate. When a defense coordinate -- The A2G dispatcher will evaluate every x seconds the tactical situation around each defense coordinate. When a defense coordinate
-- is under threat, it will communicate through the command center that defensive actions need to be taken and will launch groups of air units for defense. -- is under threat, it will communicate through the command center that defensive actions need to be taken and will launch groups of air units for defense.
-- The level of threat to the defense coordinate varyies upon the strength and types of the enemy units, the distance to the defense point, and the defensiveness parameters. -- The level of threat to the defense coordinate varies upon the strength and types of the enemy units, the distance to the defense point, and the defensiveness parameters.
-- Defensive actions are taken through probability, but the closer and the more threat the enemy poses to the defense coordinate, the faster it will be attacked by friendly A2G units. -- Defensive actions are taken through probability, but the closer and the more threat the enemy poses to the defense coordinate, the faster it will be attacked by friendly A2G units.
-- --
-- Please study carefully the underlying explanations how to setup and use this module, as it has many features. -- Please study carefully the underlying explanations how to setup and use this module, as it has many features.
@ -288,6 +289,7 @@ do -- AI_A2G_DISPATCHER
-- --
-- # USAGE GUIDE -- # USAGE GUIDE
-- --
--
-- ## 1. AI\_A2G\_DISPATCHER constructor: -- ## 1. AI\_A2G\_DISPATCHER constructor:
-- --
-- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\AI_A2G_DISPATCHER-ME_1.JPG) -- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\AI_A2G_DISPATCHER-ME_1.JPG)
@ -295,6 +297,7 @@ do -- AI_A2G_DISPATCHER
-- --
-- The @{#AI_A2G_DISPATCHER.New}() method creates a new AI_A2G_DISPATCHER instance. -- The @{#AI_A2G_DISPATCHER.New}() method creates a new AI_A2G_DISPATCHER instance.
-- --
--
-- ### 1.1. Define the **reconnaissance network**: -- ### 1.1. Define the **reconnaissance network**:
-- --
-- As part of the AI_A2G_DISPATCHER :New() constructor, a reconnaissance network must be given as the first parameter. -- As part of the AI_A2G_DISPATCHER :New() constructor, a reconnaissance network must be given as the first parameter.
@ -326,11 +329,11 @@ do -- AI_A2G_DISPATCHER
-- By spawning in dynamically additional recce, you can ensure that there is sufficient reconnaissance coverage so the defense mechanism is continuously -- By spawning in dynamically additional recce, you can ensure that there is sufficient reconnaissance coverage so the defense mechanism is continuously
-- alerted of new enemy ground targets. -- alerted of new enemy ground targets.
-- --
-- The following example defens a new reconnaissance network using a @{Functional.Detection#DETECTION_AREAS} object. -- The following is an example defense of a new reconnaissance network using a @{Functional.Detection#DETECTION_AREAS} object.
-- --
-- -- Define a SET_GROUP object that builds a collection of groups that define the recce network. -- -- Define a SET_GROUP object that builds a collection of groups that define the recce network.
-- -- Here we build the network with all the groups that have a name starting with CCCP Recce. -- -- Here we build the network with all the groups that have a name starting with CCCP Recce.
-- DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. -- DetectionSetGroup = SET_GROUP:New() -- Define a set of group objects, called DetectionSetGroup.
-- --
-- DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". -- DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce".
-- --
@ -352,11 +355,12 @@ do -- AI_A2G_DISPATCHER
-- **DetectionSetGroup** is then calling `FilterStart()`, which is starting the dynamic filtering or inclusion of these groups. -- **DetectionSetGroup** is then calling `FilterStart()`, which is starting the dynamic filtering or inclusion of these groups.
-- Note that any destroy or new spawn of a group having a name, starting with the above prefix, will be removed or added to the set. -- Note that any destroy or new spawn of a group having a name, starting with the above prefix, will be removed or added to the set.
-- --
-- Then a new detection object is created from the class `DETECTION_AREAS`. A grouping radius of 1000 meters (1km) is choosen. -- Then a new detection object is created from the class `DETECTION_AREAS`. A grouping radius of 1000 meters (1km) is chosen.
-- --
-- The `Detection` object is then passed to the @{#AI_A2G_DISPATCHER.New}() method to indicate the reconnaissance network -- The `Detection` object is then passed to the @{#AI_A2G_DISPATCHER.New}() method to indicate the reconnaissance network
-- configuration and setup the A2G defense detection mechanism. -- configuration and setup the A2G defense detection mechanism.
-- --
--
-- ### 1.2. Setup the A2G dispatcher for both a red and blue coalition. -- ### 1.2. Setup the A2G dispatcher for both a red and blue coalition.
-- --
-- Following the above described procedure, you'll need to create for each coalition an separate detection network, and a separate A2G dispatcher. -- Following the above described procedure, you'll need to create for each coalition an separate detection network, and a separate A2G dispatcher.
@ -372,19 +376,20 @@ do -- AI_A2G_DISPATCHER
-- DetectionBlue = DETECTION_AREAS:New( DetectionSetGroupBlue, 1000 ) -- DetectionBlue = DETECTION_AREAS:New( DetectionSetGroupBlue, 1000 )
-- A2GDispatcherBlue = AI_A2G_DISPATCHER:New( DetectionBlue ) -- A2GDispatcherBlue = AI_A2G_DISPATCHER:New( DetectionBlue )
-- --
--
-- Note: Also the SET_GROUP objects should be created for each coalition separately, containing each red and blue recce respectively! -- Note: Also the SET_GROUP objects should be created for each coalition separately, containing each red and blue recce respectively!
-- --
--
-- ### 1.3. Define the enemy ground target **grouping radius**, in case you use DETECTION_AREAS: -- ### 1.3. Define the enemy ground target **grouping radius**, in case you use DETECTION_AREAS:
-- --
-- The target grouping radius is a property of the DETECTION_AREAS class, that was passed to the AI_A2G_DISPATCHER:New() method, -- The target grouping radius is a property of the DETECTION_AREAS class, that was passed to the AI_A2G_DISPATCHER:New() method
-- but can be changed. The grouping radius should not be too small, but also depends on the types of ground forces and the way you want your mission to evolve. -- but can be changed. The grouping radius should not be too small, but also depends on the types of ground forces and the way you want your mission to evolve.
-- A large radius will mean large groups of enemy ground targets, while making smaller groups will result in a more fragmented defense system. -- A large radius will mean large groups of enemy ground targets, while making smaller groups will result in a more fragmented defense system.
-- Typically I suggest a grouping radius of 1km. This is the right balance to create efficient defenses. -- Typically I suggest a grouping radius of 1km. This is the right balance to create efficient defenses.
-- --
-- Note that detected targets are constantly re-grouped, that is, when certain detected enemy ground units are moving further than the group radius, -- Note that detected targets are constantly re-grouped, that is, when certain detected enemy ground units are moving further than the group radius
-- then these units will become a separate area being detected. This may result in additional defenses being started by the dispatcher! -- then these units will become a separate area being detected. This may result in additional defenses being started by the dispatcher,
-- So don't make this value too small! Again, I advise about 1km or 1000 meters. -- so don't make this value too small! Again, about 1km, or 1000 meters, is recommended.
--
-- --
-- ## 2. Setup (a) **Defense Coordinate(s)**. -- ## 2. Setup (a) **Defense Coordinate(s)**.
-- --
@ -427,6 +432,7 @@ do -- AI_A2G_DISPATCHER
-- This defines an A2G dispatcher which will engage on enemy ground targets within 30km radius around the defense coordinate. -- This defines an A2G dispatcher which will engage on enemy ground targets within 30km radius around the defense coordinate.
-- Note that the defense radius **applies to all defense coordinates** defined within the A2G dispatcher. -- Note that the defense radius **applies to all defense coordinates** defined within the A2G dispatcher.
-- --
--
-- ### 2.2. The **Defense Reactivity**. -- ### 2.2. The **Defense Reactivity**.
-- --
-- There are three levels that can be configured to tweak the defense reactivity. As explained above, the threat to a defense coordinate is -- There are three levels that can be configured to tweak the defense reactivity. As explained above, the threat to a defense coordinate is
@ -444,11 +450,12 @@ do -- AI_A2G_DISPATCHER
-- --
-- This defines an A2G dispatcher with high defense reactivity. -- This defines an A2G dispatcher with high defense reactivity.
-- --
--
-- ## 3. **Squadrons**. -- ## 3. **Squadrons**.
-- --
-- The A2G dispatcher works with **Squadrons**, that need to be defined using the different methods available. -- The A2G dispatcher works with **Squadrons**, that need to be defined using the different methods available.
-- --
-- Use the method @{#AI_A2G_DISPATCHER.SetSquadron}() to **setup a new squadron** active at an airfield, farp or carrier, -- Use the method @{#AI_A2G_DISPATCHER.SetSquadron}() to **setup a new squadron** active at an airfield, FARP or carrier,
-- while defining which helicopter or plane **templates** are being used by the squadron and how many **resources** are available. -- while defining which helicopter or plane **templates** are being used by the squadron and how many **resources** are available.
-- --
-- **Multiple squadrons** can be defined within one A2G dispatcher, each having specific defense tasks and defense parameter settings! -- **Multiple squadrons** can be defined within one A2G dispatcher, each having specific defense tasks and defense parameter settings!
@ -471,7 +478,7 @@ do -- AI_A2G_DISPATCHER
-- the mission designer can choose to increase or reduce the amount of planes spawned. -- the mission designer can choose to increase or reduce the amount of planes spawned.
-- --
-- The method @{#AI_A2G_DISPATCHER.SetSquadron}() defines for you a new squadron. -- The method @{#AI_A2G_DISPATCHER.SetSquadron}() defines for you a new squadron.
-- The provided parameters are the squadron name, airbase name and a list of template prefixe, and a number that indicates the amount of resources. -- The provided parameters are the squadron name, airbase name and a list of template prefixes, and a number that indicates the amount of resources.
-- --
-- For example, this defines 3 new squadrons: -- For example, this defines 3 new squadrons:
-- --
@ -487,16 +494,17 @@ do -- AI_A2G_DISPATCHER
-- Squadrons can be commanded to execute 3 types of tasks, as explained above: -- Squadrons can be commanded to execute 3 types of tasks, as explained above:
-- --
-- - SEAD: Suppression of Air Defenses, which are ground targets that have medium or long range radar emitters. -- - SEAD: Suppression of Air Defenses, which are ground targets that have medium or long range radar emitters.
-- - BAI : Battlefield Air Interdiction, which are targets further away from the front-line.
-- - CAS : Close Air Support, when there are enemy ground targets close to friendly units. -- - CAS : Close Air Support, when there are enemy ground targets close to friendly units.
-- - BAI : Battlefield Air Interdiction, which are targets further away from the frond-line.
-- --
-- You need to configure each squadron which task types you want it to perform. Read on ... -- You need to configure each squadron which task types you want it to perform. Read on ...
-- --
--
-- ### 3.2. Squadrons enemy ground target **engagement types**. -- ### 3.2. Squadrons enemy ground target **engagement types**.
-- --
-- There are two ways how targets can be engaged: directly **on call** from the airfield, farp or carrier, or through a **patrol**. -- There are two ways how targets can be engaged: directly **on call** from the airfield, FARP or carrier, or through a **patrol**.
-- --
-- Patrols are extremely handy, as these will airborne your helicopters or airplanes in advance. They will patrol in defined zones outlined, -- Patrols are extremely handy, as these will get your helicopters or airplanes airborne in advance. They will patrol in defined zones outlined,
-- and will engage with the targets once commanded. If the patrol zone is close enough to the enemy ground targets, then the time required -- and will engage with the targets once commanded. If the patrol zone is close enough to the enemy ground targets, then the time required
-- to engage is heavily minimized! -- to engage is heavily minimized!
-- --
@ -504,13 +512,14 @@ do -- AI_A2G_DISPATCHER
-- --
-- The mission designer needs to carefully balance the need for patrols or the need for engagement on call from the airfields. -- The mission designer needs to carefully balance the need for patrols or the need for engagement on call from the airfields.
-- --
--
-- ### 3.3. Squadron **on call** engagement. -- ### 3.3. Squadron **on call** engagement.
-- --
-- So to make squadrons engage targets from the airfields, use the following methods: -- So to make squadrons engage targets from the airfields, use the following methods:
-- --
-- - For SEAD, use the @{#AI_A2G_DISPATCHER.SetSquadronSead}() method. -- - For SEAD, use the @{#AI_A2G_DISPATCHER.SetSquadronSead}() method.
-- - For CAS, use the @{#AI_A2G_DISPATCHER.SetSquadronCas}() method.
-- - For BAI, use the @{#AI_A2G_DISPATCHER.SetSquadronBai}() method. -- - For BAI, use the @{#AI_A2G_DISPATCHER.SetSquadronBai}() method.
-- - For CAS, use the @{#AI_A2G_DISPATCHER.SetSquadronCas}() method.
-- --
-- Note that for the tasks, specific helicopter or airplane templates are required to be used, which you can configure using your mission editor. -- Note that for the tasks, specific helicopter or airplane templates are required to be used, which you can configure using your mission editor.
-- Especially the payload (weapons configuration) is important to get right. -- Especially the payload (weapons configuration) is important to get right.
@ -520,11 +529,12 @@ do -- AI_A2G_DISPATCHER
-- A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP KA-50 SEAD" }, 10 ) -- A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP KA-50 SEAD" }, 10 )
-- A2GDispatcher:SetSquadronSead( "Maykop SEAD", 120, 250 ) -- A2GDispatcher:SetSquadronSead( "Maykop SEAD", 120, 250 )
-- --
-- A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50 BAI" }, 10 )
-- A2GDispatcher:SetSquadronBai( "Maykop BAI", 120, 250 )
--
-- A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50 CAS" }, 10 ) -- A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50 CAS" }, 10 )
-- A2GDispatcher:SetSquadronCas( "Maykop CAS", 120, 250 ) -- A2GDispatcher:SetSquadronCas( "Maykop CAS", 120, 250 )
-- --
-- A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50 BAI" }, 10 )
-- A2GDispatcher:SetSquadronBai( "Maykop BAI", 120, 250 )
-- --
-- ### 3.4. Squadron **on patrol engagement**. -- ### 3.4. Squadron **on patrol engagement**.
-- --
@ -534,14 +544,14 @@ do -- AI_A2G_DISPATCHER
-- So to make squadrons engage targets from a patrol zone, use the following methods: -- So to make squadrons engage targets from a patrol zone, use the following methods:
-- --
-- - For SEAD, use the @{#AI_A2G_DISPATCHER.SetSquadronSeadPatrol}() method. -- - For SEAD, use the @{#AI_A2G_DISPATCHER.SetSquadronSeadPatrol}() method.
-- - For CAS, use the @{#AI_A2G_DISPATCHER.SetSquadronCasPatrol}() method.
-- - For BAI, use the @{#AI_A2G_DISPATCHER.SetSquadronBaiPatrol}() method. -- - For BAI, use the @{#AI_A2G_DISPATCHER.SetSquadronBaiPatrol}() method.
-- - For CAS, use the @{#AI_A2G_DISPATCHER.SetSquadronCasPatrol}() method.
-- --
-- Because a patrol requires more parameters, the following methods must be used to fine-tune the patrols for each squadron. -- Because a patrol requires more parameters, the following methods must be used to fine-tune the patrols for each squadron.
-- --
-- - For SEAD, use the @{#AI_A2G_DISPATCHER.SetSquadronSeadPatrolInterval}() method. -- - For SEAD, use the @{#AI_A2G_DISPATCHER.SetSquadronSeadPatrolInterval}() method.
-- - For CAS, use the @{#AI_A2G_DISPATCHER.SetSquadronCasPatrolInterval}() method.
-- - For BAI, use the @{#AI_A2G_DISPATCHER.SetSquadronBaiPatrolInterval}() method. -- - For BAI, use the @{#AI_A2G_DISPATCHER.SetSquadronBaiPatrolInterval}() method.
-- - For CAS, use the @{#AI_A2G_DISPATCHER.SetSquadronCasPatrolInterval}() method.
-- --
-- Here an example to setup patrols of various task types: -- Here an example to setup patrols of various task types:
-- --
@ -549,16 +559,16 @@ do -- AI_A2G_DISPATCHER
-- A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 300, 500, 50, 80, 250, 300 ) -- A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 300, 500, 50, 80, 250, 300 )
-- A2GDispatcher:SetSquadronPatrolInterval( "Maykop SEAD", 2, 30, 60, 1, "SEAD" ) -- A2GDispatcher:SetSquadronPatrolInterval( "Maykop SEAD", 2, 30, 60, 1, "SEAD" )
-- --
-- A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50 CAS" }, 10 )
-- A2GDispatcher:SetSquadronCasPatrol( "Maykop CAS", PatrolZone, 600, 700, 50, 80, 250, 300 )
-- A2GDispatcher:SetSquadronPatrolInterval( "Maykop CAS", 2, 30, 60, 1, "CAS" )
--
-- A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50 BAI" }, 10 ) -- A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50 BAI" }, 10 )
-- A2GDispatcher:SetSquadronBaiPatrol( "Maykop BAI", PatrolZone, 800, 900, 50, 80, 250, 300 ) -- A2GDispatcher:SetSquadronBaiPatrol( "Maykop BAI", PatrolZone, 800, 900, 50, 80, 250, 300 )
-- A2GDispatcher:SetSquadronPatrolInterval( "Maykop BAI", 2, 30, 60, 1, "BAI" ) -- A2GDispatcher:SetSquadronPatrolInterval( "Maykop BAI", 2, 30, 60, 1, "BAI" )
-- --
-- A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50 CAS" }, 10 )
-- A2GDispatcher:SetSquadronCasPatrol( "Maykop CAS", PatrolZone, 600, 700, 50, 80, 250, 300 )
-- A2GDispatcher:SetSquadronPatrolInterval( "Maykop CAS", 2, 30, 60, 1, "CAS" )
-- --
-- ### 3.5. Set squadron take-off methods --
-- ### 3.5. Set squadron takeoff methods
-- --
-- Use the various SetSquadronTakeoff... methods to control how squadrons are taking-off from the home airfield, FARP or ship. -- Use the various SetSquadronTakeoff... methods to control how squadrons are taking-off from the home airfield, FARP or ship.
-- --
@ -579,17 +589,17 @@ do -- AI_A2G_DISPATCHER
-- * aircraft may be awaiting the landing of a plane currently in the air, but never lands ... -- * aircraft may be awaiting the landing of a plane currently in the air, but never lands ...
-- --
-- Currently within the DCS engine, the airfield traffic coordination is erroneous and contains a lot of bugs. -- Currently within the DCS engine, the airfield traffic coordination is erroneous and contains a lot of bugs.
-- If you experience while testing problems with aircraft take-off or landing, please use one of the above methods as a solution to workaround these issues! -- If you experience while testing problems with aircraft takeoff or landing, please use one of the above methods as a solution to workaround these issues!
-- --
-- This example sets the default takeoff method to be from the runway. -- This example sets the default takeoff method to be from the runway.
-- And for a couple of squadrons overrides this default method. -- And for a couple of squadrons overrides this default method.
-- --
-- -- Setup the Takeoff methods -- -- Setup the takeoff methods
-- --
-- -- The default takeoff -- -- Set the default takeoff method
-- A2GDispatcher:SetDefaultTakeOffFromRunway() -- A2GDispatcher:SetDefaultTakeoffFromRunway()
-- --
-- -- The individual takeoff per squadron -- -- Set the individual squadrons takeoff method
-- A2GDispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2G_DISPATCHER.Takeoff.Air ) -- A2GDispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2G_DISPATCHER.Takeoff.Air )
-- A2GDispatcher:SetSquadronTakeoffInAir( "Sochi" ) -- A2GDispatcher:SetSquadronTakeoffInAir( "Sochi" )
-- A2GDispatcher:SetSquadronTakeoffFromRunway( "Mozdok" ) -- A2GDispatcher:SetSquadronTakeoffFromRunway( "Mozdok" )
@ -606,6 +616,7 @@ do -- AI_A2G_DISPATCHER
-- As part of the method @{#AI_A2G_DISPATCHER.SetSquadronTakeoffInAir}() a parameter can be specified to set the takeoff altitude. -- As part of the method @{#AI_A2G_DISPATCHER.SetSquadronTakeoffInAir}() a parameter can be specified to set the takeoff altitude.
-- If this parameter is not specified, then the default altitude will be used for the squadron. -- If this parameter is not specified, then the default altitude will be used for the squadron.
-- --
--
-- ### 3.5.2. Set Squadron takeoff interval. -- ### 3.5.2. Set Squadron takeoff interval.
-- --
-- The different types of available airfields have different amounts of available launching platforms: -- The different types of available airfields have different amounts of available launching platforms:
@ -617,9 +628,9 @@ do -- AI_A2G_DISPATCHER
-- Depending on the demand of requested takeoffs by the A2G dispatcher, an airfield can become overloaded. Too many aircraft need to be taken -- Depending on the demand of requested takeoffs by the A2G dispatcher, an airfield can become overloaded. Too many aircraft need to be taken
-- off at the same time, which will result in clutter as described above. In order to better control this behaviour, a takeoff scheduler is implemented, -- off at the same time, which will result in clutter as described above. In order to better control this behaviour, a takeoff scheduler is implemented,
-- which can be used to control how many aircraft are ordered for takeoff between specific time intervals. -- which can be used to control how many aircraft are ordered for takeoff between specific time intervals.
-- The takeff intervals can be specified per squadron, which make sense, as each squadron have a "home" airfield. -- The takeoff intervals can be specified per squadron, which make sense, as each squadron have a "home" airfield.
-- --
-- For this purpose, the method @{#AI_A2G_DISPATCHER.SetSquadronTakeOffInterval}() can be used to specify the takeoff intervals of -- For this purpose, the method @{#AI_A2G_DISPATCHER.SetSquadronTakeoffInterval}() can be used to specify the takeoff intervals of
-- aircraft groups per squadron to avoid cluttering of aircraft at airbases. -- aircraft groups per squadron to avoid cluttering of aircraft at airbases.
-- This is especially useful for FARPs and ships. Each takeoff dispatch is queued by the dispatcher and when the interval time -- This is especially useful for FARPs and ships. Each takeoff dispatch is queued by the dispatcher and when the interval time
-- has been reached, a new group will be spawned or activated for takeoff. -- has been reached, a new group will be spawned or activated for takeoff.
@ -632,8 +643,8 @@ do -- AI_A2G_DISPATCHER
-- -- Imagine a squadron launched from a FARP, with a grouping of 4. -- -- Imagine a squadron launched from a FARP, with a grouping of 4.
-- -- Aircraft will cold start from the FARP, and thus, a maximum of 4 aircraft can be launched at the same time. -- -- Aircraft will cold start from the FARP, and thus, a maximum of 4 aircraft can be launched at the same time.
-- -- Additionally, depending on the group composition of the aircraft, defending units will be ordered for takeoff together. -- -- Additionally, depending on the group composition of the aircraft, defending units will be ordered for takeoff together.
-- -- It takes about 3 to 4 minutes to takeoff helicopters from FARPs in cold start. -- -- It takes about 3 to 4 minutes for helicopters to takeoff from FARPs in cold start.
-- A2GDispatcher:SetSquadronTakeOffInterval( "Mineralnye", 60 * 4 ) -- A2GDispatcher:SetSquadronTakeoffInterval( "Mineralnye", 60 * 4 )
-- --
-- --
-- ### 3.6. Set squadron landing methods -- ### 3.6. Set squadron landing methods
@ -645,7 +656,7 @@ do -- AI_A2G_DISPATCHER
-- * @{#AI_A2G_DISPATCHER.SetSquadronLandingAtRunway}() will despawn the returning aircraft directly after landing at the runway. -- * @{#AI_A2G_DISPATCHER.SetSquadronLandingAtRunway}() will despawn the returning aircraft directly after landing at the runway.
-- * @{#AI_A2G_DISPATCHER.SetSquadronLandingAtEngineShutdown}() will despawn the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines. -- * @{#AI_A2G_DISPATCHER.SetSquadronLandingAtEngineShutdown}() will despawn the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines.
-- --
-- You can use these methods to minimize the airbase coodination overhead and to increase the airbase efficiency. -- You can use these methods to minimize the airbase coordination overhead and to increase the airbase efficiency.
-- When there are lots of aircraft returning for landing, at the same airbase, the takeoff process will be halted, which can cause a complete failure of the -- When there are lots of aircraft returning for landing, at the same airbase, the takeoff process will be halted, which can cause a complete failure of the
-- A2G defense system, as no new SEAD, BAI or CAS planes can takeoff. -- A2G defense system, as no new SEAD, BAI or CAS planes can takeoff.
-- Note that the method @{#AI_A2G_DISPATCHER.SetSquadronLandingNearAirbase}() will only work for returning aircraft, not for damaged or out of fuel aircraft. -- Note that the method @{#AI_A2G_DISPATCHER.SetSquadronLandingNearAirbase}() will only work for returning aircraft, not for damaged or out of fuel aircraft.
@ -722,13 +733,13 @@ do -- AI_A2G_DISPATCHER
-- --
-- Use the method @{#AI_A2G_DISPATCHER.SetSquadronEngageLimit}() to limit the amount of aircraft that will engage with the enemy, per squadron. -- Use the method @{#AI_A2G_DISPATCHER.SetSquadronEngageLimit}() to limit the amount of aircraft that will engage with the enemy, per squadron.
-- --
-- ## 4. Set the **fuel treshold**. -- ## 4. Set the **fuel threshold**.
-- --
-- When aircraft get **out of fuel** to a certain %-tage, which is by default **15% (0.15)**, there are two possible actions that can be taken: -- When an aircraft gets **out of fuel** with only a certain % of fuel left, which is **15% (0.15)** by default, there are two possible actions that can be taken:
-- - The aircraft will go RTB, and will be replaced with a new aircraft if possible. -- - The aircraft will go RTB, and will be replaced with a new aircraft if possible.
-- - The aircraft will refuel at a tanker, if a tanker has been specified for the squadron. -- - The aircraft will refuel at a tanker, if a tanker has been specified for the squadron.
-- --
-- Use the method @{#AI_A2G_DISPATCHER.SetSquadronFuelThreshold}() to set the **squadron fuel treshold** of the aircraft for all squadrons. -- Use the method @{#AI_A2G_DISPATCHER.SetSquadronFuelThreshold}() to set the **squadron fuel threshold** of the aircraft for all squadrons.
-- --
-- ## 6. Other configuration options -- ## 6. Other configuration options
-- --
@ -759,7 +770,7 @@ do -- AI_A2G_DISPATCHER
-- --
-- ## 10.2. Default landing behaviour. -- ## 10.2. Default landing behaviour.
-- --
-- The default landing behaviour is set to **near the airbase**, which means that returning airplanes will be despawned directly in the air by default. -- The default landing behaviour is set to **near the airbase**, which means that returning aircraft will be despawned directly in the air by default.
-- --
-- The default landing method can be set for ALL squadrons that don't have an individual landing method configured. -- The default landing method can be set for ALL squadrons that don't have an individual landing method configured.
-- --
@ -778,23 +789,23 @@ do -- AI_A2G_DISPATCHER
-- --
-- ## 10.4. Default **grouping**. -- ## 10.4. Default **grouping**.
-- --
-- The default grouping is set to **one airplane**. That essentially means that there won't be any grouping applied by default. -- The default grouping is set to **one aircraft**. That essentially means that there won't be any grouping applied by default.
-- --
-- The default grouping value can be set for ALL squadrons that don't have an individual grouping value configured. -- The default grouping value can be set for ALL squadrons that don't have an individual grouping value configured.
-- --
-- Use the method @{#AI_A2G_DISPATCHER.SetDefaultGrouping}() to set the **default grouping** of spawned airplanes for all squadrons. -- Use the method @{#AI_A2G_DISPATCHER.SetDefaultGrouping}() to set the **default grouping** of spawned aircraft for all squadrons.
-- --
-- ## 10.5. Default RTB fuel treshold. -- ## 10.5. Default RTB fuel threshold.
-- --
-- When an airplane gets **out of fuel** to a certain %-tage, which is **15% (0.15)**, it will go RTB, and will be replaced with a new airplane when applicable. -- When an aircraft gets **out of fuel** with only a certain % of fuel left, which is **15% (0.15)** by default, it will go RTB, and will be replaced with a new aircraft when applicable.
-- --
-- Use the method @{#AI_A2G_DISPATCHER.SetDefaultFuelThreshold}() to set the **default fuel treshold** of spawned airplanes for all squadrons. -- Use the method @{#AI_A2G_DISPATCHER.SetDefaultFuelThreshold}() to set the **default fuel threshold** of spawned aircraft for all squadrons.
-- --
-- ## 10.6. Default RTB damage treshold. -- ## 10.6. Default RTB damage threshold.
-- --
-- When an airplane is **damaged** to a certain %-tage, which is **40% (0.40)**, it will go RTB, and will be replaced with a new airplane when applicable. -- When an aircraft is **damaged** to a certain %, which is **40% (0.40)** by default, it will go RTB, and will be replaced with a new aircraft when applicable.
-- --
-- Use the method @{#AI_A2G_DISPATCHER.SetDefaultDamageThreshold}() to set the **default damage treshold** of spawned airplanes for all squadrons. -- Use the method @{#AI_A2G_DISPATCHER.SetDefaultDamageThreshold}() to set the **default damage threshold** of spawned aircraft for all squadrons.
-- --
-- ## 10.7. Default settings for **patrol**. -- ## 10.7. Default settings for **patrol**.
-- --
@ -820,14 +831,14 @@ do -- AI_A2G_DISPATCHER
-- Note that you can still change the patrol limit and patrol time intervals for each patrol individually using -- Note that you can still change the patrol limit and patrol time intervals for each patrol individually using
-- the @{#AI_A2G_DISPATCHER.SetSquadronPatrolTimeInterval}() method. -- the @{#AI_A2G_DISPATCHER.SetSquadronPatrolTimeInterval}() method.
-- --
-- ## 10.7.3. Default tanker for refuelling when executing SEAD, BAI and CAS. -- ## 10.7.3. Default tanker for refuelling when executing SEAD, BAI and CAS operations.
-- --
-- Instead of sending SEAD, BAI and CAS to RTB when out of fuel, you can let SEAD, BAI and CAS refuel in mid air using a tanker. -- Instead of sending SEAD, BAI and CAS aircraft to RTB when out of fuel, you can let SEAD, BAI and CAS aircraft refuel in mid air using a tanker.
-- This greatly increases the efficiency of your SEAD, BAI and CAS operations. -- This greatly increases the efficiency of your SEAD, BAI and CAS operations.
-- --
-- In the mission editor, setup a group with task Refuelling. A tanker unit of the correct coalition will be automatically selected. -- In the mission editor, setup a group with task Refuelling. A tanker unit of the correct coalition will be automatically selected.
-- Then, use the method @{#AI_A2G_DISPATCHER.SetDefaultTanker}() to set the tanker for the dispatcher. -- Then, use the method @{#AI_A2G_DISPATCHER.SetDefaultTanker}() to set the tanker for the dispatcher.
-- Use the method @{#AI_A2G_DISPATCHER.SetDefaultFuelThreshold}() to set the %-tage left in the defender airplane tanks when a refuel action is needed. -- Use the method @{#AI_A2G_DISPATCHER.SetDefaultFuelThreshold}() to set the % left in the defender aircraft tanks when a refuel action is needed.
-- --
-- When the tanker specified is alive and in the air, the tanker will be used for refuelling. -- When the tanker specified is alive and in the air, the tanker will be used for refuelling.
-- --
@ -835,9 +846,9 @@ do -- AI_A2G_DISPATCHER
-- --
-- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\AI_A2G_DISPATCHER-ME_11.JPG) -- ![Banner Image](..\Presentations\AI_A2G_DISPATCHER\AI_A2G_DISPATCHER-ME_11.JPG)
-- --
-- -- Set the default tanker for refuelling to "Tanker", when the default fuel treshold has reached 90% fuel left. -- -- Set the default tanker for refuelling to "Tanker", when the default fuel threshold has reached 90% fuel left.
-- A2ADispatcher:SetDefaultFuelThreshold( 0.9 ) -- A2GDispatcher:SetDefaultFuelThreshold( 0.9 )
-- A2ADispatcher:SetDefaultTanker( "Tanker" ) -- A2GDispatcher:SetDefaultTanker( "Tanker" )
-- --
-- ## 10.8. Default settings for GCI. -- ## 10.8. Default settings for GCI.
-- --
@ -871,9 +882,9 @@ do -- AI_A2G_DISPATCHER
-- --
-- Different squadrons can be located at one airbase. -- Different squadrons can be located at one airbase.
-- If the airbase gets captured, that is when there is an enemy unit near the airbase and there are no friendlies at the airbase, the airbase will change coalition ownership. -- If the airbase gets captured, that is when there is an enemy unit near the airbase and there are no friendlies at the airbase, the airbase will change coalition ownership.
-- As a result, the SEAD, BAI and CAS will stop. -- As a result, further SEAD, BAI, and CAS operations from that airbase will stop.
-- However, the squadron will still stay alive. Any airplane that is airborne will continue its operations until all airborne airplanes -- However, the squadron will still stay alive. Any aircraft that is airborne will continue its operations until all airborne aircraft
-- of the squadron will be destroyed. This to keep consistency of air operations not to confuse the players. -- of the squadron are destroyed. This is to keep consistency of air operations and avoid confusing players.
-- --
-- --
-- --
@ -930,7 +941,7 @@ do -- AI_A2G_DISPATCHER
-- @field #string SquadronName The name of the squadron. -- @field #string SquadronName The name of the squadron.
--- Queue of planned defenses to be launched. --- Queue of planned defenses to be launched.
-- This queue exists because defenses must be launched from FARPS, in the air, from airbases, or from carriers. -- This queue exists because defenses must be launched from FARPs, in the air, from airbases, or from carriers.
-- And some of these platforms have very limited amount of "launching" platforms. -- And some of these platforms have very limited amount of "launching" platforms.
-- Therefore, this queue concept is introduced that queues each defender request. -- Therefore, this queue concept is introduced that queues each defender request.
-- Depending on the location of the launching site, the queued defenders will be launched at varying time intervals. -- Depending on the location of the launching site, the queued defenders will be launched at varying time intervals.
@ -950,9 +961,9 @@ do -- AI_A2G_DISPATCHER
} }
--- AI_A2G_DISPATCHER constructor. --- AI_A2G_DISPATCHER constructor.
-- This is defining the A2G DISPATCHER for one coaliton. -- This is defining the A2G DISPATCHER for one coalition.
-- The Dispatcher works with a @{Functional.Detection#DETECTION_BASE} object that is taking of the detection of targets using the EWR units. -- The Dispatcher works with a @{Functional.Detection#DETECTION_BASE} object that is taking of the detection of targets using the EWR units.
-- The Detection object is polymorphic, depending on the type of detection object choosen, the detection will work differently. -- The Detection object is polymorphic, depending on the type of detection object chosen, the detection will work differently.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param Functional.Detection#DETECTION_BASE Detection The DETECTION object that will detects targets using the the Early Warning Radar network. -- @param Functional.Detection#DETECTION_BASE Detection The DETECTION object that will detects targets using the the Early Warning Radar network.
-- @return #AI_A2G_DISPATCHER self -- @return #AI_A2G_DISPATCHER self
@ -999,11 +1010,11 @@ do -- AI_A2G_DISPATCHER
self:SetDisengageRadius( 300000 ) -- The default Disengage Radius is 300 km. self:SetDisengageRadius( 300000 ) -- The default Disengage Radius is 300 km.
self:SetDefaultTakeoff( AI_A2G_DISPATCHER.Takeoff.Air ) self:SetDefaultTakeoff( AI_A2G_DISPATCHER.Takeoff.Air )
self:SetDefaultTakeoffInAirAltitude( 500 ) -- Default takeoff is 500 meters above the ground. self:SetDefaultTakeoffInAirAltitude( 500 ) -- Default takeoff is 500 meters above ground level (AGL).
self:SetDefaultLanding( AI_A2G_DISPATCHER.Landing.NearAirbase ) self:SetDefaultLanding( AI_A2G_DISPATCHER.Landing.NearAirbase )
self:SetDefaultOverhead( 1 ) self:SetDefaultOverhead( 1 )
self:SetDefaultGrouping( 1 ) self:SetDefaultGrouping( 1 )
self:SetDefaultFuelThreshold( 0.15, 0 ) -- 15% of fuel remaining in the tank will trigger the airplane to return to base or refuel. self:SetDefaultFuelThreshold( 0.15, 0 ) -- 15% of fuel remaining in the tank will trigger the aircraft to return to base or refuel.
self:SetDefaultDamageThreshold( 0.4 ) -- When 40% of damage, go RTB. self:SetDefaultDamageThreshold( 0.4 ) -- When 40% of damage, go RTB.
self:SetDefaultPatrolTimeInterval( 180, 600 ) -- Between 180 and 600 seconds. self:SetDefaultPatrolTimeInterval( 180, 600 ) -- Between 180 and 600 seconds.
self:SetDefaultPatrolLimit( 1 ) -- Maximum one Patrol per squadron. self:SetDefaultPatrolLimit( 1 ) -- Maximum one Patrol per squadron.
@ -1220,7 +1231,7 @@ do -- AI_A2G_DISPATCHER
self:I( "Captured " .. AirbaseName ) self:I( "Captured " .. AirbaseName )
-- Now search for all squadrons located at the airbase, and sanatize them. -- Now search for all squadrons located at the airbase, and sanitize them.
for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do for SquadronName, Squadron in pairs( self.DefenderSquadrons ) do
if Squadron.AirbaseName == AirbaseName then if Squadron.AirbaseName == AirbaseName then
Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning. Squadron.ResourceCount = -999 -- The base has been captured, and the resources are eliminated. No more spawning.
@ -1322,7 +1333,7 @@ do -- AI_A2G_DISPATCHER
-- A2GDispatcher:SetDisengageRadius( 50000 ) -- A2GDispatcher:SetDisengageRadius( 50000 )
-- --
-- -- Set 100km as the Disengage Radius. -- -- Set 100km as the Disengage Radius.
-- A2GDispatcher:SetDisngageRadius() -- 300000 is the default value. -- A2GDispatcher:SetDisengageRadius() -- 300000 is the default value.
-- --
function AI_A2G_DISPATCHER:SetDisengageRadius( DisengageRadius ) function AI_A2G_DISPATCHER:SetDisengageRadius( DisengageRadius )
@ -1332,7 +1343,7 @@ do -- AI_A2G_DISPATCHER
end end
--- Define the defense radius to check if a target can be engaged by a squadron group for SEAD, CAS or BAI for defense. --- Define the defense radius to check if a target can be engaged by a squadron group for SEAD, BAI, or CAS for defense.
-- When targets are detected that are still really far off, you don't want the AI_A2G_DISPATCHER to launch defenders, as they might need to travel too far. -- When targets are detected that are still really far off, you don't want the AI_A2G_DISPATCHER to launch defenders, as they might need to travel too far.
-- You want it to wait until a certain defend radius is reached, which is calculated as: -- You want it to wait until a certain defend radius is reached, which is calculated as:
-- 1. the **distance of the closest airbase to target**, being smaller than the **Defend Radius**. -- 1. the **distance of the closest airbase to target**, being smaller than the **Defend Radius**.
@ -1427,18 +1438,18 @@ do -- AI_A2G_DISPATCHER
end end
--- Set the default damage treshold when defenders will RTB. --- Set the default damage threshold when defenders will RTB.
-- The default damage treshold is by default set to 40%, which means that when the airplane is 40% damaged, it will go RTB. -- The default damage threshold is by default set to 40%, which means that when the aircraft is 40% damaged, it will go RTB.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #number DamageThreshold A decimal number between 0 and 1, that expresses the %-tage of the damage treshold before going RTB. -- @param #number DamageThreshold A decimal number between 0 and 1, that expresses the % of damage when the aircraft will go RTB.
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
-- @usage -- @usage
-- --
-- -- Now Setup the A2G dispatcher, and initialize it using the Detection object. -- -- Now Setup the A2G dispatcher, and initialize it using the Detection object.
-- A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) -- A2GDispatcher = AI_A2G_DISPATCHER:New( Detection )
-- --
-- -- Now Setup the default damage treshold. -- -- Now Setup the default damage threshold.
-- A2GDispatcher:SetDefaultDamageThreshold( 0.90 ) -- Go RTB when the airplane 90% damaged. -- A2GDispatcher:SetDefaultDamageThreshold( 0.90 ) -- Go RTB when the aircraft is 90% damaged.
-- --
function AI_A2G_DISPATCHER:SetDefaultDamageThreshold( DamageThreshold ) function AI_A2G_DISPATCHER:SetDefaultDamageThreshold( DamageThreshold )
@ -1865,7 +1876,7 @@ do -- AI_A2G_DISPATCHER
-- --
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The squadron name. -- @param #string SquadronName The squadron name.
-- @param #number PatrolLimit (optional) The maximum amount of Patrol groups to be spawned. Note that a Patrol is a group, so can consist out of 1 to 4 airplanes. The default is 1 Patrol group. -- @param #number PatrolLimit (optional) The maximum amount of Patrol groups to be spawned. Note that each Patrol is a group, and can consist of 1 to 4 aircraft. The default is 1 Patrol group.
-- @param #number LowInterval (optional) The minimum time boundary in seconds when a new Patrol will be spawned. The default is 180 seconds. -- @param #number LowInterval (optional) The minimum time boundary in seconds when a new Patrol will be spawned. The default is 180 seconds.
-- @param #number HighInterval (optional) The maximum time boundary in seconds when a new Patrol will be spawned. The default is 600 seconds. -- @param #number HighInterval (optional) The maximum time boundary in seconds when a new Patrol will be spawned. The default is 600 seconds.
-- @param #number Probability Is not in use, you can skip this parameter. -- @param #number Probability Is not in use, you can skip this parameter.
@ -1912,9 +1923,9 @@ do -- AI_A2G_DISPATCHER
--- Set the squadron Patrol parameters for SEAD tasks. --- Set the squadron Patrol parameters for SEAD tasks.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The squadron name. -- @param #string SquadronName The squadron name.
-- @param #number PatrolLimit (optional) The maximum amount of Patrol groups to be spawned. Note that a Patrol is a group, so can consist out of 1 to 4 airplanes. The default is 1 Patrol group. -- @param #number PatrolLimit (optional) The maximum amount of Patrol groups to be spawned. Each Patrol group can consist of 1 to 4 aircraft. The default is 1 Patrol group.
-- @param #number LowInterval (optional) The minimum time boundary in seconds when a new Patrol will be spawned. The default is 180 seconds. -- @param #number LowInterval (optional) The minimum time in seconds between new Patrols being spawned. The default is 180 seconds.
-- @param #number HighInterval (optional) The maximum time boundary in seconds when a new Patrol will be spawned. The default is 600 seconds. -- @param #number HighInterval (optional) The maximum ttime in seconds between new Patrols being spawned. The default is 600 seconds.
-- @param #number Probability Is not in use, you can skip this parameter. -- @param #number Probability Is not in use, you can skip this parameter.
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
-- @usage -- @usage
@ -1934,9 +1945,9 @@ do -- AI_A2G_DISPATCHER
--- Set the squadron Patrol parameters for CAS tasks. --- Set the squadron Patrol parameters for CAS tasks.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The squadron name. -- @param #string SquadronName The squadron name.
-- @param #number PatrolLimit (optional) The maximum amount of Patrol groups to be spawned. Note that a Patrol is a group, so can consist out of 1 to 4 airplanes. The default is 1 Patrol group. -- @param #number PatrolLimit (optional) The maximum amount of Patrol groups to be spawned. Each Patrol group can consist of 1 to 4 aircraft. The default is 1 Patrol group.
-- @param #number LowInterval (optional) The minimum time boundary in seconds when a new Patrol will be spawned. The default is 180 seconds. -- @param #number LowInterval (optional) The minimum time in seconds between new Patrols being spawned. The default is 180 seconds.
-- @param #number HighInterval (optional) The maximum time boundary in seconds when a new Patrol will be spawned. The default is 600 seconds. -- @param #number HighInterval (optional) The maximum time in seconds between new Patrols being spawned. The default is 600 seconds.
-- @param #number Probability Is not in use, you can skip this parameter. -- @param #number Probability Is not in use, you can skip this parameter.
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
-- @usage -- @usage
@ -1956,9 +1967,9 @@ do -- AI_A2G_DISPATCHER
--- Set the squadron Patrol parameters for BAI tasks. --- Set the squadron Patrol parameters for BAI tasks.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The squadron name. -- @param #string SquadronName The squadron name.
-- @param #number PatrolLimit (optional) The maximum amount of Patrol groups to be spawned. Note that a Patrol is a group, so can consist out of 1 to 4 airplanes. The default is 1 Patrol group. -- @param #number PatrolLimit (optional) The maximum amount of Patrol groups to be spawned. Each Patrol group can consist of 1 to 4 aircraft. The default is 1 Patrol group.
-- @param #number LowInterval (optional) The minimum time boundary in seconds when a new Patrol will be spawned. The default is 180 seconds. -- @param #number LowInterval (optional) The minimum time in seconds between new Patrols being spawned. The default is 180 seconds.
-- @param #number HighInterval (optional) The maximum time boundary in seconds when a new Patrol will be spawned. The default is 600 seconds. -- @param #number HighInterval (optional) The maximum time in seconds between new Patrols being spawned. The default is 600 seconds.
-- @param #number Probability Is not in use, you can skip this parameter. -- @param #number Probability Is not in use, you can skip this parameter.
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
-- @usage -- @usage
@ -2529,7 +2540,7 @@ do -- AI_A2G_DISPATCHER
end end
--- Defines the default amount of extra planes that will take-off as part of the defense system. --- Defines the default amount of extra planes that will takeoff as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #number Overhead The %-tage of Units that dispatching command will allocate to intercept in surplus of detected amount of units. -- @param #number Overhead The %-tage of Units that dispatching command will allocate to intercept in surplus of detected amount of units.
-- The default overhead is 1, so equal balance. The @{#AI_A2G_DISPATCHER.SetOverhead}() method can be used to tweak the defense strength, -- The default overhead is 1, so equal balance. The @{#AI_A2G_DISPATCHER.SetOverhead}() method can be used to tweak the defense strength,
@ -2567,7 +2578,7 @@ do -- AI_A2G_DISPATCHER
end end
--- Defines the amount of extra planes that will take-off as part of the defense system. --- Defines the amount of extra planes that will takeoff as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @param #number Overhead The %-tage of Units that dispatching command will allocate to intercept in surplus of detected amount of units. -- @param #number Overhead The %-tage of Units that dispatching command will allocate to intercept in surplus of detected amount of units.
@ -2645,15 +2656,15 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets the default grouping of new airplanes spawned. --- Sets the default grouping of new aircraft spawned.
-- Grouping will trigger how new airplanes will be grouped if more than one airplane is spawned for defense. -- Grouping will trigger how new aircraft will be grouped if more than one aircraft is spawned for defense.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #number Grouping The level of grouping that will be applied of the Patrol or GCI defenders. -- @param #number Grouping The level of grouping that will be applied for the Patrol.
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Set a grouping by default per 2 airplanes. -- -- Set a grouping by default per 2 aircraft.
-- A2GDispatcher:SetDefaultGrouping( 2 ) -- A2GDispatcher:SetDefaultGrouping( 2 )
-- --
-- --
@ -2666,16 +2677,16 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets the grouping of new airplanes spawned. --- Sets the Squadron grouping of new aircraft spawned.
-- Grouping will trigger how new airplanes will be grouped if more than one airplane is spawned for defense. -- Grouping will trigger how new aircraft will be grouped if more than one aircraft is spawned for defense.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @param #number Grouping The level of grouping that will be applied of the Patrol or GCI defenders. -- @param #number Grouping The level of grouping that will be applied for a Patrol from the Squadron.
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Set a grouping per 2 airplanes. -- -- Set a Squadron specific grouping per 2 aircraft.
-- A2GDispatcher:SetSquadronGrouping( "SquadronName", 2 ) -- A2GDispatcher:SetSquadronGrouping( "SquadronName", 2 )
-- --
-- --
@ -2713,23 +2724,23 @@ do -- AI_A2G_DISPATCHER
end end
--- Defines the default method at which new flights will spawn and take-off as part of the defense system. --- Defines the default method at which new flights will spawn and takeoff as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway. -- @param #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights by default take-off in the air. -- -- Let new flights by default takeoff in the air.
-- A2GDispatcher:SetDefaultTakeoff( AI_A2G_Dispatcher.Takeoff.Air ) -- A2GDispatcher:SetDefaultTakeoff( AI_A2G_Dispatcher.Takeoff.Air )
-- --
-- -- Let new flights by default take-off from the runway. -- -- Let new flights by default takeoff from the runway.
-- A2GDispatcher:SetDefaultTakeoff( AI_A2G_Dispatcher.Takeoff.Runway ) -- A2GDispatcher:SetDefaultTakeoff( AI_A2G_Dispatcher.Takeoff.Runway )
-- --
-- -- Let new flights by default take-off from the airbase hot. -- -- Let new flights by default takeoff from the airbase hot.
-- A2GDispatcher:SetDefaultTakeoff( AI_A2G_Dispatcher.Takeoff.Hot ) -- A2GDispatcher:SetDefaultTakeoff( AI_A2G_Dispatcher.Takeoff.Hot )
-- --
-- -- Let new flights by default take-off from the airbase cold. -- -- Let new flights by default takeoff from the airbase cold.
-- A2GDispatcher:SetDefaultTakeoff( AI_A2G_Dispatcher.Takeoff.Cold ) -- A2GDispatcher:SetDefaultTakeoff( AI_A2G_Dispatcher.Takeoff.Cold )
-- --
-- --
@ -2742,7 +2753,7 @@ do -- AI_A2G_DISPATCHER
return self return self
end end
--- Defines the method at which new flights will spawn and take-off as part of the defense system. --- Defines the method at which new flights will spawn and takeoff as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @param #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway. -- @param #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.
@ -2750,16 +2761,16 @@ do -- AI_A2G_DISPATCHER
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights take-off in the air. -- -- Let new flights takeoff in the air.
-- A2GDispatcher:SetSquadronTakeoff( "SquadronName", AI_A2G_Dispatcher.Takeoff.Air ) -- A2GDispatcher:SetSquadronTakeoff( "SquadronName", AI_A2G_Dispatcher.Takeoff.Air )
-- --
-- -- Let new flights take-off from the runway. -- -- Let new flights takeoff from the runway.
-- A2GDispatcher:SetSquadronTakeoff( "SquadronName", AI_A2G_Dispatcher.Takeoff.Runway ) -- A2GDispatcher:SetSquadronTakeoff( "SquadronName", AI_A2G_Dispatcher.Takeoff.Runway )
-- --
-- -- Let new flights take-off from the airbase hot. -- -- Let new flights takeoff from the airbase hot.
-- A2GDispatcher:SetSquadronTakeoff( "SquadronName", AI_A2G_Dispatcher.Takeoff.Hot ) -- A2GDispatcher:SetSquadronTakeoff( "SquadronName", AI_A2G_Dispatcher.Takeoff.Hot )
-- --
-- -- Let new flights take-off from the airbase cold. -- -- Let new flights takeoff from the airbase cold.
-- A2GDispatcher:SetSquadronTakeoff( "SquadronName", AI_A2G_Dispatcher.Takeoff.Cold ) -- A2GDispatcher:SetSquadronTakeoff( "SquadronName", AI_A2G_Dispatcher.Takeoff.Cold )
-- --
-- --
@ -2774,16 +2785,16 @@ do -- AI_A2G_DISPATCHER
end end
--- Gets the default method at which new flights will spawn and take-off as part of the defense system. --- Gets the default method at which new flights will spawn and takeoff as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @return #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway. -- @return #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights by default take-off in the air. -- -- Let new flights by default takeoff in the air.
-- local TakeoffMethod = A2GDispatcher:GetDefaultTakeoff() -- local TakeoffMethod = A2GDispatcher:GetDefaultTakeoff()
-- if TakeOffMethod == , AI_A2G_Dispatcher.Takeoff.InAir then -- if TakeoffMethod == , AI_A2G_Dispatcher.Takeoff.InAir then
-- ... -- ...
-- end -- end
-- --
@ -2792,7 +2803,7 @@ do -- AI_A2G_DISPATCHER
return self.DefenderDefault.Takeoff return self.DefenderDefault.Takeoff
end end
--- Gets the method at which new flights will spawn and take-off as part of the defense system. --- Gets the method at which new flights will spawn and takeoff as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @return #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway. -- @return #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.
@ -2800,9 +2811,9 @@ do -- AI_A2G_DISPATCHER
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights take-off in the air. -- -- Let new flights takeoff in the air.
-- local TakeoffMethod = A2GDispatcher:GetSquadronTakeoff( "SquadronName" ) -- local TakeoffMethod = A2GDispatcher:GetSquadronTakeoff( "SquadronName" )
-- if TakeOffMethod == , AI_A2G_Dispatcher.Takeoff.InAir then -- if TakeoffMethod == , AI_A2G_Dispatcher.Takeoff.InAir then
-- ... -- ...
-- end -- end
-- --
@ -2813,13 +2824,13 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets flights to default take-off in the air, as part of the defense system. --- Sets flights to default takeoff in the air, as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights by default take-off in the air. -- -- Let new flights by default takeoff in the air.
-- A2GDispatcher:SetDefaultTakeoffInAir() -- A2GDispatcher:SetDefaultTakeoffInAir()
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
@ -2832,7 +2843,7 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets flights to take-off in the air, as part of the defense system. --- Sets flights to takeoff in the air, as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @param #number TakeoffAltitude (optional) The altitude in meters above the ground. If not given, the default takeoff altitude will be used. -- @param #number TakeoffAltitude (optional) The altitude in meters above the ground. If not given, the default takeoff altitude will be used.
@ -2840,7 +2851,7 @@ do -- AI_A2G_DISPATCHER
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights take-off in the air. -- -- Let new flights takeoff in the air.
-- A2GDispatcher:SetSquadronTakeoffInAir( "SquadronName" ) -- A2GDispatcher:SetSquadronTakeoffInAir( "SquadronName" )
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
@ -2857,13 +2868,13 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets flights by default to take-off from the runway, as part of the defense system. --- Sets flights by default to takeoff from the runway, as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights by default take-off from the runway. -- -- Let new flights by default takeoff from the runway.
-- A2GDispatcher:SetDefaultTakeoffFromRunway() -- A2GDispatcher:SetDefaultTakeoffFromRunway()
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
@ -2876,14 +2887,14 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets flights to take-off from the runway, as part of the defense system. --- Sets flights to takeoff from the runway, as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights take-off from the runway. -- -- Let new flights takeoff from the runway.
-- A2GDispatcher:SetSquadronTakeoffFromRunway( "SquadronName" ) -- A2GDispatcher:SetSquadronTakeoffFromRunway( "SquadronName" )
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
@ -2896,13 +2907,13 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets flights by default to take-off from the airbase at a hot location, as part of the defense system. --- Sets flights by default to takeoff from the airbase at a hot location, as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights by default take-off at a hot parking spot. -- -- Let new flights by default takeoff at a hot parking spot.
-- A2GDispatcher:SetDefaultTakeoffFromParkingHot() -- A2GDispatcher:SetDefaultTakeoffFromParkingHot()
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
@ -2914,14 +2925,14 @@ do -- AI_A2G_DISPATCHER
return self return self
end end
--- Sets flights to take-off from the airbase at a hot location, as part of the defense system. --- Sets flights to takeoff from the airbase at a hot location, as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights take-off in the air. -- -- Let new flights takeoff in the air.
-- A2GDispatcher:SetSquadronTakeoffFromParkingHot( "SquadronName" ) -- A2GDispatcher:SetSquadronTakeoffFromParkingHot( "SquadronName" )
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
@ -2934,13 +2945,13 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets flights to by default take-off from the airbase at a cold location, as part of the defense system. --- Sets flights to by default takeoff from the airbase at a cold location, as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights take-off from a cold parking spot. -- -- Let new flights takeoff from a cold parking spot.
-- A2GDispatcher:SetDefaultTakeoffFromParkingCold() -- A2GDispatcher:SetDefaultTakeoffFromParkingCold()
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
@ -2953,14 +2964,14 @@ do -- AI_A2G_DISPATCHER
end end
--- Sets flights to take-off from the airbase at a cold location, as part of the defense system. --- Sets flights to takeoff from the airbase at a cold location, as part of the defense system.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Let new flights take-off from a cold parking spot. -- -- Let new flights takeoff from a cold parking spot.
-- A2GDispatcher:SetSquadronTakeoffFromParkingCold( "SquadronName" ) -- A2GDispatcher:SetSquadronTakeoffFromParkingCold( "SquadronName" )
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
@ -2973,9 +2984,9 @@ do -- AI_A2G_DISPATCHER
end end
--- Defines the default altitude where airplanes will spawn in the air and take-off as part of the defense system, when the take-off in the air method has been selected. --- Defines the default altitude where aircraft will spawn in the air and takeoff as part of the defense system, when the takeoff in the air method has been selected.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #number TakeoffAltitude The altitude in meters above the ground. -- @param #number TakeoffAltitude The altitude in meters above ground level (AGL).
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
@ -2992,16 +3003,16 @@ do -- AI_A2G_DISPATCHER
return self return self
end end
--- Defines the default altitude where airplanes will spawn in the air and take-off as part of the defense system, when the take-off in the air method has been selected. --- Defines the default altitude where aircraft will spawn in the air and takeoff as part of the defense system, when the takeoff in the air method has been selected.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @param #number TakeoffAltitude The altitude in meters above the ground. -- @param #number TakeoffAltitude The altitude in meters above ground level (AGL).
-- @usage: -- @usage:
-- --
-- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... ) -- local A2GDispatcher = AI_A2G_DISPATCHER:New( ... )
-- --
-- -- Set the default takeoff altitude when taking off in the air. -- -- Set the default takeoff altitude when taking off in the air.
-- A2GDispatcher:SetSquadronTakeoffInAirAltitude( "SquadronName", 2000 ) -- This makes planes start at 2000 meters above the ground. -- A2GDispatcher:SetSquadronTakeoffInAirAltitude( "SquadronName", 2000 ) -- This makes aircraft start at 2000 meters above ground level (AGL).
-- --
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
-- --
@ -3217,9 +3228,9 @@ do -- AI_A2G_DISPATCHER
end end
--- Set the default fuel treshold when defenders will RTB or Refuel in the air. --- Set the default fuel treshold when defenders will RTB or Refuel in the air.
-- The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed. -- The fuel treshold is by default set to 15%, which means that an aircraft will stay in the air until 15% of its fuel is remaining.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #number FuelThreshold A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel. -- @param #number FuelThreshold A decimal number between 0 and 1, that expresses the % of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
-- @usage -- @usage
-- --
@ -3238,10 +3249,10 @@ do -- AI_A2G_DISPATCHER
--- Set the fuel treshold for the squadron when defenders will RTB or Refuel in the air. --- Set the fuel treshold for the squadron when defenders will RTB or Refuel in the air.
-- The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed. -- The fuel treshold is by default set to 15%, which means that an aircraft will stay in the air until 15% of its fuel is remaining.
-- @param #AI_A2G_DISPATCHER self -- @param #AI_A2G_DISPATCHER self
-- @param #string SquadronName The name of the squadron. -- @param #string SquadronName The name of the squadron.
-- @param #number FuelThreshold A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel. -- @param #number FuelThreshold A decimal number between 0 and 1, that expresses the % of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.
-- @return #AI_A2G_DISPATCHER -- @return #AI_A2G_DISPATCHER
-- @usage -- @usage
-- --