-- Type 055 Destroyer by Currenthill
 
GT = {};
GT_t.ws = 0;

set_recursive_metatable(GT, GT_t.generic_ship)

GT.visual = {}
GT.visual.shape = "Type055"
GT.visual.shape_dstr = ""

GT.animation_arguments.radar1_rotation = 12; 
GT.radar1_period = 2;
GT.animation_arguments.luna_lights = -1;

GT.animation_arguments.flag_animation = 11;
GT.animation_arguments.water_propeller = 30;
GT.animation_arguments.flight_deck_fences = 150

GT.life = 2750;
GT.mass = 0.86e+006;
GT.max_velocity = 15.4 
GT.race_velocity = 15.4
GT.economy_velocity = 7.202
GT.economy_distance = 9.3e+006
GT.race_distance = 4.6e+006
GT.shipLength = 180.0
GT.Width = 20
GT.Height = 43.0
GT.Length = 180.0
GT.DeckLevel = 8
GT.X_nose = 95.0
GT.X_tail = -85.0
GT.Tail_Width = 18
GT.Gamma_max = 0.35
GT.Om = 0.05
GT.speedup = 0.24
GT.R_min = 345.6
GT.distFindObstacles = 568.4
GT.RCS = 85000 

GT.numParking = 1
GT.Plane_Num_ = 0
GT.Helicopter_Num_ = 1

GT.Landing_Point = {-75.0, 6.5, 0.0}

GT.airWeaponDist = 250000
GT.airFindDist = 500000

GT.DM = {

    { area_name = "NOSE_L",  area_arg = 70, area_life = 1000, area_fire = { pos = {75.0, 8.0, -4.5}, size = 0.8}},
    { area_name = "NOSE_R",  area_arg = 71, area_life = 1000, area_fire = { pos = {70.0, 8.0, 4.5}, size = 0.8}}, 
    { area_name = "BORT_L",  area_arg = 72, area_life = 1200, area_fire = { pos = {-5.0, 15.0, -3.5}, size = 0.8}},
    { area_name = "BORT_R",  area_arg = 73, area_life = 1200, area_fire = { pos = {5.0,  15.0, 3.5}, size = 0.8}}, 
    { area_name = "KORMA_L", area_arg = 74, area_life = 1000, area_fire = { pos = {-45.0, 7.0, -2.5}, size = 0.8}},
    { area_name = "KORMA_R", area_arg = 75, area_life = 1000, area_fire = { pos = {-35.0, 7.0, 2.5}, size = 0.8}},	
    { area_name = "NOSE_C",  area_arg = 76, area_life = 1200, area_fire = { pos = {65.0,  8.0, 0}, size = 0.8}},
    { area_name = "BORT_C",  area_arg = 77, area_life = 1200, area_fire = { pos = {18.0,  15.0, 0}, size = 0.8}}, 
    { area_name = "KORMA_C", area_arg = 78, area_life = 1000, area_fire = { pos = {-70.0, 7.0, 0}, size = 0.8}},
    { area_name = "KORMA_T", area_arg = 79, area_life = 1000, area_fire = { pos = {-40.0, 8.0, 0}, size = 0.8}},	
	
    { area_name = "MAIN_GUN",  area_arg = -1, area_life = 40, },
    { area_name = "CIWS",      area_arg = -1, area_life = 40, },	
    { area_name = "VLS_F",     area_arg = -1, area_life = 40, },
	{ area_name = "VLS_R",     area_arg = -1, area_life = 40, },
    { area_name = "HHQ10",     area_arg = -1, area_life = 40, },	
    { area_name = "T726_P1",   area_arg = -1, area_life = 40, },		
    { area_name = "T726_P2",   area_arg = -1, area_life = 40, },	
    { area_name = "T726_SB1",  area_arg = -1, area_life = 40, },	
    { area_name = "T726_SB2",  area_arg = -1, area_life = 40, },		

	}

-- weapon systems
GT.WS = {}
local ws;
GT.WS.maxTargetDetectionRange = 540000;
GT.WS.radar_type = 102
GT.WS.searchRadarMaxElevation = math.rad(80);
GT.WS.searchRadarFrequencies = {{50.0e6, 54.0e6}, {2.0e9, 2.2e9}}

-- ======================================== H/PJ-38 130 mm main gun ==================================================================

GT_t.WS_t.HPJ_38 = {} 
GT_t.WS_t.HPJ_38.angles = {
						{math.rad(160), math.rad(-160), math.rad(-5), math.rad(80)},
							};
