Module Detection

This module contains the DETECTION classes.

1) Detection#DETECTION_BASE class, extends Base#BASE

The Detection#DETECTION_BASE class defines the core functions to administer detected objects. The Detection#DETECTION_BASE class will detect objects within the battle zone for a list of Groups detecting targets following (a) detection method(s).

1.1) DETECTION_BASE constructor

Construct a new DETECTION_BASE instance using the Detection#DETECTION_BASE.New() method.

1.2) DETECTION_BASE initialization

By default, detection will return detected objects with all the detection sensors available. However, you can ask how the objects were found with specific detection methods. If you use one of the below methods, the detection will work with the detection method specified. You can specify to apply multiple detection methods.

Use the following functions to report the objects it detected using the methods Visual, Optical, Radar, IRST, RWR, DLINK:

1.3) Obtain objects detected by DETECTION_BASE

DETECTION_BASE builds Sets of objects detected. These Set#SET_BASEs can be retrieved using the method Detection#DETECTION_BASE.GetDetectedSets(). The method will return a list (table) of Set#SET_BASE objects.


2) Detection#DETECTION_UNITGROUPS class, extends Detection#DETECTION_BASE

The Detection#DETECTION_UNITGROUPS class will detect units within the battle zone for a list of Groups detecting targets following (a) detection method(s), and will build a list (table) of Set#SET_UNITs containing the 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.

2.1) Retrieve the Detected Unit sets and Detected Zones

The DetectedUnitSets methods are implemented in Detection#DECTECTION_BASE and the DetectedZones methods is implemented in Detection#DETECTION_UNITGROUPS.

Retrieve the DetectedUnitSets with the method Detection#DETECTION_BASE.GetDetectedSets(). A table will be return of Set#SET_UNITs. To understand the amount of sets created, use the method Detection#DETECTION_BASE.GetDetectedSetCount(). If you want to obtain a specific set from the DetectedSets, use the method Detection#DETECTION_BASE.GetDetectedSet() with a given index.

Retrieve the formed Zones as a result of the grouping the detected units within the DetectionZoneRange, use the method Detection#DETECTION_BASE.GetDetectionZones(). To understand the amount of zones created, use the method Detection#DETECTION_BASE.GetDetectionZoneCount(). If you want to obtain a specific zone from the DetectedZones, use the method Detection#DETECTION_BASE.GetDetectionZone() with a given index.

1.4) Flare or Smoke detected units

Use the methods Detection#DETECTION_UNITGROUPS.FlareDetectedUnits() or Detection#DETECTION_UNITGROUPS.SmokeDetectedUnits() to flare or smoke the detected units when a new detection has taken place.

1.5) Flare or Smoke detected zones

Use the methods Detection#DETECTION_UNITGROUPS.FlareDetectedZones() or Detection#DETECTION_UNITGROUPS.SmokeDetectedZones() to flare or smoke the detected zones when a new detection has taken place.


### Contributions: Mechanic - Concept & Testing ### Authors: FlightControl : Design & Programming

Global(s)

DETECTION_BASE
DETECTION_UNITGROUPS

Type DETECTION_BASE

DETECTION_BASE.ClassName
DETECTION_BASE:CreateDetectionSets()

Make a DetectionSet table.

DETECTION_BASE.DetectDLINK
DETECTION_BASE.DetectIRST
DETECTION_BASE.DetectOptical
DETECTION_BASE.DetectRWR
DETECTION_BASE.DetectRadar
DETECTION_BASE.DetectVisual
DETECTION_BASE.DetectedObjects

The list of detected objects.

DETECTION_BASE.DetectionGroups

The GROUP in the Forward Air Controller role.

DETECTION_BASE.DetectionRange

The range till which targets are accepted to be detected.

DETECTION_BASE.DetectionRun
DETECTION_BASE.DetectionScheduler
DETECTION_BASE:GetDetectedObject(ObjectName)

Gets a detected object with a given name.

DETECTION_BASE:GetDetectedSet(Index)

Get a SET of detected objects using a given numeric index.

DETECTION_BASE:GetDetectedSetCount()

