
An_22 =  {

	Name 			= 'An-22',
	DisplayName		= _('An-22_AI'),
	Picture 		= "",
	Rate 			= "40",
	Shape			= "An22",
	WorldID			=  WSTYPE_PLACEHOLDER,

	shape_table_data 	=
	{
		{
			file  	 	= 'An22';
			life  	 	= 50; -- lifebar
			vis   	 	= 3; -- visibility gain.
			desrt    	= 'kc-135-oblomok'; -- Name of destroyed object file name
			fire  	 	= { 300, 2}; 	-- Fire on the ground after destoyed: 300sec 2m
			username	= 'An-22';
			index   	=  WSTYPE_PLACEHOLDER;
			classname	= "lLandPlane";
			positioning	= "BYNORMAL";
		},
		{
			name  		= "kc-135-oblomok";
			file  		= "kc-135-oblomok";
			fire  		= { 240, 2};
		},
	},
	Categories = {
	},

	mapclasskey 		= "P0091000029",
	attribute  		= {wsType_Air, wsType_Airplane, wsType_Cruiser, WSTYPE_PLACEHOLDER,
				"Transports",},


	singleInFlight 	= true,
	EPLRS		= false,

	M_empty		= 114000,
	M_nominal	= 190000,
	M_max		= 250000,
	M_fuel_max	= 43000,
	H_max		= 9100,
	average_fuel_consumption	= 0.361,
	CAS_min		= 54,
	V_opt		= 162,
	V_take_off	= 72,
	V_land		= 68,
	has_afteburner	= false,
	has_speedbrake	= false,
	has_differential_stabilizer = false,
	nose_gear_pos	= {17.5, -4.96, 0},	-- {forward/aft, up/down, left/right}
	main_gear_pos	= {-3.0, -5.0, 4.0},
	radar_can_see_ground	= false,
	AOA_take_off	= 0.1,
	stores_number	= 0,
	bank_angle_max	= 35,
	Ny_min		= 0.5,
	Ny_max		= 2.5,
	tand_gear_max	= 0.577,
	V_max_sea_level	= 172,
	V_max_h		= 190,
	tanker_type	= 0,
	wing_area	= 345.0,
	wing_span	= 64.4, --B-52 60.0,
	thrust_sum_max	= 90000,
	thrust_sum_ab	= 90000,
	Vy_max		= 9.1,
	length		= 57.92, --tu-160 67.0,
	height		= 12.53, --c-17 19.60,
	flaps_maneuver	= 0.5,
	Mach_max	= 0.66,
	range		= 5000,
	RCS		= 100,
	Ny_max_e	= 2,
	detection_range_max	= 0,
	IR_emission_coeff	= 1,
	IR_emission_coeff_ab	= 0,
	engines_count	= 4,
	wing_tip_pos	= {1.0, -0.2, 28.6},
	nose_gear_wheel_diameter	= 0.935,
	main_gear_wheel_diameter	= 1.14,
	--SOUNDERS Start
		soundName= "aircrafts/An22FrontProp",
		--Sounders End
		--Engine visuals
	engines_nozzles =
	{
		[1] =
		{
			pos = 	{-7.5, -1.1, -12.7},
			elevation	=	0,
			diameter	=	1.523,
			exhaust_length_ab	=	11.794,
			exhaust_length_ab_K	=	0.76,
			smokiness_level     = 	0.2,
		}, -- end of [1]
		[2] =
		{
			pos = 	{-2.1, -1.0, -6.75},
			elevation	=	0,
			diameter	=	1.523,
			exhaust_length_ab	=	11.794,
			exhaust_length_ab_K	=	0.76,
			smokiness_level     = 	0.2,
		}, -- end of [2]
		[3] =
		{
			pos = 	{-2.1, -1.0, 6.75},
			elevation	=	0,
			diameter	=	1.523,
			exhaust_length_ab	=	11.794,
			exhaust_length_ab_K	=	0.76,
			smokiness_level     = 	0.2,
		}, -- end of [3]
		[4] =
		{
			pos = 	{-7.5, -1.1, 12.7},
			elevation	=	0,
			diameter	=	1.523,
			exhaust_length_ab	=	11.794,
			exhaust_length_ab_K	=	0.76,
			smokiness_level     = 	0.2,
		}, -- end of [4]
	}, -- end of engines_nozzles
	crew_members =
	{
		[1] =
		{
			ejection_seat_name	=	0,
			drop_canopy_name	=	0,
			pos = 	{7.916,	0.986,	0},
		}, -- end of [1]
		[2] =
		{
			ejection_seat_name	=	0,
			drop_canopy_name	=	0,
			pos = 	{3.949,	1.01,	0},
		}, -- end of [2]
		[3] =
		{
			ejection_seat_name	=	0,
			drop_canopy_name	=	0,
			pos = 	{3.949,	1.01,	0},
		}, -- end of [3]
	}, -- end of crew_members
	brakeshute_name	= 0,
	is_tanker	= false,
--	air_refuel_receptacle_pos = {6.731, 0.825, 0.492},
	fires_pos =
	{
		[1] = 	{-0.138,	-0.79,	0},
		[2] = 	{-0.138,	-0.79,	5.741},
		[3] = 	{-0.138,	-0.79,	-5.741},
		[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] = 	{-0.347,	-1.875,	8.138},
		[9] = 	{-0.347,	-1.875,	-8.138},
		[10] = 	{-5.024,	-1.353,	13.986},
		[11] = 	{-5.024,	-1.353,	-13.986},
	}, -- end of fires_pos


	Failures = {
		{ id = 'asc', 		label = _('ASC'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		{ id = 'autopilot', label = _('AUTOPILOT'), enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		{ id = 'hydro',  	label = _('HYDRO'),	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		{ id = 'l_engine',  label = _('L-ENGINE'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		{ id = 'r_engine',	label = _('R-ENGINE'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
	},
	HumanRadio = {
		frequency = 127.5,  -- Radio Freq
		editable = true,
		minFrequency = 100.000,
		maxFrequency = 156.000,
		modulation = MODULATION_AM
	},

	Pylons =     {
		},

	Tasks = {
		aircraft_task(Transport),
		},
	DefaultTask = aircraft_task(Transport),


	SFM_Data = {
	aerodynamics =
		{
			Cy0	=	0,
			Mzalfa	=	6.6,
			Mzalfadt	=	1,
			kjx	=	2.85,
			kjz	=	0.00125,
			Czbe	=	-0.012,
			cx_gear	=	0.015,
			cx_flap	=	0.08,
			cy_flap	=	1,
			cx_brk	=	0.06,
			table_data =
			{
				[1] = 	{0,	0.024,	0.1,	0.0384,	1e-006,	0.5,	20,	1.2},
				[2] = 	{0.2,	0.024,	0.1,	0.0384,	1e-006,	1.5,	20,	1.2},
				[3] = 	{0.4,	0.024,	0.1,	0.0384,	1e-006,	2.5,	20,	1.2},
				[4] = 	{0.5,	0.024,	0.1,	0.0384,	1e-006,	2.5,	20,	1.2},
				[5] = 	{0.6,	0.027,	0.1,	0.0,	0.3,	3.5,	20,	1.2},
				[6] = 	{0.7,	0.031,	0.1,	0.045,	0.9,	3.5,	20,	1},
				[7] = 	{0.8,	0.036,	0.1,	0.107,	1,	3.5,	20,	0.8},
				[8] = 	{0.9,	0.045,	0.1,	0.148,	0.058,	3.5,	20,	0.6},
				[9] = 	{1,	0.054,	0.1,	0.199,	0.1,	3.5,	20,	0.53333333333333},
				[10] = 	{1.5,	0.054,	0.1,	0.199,	0.1,	3.5,	20,	0.2},
			}, -- end of table_data
		}, -- end of aerodynamics
		engine =
		{
			Nmg	=	40.0,
			MinRUD	=	0,
			MaxRUD	=	1,
			MaksRUD	=	1,
			ForsRUD	=	1,
			type	=	"TurboProp",
			hMaxEng	=	19.5,
			dcx_eng	=	0.0085,
			cemax	=	0.37,
			cefor	=	0.37,
			dpdh_m	=	4500,
			dpdh_f	=	4500,
			table_data =
			{
				[1] = 	{0,	 492376,	492376},
				[2] = 	{0.1,	 484863,	484863},
				[3] = 	{0.2,	 400594,	400594},
				[4] = 	{0.3,	 341405,	341405},
				[5] = 	{0.4,	 282640,	282640},
				[6] = 	{0.5,	 235125,	235125},
				[7] = 	{0.6,	 190375,	190375},
				[8] = 	{0.7,	 160874,	160874},
				[9] = 	{0.8,	 134316,	134316},
				[10] = 	{0.9,	 110000,	110000},
			}, -- end of table_data
		}, -- end of engine
	},


	--damage , index meaning see in  Scripts\Aircrafts\_Common\Damage.lua
		Damage = {
			["MAIN"]	     = {critical_damage = 10,args =  { }},
			["WING_R"]	     = {critical_damage = 10,args =  { }},
			["WING_L"]	     = {critical_damage = 10,args =  { }},
			["ENGINE"]	     = {critical_damage = 10,args =  { }},
			["STABILIZER_L_OUT"]	     = {critical_damage = 2,args =  { }},
			["STABILIZER_R_OUT"]	     = {critical_damage = 2,args =  { }},
			["ELEVATOR_L_OUT"]	     = {critical_damage = 2,args =  { }},
			["ELEVATOR_R_OUT"]	     = {critical_damage = 2,args =  { }},
			["RUDDER"]	     = {critical_damage = 2,args =  { }},
		},


-- VSN DCS World\Scripts\Aircrafts\_Common\Lights.lua

	lights_data = { typename = "collection", lights = {

	[WOLALIGHT_NAVLIGHTS] = {
	    typename = "Collection",
	    lights = {
		[1] = {
		    typename = "collection",
		    lights = {
			{
			    typename = "Spot", connector = "BANO_0", dir_correction = {azimuth = math.rad(180.0)}, argument = 192,
			    proto = lamp_prototypes.HS_2A, angle_max = math.rad(180.0), angle_min = math.rad(170.0),
			},
			{
			    typename = "Spot", connector = "BANO_1", dir_correction = {azimuth = math.rad(-45.0), elevation = math.rad(45.0)}, argument = 190,
			    proto = lamp_prototypes.BANO_7M_red,
			},
			{
			    typename = "Spot", connector = "BANO_2", dir_correction = {azimuth = math.rad(45.0), elevation = math.rad(45.0)}, argument = 191,
			    proto = lamp_prototypes.BANO_7M_green,
			},
		    },
		},
	    },
	},

	[WOLALIGHT_SPOTS] = {
	    typename = "collection",
	    lights = {
		{
		    typename = "Collection",
		    lights = {
			{
			    typename = "Spot", connector = "MAIN_SPOT_PTR", dir_correction = {elevation = math.rad(8.0)}, argument = 51,
			    proto = lamp_prototypes.LFS_P_27_600,
			},
			{
			    typename = "Spot", connector = "RESERV_SPOT_PTR", dir_correction = {elevation = math.rad(8.0)},
			    proto = lamp_prototypes.LFS_P_27_600,
			},
			{
			    typename = "Spot", connector = "MAIN_SPOT_PTR", dir_correction = {elevation = math.rad(8.0)}, argument = 51,
			    proto = lamp_prototypes.LFS_P_27_600,
			},
			{
			    typename = "Spot", connector = "RESERV_SPOT_PTR", dir_correction = {elevation = math.rad(8.0)},
			    proto = lamp_prototypes.LFS_P_27_600,
			},
		    },
		},
	    }
	},
	[WOLALIGHT_TAXI_LIGHTS] = {
	    typename = "collection",
	    lights = {
		{
		    typename = "Collection",
		    lights = {
			{
			    typename = "Spot", connector = "MAIN_SPOT_PTR", dir_correction = {elevation = math.rad(8.0)}, argument = 51,
			    proto = lamp_prototypes.LFS_R_27_180,
			},
			{
			    typename = "Spot", connector = "RESERV_SPOT_PTR", dir_correction = {elevation = math.rad(8.0)},
			    proto = lamp_prototypes.LFS_R_27_180,
			},
			{
			    typename = "Spot", connector = "MAIN_SPOT_PTR", dir_correction = {elevation = math.rad(8.0)}, argument = 51,
			    proto = lamp_prototypes.LFS_R_27_180,
			},
			{
			    typename = "Spot", connector = "RESERV_SPOT_PTR", dir_correction = {elevation = math.rad(8.0)},
			    proto = lamp_prototypes.LFS_R_27_180,
			},
		    },
		},
	    }
	},
	[WOLALIGHT_STROBES] = {
	    typename = "collection",
	    lights = {
		[1] = {
		    typename = "Collection",
		    lights = {
			{
			    typename = "natostrobelight", position = {1.675, 2.115 + 0.200, 0.030}, argument = 83,
			    proto = lamp_prototypes.SMI_2KM,
			},
			{
			    typename = "natostrobelight", position = {-9.026, -1.670 - 0.200, -0.070},
			    proto = lamp_prototypes.SMI_2KM,
			},
		    },
		},
	    },
	},

	[WOLALIGHT_FORMATION_LIGHTS] = {
	    typename = "argumentlight", argument = 88,
	},
	}},
}

add_aircraft(An_22)