Sensors Config Reference – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "Category:Arma 3: Editing {{Cfg ref|abc}} ==Overview== Vehicle and ammo sensors for target detection and tracking. === '''> [https://dev.arma3.com/post/oprep-sensor-overh...")
 
m (Fix)
 
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Arma 3: Editing]]
{{TOC|side}}
{{Cfg ref|abc}}
 
==Overview==
Vehicle and ammo sensors for target detection and tracking.
Vehicle and ammo sensors for target detection and tracking.


=== '''> [https://dev.arma3.com/post/oprep-sensor-overhaul OPREP]''' ===
=== '''> [https://forums.bistudio.com/topic/200467-jets-sensor-overhaul/ Forum thread]''' ===


== Introduction / Components ==
== Introduction / Components ==
The new Sensor system gets enabled by defining a SensorsManagerComponent class inside the vehicle's [[Arma_3_Components|Components]] class.
 
<syntaxhighlight lang="c">
The new Sensor system gets enabled by defining a SensorsManagerComponent class inside the vehicle's [[Arma 3: Components|Components]] class.
<syntaxhighlight lang="cpp">
class MyVehicle_F : MyBaseVehicle_F
class MyVehicle_F : MyBaseVehicle_F
{
{
      class Components : Components                  
class Components : Components
      {
{
            class SensorsManagerComponent : SensorTemplatePassiveRadar
class SensorsManagerComponent : SensorTemplatePassiveRadar
            {
{
            };                                                                                          
};
      };
};
};
};
</syntaxhighlight>
</syntaxhighlight>


For simplicity the class can inherit from one of the templates that are available in the configFile root, which allows you to only change the properties you need.  
For simplicity the class can inherit from one of the templates that are available in the configFile root, which allows you to only change the properties you need.
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
class SensorTemplatePassiveRadar;
class SensorTemplatePassiveRadar;
class SensorTemplateActiveRadar;  
class SensorTemplateAntiRadiation;
class SensorTemplateIR;          
class SensorTemplateActiveRadar;
class SensorTemplateVisual;      
class SensorTemplateIR;
class SensorTemplateMan;          
class SensorTemplateVisual;
class SensorTemplateLaser;        
class SensorTemplateMan;
class SensorTemplateLaser;
class SensorTemplateNV;
class SensorTemplateNV;
class SensorTemplateDataLink;
</syntaxhighlight>
</syntaxhighlight>
== Properties ==
== Properties ==
====componentType====
 
Mandatory property that defines the type/spectrum and hardcoded behavior of the sensor.  
=== componentType ===
Can be one of the following
 