Get the amount of SETs with detected objects.

DETECTION_BASE:GetDetectedSets()

Get the detected Set#SET_BASEs.

DETECTION_BASE:GetDetectionGroups()

Get the detection Groups.

DETECTION_BASE:InitDetectDLINK(DetectDLINK)

Detect DLINK.

DETECTION_BASE:InitDetectIRST(DetectIRST)

Detect IRST.

DETECTION_BASE:InitDetectOptical(DetectOptical)

Detect Optical.

DETECTION_BASE:InitDetectRWR(DetectRWR)

Detect RWR.

DETECTION_BASE:InitDetectRadar(DetectRadar)

Detect Radar.

DETECTION_BASE:InitDetectVisual(DetectVisual)

Detect Visual.

DETECTION_BASE:New(DetectionGroups, DetectionRange)

DETECTION constructor.

DETECTION_BASE:Schedule(DelayTime, RepeatInterval)

Schedule the DETECTION construction.

DETECTION_BASE.ScheduleDelayTime
DETECTION_BASE.ScheduleRepeatInterval
DETECTION_BASE:_DetectionScheduler(SchedulerName)

Form Sets of detected Unit#UNITs in an array of Set#SET_BASEs.

Type DETECTION_BASE.DetectedObject

DETECTION_BASE.DetectedObject.Distance
DETECTION_BASE.DetectedObject.Identified
DETECTION_BASE.DetectedObject.Name
DETECTION_BASE.DetectedObject.Type
DETECTION_BASE.DetectedObject.Visible

Type DETECTION_UNITGROUPS

DETECTION_UNITGROUPS.AddDetectedArea(Set, Zone, self)

Add a detected DETECTION_UNITGROUPS.DetectedArea.

DETECTION_UNITGROUPS.ClassName
DETECTION_UNITGROUPS:CreateDetectionSets()

Make a DetectionSet table.

DETECTION_UNITGROUPS.DetectedAreas

A list of areas containing the set of Units, Zones, the center Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

DETECTION_UNITGROUPS.DetectionZoneRange

The range till which targets are grouped upon the first detected target.

DETECTION_UNITGROUPS:FlareDetectedUnits()

Flare the detected units

DETECTION_UNITGROUPS:FlareDetectedZones()

Flare the detected zones

DETECTION_UNITGROUPS:GetDetectedAreaCount()

Get the amount of DETECTION_UNITGROUPS.DetectedAreas.

DETECTION_UNITGROUPS:GetDetectedAreas()

Get the detected DETECTION_UNITGROUPS.DetectedAreas.

DETECTION_UNITGROUPS:GetDetectedSet(Index)

Get the Set#SET_UNIT of a detecttion area using a given numeric index.

DETECTION_UNITGROUPS:GetDetectedZone(Index)

Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

DETECTION_UNITGROUPS:New(DetectionGroups, DetectionRange, DetectionZoneRange)

DETECTION_UNITGROUPS constructor.

DETECTION_UNITGROUPS:RemoveDetectedArea(Index)

Remove a detected DETECTION_UNITGROUPS.DetectedArea with a given Index.

DETECTION_UNITGROUPS:SmokeDetectedUnits()

Smoke the detected units

DETECTION_UNITGROUPS:SmokeDetectedZones()

Smoke the detected zones

DETECTION_UNITGROUPS._FlareDetectedUnits
DETECTION_UNITGROUPS._FlareDetectedZones
DETECTION_UNITGROUPS._SmokeDetectedUnits
DETECTION_UNITGROUPS._SmokeDetectedZones

Type DETECTION_UNITGROUPS.DetectedArea

DETECTION_UNITGROUPS.DetectedArea.AreaID

-- The identifier of the detected area.

DETECTION_UNITGROUPS.DetectedArea.Set

-- The Set of Units in the detected area.

DETECTION_UNITGROUPS.DetectedArea.Zone

-- The Zone of the detected area.

Global(s)

#DETECTION_BASE DETECTION_BASE
#DETECTION_UNITGROUPS DETECTION_UNITGROUPS

