Module Detection

Functional -- Models the detection of enemy units by FACs or RECCEs and group them according various methods.


Banner Image


DETECTION classes facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units). DETECTION uses the in-built detection capabilities of DCS World, but adds new functionalities.

Find the DETECTION classes documentation further in this document in the globals section.


Demo Missions


YouTube Playlist


Contributions:

  • Mechanist : Early concept of DETECTION_AREAS.

Authors:

  • FlightControl : Analysis, Design, Programming, Testing

Global(s)

DETECTION_AREAS
DETECTION_BASE

DETECTION_BASE class, extends Fsm#FSM

The DETECTION_BASE class defines the core functions to administer detected objects.

DETECTION_TYPES
DETECTION_UNITS

Type DETECTION_AREAS

DETECTION_AREAS:BoundDetectedZones()

Bound the detected zones

DETECTION_AREAS:CalculateIntercept(DetectedItem)

Calculate the optimal intercept point of the DetectedItem.

DETECTION_AREAS.ClassName
DETECTION_AREAS.CountryID
DETECTION_AREAS:CreateDetectionItems()

Make a DetectionSet table.

DETECTION_AREAS:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

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

DETECTION_AREAS.DetectedItems

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

DETECTION_AREAS:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

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(DetectedItem)

Make text documenting the changes of the detected zone.

DETECTION_AREAS:New(DetectionSetGroup, DetectionZoneRange)

DETECTION_AREAS constructor.

DETECTION_AREAS:SmokeDetectedUnits()

Smoke the detected units

DETECTION_AREAS:SmokeDetectedZones()

Smoke the detected zones

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

Type DETECTION_BASE

DETECTION_BASE:AcceptChanges(DetectedItem)

Accepts changes from the detected item.

DETECTION_BASE.AcceptRange
DETECTION_BASE.AcceptZones
DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType)

Add a change to the detected zone.

DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType)

Add a change to the detected zone.

DETECTION_BASE:AddDetectedItem(ItemPrefix, DetectedItemKey, Set)

Adds a new DetectedItem to the DetectedItems list.

DETECTION_BASE:AddDetectedItemZone(DetectedItemKey, Set, Zone)

Adds a new DetectedItem to the DetectedItems list.

DETECTION_BASE.AlphaAngleProbability
DETECTION_BASE:CleanDetectionItem(DetectedItem, DetectedItemID)
DETECTION_BASE:CreateDetectionItems()

Make a DetectionSet table.

DETECTION_BASE:Detect()

Synchronous Event Trigger for Event Detect.

DETECTION_BASE.DetectDLINK
DETECTION_BASE.DetectIRST
DETECTION_BASE.DetectOptical
DETECTION_BASE.DetectRWR
DETECTION_BASE.DetectRadar
DETECTION_BASE.DetectVisual
DETECTION_BASE:Detected()

Synchronous Event Trigger for Event Detected.

DETECTION_BASE.DetectedItemCount
DETECTION_BASE.DetectedItemMax
DETECTION_BASE:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

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

DETECTION_BASE.DetectedItems
DETECTION_BASE.DetectedObjects

The list of detected objects.

DETECTION_BASE.DetectedObjectsIdentified

Map of the DetectedObjects identified.

DETECTION_BASE:DetectedReportDetailed(AttackGroup)

Report detailed of a detectedion result.

DETECTION_BASE.DetectionCount
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.DistanceProbability
DETECTION_BASE:FilterCategories(FilterCategories)

Filter the detected units based on Unit.Category
The different values of Unit.Category can be:

  • Unit.Category.AIRPLANE
  • Unit.Category.GROUND_UNIT
  • Unit.Category.HELICOPTER
  • Unit.Category.SHIP
  • Unit.Category.STRUCTURE

Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.

DETECTION_BASE:ForgetDetectedUnit(UnitName)

Forget a Unit from a DetectionItem

DETECTION_BASE.FriendliesRange
DETECTION_BASE.FriendlyPrefixes
DETECTION_BASE:GetDetectedID(Index)

Get a detected ID using a given numeric index.

DETECTION_BASE:GetDetectedItemByIndex(Index)

Get a detected item using a given numeric index.

DETECTION_BASE:GetDetectedItemByKey(Key)

Get a detected item using a given Key.

DETECTION_BASE:GetDetectedItemCoordinate(DetectedItem)

Get the detected item coordinate.

DETECTION_BASE:GetDetectedItemID(DetectedItem)

Get a detected ItemID using a given numeric index.

DETECTION_BASE:GetDetectedItemThreatLevel(DetectedItem)

Get the detected item coordinate.

DETECTION_BASE:GetDetectedItemZone(DetectedItem)

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

DETECTION_BASE:GetDetectedItems()

Get the DetectedItems by Key.

DETECTION_BASE:GetDetectedItemsByIndex()

Get the DetectedItems by Index.

DETECTION_BASE:GetDetectedItemsCount()

Get the amount of SETs with detected objects.

DETECTION_BASE:GetDetectedObject(ObjectName)

Gets a detected object with a given name.

DETECTION_BASE:GetDetectedSet(DetectedItem)

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

DETECTION_BASE:GetDetectedUnitTypeName(DetectedUnit)

Gets a detected unit type name, taking into account the detection results.

DETECTION_BASE:GetDetectionSetGroup()

Get the detection Groups.

DETECTION_BASE:GetFriendliesDistance(DetectedItem)

Returns the distance used to identify friendlies near the deteted item ...

DETECTION_BASE:GetFriendliesNearBy(DetectedItem, Category)

Returns friendly units nearby the FAC units ...

DETECTION_BASE:GetFriendliesNearIntercept(DetectedItem)

Returns friendly units nearby the intercept point ...

DETECTION_BASE:GetPlayersNearBy(DetectedItem)

Returns friendly units nearby the FAC units ...

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.Intercept
DETECTION_BASE.InterceptDelay
DETECTION_BASE:IsDetectedItemDetected(DetectedItem)