GT_t.WS_t.HPJ_38.omegaY = 0.6
GT_t.WS_t.HPJ_38.omegaZ = 0.6
GT_t.WS_t.HPJ_38.pidY = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.HPJ_38.pidZ = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.HPJ_38.reference_angle_Z = math.rad(0);
GT_t.WS_t.HPJ_38.reference_angle_Y = math.rad(0);
GT_t.WS_t.HPJ_38.LN = {}
GT_t.WS_t.HPJ_38.LN[1] = {name = "H/PJ-38", display_name = _("H/PJ-38")}; 
GT_t.WS_t.HPJ_38.LN[1].type = 6
GT_t.WS_t.HPJ_38.LN[1].xc = 3
GT_t.WS_t.HPJ_38.LN[1].distanceMin = 50
GT_t.WS_t.HPJ_38.LN[1].reactionTime = 10
GT_t.WS_t.HPJ_38.LN[1].sensor = {}
set_recursive_metatable(GT_t.WS_t.HPJ_38.LN[1].sensor, GT_t.WSN_t[10])
GT_t.WS_t.HPJ_38.LN[1].PL = {}
GT_t.WS_t.HPJ_38.LN[1].PL[1] = {}
GT_t.WS_t.HPJ_38.LN[1].PL[1].ammo_capacity = 478
GT_t.WS_t.HPJ_38.LN[1].PL[1].shell_name = {"A222_130"};
GT_t.WS_t.HPJ_38.LN[1].PL[1].shot_delay = 40/60
GT_t.WS_t.HPJ_38.LN[1].BR = { {pos = {6.5, 0, 0} } }
  
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.HPJ_38 )
GT.WS[ws].area = 'MAIN_GUN'
GT.WS[ws].center = 'CENTER_TOWER_01'
GT.WS[ws].drawArgument1 = 1
GT.WS[ws].drawArgument2 = 2
GT.WS[ws].LN[1].BR[1].connector_name = 'POINT_GUN_01'
GT.WS[ws].LN[1].BR[1].recoilArgument = 34;
GT.WS[ws].LN[1].BR[1].recoilTime = 40/60/2;
GT.WS[ws].LN[1].customViewPoint = { "genericHowitzer", {-3.5, 0.8, 0.0 }, }

-- ======================================== 30x165 shells =========================================================================

declare_weapon({
	category 				= CAT_SHELLS,
	name 					= "Type055_Type_1130_30_APDS", 
	user_name 				= _("30 mm APDS"),
	model_name    			= "tracer_bullet_green",
	v0    					= 1120.0,
	Dv0   					= 0.0081,
	Da0     				= 0.0008,
	Da1     				= 0.0,
	mass      				= 0.304,
	explosive     			= 0.304,
	life_time     			= 10,
	caliber    				= 30.0,
	AP_cap_caliber 			= 25.0,
	subcalibre     			= true,	
	s         				= 0.0,
	j         				= 0.0,
	l         				= 0.0,
	charTime    			= 0,
	cx        				= {0.7,0.70,0.25,0.236,2.31},
	k1        				= 5.7e-09,
	tracer_off    			= -100,
	scale_tracer  			= 1,
	cartridge 				= 0,
	
});

-- ======================================== Type 346B and TR47C radar =============================================================	

ws = GT_t.inc_ws()
local first_TYPE346B_tracker_id = ws
GT.WS[ws] = {
	center = 'CENTER_RADAR_05',
    omegaY = 2,
    omegaZ = 2,
    pidY = {p=100, i=0.05, d=12, inn = 50},
    pidZ = {p=100, i=0.05, d=12, inn = 50},
    angles = { {math.rad(180), math.rad(-180), math.rad(-90), math.rad(80)} },
    LN = {
        [1] = {
            type = 102,
            distanceMin = 100,
            distanceMax = 500000,
            reactionTime = 2.0,
            reflection_limit = 0.05,
			frequencyRange = {0.5e9, 0.58e9},
            ECM_K = 0.3,
            min_trg_alt = 0,
            max_trg_alt = 100000,
            max_number_of_missiles_channels = 1,
            beamWidth = math.rad(90),
        }
    }
}

local TYPE346B_tracker_ws = {{{'self', ws}}}

for i=2,64 do 
    ws = GT_t.inc_ws()
    GT.WS[ws] = {}
    set_recursive_metatable(GT.WS[ws], GT.WS[first_TYPE346B_tracker_id])
    table.insert(TYPE346B_tracker_ws, {{'self', ws}})
end	

-- ======================================== Type 1130 CIWS ======================================================================

GT_t.LN_t.Type_1130 = {name = "Type 1130", display_name = _("Type 1130")}; 
GT_t.LN_t.Type_1130.type = 3;
GT_t.LN_t.Type_1130.distanceMin = 10
GT_t.LN_t.Type_1130.distanceMax = 4500
GT_t.LN_t.Type_1130.max_trg_alt = 3000
GT_t.LN_t.Type_1130.reactionTime = 2
GT_t.LN_t.Type_1130.reflection_limit = 0.02;
GT_t.LN_t.Type_1130.beamWidth = math.rad(60)
GT_t.LN_t.Type_1130.sensor = {}
set_recursive_metatable(GT_t.LN_t.Type_1130.sensor, GT_t.WSN_t[5]) 
GT_t.LN_t.Type_1130.PL = {}
GT_t.LN_t.Type_1130.PL[1] = {}
GT_t.LN_t.Type_1130.PL[1].ammo_capacity = 2560
GT_t.LN_t.Type_1130.PL[1].shell_name = {"Type055_Type_1130_30_APDS"}
GT_t.LN_t.Type_1130.PL[1].shot_delay = 60/11000; 
GT_t.LN_t.Type_1130.PL[1].reload_time = 1000000;
GT_t.LN_t.Type_1130.BR = { {pos = {2, 0, 0} } }

