Extended the Waypoint functions of COORDINATE with new methods for Air operations:

* function COORDINATE:WaypointAirTurningPoint( AltType, Speed )
  * function COORDINATE:WaypointAirFlyOverPoint( AltType, Speed )
  * function COORDINATE:WaypointAirTakeOffParkingHot( AltType, Speed )
  * function COORDINATE:WaypointAirTakeOffParking( AltType, Speed )
  * function COORDINATE:WaypointAirTakeOffRunway( AltType, Speed )
  * function COORDINATE:WaypointAirLanding( Speed )
This commit is contained in:
FlightControl_Master 2017-11-02 08:19:46 +01:00
parent e625aaf28c
commit f82d07ebc0
11 changed files with 409 additions and 44 deletions

View File

@ -150,6 +150,31 @@ do -- COORDINATE
ClassName = "COORDINATE",
}
--- @field COORDINATE.WaypointAltType
COORDINATE.WaypointAltType = {
BARO = "BARO",
RADIO = "RADIO",
}
--- @field COORDINATE.WaypointAction
COORDINATE.WaypointAction = {
TurningPoint = "Turning Point",
FlyoverPoint = "Fly Over Point",
FromParkingArea = "From Parking Area",
FromParkingAreaHot = "From Parking Area Hot",
FromRunway = "From Runway",
Landing = "Landing",
}
--- @field COORDINATE.WaypointType
COORDINATE.WaypointType = {
TakeOffParking = "TakeOffParking",
TakeOffParkingHot = "TakeOffParkingHot",
TakeOff = "TakeOffParkingHot",
TurningPoint = "Turning Point",
Land = "Land",
}
--- COORDINATE constructor.
-- @param #COORDINATE self
@ -553,9 +578,9 @@ do -- COORDINATE
--- Build an air type route point.
-- @param #COORDINATE self
-- @param #COORDINATE.RoutePointAltType AltType The altitude type.
-- @param #COORDINATE.RoutePointType Type The route point type.
-- @param #COORDINATE.RoutePointAction Action The route point action.
-- @param #COORDINATE.WaypointAltType AltType The altitude type.
-- @param #COORDINATE.WaypointType Type The route point type.
-- @param #COORDINATE.WaypointAction Action The route point action.
-- @param Dcs.DCSTypes#Speed Speed Airspeed in km/h.
-- @param #boolean SpeedLocked true means the speed is locked.
-- @return #table The route point.
@ -595,6 +620,75 @@ do -- COORDINATE
return RoutePoint
end
--- Build a Waypoint Air "Turning Point".
-- @param #COORDINATE self
-- @param #COORDINATE.WaypointAltType AltType The altitude type.
-- @param Dcs.DCSTypes#Speed Speed Airspeed in km/h.
-- @return #table The route point.
function COORDINATE:WaypointAirTurningPoint( AltType, Speed )
return self:WaypointAir( AltType, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.TurningPoint, Speed )
end
--- Build a Waypoint Air "Fly Over Point".
-- @param #COORDINATE self
-- @param #COORDINATE.WaypointAltType AltType The altitude type.
-- @param Dcs.DCSTypes#Speed Speed Airspeed in km/h.
-- @return #table The route point.
function COORDINATE:WaypointAirFlyOverPoint( AltType, Speed )
return self:WaypointAir( AltType, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.FlyoverPoint, Speed )
end
--- Build a Waypoint Air "Take Off Parking Hot".
-- @param #COORDINATE self
-- @param #COORDINATE.WaypointAltType AltType The altitude type.
-- @param Dcs.DCSTypes#Speed Speed Airspeed in km/h.
-- @return #table The route point.
function COORDINATE:WaypointAirTakeOffParkingHot( AltType, Speed )
return self:WaypointAir( AltType, COORDINATE.WaypointType.TakeOffParkingHot, COORDINATE.WaypointAction.FromParkingAreaHot, Speed )
end
--- Build a Waypoint Air "Take Off Parking".
-- @param #COORDINATE self
-- @param #COORDINATE.WaypointAltType AltType The altitude type.
-- @param Dcs.DCSTypes#Speed Speed Airspeed in km/h.
-- @return #table The route point.
function COORDINATE:WaypointAirTakeOffParking( AltType, Speed )
return self:WaypointAir( AltType, COORDINATE.WaypointType.TakeOffParking, COORDINATE.WaypointAction.FromParkingArea, Speed )
end
--- Build a Waypoint Air "Take Off Runway".
-- @param #COORDINATE self
-- @param #COORDINATE.WaypointAltType AltType The altitude type.
-- @param Dcs.DCSTypes#Speed Speed Airspeed in km/h.
-- @return #table The route point.
function COORDINATE:WaypointAirTakeOffRunway( AltType, Speed )
return self:WaypointAir( AltType, COORDINATE.WaypointType.TakeOff, COORDINATE.WaypointAction.FromRunway, Speed )
end
--- Build a Waypoint Air "Landing".
-- @param #COORDINATE self
-- @param Dcs.DCSTypes#Speed Speed Airspeed in km/h.
-- @return #table The route point.
-- @usage
--
-- LandingZone = ZONE:New( "LandingZone" )
-- LandingCoord = LandingZone:GetCoordinate()
-- LandingWaypoint = LandingCoord:WaypointAirLanding( 60 )
-- HeliGroup:Route( { LandWaypoint }, 1 ) -- Start landing the helicopter in one second.
--
function COORDINATE:WaypointAirLanding( Speed )
return self:WaypointAir( nil, COORDINATE.WaypointType.Land, COORDINATE.WaypointAction.Landing, Speed )
end
--- Build an ground type route point.
-- @param #COORDINATE self
-- @param #number Speed (optional) Speed in km/h. The default speed is 999 km/h.