Checks if there is at least one UNIT detected in the Set of the the DetectedItem.

DETECTION_BASE:IsDetectedObjectIdentified(DetectedObject)

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

DETECTION_BASE:IsFriendliesNearBy(DetectedItem, Category)

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

DETECTION_BASE:IsFriendliesNearIntercept(DetectedItem)

Returns if there are friendlies nearby the intercept ...

DETECTION_BASE:IsPlayersNearBy(DetectedItem)

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

DETECTION_BASE:NearestRecce(DetectedItem)

Find the nearest Recce of the DetectedItem.

DETECTION_BASE:New(DetectionSetGroup)

DETECTION constructor.

DETECTION_BASE:OnAfterDetect(From, Event, To)

OnAfter Transition Handler for Event Detect.

DETECTION_BASE:OnAfterDetected(From, Event, To)

OnAfter Transition Handler for Event Detected.

DETECTION_BASE:OnAfterStart(From, Event, To)

OnAfter Transition Handler for Event Start.

DETECTION_BASE:OnAfterStop(From, Event, To)

OnAfter Transition Handler for Event Stop.

DETECTION_BASE:OnBeforeDetect(From, Event, To)

OnBefore Transition Handler for Event Detect.

DETECTION_BASE:OnBeforeDetected(From, Event, To)

OnBefore Transition Handler for Event Detected.

DETECTION_BASE:OnBeforeStart(From, Event, To)

OnBefore Transition Handler for Event Start.

DETECTION_BASE:OnBeforeStop(From, Event, To)

OnBefore Transition Handler for Event Stop.

DETECTION_BASE:OnEnterDetecting(From, Event, To)

OnEnter Transition Handler for State Detecting.

DETECTION_BASE:OnEnterStopped(From, Event, To)

OnEnter Transition Handler for State Stopped.

DETECTION_BASE:OnLeaveDetecting(From, Event, To)

OnLeave Transition Handler for State Detecting.

DETECTION_BASE:OnLeaveStopped(From, Event, To)

OnLeave Transition Handler for State Stopped.

DETECTION_BASE.RefreshTimeInterval
DETECTION_BASE.RejectZones
DETECTION_BASE:RemoveDetectedItem(DetectedItemKey)

Removes an existing DetectedItem from the DetectedItems list.

DETECTION_BASE:ReportFriendliesNearBy(TargetData)

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

DETECTION_BASE:Schedule(DelayTime, RepeatInterval)

Schedule the DETECTION construction.

DETECTION_BASE.ScheduleDelayTime
DETECTION_BASE.ScheduleRepeatInterval
DETECTION_BASE:SetAcceptRange(AcceptRange)

Accept detections if within a range in meters.

DETECTION_BASE:SetAcceptZones(AcceptZones)

Accept detections if within the specified zone(s).

DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability)

Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.

DETECTION_BASE:SetDetectedItemCoordinate(DetectedItem, Coordinate, DetectedItemUnit)

Set the detected item coordinate.

DETECTION_BASE:SetDetectedItemThreatLevel(The, DetectedItem)

Set the detected item threatlevel.

DETECTION_BASE:SetDistanceProbability(DistanceProbability)

Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly.

DETECTION_BASE:SetFriendliesRange(FriendliesRange)

Set the radius in meters to validate if friendlies are nearby.

DETECTION_BASE:SetFriendlyPrefixes(FriendlyPrefixes)

This will allow during friendly search any recce or detection unit to be also considered as a friendly.

DETECTION_BASE:SetIntercept(Intercept, IntereptDelay, InterceptDelay)

Set the parameters to calculate to optimal intercept point.

DETECTION_BASE:SetRefreshTimeInterval(RefreshTimeInterval)

Set the detection interval time in seconds.

DETECTION_BASE:SetRejectZones(RejectZones)

Reject detections if within the specified zone(s).

DETECTION_BASE:SetZoneProbability(ZoneArray)

Upon a visual detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.

DETECTION_BASE:Start()

Synchronous Event Trigger for Event Start.

DETECTION_BASE:Stop()

Synchronous Event Trigger for Event Stop.

DETECTION_BASE:UnIdentifyAllDetectedObjects()

UnIdentify all detected objects during detection processing.

DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject)

UnIdentify a detected object during detection processing.

DETECTION_BASE:UpdateDetectedItemDetection(DetectedItem)

Set IsDetected flag for all DetectedItems.

DETECTION_BASE.ZoneProbability
DETECTION_BASE:__Detect(Delay)

Asynchronous Event Trigger for Event Detect.

DETECTION_BASE:__Detected(Delay)

Asynchronous Event Trigger for Event Detected.

DETECTION_BASE:__Start(Delay)

Asynchronous Event Trigger for Event Start.

DETECTION_BASE:__Stop(Delay)

Asynchronous Event Trigger for Event Stop.

DETECTION_BASE:onafterDetect(From, Event, To)
DETECTION_BASE:onafterDetectionGroup(From, Event, To, DetectionGroup, DetectionTimeStamp)
DETECTION_BASE:onafterStart(From, Event, To)

Type DETECTION_BASE.DetectedItem

DETECTION_BASE.DetectedItem.Changed

Documents if the detected area has changes.

DETECTION_BASE.DetectedItem.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_BASE.DetectedItem.Coordinate

The last known coordinate of the DetectedItem.

DETECTION_BASE.DetectedItem.DistanceRecce
DETECTION_BASE.DetectedItem.FriendliesNearBy

Indicates if there are friendlies within the detected area.

DETECTION_BASE.DetectedItem.ID

-- The identifier of the detected area.

DETECTION_BASE.DetectedItem.InterceptCoord
DETECTION_BASE.DetectedItem.NearestFAC

The nearest FAC near the Area.

DETECTION_BASE.DetectedItem.Set

