PART
{
	name = bahaIRSTpod
	module = Part
	author = SuicidalInsanity
	rescaleFactor = 0.85
	node_stack_top = 0.0, 0.0, -0.28, 0, 0, -1, 1
	node_attach = 0.0, 0.28, -0.1082, 0.0, 0.0, 1

	TechRequired = precisionEngineering
	entryCost = 5500
	cost = 2000
	category = none
	bdacategory = Radars
	subcategory = 0
	bulkheadProfiles = size1
	title = #loc_BDArmory_part_bahaIRSTPod_title //AN/AAQ-42 IRST Pod
	manufacturer = #loc_BDArmory_agent_title //Bahamuto Dynamics
	description = #loc_BDArmory_part_bahaIRSTPod_description //A forward facing InfraRed Search and Track system housed in an aerodynamic pod. It can scan and detect thermal signatures within a 120 degree field of view. It is optimized for air-to-air use, and has difficulties detecting surface targets.
	tags = #loc_BDArmory_part_bahaIRSTPod_tags
	attachRules = 1,1,1,1,0
	stackSymmetry = 2
	mass = 0.2
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 2
	crashTolerance = 7
	maxTemp = 2000

	MODULE
	{
		name = ModuleIRST

		// -- Section: General Configuration --
		IRSTName = AN/AAQ-42 IRST		// if left empty part.title is used, but advised to set this to a nice printable text          
		//rotationTransformName = scanRotation //transform name for any animated irst elements that rotate while unit is active
		//turretID = 0					// if needed
		resourceDrain = 0.825				//EC/sec
		// -- Section: Capabilities --
		irstRanging = false					// true: IRST can provide target range similar to radar
		omnidirectional = false				// false: boresight scan irst
		directionalFieldOfView = 120			// for omni and boresight
		//boresightFOV = 10				// for boresight only
		//scanRotationSpeed = 240				// degress per second
		showDirectionWhileScan = false			// can show target direction on radar screen. False: returns displayed as block only (no direction)
		canScan = true					// scanning/detecting targets (volume search)

		GroundClutterFactor = 0.16			// how much is the irst efficiency reduced to by ground clutter/look-down?
											// 0.0 = reduced to 0% (=IMPOSSIBLE to detect ground targets)
											// 1.0 = fully efficient (no difference between air & ground targets)
											// default if unset: 0.16
											// Ground targets are going to be harder to pick out against background ground temperature. Doesn't apply to sea targets.
											// values >1.0 are possible, meaning the irst is MORE efficient during look down than vs air targets.

		TempSensitivityCurve
		{
			// floatcurve that applies a tempModifier to the default KSP temperature values to make certain temperatures/IR spectrum more detectable
			// This is applied to the target craft's heat values first, before the DetectionCurve and atmAttenuationCurve are evaluated
			// For example, key = 350 2, will result in a part having 350 heat being evaluated for detection as if it has 350*2 = 700 heat
			// This curve represents an example IRST optimized for MWIR (3-5μm, 578-963K), with standard SWIR (1.4-3μm, 963-2064K), and no LWIR (8-14μm, 206-361K) capability
			//  key = temp	tempModifier
			//  key = 0 0 0 0
			//  key = 361 0 0 0 // End of LWIR (8μm)
			//  key = 578 2 0 0 // Start of MWIR (5μm)
			//  key = 963 2 0 0 // End of MWIR/Start of SWIR (3μm)
			//  key = 1156 1 0 0  // 2.5μm
			//  key = 2064 1 0 0 // End of SWIR (1.4μm)
			//  key = temp	tempModifier
			key = 0 1 // Use this to ignore temperature sensitivity effects, this is the default if TempSensitivityCurve is not set
		}
		
		DetectionCurve
		{
			// floatcurve to define at what range (km) which minimum thermal signature(k) can be detected.
			// this defines both min/max range of the irst, and sensitivity/efficiency
			// it is recommended to define an "assured detection range", at which all craft are detected regardless
			// of their heatSig. This is achieved by using a min temp value of zero, thus detecting everything.
			//  key = distance	temp
			key = 0.0	300 //Ambient craft temp at Kerbin ASL is ~307k
			key = 5 300
			key = 20 500
			key = 30 1000  
			key = 45 3000	//max detection of 3000 heat at 45km
		}

		atmAttenuationCurve
		{
			// floatcurve to define how IRST range is affected by local atmosphere density and temperature; thinner and colder air attenuates heat signatures less, increasing range
			//      key = atmdensity	rangeModifier
			key = 1	1
			key = 0.9	 1.125
			key = 0.5	 3
			key = 0.1   8
			key = 0   10	//vacuum, range set by sensor resolution
		}
	}
}