View File

@ -937,9 +937,6 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
<p> This table contains the targets detected during patrol.</p>
</dd>
</dl>
<dl class="function">

View File

@ -1107,7 +1107,7 @@ function below will use the range 1-7 just in case</p>
<dl class="function">
<dt>
<em>#number</em>
<em></em>
<a id="#(DESIGNATE).LaseDuration" >
<strong>DESIGNATE.LaseDuration</strong>
</a>
@ -1161,7 +1161,6 @@ function below will use the range 1-7 just in case</p>
<dl class="function">
<dt>
<em></em>
<a id="#(DESIGNATE).LaserCodes" >
<strong>DESIGNATE.LaserCodes</strong>
</a>

View File

@ -2483,7 +2483,6 @@ The index of the DetectedItem.</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(DETECTION_BASE).DetectedItemMax" >
<strong>DETECTION_BASE.DetectedItemMax</strong>
</a>
@ -4061,7 +4060,7 @@ Return false to cancel Transition.</p>
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(DETECTION_BASE).RefreshTimeInterval" >
<strong>DETECTION_BASE.RefreshTimeInterval</strong>
</a>

View File

@ -238,7 +238,6 @@ on defined intervals (currently every minute).</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(MOVEMENT).AliveUnits" >
<strong>MOVEMENT.AliveUnits</strong>
</a>
@ -247,9 +246,6 @@ on defined intervals (currently every minute).</p>
<p> Contains the counter how many units are currently alive</p>
</dd>
</dl>
<dl class="function">

View File

