Sensors – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
m (typo)
(added values used if property is undefined)
Line 54: Line 54:
class AirTarget      // ranges for targets with sky background
class AirTarget      // ranges for targets with sky background
{                                             
{                                             
         minRange = 50;        //blind range in meters    
         minRange = 50;        // -1 if undef; blind range in meters  
         maxRange = 5000;      //maximum detection range in meters                
         maxRange = 5000;      // -1 if undef; maximum detection range in meters                  
                                                      
                                                      
         objectDistaceLimitCoef = -1;    //limits the range by obj. view distance
         objectDistaceLimitCoef = -1;    // -1 if undef; limits the range by obj. view distance
         viewDistaceLimitCoef = -1;      //limits the range by view distance          
         viewDistaceLimitCoef = -1;      // -1 if undef; limits the range by view distance            
};     
};     
</syntaxhighlight>
</syntaxhighlight>
Line 66: Line 66:
class GroundTarget      // ranges for targets with ground background
class GroundTarget      // ranges for targets with ground background
{                                             
{                                             
         minRange = 50;        //blind range in meters    
         minRange = 50;        // -1 if undef; blind range in meters      
         maxRange = 3000;      //maximum detection range in meters                
         maxRange = 3000;      // -1 if undef; maximum detection range in meters                    
                                                      
                                                      
         objectDistaceLimitCoef = -1;    //limits the range by obj. view distance
         objectDistaceLimitCoef = -1;    // -1 if undef; limits the range by obj. view distance  
         viewDistaceLimitCoef = -1;      //limits the range by view distance          
         viewDistaceLimitCoef = -1;      // -1 if undef; limits the range by view distance            
};   
};   
</syntaxhighlight>
</syntaxhighlight>
Line 77: Line 77:
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
angleRangeHorizontal = 120;
angleRangeHorizontal = 120;
angleRangeVertical = 90; // if undef 
</syntaxhighlight>
</syntaxhighlight>
====angleRangeVertical====
====angleRangeVertical====
Sensor vertical (elevation) coverage (in degrees)  
Sensor vertical (elevation) coverage (in degrees)  
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
angleRangeVertical = 120;  
angleRangeVertical = 120;  
angleRangeVertical = 90; // if undef 
</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="c">
  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
