Merge pull request #704 from FlightControl-Master/funkyfranky

ATC queue and fixes.
This commit is contained in:
Frank 2017-09-25 10:10:22 +02:00 committed by GitHub
commit bc072d10df
7 changed files with 913 additions and 201 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170918_0611' )
env.info( 'Moose Generation Timestamp: 20170924_2152' )
local base = _G

View File

@ -17,90 +17,7 @@
<a href="index.html">index</a>
</li></ul>
<ul>
<li><a href="AI_A2A.html">AI_A2A</a></li>
<li><a href="AI_A2A_Cap.html">AI_A2A_Cap</a></li>
<li><a href="AI_A2A_Dispatcher.html">AI_A2A_Dispatcher</a></li>
<li><a href="AI_A2A_GCI.html">AI_A2A_GCI</a></li>
<li><a href="AI_A2A_Patrol.html">AI_A2A_Patrol</a></li>
<li><a href="AI_Bai.html">AI_Bai</a></li>
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
<li><a href="AI_Cap.html">AI_Cap</a></li>
<li><a href="AI_Cas.html">AI_Cas</a></li>
<li><a href="AI_Formation.html">AI_Formation</a></li>
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
<li><a href="Account.html">Account</a></li>
<li><a href="Airbase.html">Airbase</a></li>
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
<li><a href="Assign.html">Assign</a></li>
<li><a href="Base.html">Base</a></li>
<li><a href="Cargo.html">Cargo</a></li>
<li><a href="CleanUp.html">CleanUp</a></li>
<li><a href="Client.html">Client</a></li>
<li><a href="CommandCenter.html">CommandCenter</a></li>
<li><a href="Controllable.html">Controllable</a></li>
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
<li><a href="DCSCommand.html">DCSCommand</a></li>
<li><a href="DCSController.html">DCSController</a></li>
<li><a href="DCSGroup.html">DCSGroup</a></li>
<li><a href="DCSObject.html">DCSObject</a></li>
<li><a href="DCSTask.html">DCSTask</a></li>
<li><a href="DCSTypes.html">DCSTypes</a></li>
<li><a href="DCSUnit.html">DCSUnit</a></li>
<li><a href="DCSVec3.html">DCSVec3</a></li>
<li><a href="DCSWorld.html">DCSWorld</a></li>
<li><a href="DCSZone.html">DCSZone</a></li>
<li><a href="DCScountry.html">DCScountry</a></li>
<li><a href="DCStimer.html">DCStimer</a></li>
<li><a href="DCStrigger.html">DCStrigger</a></li>
<li><a href="Database.html">Database</a></li>
<li><a href="Designate.html">Designate</a></li>
<li><a href="Detection.html">Detection</a></li>
<li><a href="DetectionManager.html">DetectionManager</a></li>
<li><a href="Escort.html">Escort</a></li>
<li><a href="Event.html">Event</a></li>
<li><a href="Fsm.html">Fsm</a></li>
<li><a href="Group.html">Group</a></li>
<li><a href="Identifiable.html">Identifiable</a></li>
<li><a href="Menu.html">Menu</a></li>
<li><a href="Message.html">Message</a></li>
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
<li><a href="Mission.html">Mission</a></li>
<li><a href="Movement.html">Movement</a></li>
<li><a href="Object.html">Object</a></li>
<li><a href="Point.html">Point</a></li>
<li><a href="Positionable.html">Positionable</a></li>
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Radio.html">Radio</a></li>
<li>Rat</li>
<li><a href="Route.html">Route</a></li>
<li><a href="Scenery.html">Scenery</a></li>
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>
<li><a href="Set.html">Set</a></li>
<li><a href="Settings.html">Settings</a></li>
<li><a href="Smoke.html">Smoke</a></li>
<li><a href="Spawn.html">Spawn</a></li>
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
<li><a href="Spot.html">Spot</a></li>
<li><a href="Static.html">Static</a></li>
<li><a href="StaticObject.html">StaticObject</a></li>
<li><a href="Task.html">Task</a></li>
<li><a href="Task_A2A.html">Task_A2A</a></li>
<li><a href="Task_A2A_Dispatcher.html">Task_A2A_Dispatcher</a></li>
<li><a href="Task_A2G.html">Task_A2G</a></li>
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
<li><a href="Unit.html">Unit</a></li>
<li><a href="Utils.html">Utils</a></li>
<li><a href="Zone.html">Zone</a></li>
<li><a href="env.html">env</a></li>
<li><a href="land.html">land</a></li>
<li><a href="routines.html">routines</a></li>
</ul>
</div>
<div id="content">
@ -155,13 +72,15 @@
<h1>Demo Missions</h1>
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/Release/RAT%20-%20Random%20Air%20Traffic">RAT Demo Missions</a></h3>
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the last release</a></h3>
<hr/>
<h1>YouTube Channel</h1>
<h3><a href="https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1jirWIo4t4YxqN-HxjqRkL">RAT YouTube Channel</a></h3>
<h3>RAT videos are work in progress.</h3>
<h3><a href="https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1jirWIo4t4YxqN-HxjqRkL">MOOSE YouTube Channel</a></h3>
<hr/>
@ -184,6 +103,12 @@
<h2><a id="#(RAT)">Type <code>RAT</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT).ATC">RAT.ATC</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT).AlphaDescent">RAT.AlphaDescent</a></td>
<td class="summary">
<p>Default angle of descenti in degrees. A value of 3.6 follows the 3:1 rule of 3 miles of travel and 1000 ft descent.</p>
@ -193,6 +118,12 @@
<td class="name" nowrap="nowrap"><a href="##(RAT).ClassName">RAT.ClassName</a></td>
<td class="summary">
<p>Name of the Class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT).ClearForLanding">RAT:ClearForLanding(name)</a></td>
<td class="summary">
</td>
</tr>
<tr>
@ -340,7 +271,7 @@
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT).SetMaCruiseAltitude">RAT:SetMaCruiseAltitude(alt)</a></td>
<td class="name" nowrap="nowrap"><a href="##(RAT).SetMaxCruiseAltitude">RAT:SetMaxCruiseAltitude(alt)</a></td>
<td class="summary">
<p>Set max cruising altitude above sea level.</p>
</td>
@ -445,6 +376,60 @@
<td class="name" nowrap="nowrap"><a href="##(RAT).Vcruisemax">RAT.Vcruisemax</a></td>
<td class="summary">
<p>Max cruise speed in m/s (250 m/s = 900 km/h = 486 kt) set by user.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCAddFlight">RAT:_ATCAddFlight(name, dest)</a></td>
<td class="summary">
<p>Adds andd initializes a new flight after it was spawned.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCCheck">RAT:_ATCCheck()</a></td>
<td class="summary">
<p>Main ATC function.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCClearForLanding">RAT:_ATCClearForLanding(airport, flight)</a></td>
<td class="summary">
<p>Giving landing clearance for aircraft by setting user flag.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCDelFlight">RAT:_ATCDelFlight(t, entry)</a></td>
<td class="summary">
<p>Deletes a flight from ATC lists after it landed.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCFlightLanded">RAT:_ATCFlightLanded(name)</a></td>
<td class="summary">
<p>Takes care of organisational stuff after a plane has landed.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCInit">RAT:_ATCInit(airports_map)</a></td>
<td class="summary">
<p>Initializes the ATC arrays and starts schedulers.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCQueue">RAT:_ATCQueue()</a></td>
<td class="summary">
<p>Creates a landing queue for all flights holding at airports.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCRegisterFlight">RAT:_ATCRegisterFlight(name, time)</a></td>
<td class="summary">
<p>Registers a flight once it is near its holding point at the final destination.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT)._ATCStatus">RAT:_ATCStatus()</a></td>
<td class="summary">
<p>ATC status report about flights.</p>
</td>
</tr>
<tr>
@ -1077,9 +1062,25 @@ This setting can be changed using the <a href="##(RAT).SetTakeoff">RAT.SetTakeof
<li><a href="##(RAT).SetMaxDistance">RAT.SetMaxDistance</a>(150) will allow only destination airports which are <strong>less than</strong> 150 km away from the departure airport.</li>
</ul>
<p><img src="..\Presentations\RAT\RAT_Gaussian.png" alt="Process"/></p>
<p>Certain other options like the flight level can also be specified. However, note that this might not be a good idea for random departures and/or destinations.
For example the random route might be too short to reach that altitude, which would result in very high climb and descent rates or strange flight plans.</p>
<p>By default planes get a cruise altitude of ~20,000 ft ASL. The actual altitude is sampled from a Gaussian distribution. The picture shows this distribution
if one would spawn 1000 planes. As can be seen most planes get a cruising alt of around FL200. Other values are possible but less likely the further away
one gets from the expectation value.</p>
<p>The expectation value, i.e. the altitude most aircraft get, can be set with the function <a href="##(RAT).SetFLcruise">RAT.SetFLcruise</a>().
It is possible to restrict the minimum cruise altitude by <a href="##(RAT).SetFLmin">RAT.SetFLmin</a>() and the maximum cruise altitude by <a href="##(RAT).SetFLmax">RAT.SetFLmax</a>()</p>
<p>The cruise altitude can also be given in meters ASL by the functions <a href="##(RAT).SetCruiseAltitude">RAT.SetCruiseAltitude</a>(), <a href="##(RAT).SetMinCruiseAltitude">RAT.SetMinCruiseAltitude</a>() and <a href="##(RAT).SetMaxCruiseAltitude">RAT.SetMaxCruiseAltitude</a>().</p>
<p>For example:</p>
<ul>
<li><a href="##(RAT).SetFLcruise">RAT.SetFLcruise</a>(300) will cause most planes fly around FL300.</li>
<li><a href="##(RAT).SetFLmin">RAT.SetFLmin</a>(100) restricts the cruising alt such that no plane will fly below FL100. Note that this automatically changes the minimum distance from departure to destination.
That means that only destinations are possible for which the aircraft has had enought time to reach that flight level and descent again. </li>
<li><a href="##(RAT).SetFLmax">RAT.SetFLmax</a>(200) will restrict the cruise alt to maximum FL200, i.e. no aircraft will travel above this height.</li>
</ul>
@ -1097,6 +1098,20 @@ For example the random route might be too short to reach that altitude, which wo
<dl class="function">
<dt>
<em></em>
<a id="#(RAT).ATC" >
<strong>RAT.ATC</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(RAT).AlphaDescent" >
<strong>RAT.AlphaDescent</strong>
@ -1125,6 +1140,27 @@ For example the random route might be too short to reach that altitude, which wo
<dl class="function">
<dt>
<a id="#(RAT).ClearForLanding" >
<strong>RAT:ClearForLanding(name)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> name </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT).Commute" >
<strong>RAT:Commute(switch)</strong>
</a>
@ -1684,8 +1720,8 @@ Maximum FL in hundrets of feet.</p>
<dl class="function">
<dt>
<a id="#(RAT).SetMaCruiseAltitude" >
<strong>RAT:SetMaCruiseAltitude(alt)</strong>
<a id="#(RAT).SetMaxCruiseAltitude" >
<strong>RAT:SetMaxCruiseAltitude(alt)</strong>
</a>
</dt>
<dd>
@ -2096,6 +2132,207 @@ Time in seconds.</p>
<dl class="function">
<dt>
<a id="#(RAT)._ATCAddFlight" >
<strong>RAT:_ATCAddFlight(name, dest)</strong>
</a>
</dt>
<dd>
<p>Adds andd initializes a new flight after it was spawned.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string name </em></code>:
Group name of the flight.</p>
</li>
<li>
<p><code><em>#string dest </em></code>:
Name of the destination airport.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._ATCCheck" >
<strong>RAT:_ATCCheck()</strong>
</a>
</dt>
<dd>
<p>Main ATC function.</p>
<p>Updates the landing queue of all airports and inceases holding time for all flights.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._ATCClearForLanding" >
<strong>RAT:_ATCClearForLanding(airport, flight)</strong>
</a>
</dt>
<dd>
<p>Giving landing clearance for aircraft by setting user flag.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string airport </em></code>:
Name of destination airport.</p>
</li>
<li>
<p><code><em>#string flight </em></code>:
Group name of flight, which gets landing clearence.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._ATCDelFlight" >
<strong>RAT:_ATCDelFlight(t, entry)</strong>
</a>
</dt>
<dd>
<p>Deletes a flight from ATC lists after it landed.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#table t </em></code>:
Table.</p>
</li>
<li>
<p><code><em>#string entry </em></code>:
Flight name which shall be deleted.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._ATCFlightLanded" >
<strong>RAT:_ATCFlightLanded(name)</strong>
</a>
</dt>
<dd>
<p>Takes care of organisational stuff after a plane has landed.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string name </em></code>:
Group name of flight.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._ATCInit" >
<strong>RAT:_ATCInit(airports_map)</strong>
</a>
</dt>
<dd>
<p>Initializes the ATC arrays and starts schedulers.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#table airports_map </em></code>:
List of all airports of the map.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._ATCQueue" >
<strong>RAT:_ATCQueue()</strong>
</a>
</dt>
<dd>
<p>Creates a landing queue for all flights holding at airports.</p>
<p>Aircraft with longest holding time gets first permission to land.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._ATCRegisterFlight" >
<strong>RAT:_ATCRegisterFlight(name, time)</strong>
</a>
</dt>
<dd>
<p>Registers a flight once it is near its holding point at the final destination.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string name </em></code>:
Group name of the flight.</p>
</li>
<li>
<p><code><em>#number time </em></code>:
Time the fight first registered.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._ATCStatus" >
<strong>RAT:_ATCStatus()</strong>
</a>
</dt>
<dd>
<p>ATC status report about flights.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(RAT)._AirportExists" >
<strong>RAT:_AirportExists(name)</strong>
</a>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 KiB

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB