Su_15 =  {

		Name 			= 'Su_15',--AG
		DisplayName		= _('Su-15 Flagon-A'),--AG
        Picture 		= "Su_15.png",
        Rate 			= "40",
        Shape			= "Su_15",
        WorldID			=  WSTYPE_PLACEHOLDER,


	shape_table_data 	=
	{
		{
			file  	 	= 'Su_15';--AG
			life  	 	= 20; -- lifebar
			vis   	 	= 3; -- visibility gain.
			desrt    	= 'Su_15_destr'; -- Name of destroyed object file name
			fire  	 	= { 300, 2}; -- Fire on the ground after destoyed: 300sec 2m
			username	= 'Su_15';--AG
			index       =  WSTYPE_PLACEHOLDER;
			classname   = "lLandPlane";
			positioning = "BYNORMAL";
		},
		{
			name  		= "Su_15_destr";
			file  		= "Su_15_destr";
			fire  		= { 240, 2};
		},

	},






	mapclasskey	= "P0091000024",
	attribute	= {wsType_Air, wsType_Airplane, wsType_Intercepter,WSTYPE_PLACEHOLDER,Su_15,"Interceptors","Datalink"},
	Categories 	= {"{78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}", "Interceptor",},

		M_empty						=	10220,	-- kg  with pilot and nose load,
		M_nominal					=	15820,	-- kg (Empty Plus Full Internal Fuel)
		M_max						=	17350,	-- kg (Maximum Take Off Weight)
		M_fuel_max					=	5600,	-- kg (Internal Fuel Only)
		H_max						=	18500,	-- m  (Maximum Operational Ceiling)
		average_fuel_consumption	=	0.271,
		CAS_min						=	72,		-- Minimum CAS speed (m/s) (for AI)
		V_opt						=	430,	-- Cruise speed (m/s) (for AI)
		V_take_off					=	109,		-- Take off speed in m/s (for AI)
		V_land						=	88.5,		-- Land speed in m/s (for AI)
		has_afteburner				=	true,
		has_speedbrake				=	true,
		radar_can_see_ground		=	false,



		nose_gear_pos 				                = {3.982,	-2.277,	0},   -- nosegear coord
	    nose_gear_amortizer_direct_stroke   		=  0.0,  -- down from nose_gear_pos !!!
	    nose_gear_amortizer_reversal_stroke  		=  -0.1,  -- up
	    nose_gear_amortizer_normal_weight_stroke 	=  -0.05,   -- down from main_gear_pos
	    nose_gear_wheel_diameter 	                = 0.61, -- in m

	    main_gear_pos 						 	    = {-2.179,	-1.935,	1.541}, -- main gear coords
	    main_gear_amortizer_direct_stroke	 	    =   0.0, --  down from main_gear_pos !!!
	    main_gear_amortizer_reversal_stroke  	    = 	0.0, --  up
	    main_gear_amortizer_normal_weight_stroke    =   0.0,-- down from main_gear_pos
	    main_gear_wheel_diameter 				    =   0.84, -- in m

		AOA_take_off				=	0.16,	-- AoA in take off (for AI)
		stores_number				=	4,
		bank_angle_max				=	60,		-- Max bank angle (for AI)
		Ny_min						=	-3,		-- Min G (for AI)
		Ny_max						=	6.0,		-- Max G (for AI)
		tand_gear_max				=	1.732,	--XX  FA18 3.73,
		V_max_sea_level				=	305,	-- Max speed at sea level in m/s (for AI)
		V_max_h						=	619.44,	-- Max speed at max altitude in m/s (for AI)
		wing_area					=	34.6,	-- wing area in m2
		thrust_sum_max				=	8200,	-- thrust in kgf (64.3 kN)
		thrust_sum_ab				=	13200,	-- thrust in kgf (95.1 kN)
		Vy_max						=	228,	-- Max climb speed in m/s (for AI)
		flaps_maneuver				=	1.0,
		Mach_max					=	2.2,	-- Max speed in Mach (for AI)
		range						=	1380,	-- Max range in km (for AI)
		RCS							=	9,		-- Radar Cross Section m2
		Ny_max_e					=	6.5,		-- Max G (for AI)
		detection_range_max			=	65,
		IR_emission_coeff			=	0.91,	-- Normal engine -- IR_emission_coeff = 1 is Su-27 without afterburner. It is reference.
		IR_emission_coeff_ab		=	4,		-- With afterburner
		tanker_type					=	2,-- F14=2/S33=4/M29=0/S27=0/F15=1/F16=1/To=0/F18=2/A10A=1/M29K=4/M2000=2/F4=0/F5=0/
		wing_span					=	9.34,
		wing_type 					= 	0,-- FIXED_WING = 0/VARIABLE_GEOMETRY = 1/FOLDED_WING = 2/ARIABLE_GEOMETRY_FOLDED = 3
		length						=	21.41,
		height						=	5.0,
		crew_size					=	1,
		engines_count				=	2,
		wing_tip_pos 				= 	{-4.42,	-0.45,	4.47},-- wingtip coords for visual effects

		--EPLRS 						= true,--?
		TACAN_AA					= true,--?
		--launch_bar_connected_arg_value	= 0.815,--0.885,--0.745


    -- add model draw args for network transmitting to this draw_args table (32 limit)
    net_animation ={
        0, -- front gear
	1, -- sosp_ant
		3, -- main gear
		5, -- main gear
        9, -- right flap
        10, -- left flap
        11, -- right aileron
        12, -- left aileron
        15, -- right elevator
        16, -- left elevator
        17, -- rudder
	21, -- speadbreak
	29, --
	35, --
	36, --
	37, --
        38, -- canopy
	39, -- pilots heads
	50, -- pilots fron eject
	65, --
	76, --
	77, -- wheel rollAngle
	99, -- front pilot up down
	190, -- nav light
	191, -- nav light
	192, -- strobe light
	324, --
	325, --
    },
    mechanimations = {
        Door0 = {
            {Transition = {"Close", "Open"},  Sequence = {{C = {{"VelType", 3}, {"Arg", 38, "to", 0.9, "in", 2.0}}}}, Flags = {"Reversible"}},
            {Transition = {"Open", "Close"},  Sequence = {{C = {{"VelType", 3}, {"Arg", 38, "to", 0.0, "in", 2.0}}}}, Flags = {"Reversible", "StepsBackwards"}},
            {Transition = {"Any", "Bailout"}, Sequence = {{C = {{"Arg", 38, "set", 0.04}, {"Sleep", "for", 1.0}}}, {C = {{"TearCanopy", 0}}}, {C = {{"Sleep", "for", 2.0}}}, {C = {{"Arg", 91, "set", 1.0}}}}},
        },
    }, -- end of mechanimations

		engines_nozzles =
		{
			[1] =
			{
				pos = 	{-6.45,	-0.15,	-0.48},
				elevation	=	0,
				diameter	=	0.85,
				exhaust_length_ab	=	9,
				exhaust_length_ab_K	=	0.76,
				smokiness_level     = 	0.25,
			afterburner_effect_texture = "Afterburner_Su15",
			}, -- end of [1]
			[2] =
			{
				pos = 	{-6.45,	-0.15,	0.58},
				elevation	=	0,
				diameter	=	0.85,
				exhaust_length_ab	=	9,
				exhaust_length_ab_K	=	0.76,
				smokiness_level     = 	0.25,
			afterburner_effect_texture = "Afterburner_Su15",
			}, -- end of [2]
		}, -- end of engines_nozzles
	-- Crew member details
		crew_members =
		{
		[1] =
		{
      drop_canopy_name	 = "mig19p_canopy",
      ejection_seat_name	 = "pilot_mig15_seat",
      pilot_name		     = "pilot_su27",
			pos 				 = {4.331, 0.850, 0.0},
			can_be_playable 	 = true,
			canopy_arg           = 38,
			ejection_order 		 = 1,
			canopy_pos			 = {2.916,0.798,0},
			ejection_added_speed = {-5,15,0},
			role 				 = "pilot",
			role_display_name    = _("Pilot"),
			g_suit 			    =  4
		},-- end of [1]
		}, -- end of crew_members


		brakeshute_name	=	4,--Mig29=3/Su27=4/Su25t=4
		is_tanker	=	false,
		-- air_refuel_receptacle_pos = 	{6.731,	0.825,	0.492},

		fires_pos =
		{
			[1] = 	{-0.095,-0.898,	0},-- Fuselage
			[2] = 	{-2.0,	0.221,	1.783}, -- Wing inner Right
			[3] = 	{-2.0,  0.221,	-1.783},-- Wing inner Left
			[4] = 	{-2.82,	-0.365,	2.774},-- Wing middle Right
			[5] = 	{-2.82,	-0.365,	-2.774},-- Wing middle Left
			[6] = 	{-2.82,	-0.355,	4.274},-- Wing outer Right
			[7] = 	{-2.82,	-0.355,	-4.274},-- Wing outer Left
			[8] = 	{-7.452, -0.2,	0.580},-- Engine (inner Right)
			[9] = 	{-7.452, -0.2,	-0.480},-- Engine (inner Left)
			[10] = 	{-0.14,	-0.73,	1.45},-- fuselage right
			[11] = 	{-0.14,	-0.73,	-1.45},-- fuselage left
		}, -- end of fires_pos


		effects_presets = {
			{effect = "OVERWING_VAPOR", file = current_mod_path.."/Effects/Su_15_overwingVapor.lua"},
		},


    CanopyGeometry = makeAirplaneCanopyGeometry(LOOK_AVERAGE, LOOK_AVERAGE, LOOK_AVERAGE),

 --sensors
	Sensors = {
	RWR = "Abstract RWR",
	RADAR = "N-008",
	--[[
	RADAR =
		{
			clsid = "RP_15M",
			type = RADAR_AS,
			            scan_volume =
            {
                azimuth = {-30.0, 30.0},
                elevation = {-5.0, 30.0}
            },
            centered_scan_volume =
            {
                azimuth_sector = 22.0,
                elevation_sector = 21.0
            },
            max_measuring_distance = 65000.0,
            detection_distance =
            {
                [HEMISPHERE_UPPER] =
                {
                    [ASPECT_HEAD_ON] = 40000.0,
                    [ASPECT_TAIL_ON] = 35000.0
                },
                [HEMISPHERE_LOWER] =
                {
                    [ASPECT_HEAD_ON] = 30000.0,
                    [ASPECT_TAIL_ON] = 25000.0
                }
            },
            lock_on_distance_coeff = 0.80,
            velocity_limits =
            {
                radial_velocity_min = 100.0 / 3.6,
                relative_radial_velocity_min = 100.0 / 3.6,
            },
            scan_period = 4.0,
        },
	]]
	},
Countermeasures = {
},
	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 },
			{ id = 'radar',  	label = _('RADAR'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		  --{ id = 'eos',  		label = _('EOS'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		  --{ id = 'helmet',  	label = _('HELMET'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'mlws',  	label = _('MLWS'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'rws',  		label = _('RWS'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'ecm',   	label = _('ECM'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'hud',  		label = _('HUD'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'mfd',  		label = _('MFD'), 		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 =     {

        pylon(1, 0, -2.40000, -0.74400, -3.06000,
            {                       FiZ = -1,     },
            {
	{CLSID = "{R-8M1R}"}, -- R-8M1R
	{CLSID = "{R-8RInert}"}, -- R-8R Inert
	{CLSID = "{R-8M1T}"}, -- R-8M1T
	{CLSID = "{R-8TInert}"}, -- R-8T Inert
            }
        ),

        pylon(2, 0, -1.600, -1.04000, -0.30000,
            {     FiZ = 0,  FiX = 5,    FiY = 0    },
            {
	{CLSID = "{E92CBFE5-C153-11d8-9897-000476191836}"}, -- GSH-23
               { CLSID = "{Su_15_PTB-600}" }, -- PTB-600 Fuel_Tank

            }
        ),
        pylon(3, 0, -1.600, -1.04000, 0.33000,
            {     FiZ = 0,  FiX = -5,    FiY = 0    },
            {
	{CLSID = "{E92CBFE5-C153-11d8-9897-000476191836}"}, -- GSH-23
                { CLSID = "{Su_15_PTB-600}" }, -- PTB-600 Fuel_Tank


          }
        ),

        pylon(4, 0, -2.4000, -0.744000, 3.10000,
            {    FiZ = -1,          },
            {
	{CLSID = "{R-8M1R}"}, -- R-8M1R
	{CLSID = "{R-8RInert}"}, -- R-8R Inert
	{CLSID = "{R-8M1T}"}, -- R-8M1T
	{CLSID = "{R-8TInert}"}, -- R-8T Inert
            }
        ),


},


	-- Possible tasks to be given via. ME.
	Tasks = {
	    aircraft_task(CAP),
        aircraft_task(Escort),
        aircraft_task(FighterSweep),
        aircraft_task(Intercept),
    },

	DefaultTask = aircraft_task(Intercept),

	SFM_Data = {
		aerodynamics = {
			Cy0 = 0,
			Czbe = -0.016,
			Mzalfa = 4.355,
			Mzalfadt = 0.8,
			cx_brk = 0.025,
			cx_flap = 0.025,
			cx_gear = 0.016,
			cy_flap = 0.2,
			kjx = 2.75,
			kjz = 0.00125,
			table_data = { { 0, 0.025, 0.07, 0.155, 0.13, 0.5, 30, 1.2 }, { 0.2, 0.025, 0.07, 0.155, 0.13, 1.5, 30, 1.2 }, { 0.4, 0.025, 0.07, 0.155, 0.13, 2.5, 30, 1.2 }, { 0.6, 0.025, 0.073, 0.155, 0.13, 3.5, 30, 1.2 }, { 0.7, 0.025, 0.076, 0.155, 0.13, 3.5, 28.666666666667, 1.18 }, { 0.8, 0.025, 0.079, 0.155, 0.13, 3.5, 27.333333333333, 1.16 }, { 0.9, 0.0275, 0.083, 0.172, 0.13, 3.5, 26, 1.14 }, { 1, 0.035, 0.085, 0.183, 0.15, 3.5, 24.666666666667, 1.12 }, { 1.05, 0.0375, 0.0855, 0.199, 0.15, 3.5, 24, 1.11 }, { 1.1, 0.04, 0.086, 0.215, 0.15, 3.15, 18, 1.1 }, { 1.2, 0.041, 0.083, 0.2325, 0.25, 2.45, 17, 1.05 }, { 1.3, 0.04, 0.077, 0.25, 0.35, 1.75, 16, 1 }, { 1.5, 0.038, 0.062, 0.29, 0.35, 1.5, 13, 0.9 }, { 1.7, 0.036066666666667, 0.051333333333333, 0.342, 0.210004, 0.9, 12, 0.7 }, { 1.8, 0.0351, 0.046, 0.368, 0.140006, 0.86, 11.4, 0.64 }, { 2, 0.033, 0.039, 0.42, 1.0000000000066e-05, 0.78, 10.2, 0.52 }, { 2.2, 0.032, 0.034, 0.458, 1e-05, 0.7, 9, 0.4 }, { 2.5, 0.028, 0.033, 0.515, 1e-05, 0.7, 9, 0.4 }, { 3, 0.025, 0.033, 0.61, 1e-05, 0.7, 9, 0.4 }, { 3.9, 0.025, 0.033, 0.61, 1e-05, 0.7, 9, 0.4 } }
		},
		engine = {
			ForsRUD = 0.91,
			MaksRUD = 0.85,
			MaxRUD = 1,
			MinRUD = 0,
			Nmg = 60.00001,
			cefor = 2.56,
			cemax = 1.24,
			dcx_eng = 0.0144,
			dpdh_f = 10000,
			dpdh_m = 8700,
			hMaxEng = 19,
			table_data = { { 0, 112700, 174440 }, { 0.2, 117600, 176400 }, { 0.4, 117600, 193060 }, { 0.6, 122500, 225400 }, { 0.7, 122500, 230000 }, { 0.8, 132000, 233000 }, { 0.9, 135000, 236000 }, { 1, 132000, 245000 }, { 1.1, 124000, 248000 }, { 1.2, 120000, 248000 }, { 1.3, 115000, 260000 }, { 1.5, 104000, 288000 }, { 1.8, 97000, 337000 }, { 2, 99000, 348000 }, { 2.2, 104000, 348000 }, { 2.515, 100000, 337000 }, { 3, 127400, 317000 } },
			type = "TurboJet"
		}
	},


	--damage , index meaning see in  Scripts\Aircrafts\_Common\Damage.lua
	Damage = {
	[0]  = {critical_damage = 5,  args = {146}},
	[1]  = {critical_damage = 3,  args = {296}},
	[2]  = {critical_damage = 3,  args = {297}},
	[3]  = {critical_damage = 8,  args = {65}},
	[4]  = {critical_damage = 2,  args = {298}},
	[5]  = {critical_damage = 2,  args = {301}},
	[7]  = {critical_damage = 2,  args = {249}},
	[8]  = {critical_damage = 2,  args = {265}},
	[9]  = {critical_damage = 3,  args = {154}},
	[10] = {critical_damage = 3,  args = {153}},
	[11] = {critical_damage = 1,  args = {167}},
	[12] = {critical_damage = 1,  args = {161}},
	[13] = {critical_damage = 2,  args = {169}},
	[14] = {critical_damage = 2,  args = {163}},
	[15] = {critical_damage = 2,  args = {267}},
	[16] = {critical_damage = 2,  args = {266}},
	[17] = {critical_damage = 2,  args = {168}},
	[18] = {critical_damage = 2,  args = {162}},
	[20] = {critical_damage = 1,  args = {183}},
	[23] = {critical_damage = 5,  args = {223}},
	[24] = {critical_damage = 5,  args = {213}},
	[27] = {critical_damage = 3,  args = {231}},
	[28] = {critical_damage = 3,  args = {221}},
	[29] = {critical_damage = 6,  args = {224}, deps_cells = {23}},
	[30] = {critical_damage = 6,  args = {214}, deps_cells = {24}},
	[35] = {critical_damage = 6,  args = {225}, deps_cells = {23, 29, 27, 37}},
	[36] = {critical_damage = 6,  args = {215}, deps_cells = {24, 30, 28, 38}},
	[37] = {critical_damage = 2,  args = {228}},
	[38] = {critical_damage = 2,  args = {218}},
	[39] = {critical_damage = 2,  args = {244}},
	[40] = {critical_damage = 2,  args = {241}},
	[43] = {critical_damage = 2,  args = {243}, deps_cells = {39, 53}},
	[44] = {critical_damage = 2,  args = {242}, deps_cells = {40, 54}},
	[51] = {critical_damage = 2,  args = {240}},
	[52] = {critical_damage = 2,  args = {238}},
	[53] = {critical_damage = 2,  args = {248}},
	[54] = {critical_damage = 2,  args = {247}},
	[55] = {critical_damage = 2,  args = {159}},
	[58] = {critical_damage = 2,  args = {156}},
	[59] = {critical_damage = 2,  args = {148}},
	[82] = {critical_damage = 2,  args = {152}},
	[83] = {critical_damage = 3, args = {134}}, -- nose wheel
	[84] = {critical_damage = 3, args = {136}}, -- left wheel
	[85] = {critical_damage = 3, args = {135}}, -- right wheel
	},

	DamageParts =
	{
		[1] = "Su_15-oblomok", -- wing R
		[2] = "Su_15-oblomok", -- wing L
	},


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

        [WOLALIGHT_TAXI_LIGHTS] = {
            typename = "Collection",
            lights = {
                [1] = {
                    typename = "Collection",
                    lights = {
                        {
                            typename = "Spot", position = {7.72,  -2.091,  0.0}, direction = {azimuth = math.rad(-10.0), elevation = math.rad(12.0)}, argument = 51,
                            proto = lamp_prototypes.LFS_R_27_180,
                        },
                        {
                            typename = "Spot", position = {3.839, -1.508, 0.0}, direction = {elevation = math.rad(12.0)},
                            proto = lamp_prototypes.LFS_R_27_180,
                        },
                        {
                            typename = "Spot", position = {3.839, -1.508, -0.0}, direction = {elevation = math.rad(12.0)},
                            proto = lamp_prototypes.LFS_R_27_180,
                        },
                        {
                            typename = "Omni", position = {7.72 + 0.25,  -2.091,  0.0}, direction = {azimuth = math.rad(-10.0), elevation = math.rad(12.0)}, argument = 51,
                            proto = lamp_prototypes.LFS_R_27_180, intensity_max = 4.0,
                        },
                        {
                            typename = "Omni", position = {3.839 + 0.25, -1.508, 0.0}, direction = {elevation = math.rad(12.0)},
                            proto = lamp_prototypes.LFS_R_27_180, intensity_max = 4.0,
                        },
                        {
                            typename = "Omni", position = {3.839 + 0.25, -1.508, -0.0}, direction = {elevation = math.rad(12.0)},
                            proto = lamp_prototypes.LFS_R_27_180, intensity_max = 4.0,
                        },
                    },
                },
            }
        },

			[3] = { typename = "collection", -- left nav light
				lights = {
					{typename = "argumentlight",argument = 190}, -- left nav light red
					{typename = "argumentlight",argument = 191}, -- tail nav light white
					{typename = "argumentlight",argument = 192}, -- right nav light green
				},
			},
			[4] = { typename = "collection", -- tail nav light
				lights = {
					{typename = "argumentlight",argument = 200}, -- FORMATION LIGHTS
					{typename = "argumentlight",argument = 201}, -- FORMATION LIGHTS
				}
			},
		},
	}, -- end lights_data

}

add_aircraft(Su_15) --AG
