dofile("Scripts/Database/wsTypes.lua")

local GALLON_TO_KG = 3.785 * 0.8
local INCHES_TO_M = 0.0254
local POUNDS_TO_KG = 0.453592

local tracer_on_time = 0.01
local barrel_smoke_level = 1.0
local barrel_smoke_opacity = 0.1

local LWL_12_MPP = {
	category			= CAT_ROCKETS,
	name				= "LWL_MPP",
	user_name			= "LWL_MPP",
	wsTypeOfWeapon		= {wsType_Weapon,wsType_NURS,wsType_Rocket,WSTYPE_PLACEHOLDER},
	scheme 				= "nurs-standard",
	model 				= "hydra_m282",

        fm = 
        {
            mass        = 12.4,   -- start weight, kg
            caliber     = 0.07, -- Caliber, meters 
            cx_coeff    = { 1, 1.5, 0.68, 0.7, 1.75 },  -- Cx
            L           = 1.472, --Length, meters
            I           = 2.2390101333333, -- moment of inertia
            Ix          = 6, -- not used???
            Ma          = 0.23322, -- dependence moment coefficient of  by  AoA
            Mw          = 2.177036, --  dependence moment coefficient by angular speed
            shapeName   = "",
            
            wind_time   = 1.1, -- dispersion coefficient
            wind_sigma  = 5, -- dispersion coefficient
        },

        engine =
        {
            fuel_mass   = 3.175, -- Fuel mass, kg
            impulse     = 210, -- Specific impulse, sec
            boost_time  = 0, -- Time of booster action
            work_time   = 1.1, -- Time of mid-flight engine action
            boost_factor= 1, -- Booster to cruise trust ratio
            nozzle_position = {{ -0.65, 0, 0 }}, -- meters
            tail_width  = 0.052, -- contrail thickness 
            boost_tail  = 1,
            work_tail   = 1,

            smoke_color = { 0.5, 0.474, 0.443 },
			smoke_transparency = 0.5,
        },

	warhead	=
	{
		mass	= 6.2,
		expl_mass = 0.44,
		other_factors = { 1.17, 1.17, 1.17 },
		concrete_factors = { 1.17, 1.17, 0.1 },
		concrete_obj_factor = 0.5,
		obj_factors = { 1.17, 1.17 },
		cumulative_factor= 0,
		cumulative_thickness = 0,
		piercing_mass			= 6.2,
	},

	shape_table_data =
	{
		{
			file		 = "hydra_m282",
			life		 = 1,
			fire		 = {0, 1},
			username = "LWL_MPP",
			index = WSTYPE_PLACEHOLDER,
		},
	},

	properties =
	{
		dist_min = 500,
		dist_max = 4000,
	}
}

declare_weapon(LWL_12_MPP) -- Obsolete, retained for reference now useing DCS core M282 MPP ("weapons.nurs.HYDRA_70_M282")