@ -556,18 +556,72 @@
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).Velocity">COORDINATE.Velocity</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAction">COORDINATE.WaypointAction</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAir">COORDINATE:WaypointAir(AltType, Type, Action, Speed, SpeedLocked)</a></td>
<td class="summary">
<p>Build an air type route point.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAirFlyOverPoint">COORDINATE:WaypointAirFlyOverPoint(AltType, Speed)</a></td>
<td class="summary">
<p>Build a Waypoint Air "Fly Over Point".</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAirLanding">COORDINATE:WaypointAirLanding(Speed)</a></td>
<td class="summary">
<p>Build a Waypoint Air "Landing".</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAirTakeOffParking">COORDINATE:WaypointAirTakeOffParking(AltType, Speed)</a></td>
<td class="summary">
<p>Build a Waypoint Air "Take Off Parking".</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAirTakeOffParkingHot">COORDINATE:WaypointAirTakeOffParkingHot(AltType, Speed)</a></td>
<td class="summary">
<p>Build a Waypoint Air "Take Off Parking Hot".</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAirTakeOffRunway">COORDINATE:WaypointAirTakeOffRunway(AltType, Speed)</a></td>
<td class="summary">
<p>Build a Waypoint Air "Take Off Runway".</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAirTurningPoint">COORDINATE:WaypointAirTurningPoint(AltType, Speed)</a></td>
<td class="summary">
<p>Build a Waypoint Air "Turning Point".</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointAltType">COORDINATE.WaypointAltType</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointGround">COORDINATE:WaypointGround(Speed, Formation)</a></td>
<td class="summary">
<p>Build an ground type route point.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).WaypointType">COORDINATE.WaypointType</a></td>
<td class="summary">
</td>
</tr>
<tr>
@ -2860,6 +2914,20 @@ The new calculated COORDINATE.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(COORDINATE).WaypointAction" >
<strong>COORDINATE.WaypointAction</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@ -2877,19 +2945,19 @@ The new calculated COORDINATE.</p>
<ul>
<li>
<p><code><em><a href="##(COORDINATE.RoutePointAltType)">#COORDINATE.RoutePointAltType</a> AltType </em></code>:
<p><code><em><a href="##(COORDINATE.WaypointAltType)">#COORDINATE.WaypointAltType</a> AltType </em></code>:
The altitude type.</p>
</li>
<li>
<p><code><em><a href="##(COORDINATE.RoutePointType)">#COORDINATE.RoutePointType</a> Type </em></code>:
<p><code><em><a href="##(COORDINATE.WaypointType)">#COORDINATE.WaypointType</a> Type </em></code>:
The route point type.</p>
</li>
<li>
<p><code><em><a href="##(COORDINATE.RoutePointAction)">#COORDINATE.RoutePointAction</a> Action </em></code>:
<p><code><em><a href="##(COORDINATE.WaypointAction)">#COORDINATE.WaypointAction</a> Action </em></code>:
The route point action.</p>
</li>
@ -2911,6 +2979,220 @@ true means the speed is locked.</p>
<p><em>#table:</em>
The route point.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).WaypointAirFlyOverPoint" >
<strong>COORDINATE:WaypointAirFlyOverPoint(AltType, Speed)</strong>
</a>
</dt>
<dd>
<p>Build a Waypoint Air "Fly Over Point".</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="##(COORDINATE.WaypointAltType)">#COORDINATE.WaypointAltType</a> AltType </em></code>:
The altitude type.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> Speed </em></code>:
Airspeed in km/h.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em>
The route point.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).WaypointAirLanding" >
<strong>COORDINATE:WaypointAirLanding(Speed)</strong>
</a>
</dt>
<dd>
<p>Build a Waypoint Air "Landing".</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> Speed </em></code>:
Airspeed in km/h.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em>
The route point.</p>
<h3>Usage:</h3>
<pre class="example"><code>
LandingZone = ZONE:New( "LandingZone" )
LandingCoord = LandingZone:GetCoordinate()
LandingWaypoint = LandingCoord:WaypointAirLanding( 60 )
HeliGroup:Route( { LandWaypoint }, 1 ) -- Start landing the helicopter in one second.
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).WaypointAirTakeOffParking" >
<strong>COORDINATE:WaypointAirTakeOffParking(AltType, Speed)</strong>
</a>
</dt>
<dd>
<p>Build a Waypoint Air "Take Off Parking".</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="##(COORDINATE.WaypointAltType)">#COORDINATE.WaypointAltType</a> AltType </em></code>:
The altitude type.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> Speed </em></code>:
Airspeed in km/h.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em>
The route point.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).WaypointAirTakeOffParkingHot" >
<strong>COORDINATE:WaypointAirTakeOffParkingHot(AltType, Speed)</strong>
</a>
</dt>
<dd>
<p>Build a Waypoint Air "Take Off Parking Hot".</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="##(COORDINATE.WaypointAltType)">#COORDINATE.WaypointAltType</a> AltType </em></code>:
The altitude type.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> Speed </em></code>:
Airspeed in km/h.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em>
The route point.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).WaypointAirTakeOffRunway" >
<strong>COORDINATE:WaypointAirTakeOffRunway(AltType, Speed)</strong>
</a>
</dt>
<dd>
<p>Build a Waypoint Air "Take Off Runway".</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="##(COORDINATE.WaypointAltType)">#COORDINATE.WaypointAltType</a> AltType </em></code>:
The altitude type.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> Speed </em></code>:
Airspeed in km/h.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em>
The route point.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).WaypointAirTurningPoint" >
<strong>COORDINATE:WaypointAirTurningPoint(AltType, Speed)</strong>
</a>
</dt>
<dd>
<p>Build a Waypoint Air "Turning Point".</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="##(COORDINATE.WaypointAltType)">#COORDINATE.WaypointAltType</a> AltType </em></code>:
The altitude type.</p>
</li>
<li>
<p><code><em><a href="Dcs.DCSTypes.html##(Speed)">Dcs.DCSTypes#Speed</a> Speed </em></code>:
Airspeed in km/h.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#table:</em>
The route point.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(COORDINATE).WaypointAltType" >
<strong>COORDINATE.WaypointAltType</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@ -2944,6 +3226,20 @@ The route point.</p>
<p><em>#table:</em>
The route point.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(COORDINATE).WaypointType" >
<strong>COORDINATE.WaypointType</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@ -2989,11 +3285,11 @@ The route point.</p>
</dd>
</dl>
<h2><a id="#(COORDINATE.RoutePointAction)" >Type <code>COORDINATE.RoutePointAction</code></a></h2>
<h2><a id="#(COORDINATE.WaypointAction)" >Type <code>COORDINATE.WaypointAction</code></a></h2>
<h2><a id="#(COORDINATE.RoutePointAltType)" >Type <code>COORDINATE.RoutePointAltType</code></a></h2>
<h2><a id="#(COORDINATE.WaypointAltType)" >Type <code>COORDINATE.WaypointAltType</code></a></h2>
<h2><a id="#(COORDINATE.RoutePointType)" >Type <code>COORDINATE.RoutePointType</code></a></h2>
<h2><a id="#(COORDINATE.WaypointType)" >Type <code>COORDINATE.WaypointType</code></a></h2>
<h2><a id="#(POINT_VEC2)" >Type <code>POINT_VEC2</code></a></h2>
<h3>Field(s)</h3>