-- The Set of Units in the detected area.

DETECTION_BASE.DetectedItem.Zone

-- The Zone of the detected area.

Type DETECTION_BASE.DetectedObject

DETECTION_BASE.DetectedObject.Distance
DETECTION_BASE.DetectedObject.Identified
DETECTION_BASE.DetectedObject.IsVisible
DETECTION_BASE.DetectedObject.KnowDistance
DETECTION_BASE.DetectedObject.KnowType
DETECTION_BASE.DetectedObject.LastPos
DETECTION_BASE.DetectedObject.LastTime
DETECTION_BASE.DetectedObject.LastVelocity
DETECTION_BASE.DetectedObject.Name
DETECTION_BASE.DetectedObject.Type

Type DETECTION_TYPES

DETECTION_TYPES.ClassName
DETECTION_TYPES:CreateDetectionItems()

Create the DetectedItems list from the DetectedObjects table.

DETECTION_TYPES:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

Report summary of a DetectedItem using a given numeric index.

DETECTION_TYPES:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

DETECTION_TYPES.DetectionRange
DETECTION_TYPES:GetChangeText(DetectedItem)

Make text documenting the changes of the detected zone.

DETECTION_TYPES:New(DetectionSetGroup)

DETECTION_TYPES constructor.

DETECTION_TYPES._BoundDetectedZones
DETECTION_TYPES._FlareDetectedUnits
DETECTION_TYPES._FlareDetectedZones
DETECTION_TYPES._SmokeDetectedUnits
DETECTION_TYPES._SmokeDetectedZones

Type DETECTION_UNITS

DETECTION_UNITS.ClassName
DETECTION_UNITS:CreateDetectionItems()

Create the DetectedItems list from the DetectedObjects table.

DETECTION_UNITS:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

Report summary of a DetectedItem using a given numeric index.

DETECTION_UNITS:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

DETECTION_UNITS.DetectionRange

The range till which targets are detected.

DETECTION_UNITS:GetChangeText(DetectedItem)

Make text documenting the changes of the detected zone.

DETECTION_UNITS:New(DetectionSetGroup)

DETECTION_UNITS constructor.

DETECTION_UNITS._BoundDetectedZones
DETECTION_UNITS._FlareDetectedUnits
DETECTION_UNITS._FlareDetectedZones
DETECTION_UNITS._SmokeDetectedUnits
DETECTION_UNITS._SmokeDetectedZones

Global(s)

#DETECTION_AREAS DETECTION_AREAS
#DETECTION_BASE DETECTION_BASE

DETECTION_BASE class, extends Fsm#FSM

The DETECTION_BASE class defines the core functions to administer detected objects.

The DETECTION_BASE class will detect objects within the battle zone for a list of Wrapper.Groups detecting targets following (a) detection method(s).

DETECTION_BASE constructor

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

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:

Filter detected units based on category of the unit

Filter the detected units based on Unit.Category using the method DETECTION_BASE.FilterCategories().
The different values of Unit.Category can be:

  • Unit.Category.AIRPLANE
  • Unit.Category.GROUND_UNIT
  • Unit.Category.HELICOPTER
  • Unit.Category.SHIP
  • Unit.Category.STRUCTURE

Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.

Example to filter a single category (Unit.Category.AIRPLANE).

DetectionObject:FilterCategories( Unit.Category.AIRPLANE ) 

Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.

DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )

DETECTION_ derived classes group the detected units into a DetectedItems[] list

DETECTIONBASE derived classes build a list called DetectedItems[], which is essentially a first later of grouping of detected units. Each DetectedItem within the DetectedItems[] list contains a SETUNIT object that contains the detected units that belong to that group.

Derived classes will apply different methods to group the detected units. Examples are per area, per quadrant, per distance, per type. See further the derived DETECTION classes on which grouping methods are currently supported.

Various methods exist how to retrieve the grouped items from a DETECTION_BASE derived class:

  • The method Detection#DETECTION_BASE.GetDetectedItems() retrieves the DetectedItems[] list.
  • A DetectedItem from the DetectedItems[] list can be retrieved using the method Detection#DETECTION_BASE.GetDetectedItem( DetectedItemIndex ). Note that this method returns a DetectedItem element from the list, that contains a Set variable and further information about the DetectedItem that is set by the DETECTION_BASE derived classes, used to group the DetectedItem.
  • A DetectedSet from the DetectedItems[] list can be retrieved using the method Detection#DETECTION_BASE.GetDetectedSet( DetectedItemIndex ). This method retrieves the Set from a DetectedItem element from the DetectedItem list (DetectedItems[ DetectedItemIndex ].Set ).

Visual filters to fine-tune the probability of the detected objects

By default, DCS World will return any object that is in LOS and within "visual reach", or detectable through one of the electronic detection means. That being said, the DCS World detection algorithm can sometimes be unrealistic. Especially for a visual detection, DCS World is able to report within 1 second a detailed detection of a group of 20 units (including types of the units) that are 10 kilometers away, using only visual capabilities. Additionally, trees and other obstacles are not accounted during the DCS World detection.

Therefore, an additional (optional) filtering has been built into the DETECTION_BASE class, that can be set for visual detected units. For electronic detection, this filtering is not applied, only for visually detected targets.

The following additional filtering can be applied for visual filtering:

  • A probability factor per kilometer distance.
  • A probability factor based on the alpha angle between the detected object and the unit detecting. A detection from a higher altitude allows for better detection than when on the ground.
  • Define a probability factor for "cloudy zones", which are zones where forests or villages are located. In these zones, detection will be much more difficult. The mission designer needs to define these cloudy zones within the mission, and needs to register these zones in the DETECTION_ objects additing a probability factor per zone.

I advise however, that, when you first use the DETECTION derived classes, that you don't use these filters. Only when you experience unrealistic behaviour in your missions, these filters could be applied.

Distance visual detection probability

Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly. Also, the speed of accurate detection plays a role.

