Skip to content

1.2.3 Radar configuration

TheDog edited this page Nov 17, 2017 · 1 revision

Radar configuration for the current radar & stealth system

This page is intended to give you an overview of the changes of the new radar system, and to provide configuration guidelines to part creators.

Overview of changes

The purpose of the redesign of the radar system is to:

  1. Balancing/Differentiation: provide more variety of how different radars can be configured and perform in-game, making it possible to create long-range air search radars (think S-bank volume search), shorter-range but highly sensitive fire control radars (think X-band target illuminators), highly specialised air-2-air radars with little ground attack capability, or specialised ground-attack radars with deficits in air-2-air capabilities.
  2. Make stealth possible: support of 1st generation stealth (building with angled surfaces to scatter radar returns), and also 2nd generation stealth (radar absorbent material coating defined for certain parts).
  3. Performance and code cleanup: improve performance of the current radar code and clean-up the codebase.

To achieve this, we have introduced a number of changes to the current radar implementation:

  • providing a new reflection shader which evaluates the RCS (radar cross section) of a craft. It works similar to the previous "count black pixels" approach, but is more sophisticated and calculates real reflections, making angled surfaces actually work in reducing a craft's rcs.
  • Range and sensitivity will become a thing. While sensitivity actually is already a thing, the fields "minSignalThreshold" and "minLockedSignalThreshold" and their (somewhat) arbitrary values seem to be little understood, making it difficult to balance a radar part to actually behave different from others. These fields are now deprecated and are replaced with a FloatCurve, which defines the exact ranges at which a radar can detect and/or lock/track a specific size of cross section. Discussed in detail below.
  • RWR (radar warning receivers) can receive a radar's ping at twice the maximum detection distance of that radar. Hence, a radar announces its presence to an approaching craft long before it can even detect that craft, making "passive listening" and switching radars (or sonars) off a viable tactical possibility.
  • There is a new guideline how to setup ECM jammers which behave either as traditional "lock-breaking jammers" (break radar locks, but increase(!) your detectability while in use), or as "radar absorbent material" which simply reduce a craft's overall cross section (basically a "misuse" of ECM jammers to achieve stealth effect. While this feature has been in BDA ever since, it was not really documented yet.)
  • To aid a player in designing his craft for stealth, and to evaluate how it is detected/tracked by different radars, a new in-editor plugin window provides a static cross section analysis with visual feedback.
  • finally, some changes to active radar homing missiles, chaff and ECM to balance it in this overall scheme.

Defining a radar's range and performance characteristics

The previously used fields minSignalThreshold and minLockedSignalThreshold are now deprecated. Your radar needs to define 2 new FloatCurves to define at which range what minimum size of cross section can be detected (or tracked). These new fields are:

radarDetectionCurve, and radarLockTrackCurve

We DO NOT provide default values or try to infer values from the legacy fields, hence: Your radar part NEEDS an update to work properly with this new radar system!

