Module Detection

This module contains the DETECTION classes.

1) Functional.Detection#DETECTION_BASE class, extends Core.Base#BASE

The Functional.Detection#DETECTION_BASE class defines the core functions to administer detected objects. The Functional.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 Functional.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 Core.Set#SET_BASEs can be retrieved using the method Functional.Detection#DETECTION_BASE.GetDetectedSets(). The method will return a list (table) of Core.Set#SET_BASE objects.


2) Functional.Detection#DETECTION_AREAS class, extends Functional.Detection#DETECTION_BASE

The Functional.Detection#DETECTION_AREAS 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 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.

2.1) Retrieve the Detected Unit sets and Detected Zones

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

Retrieve the DetectedUnitSets with the method Functional.Detection#DETECTION_BASE.GetDetectedSets(). A table will be return of Core.Set#SET_UNITs. To understand the amount of sets created, use the method Functional.Detection#DETECTION_BASE.GetDetectedSetCount(). If you want to obtain a specific set from the DetectedSets, use the method Functional.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 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.

1.4) Flare or Smoke detected units

Use the methods Functional.Detection#DETECTION_AREAS.FlareDetectedUnits() or Functional.Detection#DETECTION_AREAS.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 Functional.Detection#DETECTION_AREAS.FlareDetectedZones() or Functional.Detection#DETECTION_AREAS.SmokeDetectedZones() to flare or smoke the detected zones when a new detection has taken place.


### Contributions:

  • Mechanist : Concept & Testing

### Authors:

  • FlightControl : Design & Programming

Global(s)

DETECTION_AREAS
DETECTION_BASE

Type DETECTION_AREAS

DETECTION_AREAS:AcceptChanges(DetectedArea)

Accepts changes from the detected zone.

DETECTION_AREAS:AddChangeArea(DetectedArea, ChangeCode, AreaUnitType)

Add a change to the detected zone.

DETECTION_AREAS:AddChangeUnit(DetectedArea, ChangeCode, ChangeUnitType)

Add a change to the detected zone.

DETECTION_AREAS.AddDetectedArea(Set, Zone, self)

Add a detected DETECTION_AREAS.DetectedArea.

DETECTION_AREAS:CalculateThreatLevelA2G(DetectedArea)

Calculate the maxium A2G threat level of the DetectedArea.

DETECTION_AREAS.ClassName
DETECTION_AREAS:CreateDetectionSets()

Make a DetectionSet table.

DETECTION_AREAS.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_AREAS.DetectionZoneRange

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

DETECTION_AREAS:FlareDetectedUnits()

Flare the detected units

DETECTION_AREAS:FlareDetectedZones()

Flare the detected zones

DETECTION_AREAS:GetChangeText(DetectedArea)

Make text documenting the changes of the detected zone.

DETECTION_AREAS:GetDetectedAreaCount()

Get the amount of DETECTION_AREAS.DetectedAreas.

DETECTION_AREAS:GetDetectedAreas()

Get the detected DETECTION_AREAS.DetectedAreas.

DETECTION_AREAS:GetDetectedSet(Index)

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

DETECTION_AREAS:GetDetectedZone(Index)

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

DETECTION_AREAS:GetTreatLevelA2G(DetectedArea)

Returns the A2G threat level of the units in the DetectedArea

DETECTION_AREAS:IsFriendliesNearBy(DetectedArea)

Returns if there are friendlies nearby the FAC units ...

DETECTION_AREAS:NearestFAC(DetectedArea)

Find the nearest FAC of the DetectedArea.

DETECTION_AREAS:New(DetectionSetGroup, DetectionRange, DetectionZoneRange)

DETECTION_AREAS constructor.

DETECTION_AREAS:RemoveDetectedArea(Index)

Remove a detected DETECTION_AREAS.DetectedArea with a given Index.

DETECTION_AREAS:ReportFriendliesNearBy(ReportUnit, ReportGroupData)

Background worker function to determine if there are friendlies nearby ...

DETECTION_AREAS:SmokeDetectedUnits()

Smoke the detected units

DETECTION_AREAS:SmokeDetectedZones()

Smoke the detected zones

DETECTION_AREAS._FlareDetectedUnits
DETECTION_AREAS._FlareDetectedZones
DETECTION_AREAS._SmokeDetectedUnits
DETECTION_AREAS._SmokeDetectedZones

Type DETECTION_AREAS.DetectedArea

DETECTION_AREAS.DetectedArea.AreaID