A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance.

For example, if a probability factor of 0.6 (60%) is given, the extrapolated probabilities over 15 kilometers would like like: 1 km: 96%, 2 km: 92%, 3 km: 88%, 4 km: 84%, 5 km: 80%, 6 km: 76%, 7 km: 72%, 8 km: 68%, 9 km: 64%, 10 km: 60%, 11 km: 56%, 12 km: 52%, 13 km: 48%, 14 km: 44%, 15 km: 40%.

Note that based on this probability factor, not only the detection but also the type of the unit will be applied!

Use the method Detection#DETECTION_BASE.SetDistanceProbability() to set the probability factor upon a 10 km distance.

Alpha Angle visual detection probability

Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly. A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.

A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.

For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like: 0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%

Use the method Detection#DETECTION_BASE.SetAlphaAngleProbability() to set the probability factor if 0°.

Cloudy Zones detection probability

Upon a visual detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully. The Cloudy Zones work with the ZONE_BASE derived classes. The mission designer can define within the mission zones that reflect cloudy areas where detected units may not be so easily visually detected.

Use the method Detection#DETECTION_BASE.SetZoneProbability() to set for a defined number of zones, the probability factors.

Note however, that the more zones are defined to be "cloudy" within a detection, the more performance it will take from the DETECTIONBASE to calculate the presence of the detected unit within each zone. Expecially for ZONEPOLYGON, try to limit the amount of nodes of the polygon!

Typically, this kind of filter would be applied for very specific areas were a detection needs to be very realisting for AI not to detect so easily targets within a forrest or village rich area.

Accept / Reject detected units

DETECTION_BASE can accept or reject successful detections based on the location of the detected object, if it is located in range or located inside or outside of specific zones.

Detection acceptance of within range limit

A range can be set that will limit a successful detection for a unit. Use the method Detection#DETECTION_BASE.SetAcceptRange() to apply a range in meters till where detected units will be accepted.

 local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.

 -- Build a detect object.
 local Detection = DETECTION_UNITS:New( SetGroup )

 -- This will accept detected units if the range is below 5000 meters.
 Detection:SetAcceptRange( 5000 ) 

 -- Start the Detection.
 Detection:Start()

Detection acceptance if within zone(s).

Specific ZONEBASE object(s) can be given as a parameter, which will only accept a detection if the unit is within the specified ZONEBASE object(s). Use the method Detection#DETECTION_BASE.SetAcceptZones() will accept detected units if they are within the specified zones.

 local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.

 -- Search fo the zones where units are to be accepted.
 local ZoneAccept1 = ZONE:New( "AcceptZone1" )
 local ZoneAccept2 = ZONE:New( "AcceptZone2" )

 -- Build a detect object.
 local Detection = DETECTION_UNITS:New( SetGroup )

 -- This will accept detected units by Detection when the unit is within ZoneAccept1 OR ZoneAccept2.
 Detection:SetAcceptZones( { ZoneAccept1, ZoneAccept2 } ) 

 -- Start the Detection.
 Detection:Start()

Detection rejectance if within zone(s).

Specific ZONEBASE object(s) can be given as a parameter, which will reject detection if the unit is within the specified ZONEBASE object(s). Use the method Detection#DETECTION_BASE.SetRejectZones() will reject detected units if they are within the specified zones. An example of how to use the method is shown below.

 local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.

 -- Search fo the zones where units are to be rejected.
 local ZoneReject1 = ZONE:New( "RejectZone1" )
 local ZoneReject2 = ZONE:New( "RejectZone2" )

 -- Build a detect object.
 local Detection = DETECTION_UNITS:New( SetGroup )

 -- This will reject detected units by Detection when the unit is within ZoneReject1 OR ZoneReject2.
 Detection:SetRejectZones( { ZoneReject1, ZoneReject2 } ) 

 -- Start the Detection.
 Detection:Start()

Detection of Friendlies Nearby

Use the method Detection#DETECTION_BASE.SetFriendliesRange() to set the range what will indicate when friendlies are nearby a DetectedItem. The default range is 6000 meters. For air detections, it is advisory to use about 30.000 meters.

DETECTION_BASE is a Finite State Machine

Various Events and State Transitions can be tailored using DETECTION_BASE.

DETECTION_BASE States

  • Detecting: The detection is running.
  • Stopped: The detection is stopped.

DETECTION_BASE Events

  • Start: Start the detection process.
  • Detect: Detect new units.
  • Detected: New units have been detected.
  • Stop: Stop the detection process.
#DETECTION_TYPES DETECTION_TYPES
#DETECTION_UNITS DETECTION_UNITS

Type Detection

Type DETECTION_AREAS

Extends #DETECTION_BASE

# 4) DETECTION_AREAS class, extends Detection#DETECTION_BASE

The DETECTION_AREAS class will detect units within the battle zone for a list of Wrapper.Groups detecting targets following (a) detection method(s), and will build a list (table) of Core.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.

## 4.1) Retrieve the Detected Unit Sets and Detected Zones

The methods to manage the DetectedItems[].Set(s) are implemented in Detection#DECTECTION_BASE and the methods to manage the DetectedItems[].Zone(s) is implemented in Detection#DETECTION_AREAS.

Retrieve the DetectedItems[].Set with the method Detection#DETECTION_BASE.GetDetectedSet(). A Core.Set#SET_UNIT object will be returned.

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.

## 4.4) Flare or Smoke detected units

Use the methods Detection#DETECTION_AREAS.FlareDetectedUnits() or Detection#DETECTION_AREAS.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.

Field(s)

DETECTION_AREAS:BoundDetectedZones()

Bound the detected zones

Return value

#DETECTION_AREAS: self

DETECTION_AREAS:CalculateIntercept(DetectedItem)

Calculate the optimal intercept point of the DetectedItem.

Parameter