Type Detection

Type DETECTION_BASE

DETECTION_BASE class

Field(s)

#string DETECTION_BASE.ClassName
DETECTION_BASE:CreateDetectionSets()

Make a DetectionSet table.

This function will be overridden in the derived clsses.

Return value

#DETECTION_BASE: self

DETECTION_BASE.DetectDLINK
DETECTION_BASE.DetectIRST
DETECTION_BASE.DetectOptical
DETECTION_BASE.DetectRWR
DETECTION_BASE.DetectRadar
DETECTION_BASE.DetectVisual
#DETECTION_BASE.DetectedObjects DETECTION_BASE.DetectedObjects

The list of detected objects.

Group#GROUP DETECTION_BASE.DetectionGroups

The GROUP in the Forward Air Controller role.

DCSTypes#Distance DETECTION_BASE.DetectionRange

The range till which targets are accepted to be detected.

#number DETECTION_BASE.DetectionRun
DETECTION_BASE.DetectionScheduler
DETECTION_BASE:GetDetectedObject(ObjectName)

Gets a detected object with a given name.

Parameter

  • #string ObjectName :

Return value

#DETECTION_BASE.DetectedObject:

DETECTION_BASE:GetDetectedSet(Index)

Get a SET of detected objects using a given numeric index.

Parameter

  • #number Index :

Return value

Set#SET_BASE:

DETECTION_BASE:GetDetectedSetCount()

Get the amount of SETs with detected objects.

Return value

#number: Count

DETECTION_BASE:GetDetectedSets()

Get the detected Set#SET_BASEs.

Return value

#DETECTION_BASE.DetectedSets: DetectedSets

DETECTION_BASE:GetDetectionGroups()

Get the detection Groups.

Return value

Group#GROUP:

DETECTION_BASE:InitDetectDLINK(DetectDLINK)

Detect DLINK.

Parameter

  • #boolean DetectDLINK :

Return value

#DETECTION_BASE: self

DETECTION_BASE:InitDetectIRST(DetectIRST)

Detect IRST.

Parameter

  • #boolean DetectIRST :

Return value

#DETECTION_BASE: self

DETECTION_BASE:InitDetectOptical(DetectOptical)

Detect Optical.

Parameter

  • #boolean DetectOptical :

Return value

#DETECTION_BASE: self

DETECTION_BASE:InitDetectRWR(DetectRWR)

Detect RWR.

Parameter

  • #boolean DetectRWR :

Return value

#DETECTION_BASE: self

DETECTION_BASE:InitDetectRadar(DetectRadar)

Detect Radar.

Parameter

  • #boolean DetectRadar :

Return value

#DETECTION_BASE: self

DETECTION_BASE:InitDetectVisual(DetectVisual)

Detect Visual.

Parameter

  • #boolean DetectVisual :

Return value

#DETECTION_BASE: self

DETECTION_BASE:New(DetectionGroups, DetectionRange)

DETECTION constructor.

Parameters

  • Group#GROUP DetectionGroups : The GROUP in the Forward Air Controller role.

  • DCSTypes#Distance DetectionRange : The range till which targets are accepted to be detected.

Return value

#DETECTION_BASE: self

DETECTION_BASE:Schedule(DelayTime, RepeatInterval)

Schedule the DETECTION construction.

Parameters

  • #number DelayTime : The delay in seconds to wait the reporting.

  • #number RepeatInterval : The repeat interval in seconds for the reporting to happen repeatedly.

Return value

#DETECTION_BASE: self

DETECTION_BASE.ScheduleDelayTime
DETECTION_BASE.ScheduleRepeatInterval
DETECTION_BASE:_DetectionScheduler(SchedulerName)

Form Sets of detected Unit#UNITs in an array of Set#SET_BASEs.

Parameter

  • SchedulerName :

Type DETECTION_BASE.DetectedObject

Field(s)

#number DETECTION_BASE.DetectedObject.Distance
#boolean DETECTION_BASE.DetectedObject.Identified
#string DETECTION_BASE.DetectedObject.Name
#string DETECTION_BASE.DetectedObject.Type
#boolean DETECTION_BASE.DetectedObject.Visible

