--mounting 3d model paths and texture paths 

mount_vfs_model_path	(current_mod_path.."/Shapes")
mount_vfs_liveries_path (current_mod_path.."/Liveries")
mount_vfs_texture_path  (current_mod_path.."/Textures/DC3.zip")
mount_vfs_texture_path  (current_mod_path.."/Textures/DC3_NewTextures.zip")
mount_vfs_texture_path  (current_mod_path.."/Textures/")
mount_vfs_sound_path (current_mod_path.."/Sounds")



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

	},
	mapclasskey 		= "P0091000025",
	attribute  			= {wsType_Air, wsType_Airplane, wsType_Fighter, WSTYPE_PLACEHOLDER ,"Battleplanes",},
	Categories 			= {"{78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}", "Interceptor",},	
	-------------------------
	M_empty	=	14461,
		M_nominal	=	24430,
		M_max	=	31055,
		M_fuel_max	=  5864,
		H_max	=	17907,
		average_fuel_consumption	=	0.3,
		CAS_min	=	45,
		V_opt	=	256,
		V_take_off	=	58,
		V_land	=	61,
		has_afteburner	=	false,
		has_speedbrake	=	false,

		
		 nose_gear_pos	= 	{3.95, -3.90,	0},  --{3.95, -3.95,	0},
                 nose_gear_amortizer_direct_stroke    =  0.20 -0.20,  
	         nose_gear_amortizer_reversal_stroke  =  0.20 -0.20,  
	         nose_gear_amortizer_normal_weight_stroke 	= 0.51,    --0.095,  
	         nose_gear_wheel_diameter 	           = 0.615, -- in m

                  main_gear_pos 	= 	{-0.536, -3.00, -2.160}, --{-0.536, -3.15, -2.160}, 
                main_gear_amortizer_direct_stroke =   0.20 -0.20, 
	        main_gear_amortizer_reversal_stroke     =  0.20 -0.20, 
                main_gear_amortizer_normal_weight_stroke 	= 0.514,   
	        main_gear_wheel_diameter 	  =   0.89, -- in m





		radar_can_see_ground	=	false,
		
		AOA_take_off	=	0.14,
		stores_number	=	9,
		bank_angle_max	=	60,
		Ny_min	=	-2,
		Ny_max	=	5.9,
		tand_gear_max	=	0.577,
		V_max_sea_level	=	322,
		V_max_h	=	640,
		tanker_type	=	0,
		wing_area	=	65.24,
		wing_span	=	6.68,
		wing_type = 2,			
		thrust_sum_max	=	16240,
		thrust_sum_ab	=	16240,
		Vy_max	=	253,
		length	=	19.2,
		height	=	5,
		flaps_maneuver	=	1,
		Mach_max	=	2.17,
		range	=	2593,
		RCS	=	7,
		Ny_max_e	=	6,
		detection_range_max	=	100,
		IR_emission_coeff	=	1,
		IR_emission_coeff_ab	=	4,
		engines_count	=	2,
		wing_tip_pos = 	{-1.207,	1.0,	11.80},
		
	engines_nozzles = {
		[1] = 
		{
			pos = 	{-0.73,	1.105,	-3.835},
				elevation	=	0,
				diameter	=	1.523,
				exhaust_length_ab	=	11.794,
				exhaust_length_ab_K	=	0.35,
				smokiness_level     = 	0.1, 
		}, -- end of [1]
		[2] = 
		{
			pos = 	{-0.73,	1.105,	3.835},
				elevation	=	0,
				diameter	=	1.523,
				exhaust_length_ab	=	11.794,
				exhaust_length_ab_K	=	0.35,
				smokiness_level     = 	0.1, 
		}, -- end of [2]
	}, -- end of engines_nozzles



