Module Functional.DetectionZones
Functional - Captures the class DETECTION_ZONES.
Global(s)
Global DETECTION_ZONES |
(old, to be revised ) Detect units within the battle zone for a list of Core.Zones detecting targets following (a) detection method(s), and will build a list (table) of Core.Set#SET_UNITs containing the Wrapper.Unit#UNITs detected. |
(old, to be revised ) Detect units within the battle zone for a list of Core.Zones detecting targets following (a) detection method(s), and will build a list (table) of Core.Set#SET_UNITs containing the Wrapper.Unit#UNITs detected.
The class is group the detected units within zones given a DetectedZoneRange parameter. A set with multiple detected zones will be created as there are groups of units detected.
4.1) Retrieve the Detected Unit Sets and Detected Zones
The methods to manage the DetectedItems[].Set(s) are implemented in Functional.Detection#DECTECTION_BASE and the methods to manage the DetectedItems[].Zone(s) is implemented in Functional.Detection#DETECTION_ZONES.
Retrieve the DetectedItems[].Set with the method Functional.Detection#DETECTION_BASE.GetDetectedSet(). A Core.Set#SET_UNIT object will be returned.
Retrieve the formed Core.Zone#ZONE_UNITs as a result of the grouping the detected units within the DetectionZoneRange, use the method Functional.Detection#DETECTION_BASE.GetDetectionZones(). To understand the amount of zones created, use the method Functional.Detection#DETECTION_BASE.GetDetectionZoneCount(). If you want to obtain a specific zone from the DetectedZones, use the method Functional.Detection#DETECTION_BASE.GetDetectionZone() with a given index.
4.4) Flare or Smoke detected units
Use the methods Functional.Detection#DETECTION_ZONES.FlareDetectedUnits() or Functional.Detection#DETECTION_ZONES.SmokeDetectedUnits() to flare or smoke the detected units when a new detection has taken place.
4.5) Flare or Smoke or Bound detected zones
Use the methods:
- Functional.Detection#DETECTION_ZONES.FlareDetectedZones() to flare in a color
- Functional.Detection#DETECTION_ZONES.SmokeDetectedZones() to smoke in a color
- Functional.Detection#DETECTION_ZONES.SmokeDetectedZones() to bound with a tire with a white flag
the detected zones when a new detection has taken place.
Type(s)
Fields and Methods inherited from DETECTION_BASE.DetectedItem | Description |
---|---|
Fields and Methods inherited from DETECTION_ZONES | Description |
---|---|
Bound the detected zones |
|
Calculate the optimal intercept point of the DetectedItem. |
|
Make a DetectionSet table. |
|
DETECTION_ZONES:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings) |
Report summary of a detected item using a given numeric index. |
Report detailed of a detection result. |
|
Flare the detected units |
|
Flare the detected zones |
|
Make text documenting the changes of the detected zone. |
|
DETECTION_ZONES constructor. |
|
Smoke the detected units |
|
Smoke the detected zones |
|
Set IsDetected flag for the DetectedItem, which can have more units. |
|
DETECTION_ZONES:onafterDetection(From, Event, To, Detection, DetectionTimeStamp) |
Field(s)
local DetectedSpeed = DetectedCoord:GetVelocity()
local DetectedHeading = DetectedCoord:GetHeading()
if self.Intercept then
local DetectedSet = DetectedItem.Set
-- todo: speed
local TranslateDistance = DetectedSpeed * self.InterceptDelay
local InterceptCoord = DetectedCoord:Translate( TranslateDistance, DetectedHeading )
DetectedItem.InterceptCoord = InterceptCoord
else
DetectedItem.InterceptCoord = DetectedCoord
end
Function(s)
Field(s)
Function(s)
Bound the detected zones
Calculate the optimal intercept point of the DetectedItem.
@param #DETECTION_ZONES self @param #number The amount of alive recce.
Defined in:
DETECTION_ZONES
Make a DetectionSet table.
This function will be overridden in the derived clsses.
Report summary of a detected item using a given numeric index.
Defined in:
DETECTION_ZONES
Parameters:
#DETECTION_BASE.DetectedItem DetectedItem
The DetectedItem.
Wrapper.Group#GROUP AttackGroup
The group to get the settings for.
Core.Settings#SETTINGS Settings
(Optional) Message formatting settings to use.
Return value:
The report of the detection items.
Report detailed of a detection result.
Defined in:
DETECTION_ZONES
Parameter:
Wrapper.Group#GROUP AttackGroup
The group to generate the report for.
Return value:
#string:
Flare the detected units
Flare the detected zones
@param #DETECTION_ZONES self
Defined in:
DETECTION_ZONES
Parameters:
IteratorFunction
...
Make text documenting the changes of the detected zone.
Defined in:
DETECTION_ZONES
Parameter:
#DETECTION_BASE.DetectedItem DetectedItem
Return value:
#string:
The Changes text
DETECTION_ZONES constructor.
Defined in:
DETECTION_ZONES
Parameters:
Core.Set#SET_ZONE DetectionSetZone
The Core.Set of ZONE_RADIUS.
DCS#Coalition.side DetectionCoalition
The coalition of the detection.
Return value:
Smoke the detected units
Smoke the detected zones
Set IsDetected flag for the DetectedItem, which can have more units.
Defined in:
DETECTION_ZONES
Parameter:
DetectedItem
Return values:
DetectedItem
#boolean:
true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.
@param #DETECTION_ZONES self @param #string From The From State string. @param #string Event The Event string. @param #string To The To State string. @param Detection The element on which the detection is based. @param #number DetectionTimeStamp Time stamp of detection event.
Defined in:
DETECTION_ZONES
Parameters:
From
Event
To
Detection
DetectionTimeStamp