#string DETECTION_AREAS.ClassName
DETECTION_AREAS.CountryID
DETECTION_AREAS:CreateDetectionItems()

Make a DetectionSet table.

This function will be overridden in the derived clsses.

Return value

#DETECTION_AREAS: self

DETECTION_AREAS:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

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

Parameters

Return value

Core.Report#REPORT: The report of the detection items.

#DETECTION_BASE.DetectedItems DETECTION_AREAS.DetectedItems

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

DETECTION_AREAS:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

Parameter

Return value

#string:

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(DetectedItem)

Make text documenting the changes of the detected zone.

Parameter

Return value

#string: The Changes text

DETECTION_AREAS:New(DetectionSetGroup, DetectionZoneRange)

DETECTION_AREAS constructor.

Parameters

  • Core.Set#SET_GROUP DetectionSetGroup : The Set of GROUPs in the Forward Air Controller role.

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

Return value

#DETECTION_AREAS:

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._BoundDetectedZones
#boolean DETECTION_AREAS._FlareDetectedUnits
#boolean DETECTION_AREAS._FlareDetectedZones
#boolean DETECTION_AREAS._SmokeDetectedUnits
#boolean DETECTION_AREAS._SmokeDetectedZones

Type DETECTION_BASE

Extends Core.Fsm#FSM

Field(s)

DETECTION_BASE:AcceptChanges(DetectedItem)

Accepts changes from the detected item.

Parameter

Return value

#DETECTION_BASE: self

DETECTION_BASE.AcceptRange
#table DETECTION_BASE.AcceptZones
DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType)

Add a change to the detected zone.

Parameters

Return value

#DETECTION_BASE: self

DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType)

Add a change to the detected zone.

Parameters

Return value

#DETECTION_BASE: self

DETECTION_BASE:AddDetectedItem(ItemPrefix, DetectedItemKey, Set)

Adds a new DetectedItem to the DetectedItems list.

The DetectedItem is a table and contains a SET_UNIT in the field Set.

Parameters

  • ItemPrefix :

  • DetectedItemKey : The key of the DetectedItem.

  • Core.Set#SET_UNIT Set : (optional) The Set of Units to be added.

Return value

#DETECTION_BASE.DetectedItem:

DETECTION_BASE:AddDetectedItemZone(DetectedItemKey, Set, Zone)

Adds a new DetectedItem to the DetectedItems list.

The DetectedItem is a table and contains a SET_UNIT in the field Set.

Parameters

  • DetectedItemKey : The key of the DetectedItem.

  • Core.Set#SET_UNIT Set : (optional) The Set of Units to be added.

  • Core.Zone#ZONE_UNIT Zone : (optional) The Zone to be added where the Units are located.

Return value

#DETECTION_BASE.DetectedItem:

DETECTION_BASE.AlphaAngleProbability
DETECTION_BASE:CleanDetectionItem(DetectedItem, DetectedItemID)

Clean the DetectedItem table. @param #DETECTIONBASE self @return #DETECTIONBASE

Parameters

  • DetectedItem :

  • DetectedItemID :

DETECTION_BASE:CreateDetectionItems()

Make a DetectionSet table.

This function will be overridden in the derived clsses.

Return value

#DETECTION_BASE:

DETECTION_BASE:Detect()

Synchronous Event Trigger for Event Detect.

DETECTION_BASE.DetectDLINK
DETECTION_BASE.DetectIRST
DETECTION_BASE.DetectOptical
DETECTION_BASE.DetectRWR
DETECTION_BASE.DetectRadar
DETECTION_BASE.DetectVisual
DETECTION_BASE:Detected()

Synchronous Event Trigger for Event Detected.

DETECTION_BASE.DetectedItemCount
DETECTION_BASE.DetectedItemMax
DETECTION_BASE:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

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

Parameters

Return value

Core.Report#REPORT:

#table DETECTION_BASE.DetectedItems
#DETECTION_BASE.DetectedObjects DETECTION_BASE.DetectedObjects

The list of detected objects.

#table DETECTION_BASE.DetectedObjectsIdentified

Map of the DetectedObjects identified.

DETECTION_BASE:DetectedReportDetailed(AttackGroup)

Report detailed of a detectedion result.

Parameter

Return value

#string:

#number DETECTION_BASE.DetectionCount
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.DistanceProbability
DETECTION_BASE:FilterCategories(FilterCategories)

Filter the detected units based on Unit.Category
The different values of Unit.Category can be:

  • Unit.Category.AIRPLANE
  • Unit.Category.GROUND_UNIT
  • Unit.Category.HELICOPTER
  • Unit.Category.SHIP
  • Unit.Category.STRUCTURE

Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.

Example to filter a single category (Unit.Category.AIRPLANE).

DetectionObject:FilterCategories( Unit.Category.AIRPLANE ) 

Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.

DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )

Parameter

  • #list<Dcs.DCSUnit#Unit> FilterCategories : The Categories entries

Return value

#DETECTION_BASE: self

DETECTION_BASE:ForgetDetectedUnit(UnitName)

Forget a Unit from a DetectionItem

Parameter

  • #string UnitName : The UnitName that needs to be forgotten from the DetectionItem Sets.

Return value

#DETECTION_BASE:

DETECTION_BASE.FriendliesRange
DETECTION_BASE.FriendlyPrefixes
DETECTION_BASE:GetDetectedID(Index)

Get a detected ID using a given numeric index.

Parameter

  • #number Index :

Return value

#string: DetectedItemID

DETECTION_BASE:GetDetectedItemByIndex(Index)

Get a detected item using a given numeric index.

Parameter

  • #number Index :

Return value

#DETECTION_BASE.DetectedItem:

DETECTION_BASE:GetDetectedItemByKey(Key)

Get a detected item using a given Key.

Parameter

  • Key :

Return value

#DETECTION_BASE.DetectedItem:

DETECTION_BASE:GetDetectedItemCoordinate(DetectedItem)

Get the detected item coordinate.

Parameter

Return value

Core.Point#COORDINATE:

DETECTION_BASE:GetDetectedItemID(DetectedItem)

Get a detected ItemID using a given numeric index.

Parameter

Return value

#string: DetectedItemID

DETECTION_BASE:GetDetectedItemThreatLevel(DetectedItem)

Get the detected item coordinate.

Parameter

Return value

#number: ThreatLevel

DETECTION_BASE:GetDetectedItemZone(DetectedItem)

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

Parameter

Return value

Core.Zone#ZONE_UNIT: DetectedZone

DETECTION_BASE:GetDetectedItems()

Get the DetectedItems by Key.

This will return the DetectedItems collection, indexed by the Key, which can be any object that acts as the key of the detection.

Return value

#DETECTION_BASE.DetectedItems:

DETECTION_BASE:GetDetectedItemsByIndex()

Get the DetectedItems by Index.

This will return the DetectedItems collection, indexed by an internal numerical Index.

Return value

#DETECTION_BASE.DetectedItems:

DETECTION_BASE:GetDetectedItemsCount()

Get the amount of SETs with detected objects.

Return value

#number: The amount of detected items. Note that the amount of detected items can differ with the reality, because detections are not real-time but doen in intervals!

DETECTION_BASE:GetDetectedObject(ObjectName)

Gets a detected object with a given name.

Parameter

  • #string ObjectName :

Return value

#DETECTION_BASE.DetectedObject:

DETECTION_BASE:GetDetectedSet(DetectedItem)

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

Parameter

Return value

Core.Set#SET_UNIT: DetectedSet

DETECTION_BASE:GetDetectedUnitTypeName(DetectedUnit)

Gets a detected unit type name, taking into account the detection results.

Parameter

Return value

#string: The type name

DETECTION_BASE:GetDetectionSetGroup()

Get the detection Groups.

Return value

Core.Set#SET_GROUP:

DETECTION_BASE:GetFriendliesDistance(DetectedItem)

Returns the distance used to identify friendlies near the deteted item ...

Parameter

  • DetectedItem :

Return value

#number: The distance.

DETECTION_BASE:GetFriendliesNearBy(DetectedItem, Category)

Returns friendly units nearby the FAC units ...

Parameters

Return value

#map<#string,Wrapper.Unit#UNIT>: The map of Friendly UNITs.

DETECTION_BASE:GetFriendliesNearIntercept(DetectedItem)

Returns friendly units nearby the intercept point ...

Parameter

  • DetectedItem :

Return value

#map<#string,Wrapper.Unit#UNIT>: The map of Friendly UNITs.

DETECTION_BASE:GetPlayersNearBy(DetectedItem)

Returns friendly units nearby the FAC units ...

Parameter

  • DetectedItem :

Return value

#map<#string,Wrapper.Unit#UNIT>: The map of Friendly UNITs.

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.Intercept
DETECTION_BASE.InterceptDelay
DETECTION_BASE:IsDetectedItemDetected(DetectedItem)

Checks if there is at least one UNIT detected in the Set of the the DetectedItem.

Parameter

  • DetectedItem :

Return value

#boolean: true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.

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:IsFriendliesNearBy(DetectedItem, Category)

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

Parameters

Return value

#boolean: true if there are friendlies nearby

DETECTION_BASE:IsFriendliesNearIntercept(DetectedItem)

Returns if there are friendlies nearby the intercept ...

Parameter

  • DetectedItem :

Return value

#boolean: trhe if there are friendlies near the intercept.

DETECTION_BASE:IsPlayersNearBy(DetectedItem)

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

Parameter

  • DetectedItem :

Return value

#boolean: trhe if there are friendlies nearby

DETECTION_BASE:NearestRecce(DetectedItem)

Find the nearest Recce of the DetectedItem.

Parameter

Return value

Wrapper.Unit#UNIT: The nearest FAC unit

DETECTION_BASE:New(DetectionSetGroup)

DETECTION constructor.

Parameter

Return value

#DETECTION_BASE: self

DETECTION_BASE:OnAfterDetect(From, Event, To)

OnAfter Transition Handler for Event Detect.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

DETECTION_BASE:OnAfterDetected(From, Event, To)

OnAfter Transition Handler for Event Detected.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

DETECTION_BASE:OnAfterStart(From, Event, To)

OnAfter Transition Handler for Event Start.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

DETECTION_BASE:OnAfterStop(From, Event, To)

OnAfter Transition Handler for Event Stop.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

DETECTION_BASE:OnBeforeDetect(From, Event, To)

OnBefore Transition Handler for Event Detect.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

Return value

#boolean: Return false to cancel Transition.

DETECTION_BASE:OnBeforeDetected(From, Event, To)

OnBefore Transition Handler for Event Detected.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

Return value

#boolean: Return false to cancel Transition.

DETECTION_BASE:OnBeforeStart(From, Event, To)

OnBefore Transition Handler for Event Start.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

Return value

#boolean: Return false to cancel Transition.

DETECTION_BASE:OnBeforeStop(From, Event, To)

OnBefore Transition Handler for Event Stop.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

Return value

#boolean: Return false to cancel Transition.

DETECTION_BASE:OnEnterDetecting(From, Event, To)

OnEnter Transition Handler for State Detecting.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

DETECTION_BASE:OnEnterStopped(From, Event, To)

OnEnter Transition Handler for State Stopped.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

DETECTION_BASE:OnLeaveDetecting(From, Event, To)

OnLeave Transition Handler for State Detecting.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

Return value

#boolean: Return false to cancel Transition.

DETECTION_BASE:OnLeaveStopped(From, Event, To)

OnLeave Transition Handler for State Stopped.

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

Return value

#boolean: Return false to cancel Transition.

DETECTION_BASE.RefreshTimeInterval
#table DETECTION_BASE.RejectZones
DETECTION_BASE:RemoveDetectedItem(DetectedItemKey)