-- Type 1130 CIWS
ws = GT_t.inc_ws();
GT.WS[ws] = {}
GT.WS[ws].area = 'CIWS';
GT.WS[ws].center = 'CENTER_TOWER_04'
GT.WS[ws].drawArgument1 = 3
GT.WS[ws].drawArgument2 = 4
GT.WS[ws].omegaY = math.rad(130);
GT.WS[ws].omegaZ = math.rad(150); 
GT.WS[ws].pidY = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT.WS[ws].pidZ = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT.WS[ws].stabilizer = true;
GT.WS[ws].laser = true;
GT.WS[ws].angles = {	
                    {math.rad(140), math.rad(-140), math.rad(-25), math.rad(85)},									
					};
GT.WS[ws].reference_angle_Y = math.rad(0);
GT.WS[ws].reference_angle_Z = math.rad(0);	

-- Type 1130 CIWS
__LN = add_launcher(GT.WS[ws], GT_t.LN_t.Type_1130);
__LN.BR = {{ connector_name = 'POINT_GUN_02', 
							recoilArgument = 35,
							recoilTime = 0.1 },}
__LN.createMuzzleFlashEffect = false;
__LN.customViewPoint = { "genericAAA", {-3.5,0.5,1.0}, }; 

-- ======================================== HHQ-10 short range SAM ============================================================

-- HHQ-10
ws = GT_t.inc_ws();
GT.WS[ws] = {}
GT.WS[ws].area = 'HHQ10';
GT.WS[ws].center = 'CENTER_TOWER_02'
GT.WS[ws].drawArgument1 = 15
GT.WS[ws].drawArgument2 = 16
GT.WS[ws].omegaY = math.rad(60);
GT.WS[ws].omegaZ = math.rad(60); 
GT.WS[ws].pidY = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT.WS[ws].pidZ = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT.WS[ws].angles = {	
                    {math.rad(180), math.rad(-180), math.rad(-10), math.rad(85)},									
					};
GT.WS[ws].reference_angle_Y = math.rad(-180);
GT.WS[ws].reference_angle_Z = math.rad(15);	

-- HHQ-10
__LN = add_launcher(GT.WS[ws], GT_t.LN_t.Type055_HHQ10);
__LN.depends_on_unit = TYPE346B_tracker_ws
__LN.beamWidth = math.rad(0)
__LN.BR = {

    {connector_name = 'POINT_MISSILE_01', drawArgument = 322},
	{connector_name = 'POINT_MISSILE_02', drawArgument = 321},
	{connector_name = 'POINT_MISSILE_03', drawArgument = 320},
	{connector_name = 'POINT_MISSILE_04', drawArgument = 319},
	{connector_name = 'POINT_MISSILE_05', drawArgument = 335},
	{connector_name = 'POINT_MISSILE_06', drawArgument = 334},
	{connector_name = 'POINT_MISSILE_07', drawArgument = 333},
	{connector_name = 'POINT_MISSILE_08', drawArgument = 332},
    {connector_name = 'POINT_MISSILE_09', drawArgument = 331},
	{connector_name = 'POINT_MISSILE_10', drawArgument = 326},
	{connector_name = 'POINT_MISSILE_11', drawArgument = 325},
	{connector_name = 'POINT_MISSILE_12', drawArgument = 324},
	{connector_name = 'POINT_MISSILE_13', drawArgument = 323},
	{connector_name = 'POINT_MISSILE_14', drawArgument = 340},
	{connector_name = 'POINT_MISSILE_15', drawArgument = 339},
	{connector_name = 'POINT_MISSILE_16', drawArgument = 338},
    {connector_name = 'POINT_MISSILE_17', drawArgument = 337},
	{connector_name = 'POINT_MISSILE_18', drawArgument = 336},
	{connector_name = 'POINT_MISSILE_19', drawArgument = 330},
	{connector_name = 'POINT_MISSILE_20', drawArgument = 329},
	{connector_name = 'POINT_MISSILE_21', drawArgument = 328},
	{connector_name = 'POINT_MISSILE_22', drawArgument = 327},
	{connector_name = 'POINT_MISSILE_23', drawArgument = 342},
	{connector_name = 'POINT_MISSILE_24', drawArgument = 341},	
					
};

-- ========================================  Bow VLS =======================================================================