-- The identifier of the detected area.

DETECTION_AREAS.DetectedArea.Changed

Documents if the detected area has changes.

DETECTION_AREAS.DetectedArea.Changes

A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).

DETECTION_AREAS.DetectedArea.FriendliesNearBy

Indicates if there are friendlies within the detected area.

DETECTION_AREAS.DetectedArea.MaxThreatLevelA2G
DETECTION_AREAS.DetectedArea.NearestFAC

The nearest FAC near the Area.

DETECTION_AREAS.DetectedArea.Set

-- The Set of Units in the detected area.

DETECTION_AREAS.DetectedArea.Zone

-- The Zone of the detected area.

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

Map of the DetectedObjects identified.

DETECTION_BASE.DetectionRange

The range till which targets are accepted to be detected.

DETECTION_BASE.DetectionRun
DETECTION_BASE.DetectionScheduler
DETECTION_BASE.DetectionSetGroup

The Set of GROUPs in the Forward Air Controller role.

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 Core.Set#SET_BASEs.

DETECTION_BASE:GetDetectionSetGroup()

Get the detection Groups.

DETECTION_BASE:IdentifyDetectedObject(DetectedObject)

Identifies a detected object during detection processing.

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:IsDetectedObjectIdentified(DetectedObject)

Determines if a detected object has already been identified during detection processing.

DETECTION_BASE:New(DetectionSetGroup, DetectionRange)

DETECTION constructor.

DETECTION_BASE:Schedule(DelayTime, RepeatInterval)

Schedule the DETECTION construction.

DETECTION_BASE.ScheduleDelayTime
DETECTION_BASE.ScheduleRepeatInterval
DETECTION_BASE:UnIdentifyAllDetectedObjects()

UnIdentify all detected objects during detection processing.

DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject)

UnIdentify a detected object during detection processing.

DETECTION_BASE:_DetectionScheduler(SchedulerName)

Form Sets of detected Wrapper.Unit#UNITs in an array of Core.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

Global(s)

#DETECTION_AREAS DETECTION_AREAS
#DETECTION_BASE DETECTION_BASE

Type Detection

Type DETECTION_AREAS

DETECTION_AREAS class

Field(s)

DETECTION_AREAS:AcceptChanges(DetectedArea)

Accepts changes from the detected zone.

Parameter

Return value

#DETECTION_AREAS: self

DETECTION_AREAS:AddChangeArea(DetectedArea, ChangeCode, AreaUnitType)

Add a change to the detected zone.

Parameters

Return value

#DETECTION_AREAS: self

DETECTION_AREAS:AddChangeUnit(DetectedArea, ChangeCode, ChangeUnitType)

Add a change to the detected zone.

Parameters

Return value

#DETECTION_AREAS: self

DETECTION_AREAS.AddDetectedArea(Set, Zone, self)

Add a detected DETECTION_AREAS.DetectedArea.

Parameters

Return value

#DETECTION_AREAS.DetectedArea: DetectedArea

DETECTION_AREAS:CalculateThreatLevelA2G(DetectedArea)

Calculate the maxium A2G threat level of the DetectedArea.

Parameter

#string DETECTION_AREAS.ClassName
DETECTION_AREAS:CreateDetectionSets()

Make a DetectionSet table.

This function will be overridden in the derived clsses.

Return value

#DETECTION_AREAS: self

#DETECTION_AREAS.DetectedAreas DETECTION_AREAS.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.

Dcs.DCSTypes#Distance DETECTION_AREAS.DetectionZoneRange

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

DETECTION_AREAS:FlareDetectedUnits()

Flare the detected units

Return value

#DETECTION_AREAS: self

DETECTION_AREAS:FlareDetectedZones()

Flare the detected zones

Return value

#DETECTION_AREAS: self

DETECTION_AREAS:GetChangeText(DetectedArea)

Make text documenting the changes of the detected zone.

Parameter

Return value

#string: The Changes text

DETECTION_AREAS:GetDetectedAreaCount()

Get the amount of DETECTION_AREAS.DetectedAreas.

Return value

#number: DetectedAreaCount

DETECTION_AREAS:GetDetectedAreas()

Get the detected DETECTION_AREAS.DetectedAreas.

Return value

#DETECTION_AREAS.DetectedAreas: DetectedAreas

DETECTION_AREAS:GetDetectedSet(Index)

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

Parameter

  • #number Index :

Return value

Core.Set#SET_UNIT: DetectedSet