---------------------------------------------------------------------------------
--  equipaggio
---------------------------------------------------------------------------------

	crew_size	 = 10,
	crew_members     = 
	{
			[1] = 
			{	pilot_name          = "pilot_raf", --pilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{3.3,	0.25,	-0.85},
			}, -- end of [1]
			[2] = 
			{	pilot_name          = "pilot_raf", --pilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{2.3,	-0.20,	 -0.85},
		        }, -- end of [2]
                        [3] = 
			{	pilot_name          = "pilot_raf", --pilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-8.0,	-0.20,	 -2.20},
			}, -- end of [3]
			[4] = 
			{	pilot_name          = "pilot_raf", --copilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-8.5,	 -0.20,	  -1.80},
			}, -- end of [4]
                        [5] = 
			{	pilot_name          = "pilot_raf", --pilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-9.0,	-0.20,	 -1.80},
			}, -- end of [5]
			[6] = 
			{	pilot_name          = "pilot_raf", --copilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-9.5,	 -0.20,	  -1.80},
			}, -- end of [6]
                        [7] = 
			{	pilot_name          = "pilot_raf", --pilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-10.0,	-0.20,	 -1.80},
			}, -- end of [7]
			[8] = 
			{	pilot_name          = "pilot_raf", --copilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-10.5,	 -0.20,	  -1.80},
			}, -- end of [8]
			
                        [9] = 
			{	pilot_name          = "pilot_raf", --pilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-11.0,	-0.20,	 -1.80},
			}, -- end of [9]
			[10] = 
			{	pilot_name          = "pilot_raf", --copilot
				ejection_seat_name	=	0,
				drop_canopy_name	=	0,
				pos = 	{-11.5,	 -0.20,	  -1.80},
			}, -- end of [10]





	}, -- end of crew_members
	
	fires_pos = 
	{
		[1] = 	{-2.75, 0.25, 0.25},
		[2] = 	{-0.4, -0.75, 1.4},
		[3] = 	{-1.75, -0.75, -1.4},
		[4] = 	{1.4, -0.4, 2.8},
		[5] = 	{1.55, -0.4, -2.8},
		[6] = 	{3.45, -0.75, 2.4},
		[7] = 	{-2.1, -0.8, -3.5},
		[8] = 	{-10.3, 0.3, -0.25},
	}, -- end of fires_pos
	
	-- Countermeasures
	SingleChargeTotal	 	= 0,
	CMDS_Incrementation 	= 0,
	ChaffDefault 			= 0, 
	ChaffChargeSize 		= 0,
	FlareDefault 			= 0, 
	FlareChargeSize 		= 0,
	CMDS_Edit 				= false,
	chaff_flare_dispenser 	= 
	{
	}, -- end of chaff_flare_dispenser

	--sensors
	
	detection_range_max		 = 60,
	radar_can_see_ground 	 = false, -- 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 = "N-019", -- Radar type
	},
	HumanRadio = {
		frequency = 127.5,  -- Radio Freq
		editable = true,
		minFrequency = 100.000,
		maxFrequency = 156.000,
		modulation = MODULATION_AM

},
mapclasskey = "P0091000024",	
	Guns = {gun_mount("M_2", { count = 002 },{muzzle_pos = {3.10000, -0.300000, -0.450000}})

},
	
	Pylons =     {
        pylon(1, 0, 2.000000, -1.8000, -8.075000,
            {
				use_full_connector_position=true,
            },
            {
               

            }
        ),
		
    },
	
	EPLRS = true,
	Tasks = {
		aircraft_task(GroundAttack),
        aircraft_task(CAS),
        aircraft_task(AFAC),
		aircraft_task(Reconnaissance),
    },	
	DefaultTask = aircraft_task(GroundAttack),

	
	SFM_Data = {
		aerodynamics = -- Cx = Cx_0 + Cy^2*B2 +Cy^4*B4
		{
			Cy0			=	0.1,      -- zero AoA lift coefficient
			Mzalfa		=	4.355,  -- coefficients for pitch agility
			Mzalfadt	=	0.8,    -- coefficients for pitch agility
			kjx			=	2.25,    
			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.012,    -- coefficient, drag, gear 0.0277
			cx_flap		=	0.095,   -- coefficient, drag, full flaps
			cy_flap		=	0.31,    -- 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.024,	0.07,	0.075,	0.12,	0.5,		30,		1.2},
				[2] = 	{0.1,	0.024,	0.07,	0.075,	0.12,	1.5,		30,		1.2},
				[3] = 	{0.2,	0.024,	0.07,	0.075,	0.12,	0.79,		30,		1.2},
				[4] = 	{0.3,	0.0239,	0.073,	0.075,	0.12,	1.24,		30,		1.2},
				[5] = 	{0.4,	0.024,	0.076,	0.075,	0.12,	1.323,		28.7,	1.18},
				[6] = 	{0.5,	0.0235,	0.079,	0.075,	0.12,	1.13,		27.3,	1.16},
				[7] = 	{0.6,	0.025,	0.083,	0.075,	0.125,	0.94,		26,		1.14},
				[8] = 	{0.7,	0.044,	0.085,	0.14,	0.1,	0.67,		24.7,	1.12},
				[9] = 	{0.8,	0.0465,	0.0855,	0.1775,	0.125,	0.57,		24,		1.11},
				[10] = 	{0.9,	0.049,	0.086,	0.215,	0.15,	0.456,		18,		1.1},
				[11] = 	{1.9,	0.049,	0.083,	0.228,	0.17,	0.32,		17,		1.05},
			}, -- end of table_data
			
		}, -- end of aerodynamics
		engine = 
		{
			Nmg	=	20.5, -- RPM at idle
			MinRUD	=	0, -- Min state of the throttle
			MaxRUD	=	1, -- Max state of the throttle
			MaksRUD	=	1, -- Military power state of the throttle
			ForsRUD	=	1, -- Afterburner state of the throttle
			typeng	=	3,
			--[[
				E_TURBOJET = 0
				E_TURBOJET_AB = 1
				E_PISTON = 2
				E_TURBOPROP = 3
				E_TURBOFAN = 4
				E_TURBOSHAFT = 5
			--]]
			
			hMaxEng	=	12.5, -- Max altitude for safe engine operation in km
			dcx_eng	=	0.0085, -- Engine drag coeficient
			cemax	=	0.37, -- not used for fuel calulation , only for AI routines to check flight time ( fuel calculation algorithm is built in )
			cefor	=	0.37, -- not used for fuel calulation , only for AI routines to check flight time ( fuel calculation algorithm is built in )
			dpdh_m	=	2820, --  altitude coefficient for max thrust
			dpdh_f	=	2820,  --  altitude coefficient for AB thrust
			table_data = 
			{		--   M		Pmax		 Pfor	
				{0.0,		100520.0},
				{0.1,		100300.0},
				{0.2,		100040.0},
				{0.3,		20000.0},
				{0.4,		11230.0},
				{0.5,		10300.0},
				{0.6,		10300.0},
				{0.7,		10050.0},
				{0.8,	        14820.0},
				{0.9,		12902.0},
				{1.9,		11469.0}
			}, -- 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 = 15,droppable=false}, --nose
	[1]			= {critical_damage = 15,droppable=false}, -- nose left
	[2]			= {critical_damage = 15,droppable=false}, -- nose right
	[3]			= {critical_damage = 10}, -- cockpit 
 	[4]			= {critical_damage = 15, args = {154},droppable=false},-- cabin left*
	[5]			= {critical_damage = 15, args = {153},droppable=false},-- cabin right*
	[6]			= {critical_damage = 15,droppable=false}, -- cabin bottom
	[9]		 	= {critical_damage = 15, args = {154},droppable=false}, -- fuselage left
	[10]		= {critical_damage = 15, args = {153},droppable=false}, -- fuselage right		
	[11]		= {critical_damage = 8, args = {431,167}},  -- Engine 1 count from left
	[12]		= {critical_damage = 8, args = {430,161}},  -- Engine 2 count from left
	[13]		= {critical_damage = 2},  -- Engine 1 nacelle bottom count from left
	[14]		= {critical_damage = 2},  -- Engine 2 nacelle bottom count from left
	[17]		= {critical_damage = 2},  -- Engine 1 nacelle count from left
	[18]		= {critical_damage = 2},  -- Engine 2 nacelle count from left	
	[23]		= {critical_damage = 20, args = {225}, deps_cells = {25}}, -- wing out left
	[24]		= {critical_damage = 20, args = {215}, deps_cells = {26}},-- wing out right
	[25]		= {critical_damage = 2}, -- eleron left 
	[26]		= {critical_damage = 2}, -- eleron right 
	
	[29]		= {critical_damage = 20, args = {225}, deps_cells = {23, 35, 37}}, -- wing center left 
 	[30]		= {critical_damage = 20, args = {215}, deps_cells = {24, 36, 38}},-- wing center right 
	[35]		= {critical_damage = 20, args = {225}}, -- wing in left* 
	[36]		= {critical_damage = 20, args = {215}}, -- wing in right* 	
	[37]		= {critical_damage = 2}, -- flap in left 
	[38]		= {critical_damage = 2},-- flap in right
 	
	[39]		= {critical_damage = 5,droppable=false}, -- fin top left
	[40]		= {critical_damage = 5,droppable=false}, --fin top right
	[41]		= {critical_damage = 5,droppable=false}, --fin centre left		
	[42] 		= {critical_damage = 5,droppable=false}, --fin centre right	
	[43]		= {critical_damage = 5, args = {243},droppable=false}, -- Vertical stabilizer* fin bottom left
	[44] 		= {critical_damage = 5,droppable=false}, --fin bottom right
	[45]		= {critical_damage = 5, args = {236},droppable=false}, -- stabilizer out left
	[46]		= {critical_damage = 5, args = {234},droppable=false}, -- stabilizer out right
	[47]		= {critical_damage = 5, args = {236},droppable=false}, -- stabilizer in left*
	[48]		= {critical_damage = 5, args = {234},droppable=false}, -- stabilizer in right*
	[49]		= {critical_damage = 2, args = {236},droppable=false},-- elevator out left
	[50]		= {critical_damage = 2, args = {234},droppable=false},-- elevator out right
	[53]		= {critical_damage = 5, args = {247}, deps_cells = {54},droppable=false}, -- rudder left*
	[54]		= {critical_damage = 5, args = {247}, deps_cells = {53},droppable=false}, -- rudder right*
	[55] 		= {critical_damage = 35,args = {81}, deps_cells = {39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50}},--- coda *
	[56]		= {critical_damage = 20,args = {158},droppable=false}, -- - coda a sinistra *
	[57] 		= {critical_damage = 20,args = {157},droppable=false}, -- - coda destra *
	[58] 		= {critical_damage = 20,droppable=false}, --tail bottom
	[59]		= {critical_damage = 15,droppable=false}, -- nose bottom 	
	[82]		= {critical_damage = 20,droppable=false},-- fuselage bottom
	[61]		= {critical_damage = 6}, -- fuel tank left
	[62] 		= {critical_damage = 6}, -- fuel tank right
	},
	DamageParts = 
	{  
		[1] = "dc3-oblomok-wing_r.edm",
		[2] = "dc3-oblomok-wing_l.edm",
		[3] = "DC3-oblomok-tail.edm",
	},
	
	lights_data = {
	typename = "collection",
	lights = {
    [1] = { typename = "collection",
						lights = {-- Left Anticollision Light
								  {typename = "natostrobelight",
								   connector = "WHITE_BEACON L",
								   argument_1 = 195,
								   period = 1.2,
								   phase_shift = 0
								  },
								  -- Right Anticollision Light
								  {typename = "natostrobelight",
								   connector = "WHITE_BEACON R",
								   argument_1 = 196,
								   period = 1.2,
								   phase_shift = 0
								  },
								  -- Tail Anticollision Light
								  {typename = "natostrobelight",
								   connector = "BANO_0_BACK",
								   argument_1 = 192,
								   period = 1.2,
								   phase_shift = 0
								  }
								 }
									  },
	[2] = { typename = "collection",
							lights = {-- Landing light
									  {typename = "spotlight",
									   connector = "MAIN_SPOT_PTR_02",
									   argument = 209,
									   dir_correction = {elevation = math.rad(-1)}
									  },
									  {-- Landing/Taxi light
									   typename = "spotlight",
									   connector = "MAIN_SPOT_PTR_01",
									   argument = 208,
									   dir_correction = {elevation = math.rad(3)}
									  }
									 }
						},
   [3] = { typename = "collection", -- left nav light
				lights = {
					
					
                                        {typename = "natostrobelight", position  = {1.5, 3.2, 0},connector = "TOP_BEACON",argument_1 = 192, period = 1.2,color = {1.0,0.0,0.0},phase_shift = 0},
                                        {typename = "natostrobelight", position  = {-6.5, -3.2, 0},connector = "TOP_BEACON",argument_1 = 190, period = 1.2,color = {1.0,0.0,0.0},phase_shift = 0},
                                        {typename = "natostrobelight", position  = {-14.5, 2.5, 0},connector = "TOP_BEACON",argument_1 = 191, period = 1.2,color = {1, 1, 1},phase_shift = 0},
								  },
									},
    [4] = {	typename = "collection",
				lights = {{typename = "collection",
						   lights = {
									 -- Top Formation Light (white)
									 {typename = "omnilight",
									  connector = "BANO_0_TOP",
									  color = {1, 1, 1},
									 },
									 {typename  = "argumentlight", argument = 202},
									 -- Bottom Formation Light (white)
									 {typename = "omnilight",
									  connector = "BANO_0_BOTTOM",
									  color = {1, 1, 1},
									 },
									 {typename  = "argumentlight", argument = 201},
									}
							},
							-- Tail formation lights
							{typename = "collection",
								lights = {{
										-- Right Tail Formation Light
										typename = "spotlight",
										connector = "BANO_W_HR",
										color = {1.0, 1.0, 1.0},
										intensity_max = 6,
										angle_max = 0.65,
										argument = 205,
										dont_change_color = false,
										angle_change_rate = 0,
										pos_correction = {0.0, 0.0, 0.1},
										dir_correction = {azimuth = math.rad(-3), elevation = math.rad(9)},
									   },
									   {
										-- Left Tail Formation Light
										typename = "spotlight",
										connector = "BANO_W_HL",
										color = {1.0, 1.0, 1.0},
										intensity_max = 6,
										angle_max = 0.65,
										argument = 204,
										dont_change_color = false,
										angle_change_rate = 0,
										pos_correction = {0.0, 0.0, -0.1},
										dir_correction = {azimuth = math.rad(-3), elevation = math.rad(-9)},
									   }
									},
							},
							-- Electroluminescent formation lights
							{typename  = "argumentlight", argument = 200},
                                                 {typename = "natostrobelight", connector = "BANO_1", color = {1,1,1}, argument_1 = 190, period = 1.2, phase_shift = 0},         
                                                 {typename = "natostrobelight", connector = "BANO_2", color = {1,1,1}, argument_1 = 191, period = 1.2, phase_shift = 0},         
                                                 {typename = "natostrobelight", connector = "BANO_0", color = {1,1,1}, argument_1 = 192, period = 1.2, phase_shift = 0},         
						 },
									},
	[5]	= {typename = "collection",
			lights = {
						{typename = "collection",
						lights = {{
								-- Right Nacelle Floodlight
								typename = "spotlight",
								position  = {0.5, 1.2, 0},
								color = {1.0, 1.0, 1.0},
								intensity_max = 6.0,
								angle_max = 0.45,
								direction = {azimuth = math.rad(150), elevation = math.rad(5)},
								dont_change_color = false,
								angle_change_rate = 0
							   },
							   {
								-- Left Nacelle Floodlight
								typename = "spotlight",
								position  = {0.5, 1.2, 0},
								color = {1.0, 1.0, 1.0},
								intensity_max = 6.0,
								angle_max = 0.45,
								direction = {azimuth = math.rad(-150), elevation = math.rad(5)},
								dont_change_color = false,
								angle_change_rate = 0
							   },
							   {typename  = "argumentlight", argument = 212},
						},
					},
					{typename = "collection",
						lights = {{
								-- Left Nose Floodlight
								typename  = "spotlight",
								position  = {0, -0.3, -5.80},
								color = {1.0, 1.0, 1.0},
								intensity_max = 6.0, angle_max = 0.45,
								direction = {azimuth = math.rad(45)},
								argument = 211,
								dont_change_color = false,
								angle_change_rate = 0
							   },
							   {
								-- Right Nose Floodlight
								typename = "spotlight",
								position  = {0, -0.3, 5.80},
								color = {1.0, 1.0, 1.0},
								intensity_max = 6.0,
								angle_max = 0.45,
								direction = {azimuth = math.rad(-45)},
								argument = 210,
								dont_change_color = false,
								angle_change_rate = 0
							   }
						}
					},
					-- UARRSI light
					{
						typename = "omnilight", position  = {6.5, 0.4, 0}, color = {1, 1, 1}
					}
				  },
			}
		}
	},
	--Countries = {},
}


add_aircraft(DC3)