-- HHQ-9B
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type055_HHQ9B )
GT.WS[ws].area = 'VLS_F'
GT.WS[ws].center = 'POINT_VLS_223'
GT.WS[ws].LN[1].depends_on_unit = TYPE346B_tracker_ws
GT.WS[ws].LN[1].PL[1].ammo_capacity = 48;
GT.WS[ws].LN[1].BR = {

	{connector_name = 'POINT_VLS_200', recoilArgument = 200, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_202', recoilArgument = 202, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_203', recoilArgument = 203, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_204', recoilArgument = 204, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_205', recoilArgument = 205, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_206', recoilArgument = 206, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_207', recoilArgument = 207, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
															
	{connector_name = 'POINT_VLS_208', recoilArgument = 208, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},				 
	{connector_name = 'POINT_VLS_209', recoilArgument = 209, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_210', recoilArgument = 210, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_211', recoilArgument = 211, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_212', recoilArgument = 212, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_213', recoilArgument = 213, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_214', recoilArgument = 214, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_215', recoilArgument = 215, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
															
	{connector_name = 'POINT_VLS_216', recoilArgument = 216, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},									 
	{connector_name = 'POINT_VLS_217', recoilArgument = 217, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_218', recoilArgument = 218, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_219', recoilArgument = 219, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_220', recoilArgument = 220, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_221', recoilArgument = 221, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_222', recoilArgument = 222, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_223', recoilArgument = 223, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
															
	{connector_name = 'POINT_VLS_224', recoilArgument = 224, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},								 
	{connector_name = 'POINT_VLS_225', recoilArgument = 225, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_226', recoilArgument = 226, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_227', recoilArgument = 227, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_228', recoilArgument = 228, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_229', recoilArgument = 229, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_230', recoilArgument = 230, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_231', recoilArgument = 231, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
															
	{connector_name = 'POINT_VLS_232', recoilArgument = 232, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},									 
	{connector_name = 'POINT_VLS_233', recoilArgument = 233, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_234', recoilArgument = 234, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_235', recoilArgument = 235, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_236', recoilArgument = 236, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_237', recoilArgument = 237, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_238', recoilArgument = 238, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_239', recoilArgument = 239, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},

}															
															
-- YJ-21
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type055_YJ21 )
GT.WS[ws].area = 'VLS_F'
GT.WS[ws].center = 'POINT_VLS_247'
GT.WS[ws].LN[1].PL[1].ammo_capacity = 8;
GT.WS[ws].LN[1].BR = {																
															
	{connector_name = 'POINT_VLS_240', recoilArgument = 240, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},								 
	{connector_name = 'POINT_VLS_241', recoilArgument = 241, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_242', recoilArgument = 242, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_243', recoilArgument = 243, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_244', recoilArgument = 244, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_245', recoilArgument = 245, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_246', recoilArgument = 246, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_247', recoilArgument = 247, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},

}
	
-- CJ-10
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type055_CJ10 )
GT.WS[ws].area = 'VLS_F'
GT.WS[ws].center = 'POINT_VLS_255'
GT.WS[ws].LN[1].PL[1].ammo_capacity = 8;
GT.WS[ws].LN[1].BR = {

	{connector_name = 'POINT_VLS_248', recoilArgument = 248, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_249', recoilArgument = 249, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_250', recoilArgument = 250, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_251', recoilArgument = 251, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_252', recoilArgument = 252, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_253', recoilArgument = 253, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_254', recoilArgument = 254, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_255', recoilArgument = 255, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},

}

-- YJ-18
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type055_YJ18 )
GT.WS[ws].area = 'VLS_F'
GT.WS[ws].center = 'POINT_VLS_263'
GT.WS[ws].LN[1].PL[1].ammo_capacity = 8;
GT.WS[ws].LN[1].BR = {
															
	{connector_name = 'POINT_VLS_256', recoilArgument = 256, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},								 
	{connector_name = 'POINT_VLS_257', recoilArgument = 257, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_258', recoilArgument = 258, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_259', recoilArgument = 259, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_260', recoilArgument = 260, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_261', recoilArgument = 261, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_262', recoilArgument = 262, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_263', recoilArgument = 263, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},

}

-- ======================================== Stern VLS ========================================================================

-- HHQ-9B
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type055_HHQ9B )
GT.WS[ws].area = 'VLS_R'
GT.WS[ws].center = 'POINT_VLS_280'
GT.WS[ws].LN[1].depends_on_unit = TYPE346B_tracker_ws
GT.WS[ws].LN[1].PL[1].ammo_capacity = 32;
GT.WS[ws].LN[1].BR = {
															
	{connector_name = 'POINT_VLS_265', recoilArgument = 265, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},									 
	{connector_name = 'POINT_VLS_266', recoilArgument = 266, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_267', recoilArgument = 267, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_268', recoilArgument = 268, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_269', recoilArgument = 269, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_270', recoilArgument = 270, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_271', recoilArgument = 271, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_272', recoilArgument = 272, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
															
	{connector_name = 'POINT_VLS_273', recoilArgument = 273, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},								 
	{connector_name = 'POINT_VLS_274', recoilArgument = 274, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_275', recoilArgument = 275, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_276', recoilArgument = 276, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_277', recoilArgument = 277, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_278', recoilArgument = 278, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_279', recoilArgument = 279, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_280', recoilArgument = 280, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},	
	
	{connector_name = 'POINT_VLS_281', recoilArgument = 281, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_282', recoilArgument = 282, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_283', recoilArgument = 283, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_284', recoilArgument = 284, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},                                                        
	{connector_name = 'POINT_VLS_285', recoilArgument = 285, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_286', recoilArgument = 286, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_287', recoilArgument = 287, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_288', recoilArgument = 288, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},	

	{connector_name = 'POINT_VLS_289', recoilArgument = 289, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_290', recoilArgument = 290, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_291', recoilArgument = 291, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_292', recoilArgument = 292, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},                                                           
	{connector_name = 'POINT_VLS_293', recoilArgument = 293, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_294', recoilArgument = 294, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_295', recoilArgument = 295, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_296', recoilArgument = 296, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},	

}

-- CJ-10
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type055_CJ10 )
GT.WS[ws].area = 'VLS_R'
GT.WS[ws].center = 'POINT_VLS_304'
GT.WS[ws].LN[1].PL[1].ammo_capacity = 8;
GT.WS[ws].LN[1].BR = {

	{connector_name = 'POINT_VLS_297', recoilArgument = 297, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_298', recoilArgument = 298, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_299', recoilArgument = 299, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_300', recoilArgument = 300, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},	
	{connector_name = 'POINT_VLS_301', recoilArgument = 301, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_302', recoilArgument = 302, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_303', recoilArgument = 303, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_304', recoilArgument = 304, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},

}

-- YJ-18
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type055_YJ18 )
GT.WS[ws].area = 'VLS_R'
GT.WS[ws].center = 'POINT_VLS_312'
GT.WS[ws].LN[1].PL[1].ammo_capacity = 8;
GT.WS[ws].LN[1].BR = {
	
	{connector_name = 'POINT_VLS_305', recoilArgument = 305, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_306', recoilArgument = 306, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_307', recoilArgument = 307, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_308', recoilArgument = 308, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},                                                           
	{connector_name = 'POINT_VLS_309', recoilArgument = 309, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_310', recoilArgument = 310, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_311', recoilArgument = 311, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},
	{connector_name = 'POINT_VLS_312', recoilArgument = 312, recoilT0 = -2, recoilT1 = -1, recoilT2 = 1.0, recoilTime = 2},			

}

-- ======================================== Type 726-4 CM SHELLS ============================================================

declare_weapon({
	category 				= CAT_SHELLS,
	name 					= "T726_4CM", 
	user_name 				= _("Type 726-4 countermeasure"),
	model_name    			= "tracer_bullet_red",
    projectile      		= "HE",
    payloadEffect   		= "Fragmentation",
    payloadMaterial 		= "RDX",	
	v0    					= 1835.0, 
	Dv0   					= 0.0020,
	Da0     				= 0.0030,
	Da1     				= 0.0,
	mass      				= 2.4,
	round_mass				= 6.1,	
	explosive     			= 30.4,
	life_time     			= 0.3,
	caliber     			= 57.0,
	s         				= 0.0,
	j         				= 0.0,
	l         				= 0.0,
	charTime    			= 0,
	cx        				= {0.7,0.70,0.25,0.236,2.31},
	k1        				= 5.7e-09,
	tracer_off    			= -1,
	scale_tracer  			= 1,
	scale_smoke    			= 75.0, 
	smoke_opacity  			= 0.1,	
	cartridge 				= 0,
	
});

-- ======================================== Type 726-4 CM Port #1 ===========================================================

WSN_21 = {}
WSN_21.deviation_error_azimuth 		= 0.0 
WSN_21.deviation_error_elevation 	= 0.0 
WSN_21.deviation_error_speed_sensor	= 0.0 
WSN_21.deviation_error_stability 	= 0.0 
WSN_21.deviation_error_distance 	= 0.0 

GT_t.WSN_t[21] = WSN_21;

GT_t.WS_t.Type726_4 = {name = "Type 726-4 CM", display_name = _("Type 726-4 CM")};
GT_t.WS_t.Type726_4.angles = {
                    {math.rad(180), math.rad(0), math.rad(-10), math.rad(85)},
                    };
GT_t.WS_t.Type726_4.omegaY = 3 
GT_t.WS_t.Type726_4.omegaZ = 3 
GT_t.WS_t.Type726_4.pidY = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.Type726_4.pidZ = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.Type726_4.reference_angle_Z = math.rad(0)
GT_t.WS_t.Type726_4.reference_angle_Y = math.rad(90)
GT_t.WS_t.Type726_4.LN = {}
GT_t.WS_t.Type726_4.LN[1] = {}
GT_t.WS_t.Type726_4.LN[1].type = 3;
GT_t.WS_t.Type726_4.LN[1].distanceMin = 1
GT_t.WS_t.Type726_4.LN[1].distanceMax = 2000 
GT_t.WS_t.Type726_4.LN[1].max_trg_alt = 2000
GT_t.WS_t.Type726_4.LN[1].reactionTime = 0.01
GT_t.WS_t.Type726_4.LN[1].beamWidth = math.rad(0);
GT_t.WS_t.Type726_4.LN[1].sensor = {}
set_recursive_metatable(GT_t.WS_t.Type726_4.LN[1].sensor, GT_t.WSN_t[21])
GT_t.WS_t.Type726_4.LN[1].PL = {}
GT_t.WS_t.Type726_4.LN[1].PL[1] = {}
GT_t.WS_t.Type726_4.LN[1].PL[1].ammo_capacity = 80;
GT_t.WS_t.Type726_4.LN[1].PL[1].shell_name = {"T726_4CM"};
GT_t.WS_t.Type726_4.LN[1].PL[1].shell_display_name = "Type 726-4 CM";
GT_t.WS_t.Type726_4.LN[1].PL[1].shot_delay = 0.02;
GT_t.WS_t.Type726_4.LN[1].BR = { {pos = {3.478, 0, 0} }, }

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type726_4 )
GT.WS[ws].area = 'T726_P1'
GT.WS[ws].center = 'CENTER_TOWER_10'
GT.WS[ws].drawArgument1 = 7
GT.WS[ws].drawArgument2 = 8
-- GT.WS[ws].LN[1].customViewPoint = { "genericAAAwithRadar", {0.0, 0.0, 0.0 }, }; -- for debugging
GT.WS[ws].LN[1].createMuzzleFlashEffect = false;
GT.WS[ws].LN[1].BR[1].connector_name = 'POINT_CM_01'

-- ======================================== Type 726-4 CM Port #2 ==========================================================

GT_t.WS_t.Type726_4 = {name = "Type 726-4 CM", display_name = _("Type 726-4 CM")};
GT_t.WS_t.Type726_4.angles = {
                    {math.rad(180), math.rad(0), math.rad(-10), math.rad(85)},
                    };
GT_t.WS_t.Type726_4.omegaY = 3 
GT_t.WS_t.Type726_4.omegaZ = 3 
GT_t.WS_t.Type726_4.pidY = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.Type726_4.pidZ = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.Type726_4.reference_angle_Z = math.rad(0)
GT_t.WS_t.Type726_4.reference_angle_Y = math.rad(90)
GT_t.WS_t.Type726_4.LN = {}
GT_t.WS_t.Type726_4.LN[1] = {}
GT_t.WS_t.Type726_4.LN[1].type = 3;
GT_t.WS_t.Type726_4.LN[1].distanceMin = 1
GT_t.WS_t.Type726_4.LN[1].distanceMax = 2000 
GT_t.WS_t.Type726_4.LN[1].max_trg_alt = 2000
GT_t.WS_t.Type726_4.LN[1].reactionTime = 0.01
GT_t.WS_t.Type726_4.LN[1].beamWidth = math.rad(0);
GT_t.WS_t.Type726_4.LN[1].sensor = {}
set_recursive_metatable(GT_t.WS_t.Type726_4.LN[1].sensor, GT_t.WSN_t[21])
GT_t.WS_t.Type726_4.LN[1].PL = {}
GT_t.WS_t.Type726_4.LN[1].PL[1] = {}
GT_t.WS_t.Type726_4.LN[1].PL[1].ammo_capacity = 80;
GT_t.WS_t.Type726_4.LN[1].PL[1].shell_name = {"T726_4CM"};
GT_t.WS_t.Type726_4.LN[1].PL[1].shell_display_name = "Type 726-4 CM";
GT_t.WS_t.Type726_4.LN[1].PL[1].shot_delay = 0.02;
GT_t.WS_t.Type726_4.LN[1].BR = { {pos = {3.478, 0, 0} }, }

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type726_4 )
GT.WS[ws].area = 'T726_P2'
GT.WS[ws].center = 'CENTER_TOWER_11'
GT.WS[ws].drawArgument1 = 9
GT.WS[ws].drawArgument2 = 10
-- GT.WS[ws].LN[1].customViewPoint = { "genericAAAwithRadar", {0.0, 0.0, 0.0 }, }; -- for debugging
GT.WS[ws].LN[1].createMuzzleFlashEffect = false;
GT.WS[ws].LN[1].BR[1].connector_name = 'POINT_CM_19'

-- ======================================== Type 726-4 CM SB #1 ==========================================================

GT_t.WS_t.Type726_4 = {name = "Type 726-4 CM", display_name = _("Type 726-4 CM")};
GT_t.WS_t.Type726_4.angles = {
                    {math.rad(0), math.rad(-180), math.rad(-10), math.rad(85)},
                    };
GT_t.WS_t.Type726_4.omegaY = 3 
GT_t.WS_t.Type726_4.omegaZ = 3 
GT_t.WS_t.Type726_4.pidY = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.Type726_4.pidZ = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.Type726_4.reference_angle_Z = math.rad(0)
GT_t.WS_t.Type726_4.reference_angle_Y = math.rad(-90)
GT_t.WS_t.Type726_4.LN = {}
GT_t.WS_t.Type726_4.LN[1] = {}
GT_t.WS_t.Type726_4.LN[1].type = 3;
GT_t.WS_t.Type726_4.LN[1].distanceMin = 1
GT_t.WS_t.Type726_4.LN[1].distanceMax = 2000 
GT_t.WS_t.Type726_4.LN[1].max_trg_alt = 2000
GT_t.WS_t.Type726_4.LN[1].reactionTime = 0.01
GT_t.WS_t.Type726_4.LN[1].beamWidth = math.rad(0);
GT_t.WS_t.Type726_4.LN[1].sensor = {}
set_recursive_metatable(GT_t.WS_t.Type726_4.LN[1].sensor, GT_t.WSN_t[21])
GT_t.WS_t.Type726_4.LN[1].PL = {}
GT_t.WS_t.Type726_4.LN[1].PL[1] = {}
GT_t.WS_t.Type726_4.LN[1].PL[1].ammo_capacity = 80;
GT_t.WS_t.Type726_4.LN[1].PL[1].shell_name = {"T726_4CM"};
GT_t.WS_t.Type726_4.LN[1].PL[1].shell_display_name = "Type 726-4 CM";
GT_t.WS_t.Type726_4.LN[1].PL[1].shot_delay = 0.02;
GT_t.WS_t.Type726_4.LN[1].BR = { {pos = {3.478, 0, 0} }, }

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type726_4 )
GT.WS[ws].area = 'T726_SB1'
GT.WS[ws].center = 'CENTER_TOWER_12'
GT.WS[ws].drawArgument1 = 21
GT.WS[ws].drawArgument2 = 22
-- GT.WS[ws].LN[1].customViewPoint = { "genericAAAwithRadar", {0.0, 0.0, 0.0 }, }; -- for debugging
GT.WS[ws].LN[1].createMuzzleFlashEffect = false;
GT.WS[ws].LN[1].BR[1].connector_name = 'POINT_CM_37'

-- ======================================== Type 726-4 CM SB #2 ========================================================

GT_t.WS_t.Type726_4 = {name = "Type 726-4 CM", display_name = _("Type 726-4 CM")};
GT_t.WS_t.Type726_4.angles = {
                    {math.rad(0), math.rad(-180), math.rad(-10), math.rad(85)},
                    };
GT_t.WS_t.Type726_4.omegaY = 3 
GT_t.WS_t.Type726_4.omegaZ = 3 
GT_t.WS_t.Type726_4.pidY = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.Type726_4.pidZ = {p=300, i = 0.05, d = 10.0, inn = 1000};
GT_t.WS_t.Type726_4.reference_angle_Z = math.rad(0)
GT_t.WS_t.Type726_4.reference_angle_Y = math.rad(-90)
GT_t.WS_t.Type726_4.LN = {}
GT_t.WS_t.Type726_4.LN[1] = {}
GT_t.WS_t.Type726_4.LN[1].type = 3;
GT_t.WS_t.Type726_4.LN[1].distanceMin = 1
GT_t.WS_t.Type726_4.LN[1].distanceMax = 2000 
GT_t.WS_t.Type726_4.LN[1].max_trg_alt = 2000
GT_t.WS_t.Type726_4.LN[1].reactionTime = 0.01
GT_t.WS_t.Type726_4.LN[1].beamWidth = math.rad(0);
GT_t.WS_t.Type726_4.LN[1].sensor = {}
set_recursive_metatable(GT_t.WS_t.Type726_4.LN[1].sensor, GT_t.WSN_t[21])
GT_t.WS_t.Type726_4.LN[1].PL = {}
GT_t.WS_t.Type726_4.LN[1].PL[1] = {}
GT_t.WS_t.Type726_4.LN[1].PL[1].ammo_capacity = 80;
GT_t.WS_t.Type726_4.LN[1].PL[1].shell_name = {"T726_4CM"};
GT_t.WS_t.Type726_4.LN[1].PL[1].shell_display_name = "Type 726-4 CM";
GT_t.WS_t.Type726_4.LN[1].PL[1].shot_delay = 0.02;
GT_t.WS_t.Type726_4.LN[1].BR = { {pos = {3.478, 0, 0} }, }

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Type726_4 )
GT.WS[ws].area = 'T726_SB2'
GT.WS[ws].center = 'CENTER_TOWER_13'
GT.WS[ws].drawArgument1 = 23
GT.WS[ws].drawArgument2 = 24
-- GT.WS[ws].LN[1].customViewPoint = { "genericAAAwithRadar", {0.0, 0.0, 0.0 }, }; -- for debugging
GT.WS[ws].LN[1].createMuzzleFlashEffect = false;
GT.WS[ws].LN[1].BR[1].connector_name = 'POINT_CM_55'

-- ======================================== Type 1130 OFC-3 EOS FCS ===================================================

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.SS_t.VYMPEL_TRACKER[1]);
GT.WS[ws].reference_angle_Y = math.rad(0)
GT.WS[ws].reference_angle_Z = math.rad(0)
GT.WS[ws].center = 'CENTER_RADAR_05'
GT.WS[ws].angles = {
					{math.rad(180), math.rad(-180), math.rad(-90), math.rad(90)},
					};
GT.WS[ws].drawArgument1 = -1
GT.WS[ws].drawArgument2 = 6
GT.WS[ws].LN[1].reactionTime = 1;
GT.WS[ws].LN[1].distanceMin = 10;
GT.WS[ws].LN[1].distanceMax = 20000
GT.WS[ws].LN[1].min_trg_alt = 0;
GT.WS[ws].LN[1].max_trg_alt = 20000;
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.SS_t.VYMPEL_TRACKER[2]);
GT.WS[ws].base = ws-1;
local visual_tracker_ws1 = {{{"self", ws-1}}, {{"self", ws}}};

-- ======================================== Type 1130 TR47C radar =====================================================

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.SS_t.VYMPEL_TRACKER[1]);
GT.WS[ws].reference_angle_Y = math.rad(0)
GT.WS[ws].reference_angle_Z = math.rad(0)
GT.WS[ws].center = 'CENTER_RADAR_04'
GT.WS[ws].angles = {
					{math.rad(180), math.rad(-180), math.rad(-90), math.rad(90)},
					};