DETECTION_AREAS:GetDetectedZone(Index)

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

Parameter

  • #number Index :

Return value

Core.Zone#ZONE_UNIT: DetectedZone

DETECTION_AREAS:GetTreatLevelA2G(DetectedArea)

Returns the A2G threat level of the units in the DetectedArea

Parameter

Return value

#number: a scale from 0 to 10.

DETECTION_AREAS:IsFriendliesNearBy(DetectedArea)

Returns if there are friendlies nearby the FAC units ...

Parameter

  • DetectedArea :

Return value

#boolean: trhe if there are friendlies nearby

DETECTION_AREAS:NearestFAC(DetectedArea)

Find the nearest FAC of the DetectedArea.

Parameter

Return value

Wrapper.Unit#UNIT: The nearest FAC unit

DETECTION_AREAS:New(DetectionSetGroup, DetectionRange, DetectionZoneRange)

DETECTION_AREAS constructor.

Parameters

Return value

Functional.Detection#DETECTION_AREAS: self

DETECTION_AREAS:RemoveDetectedArea(Index)

Remove a detected DETECTION_AREAS.DetectedArea with a given Index.

Parameter

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

Return value

#nil:

DETECTION_AREAS:ReportFriendliesNearBy(ReportUnit, ReportGroupData)

Background worker function to determine if there are friendlies nearby ...

Parameters

DETECTION_AREAS:SmokeDetectedUnits()

Smoke the detected units

Return value

#DETECTION_AREAS: self

DETECTION_AREAS:SmokeDetectedZones()

Smoke the detected zones

Return value

#DETECTION_AREAS: self

#boolean DETECTION_AREAS._FlareDetectedUnits
#boolean DETECTION_AREAS._FlareDetectedZones
#boolean DETECTION_AREAS._SmokeDetectedUnits
#boolean DETECTION_AREAS._SmokeDetectedZones

Type DETECTION_AREAS.DetectedArea

Field(s)

#number DETECTION_AREAS.DetectedArea.AreaID

-- The identifier of the detected area.

#boolean DETECTION_AREAS.DetectedArea.Changed

Documents if the detected area has changes.

#table DETECTION_AREAS.DetectedArea.Changes

A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).

#boolean DETECTION_AREAS.DetectedArea.FriendliesNearBy

Indicates if there are friendlies within the detected area.

DETECTION_AREAS.DetectedArea.MaxThreatLevelA2G
Wrapper.Unit#UNIT DETECTION_AREAS.DetectedArea.NearestFAC

The nearest FAC near the Area.

Core.Set#SET_UNIT DETECTION_AREAS.DetectedArea.Set

-- The Set of Units in the detected area.

Core.Zone#ZONE_UNIT DETECTION_AREAS.DetectedArea.Zone

-- The Zone of the detected area.

Type DETECTION_AREAS.DetectedAreas

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.

#table DETECTION_BASE.DetectedObjectsIdentified

Map of the DetectedObjects identified.

Dcs.DCSTypes#Distance DETECTION_BASE.DetectionRange

The range till which targets are accepted to be detected.

#number DETECTION_BASE.DetectionRun
DETECTION_BASE.DetectionScheduler
Core.Set#SET_GROUP DETECTION_BASE.DetectionSetGroup

The Set of GROUPs in the Forward Air Controller role.

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

Core.Set#SET_BASE:

DETECTION_BASE:GetDetectedSetCount()

Get the amount of SETs with detected objects.

Return value

#number: Count

DETECTION_BASE:GetDetectedSets()

Get the detected Core.Set#SET_BASEs.

Return value

#DETECTION_BASE.DetectedSets: DetectedSets

DETECTION_BASE:GetDetectionSetGroup()

Get the detection Groups.

Return value

Wrapper.Group#GROUP:

DETECTION_BASE:IdentifyDetectedObject(DetectedObject)

Identifies a detected object during detection processing.

Parameter

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:IsDetectedObjectIdentified(DetectedObject)

Determines if a detected object has already been identified during detection processing.

Parameter

Return value

#boolean: true if already identified.

DETECTION_BASE:New(DetectionSetGroup, DetectionRange)

DETECTION constructor.

Parameters

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:UnIdentifyAllDetectedObjects()

UnIdentify all detected objects during detection processing.

DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject)

UnIdentify a detected object during detection processing.

Parameter

DETECTION_BASE:_DetectionScheduler(SchedulerName)

Form Sets of detected Wrapper.Unit#UNITs in an array of Core.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