Documentation

This commit is contained in:
FlightControl_Master
2017-08-06 07:50:37 +02:00
parent 1883e84918
commit 464fb1aeca
7 changed files with 160 additions and 166 deletions

View File

@@ -295,11 +295,14 @@ do -- AI_A2A_DISPATCHER
--
-- Demonstration Mission: [AID-019 - AI_A2A - Engage Range Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/release-2-2-pre/AID%20-%20AI%20Dispatching/AID-019%20-%20AI_A2A%20-%20Engage%20Range%20Test)
--
-- In this example an Engage Radius is set to 50km.
-- In this example an Engage Radius is set to various values.
--
-- -- Initialize the dispatcher, setting up a radius of 50km where any airborne friendly
-- -- without an assignment within 50km radius from a detected target, will engage that target.
-- -- Set 50km as the radius to engage any target by airborne friendlies.
-- A2ADispatcher:SetEngageRadius( 50000 )
--
-- -- Set 100km as the radius to engage any target by airborne friendlies.
-- A2ADispatcher:SetEngageRadius() -- 100000 is the default value.
--
--
-- ## 4. Set the **Ground Controlled Intercept Radius** or **Gci radius**:
--
@@ -1049,16 +1052,18 @@ do -- AI_A2A_DISPATCHER
--
-- **Use the method @{#AI_A2A_DISPATCHER.SetEngageRadius}() to modify the default Engage Radius for ALL squadrons.**
--
-- Demonstration Mission: [AID-019 - AI_A2A - Engage Range Test](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/release-2-2-pre/AID%20-%20AI%20Dispatching/AID-019%20-%20AI_A2A%20-%20Engage%20Range%20Test)
--
-- @param #AI_A2A_DISPATCHER self
-- @param #number EngageRadius (Optional, Default = 100000) The radius to report friendlies near the target.
-- @return #AI_A2A_DISPATCHER
-- @usage
--
-- -- Set 50km as the radius to engage any target by airborne friendlies.
-- Dispatcher:SetEngageRadius( 50000 )
-- A2ADispatcher:SetEngageRadius( 50000 )
--
-- -- Set 100km as the radius to engage any target by airborne friendlies.
-- Dispatcher:SetEngageRadius() -- 100000 is the default value.
-- A2ADispatcher:SetEngageRadius() -- 100000 is the default value.
--
function AI_A2A_DISPATCHER:SetEngageRadius( EngageRadius )
@@ -1074,10 +1079,10 @@ do -- AI_A2A_DISPATCHER
-- @usage
--
-- -- Set 50km as the Disengage Radius.
-- Dispatcher:SetDisengageRadius( 50000 )
-- A2ADispatcher:SetDisengageRadius( 50000 )
--
-- -- Set 100km as the Disengage Radius.
-- Dispatcher:SetDisngageRadius() -- 300000 is the default value.
-- A2ADispatcher:SetDisngageRadius() -- 300000 is the default value.
--
function AI_A2A_DISPATCHER:SetDisengageRadius( DisengageRadius )
@@ -1694,14 +1699,14 @@ do -- AI_A2A_DISPATCHER
--
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- An overhead of 1,5 with 1 planes detected, will allocate 2 planes ( 1 * 1,5 ) = 1,5 => rounded up gives 2.
-- -- An overhead of 1,5 with 2 planes detected, will allocate 3 planes ( 2 * 1,5 ) = 3 => rounded up gives 3.
-- -- An overhead of 1,5 with 3 planes detected, will allocate 5 planes ( 3 * 1,5 ) = 4,5 => rounded up gives 5 planes.
-- -- An overhead of 1,5 with 4 planes detected, will allocate 6 planes ( 4 * 1,5 ) = 6 => rounded up gives 6 planes.
--
-- Dispatcher:SetDefaultOverhead( 1.5 )
-- A2ADispatcher:SetDefaultOverhead( 1.5 )
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetDefaultOverhead( Overhead )
@@ -1733,14 +1738,14 @@ do -- AI_A2A_DISPATCHER
--
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- An overhead of 1,5 with 1 planes detected, will allocate 2 planes ( 1 * 1,5 ) = 1,5 => rounded up gives 2.
-- -- An overhead of 1,5 with 2 planes detected, will allocate 3 planes ( 2 * 1,5 ) = 3 => rounded up gives 3.
-- -- An overhead of 1,5 with 3 planes detected, will allocate 5 planes ( 3 * 1,5 ) = 4,5 => rounded up gives 5 planes.
-- -- An overhead of 1,5 with 4 planes detected, will allocate 6 planes ( 4 * 1,5 ) = 6 => rounded up gives 6 planes.
--
-- Dispatcher:SetSquadronOverhead( "SquadronName", 1.5 )
-- A2ADispatcher:SetSquadronOverhead( "SquadronName", 1.5 )
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetSquadronOverhead( SquadronName, Overhead )
@@ -1758,10 +1763,10 @@ do -- AI_A2A_DISPATCHER
-- @param #number Grouping The level of grouping that will be applied of the CAP or GCI defenders.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Set a grouping by default per 2 airplanes.
-- Dispatcher:SetDefaultGrouping( 2 )
-- A2ADispatcher:SetDefaultGrouping( 2 )
--
--
-- @return #AI_A2A_DISPATCHER
@@ -1780,10 +1785,10 @@ do -- AI_A2A_DISPATCHER
-- @param #number Grouping The level of grouping that will be applied of the CAP or GCI defenders.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Set a grouping per 2 airplanes.
-- Dispatcher:SetSquadronGrouping( "SquadronName", 2 )
-- A2ADispatcher:SetSquadronGrouping( "SquadronName", 2 )
--
--
-- @return #AI_A2A_DISPATCHER
@@ -1801,19 +1806,19 @@ do -- AI_A2A_DISPATCHER
-- @param #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights by default take-off in the air.
-- Dispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Air )
-- A2ADispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Air )
--
-- -- Let new flights by default take-off from the runway.
-- Dispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Runway )
-- A2ADispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Runway )
--
-- -- Let new flights by default take-off from the airbase hot.
-- Dispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Hot )
-- A2ADispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Hot )
--
-- -- Let new flights by default take-off from the airbase cold.
-- Dispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Cold )
-- A2ADispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Cold )
--
--
-- @return #AI_A2A_DISPATCHER
@@ -1831,19 +1836,19 @@ do -- AI_A2A_DISPATCHER
-- @param #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights take-off in the air.
-- Dispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Air )
-- A2ADispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Air )
--
-- -- Let new flights take-off from the runway.
-- Dispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Runway )
-- A2ADispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Runway )
--
-- -- Let new flights take-off from the airbase hot.
-- Dispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Hot )
-- A2ADispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Hot )
--
-- -- Let new flights take-off from the airbase cold.
-- Dispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Cold )
-- A2ADispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Cold )
--
--
-- @return #AI_A2A_DISPATCHER
@@ -1862,10 +1867,10 @@ do -- AI_A2A_DISPATCHER
-- @return #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights by default take-off in the air.
-- local TakeoffMethod = Dispatcher:GetDefaultTakeoff()
-- local TakeoffMethod = A2ADispatcher:GetDefaultTakeoff()
-- if TakeOffMethod == , AI_A2A_Dispatcher.Takeoff.InAir then
-- ...
-- end
@@ -1881,10 +1886,10 @@ do -- AI_A2A_DISPATCHER
-- @return #number Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights take-off in the air.
-- local TakeoffMethod = Dispatcher:GetSquadronTakeoff( "SquadronName" )
-- local TakeoffMethod = A2ADispatcher:GetSquadronTakeoff( "SquadronName" )
-- if TakeOffMethod == , AI_A2A_Dispatcher.Takeoff.InAir then
-- ...
-- end
@@ -1900,10 +1905,10 @@ do -- AI_A2A_DISPATCHER
-- @param #AI_A2A_DISPATCHER self
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights by default take-off in the air.
-- Dispatcher:SetDefaultTakeoffInAir()
-- A2ADispatcher:SetDefaultTakeoffInAir()
--
-- @return #AI_A2A_DISPATCHER
--
@@ -1921,10 +1926,10 @@ do -- AI_A2A_DISPATCHER
-- @param #number TakeoffAltitude (optional) The altitude in meters above the ground. If not given, the default takeoff altitude will be used.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights take-off in the air.
-- Dispatcher:SetSquadronTakeoffInAir( "SquadronName" )
-- A2ADispatcher:SetSquadronTakeoffInAir( "SquadronName" )
--
-- @return #AI_A2A_DISPATCHER
--
@@ -1944,10 +1949,10 @@ do -- AI_A2A_DISPATCHER
-- @param #AI_A2A_DISPATCHER self
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights by default take-off from the runway.
-- Dispatcher:SetDefaultTakeoffFromRunway()
-- A2ADispatcher:SetDefaultTakeoffFromRunway()
--
-- @return #AI_A2A_DISPATCHER
--
@@ -1964,10 +1969,10 @@ do -- AI_A2A_DISPATCHER
-- @param #string SquadronName The name of the squadron.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights take-off from the runway.
-- Dispatcher:SetSquadronTakeoffFromRunway( "SquadronName" )
-- A2ADispatcher:SetSquadronTakeoffFromRunway( "SquadronName" )
--
-- @return #AI_A2A_DISPATCHER
--
@@ -1983,10 +1988,10 @@ do -- AI_A2A_DISPATCHER
-- @param #AI_A2A_DISPATCHER self
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights by default take-off at a hot parking spot.
-- Dispatcher:SetDefaultTakeoffFromParkingHot()
-- A2ADispatcher:SetDefaultTakeoffFromParkingHot()
--
-- @return #AI_A2A_DISPATCHER
--
@@ -2002,10 +2007,10 @@ do -- AI_A2A_DISPATCHER
-- @param #string SquadronName The name of the squadron.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights take-off in the air.
-- Dispatcher:SetSquadronTakeoffFromParkingHot( "SquadronName" )
-- A2ADispatcher:SetSquadronTakeoffFromParkingHot( "SquadronName" )
--
-- @return #AI_A2A_DISPATCHER
--
@@ -2021,10 +2026,10 @@ do -- AI_A2A_DISPATCHER
-- @param #AI_A2A_DISPATCHER self
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights take-off from a cold parking spot.
-- Dispatcher:SetDefaultTakeoffFromParkingCold()
-- A2ADispatcher:SetDefaultTakeoffFromParkingCold()
--
-- @return #AI_A2A_DISPATCHER
--
@@ -2041,10 +2046,10 @@ do -- AI_A2A_DISPATCHER
-- @param #string SquadronName The name of the squadron.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights take-off from a cold parking spot.
-- Dispatcher:SetSquadronTakeoffFromParkingCold( "SquadronName" )
-- A2ADispatcher:SetSquadronTakeoffFromParkingCold( "SquadronName" )
--
-- @return #AI_A2A_DISPATCHER
--
@@ -2102,16 +2107,16 @@ do -- AI_A2A_DISPATCHER
-- @param #number Landing The landing method which can be NearAirbase, AtRunway, AtEngineShutdown
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights by default despawn near the airbase when returning.
-- Dispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.NearAirbase )
-- A2ADispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.NearAirbase )
--
-- -- Let new flights by default despawn after landing land at the runway.
-- Dispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.AtRunway )
-- A2ADispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.AtRunway )
--
-- -- Let new flights by default despawn after landing and parking, and after engine shutdown.
-- Dispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.AtEngineShutdown )
-- A2ADispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.AtEngineShutdown )
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetDefaultLanding( Landing )
@@ -2128,16 +2133,16 @@ do -- AI_A2A_DISPATCHER
-- @param #number Landing The landing method which can be NearAirbase, AtRunway, AtEngineShutdown
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights despawn near the airbase when returning.
-- Dispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.NearAirbase )
-- A2ADispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.NearAirbase )
--
-- -- Let new flights despawn after landing land at the runway.
-- Dispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.AtRunway )
-- A2ADispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.AtRunway )
--
-- -- Let new flights despawn after landing and parking, and after engine shutdown.
-- Dispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.AtEngineShutdown )
-- A2ADispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.AtEngineShutdown )
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetSquadronLanding( SquadronName, Landing )
@@ -2154,10 +2159,10 @@ do -- AI_A2A_DISPATCHER
-- @return #number Landing The landing method which can be NearAirbase, AtRunway, AtEngineShutdown
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights by default despawn near the airbase when returning.
-- local LandingMethod = Dispatcher:GetDefaultLanding( AI_A2A_Dispatcher.Landing.NearAirbase )
-- local LandingMethod = A2ADispatcher:GetDefaultLanding( AI_A2A_Dispatcher.Landing.NearAirbase )
-- if LandingMethod == AI_A2A_Dispatcher.Landing.NearAirbase then
-- ...
-- end
@@ -2174,10 +2179,10 @@ do -- AI_A2A_DISPATCHER
-- @return #number Landing The landing method which can be NearAirbase, AtRunway, AtEngineShutdown
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let new flights despawn near the airbase when returning.
-- local LandingMethod = Dispatcher:GetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.NearAirbase )
-- local LandingMethod = A2ADispatcher:GetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.NearAirbase )
-- if LandingMethod == AI_A2A_Dispatcher.Landing.NearAirbase then
-- ...
-- end
@@ -2193,10 +2198,10 @@ do -- AI_A2A_DISPATCHER
-- @param #AI_A2A_DISPATCHER self
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let flights by default to land near the airbase and despawn.
-- Dispatcher:SetDefaultLandingNearAirbase()
-- A2ADispatcher:SetDefaultLandingNearAirbase()
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetDefaultLandingNearAirbase()
@@ -2212,10 +2217,10 @@ do -- AI_A2A_DISPATCHER
-- @param #string SquadronName The name of the squadron.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let flights to land near the airbase and despawn.
-- Dispatcher:SetSquadronLandingNearAirbase( "SquadronName" )
-- A2ADispatcher:SetSquadronLandingNearAirbase( "SquadronName" )
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetSquadronLandingNearAirbase( SquadronName )
@@ -2230,10 +2235,10 @@ do -- AI_A2A_DISPATCHER
-- @param #AI_A2A_DISPATCHER self
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let flights by default land at the runway and despawn.
-- Dispatcher:SetDefaultLandingAtRunway()
-- A2ADispatcher:SetDefaultLandingAtRunway()
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetDefaultLandingAtRunway()
@@ -2249,10 +2254,10 @@ do -- AI_A2A_DISPATCHER
-- @param #string SquadronName The name of the squadron.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let flights land at the runway and despawn.
-- Dispatcher:SetSquadronLandingAtRunway( "SquadronName" )
-- A2ADispatcher:SetSquadronLandingAtRunway( "SquadronName" )
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetSquadronLandingAtRunway( SquadronName )
@@ -2267,10 +2272,10 @@ do -- AI_A2A_DISPATCHER
-- @param #AI_A2A_DISPATCHER self
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let flights by default land and despawn at engine shutdown.
-- Dispatcher:SetDefaultLandingAtEngineShutdown()
-- A2ADispatcher:SetDefaultLandingAtEngineShutdown()
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetDefaultLandingAtEngineShutdown()
@@ -2286,10 +2291,10 @@ do -- AI_A2A_DISPATCHER
-- @param #string SquadronName The name of the squadron.
-- @usage:
--
-- local Dispatcher = AI_A2A_DISPATCHER:New( ... )
-- local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
--
-- -- Let flights land and despawn at engine shutdown.
-- Dispatcher:SetSquadronLandingAtEngineShutdown( "SquadronName" )
-- A2ADispatcher:SetSquadronLandingAtEngineShutdown( "SquadronName" )
--
-- @return #AI_A2A_DISPATCHER
function AI_A2A_DISPATCHER:SetSquadronLandingAtEngineShutdown( SquadronName )