--- Charlie de Gaulle Carrier by Markindel (www.news3d.eu)

mount_vfs_model_path	(current_mod_path.."/Shapes/")
mount_vfs_texture_path  (current_mod_path.."/Textures/Quenn_Elizabeth.zip")
mount_vfs_texture_path  (current_mod_path.."/Textures/Quenn_Elizabeth2.zip")
mount_vfs_texture_path  (current_mod_path.."/Textures/Panther_elicopter.zip")



--------------------------------------------------------------------------------

GT = {};
GT_t.ws = 0;

set_recursive_metatable(GT, GT_t.generic_ship)

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


GT.animation_arguments.radar1_rotation = 11; -- вращение радара 1
GT.radar1_period = 3;
GT.animation_arguments.radar2_rotation = -1; -- вращение радара 2 отсутствует
GT.animation_arguments.radar3_rotation = -1; -- вращение радара 3 отсутствует
GT.animation_arguments.luna_lights = 100;


GT.life = 7300;
GT.mass = 7.2916e+007;
GT.max_velocity = 15.4333;
GT.race_velocity = 15.4333;
GT.economy_velocity = 15.4333;
GT.economy_distance = 7.408e+007;
GT.race_distance = 7.408e+007;
GT.shipLength = 261.5;
GT.Width = 40;
GT.Height = 64.36; --celkova_vyska_modelu???
GT.Length = 261.5; 
GT.DeckLevel = 21.198;   --???


---GT.X_nose = 86.0;  --zaciatok_lode
---GT.X_tail = -165;  --koniec_lode
---GT.Tail_Width = 40; --sirka_vlnenia_za_lodou

GT.X_nose = 150
GT.X_tail = -113.5
GT.Tail_Width = 28



GT.Gamma_max = 0.35;
GT.Om = 0.05;
GT.speedup = 0.119249;
GT.R_min = 665.8;
GT.distFindObstacles = 1048.7;

GT.numParking = 3;
GT.Plane_Num_ = 24;
GT.Helicopter_Num_ = 6;

GT.airWeaponDist = 150000;
GT.airFindDist = 300000;

---- Primo valore    : avanti/indietro
---- Secondo valore: alto/basso
---- Terzo Valore    : destra/sinistra
--------------------------------------------------------------------------------

GT.cord_points = {
        {-72.046,   16.683, -21.694}, {-68.261,   16.683, 7.259},
        {-59.487,   16.683, -23.633}, {-55.702,   16.683, 5.32},
        {-47.662,   16.683, -24.952}, {-43.877,   16.683, 4.001},
        {-35.03,    16.683, -26.578}, {-31.244,   16.683, 2.375},
                }

				
---GT.LSOPosition = {88.0, 28.0, 31.0, 0.0, 0.0} 
---GT.LSOPosition = {88.0, 20.0, 0.0, 0.0, 0.0}

 
GT.Landing_Point = {71.0, 16.26,-30.0} --{70.0, 16.26,-30.0}
GT.LSOPosition = {81.236, 24.0, 28.497, 10.0, 0.0} 
-----GT.Landing_Point = {-56.293, 21.198, -20.417}       --prvy_katapult{-19.931, 21.198, 6.286}
--GT.Landing_Point = {-1.0, 21.198, 0.0}       --prvy_katapult{-19.931, 21.198, 6.286}