Removes an existing DetectedItem from the DetectedItems list.

The DetectedItem is a table and contains a SET_UNIT in the field Set.

Parameter

  • DetectedItemKey : The key in the DetectedItems list where the item needs to be removed.

DETECTION_BASE:ReportFriendliesNearBy(TargetData)

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

Parameter

  • TargetData :

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:SetAcceptRange(AcceptRange)

Accept detections if within a range in meters.

Parameter

  • #number AcceptRange : Accept a detection if the unit is within the AcceptRange in meters.

Return value

#DETECTION_BASE: self

DETECTION_BASE:SetAcceptZones(AcceptZones)

Accept detections if within the specified zone(s).

Parameter

  • Core.Zone#ZONE_BASE AcceptZones : Can be a list or ZONEBASE objects, or a single ZONEBASE object.

Return value

#DETECTION_BASE: self

DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability)

Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.

A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.

A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.

For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like: 0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%

Parameter

  • AlphaAngleProbability : The probability factor.

Return value

#DETECTION_BASE: self

DETECTION_BASE:SetDetectedItemCoordinate(DetectedItem, Coordinate, DetectedItemUnit)

Set the detected item coordinate.

Parameters

Return value

#DETECTION_BASE:

DETECTION_BASE:SetDetectedItemThreatLevel(The, DetectedItem)

Set the detected item threatlevel.

Parameters

Return value

#DETECTION_BASE:

DETECTION_BASE:SetDistanceProbability(DistanceProbability)

Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly.

Also, the speed of accurate detection plays a role. A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance. For example, if a probability factor of 0.6 (60%) is given, the extrapolated probabilities over 15 kilometers would like like: 1 km: 96%, 2 km: 92%, 3 km: 88%, 4 km: 84%, 5 km: 80%, 6 km: 76%, 7 km: 72%, 8 km: 68%, 9 km: 64%, 10 km: 60%, 11 km: 56%, 12 km: 52%, 13 km: 48%, 14 km: 44%, 15 km: 40%.

Parameter

  • DistanceProbability : The probability factor.

Return value

#DETECTION_BASE: self

DETECTION_BASE:SetFriendliesRange(FriendliesRange)

Set the radius in meters to validate if friendlies are nearby.

Parameter

  • #number FriendliesRange : Radius to use when checking if Friendlies are nearby.

Return value

#DETECTION_BASE: self

DETECTION_BASE:SetFriendlyPrefixes(FriendlyPrefixes)

This will allow during friendly search any recce or detection unit to be also considered as a friendly.

By default, recce aren't considered friendly, because that would mean that a recce would be also an attacking friendly, and this is wrong. However, in a CAP situation, when the CAP is part of an EWR network, the CAP is also an attacker. This, this method allows to register for a detection the CAP unit name prefixes to be considered CAP.

Parameter

  • #string FriendlyPrefixes : A string or a list of prefixes.

Return value

#DETECTION_BASE:

DETECTION_BASE:SetIntercept(Intercept, IntereptDelay, InterceptDelay)

Set the parameters to calculate to optimal intercept point.

Parameters

  • #boolean Intercept : Intercept is true if an intercept point is calculated. Intercept is false if it is disabled. The default Intercept is false.

  • #number IntereptDelay : If Intercept is true, then InterceptDelay is the average time it takes to get airplanes airborne.

  • InterceptDelay :

Return value

#DETECTION_BASE: self

DETECTION_BASE:SetRefreshTimeInterval(RefreshTimeInterval)

Set the detection interval time in seconds.

Parameter

  • #number RefreshTimeInterval : Interval in seconds.

Return value

#DETECTION_BASE: self

DETECTION_BASE:SetRejectZones(RejectZones)

Reject detections if within the specified zone(s).

Parameter

  • Core.Zone#ZONE_BASE RejectZones : Can be a list or ZONEBASE objects, or a single ZONEBASE object.

Return value

#DETECTION_BASE: self

DETECTION_BASE:SetZoneProbability(ZoneArray)

Upon a visual detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.

The Cloudy Zones work with the ZONE_BASE derived classes. The mission designer can define within the mission zones that reflect cloudy areas where detected units may not be so easily visually detected.

Parameter

  • ZoneArray : Aray of a The ZONE_BASE object and a ZoneProbability pair..

Return value

#DETECTION_BASE: self

DETECTION_BASE:Start()

Synchronous Event Trigger for Event Start.

DETECTION_BASE:Stop()

Synchronous Event Trigger for Event Stop.

DETECTION_BASE:UnIdentifyAllDetectedObjects()

UnIdentify all detected objects during detection processing.

DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject)

UnIdentify a detected object during detection processing.

Parameter

DETECTION_BASE:UpdateDetectedItemDetection(DetectedItem)

Set IsDetected flag for all DetectedItems.

Parameter

  • DetectedItem :

Return values

  1. #DETECTION_BASE.DetectedItem: DetectedItem

  2. #boolean: true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.

DETECTION_BASE.ZoneProbability
DETECTION_BASE:__Detect(Delay)

Asynchronous Event Trigger for Event Detect.

Parameter

  • #number Delay : The delay in seconds.

DETECTION_BASE:__Detected(Delay)

Asynchronous Event Trigger for Event Detected.

Parameter

  • #number Delay : The delay in seconds.

DETECTION_BASE:__Start(Delay)

Asynchronous Event Trigger for Event Start.

Parameter

  • #number Delay : The delay in seconds.

DETECTION_BASE:__Stop(Delay)

Asynchronous Event Trigger for Event Stop.

Parameter

  • #number Delay : The delay in seconds.

DETECTION_BASE:onafterDetect(From, Event, To)

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

DETECTION_BASE:onafterDetectionGroup(From, Event, To, DetectionGroup, DetectionTimeStamp)

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

  • Wrapper.Group#GROUP DetectionGroup : The Group detecting.

  • DetectionTimeStamp :