GT.WS[ws].drawArgument1 = -1
GT.WS[ws].drawArgument2 = 5
GT.WS[ws].LN[1].reactionTime = 1;
GT.WS[ws].LN[1].distanceMin = 10;
GT.WS[ws].LN[1].distanceMax = 20000
GT.WS[ws].LN[1].min_trg_alt = 0;
GT.WS[ws].LN[1].max_trg_alt = 20000;
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.SS_t.VYMPEL_TRACKER[2]);
GT.WS[ws].base = ws-1;
local visual_tracker_ws2 = {{{"self", ws-1}}, {{"self", ws}}};

-- ======================================== EOS #1 ====================================================================

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.SS_t.VYMPEL_TRACKER[1]);
GT.WS[ws].reference_angle_Y = math.rad(0)
GT.WS[ws].reference_angle_Z = math.rad(0)
GT.WS[ws].center = 'CENTER_RADAR_01'
GT.WS[ws].angles = {
					{math.rad(180), math.rad(-180), math.rad(-45), math.rad(90)},
					};
GT.WS[ws].drawArgument1 = 17
GT.WS[ws].drawArgument2 = 18
GT.WS[ws].LN[1].reactionTime = 1;
GT.WS[ws].LN[1].distanceMin = 10;
GT.WS[ws].LN[1].distanceMax = 20000
GT.WS[ws].LN[1].min_trg_alt = 0;
GT.WS[ws].LN[1].max_trg_alt = 20000;
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.SS_t.VYMPEL_TRACKER[2]);
GT.WS[ws].base = ws-1;
local visual_tracker_ws3 = {{{"self", ws-1}}, {{"self", ws}}};