Type DETECTION_BASE.DetectedObjects

Type DETECTION_BASE.DetectedSets

Type DETECTION_UNITGROUPS

DETECTION_UNITGROUPS class

Field(s)

DETECTION_UNITGROUPS.AddDetectedArea(Set, Zone, self)

Add a detected DETECTION_UNITGROUPS.DetectedArea.

Parameters

Return value

#DETECTION_UNITGROUPS.DetectedArea: DetectedArea

#string DETECTION_UNITGROUPS.ClassName
DETECTION_UNITGROUPS:CreateDetectionSets()

Make a DetectionSet table.

This function will be overridden in the derived clsses.

Return value

#DETECTION_UNITGROUPS: self

#DETECTION_UNITGROUPS.DetectedAreas DETECTION_UNITGROUPS.DetectedAreas

A list of areas containing the set of Units, Zones, the center Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

DCSTypes#Distance DETECTION_UNITGROUPS.DetectionZoneRange

The range till which targets are grouped upon the first detected target.

DETECTION_UNITGROUPS:FlareDetectedUnits()

Flare the detected units

Return value

#DETECTION_UNITGROUPS: self

DETECTION_UNITGROUPS:FlareDetectedZones()

Flare the detected zones

Return value

#DETECTION_UNITGROUPS: self

DETECTION_UNITGROUPS:GetDetectedAreaCount()

Get the amount of DETECTION_UNITGROUPS.DetectedAreas.

Return value

#number: DetectedAreaCount

DETECTION_UNITGROUPS:GetDetectedAreas()

Get the detected DETECTION_UNITGROUPS.DetectedAreas.

Return value

#DETECTION_UNITGROUPS.DetectedAreas: DetectedAreas

DETECTION_UNITGROUPS:GetDetectedSet(Index)

Get the Set#SET_UNIT of a detecttion area using a given numeric index.

Parameter

  • #number Index :

Return value

Set#SET_UNIT: DetectedSet

DETECTION_UNITGROUPS:GetDetectedZone(Index)

Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

Parameter

  • #number Index :

Return value

Zone#ZONE_UNIT: DetectedZone

DETECTION_UNITGROUPS:New(DetectionGroups, DetectionRange, DetectionZoneRange)

DETECTION_UNITGROUPS constructor.

Parameters

  • Group#GROUP DetectionGroups : The GROUP in the Forward Air Controller role.

  • DCSTypes#Distance DetectionRange : The range till which targets are accepted to be detected.

  • DCSTypes#Distance DetectionZoneRange : The range till which targets are grouped upon the first detected target.

Return value

Detection#DETECTION_UNITGROUPS: self

DETECTION_UNITGROUPS:RemoveDetectedArea(Index)

Remove a detected DETECTION_UNITGROUPS.DetectedArea with a given Index.

Parameter

  • #number Index : The Index of the detection are to be removed.

Return value

#nil:

DETECTION_UNITGROUPS:SmokeDetectedUnits()

Smoke the detected units

Return value

#DETECTION_UNITGROUPS: self

DETECTION_UNITGROUPS:SmokeDetectedZones()

Smoke the detected zones

Return value

#DETECTION_UNITGROUPS: self

#boolean DETECTION_UNITGROUPS._FlareDetectedUnits
#boolean DETECTION_UNITGROUPS._FlareDetectedZones
#boolean DETECTION_UNITGROUPS._SmokeDetectedUnits
#boolean DETECTION_UNITGROUPS._SmokeDetectedZones

Type DETECTION_UNITGROUPS.DetectedArea

Field(s)

#number DETECTION_UNITGROUPS.DetectedArea.AreaID

-- The identifier of the detected area.

Set#SET_UNIT DETECTION_UNITGROUPS.DetectedArea.Set

-- The Set of Units in the detected area.

Zone#ZONE_UNIT DETECTION_UNITGROUPS.DetectedArea.Zone

-- The Zone of the detected area.

Type DETECTION_UNITGROUPS.DetectedAreas