declare_loadout({ 						--ANDR0ID, this loadout allows the mod defined MPP rockets to be in a mixed configuration by assigning them a CLSID for use in a different loadout
	category 			= CAT_ROCKETS, 
	CLSID	 			= "{M282_MPP}",
	Picture				= "lwltwelve.png",
	Cx_pil				= 0.001708984375,
	displayName			= "Hydra, M282, MPP",
	Weight				= 12.4,
	Weight_Empty		= 12.4,
	Count				= 1,
	kind_of_shipping	= 0,
	attribute			= {wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon = "weapons.nurs.HYDRA_70_M282", --LWL_12_MPP.wsTypeOfWeapon,
	Elements			= {{ ShapeName = "hydra_m282", },
	}
})

declare_loadout({
	category 			= CAT_ROCKETS,
	CLSID	 			= "{LWL_12_M282_MPP}",
	Picture				= "lwltwelve.png",
	Cx_pil				= 0.0015869140625,
	displayName			= "LWL-12 pod - 12 x2.75'' Hydra, M282, MPP",
	Weight				= (63 + (27*12)) * POUNDS_TO_KG,
	Weight_Empty		= 63 * POUNDS_TO_KG,
	Count				= 12,
	kind_of_shipping	= 0,
	attribute			= {4, 7, 32, WSTYPE_PLACEHOLDER}, --{wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon      = "weapons.nurs.HYDRA_70_M282",
	Elements			= {{ ShapeName = "LWL_12", IsAdapter = true, },
	{ ShapeName = "hydra_m282", connector_name = "tube_01", },
	{ ShapeName = "hydra_m282", connector_name = "tube_02", },
	{ ShapeName = "hydra_m282", connector_name = "tube_03", },
	{ ShapeName = "hydra_m282", connector_name = "tube_04", },
	{ ShapeName = "hydra_m282", connector_name = "tube_05", },
	{ ShapeName = "hydra_m282", connector_name = "tube_06", },
	{ ShapeName = "hydra_m282", connector_name = "tube_07", },
	{ ShapeName = "hydra_m282", connector_name = "tube_08", },
	{ ShapeName = "hydra_m282", connector_name = "tube_09", },
	{ ShapeName = "hydra_m282", connector_name = "tube_10", },
	{ ShapeName = "hydra_m282", connector_name = "tube_11", },
	{ ShapeName = "hydra_m282", connector_name = "tube_12", },
	}
})

local LWL_12_RP = {
	category			= CAT_ROCKETS,
	name				= "LWL_RP",
	user_name			= "LWL_RP",
	wsTypeOfWeapon		= {wsType_Weapon,wsType_NURS,wsType_Rocket,WSTYPE_PLACEHOLDER},
	scheme 				= "nurs-marker",
	model 				= "hydra_m156",

        fm = 
        {
            mass        = 12.4,   -- start weight, kg
            caliber     = 0.07, -- Caliber, meters 
            cx_coeff    = { 1, 1.5, 0.68, 0.7, 1.75 },  -- Cx
            L           = 1.472, --Length, meters
            I           = 2.2390101333333, -- moment of inertia
            Ix          = 6, -- not used???
            Ma          = 0.23322, -- dependence moment coefficient of  by  AoA
            Mw          = 2.177036, --  dependence moment coefficient by angular speed
            shapeName   = "",
            
            wind_time   = 1.1, -- dispersion coefficient
            wind_sigma  = 5, -- dispersion coefficient
        },

        engine =
        {
            fuel_mass   = 3.175, -- Fuel mass, kg
            impulse     = 210, -- Specific impulse, sec
            boost_time  = 0, -- Time of booster action
            work_time   = 1.1, -- Time of mid-flight engine action
            boost_factor= 1, -- Booster to cruise trust ratio
            nozzle_position = {{ -0.65, 0, 0 }}, -- meters
            tail_width  = 0.052, -- contrail thickness 
            boost_tail  = 1,
            work_tail   = 1,

            smoke_color = { 0.5, 0.474, 0.443 },
			smoke_transparency = 0.5,
        },

	warhead = {
			caliber = 70,
			color = { .28, 0.0, 0.0 }, --.5, 0.02, 0.02
			duration = 40,
			expl_mass = 1.752,
			fantom = 1,
			flare = false,
			intensity = 3,
			length = 0.412,
			mass = 4.38,
			piercing_mass = 0.876,
			transparency = 0.8
		},

	shape_table_data =
	{
		{
			file		 = "hydra_m156",
			life		 = 1,
			fire		 = {0, 1},
			username = "LWL_RP",
			index = WSTYPE_PLACEHOLDER,
		},
	},

	properties =
	{
		dist_min = 500,
		dist_max = 4000,
	}
}

declare_weapon(LWL_12_RP)

declare_loadout({ 						--ANDR0ID, this loadout allows the mod defined MPP rockets to be in a mixed configuration by assigning them a CLSID for use in a different loadout
	category 			= CAT_ROCKETS, 
	CLSID	 			= "{M156_RP}",
	Picture				= "lwltwelve.png",
	Cx_pil				= 0.001708984375,
	displayName			= "Hydra, M156, RP",
	Weight				= 12.4,
	Weight_Empty		= 12.4,
	Count				= 1,
	kind_of_shipping	= 0,
	attribute			= {4, 7, 32, WSTYPE_PLACEHOLDER}, --{wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon = LWL_12_RP.wsTypeOfWeapon,
	Elements			= {{ ShapeName = "hydra_m156", },
	}
})

declare_loadout({
	category 			= CAT_ROCKETS,
	CLSID	 			= "{LWL_12_SMOKE_MPP}",
	Picture				= "lwltwelve.png",
	Cx_pil				= 0.0015869140625,
	displayName			= "LWL-12 pod - 12 x2.75'' Hydra, 3 xM264 Red Phosphorus Smoke / 9 xM282 MPP",
	Weight				= (63 + (27*12)) * POUNDS_TO_KG,
	Weight_Empty		= 63 * POUNDS_TO_KG,
	Count				= 12,
	kind_of_shipping	= 0,
	attribute			= {4, 7, 32, WSTYPE_PLACEHOLDER}, --{wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon      = "weapons.nurs.HYDRA_70_M282",
	Elements			= {{ ShapeName = "LWL_12", IsAdapter = true, },
	{ connector_name = "tube_01", payload_CLSID = "{M156_RP}"},
	{ connector_name = "tube_02", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_03", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_04", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_05", payload_CLSID = "{M156_RP}"},
	{ connector_name = "tube_06", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_07", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_08", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_09", payload_CLSID = "{M156_RP}"},
	{ connector_name = "tube_10", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_11", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_12", payload_CLSID = "{M282_MPP}"},
	}
})

declare_loadout({
	category 			= CAT_ROCKETS,
	CLSID	 			= "{LWL_12_SMOKE2_MPP}",
	Picture				= "lwltwelve.png",
	Cx_pil				= 0.0015869140625,
	displayName			= "LWL-12 pod - 12 x2.75'' Hydra, 3 xM274 White Phosphorus Smoke / 9 xM282 MPP",
	Weight				= (63 + (27*12)) * POUNDS_TO_KG,
	Weight_Empty		= 63 * POUNDS_TO_KG,
	Count				= 12,
	kind_of_shipping	= 0,
	attribute			= {wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon      = "weapons.nurs.HYDRA_70_M282", 
	Elements			= {{ ShapeName = "LWL_12", IsAdapter = true, },
	{ connector_name = "tube_01", payload_CLSID = "{M274_HYDRA}"},
	{ connector_name = "tube_02", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_03", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_04", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_05", payload_CLSID = "{M274_HYDRA}"},
	{ connector_name = "tube_06", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_07", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_08", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_09", payload_CLSID = "{M274_HYDRA}"},
	{ connector_name = "tube_10", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_11", payload_CLSID = "{M282_MPP}"},
	{ connector_name = "tube_12", payload_CLSID = "{M282_MPP}"},
	}
})
---------------------------------------------------------------------
--[[local DAGR_APKWS =
{
	category		= CAT_MISSILES,
	name			= "DAGR_APKWS_M282",
	user_name		= "DAGR_APKWS_M282",
	scheme			= "AGM-114K",
	class_name		= "wAmmunitionLaserHoming",
	model			= "AGR_20",
	wsTypeOfWeapon 	= {wsType_Weapon, wsType_Missile, wsType_AS_Missile, WSTYPE_PLACEHOLDER},
	
	Escort = 1,
    Head_Type = 4,
	sigma = {1, 1, 1},
	mass = 15,
    M = 15,
    H_max = 5000.0,
    H_min = 1.0,
    Diam = 70.0,
	Cx_pil			= 0.00244140625,
	D_max			= 5000.0,
	D_min			= 1000.0,
	Head_Form		= 1,
	Life_Time		= 90.0,
	Nr_max			= 25,
	v_min			= 140.0,
	v_mid			= 350.0,
	Mach_max		= 3.0,
	t_b				= 0.0,
	t_acc			= 0.0,
	t_marsh			= 1.1,
	Range_max		= 5000.0,
	H_min_t			= 15.0,
	Fi_start		= 0.4,
	Fi_rak			= 3.14152,
	Fi_excort		= 1.05,
	Fi_search		= 0.7,
	OmViz_max		= 0.35,
	exhaust			= {0.78, 0.78, 0.78, 0.3};
	X_back			= -2.0,
	Y_back			= -0.0,
	Z_back			= 0.0,
	Reflection		= 0.01,
	KillDistance	= 0.0,
	
	warhead		= predefined_warhead("HYDRA_70_M282"),
	warhead_air = predefined_warhead("HYDRA_70_M282"),

	controller = {
		boost_start = 0, --Start time for boose phase of rocket motor, 0 = immediate start 
		march_start = 0, --Start time for the march phase of the rocket motor, 0 = immediate start 
	},
	
	boost = {
		impulse								= 0, --Impulse by the boost phase of the rocket motor 
		fuel_mass							= 0, --Mass of fuel for boost phase 
		work_time							= 0.1, --Duration of boost phase in seconds 
		nozzle_position						= {{-0.95, 0, 0}}, --Position of rocket nozzle in local cord system 
		nozzle_orientationXYZ				= {{0.0, 0.0, 0.0}}, --Nozzle orienation in radians?
		nozzle_exit_area 					= 0.0132, --Exit area of the nozzle 
		tail_width							= 0.052, -- Width of rocket tail 
		smoke_color							= {0.5, 0.474, 0.443},
		smoke_transparency					= 0.5,
		custom_smoke_dissipation_factor		= 0.2,	
	},
	
	march = {
		fuel_mass   			= 3.175, -- Fuel mass of march phase of rocket motor 
		impulse     			= 210, --Impulse generate by the march phase of rocket motor 
		boost_time  			= 0, --Time to wait before starting the march phase 
		work_time   			= 1.1, --Duration of march phase  
		boost_factor			= 1,
		nozzle_position 	    = {{-0.95, 0, 0}},
		nozzle_orientationXYZ   = {{0, 0, 0}},
		tail_width  			= 0.052,
		boost_tail  			= 1,
		work_tail   			= 1,
		smoke_color				= {0.5, 0.474, 0.443},
		smoke_transparency		= 0.5,
		custom_smoke_dissipation_factor		= 0.2,		
	},
	
	fm = {
		mass				= 15,  
		caliber				= 0.07,  
		wind_sigma			= 5.0,
		wind_time			= 1.1,
		tail_first			= 0,
		fins_part_val		= 0,
		rotated_fins_inp	= 0,
		delta_max			= math.rad(20),
		draw_fins_conv		= {math.rad(90),1,1},
		L					= 0.181,
		S					= 0.04,
		Ix					= 0.24,
		Iy					= 9.8,
		Iz					= 9.8,
		
		Mxd					= 0.04 * 57.3,
		Mxw					= -15.8,

		table_scale	= 0.2,
		table_degree_values = 1,
	--	Mach	  | 0.0		0.2		0.4		0.6		0.8		1.0		1.2		1.4		1.6		1.8		2.0		2.2	  |
		Cx0 	= {	0.1,	0.1,	0.1,	0.1,	0.12,	0.3,	0.45,	0.45,	0.451,	0.456,	0.44,	0.4 }, --Drag coefficient
		CxB 	= {	0.019,	0.019,	0.019,	0.019,	0.02,	0.066,	0.081,	0.072,	0.072,	0.061,	0.051,	0.057 }, --Induced drag coefficient 
		K1		= { 0.00041,0.00041,0.00041,0.00041,0.00041,0.00052,0.00044,0.00042,0.0004,0.0003,0.0002,0.00015 }, --Lift curve slope 
		K2		= {-0.00024,-0.00024,-0.00024,-0.00024,-0.00018,0.00005,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001 }, --Lift curve curvature
		Cya		= { 0.209,	0.209,	0.209,	0.209,	0.209,	0.244,	0.224,	0.205,	0.191,	0.178,	0.169,	0.161 }, --Side force coefficient
		Cza		= { 0.209,	0.209,	0.209,	0.209,	0.209,	0.244,	0.224,	0.205,	0.191,	0.178,	0.169,	0.161 }, --Vertical force coefficient 
		Mya		= {-0.185,	-0.185,	-0.185,	-0.185,	-0.19,	-0.2,	-0.211,	-0.21,	-0.2,	-0.19,	-0.17,	-0.15 }, --Roll moment coefficient
		Mza		= {-0.185,	-0.185,	-0.185,	-0.185,	-0.19,	-0.2,	-0.211,	-0.21,	-0.2,	-0.19,	-0.17,	-0.15 }, --Pitch moment coefficient
		Myw		= {-15.556,	-15.556,-15.556,-15.556,-16.321,-19.722,-19.702,-19.65,-19.515,-18.88,-17.748,-16.224 }, --Roll damping moment due to angualar velocity 
		Mzw		= {-15.556,	-15.556,-15.556,-15.556,-16.321,-19.722,-19.702,-19.65,-19.515,-18.88,-17.748,-16.224 }, --Pitch damping moment due to annular velocity 
		A1trim	= { 14.1,	14.1,	14.1,	14.1,	14.1,	15.1,	12.6,	10.8,	9.8,	9.1,	8.6,	8.3 }, --Pith trim coefficient 
		A2trim	= { 14.1,	14.1,	14.1,	14.1,	14.1,	15.1,	12.6,	10.8,	9.8,	9.1,	8.6,	8.3 }, --Roll trim coefficient
		
		model_roll = math.rad(45),
		fins_stall = 0,
	},
	
	sensor = {
		FOV					= math.rad(10),
		max_seeker_range	= 13000,
	},
	
	gimbal = {
		delay				= 0,
		op_time				= 45,
		pitch_max			= math.rad(30), --30
		yaw_max				= math.rad(30), --30
		max_tracking_rate	= math.rad(15), --15
		tracking_gain		= 50, --50
	},

	autopilot = {
		delay				= 0.2, --0.2 --Autopilot delay 
		op_time				= 45, --Operating time of autopilot 
		dV_dt				= 20, --Rate of change of velociy 
		Knav				= 12, --Navigation gain 
		Kbias				= 2, --Bias gain 
		Kloft				= 2, --Loft gain
		Kloss				= 2, --Loss gain 
		Tf					= 0.2, -- time constant 
		Kd					= 150, --Derivative gain 
		Ki					= 1, --Integral gain 
		Kdx					= 0.2, --Detivative crossfeed gain 
		Kix					= 0.8, --Integral crossfeed gain
		null_roll			= math.rad(45),
		gload_limit			= 10,
		fins_limit			= math.rad(20),
		fins_limit_x		= math.rad(10),
	},
	
	actuator = {
		Tf					= 0.1,--0.005
		D					= 250.0,
		T1					= 0.002,
		T2					= 0.006,
		max_omega			= math.rad(400),
		max_delta			= math.rad(20),
		fin_stall			= 1,
		sim_count			= 4,
	},
}
declare_weapon(DAGR_APKWS)]]--Obsolete, retained for future reference 

declare_loadout({
	category 			= CAT_ROCKETS,
	CLSID	 			= "{DAGR_4_APKWS}",
	Picture				= "apu4.png",
	Cx_pil				= 0.001,
	displayName			= "DAGR pod - 4 x2.75'' Hydra M282 MPP APKWS",
	Weight				= ((13 + (32*4)) * POUNDS_TO_KG),
	Weight_Empty		= 13 * POUNDS_TO_KG,
	Count				= 4,
	kind_of_shipping	= 0,
	attribute			= {wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements			= {{ ShapeName = "DAGR_Launcher", IsAdapter = true, },
	{ ShapeName = "AGR_20", connector_name = "tube_01", },
	{ ShapeName = "AGR_20", connector_name = "tube_02", },
	{ ShapeName = "AGR_20", connector_name = "tube_03", },
	{ ShapeName = "AGR_20", connector_name = "tube_04", },
	}
})

--Loadouts

declare_loadout({
	category 			= CAT_ROCKETS,
	CLSID	 			= "{LAU_61_AGR_20_APKWS}",
	Picture				= "lau61.png",
	Cx_pil				= 0.00146484375,
	displayName			= "SEAHAWK - 19 x 2.75'' Hydra, Laser Guided Rkts, M282, MPP APKWS",
	Weight				= (87 + (32*19)) * POUNDS_TO_KG,
	Weight_Empty		= 87 * POUNDS_TO_KG,
	Count				= 19,
	kind_of_shipping	= 0,
	attribute			= {wsType_Weapon, wsType_Missile, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements			= {	{ ShapeName = "lau-61", IsAdapter = true, },
	{ ShapeName = "AGR_20", connector_name = "tube_01", },
	{ ShapeName = "AGR_20", connector_name = "tube_02", },
	{ ShapeName = "AGR_20", connector_name = "tube_03", },
	{ ShapeName = "AGR_20", connector_name = "tube_04", },
	{ ShapeName = "AGR_20", connector_name = "tube_05", },
	{ ShapeName = "AGR_20", connector_name = "tube_06", },
	{ ShapeName = "AGR_20", connector_name = "tube_07", },
	{ ShapeName = "AGR_20", connector_name = "tube_08", },
	{ ShapeName = "AGR_20", connector_name = "tube_09", },
	{ ShapeName = "AGR_20", connector_name = "tube_10", },
	{ ShapeName = "AGR_20", connector_name = "tube_11", },
	{ ShapeName = "AGR_20", connector_name = "tube_12", },
	{ ShapeName = "AGR_20", connector_name = "tube_13", },
	{ ShapeName = "AGR_20", connector_name = "tube_14", },
	{ ShapeName = "AGR_20", connector_name = "tube_15", },
	{ ShapeName = "AGR_20", connector_name = "tube_16", },
	{ ShapeName = "AGR_20", connector_name = "tube_17", },
	{ ShapeName = "AGR_20", connector_name = "tube_18", },
	{ ShapeName = "AGR_20", connector_name = "tube_19", },
	}
})

declare_loadout({
	category 			= CAT_ROCKETS,
	CLSID	 			= "M261_APKWS_MPP",
	Picture				= "LAU61.png",
	Cx_pil				= 0.00146484375,
	displayName			= "M261 pod - 19 x 2.75'' Hydra, Laser Guided Rkts, M282, MPP APKWS",
	Weight				= (87 + (32*19)) * POUNDS_TO_KG,
	Weight_Empty		= 87 * POUNDS_TO_KG,
	Count				= 19,
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	attribute			= {4,	4,	32,	WSTYPE_PLACEHOLDER},
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements			= {	{ ShapeName = "M261", IsAdapter = true, },
	{ ShapeName = "AGR_20", connector_name = "tube_1", },
	{ ShapeName = "AGR_20", connector_name = "tube_2", },
	{ ShapeName = "AGR_20", connector_name = "tube_3", },
	{ ShapeName = "AGR_20", connector_name = "tube_4", },
	{ ShapeName = "AGR_20", connector_name = "tube_5", },
	{ ShapeName = "AGR_20", connector_name = "tube_6", },
	{ ShapeName = "AGR_20", connector_name = "tube_7", },
	{ ShapeName = "AGR_20", connector_name = "tube_8", },
	{ ShapeName = "AGR_20", connector_name = "tube_9", },
	{ ShapeName = "AGR_20", connector_name = "tube_10", },
	{ ShapeName = "AGR_20", connector_name = "tube_11", },
	{ ShapeName = "AGR_20", connector_name = "tube_12", },
	{ ShapeName = "AGR_20", connector_name = "tube_13", },
	{ ShapeName = "AGR_20", connector_name = "tube_14", },
	{ ShapeName = "AGR_20", connector_name = "tube_15", },
	{ ShapeName = "AGR_20", connector_name = "tube_16", },
	{ ShapeName = "AGR_20", connector_name = "tube_17", },
	{ ShapeName = "AGR_20", connector_name = "tube_18", },
	{ ShapeName = "AGR_20", connector_name = "tube_19", },
	}
})

declare_loadout({
	category 			= CAT_ROCKETS,
	CLSID	 			= "{LWL_12_M282__APKWS_MPP}",
	Picture				= "lwltwelve.png",
	Cx_pil				= 0.0015869140625,
	displayName			= "LWL-12 pod - 12 x 2.75'' Hydra, Laser Guided Rkts, M282, MPP APKWS",
	Weight				= (63 + (32*12)) * POUNDS_TO_KG,
	Weight_Empty		= 63 * POUNDS_TO_KG,
	Count				= 12,
	kind_of_shipping	= 0,
	attribute			= {wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements			= {{ ShapeName = "LWL_12", IsAdapter = true, },
	{ ShapeName = "AGR_20", connector_name = "tube_01", },
	{ ShapeName = "AGR_20", connector_name = "tube_02", },
	{ ShapeName = "AGR_20", connector_name = "tube_03", },
	{ ShapeName = "AGR_20", connector_name = "tube_04", },
	{ ShapeName = "AGR_20", connector_name = "tube_05", },
	{ ShapeName = "AGR_20", connector_name = "tube_06", },
	{ ShapeName = "AGR_20", connector_name = "tube_07", },
	{ ShapeName = "AGR_20", connector_name = "tube_08", },
	{ ShapeName = "AGR_20", connector_name = "tube_09", },
	{ ShapeName = "AGR_20", connector_name = "tube_10", },
	{ ShapeName = "AGR_20", connector_name = "tube_11", },
	{ ShapeName = "AGR_20", connector_name = "tube_12", },
	}
})

declare_loadout({
	category 			= CAT_ROCKETS,
	CLSID	 			= "{M260_M282__APKWS_MPP}",
	Picture				= "LAU68.png",
	Cx_pil				= 0.001708984375,
	displayName			= "M260 pod - 7 x 2.75'' Hydra, Laser Guided Rkts, M282, MPP APKWS",
	Weight				= (25 + (32*7)) * POUNDS_TO_KG,
	Weight_Empty		= 25 * POUNDS_TO_KG,
	Count				= 7,
	kind_of_shipping	= 0,
	attribute			= {wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements			= {{ ShapeName = "M260", IsAdapter = true, },
	{ ShapeName = "AGR_20", connector_name = "tube_1", },
	{ ShapeName = "AGR_20", connector_name = "tube_2", },
	{ ShapeName = "AGR_20", connector_name = "tube_3", },
	{ ShapeName = "AGR_20", connector_name = "tube_4", },
	{ ShapeName = "AGR_20", connector_name = "tube_5", },
	{ ShapeName = "AGR_20", connector_name = "tube_6", },
	{ ShapeName = "AGR_20", connector_name = "tube_7", },
	}
})

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{LAU131_M282__APKWS_MPP}",
	Picture				= "LAU68.png",
	Cx_pil				= 0.0015869140625,
	displayName			= "LAU-131 pod - 7 x 2.75'' Hydra, Laser Guided Rkts, M282, MPP APKWS",
	Weight				= (25 + (32*7)) * POUNDS_TO_KG,
	Weight_Empty		= 25 * POUNDS_TO_KG,
	Count				= 7,
	kind_of_shipping	= 0,
	attribute			= {wsType_Weapon, wsType_NURS, wsType_Container, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements			= {{ ShapeName = "lau-131", IsAdapter = true, },
	{ ShapeName = "AGR_20", connector_name = "tube_01", },
	{ ShapeName = "AGR_20", connector_name = "tube_02", },
	{ ShapeName = "AGR_20", connector_name = "tube_03", },
	{ ShapeName = "AGR_20", connector_name = "tube_04", },
	{ ShapeName = "AGR_20", connector_name = "tube_05", },
	{ ShapeName = "AGR_20", connector_name = "tube_06", },
	{ ShapeName = "AGR_20", connector_name = "tube_07", },
	}
})
---------------------------------------------------------------------