-- ======================================== EOS #2 ====================================================================

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.SS_t.VYMPEL_TRACKER[1]);
GT.WS[ws].reference_angle_Y = math.rad(0)
GT.WS[ws].reference_angle_Z = math.rad(0)
GT.WS[ws].center = 'CENTER_RADAR_02'
GT.WS[ws].angles = {
					{math.rad(180), math.rad(-180), math.rad(-45), math.rad(90)},
					};
GT.WS[ws].drawArgument1 = 19
GT.WS[ws].drawArgument2 = 20
GT.WS[ws].LN[1].reactionTime = 1;
GT.WS[ws].LN[1].distanceMin = 10;
GT.WS[ws].LN[1].distanceMax = 100000
GT.WS[ws].LN[1].min_trg_alt = 0;
GT.WS[ws].LN[1].max_trg_alt = 100000;
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.SS_t.VYMPEL_TRACKER[2]);
GT.WS[ws].base = ws-1;
local visual_tracker_ws4 = {{{"self", ws-1}}, {{"self", ws}}};

-- ===================================================================================================================

GT.Name = "Type055"
GT.DisplayName = _("055型驱逐舰")
GT.DisplayNameShort = _("Type 055")
GT.Rate = 3500

GT.Sensors = {  OPTIC = {"long-range naval optics", "long-range naval LLTV", "long-range naval FLIR",},
                RADAR = {
                    "Type 346B surface",
                    "Type 346B air",
                }
            };

GT.DetectionRange  = GT.airFindDist;
GT.ThreatRange = GT.airWeaponDist;
GT.Singleton   ="no";
GT.mapclasskey = "P0091000067";
GT.attribute = {wsType_Navy,wsType_Ship,wsType_ArmedShip,WSTYPE_PLACEHOLDER,
                    "Cruisers",
                    "RADAR_BAND1_FOR_ARM",
					"RADAR_BAND2_FOR_ARM",
                    "DetectionByAWACS",
					"Datalink",
				};
GT.Categories = {
					{name = "Armed Ship"},
					{name = "HelicopterCarrier"}					
				};
				
GT.Countries = {'China'}	
				
add_surface_unit(GT)	
			