* '''IRSensorComponent''' - detects [[A3_Targeting_config_reference#irTarget|irTarget]]s according to their [[A3_Targeting_config_reference#irTargetSize|irTargetSize]] and their actual heat signature. Sources of heat are engine, tires or the muzzle. To become a detectable target in IR the engine has to be running at least 6 seconds. To become undetectable the vehicle may need to cool down even as long as 1 hour.  
Mandatory property that defines the type/spectrum and hardcoded behavior of the sensor.
* '''NVSensorComponent''' - detects [[A3_Targeting_config_reference#nvTarget|nvTarget]]s.
Can be one of the following:
* '''IRSensorComponent''' - detects [[A3_Targeting_config_reference#irTarget|irTarget]]s according to their [[A3_Targeting_config_reference#irTargetSize|irTargetSize]] and their actual heat signature. Sources of heat are engine, tires or the muzzle. To become a detectable target in IR the engine has to be running at least 6 seconds. To become undetectable the vehicle may need to cool down even as long as 1 hour.
* '''NVSensorComponent''' - detects [[A3_Targeting_config_reference#nvTarget|nvTarget]]s.
* '''LaserSensorComponent''' - detects [[A3_Targeting_config_reference#laserTarget|laserTarget]]s.
* '''LaserSensorComponent''' - detects [[A3_Targeting_config_reference#laserTarget|laserTarget]]s.
* '''ActiveRadarSensorComponent''' - detects [[A3_Targeting_config_reference#radarTarget|radarTarget]]s according to their [[A3_Targeting_config_reference#radarTargetSize|radarTargetSize]]. Radar needs to be switched ON via an action (Default Arma 3 and Arma 3 Apex keybind is (Ctrl+R)). Switching the radar on also makes the owner a detectable target for vehicles or ammo with passive radar component (see below). It's also the only sensor that can provide additional information about the target - its distance, speed and altitude.
* '''ActiveRadarSensorComponent''' - detects [[A3_Targeting_config_reference#radarTarget|radarTarget]]s according to their [[A3_Targeting_config_reference#radarTargetSize|radarTargetSize]]. Radar needs to be switched ON via an action (Default {{arma3}} and {{Name|arma3apex}} keybind is {{Controls|Ctrl|R}}). Switching the radar on also makes the owner a detectable target for vehicles or ammo with passive radar component (see below). It's also the only sensor that can provide additional information about the target - its distance, speed and altitude.
* '''PassiveRadarSensorComponent''' - detects vehicles with active radar switched on at twice their active radar's range.
* '''PassiveRadarSensorComponent''' - detects vehicles with active radar switched on at twice their active radar's range.
* '''VisualSensorComponent''' - detects [[A3_Targeting_config_reference#visualTarget|visualTarget]]s according to their [[A3_Targeting_config_reference#visualTargetSize|visualTargetSize]].
* '''VisualSensorComponent''' - detects [[A3_Targeting_config_reference#visualTarget|visualTarget]]s according to their [[A3_Targeting_config_reference#visualTargetSize|visualTargetSize]].
* '''ManSensorComponent''' - detects targets that inherit from Man class.
* '''ManSensorComponent''' - detects targets that inherit from Man class.
<syntaxhighlight lang="c">
* '''DataLinkSensorComponent''' - in combination with [[A3_Targeting_config_reference#reportRemoteTargets|receiveRemoteTargets]] this allows the vehicle to actively target and track targets from the [[side]]'s Data Link
<syntaxhighlight lang="cpp">
componentType = "ActiveRadarSensorComponent";
componentType = "ActiveRadarSensorComponent";
</syntaxhighlight>
</syntaxhighlight>


====class AirTarget====
=== class AirTarget ===
 
Defines the sensor detection range in look-up conditions, when the target is positioned against a sky background.
Defines the sensor detection range in look-up conditions, when the target is positioned against a sky background.
It's possible to cap the range by viewDistance (or its portion) for systems that work within visual range. Set the DistanceLimitCoefs to -1 to disable any impact of view distance on the sensor for beyond visual range systems.
It's possible to cap the range by viewDistance (or its portion) for systems that work within visual range.
Set the DistanceLimitCoefs to -1 to disable any impact of view distance on the sensor for beyond visual range systems.


'''The actual sensor's range is the smallest of [maxRange, resulting objectViewDistanceLimit, resulting viewDistanceLimit] but never lower than minRange'''
'''The actual sensor's range is the smallest of [maxRange, resulting objectViewDistanceLimit, resulting viewDistanceLimit] but never lower than minRange'''


In the following case the sensor will be able to detect targets that are within the object view distance as terrain view distance will always be bigger. However if the obj. view distance is set above 5km the sensor won't be able to detect anything above 5km. If it's conversely set below 500m, the sensor will still be able to detect targets at 500m even if they are not visible.
In the following case the sensor will be able to detect targets that are within the object view distance as terrain view distance will always be bigger.
<syntaxhighlight lang="c">
However if the obj. view distance is set above 5km the sensor won't be able to detect anything above 5km. If it is conversely set below 500m, the sensor will still be able to detect targets at 500m even if they are not visible.
class AirTarget     // ranges for targets with sky background
<syntaxhighlight lang="cpp">
{                                          
class AirTarget // ranges for targets with sky background
        minRange = 500;         // -1 if undef; in meters  
{
        maxRange = 5000;       // -1 if undef; in meter                                                      
minRange = 500; // -1 if undef; in meters
        viewDistanceLimitCoef = 1;     // -1 if undef; coefficient, multiplies current view distance as set in player's options. -1 means view distance is not used to limit sensor range.
maxRange = 5000; // -1 if undef; in meter
        objectDistanceLimitCoef = 1;   // -1 if undef; coefficient, multiplies current object view distance as set in player's options. -1 means object view distance is not used to limit sensor range.
viewDistanceLimitCoef = 1; // -1 if undef; coefficient, multiplies current view distance as set in player's options. -1 means view distance is not used to limit sensor range.
objectDistanceLimitCoef = 1; // -1 if undef; coefficient, multiplies current object view distance as set in player's options. -1 means object view distance is not used to limit sensor range.


};  
};
</syntaxhighlight>
</syntaxhighlight>
====class GroundTarget====
 
=== class GroundTarget ===
 
Defines the sensor detection range in look-down conditions, when the target is positioned against ground clutter. Properties are the same as in [[#class_airTarget|airTarget]].
Defines the sensor detection range in look-down conditions, when the target is positioned against ground clutter. Properties are the same as in [[#class_airTarget|airTarget]].
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
class GroundTarget     // ranges for targets with ground background
class GroundTarget // ranges for targets with ground background
{                                          
{
        minRange = 500;         // -1 if undef; in meters  
minRange = 500; // -1 if undef; in meters
        maxRange = 3000;       // -1 if undef; in meters                  
maxRange = 3000; // -1 if undef; in meters
                                                   
 
        viewDistanceLimitCoef = 1;     // -1 if undef; coefficient, multiplies current view distance as set in player's options. -1 means view distance is not used to limit sensor range.
viewDistanceLimitCoef = 1; // -1 if undef; coefficient, multiplies current view distance as set in player's options. -1 means view distance is not used to limit sensor range.
        objectDistanceLimitCoef = 1;   // -1 if undef; coefficient, multiplies current object view distance as set in player's options. -1 means object view distance is not used to limit sensor range.            
objectDistanceLimitCoef = 1; // -1 if undef; coefficient, multiplies current object view distance as set in player's options. -1 means object view distance is not used to limit sensor range.
};
};
</syntaxhighlight>
</syntaxhighlight>
====typeRecognitionDistance====
 
Distance in meters at which the sensor recognizes the actual target vehicle type (e.g. Mi-48 Kajman)  
=== typeRecognitionDistance ===
<syntaxhighlight lang="c">
 
Distance in meters at which the sensor recognizes the actual target vehicle type (e.g. Mi-48 Kajman)
<syntaxhighlight lang="cpp">
typeRecognitionDistance = 1000; /// -1 if undef
typeRecognitionDistance = 1000; /// -1 if undef
</syntaxhighlight>
</syntaxhighlight>
====angleRangeHorizontal====
 
Sensor horizontal (azimuth) coverage (in degrees)  
=== angleRangeHorizontal ===
<syntaxhighlight lang="c">
 
Sensor horizontal (azimuth) coverage (in degrees)
<syntaxhighlight lang="cpp">
angleRangeHorizontal = 120;
angleRangeHorizontal = 120;
angleRangeHorizontal = 90; // if undef  
angleRangeHorizontal = 90; // if undef
</syntaxhighlight>
</syntaxhighlight>


====angleRangeVertical====
=== angleRangeVertical ===
Sensor vertical (elevation) coverage (in degrees)  
 
<syntaxhighlight lang="c">
Sensor vertical (elevation) coverage (in degrees)
angleRangeVertical = 120;  
<syntaxhighlight lang="cpp">
angleRangeVertical = 90; // if undef  
angleRangeVertical = 120;
angleRangeVertical = 90; // if undef
</syntaxhighlight>
</syntaxhighlight>
====nightRangeCoef====
 
=== nightRangeCoef ===
 
A coefficient of sensor's range during night time (used for visual sensors). Goes linearly between full light conditions (daytime) and poor light conditions (dusk). Overcast weather can sometimes move the range down the scale as well.
A coefficient of sensor's range during night time (used for visual sensors). Goes linearly between full light conditions (daytime) and poor light conditions (dusk). Overcast weather can sometimes move the range down the scale as well.
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
nightRangeCoef = 0; // blind at night  
nightRangeCoef = 0; // blind at night
nightRangeCoef = 0.5; // range halved at night
nightRangeCoef = 0.5; // range halved at night
nightRangeCoef = 1; // full range at night; if undef  
nightRangeCoef = 1; // full range at night; if undef
</syntaxhighlight>
</syntaxhighlight>
====maxFogSeeThrough====
 
=== maxFogSeeThrough ===
 
A fog threshold, sensor won't be able to see through a fog with higher value than this number.
A fog threshold, sensor won't be able to see through a fog with higher value than this number.
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
maxFogSeeThrough= 0.1; // sensor blocked by even smallest amount of fog
maxFogSeeThrough= 0.1; // sensor blocked by even smallest amount of fog
maxFogSeeThrough= 0.95; // approx. the normal visibility in fog (vis. sensor)
maxFogSeeThrough= 0.95; // approx. the normal visibility in fog (vis. sensor)
maxFogSeeThrough= -1; // disable
maxFogSeeThrough= -1; // disable
</syntaxhighlight>
</syntaxhighlight>


====groundNoiseDistanceCoef====
=== groundNoiseDistanceCoef ===
 
Portion of sensor->target->ground distance. Below this number the targets become invisible to the sensor even if they are still within the [[#GroundTarget|GroundTarget]] range.
Portion of sensor->target->ground distance. Below this number the targets become invisible to the sensor even if they are still within the [[#GroundTarget|GroundTarget]] range.
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
groundNoiseDistanceCoef = 0.1; // if distance between vehicle and ground in the direction of the target is 1km then the target won't be detected as long as it stays less than 100m close to the ground background
groundNoiseDistanceCoef = 0.1; // if distance between vehicle and ground in the direction of the target is 1km then the target won't be detected as long as it stays less than 100m close to the ground background
groundNoiseDistanceCoef = -1 // if undef
groundNoiseDistanceCoef = -1; // if undef
</syntaxhighlight>
</syntaxhighlight>
====maxGroundNoiseDistance====
 
=== maxGroundNoiseDistance ===
 
Distance from the ground background in meters, hard cap, above which the target will be visible even if still below [[#groundNoiseDistanceCoef|groundNoiseDistanceCoef]].
Distance from the ground background in meters, hard cap, above which the target will be visible even if still below [[#groundNoiseDistanceCoef|groundNoiseDistanceCoef]].
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
maxGroundNoiseDistance = 50; // in the situation from prev. example the target now becomes detectable whenever it is more than 50m from the ground background and still within the sensor GroundTarget range.
maxGroundNoiseDistance = 50; // in the situation from prev. example the target now becomes detectable whenever it is more than 50m from the ground background and still within the sensor GroundTarget range.
maxGroundNoiseDistance = -1; // if undef
maxGroundNoiseDistance = -1; // if undef
</syntaxhighlight>
</syntaxhighlight>
====minSpeedThreshold====
 
=== minSpeedThreshold ===
 
Target speed in m/s above which the target will start to become visible even if below [[#groundNoiseDistanceCoef|groundNoiseDistanceCoef]].
Target speed in m/s above which the target will start to become visible even if below [[#groundNoiseDistanceCoef|groundNoiseDistanceCoef]].
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
minSpeedThreshold = 27.7; // following the prev. example if target is 20m from the ground background but it's moving more than 100km/h (27.7m/s) it may still be detected by the sensor.
minSpeedThreshold = 27.7; // following the prev. example if target is 20m from the ground background but it is moving more than 100km/h (27.7m/s) it may still be detected by the sensor.
minSpeedThreshold = 0; // if undef
minSpeedThreshold = 0; // if undef
</syntaxhighlight>
</syntaxhighlight>
====maxSpeedThreshold====
 
=== maxSpeedThreshold ===
 
target speed above which the target becomes visible even if below [[#groundNoiseDistanceCoef|groundNoiseDistanceCoef]], linearly decreases to [[#minSpeedThreshold|minSpeedThreshold]].
target speed above which the target becomes visible even if below [[#groundNoiseDistanceCoef|groundNoiseDistanceCoef]], linearly decreases to [[#minSpeedThreshold|minSpeedThreshold]].
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
maxSpeedThreshold = 100; // following the prev. example if target is 20m from the ground background but it's moving more than 360km/h it will be detected by the sensor.
maxSpeedThreshold = 100; // following the prev. example if target is 20m from the ground background but it is moving more than 360km/h it will be detected by the sensor.
maxSpeedThreshold = 1000; // if undef
maxSpeedThreshold = 1000; // if undef
</syntaxhighlight>
</syntaxhighlight>
====minTrackableSpeed====
 
Minimum speed of the target that can be detected.
=== minTrackableSpeed ===
<syntaxhighlight lang="c">
 
Minimum speed (in m/s) of the target that can be detected.
<syntaxhighlight lang="cpp">
minTrackableSpeed = -1e10; // if undef; no minimum speed
minTrackableSpeed = -1e10; // if undef; no minimum speed
minTrackableSpeed = 27.7; // targets slower than 100km/h won't be detected at all
minTrackableSpeed = 27.7; // targets slower than 100km/h won't be detected at all
</syntaxhighlight>
</syntaxhighlight>
====maxTrackableSpeed====
 
Maximum speed of the target that can be detected.
=== maxTrackableSpeed ===
<syntaxhighlight lang="c">
 
Maximum speed (in m/s) of the target that can be detected.
<syntaxhighlight lang="cpp">
maxTrackableSpeed = 1e10; // if undef; no maximum speed
maxTrackableSpeed = 1e10; // if undef; no maximum speed
maxTrackableSpeed = 55; // targets faster than 200km/h won't be detected at all
maxTrackableSpeed = 55; // targets faster than 200km/h won't be detected at all
</syntaxhighlight>
</syntaxhighlight>
====minTrackableATL====
 
=== minTrackableATL ===
 
Minimum altitude above terrain level that can be detected.
Minimum altitude above terrain level that can be detected.
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
minTrackableATL= -1e10; // if undef; no minimum altitude
minTrackableATL= -1e10; // if undef; no minimum altitude
minTrackableATL= 50; // targets flying lower than 50m above ground and ground vehicles (unless jumping or dropped from an airplane) won't be detected at all
minTrackableATL= 50; // targets flying lower than 50m above ground and ground vehicles (unless jumping or dropped from an airplane) won't be detected at all
</syntaxhighlight>
</syntaxhighlight>
====maxTrackableATL====
 
=== maxTrackableATL ===
 
Maximum altitude above terrain level that can be detected.
Maximum altitude above terrain level that can be detected.
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
maxTrackableATL= 1e10; // if undef; no maximum altitude
maxTrackableATL= 1e10; // if undef; no maximum altitude
maxTrackableATL= 1; // targets higher than 1m above won't be detected
maxTrackableATL= 1; // targets higher than 1m above won't be detected
</syntaxhighlight>
</syntaxhighlight>
====animDirection====
 
=== animDirection ===
 
Model selection to set the sensor direction.
Model selection to set the sensor direction.
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
animDirection = "mainTurret"; // sensor will be aligned with the turret and will rotate together with it
animDirection = "mainTurret"; // sensor will be aligned with the turret and will rotate together with it
animDirection = "";   // if undef; sensor will be aligned with vehicle body
animDirection = ""; // if undef; sensor will be aligned with vehicle body
</syntaxhighlight>
</syntaxhighlight>
====aimDown====
 
=== aimDown ===
 
Elevation offset in degrees of the sensor from the [[#animDirection|animDirection]].
Elevation offset in degrees of the sensor from the [[#animDirection|animDirection]].
<syntaxhighlight lang="c">
<syntaxhighlight lang="cpp">
aimDown = 35; // sensor will be looking 35° downwards from its original direction given by the animDirection
aimDown = 35; // sensor will be looking 35° downwards from its original direction given by the animDirection
aimDown = 0; // if undef
aimDown = 0; // if undef
</syntaxhighlight>
</syntaxhighlight>
====allowsMarking====
 
Sets whether targets acquired by the sensor can be "marked", having track visualized in 3D and with possibility to use the info for various aiming aids or weapon guidance. This has specifically been made for RWR simulation via passive radar, so the active radars pop up on Sensor Display but they can't be marked unless also tracked by another sensor (vehicle or weapon).
=== allowsMarking ===
<syntaxhighlight lang="c">
 
Sets whether targets acquired by the sensor can be "marked", having track visualized in 3D and with possibility to use the info for various aiming aids or weapon guidance.
This has specifically been made for RWR simulation via passive radar, so the active radars pop up on Sensor Display but they can't be marked unless also tracked by another sensor (vehicle or weapon).
<syntaxhighlight lang="cpp">
allowsMarking= 1; // default
allowsMarking= 1; // default
allowsMarking= 0; // targets that are tracked by this sensor only won't be target-able  
allowsMarking= 0; // targets that are tracked by this sensor only won't be target-able
</syntaxhighlight>
</syntaxhighlight>




== Example Config - full definition ==
== Example Config - full definition ==
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="cpp">
class cfgAmmo
class cfgAmmo
{
{
class MissileCore;
class MissileCore;
class MissileBase: MissileCore
class MissileBase : MissileCore
{
{
class Components;
class Components;
};
};
class My_Missile_Base: MissileBase
class My_Missile_Base : MissileBase
{
{
missileLockMaxDistance = 3500;  
missileLockMaxDistance = 3500;
missileLockMinDistance = 100;
missileLockMinDistance = 100;
missileLockMaxSpeed = 680;
missileLockMaxSpeed = 680;
missileLockCone = 50;
missileLockCone = 50;
// The properties above limit the locking range, cone and conditions but they are are independent from the sensor. They don't say what the missile can see and track. In this case they are set to similar values as sensor, so what the missile seeker can see and track the missile will also be able to lock onto.
// The properties above limit the locking range, cone and conditions but they are are independent from the sensor.
// They don't say what the missile can see and track. In this case they are set to similar values as sensor,
// so what the missile seeker can see and track the missile will also be able to lock onto.


class Components: Components
class Components : Components
{
{
class SensorsManagerComponent
class SensorsManagerComponent
Line 200: Line 242:
class Components
class Components
{
{
class SomeRadarSensorComponent                  
class SomeRadarSensorComponent
{                                                
{
componentType = "ActiveRadarSensorComponent";
componentType = "ActiveRadarSensorComponent";
class AirTarget     // ranges for targets with sky background
class AirTarget // ranges for targets with sky background
{                                          
{
minRange = 5000;         //minimum possible range in meters  
minRange = 5000; // minimum possible range in meters
maxRange = 5000;       //maximum possible range in meters                
maxRange = 5000; // maximum possible range in meters
objectDistanceLimitCoef = -1;   //range not limited by obj. view distance
objectDistanceLimitCoef = -1; // range not limited by obj. view distance
viewDistanceLimitCoef = -1;     //range not limited by view distance          
viewDistanceLimitCoef = -1; // range not limited by view distance
};                                                                                  
};
class GroundTarget     // ranges for targets with ground background                          
class GroundTarget // ranges for targets with ground background
{                                          
{
minRange = 3000;              
minRange = 3000;
maxRange = 3000;                
maxRange = 3000;
objectDistanceLimitCoef = -1;              
objectDistanceLimitCoef = -1;
viewDistanceLimitCoef = -1;                
viewDistanceLimitCoef = -1;
};  
};
typeRecognitionDistance = 1000; // distance how far the target type gets recognized                                        
typeRecognitionDistance = 1000; // distance how far the target type gets recognized
angleRangeHorizontal = 60;     // sensor azimuth coverage in degrees        
angleRangeHorizontal = 60; // sensor azimuth coverage in degrees
angleRangeVertical = 60;       // sensor elevation coverage in degrees      
angleRangeVertical = 60; // sensor elevation coverage in degrees
groundNoiseDistanceCoef = 0.5; // portion of sensor-target-ground distance below which the targets become invisible to the sensor
groundNoiseDistanceCoef = 0.5; // portion of sensor-target-ground distance below which the targets become invisible to the sensor
maxGroundNoiseDistance = 250;   // distance from the ground in meters, hard cap, above which the target will be visible even if still below groundNoiseDistanceCoef
maxGroundNoiseDistance = 250; // distance from the ground in meters, hard cap, above which the target will be visible even if still below groundNoiseDistanceCoef
minSpeedThreshold = 30;       // target speed in m/s above which the target will start to become visible          
minSpeedThreshold = 30; // target speed in m/s above which the target will start to become visible
maxSpeedThreshold = 45;       // target speed above which the target becomes visible even if below groundNoiseDistanceCoef, linearly decreases to minSpeedThreshold        
maxSpeedThreshold = 45; // target speed above which the target becomes visible even if below groundNoiseDistanceCoef, linearly decreases to minSpeedThreshold
};
};
};
};
Line 231: Line 273:
};
};
</syntaxhighlight>
</syntaxhighlight>


== Example Config - inheritance from template ==
== Example Config - inheritance from template ==
<syntaxhighlight lang="c">
 
class SensorTemplateActiveRadar;  
<syntaxhighlight lang="cpp">
class SensorTemplateActiveRadar;
class SensorTemplateIR;
class SensorTemplateIR;


class cfgVehicles
class cfgVehicles
{
{
class Plane;
class Plane;
class Plane_Base_F: Plane
class Plane_Base_F : Plane
{
{
class Components;
class Components;
};
};
class My_Plane_Base: Plane_Base_F
class My_Plane_Base : Plane_Base_F
{
{
class Components: Components
class Components : Components
{
{
class SensorsManagerComponent
class SensorsManagerComponent
Line 254: Line 298:
class ActiveRadarSensorComponent : SensorTemplateActiveRadar
class ActiveRadarSensorComponent : SensorTemplateActiveRadar
{
{
class AirTarget    
class AirTarget
{                                          
{
minRange = 6000;  
minRange = 6000;
maxRange = 6000;                                            
maxRange = 6000;
objectDistanceLimitCoef = -1;  
objectDistanceLimitCoef = -1;
viewDistanceLimitCoef = -1;            
viewDistanceLimitCoef = -1;
};                                                                                                                      
};
angleRangeHorizontal = 60;          
angleRangeHorizontal = 60;
angleRangeVertical = 60;    
angleRangeVertical = 60;
};
};
 
class IRSensorComponent : SensorTemplateIR { };
class IRSensorComponent : SensorTemplateIR {};
};
};
};
};
};
};
Line 273: Line 317:
</syntaxhighlight>
</syntaxhighlight>


= Related =
 
* [[A3_Targeting_config_reference]]
== See Also ==
* [[CfgAmmo_Config_Reference|CfgAmmo]]
 
* [[CfgVehicles_Config_Reference|CfgVehicles]]
* [[Arma 3: Targeting Config Reference]]
* [[Arma 3 Sensors]]
* [[CfgAmmo Config Reference]]
* [[Arma 3 Custom Info]]
* [[CfgVehicles Config Reference]]
* [[Arma 3 Components]]
* [[Arma 3: Sensors]]
* [[Arma 3 Targeting]]
* [[Arma 3: Custom Info]]
* [https://forums.bistudio.com/topic/200467-jets-sensor-overhaul/ Sensor Overhaul thread]
* [[Arma 3: Targeting]]
* {{Link|https://dev.arma3.com/post/oprep-sensor-overhaul|Sensor Overhaul OPREP}}
* {{Link|https://forums.bistudio.com/topic/200467-jets-sensor-overhaul/|Sensor Overhaul thread (Forums)}}
 
 
{{GameCategory|arma3|Editing}}

Latest revision as of 12:49, 30 April 2024

Vehicle and ammo sensors for target detection and tracking.


Introduction / Components

The new Sensor system gets enabled by defining a SensorsManagerComponent class inside the vehicle's Components class.

class MyVehicle_F : MyBaseVehicle_F
{
	class Components : Components
	{
		class SensorsManagerComponent : SensorTemplatePassiveRadar
		{
		};
	};
};

For simplicity the class can inherit from one of the templates that are available in the configFile root, which allows you to only change the properties you need.

class SensorTemplatePassiveRadar;
class SensorTemplateAntiRadiation;
class SensorTemplateActiveRadar;
class SensorTemplateIR;
class SensorTemplateVisual;
class SensorTemplateMan;
class SensorTemplateLaser;
class SensorTemplateNV;
class SensorTemplateDataLink;


Properties

componentType

Mandatory property that defines the type/spectrum and hardcoded behavior of the sensor. Can be one of the following:

  • IRSensorComponent - detects irTargets according to their irTargetSize and their actual heat signature. Sources of heat are engine, tires or the muzzle. To become a detectable target in IR the engine has to be running at least 6 seconds. To become undetectable the vehicle may need to cool down even as long as 1 hour.
  • NVSensorComponent - detects nvTargets.
  • LaserSensorComponent - detects laserTargets.
  • ActiveRadarSensorComponent - detects radarTargets according to their radarTargetSize. Radar needs to be switched ON via an action (Default Arma 3 and Arma 3 Apex keybind is Ctrl + R). Switching the radar on also makes the owner a detectable target for vehicles or ammo with passive radar component (see below). It's also the only sensor that can provide additional information about the target - its distance, speed and altitude.
  • PassiveRadarSensorComponent - detects vehicles with active radar switched on at twice their active radar's range.
  • VisualSensorComponent - detects visualTargets according to their visualTargetSize.
  • ManSensorComponent - detects targets that inherit from Man class.
  • DataLinkSensorComponent - in combination with receiveRemoteTargets this allows the vehicle to actively target and track targets from the side's Data Link
componentType = "ActiveRadarSensorComponent";

class AirTarget

Defines the sensor detection range in look-up conditions, when the target is positioned against a sky background. It's possible to cap the range by viewDistance (or its portion) for systems that work within visual range. Set the DistanceLimitCoefs to -1 to disable any impact of view distance on the sensor for beyond visual range systems.

The actual sensor's range is the smallest of [maxRange, resulting objectViewDistanceLimit, resulting viewDistanceLimit] but never lower than minRange

In the following case the sensor will be able to detect targets that are within the object view distance as terrain view distance will always be bigger. However if the obj. view distance is set above 5km the sensor won't be able to detect anything above 5km. If it is conversely set below 500m, the sensor will still be able to detect targets at 500m even if they are not visible.

class AirTarget	// ranges for targets with sky background
{
		minRange = 500;		// -1 if undef; in meters
		maxRange = 5000;	// -1 if undef; in meter
		viewDistanceLimitCoef	= 1;	// -1 if undef; coefficient, multiplies current view distance as set in player's options. -1 means view distance is not used to limit sensor range.
		objectDistanceLimitCoef	= 1;	// -1 if undef; coefficient, multiplies current object view distance as set in player's options. -1 means object view distance is not used to limit sensor range.

};

class GroundTarget

Defines the sensor detection range in look-down conditions, when the target is positioned against ground clutter. Properties are the same as in airTarget.

class GroundTarget			// ranges for targets with ground background
{
		minRange = 500;		// -1 if undef; in meters
		maxRange = 3000;	// -1 if undef; in meters

		viewDistanceLimitCoef = 1;		// -1 if undef; coefficient, multiplies current view distance as set in player's options. -1 means view distance is not used to limit sensor range.
		objectDistanceLimitCoef = 1;	// -1 if undef; coefficient, multiplies current object view distance as set in player's options. -1 means object view distance is not used to limit sensor range.
};

typeRecognitionDistance

Distance in meters at which the sensor recognizes the actual target vehicle type (e.g. Mi-48 Kajman)

typeRecognitionDistance = 1000; /// -1 if undef

angleRangeHorizontal

Sensor horizontal (azimuth) coverage (in degrees)

angleRangeHorizontal = 120;
angleRangeHorizontal = 90; // if undef

angleRangeVertical

Sensor vertical (elevation) coverage (in degrees)

angleRangeVertical = 120;
angleRangeVertical = 90; // if undef

nightRangeCoef

A coefficient of sensor's range during night time (used for visual sensors). Goes linearly between full light conditions (daytime) and poor light conditions (dusk). Overcast weather can sometimes move the range down the scale as well.

nightRangeCoef = 0;		// blind at night
nightRangeCoef = 0.5;	// range halved at night
nightRangeCoef = 1;		// full range at night; if undef

maxFogSeeThrough

A fog threshold, sensor won't be able to see through a fog with higher value than this number.

maxFogSeeThrough= 0.1;	// sensor blocked by even smallest amount of fog
maxFogSeeThrough= 0.95;	// approx. the normal visibility in fog (vis. sensor)
maxFogSeeThrough= -1;	// disable

groundNoiseDistanceCoef

Portion of sensor->target->ground distance. Below this number the targets become invisible to the sensor even if they are still within the GroundTarget range.

groundNoiseDistanceCoef = 0.1;	// if distance between vehicle and ground in the direction of the target is 1km then the target won't be detected as long as it stays less than 100m close to the ground background
groundNoiseDistanceCoef = -1;	// if undef

maxGroundNoiseDistance

Distance from the ground background in meters, hard cap, above which the target will be visible even if still below groundNoiseDistanceCoef.

maxGroundNoiseDistance = 50; // in the situation from prev. example the target now becomes detectable whenever it is more than 50m from the ground background and still within the sensor GroundTarget range.
maxGroundNoiseDistance = -1; // if undef

minSpeedThreshold

Target speed in m/s above which the target will start to become visible even if below groundNoiseDistanceCoef.

minSpeedThreshold = 27.7; // following the prev. example if target is 20m from the ground background but it is moving more than 100km/h (27.7m/s) it may still be detected by the sensor.
minSpeedThreshold = 0; // if undef

maxSpeedThreshold

target speed above which the target becomes visible even if below groundNoiseDistanceCoef, linearly decreases to minSpeedThreshold.

maxSpeedThreshold = 100; // following the prev. example if target is 20m from the ground background but it is moving more than 360km/h it will be detected by the sensor.
maxSpeedThreshold = 1000; // if undef

minTrackableSpeed

Minimum speed (in m/s) of the target that can be detected.

minTrackableSpeed = -1e10; // if undef; no minimum speed
minTrackableSpeed = 27.7; // targets slower than 100km/h won't be detected at all

maxTrackableSpeed

Maximum speed (in m/s) of the target that can be detected.

maxTrackableSpeed = 1e10; // if undef; no maximum speed
maxTrackableSpeed = 55; // targets faster than 200km/h won't be detected at all

minTrackableATL

Minimum altitude above terrain level that can be detected.

minTrackableATL= -1e10; // if undef; no minimum altitude
minTrackableATL= 50; // targets flying lower than 50m above ground and ground vehicles (unless jumping or dropped from an airplane) won't be detected at all

maxTrackableATL

Maximum altitude above terrain level that can be detected.

maxTrackableATL= 1e10; // if undef; no maximum altitude
maxTrackableATL= 1; // targets higher than 1m above won't be detected

animDirection

Model selection to set the sensor direction.

animDirection = "mainTurret";	// sensor will be aligned with the turret and will rotate together with it
animDirection = "";				// if undef; sensor will be aligned with vehicle body

aimDown

Elevation offset in degrees of the sensor from the animDirection.

aimDown = 35; // sensor will be looking 35° downwards from its original direction given by the animDirection
aimDown = 0; // if undef

allowsMarking

Sets whether targets acquired by the sensor can be "marked", having track visualized in 3D and with possibility to use the info for various aiming aids or weapon guidance. This has specifically been made for RWR simulation via passive radar, so the active radars pop up on Sensor Display but they can't be marked unless also tracked by another sensor (vehicle or weapon).

allowsMarking= 1; // default
allowsMarking= 0; // targets that are tracked by this sensor only won't be target-able


Example Config - full definition

class cfgAmmo
{
	class MissileCore;
	class MissileBase : MissileCore
	{
		class Components;
	};
	class My_Missile_Base : MissileBase
	{
		missileLockMaxDistance	= 3500;
		missileLockMinDistance	= 100;
		missileLockMaxSpeed		= 680;
		missileLockCone			= 50;
		// The properties above limit the locking range, cone and conditions but they are are independent from the sensor.
		// They don't say what the missile can see and track. In this case they are set to similar values as sensor,
		// so what the missile seeker can see and track the missile will also be able to lock onto.

		class Components : Components
		{
			class SensorsManagerComponent
			{
				class Components
				{
					class SomeRadarSensorComponent
					{
						componentType = "ActiveRadarSensorComponent";
						class AirTarget		// ranges for targets with sky background
						{
							minRange	= 5000;	// minimum possible range in meters
							maxRange	= 5000;	// maximum possible range in meters
							objectDistanceLimitCoef	= -1; // range not limited by obj. view distance
							viewDistanceLimitCoef	= -1; // range not limited by view distance
						};
						class GroundTarget	// ranges for targets with ground background
						{
							minRange = 3000;
							maxRange = 3000;
							objectDistanceLimitCoef = -1;
							viewDistanceLimitCoef 	= -1;
						};
						typeRecognitionDistance = 1000; // distance how far the target type gets recognized
						angleRangeHorizontal 	= 60;	// sensor azimuth coverage in degrees
						angleRangeVertical 		= 60;	// sensor elevation coverage in degrees
						groundNoiseDistanceCoef = 0.5;	// portion of sensor-target-ground distance below which the targets become invisible to the sensor
						maxGroundNoiseDistance 	= 250;	// distance from the ground in meters, hard cap, above which the target will be visible even if still below groundNoiseDistanceCoef
						minSpeedThreshold 		= 30;	// target speed in m/s above which the target will start to become visible
						maxSpeedThreshold 		= 45;	// target speed above which the target becomes visible even if below groundNoiseDistanceCoef, linearly decreases to minSpeedThreshold
					};
				};
			};
		};
	};
};


Example Config - inheritance from template

class SensorTemplateActiveRadar;
class SensorTemplateIR;

class cfgVehicles
{
	class Plane;
	class Plane_Base_F : Plane
	{
		class Components;
	};
	class My_Plane_Base : Plane_Base_F
	{
		class Components : Components
		{
			class SensorsManagerComponent
			{
				class Components
				{
					class ActiveRadarSensorComponent : SensorTemplateActiveRadar
					{
						class AirTarget
						{
							minRange = 6000;
							maxRange = 6000;
							objectDistanceLimitCoef	= -1;
							viewDistanceLimitCoef	= -1;
						};
						angleRangeHorizontal = 60;
						angleRangeVertical = 60;
					};

					class IRSensorComponent : SensorTemplateIR {};
				};
			};
		};
	};
};


See Also