DETECTION_BASE:onafterStart(From, Event, To)

Parameters

  • #string From : The From State string.

  • #string Event : The Event string.

  • #string To : The To State string.

Type DETECTION_BASE.DetectedItem

Field(s)

#boolean DETECTION_BASE.DetectedItem.Changed

Documents if the detected area has changes.

#table DETECTION_BASE.DetectedItem.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).

Core.Point#COORDINATE DETECTION_BASE.DetectedItem.Coordinate

The last known coordinate of the DetectedItem.

DETECTION_BASE.DetectedItem.DistanceRecce
#boolean DETECTION_BASE.DetectedItem.FriendliesNearBy

Indicates if there are friendlies within the detected area.

#number DETECTION_BASE.DetectedItem.ID

-- The identifier of the detected area.

DETECTION_BASE.DetectedItem.InterceptCoord
Wrapper.Unit#UNIT DETECTION_BASE.DetectedItem.NearestFAC

The nearest FAC near the Area.

Core.Set#SET_UNIT DETECTION_BASE.DetectedItem.Set

-- The Set of Units in the detected area.

Core.Zone#ZONE_UNIT DETECTION_BASE.DetectedItem.Zone

-- The Zone of the detected area.

Type DETECTION_BASE.DetectedItems

DETECTION_BASE.DetectedItems is a list of #DETECTION_BASE.DetectedItem.

Type DETECTION_BASE.DetectedObject

Field(s)

#number DETECTION_BASE.DetectedObject.Distance
#boolean DETECTION_BASE.DetectedObject.Identified
#boolean DETECTION_BASE.DetectedObject.IsVisible
#boolean DETECTION_BASE.DetectedObject.KnowDistance
#boolean DETECTION_BASE.DetectedObject.KnowType
#boolean DETECTION_BASE.DetectedObject.LastPos
#number DETECTION_BASE.DetectedObject.LastTime
#number DETECTION_BASE.DetectedObject.LastVelocity
#string DETECTION_BASE.DetectedObject.Name
#string DETECTION_BASE.DetectedObject.Type

Type DETECTION_BASE.DetectedObjects

DETECTION_BASE.DetectedObjects is a list of #DETECTION_BASE.DetectedObject.

Type DETECTION_TYPES

Extends #DETECTION_BASE

3) DETECTION_TYPES class, extends Detection#DETECTION_BASE

The DETECTION_TYPES class will detect units within the battle zone.

It will build a DetectedItems[] list filled with DetectedItems, grouped by the type of units detected. Each DetectedItem will contain a field Set, which contains a Core.Set#SET_UNIT containing ONE UNIT object reference. Beware that when the amount of different types detected is large, the DetectedItems[] list will be large also.

Field(s)

#string DETECTION_TYPES.ClassName
DETECTION_TYPES:CreateDetectionItems()

Create the DetectedItems list from the DetectedObjects table.

For each DetectedItem, a one field array is created containing the Unit detected.

Return value

#DETECTION_TYPES: self

DETECTION_TYPES:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

Report summary of a DetectedItem using a given numeric index.

Parameters

Return value

Core.Report#REPORT: The report of the detection items.

DETECTION_TYPES:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

Parameter

Return value

#string:

DETECTION_TYPES.DetectionRange
DETECTION_TYPES:GetChangeText(DetectedItem)

Make text documenting the changes of the detected zone.

Parameter

Return value

#string: The Changes text

DETECTION_TYPES:New(DetectionSetGroup)

DETECTION_TYPES constructor.

Parameter

Return value

Functional.Detection#DETECTION_TYPES: self

#boolean DETECTION_TYPES._BoundDetectedZones
#boolean DETECTION_TYPES._FlareDetectedUnits
#boolean DETECTION_TYPES._FlareDetectedZones
#boolean DETECTION_TYPES._SmokeDetectedUnits
#boolean DETECTION_TYPES._SmokeDetectedZones

Type DETECTION_TYPES.DetectedItem

Type DETECTION_UNITS

Extends #DETECTION_BASE

DETECTION_UNITS class, extends Detection#DETECTION_BASE

The DETECTION_UNITS class will detect units within the battle zone.

It will build a DetectedItems list filled with DetectedItems. Each DetectedItem will contain a field Set, which contains a Core.Set#SET_UNIT containing ONE UNIT object reference. Beware that when the amount of units detected is large, the DetectedItems list will be large also.

Field(s)

#string DETECTION_UNITS.ClassName
DETECTION_UNITS:CreateDetectionItems()

Create the DetectedItems list from the DetectedObjects table.

For each DetectedItem, a one field array is created containing the Unit detected.

Return value

#DETECTION_UNITS: self

DETECTION_UNITS:DetectedItemReportSummary(DetectedItem, AttackGroup, Settings)

Report summary of a DetectedItem using a given numeric index.

Parameters

Return value

Core.Report#REPORT: The report of the detection items.

DETECTION_UNITS:DetectedReportDetailed(AttackGroup)

Report detailed of a detection result.

Parameter

Return value

#string:

Dcs.DCSTypes#Distance DETECTION_UNITS.DetectionRange

The range till which targets are detected.

DETECTION_UNITS:GetChangeText(DetectedItem)

Make text documenting the changes of the detected zone.

Parameter

Return value

#string: The Changes text

DETECTION_UNITS:New(DetectionSetGroup)

DETECTION_UNITS constructor.

Parameter

Return value

Functional.Detection#DETECTION_UNITS: self

#boolean DETECTION_UNITS._BoundDetectedZones
#boolean DETECTION_UNITS._FlareDetectedUnits
#boolean DETECTION_UNITS._FlareDetectedZones
#boolean DETECTION_UNITS._SmokeDetectedUnits
#boolean DETECTION_UNITS._SmokeDetectedZones

Type DETECTION_UNITS.DetectedItem