// MM-Patch for make existing parts work with the new BDA radar overhaul
// It provides _suggestions_ for how to set the radar's
// detection and locktrack capabilities (floatcurves), as well as the
// look-down effectiveness (ground clutter factor).
//
// THESE PATCHES ARE _NOT_ INTENDED TO BE DISTRIBUTED WITH BDA!
// They are purely for easier testing, and for consideration for
// the original authors when they adapt their part configs to the new
// BDA release.
// You may freely:
// - take this patch and incorporate as-is into your part configs
// - take this patch, use it as a base, change it & distribute it with your parts
// - discard all of this & roll your own, maybe using this change to re-balance
//   your parts
// Its all up to you!

@PART[bahaMk22LightningCockpit]
{
    @MODULE[ModuleRadar]
    {
        // idea: should feature an integrated radar with somewhat better range
        //       and sensitivity than the bda stock AN/APG-63V1

        %radarName = MK22 APG-77 AESA Radar
	    %resourceDrain = 1.5
        %maxLocks = 5
        radarGroundClutterFactor = 0.15     //optimized for air-2-air combat, terrible look-down performance
        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 = 12	5   //
                  key = 22 15	//
                  key = 37 22
                  key = 45 35   //maxrange of 45km
        }
        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	2	//can lock extreme well at close distance
                  key = 10	5   //
                  key = 20 15	//
                  key = 30 25	//
                  key = 35 35   //can lock only up to 35km, and min rcs is larger than for detection
        }
    }
}