-------------------------------Patrick et Eric





AS_30L =
{
	category		= CAT_MISSILES,
	name			= "AS_30L",
	user_name		= _("AS_30L"),
	wsTypeOfWeapon 	= {wsType_Weapon, wsType_Missile, wsType_AS_Missile, WSTYPE_PLACEHOLDER},
	scheme			= "AGM-65E",              --"command_guided_spin_missile",   AGM-65E
	class_name		= "wAmmunitionSelfHoming",                          -- "wAmmunitionVikhr",
	model			= "AS_30L",
	 mass = 292,
	
	
	
	 Escort = 1,
        Head_Type = 4,
		sigma = {5, 5, 5},
        M = 286.0,
        H_max = 10000.0,
        H_min = -1,
        Diam = 305.0,
        Cx_pil = 4,
        D_max = 11112.0,
        D_min = 1000.0,
        Head_Form = 0,
        Life_Time = 110,
        Nr_max = 16,
        v_min = 50.0,
        v_mid = 290.0,
        Mach_max = 1.5,
        t_b = 0.0,
        t_acc = 4.0,
        t_marsh = 0.0,
        Range_max = 11112.0,
        H_min_t = 0.0,
        Fi_start = 0.5,
        Fi_rak = 3.14152,
        Fi_excort = 1.05,
        Fi_search = 99.9,
        OmViz_max = 99.9,
        --warhead = warheads["AGM_65E"],
        exhaust = {0.75, 0.75, 0.75, 0.1},
        X_back = -0.879,
        Y_back = -0.155,
        Z_back = 0.0,
        Reflection = 0.063,
        KillDistance = 0.0,
	 
	shape_table_data =
	{
		{
			name	 = "AS_30L",
			file	 = "AS_30L",
			life	 = 1,
			fire	 = { 0, 1},
			username = _("AS_30L"),
			index	 = WSTYPE_PLACEHOLDER,
				
			
		},
	},
	
	
	fm = {
		mass        = 292,  
		caliber     = 0.305,  
		cx_coeff    = {1,0.39,0.38,0.236,1.31},
		L           = 2.49,
		I           = 1 / 12 * 209 * 2.49 * 2.49,
		Ma          = 0.68,
		Mw          = 1.116,
		wind_sigma	= 0.0,--80.0,
		wind_time	= 1000.000000,
		Sw			= 0.55,
		dCydA		= {0.07, 0.036},
		A			= 0.6,
		maxAoa		= 0.23,
		finsTau		= 0.1,
		Kp_ret		= 4.5,
	},
	
	laser_spot_seeker = {
		FOV			= 0.558,
	},
	
	gyro_stabilizier = {
		omega_pid_k	= {50, 30, 0},
		omega_max	= math.rad(8),
		omega_tau	= 0.05,
		gimbal_limit= math.rad(30),
	},
	
	simple_gyrostab_seeker = {
		omega_max	= math.rad(8)
	},
	
	pn_guidance_unit = {
		NR			= 10,
		Ac_lim		= 35
	},
	
	PN_autopilot = {
		Ka			= 0,
		Iarm		= 0,
		K			= 0.014,
		Ki			= 0,
		Kg			= 2.5,
		K_GBias		= 0.26,
		GBiast_st	= 0.5,
	},
	
	march = {
		smoke_color			= {0.8, 0.8, 0.8},
		smoke_transparency	= 0.7,
	},
		
	warhead = predefined_warhead("AGM_65E"),
	warhead_air = predefined_warhead("AGM_65E"),
   
}

declare_weapon(AS_30L)





declare_loadout({
	category 		= CAT_MISSILES,
	CLSID	 		= "{AS_30L}",
	attribute		= AS_30L.wsTypeOfWeapon,
	Count 			= 1,
	Cx_pil			= AS_30L.Cx,
	Picture			= "AS-30L.png",
	displayName		= AS_30L.user_name,
	Weight			= AS_30L.mass,
	Elements  		= {{ShapeName = AS_30L.model}},
	
		
	
	
})

