Banner Image

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.

#DETECTION_ZONES 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.

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:

the detected zones when a new detection has taken place.

Type(s)

Fields and Methods inherited from DETECTION_BASE.DetectedItem Description

DETECTION_BASE.DetectedItem.Changed

DETECTION_BASE.DetectedItem.InterceptCoord

Fields and Methods inherited from DETECTION_ZONES Description

DETECTION_ZONES:BoundDetectedZones()

Bound the detected zones

DETECTION_ZONES:CalculateIntercept(DetectedItem)

Calculate the optimal intercept point of the DetectedItem.

DETECTION_ZONES:CountAliveRecce()

DETECTION_ZONES.CountryID

DETECTION_ZONES:CreateDetectionItems()

Make a DetectionSet table.

DETECTION_ZONES:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

Report summary of a detected item using a given numeric index.

DETECTION_ZONES:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

DETECTION_ZONES.DetectionCoalition

DETECTION_ZONES.DetectionSetZone

DETECTION_ZONES:FlareDetectedUnits()

Flare the detected units

DETECTION_ZONES:FlareDetectedZones()

Flare the detected zones

DETECTION_ZONES:ForEachAliveRecce(IteratorFunction, ...)

DETECTION_ZONES:GetChangeText(DetectedItem)

Make text documenting the changes of the detected zone.

DETECTION_ZONES:New(DetectionSetZone, DetectionCoalition)

DETECTION_ZONES constructor.

DETECTION_ZONES:SmokeDetectedUnits()

Smoke the detected units

DETECTION_ZONES:SmokeDetectedZones()

Smoke the detected zones

DETECTION_ZONES:UpdateDetectedItemDetection(DetectedItem)

Set IsDetected flag for the DetectedItem, which can have more units.

DETECTION_ZONES._BoundDetectedZones

DETECTION_ZONES._FlareDetectedUnits

DETECTION_ZONES._FlareDetectedZones

DETECTION_ZONES._SmokeDetectedUnits

DETECTION_ZONES._SmokeDetectedZones

DETECTION_ZONES:onafterDetection(From, Event, To, Detection, DetectionTimeStamp)

Field(s)

DETECTION_BASE.DetectedItem.InterceptCoord
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

Defined in:

DETECTION_ZONES

Return value:

Calculate the optimal intercept point of the DetectedItem.

Defined in:

DETECTION_ZONES

Parameter:

@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.

Defined in:

DETECTION_ZONES

Return value:

Report summary of a detected item using a given numeric index.

Defined in:

DETECTION_ZONES

Parameters:

The DetectedItem.

Wrapper.Group#GROUP AttackGroup

The group to get the settings for.

(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

Defined in:

DETECTION_ZONES

Return value:

Flare the detected zones

Defined in:

DETECTION_ZONES

Return value:

@param #DETECTION_ZONES self

Defined in:

DETECTION_ZONES

Parameters:

IteratorFunction

...

Make text documenting the changes of the detected zone.

Defined in:

DETECTION_ZONES

Parameter:

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

Defined in:

DETECTION_ZONES

Return value:

Smoke the detected zones

Defined in:

DETECTION_ZONES

Return value:

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