GT.WS = {}
GT.WS.maxTargetDetectionRange = 450000;
GT.WS.radar_type = 102
--------------------------------------------------------------------------------
GT.DM = {
    { area_name = "NOSE_R",			area_arg = 70,	area_life = 110,},
    { area_name = "BORT_R",			area_arg = 71,	area_life = 110,},
    { area_name = "KORMA_R", 		area_arg = 72,	area_life = 110,},
    { area_name = "NOSE_L", 		area_arg = 73,	area_life = 110,},
    { area_name = "BORT_L", 		area_arg = 74,	area_life = 110,},
    { area_name = "KORMA_L", 		area_arg = 75,	area_life = 110,},
	{ area_name = "NOSE_TOP",		area_arg = 76,	area_life = 80,},
    { area_name = "RUBKA_TOP",		area_arg = 77,	area_life = 100,},
	{ area_name = "HP",				area_arg = 78,	area_life = 80,},
	{ area_name = "KORMA_BACK", 	area_arg = 79,	area_life = 110,},
	{ area_name = "KABINA",			area_arg = 80,	area_life = 220,},
	{ area_name = "BORT_TOP_Back", 	area_arg = 81,	area_life = 80,},
	{ area_name = "NADSTROYKA",		area_arg = 82,	area_life = 220,},
	{ area_name = "SUPERSTRUCTURE_Mid",	area_arg = 83,	area_life = 320,},
	{ area_name = "KORMA_TOP", 		area_arg = 84,	area_life = 40,},
    { area_name = "TOWER_NOSE",		area_arg = 97,	area_life = 60,},
	{ area_name = "TOWER_KORMA",	area_arg = 98,	area_life = 60,},
    { area_name = "ZA_R",			area_arg = 99,	area_life = 27,},
    { area_name = "ZA_L",			area_arg = 100,	area_life = 27,},
}
--------------------------------------------------------------------------------

-- weapon systems
GT.WS = {}
local ws;
GT.WS.maxTargetDetectionRange = 450000;
GT.WS.radar_type = 102

--------------------------------------------------------------------------------
-- CIWS Phalanxs
--------------  FREMM : Machine Gun Oerlikon Left ------------------------------------------------------------------------------
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.phalanx )
GT.WS[ws].area = 'ZA_L'
GT.WS[ws].center = 'CENTER_TOWER_04'
GT.WS[ws].drawArgument1 = 36
GT.WS[ws].drawArgument2 = 37
GT.WS[ws].angles[1][1] = math.rad(177);
GT.WS[ws].angles[1][2] = math.rad(3);
GT.WS[ws].reference_angle_Y = math.rad(0);  -- valore originale 90
GT.WS[ws].LN[1].fireAnimationArgument = 119;
GT.WS[ws].LN[1].BR[1].connector_name =  'POINT_GUN_02'


------------ Torretta CIWS Phalanx di Destra
--------------  FREMM : Machine Gun Oerlikon Right ------------------------------------------------------------------------------
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.phalanx )
GT.WS[ws].area = 'ZA_R'
GT.WS[ws].center = 'CENTER_TOWER_03'
GT.WS[ws].drawArgument1 = 25
GT.WS[ws].drawArgument2 = 26
GT.WS[ws].angles[1][1] = math.rad(-3);
GT.WS[ws].angles[1][2] = math.rad( 170);
GT.WS[ws].reference_angle_Y = math.rad(0);  ----- valore Originale -90
GT.WS[ws].LN[1].fireAnimationArgument = 118;
GT.WS[ws].LN[1].BR[1].connector_name = 'POINT_GUN_03'
--------------------------------------------------------------------------------

-- 9 AIGES trackers
ws = GT_t.inc_ws();
local first_EGES_tracker_id = ws;
GT.WS[ws] = {
	omegaY = 2,
	omegaZ = 2,
	pidY = {p=100, i=0.05, d=12, inn = 50},
	pidZ = {p=100, i=0.05, d=12, inn = 50},
	area = 'KABINA',
	pos = {0.0, 19.0, 0.0},
	angles = { {math.rad(180), math.rad(-180), math.rad(-90), math.rad(80)} },
	LN = {
		[1] = {
			type = 102,
			distanceMin = 1000,
			distanceMax = 150000,
			reactionTime = 2.0,
			reflection_limit = 0.1,
			ECM_K = 0.5,
			min_trg_alt = 5,
			max_trg_alt = 30000,
			max_number_of_missiles_channels = 2
		}
	}
};
local AIGES_TRACKERS = {{{'self', ws}}}

for i=2,9 do
	ws = GT_t.inc_ws();
	GT.WS[ws] = {};
	set_recursive_metatable(GT.WS[ws], GT.WS[first_EGES_tracker_id]);
	table.insert(AIGES_TRACKERS, {{'self', ws}})
end;