samp_mk_82 = {
	category  = CAT_BOMBS,
	name      = "samp_mk_82",
	model     = "samp_mk_82",
	user_name = _("samp_mk_82"),
	wsTypeOfWeapon = {wsType_Weapon, wsType_Bomb, wsType_Bomb_A, WSTYPE_PLACEHOLDER},
	scheme    = "bomb-common",
        type    = 0,
        mass    = 250,
        hMin    = 100.0,
        hMax    = 12000.0,
        Cx      = 0.00025,
        VyHold  = -100.0,
        Ag      = -1.23,

	fm = {
            mass            = 250,
            caliber         = 0.273000,
            cx_coeff        = {1.000000, 0.290000, 0.710000, 0.140000, 1.280000},
            L               = 2.210000,
            I               = 94.425933,
            Ma              = 2.746331,
            Mw              = 2.146083,
            wind_time       = 1000.000000,
            wind_sigma      = 80.000000,
    },
  
	warhead = {
		mass                 = 25,
		expl_mass            = 25,
		other_factors        = {1, 1, 1},
		obj_factors          = {1, 1},
		concrete_factors     = {1, 1, 1},
		cumulative_factor    = 0,
		concrete_obj_factor  = 0,
		cumulative_thickness = 0,
		piercing_mass        = 5,
		caliber              = 200,
	},

	-- velK is calibrated to get arming time of 0.8 seconds at initial bomb speed of 150 m/s (540 km/h)
	arming_vane = {enabled = true, velK = 0.00834},
	-- overriding default setting (delay is enabled for all bombs by default)
	arming_delay = {enabled = false, delay_time = 0},
	
	shape_table_data = {
		{
			name     = "samp_mk_82",
			file     = "samp_mk_82",
			life     = 1,
			fire     = {0, 1},
			username = "samp_mk_82",
			index    = WSTYPE_PLACEHOLDER,
		},
	},
 
	targeting_data = {
		char_time = 20.87, -- characteristic time for sights 
	},
}
declare_weapon(samp_mk_82)

declare_loadout(
{
	category 		= CAT_BOMBS,
	CLSID	 		= "{samp_mk_82}",
	attribute		= samp_mk_82.wsTypeOfWeapon,
   -- attribute	= {wsType_Weapon, wsType_Bomb, wsType_Container, WSTYPE_PLACEHOLDER},
	--wsTypeOfWeapon	=	{4,	5,	9,	31},
	Count 			= 1,
	Cx_pil			= samp_mk_82.Cx,
	Picture			= "br250.png",		-- TODO: "FAB50.png",
	displayName		= samp_mk_82.user_name,
	Weight			=samp_mk_82.mass,
	Elements  = {
		{
			ShapeName = "samp_mk_82",
		}, 
	},
}
)



samp_type21 = {
	category  = CAT_BOMBS,
	name      = "samp_type21",
	model     = "samp_type21",
	user_name = _("samp_type21"),
	wsTypeOfWeapon = {wsType_Weapon, wsType_Bomb, wsType_Bomb_A, WSTYPE_PLACEHOLDER},
	scheme    = "bomb-common",
        type    = 0,
        mass    = 400,
        hMin    = 200.0,
        hMax    = 12000.0,
        Cx      = 0.00035,
        VyHold  = -100.0,
        Ag      = -1.23,

	fm = {
            mass            = 400,
            caliber         = 0.356000,
            cx_coeff        = {1.000000, 0.290000, 0.710000, 0.130000, 1.280000},
            L               = 3.000000,
            I               = 340.500000,
            Ma              = 2.746331,
            Mw              = 2.146083,
            wind_time       = 1000.000000,
            wind_sigma      = 150.000000,
    },
  
	warhead = {
		mass                 = 51,
		expl_mass            = 51,
		other_factors        = {1, 1, 1},
		obj_factors          = {1, 1},
		concrete_factors     = {1, 1, 1},
		cumulative_factor    = 0,
		concrete_obj_factor  = 0,
		cumulative_thickness = 0,
		piercing_mass        = 5,
		caliber              = 200,
	},

	-- velK is calibrated to get arming time of 0.8 seconds at initial bomb speed of 150 m/s (540 km/h)
	arming_vane = {enabled = true, velK = 0.00834},
	-- overriding default setting (delay is enabled for all bombs by default)
	arming_delay = {enabled = false, delay_time = 0},
	
	shape_table_data = {
		{
			name     = "samp_type21",
			file     = "samp_type21",
			life     = 1,
			fire     = {0, 1},
			username = "samp_type21",
			index    = WSTYPE_PLACEHOLDER,
		},
	},
 
	targeting_data = {
		char_time = 20.87, -- characteristic time for sights 
	},
}
declare_weapon(samp_type21)

declare_loadout(
{
	category 		= CAT_BOMBS,
	CLSID	 		= "{samp_type21}",
	attribute		= samp_type21.wsTypeOfWeapon,
   -- attribute	= {wsType_Weapon, wsType_Bomb, wsType_Container, WSTYPE_PLACEHOLDER},
	--wsTypeOfWeapon	=	{4,	5,	9,	31}, 
	Count 			= 1,
	Cx_pil			= samp_type21.Cx,
	Picture			= "br500.png",		-- TODO: "FAB50.png",
	displayName		= samp_type21.user_name,
	Weight			= samp_type21.mass,
	Elements  = {
		{
			ShapeName = "samp_type21",
		}, 
	},
}
)



