View File

@ -1321,12 +1321,6 @@
<td class="name" nowrap="nowrap"><a href="##(RAT).templategroup">RAT.templategroup</a></td>
<td class="summary">
<p>Group serving as template for the RAT aircraft.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(RAT).type">RAT.type</a></td>
<td class="summary">
</td>
</tr>
<tr>
@ -5549,20 +5543,6 @@ True if zone exsits, false otherwise. </p>
<p>Group serving as template for the RAT aircraft.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(RAT).type" >
<strong>RAT.type</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">

View File

@ -1251,7 +1251,7 @@ true if metric.</p>
<dl class="function">
<dt>
<em></em>
<em>#boolean</em>
<a id="#(SETTINGS).Metric" >
<strong>SETTINGS.Metric</strong>
</a>

View File

@ -2309,6 +2309,9 @@ The group that was spawned. You can use this group for further actions.</p>
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
</dd>
</dl>
<dl class="function">
@ -3384,7 +3387,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<dl class="function">
<dt>
<em></em>
<em>#boolean</em>
<a id="#(SPAWN).SpawnUnControlled" >
<strong>SPAWN.SpawnUnControlled</strong>
</a>
@ -3408,7 +3411,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
</dd>
</dl>

View File

@ -491,6 +491,7 @@ ptional) The name of the new static.</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(SPAWNSTATIC).SpawnIndex" >
<strong>SPAWNSTATIC.SpawnIndex</strong>
</a>

View File

@ -563,7 +563,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function">
<dt>
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
<em><a href="Core.Cargo.html##(CARGO)">Core.Cargo#CARGO</a></em>
<a id="#(FSM_PROCESS).Cargo" >
<strong>FSM_PROCESS.Cargo</strong>
</a>