--------------------------------------------------------------------------------
--[[
-- Tomahawk posizionati nei lanciatori VLS di PRUA
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.ship_TOMAHAWK )
GT.WS[ws].area = 'BORT_TOP_Back';
GT.WS[ws].center = 'Rocket_Point_86';
GT.WS[ws].LN[1].PL[1].ammo_capacity = 32;
GT.WS[ws].LN[1].BR = {
	{connector_name = 'Rocket_Point_62', drawArgument = 249},
	{connector_name = 'Rocket_Point_63', drawArgument = 250},
	{connector_name = 'Rocket_Point_64', drawArgument = 251},
	{connector_name = 'Rocket_Point_65', drawArgument = 252},
	{connector_name = 'Rocket_Point_66', drawArgument = 253},
	{connector_name = 'Rocket_Point_67', drawArgument = 254},
	{connector_name = 'Rocket_Point_68', drawArgument = 255},
	{connector_name = 'Rocket_Point_69', drawArgument = 256},
	
	{connector_name = 'Rocket_Point_70', drawArgument = 257},
	{connector_name = 'Rocket_Point_71', drawArgument = 258},
	{connector_name = 'Rocket_Point_72', drawArgument = 259},
	{connector_name = 'Rocket_Point_73', drawArgument = 9},
	{connector_name = 'Rocket_Point_74', drawArgument = 261},
	{connector_name = 'Rocket_Point_75', drawArgument = 262},
	{connector_name = 'Rocket_Point_76', drawArgument = 263},
	{connector_name = 'Rocket_Point_77', drawArgument = 264},
	
	{connector_name = 'Rocket_Point_78', drawArgument = 265},
	{connector_name = 'Rocket_Point_79', drawArgument = 266},
	{connector_name = 'Rocket_Point_80', drawArgument = 267},
	{connector_name = 'Rocket_Point_81', drawArgument = 268},
	{connector_name = 'Rocket_Point_82', drawArgument = 269},
	{connector_name = 'Rocket_Point_83', drawArgument = 270},
	{connector_name = 'Rocket_Point_84', drawArgument = 271},
	{connector_name = 'Rocket_Point_85', drawArgument = 272},

}
--]]
---------------   Sistema Missilistico VLS di POPPA -------------------------------------------------
--SM2 SAM
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.ship_MK41_SM2 )
GT.WS[ws].area = 'NOSE_TOP'
GT.WS[ws].center = 'Rocket_Point_36'
GT.WS[ws].LN[1].depends_on_unit = AIGES_TRACKERS
GT.WS[ws].LN[1].ECM_K = 0.65;
GT.WS[ws].LN[1].PL[1].ammo_capacity = 61;
GT.WS[ws].LN[1].BR = {
	{connector_name = 'Rocket_Point_01', drawArgument = 188},
	{connector_name = 'Rocket_Point_02', drawArgument = 189},
	{connector_name = 'Rocket_Point_03', drawArgument = 190},
	{connector_name = 'Rocket_Point_04', drawArgument = 191},
	{connector_name = 'Rocket_Point_05', drawArgument = 192},
	{connector_name = 'Rocket_Point_06', drawArgument = 193},
	{connector_name = 'Rocket_Point_07', drawArgument = 194},
	{connector_name = 'Rocket_Point_08', drawArgument = 195},
	
	{connector_name = 'Rocket_Point_09', drawArgument = 196},
	{connector_name = 'Rocket_Point_10', drawArgument = 197},
	{connector_name = 'Rocket_Point_11', drawArgument = 198},
	{connector_name = 'Rocket_Point_12', drawArgument = 199},
	{connector_name = 'Rocket_Point_13', drawArgument = 200},
	{connector_name = 'Rocket_Point_14', drawArgument = 201},
	{connector_name = 'Rocket_Point_15', drawArgument = 202},
	{connector_name = 'Rocket_Point_16', drawArgument = 203},
	
	{connector_name = 'Rocket_Point_17', drawArgument = 204},
	{connector_name = 'Rocket_Point_18', drawArgument = 205},
	{connector_name = 'Rocket_Point_19', drawArgument = 206},
	{connector_name = 'Rocket_Point_20', drawArgument = 207},
	{connector_name = 'Rocket_Point_21', drawArgument = 208},
	{connector_name = 'Rocket_Point_22', drawArgument = 209},
	{connector_name = 'Rocket_Point_23', drawArgument = 210},
	{connector_name = 'Rocket_Point_24', drawArgument = 211},

}

