T_4 = 
{
	Name 				= 'T-4',
	DisplayName			= _('T-4'),
	HumanCockpit 		= true,
--	HumanCockpitPath    = current_mod_path..'/Cockpit/',
	Picture 			= current_mod_path.."/T-4.png",
	Rate 				= 40, -- RewardPoint in Multiplayer
	Shape 				= "T-4",
	shape_table_data 	= 
	{
		{
			file  	 = 'T-4';
			life  	 = 18; -- lifebar
			vis   	 = 3; -- visibility gain.
			desrt    = 'T-4_destr'; -- Name of destroyed object file name
			fire  	 = { 300, 2}; -- Fire on the ground after destoyed: 300sec 2m
			username = 'T-4';
			index    =  WSTYPE_PLACEHOLDER;
			classname 	= "lLandPlane";
			positioning = "BYNORMAL";
			drawonmap 	= true;
		},
--		{
--			name  = "T-4_destr";
--			file  = "T-4-destr";
--			fire  = { 240, 2};
--		},

	},
	mapclasskey	= "P0091000025",
	attribute	= {wsType_Air, wsType_Airplane, wsType_Battleplane, WSTYPE_PLACEHOLDER, "Battleplanes",},
	Categories	= {},
	-------------------------

	-- 仸仸仸 \Scripts\Database\PlaneConst.lua拞偺椶帡偺婡懱僨乕僞傪嶲徠 仸仸仸	
	M_empty 					= 3650, -- kg
	M_nominal 					= 5530, -- kg
	M_max 						= 7650, -- kg
	M_fuel_max 					= 1652, -- kg
	H_max 					 	= 14325, -- m
	average_fuel_consumption 	= 0.245, -- this is highly relative, but good estimates are 36-40l/min = 28-31kg/min = 0.47-0.52kg/s -- 45l/min = 35kg/min = 0.583kg/s
	CAS_min 					= 60, -- if this is not OVERAL FLIGHT TIME, but jus LOITER TIME, than it sholud be 10-15 minutes.....CAS capability in minute (for AI)
	V_opt 						= 220,-- Cruise speed (for AI)
	V_take_off 					= 65, -- Take off speed in m/s (for AI)
	V_land 						= 68, -- Land speed in m/s (for AI)
	V_max_sea_level 			= 408, -- Max speed at sea level in m/s (for AI)
	V_max_h 					= 589, -- Max speed at max altitude in m/s (for AI)
	Vy_max 						= 250, -- Max climb speed in m/s (for AI)
	Mach_max 					= 0.91, -- Max speed in Mach (for AI)
	Ny_min 						= -3, -- Min G (for AI)
	Ny_max 						= 7.33,  -- Max G (for AI)
	Ny_max_e 					= 7.33,  -- Max G (for AI)
	AOA_take_off 				= 0.16, -- AoA in take off (for AI)
	bank_angle_max 				= 60, -- Max bank angle (for AI)
	has_afteburner 				= false, -- AFB yes/no
	has_speedbrake 				= true, -- Speedbrake yes/no
	nose_gear_pos 				= {4.32,	-1.77,	0}, -- nosegear coord
	main_gear_pos 				= { -0.874,	-1.77,	1.492}, -- main gear coords
	tand_gear_max 				= 0.4,
	tanker_type 				= 0, -- Tanker type if the plane is airrefuel capable
	wing_area 					= 21.06, -- wing area in m2
	wing_span 					= 9.9, -- wing spain in m
	wing_type 					= 0,
	thrust_sum_max 				= 3340, -- thrust in kg (44kN)
	thrust_sum_ab 				= 3340, -- thrust inkg (71kN)
	length 						= 13.0, -- full lenght in m
	height 						= 4.83, -- height in m
	flaps_maneuver 				= 0.5, -- Max flaps in take-off and maneuver (0.5 = 1st stage; 1.0 = 2nd stage) (for AI)
	range 						= 1300, -- Max range in km (for AI)
	RCS 						= 2.5, -- Radar Cross Section m2
	IR_emission_coeff 			= 0.6, -- Normal engine -- IR_emission_coeff = 1 is Su-27 without afterburner. It is reference.
	IR_emission_coeff_ab 		= 0, -- With afterburner
	wing_tip_pos 				=  {-2.9,	-0.3, 5.1}, -- wingtip coords for visual effects
	nose_gear_wheel_diameter 	= 0.423, -- in m
	main_gear_wheel_diameter 	= 0.597, -- in m
	brakeshute_name 			= 0, -- Landing - brake chute visual shape after separation
	is_tanker 					= false, -- Tanker yes/no
	air_refuel_receptacle_pos 	= {0,	0,	0}, -- refuel coords
	engines_count				= 2, -- Engines count
	engines_nozzles = 
	{
		[1] = 
		{
			pos					= {-4.2, -0.47, 0.534}, -- nozzle coords
			elevation			= 0, -- AFB cone elevation
			diameter			= 0.37, -- AFB cone diameter
			exhaust_length_ab	= 5, -- lenght in m
			exhaust_length_ab_K	= 0.76, -- AB animation
			smokiness_level		= 0.1,
		}, -- end of [1]
		[2] = 
		{
			pos					= {-4.2, -0.47, -0.534}, -- nozzle coords
			elevation			= 0, -- AFB cone elevation
			diameter			= 0.37, -- AFB cone diameter
			exhaust_length_ab	= 5, -- lenght in m
			exhaust_length_ab_K	= 0.76, -- AB animation
			smokiness_level		= 0.1,
		}, -- end of [2]
	}, -- end of engines_nozzles
	crew_size	 = 1,
	crew_members = 
	{
		[1] = 
		{
			ejection_seat_name	= 17,
			drop_canopy_name	= "T-4-FONAR",
			pos					= {3.1, -0.3, 0.0},
			canopy_pos			= {3.1, -0.3, 0.0},
		}, -- end of [1]
	}, -- end of crew_members

	fires_pos = 
	{
		[1] = 	{-0.707,	0.553,	-0.213},
		[2] = 	{-0.037,	0.285,	1.391},
		[3] = 	{-0.037,	0.285,	-1.391},
		[4] = 	{-0.82,	0.265,	2.774},
		[5] = 	{-0.82,	0.265,	-2.774},
		[6] = 	{-0.82,	0.255,	4.274},
		[7] = 	{-0.82,	0.255,	-4.274},
		[8] = 	{-5.003,	0.261,	0},
		[9] = 	{-5.003,	0.261,	0},
		[10] = 	{-0.707,	0.453,	1.036},
		[11] = 	{-0.707,	0.453,	-1.036},
	}, -- end of fires_pos

	-- Countermeasures
	SingleChargeTotal	 	= 0,
	CMDS_Incrementation 	= 0,
	ChaffDefault 			= 0, 
	ChaffChargeSize 		= 0,
	FlareDefault 			= 0, 
	FlareChargeSize 		= 0,
	CMDS_Edit 				= false,
	chaff_flare_dispenser 	= 
	{
	},

	--sensors
	
	detection_range_max		 = 60,
	radar_can_see_ground 	 = true, -- this should be examined (what is this exactly?)
	CanopyGeometry = 
	{
		azimuth   = {-160.0, 160.0}, -- pilot view horizontal (AI)
		elevation = {-50.0, 90.0} -- pilot view vertical (AI)
	},
	Sensors = 
	{
		RWR = "Abstract RWR", -- RWR type
        RADAR = "AN/APG-68"
	},
	HumanRadio = 
	{
		frequency = 127.5,  -- Radio Freq
		editable = true,
		minFrequency = 100.000,
		maxFrequency = 156.000,
		modulation = MODULATION_AM
	},

	-- F-15僐僢僋僺僢僩傪巊偆嵺丄GUNs偑柍偄偲堎忢廔椆偡傞
	Guns = 
	{
	    gun_mount("M_61", { count = 0 }, {muzzle_pos = {0, 0, 0}})
	},
	
	Pylons = 
    {
        pylon(1, 0, -0.800000, 0.050000, -2.500000,
            {
            },
            {
                { CLSID = "T_4_TANK_W" },
            }
        ),
        pylon(2, 0, -0.800000, -0.700000, 0.000000,
            {
            },
            {
                { CLSID = "T_4_TANK_C" },
            }
        ),
        pylon(3, 0, -0.800000, 0.050000, 2.500000,
            {
            },
            {
                { CLSID = "T_4_TANK_W" },
            }
        ),
        pylon(4, 0, -3.2, -0.35, 0.45,
            {
            },
            {
                { CLSID = "T_4_SMOKEGEN" },
            }
        ),
    },
	
	Tasks = 
	{
        aircraft_task(GroundAttack),
        aircraft_task(RunwayAttack),
        aircraft_task(PinpointStrike),
        aircraft_task(CAS),
        aircraft_task(AFAC),
		aircraft_task(CAP),
        aircraft_task(Escort),
        aircraft_task(FighterSweep),
        aircraft_task(Intercept),
        aircraft_task(SEAD),
        aircraft_task(AntishipStrike),
    },	
	DefaultTask = aircraft_task(CAP),

	-- 仸仸仸 \Scripts\Database\SFM_Data.lua拞偺椶帡偺婡懱僨乕僞傪嶲徠 仸仸仸	
	SFM_Data = {
		aerodynamics = -- Cx = Cx_0 + Cy^2*B2 +Cy^4*B4
		{
			Cy0			=	0,      -- zero AoA lift coefficient
			Mzalfa		=	4.355,  -- coefficients for pitch agility
			Mzalfadt	=	0.8,    -- coefficients for pitch agility
			kjx			=	2.75,    
			kjz			=	0.00125, 
			Czbe		=	-0.016, -- coefficient, along Z axis (perpendicular), affects yaw, negative value means force orientation in FC coordinate system
			cx_gear		=	0.0268,    -- coefficient, drag, gear
			cx_flap		=	0.05,   -- coefficient, drag, full flaps
			cy_flap		=	0.52,    -- coefficient, normal force, lift, flaps
			cx_brk		=	0.06,   -- coefficient, drag, breaks
			table_data  = 
			{	--      M		Cx0		 	Cya			B		 	B4	    	Omxmax		Aldop		Cymax
				[1] = 	{0,	0.0165,	0.07,	0.132,	0.032,	0.5,	30,	1.2},
				[2] = 	{0.2,	0.0165,	0.07,	0.132,	0.032,	1.5,	30,	1.2},
				[3] = 	{0.4,	0.0165,	0.07,	0.133,	0.032,	2.5,	30,	1.2},
				[4] = 	{0.6,	0.0165,	0.073,	0.133,	0.043,	3.5,	30,	1.2},
				[5] = 	{0.7,	0.017,	0.076,	0.134,	0.045,	3.5,	28.666666666667,	1.18},
				[6] = 	{0.8,	0.024,	0.079,	0.137,	0.052,	3.5,	27.333333333333,	1.16},
				[7] = 	{0.9,	0.041,	0.083,	0.143,	0.058,	3.5,	26,	1.14},
				[8] = 	{1,	0.062,	0.085,	0.18,	0.1,	3.5,	24.666666666667,	1.12},
				[9] = 	{1.05,	0.061,	0.0855,	0.1975,	0.095,	3.5,	24,	1.11},
				[10] = 	{1.1,	0.06,	0.086,	0.215,	0.09,	3.15,	18,	1.1},
				[11] = 	{1.2,	0.051,	0.083,	0.228,	0.12,	2.45,	17,	1.05},
				[12] = 	{1.3,	0.046,	0.077,	0.237,	0.17,	1.75,	16,	1},
				[13] = 	{1.49,	0.044,	0.062,	0.251,	0.2,	1.5125,	13.15,	0.905},
				[14] = 	{1.5,	0.043903225806452,	0.061483870967742,	0.25064516129032,	0.2058064516129,	1.5,	13,	0.9},
				[15] = 	{1.7,	0.041967741935484,	0.051161290322581,	0.24354838709677,	0.32193548387097,	0.9,	12,	0.7},
				[16] = 	{1.8,	0.041,	0.046,	0.24,	0.38,	0.86,	11.4,	0.64},
				[17] = 	{2,	0.042,	0.039,	0.222,	2.5,	0.78,	10.2,	0.52},
				[18] = 	{2.2,	0.041,	0.034,	0.227,	3.2,	0.7,	9,	0.4},
				[19] = 	{2.5,	0.039,	0.033,	0.25,	4.5,	0.7,	9,	0.4},
				[20] = 	{3.9,	0.035,	0.033,	0.35,	6,	0.7,	9,	0.4},
			}, -- end of table_data
			-- M - Mach number
			-- Cx0 - Coefficient, drag, profile, of the airplane
			-- Cya - Normal force coefficient of the wing and body of the aircraft in the normal direction to that of flight. Inversely proportional to the available G-loading at any Mach value. (lower the Cya value, higher G available) per 1 degree AOA
			-- B - Polar quad coeff
			-- B4 - Polar 4th power coeff
			-- Omxmax - roll rate, rad/s
			-- Aldop - Alfadop Max AOA at current M - departure threshold
			-- Cymax - Coefficient, lift, maximum possible (ignores other calculations if current Cy > Cymax)
		}, -- end of aerodynamics
		engine = 
		{
			Nmg	=	67.5, -- RPM at idle
			MinRUD	=	0, -- Min state of the throttle
			MaxRUD	=	1, -- Max state of the throttle
			MaksRUD	=	0.85, -- Military power state of the throttle
			ForsRUD	=	0.91, -- Afterburner state of the throttle
			typeng	=	0,
			--[[
				E_TURBOJET = 0
				E_TURBOJET_AB = 1
				E_PISTON = 2
				E_TURBOPROP = 3
				E_TURBOFAN = 4
				E_TURBOSHAFT = 5
			--]]
			
			hMaxEng	=	19, -- Max altitude for safe engine operation in km
			dcx_eng	=	0.0144, -- Engine drag coeficient
			cemax	=	1.24, -- not used for fuel calulation , only for AI routines to check flight time ( fuel calculation algorithm is built in )
			cefor	=	2.56, -- not used for fuel calulation , only for AI routines to check flight time ( fuel calculation algorithm is built in )
			dpdh_m	=	6200, --  altitude coefficient for max thrust
			dpdh_f	=	9500,  --  altitude coefficient for AB thrust
			table_data = 
			{		--   M		Pmax		 Pfor	
				[1] = 	{0,	77000,	108313.6},
				[2] = 	{0.2,	74000,	109850},
				[3] = 	{0.4,	74000,	115227.3},
				[4] = 	{0.6,	85000,	126750},
				[5] = 	{0.7,	85000,	145000},
				[6] = 	{0.8,	90000,	157000},
				[7] = 	{0.9,	94000,	166000},
				[8] = 	{1,	100000,	170000},
				[9] = 	{1.096,	96000,	171000},
				[10] = 	{1.2,	86000,	171000},
				[11] = 	{1.3,	68000,	173000},
				[12] = 	{1.4,	55000,	176000},
				[13] = 	{1.6,	56000,	176000},
				[14] = 	{1.8,	56000,	184000},
				[15] = 	{2.2,	52000,	173000},
				[16] = 	{2.35,	43000,	157000},
				[17] = 	{3.9,	25000,	120636.4},
			}, -- end of table_data
			-- M - Mach number
			-- Pmax - Engine thrust at military power
			-- Pfor - Engine thrust at AFB
		}, -- end of engine
	}, -- end of SFM_Data

	--damage , index meaning see in  Scripts\Aircrafts\_Common\Damage.lua
	Damage = 
	{
		[0]  = {critical_damage = 5,  args = {82}},	--"NOSE_CENTER"
		[3]  = {critical_damage = 10, args = {65}},	--"COCKPIT"
		[8]  = {critical_damage = 10},	--"FRONT_GEAR_BOX"
		[10] = {critical_damage = 3},	--"MAIN"
		[11] = {critical_damage = 3},	--"ENGINE_L"
		[12] = {critical_damage = 3},	--"ENGINE_R"
		[15] = {critical_damage = 10},	--"LEFT_GEAR_BOX"
		[16] = {critical_damage = 10},	--"RIGHT_GEAR_BOX"
		[17] = {critical_damage = 3},	--"MTG_L
		[18] = {critical_damage = 3},	--"MTG_R"
		[35] = {critical_damage = 10, args = {67}, deps_cells = {37}},	--"WING_L_IN"
		[36] = {critical_damage = 10, args = {68}, deps_cells = {38}},	--"WING_R_IN"
		[37] = {critical_damage = 4,  args = {55}},	--"FLAP_L_IN"
		[38] = {critical_damage = 4,  args = {56}},	--"FLAP_R_IN"
		[43] = {critical_damage = 4,  args = {61}, deps_cells = {53}},	--"FIN_L_BOTTOM"
		[51] = {critical_damage = 2,  args = {59}},	--"ELEVATOR_L_IN"
		[52] = {critical_damage = 2,  args = {60}},	--"ELEVATOR_R_IN"
		[53] = {critical_damage = 2,  args = {57}},	--"RUDDER_L"
		[55] = {critical_damage = 15, args = {81}},	--"TAIL"
	},  -- end of Damage
	
	DamageParts = 
	{  
--		[1] = "F-2-OBLOMOK-WING-R", -- wing R
--		[2] = "F-2-OBLOMOK-WING-L", -- wing L
	},


	lights_data = 
	{
		typename = "collection",
		lights = 
		{
			[1] = -- 僗僩儘儃儔僀僩
			{
		    	typename = "collection",
				lights = 
				{
					-- Left Anticollision Light
					{typename = "natostrobelight",
					connector = "WHITE_BEACON L",
					color = {1.0, 1.0, 1.0},
					argument_1 = 195,
					period = 1.2,
					phase_shift = 0
					},
					-- Right Anticollision Light
					{typename = "natostrobelight",
					connector = "WHITE_BEACON R",
					color = {1.0, 1.0, 1.0},
					argument_1 = 195,
					period = 1.2,
					phase_shift = 0
					}
				}
			},
			[2] = -- 儔儞僨傿儞僌儔僀僩
			{
				typename = "collection",
				lights =
				{
					-- Landing/Taxi light
					{
					typename = "spotlight",
					connector = "MAIN_SPOT_PTR_01",
					color = {1.0, 1.0, 1.0},
					argument = 208,
					dir_correction = {elevation = math.rad(3)}
					},
					-- Landing/Taxi light
					{
					typename = "spotlight",
					connector = "MAIN_SPOT_PTR_02",
					color = {1.0, 1.0, 1.0},
					argument = 208,
					dir_correction = {elevation = math.rad(3)}
					}
				}
			},
		    [3]	= -- 僫價僎乕僔儑儞儔僀僩
			{
		    	typename = "collection",
				lights =
				{
					-- Left Position Light (red)
					{typename = "omnilight",
					connector = "BANO_1",
					color = {0.32, 0.0, 0.07},
					position  = {-2.276, -0.276, -4.923},
					argument  = 190
					},
					-- Right Position Light (green)
					{typename = "omnilight",
					connector = "BANO_2",
					color = {0, 0.26, 0.18},
					position = {-2.276, -0.276, 4.923},
					argument  = 191
					},
					-- Tail Position Light (white)
					{typename = "omnilight",
					connector = "BANO_0_BACK",
					color = {1, 1, 1},
					pos_correction  = {0.0, 0.0, 0.0},
					argument  = 203
					},
				}
			},
		    [4] = -- 僼僅乕儊乕僔儑儞儔僀僩
			{
				typename = "collection",
				lights =
				{
					-- 懷忬偺僼僅乕儊乕僔儑儞儔僀僩
					{typename  = "argumentlight", argument = 200}
				}
			},
			[5]	=
			{
			}
		}
	},  -- end of lights_data
	

}

add_aircraft(T_4)