</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="c">
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
</syntaxhighlight>
</syntaxhighlight>
====minSpeedThreshold====
====minSpeedThreshold====
Target speed in km/h above which the target will start to become visible even if below [[#groundNoiseDistanceCoef|groundNoiseDistanceCoef]].
Target speed in km/h above which the target will start to become visible even if below [[#groundNoiseDistanceCoef|groundNoiseDistanceCoef]].
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
minSpeedThreshold = 100; // Following the prev. example if target is 20m from the ground background but it's moving more than 100km/h it may still be detected by the sensor.
minSpeedThreshold = 100; // following the prev. example if target is 20m from the ground background but it's moving more than 100km/h it may still be detected by the sensor.
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="c">
maxSpeedThreshold = 1000; // Following the prev. example if target is 20m from the ground background but it's moving more than 1000km/h it will be detected by the sensor.
maxSpeedThreshold = 1000; // following the prev. example if target is 20m from the ground background but it's moving more than 1000km/h it will be detected by the sensor.
maxSpeedThreshold = 1000; // if undef
</syntaxhighlight>
</syntaxhighlight>
====minTrackableSpeed====
====minTrackableSpeed====
Minimum speed of the target that can be detected.
Minimum speed of the target that can be detected.
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
minTrackableSpeed = -1e10; // no minimum speed
minTrackableSpeed = -1e10; // if undef; no minimum speed
minTrackableSpeed = 100; // targets slower than 100km/h won't be detected at all
minTrackableSpeed = 100; // targets slower than 100km/h won't be detected at all
</syntaxhighlight>
</syntaxhighlight>
Line 112: Line 118:
Maximum speed of the target that can be detected.
Maximum speed of the target that can be detected.
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
maxTrackableSpeed = 1e10; // no maximum speed
maxTrackableSpeed = 1e10; // if undef; no maximum speed
maxTrackableSpeed = 200; //targets faster than 200km/h won't be detected at all
maxTrackableSpeed = 200; // 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="c">
minTrackableATL= -1e10; // 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>
Line 124: Line 130:
Maximum altitude above terrain level that can be detected.
Maximum altitude above terrain level that can be detected.
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
maxTrackableATL= 1e10; // 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>
Line 131: Line 137:
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
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 = "";  // sensor will be aligned with vehicle body
animDirection = "";  // if undef; sensor will be aligned with vehicle body
</syntaxhighlight>
</syntaxhighlight>
====aimDown====
====aimDown====
Line 137: Line 143:
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
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
</syntaxhighlight>
</syntaxhighlight>



Revision as of 14:35, 5 January 2017

Template:Cfg ref

Overview

Vehicle and ammo sensors for target detection and tracking.

Forum topic: Main thread

User Interface

Arma 3 Sensors Sensor Display symbology.png

Mechanics

Configuration

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 SensorTemplateActiveRadar;   
class SensorTemplateIR;            
class SensorTemplateVisual;        
class SensorTemplateMan;           
class SensorTemplateLaser;         
class SensorTemplateNV;

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

class AirTarget      // ranges for targets with sky background
{                                            
        minRange = 50;         // -1 if undef; blind range in meters 
        maxRange = 5000;       // -1 if undef; maximum detection range in meters                    
                                                     
        objectDistaceLimitCoef = -1;    // -1 if undef; limits the range by obj. view distance  
        viewDistaceLimitCoef = -1;      // -1 if undef; limits the range by view distance             
};

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 = 50;         // -1 if undef; blind range in meters        
        maxRange = 3000;       // -1 if undef; maximum detection range in meters                     
                                                     
        objectDistaceLimitCoef = -1;    // -1 if undef; limits the range by obj. view distance    
        viewDistaceLimitCoef = -1;      // -1 if undef; limits the range by view distance              
};

angleRangeHorizontal

Sensor horizontal (azimuth) coverage (in degrees)

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

angleRangeVertical

Sensor vertical (elevation) coverage (in degrees)

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

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 km/h above which the target will start to become visible even if below groundNoiseDistanceCoef.

minSpeedThreshold = 100; // following the prev. example if target is 20m from the ground background but it's moving more than 100km/h 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 = 1000; // following the prev. example if target is 20m from the ground background but it's moving more than 1000km/h it will be detected by the sensor.
maxSpeedThreshold = 1000; // if undef

minTrackableSpeed

Minimum speed of the target that can be detected.

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

maxTrackableSpeed

Maximum speed of the target that can be detected.

maxTrackableSpeed = 1e10; // if undef; no maximum speed
maxTrackableSpeed = 200; // 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


Example Config - full definition

class cfgAmmo
{	
        class MissileCore;
        class MissileBase: MissileCore
	{
		class Components;
	};	
        class My_Missile_Base: MissileBase
	{
		...
		missileLockMaxDistance 	= 3500; 
		missileLockMinDistance 	= 100;
		missileLockMaxSpeed 	= 2450;
		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 SomeRadarSensorComponent                   
                        {                                                 
                                componentType = "ActiveRadarSensorComponent";
                                class AirTarget      // ranges for targets with sky background
                                {                                            
                                    minRange = 50;         //blind range in meters     
                                    maxRange = 5000;       //maximum detection range in meters                  
                                    objectDistaceLimitCoef = -1;    //limits the range by obj. view distance
                                    viewDistaceLimitCoef = -1;      //limits the range by view distance           
                                };                                                                                    
                                class GroundTarget      // ranges for targets with ground background                           
                                {                                            
                                    minRange = 50;                
                                    maxRange = 3000;                 
                                    objectDistaceLimitCoef = -1;               
                                    viewDistaceLimitCoef = -1;                 
                                };                                                                                           
                                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 = 110;        // target speed in km/h above which the target will start to become visible           
                                maxSpeedThreshold = 130;       // target speed above which the target becomes visible even if below groundNoiseDistanceCoef, linearly decreases to minSpeedThreshold     
                                minTrackableSpeed = -1e10;     // min speed that can be detected
                                maxTrackableSpeed = 1e10;      // max speed that can be detected
                                minTrackableATL = -1e10;       // min altitude above terrain level that can be detected
                                maxTrackableATL = 1e10;        // max altitude above terrain level that can be detected     
                                animDirection = "";   // model selection to set the sensor direction                        
                                aimDown = 0;                    // elevation offset in degrees of the sensor from the animDirection              
                        };
		};
	};
};

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 ActiveRadarSensorComponent : SensorTemplateActiveRadar
			        {
					class AirTarget      
					{                                            
						minRange = 60; 
						maxRange = 6000;                                              
						objectDistaceLimitCoef = -1; 
						viewDistaceLimitCoef = -1;             
					};                                                                                                                        
					angleRangeHorizontal = 60;            
					angleRangeVertical = 60;      
				};
			        class IRSensorComponent : SensorTemplateIR { };
			};
		};
	};
};

Related