Sorry for that, but we think it is a good chance to review your part and (re-)balance it into the grand scheme (we dont want one part to rule 'em all and be superior in all regards, rather all parts should fill some niche, right?). Legacy parts not yet updated are detected during loading and a warning is written to the log.

What is a FloatCurve? If you dont know about FloatCurves yet, read here: KSP/Unity FloatCurves

How do I know how my FloatCurve looks like? We suggest you use ths tool to visualise and design floatcurves right inside KSP: Amazing Curve Editor by Sarbian

For the radar floatcurves you can keep it very easy: just provide some key/value pair, with key = (value1) (value2) with: value1 = range in km(!) and value2 = min RCS in m^2 at that particular range. KSP's / Unity'S FloatCurve magic will do the rest and interpolate between these values, providing a nice, smooth curve.

Advise: forget about in-tangents and out-tangents unless you fully understand what you are doing and want to model some fancy radar behaviour!

FloatCurves of the BDA TWS locking radar:

    radarDetectionCurve
    {
      // floatcurve to define at what range (km) which minimum cross section (m^2) can be detected.
      // this defines both min/max range of the radar, and sensitivity/efficiency
      // it is recommended to define an "assured detection range", at which all craft are detected regardless
      //     of their rcs. This is achieved by using a minrcs value of zero, thus detecting everything.
      //        key = distance	rcs
                key = 0.0	0
                key = 7	0	//between 0 and 7 km the min cross section is 0, thus assured detection of everything
                key = 10 5   //
                key = 20 15  //effective range 20km, can still detect relatively small rcs
                key = 30 40	//max range 30km, but only for very large rcs
    }
    radarLockTrackCurve
    {
        // same as detectionCurve, just for locking/tracking purpose
        // ATTENTION: DO NOT USE an "assured locking range" here, as this would render lock-breaking
        //   ECM-jammers & chaff completely ineffective!!
        //      key = distance	rcs
                key = 0.0	0
                key = 7	5	//overall curve similar to detectionCurve, but needs bigger rcs to lock at comparable range
                key = 10 7
                key = 20 20
                key = 30 50
    }

For more examples please refer to our part configs.

Other fields to define a radar's capabilities and performance

Of course there is more to balance a radar's capabilities and performance than just the FloatCurves.

radarGroundClutterFactor

Previously BDA radar already included a ground clutter factor, but this was statically calculated and the same for all radars. It is now possible (though not strictly necessary) to define this in a radar's part config.

The value is to be interpreted as the radar's effectiveness when performing a look-down from air downwards (regardless of whether the target is actually landed/splashed on the surface, or another aircraft flying low).

The value is also applied in full to all vessels on the surface (landed/splashed) or submerged. This compensates partially for the massively higher cross sections that ships/subs have in general as compared to small fighter aircraft.

Lower values (closer to zero) = radar is less effective. E.g. a value of 0.1 means that in the most extreme case (90° look-down) the radar is only 10% as effective (only huge cross sections can be detected and locked).

High values (closer to one) = radar is more effective. E.g. a value of 0.9 means that in the most extreme case (90° look-down) the radar is still 90% as effective (=10% loss in rcs resolution).

ground clutter factor explained

Example:

Airplane with a radar with ground clutter factor 0.25. Surface vessel with base radar cross section of 120 m^2.

For detection purpose the surface vessel has 120 * 0.25 = 30 m^2 of cross section, which is evaluated against the radars detection curve, even if the airplane is landed/splashed itself.

If the airplane is flying directly overhead, with a look-down angle close to 90°, the surface vessel's cross section is further reduced to: 120 * 0.25 * (close to)0.25 = 7.5 m^2.

All other (pre-)existing fields are still valid and necessary. Our example part configs have been enhanced to include all these fields and also show their default values.

These fields are:

MODULE
{
    name = ModuleRadar

    // -- Section: General Configuration --
    radarName = TWS Locking Radar		// if left empty part.title is used, but advised to set this to a nice printable text
    rwrThreatType = 0				// IMPORTANT, please set correctly:
                            // 0 = SAM site radar
                            // 1 = Fighter radar (airborne)
                            // 2 = AWACS radar (airborne)
                            // 3, 4 = ACTIVE MISSILE (DO NOT USE UNLESS YOU KNOW WHAT YOU'RE DOING!
                            // 5 = Detection radar (ground/ship based)
                            // 6 = SONAR (ship/submarine based)
    rotationTransformName = rotationTransform
    //turretID = 0					// if needed
    resourceDrain = 0.85				// change to higher values for more capable radars, e.g AESA
    // -- Section: Capabilities --
    omnidirectional = true				// false: boresight scan radar
    directionalFieldOfView = 90			// for omni and boresight
    //boresightFOV = 10				// for boresight only
    scanRotationSpeed = 300				// degress per second
    //lockRotationSpeed = 120				// only relevant if canLock
    //lockRotationAngle = 4
    showDirectionWhileScan = true			// can show target direction on radar screen. False: radar echos displayed as block only (no direction)
    //multiLockFOV = 30				// only relevant if canLock
    //lockAttemptFOV = 2				// only relevant if canLock
    maxLocks = 1					//how many targets can be locked/tracked simultaneously. only relevant if canLock
    canScan = true					// scanning/detecting targets (volume search)
    canLock = true					// locking/tracking targets (fire control)
    canTrackWhileScan = true			// continue scanning while tracking a locked target
    canRecieveRadarData = true			// can work as passive data receiver (NOTE THE SPELLING! [SIC])
    minSignalThreshold = 120				// DEPRECATED, NO LONGER USED! use detection float curve!
    minLockedSignalThreshold = 180			// DEPRECATED, NO LONGER USED! use locktrack float curve!
    radarGroundClutterFactor = 0.1			// how much is the radar efficiency reduced to by ground clutter/look-down?
                            // 0.0 = reduced to 0% (very hard to detect ground targets)
                            // 1.0 = fully efficient (no difference between air & ground targets)
                            // values >1.0 are possible, meaning the radar is MORE efficient during look down than vs aireal targets.

Guidelines / Recommendations

  1. Carefully choose the capabilities of the part you want to create. Not all radars excel at everything in real life. Dedicated air volume search, target illuminators, multi-band radars, etc. all have their purpose and niche.

Templates for different types of radars:

(1) Fighter air-2-air combat with little ground detection/attack capabilities:

  • give it a good floatcurve (=low min rcs values)
  • give it a very low ground clutter factor (<0.2, maybe around 0.1)
  • result: can detect even small rcs air targets at good range, but has difficulties with surface targets even though their rcs (in case of warships) is massively larger

(2) Modern surface-2-air volume search & track with limited surface/horizon search capabilities:

  • basically same as (1)

(3) Dedicated air-2-ground attack radar with deficits in air-2-air combat:

  • give it a moderate floatcurve (=average min rcs values)
  • give it a above average ground clutter factor (0.3 - 0.5)
  • result: cannot easily detect smaller fighters, but can easily detect & track larger ground targets at a good range

(4) Spezialised Marine surface/horizon search which cannot be easily used versus air targets

  • basically similar to (3): give it a bad floatcurve (=high to very high min rcs values)
  • give it a very good ground clutter factor (0.6 - 1.0)
  • result: cannot easily detect smaller fighters (depending on rcs values might be useless against air targets at all), but can easily detect & track surface targets at a high range
  1. We advise you to balance your ranges against our stock BDA parts and a stock KSP install, and taking the following factors in consideration:
  • Previous BDA versions defaulted to 40km max range for radar and engagement ranges. Many weapons (esp. missiles) are configured with this in mind.
  • A stock install of PhysicsRangeExtender sets the maximum aereal physics load distance to 100km. Thus, defining a radar range of 200km wont do anything.
  1. We highly encourage you to consider providing also configurations to support RBDA (Realistic BDA), which is designed to work in a RSS install with much higher physics load ranges, and realistic parameters for all weapons and parts. Thus, you might just use realistic radar ranges as found in wikipedia or other sources. Whether you distribute these configs as separate configs, or MM patches, we dont have a clear recommendation yet. (TBD BDA-Team)

  2. Since the current SONAR system also uses the RADAR system, all of the above also applies to sonar parts. Balance suggestions are to e.g. configure hull-mounted sonars with relatively low range and high RCS, while a dedicated towed-array sonar might provide high range and very good resolution (low rcs), and a helicopter-carried dipping sonar maybe very good resolution but only a medium range. YMMV.

  • However, be aware that the typical RCS of a fighter plane (without stealth coating parts) is expected to be between 10 and 25 m^2.
  • A ship, on the other hand, with parts from Large Boats Pack or SM Marine, will have cross sections of 100 m^2 and higher! (unless some mods start providing "stealth hulls" with specials shapes and/or rcs reduction ECM-modules).

Further Explanations for part creators

  1. [Stealthyness of parts explained] (https://forum.kerbalspaceprogram.com/index.php?/topic/166311-131-bdarmory-continued-for-modders-public-beta-of-v100/&do=findComment&comment=3190444)