------------------------------------------------------------------------------------------------------------------------------------
--missile_systems(SADRAL_STINGER)

local ws;


ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.stinger_manpad.LN[1]);
GT.WS[ws].newZ = true
GT.WS[ws].area = 'BORT_L'
GT.WS[ws].center = 'TARGET_KORTIK_1'
GT.WS[ws].angles = {
                    {math.rad(160), math.rad(0), math.rad(-5), math.rad(85)},  --lava_strana 
                    };
GT.WS[ws].reference_angle_Y = math.rad(0); 
GT.WS[ws].drawArgument1 = 17
GT.WS[ws].drawArgument2 = 18
__LN = add_launcher(GT_t.WS_t.stinger_manpad.LN[1], GT_t.LN_t.stinger);
GT.WS[ws].LN[1].BR = {  { connector_name = 'POINT_KORTIK_1_1' }, 
                        { connector_name = 'POINT_KORTIK_1_2' }, 
						{ connector_name = 'POINT_KORTIK_1_3' },
                        { connector_name = 'POINT_KORTIK_1_4' }, 
						{ connector_name = 'POINT_KORTIK_1_5' }, 
						{ connector_name = 'POINT_KORTIK_1_6' } } 


ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.stinger_manpad.LN[1]);
GT.WS[ws].newZ = true
GT.WS[ws].area = 'BORT_R'
GT.WS[ws].center = 'TARGET_KORTIK_2'
GT.WS[ws].angles = {
                    {math.rad(0), math.rad(-160), math.rad(-5), math.rad(85)},  --prava_strana 
                    };
GT.WS[ws].reference_angle_Y = math.rad(0); 
GT.WS[ws].drawArgument1 = 19
GT.WS[ws].drawArgument2 = 20
__LN = add_launcher(GT_t.WS_t.stinger_manpad.LN[1], GT_t.LN_t.stinger);
GT.WS[ws].LN[1].BR = { { connector_name = 'POINT_KORTIK_2_1' }, 
                       { connector_name = 'POINT_KORTIK_2_2' }, 
					   { connector_name = 'POINT_KORTIK_2_3' },
                       { connector_name = 'POINT_KORTIK_2_4' }, 
					   { connector_name = 'POINT_KORTIK_2_5' }, 
					   { connector_name = 'POINT_KORTIK_2_6' } } 

-------------------------------------------------------------------------------------------------------------------------------------

GT.Name = "QuennElizabeth"
GT.DisplayName = _("R92 PA2")
GT.Rate = 5500.000000


GT.Sensors = {  OPTIC = {"long-range naval optics", "long-range naval LLTV", "long-range naval FLIR","generic tank daysight",},
                RADAR = {
                    "Patriot str",
                    "ticonderoga search radar",
                },
            };

GT.DetectionRange  = GT.airFindDist;
GT.ThreatRange = GT.airWeaponDist;
GT.Singleton   ="no";
GT.mapclasskey = "P0091000065";



   

--GT.attribute = {wsType_Navy,wsType_Ship,wsType_AirCarrier,
GT.attribute = {wsType_Navy,wsType_Ship,wsType_AirCarrier,Kuznecow,
---GT.attribute = {wsType_Navy,wsType_Ship,wsType_ArmedShip,wsType_GenericLightArmoredShip,
                    "Aircraft Carriers",
                    "cord",
                    "ski_jump",
                    "RADAR_BAND1_FOR_ARM",
				};



GT.Categories = {
					{name = "AircraftCarrier"},
					--{name = "AircraftCarrier With Tramplin"},
					{name = "AircraftCarrier With Catapult"},
					{name = "Armed Ship"},
				};



   
----GT.Countries = { "France",};        
--------------------------------------------------------------------------------

        
add_surface_unit(GT)
