Documentation
@ -105,7 +105,7 @@ do -- AI_DESIGNATE
|
||||
--
|
||||
-- ## 2. AI_DESIGNATE is a FSM
|
||||
--
|
||||
-- ![Process]()
|
||||
-- 
|
||||
--
|
||||
-- ### 2.1 AI_DESIGNATE States
|
||||
--
|
||||
@ -141,7 +141,7 @@ do -- AI_DESIGNATE
|
||||
--
|
||||
-- ### 3.2 Auto generate laser codes
|
||||
--
|
||||
-- WIP
|
||||
-- Use the method @{#AI_DESIGNATE.GenerateLaserCodes}() to generate all possible laser codes. Logic implemented and advised by Ciribob!
|
||||
--
|
||||
-- ## 4. Autolase to automatically lase detected targets.
|
||||
--
|
||||
@ -372,6 +372,59 @@ do -- AI_DESIGNATE
|
||||
return self
|
||||
end
|
||||
|
||||
--- Generate an array of possible laser codes.
|
||||
-- Each new lase will select a code from this table.
|
||||
-- The entered value can range from 1111 - 1788,
|
||||
-- -- but the first digit of the series must be a 1 or 2
|
||||
-- -- and the last three digits must be between 1 and 8.
|
||||
-- The range used to be bugged so its not 1 - 8 but 0 - 7.
|
||||
-- function below will use the range 1-7 just in case
|
||||
-- @param #AI_DESIGNATE self
|
||||
-- @return #AI_DESIGNATE
|
||||
function AI_DESIGNATE:GenerateLaserCodes() --R2.1
|
||||
|
||||
self.LaserCodes = {}
|
||||
|
||||
local function containsDigit(_number, _numberToFind)
|
||||
|
||||
local _thisNumber = _number
|
||||
local _thisDigit = 0
|
||||
|
||||
while _thisNumber ~= 0 do
|
||||
_thisDigit = _thisNumber % 10
|
||||
_thisNumber = math.floor(_thisNumber / 10)
|
||||
if _thisDigit == _numberToFind then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
-- generate list of laser codes
|
||||
local _code = 1111
|
||||
local _count = 1
|
||||
while _code < 1777 and _count < 30 do
|
||||
while true do
|
||||
_code = _code + 1
|
||||
if not containsDigit(_code, 8)
|
||||
and not containsDigit(_code, 9)
|
||||
and not containsDigit(_code, 0) then
|
||||
self:T(_code)
|
||||
table.insert( self.LaserCodes, _code )
|
||||
break
|
||||
end
|
||||
end
|
||||
_count = _count + 1
|
||||
end
|
||||
|
||||
self.LaserCodesUsed = {}
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Set auto lase.
|
||||
-- Auto lase will start lasing targets immediately when these are in range.
|
||||
-- @param #AI_DESIGNATE self
|
||||
@ -780,4 +833,5 @@ do -- AI_DESIGNATE
|
||||
|
||||
end
|
||||
|
||||
-- Help from Ciribob
|
||||
|
||||
|
||||
@ -55,14 +55,14 @@ do
|
||||
--
|
||||
-- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:
|
||||
--
|
||||
-- * Spot for a defined duration.
|
||||
-- * Mark targets for a defined duration.
|
||||
-- * wiggle the spot at the target.
|
||||
-- * Provide a @{Unit} as a target, instead of a point.
|
||||
-- * Implement a status machine, LaseOn, LaseOff.
|
||||
--
|
||||
-- ## 1. SPOT constructor
|
||||
--
|
||||
-- * @{#SPOT.New}(): Creates a new SPOT object.
|
||||
-- * @{#SPOT.New}(..\Presentations\SPOT\Dia2.JPG): Creates a new SPOT object.
|
||||
--
|
||||
-- ## 2. SPOT is a FSM
|
||||
--
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170423_0705' )
|
||||
env.info( 'Moose Generation Timestamp: 20170423_1757' )
|
||||
|
||||
local base = _G
|
||||
|
||||
|
||||
@ -186,6 +186,12 @@ each detected set of potential targets can be lased or smoked...</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Detection">AI_DESIGNATE.Detection</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).GenerateLaserCodes">AI_DESIGNATE:GenerateLaserCodes()</a></td>
|
||||
<td class="summary">
|
||||
<p>Generate an array of possible laser codes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -558,7 +564,7 @@ Once <em>Targets</em> have been detected, the <em>DesignateObject</em> will trig
|
||||
|
||||
<h2>2. AI_DESIGNATE is a FSM</h2>
|
||||
|
||||
<p><img src="" alt="Process"/></p>
|
||||
<p><img src="..\Presentations\DESIGNATE\Dia2.JPG" alt="Process"/></p>
|
||||
|
||||
<h3>2.1 AI_DESIGNATE States</h3>
|
||||
|
||||
@ -576,7 +582,9 @@ Once <em>Targets</em> have been detected, the <em>DesignateObject</em> will trig
|
||||
<li>**<a href="##(AI_DESIGNATE).Status">AI_DESIGNATE.Status</a>**: Report designation status.</li>
|
||||
</ul>
|
||||
|
||||
<h2>3. Set laser codes</h2>
|
||||
<h2>3. Laser codes</h2>
|
||||
|
||||
<h3>3.1 Set possible laser codes</h3>
|
||||
|
||||
<p>An array of laser codes can be provided, that will be used by the AI_DESIGNATE when lasing.
|
||||
The laser code is communicated by the Recce when it is lasing a larget.
|
||||
@ -596,6 +604,10 @@ One laser code can be given or an sequence of laser codes through an table...</p
|
||||
|
||||
<p>The above sets a collection of possible laser codes that can be assigned. <strong>Note the { } notation!</strong></p>
|
||||
|
||||
<h3>3.2 Auto generate laser codes</h3>
|
||||
|
||||
<p>Use the method <a href="##(AI_DESIGNATE).GenerateLaserCodes">AI_DESIGNATE.GenerateLaserCodes</a>() to generate all possible laser codes. Logic implemented and advised by Ciribob!</p>
|
||||
|
||||
<h2>4. Autolase to automatically lase detected targets.</h2>
|
||||
|
||||
<p><em>DetectionItems</em> can be auto lased once detected by <em>Recces</em>. As such, there is almost no action required from the <em>Players</em> using the <em>Designate Menu</em>.
|
||||
@ -700,6 +712,32 @@ Note that autolase will automatically activate lasing for ALL <em>DetectedItems<
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_DESIGNATE).GenerateLaserCodes" >
|
||||
<strong>AI_DESIGNATE:GenerateLaserCodes()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Generate an array of possible laser codes.</p>
|
||||
|
||||
|
||||
<p>Each new lase will select a code from this table.
|
||||
The entered value can range from 1111 - 1788,
|
||||
-- but the first digit of the series must be a 1 or 2
|
||||
-- and the last three digits must be between 1 and 8.
|
||||
The range used to be bugged so its not 1 - 8 but 0 - 7.
|
||||
function below will use the range 1-7 just in case</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -770,6 +770,12 @@ and any spaces before and after the resulting name are removed.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -2071,9 +2077,6 @@ 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">
|
||||
@ -2527,9 +2530,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Overwrite unit names by default with group name.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2544,9 +2544,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> By default, no InitLimit</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2582,7 +2579,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxGroups" >
|
||||
<strong>SPAWN.SpawnMaxGroups</strong>
|
||||
</a>
|
||||
@ -2599,7 +2596,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||
</a>
|
||||
@ -2951,7 +2948,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
|
||||
|
||||
|
||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
||||
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -3517,6 +3514,20 @@ True = Continue Scheduler</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).uncontrolled" >
|
||||
<strong>SPAWN.uncontrolled</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -444,7 +444,6 @@ ptional) The name of the new static.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWNSTATIC).SpawnIndex" >
|
||||
<strong>SPAWNSTATIC.SpawnIndex</strong>
|
||||
</a>
|
||||
|
||||
@ -158,7 +158,7 @@
|
||||
<p>SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:</p>
|
||||
|
||||
<ul>
|
||||
<li>Spot for a defined duration.</li>
|
||||
<li>Mark targets for a defined duration.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
@ -339,7 +339,7 @@
|
||||
<p>SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:</p>
|
||||
|
||||
<ul>
|
||||
<li>Spot for a defined duration.</li>
|
||||
<li>Mark targets for a defined duration.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -352,7 +352,7 @@
|
||||
<h2>1. SPOT constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPOT).New">SPOT.New</a>(): Creates a new SPOT object.</li>
|
||||
<li><a href="##(SPOT).New">SPOT.New</a>(..\Presentations\SPOT\Dia2.JPG): Creates a new SPOT object.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2. SPOT is a FSM</h2>
|
||||
@ -761,6 +761,7 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).ScheduleID" >
|
||||
<strong>SPOT.ScheduleID</strong>
|
||||
</a>
|
||||
@ -774,6 +775,7 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).SpotIR" >
|
||||
<strong>SPOT.SpotIR</strong>
|
||||
</a>
|
||||
@ -787,6 +789,7 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).SpotLaser" >
|
||||
<strong>SPOT.SpotLaser</strong>
|
||||
</a>
|
||||
@ -800,6 +803,7 @@ true if it is lasing</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPOT).Target" >
|
||||
<strong>SPOT.Target</strong>
|
||||
</a>
|
||||
|
||||
BIN
docs/Presentations/DESIGNATE/Dia10.JPG
Normal file
|
After Width: | Height: | Size: 182 KiB |
BIN
docs/Presentations/DESIGNATE/Dia11.JPG
Normal file
|
After Width: | Height: | Size: 177 KiB |
BIN
docs/Presentations/DESIGNATE/Dia12.JPG
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
docs/Presentations/DESIGNATE/Dia13.JPG
Normal file
|
After Width: | Height: | Size: 224 KiB |
BIN
docs/Presentations/DESIGNATE/Dia14.JPG
Normal file
|
After Width: | Height: | Size: 194 KiB |
BIN
docs/Presentations/DESIGNATE/Dia2.JPG
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
docs/Presentations/DESIGNATE/Dia3.JPG
Normal file
|
After Width: | Height: | Size: 224 KiB |
BIN
docs/Presentations/DESIGNATE/Dia4.JPG
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
docs/Presentations/DESIGNATE/Dia5.JPG
Normal file
|
After Width: | Height: | Size: 218 KiB |
BIN
docs/Presentations/DESIGNATE/Dia6.JPG
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
docs/Presentations/DESIGNATE/Dia7.JPG
Normal file
|
After Width: | Height: | Size: 193 KiB |
BIN
docs/Presentations/DESIGNATE/Dia8.JPG
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
docs/Presentations/DESIGNATE/Dia9.JPG
Normal file
|
After Width: | Height: | Size: 188 KiB |
BIN
docs/Presentations/SPOT/Dia2.JPG
Normal file
|
After Width: | Height: | Size: 119 KiB |
BIN
docs/Presentations/SPOT/Dia3.JPG
Normal file
|
After Width: | Height: | Size: 136 KiB |