mount_vfs_model_path	(current_mod_path.."/Shapes/")
mount_vfs_texture_path  (current_mod_path.."/Textures/CharlesdeGaulle_Carrier.zip")


GT = {};
GT_t.ws = 0;

set_recursive_metatable(GT, GT_t.generic_ship)

GT.visual = {}
GT.visual.shape = "CharlesdeGaulle"
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.animation_arguments.arresting_wires = {101, 102, 103, 104, 105, 106, 107, 108};
GT.animation_arguments.blast_fences = {61, 62, 63, 64};
GT.animation_arguments.water_propeller = 65;


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 = -132;  --koniec_lode
GT.Tail_Width = 40; --sirka_vlnenia_za_lodou
----------------------
GT.Gamma_max = 0.35;
--GT.Om = 0.05;
GT.Om = 1.05;
GT.speedup = 0.119249;
GT.R_min = 665.8;
GT.distFindObstacles = 1048.7;

GT.numParking = 2;
GT.Plane_Num_ = 40;
GT.Helicopter_Num_ = 6;

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


--------------------------------------------------------------------------------                
GT.cord_points = {
        {-110.701,  21.198, -17.033}, {-105.19,   21.198, 17.574},
        {-98.849,   21.198, -19.022}, {-93.338,   21.198, 15.585},
        {-86.718,   21.198, -20.494}, {-81.207,   21.198, 14.113},
        {-74.601,   21.198, -22.845}, {-69.09,    21.198, 11.762},
                }                 
----------------------------------
GT.LSOPosition = {88.0, 22.198, 31.0, 0.0, 0.0} 
GT.Landing_Point = {-1.0, 21.198, 0.0}


GT.WS = {}
local ws;
GT.WS.maxTargetDetectionRange = 450000;
GT.WS.radar_type = 102
--------------------------------------------------------------------------------
GT.DM = {
  { area_name = "NOSE_R",			area_arg = 70,	area_life = 110, area_fire = { pos = {71.0, 6.0, 9.5}, size = 0.8}},       --  
  { area_name = "NOSE_L", 		area_arg = 73,	area_life = 110, area_fire = { pos = {63.0, 10.6, -5.1}, size = 0.8}},     --
  { area_name = "BORT_R",			area_arg = 71,	area_life = 110, area_fire = { pos = {-30.4,  5.9, 17.4}, size = 0.8}},    -- 
  { area_name = "BORT_L", 		area_arg = 74,	area_life = 110, area_fire = { pos = {-24.0,  20.0, -15.9}, size = 0.8}},  --  
  { area_name = "KORMA_R", 		area_arg = 72,	area_life = 110, area_fire = { pos = {-123.0, 5.9, 19.5}, size = 0.8}},    --   
  { area_name = "KORMA_L", 		area_arg = 75,	area_life = 110, area_fire = { pos = {-118.0, 5.2, -12.2}, size = 0.8}},   -- 
	{ area_name = "KORMA_BACK", area_arg = 79,	area_life = 110, area_fire = { pos = {-159.0, 6.9, -0.3}, size = 0.7}},    -- 
  { area_name = "KABINA",			area_arg = 80,	area_life = 110, area_fire = { pos = {0.0, 28.0, 24.0}, size = 1.7}},      -- 
    
	--{ area_name = "NOSE_TOP",		area_arg = 76,	area_life = 80,  area_fire = { pos = {41.5, 7.5, 0.0}, size = 0.5}},
  --{ area_name = "RUBKA_TOP",		area_arg = 77,	area_life = 100,},
	--{ area_name = "HP",				area_arg = 78,	area_life = 80,  area_fire = { pos = {-44.0, 9.6, 0.0}, size = 0.5}},
	--{ area_name = "KABINA",			area_arg = 80,	area_life = 220, area_fire = { pos = {29.0, 15.0, 0.0}, size = 1.5}},
	--{ area_name = "BORT_TOP_Back", 	area_arg = 81,	area_life = 80,  area_fire = { pos = {-62.5, 7.0, 0.0}, size = 0.5}},
	--{ area_name = "NADSTROYKA",		area_arg = 82,	area_life = 220, area_fire = { pos = {-23.0, 12.0, 0.0}, size = 1.5}},
	--{ area_name = "SUPERSTRUCTURE_Mid",	area_arg = 83,	area_life = 320, area_fire = { pos = {6.0, 8.0, 0.0}, size = 1.5}},
	--{ area_name = "KORMA_TOP", 		area_arg = 84,	area_life = 40, area_fire = { pos = {-80.5, 4.2, 0.0}, size = 1.0}},
  --{ area_name = "TOWER_NOSE",		area_arg = 97,	area_life = 60, area_fire = { pos = {53.0, 9.0, 0.0}, size = 0.5}},
	--{ area_name = "TOWER_KORMA",	area_arg = 98,	area_life = 60, area_fire = { pos = {-73.5, 5.5, 0.0}, size = 0.5}},
  --{ area_name = "ZA_R",			area_arg = 99,	area_life = 27, area_fire = { pos = {3.7, 17.15, 6.25}, size = 0.5}},
  --{ area_name = "ZA_L",			area_arg = 100,	area_life = 27, area_fire = { pos = {3.7, 17.15, -6.25}, size = 0.5}},
}
--------------------------------------------------------------------------------
--cannon systems


ws = GT_t.inc_ws();
GT.WS[ws] = {}
GT.WS[ws].center = 'CENTER_TOWER_01'
GT.WS[ws].drawArgument1 = 30
GT.WS[ws].drawArgument2 = 31
GT.WS[ws].angles = {
                    {math.rad(160), math.rad(0), math.rad(-5), math.rad(85)},   --toto_funguje_pre_lavu_stranu{prve_toci_canon_do_stran,druhe_toci_canon_do_opacnej_strany,tretie_je_max_sklon_dole,posledne_je_max_sklon_hore,}
                    };
GT.WS[ws].reference_angle_Y = math.rad(90);   --ako_je_otoceny_cannon_default_od_pozicie_nula
__LN = add_launcher(GT.WS[ws], GT_t.LN_t.automatic_gun_25mm);
__LN.BR[1].connector_name = 'Point_Gun_01'
------------------------------------------
ws = GT_t.inc_ws();
GT.WS[ws] = {}
GT.WS[ws].center = 'CENTER_TOWER_02'
GT.WS[ws].drawArgument1 = 32
GT.WS[ws].drawArgument2 = 33
GT.WS[ws].angles = {
                    {math.rad(0), math.rad(-160), math.rad(-5), math.rad(85)},  --toto_funguje_pre_pravu_stranu(stred) 
                    };
GT.WS[ws].reference_angle_Y = math.rad(-90);   --ako_je_otoceny_cannon_default_od_pozicie_nula
__LN = add_launcher(GT.WS[ws], GT_t.LN_t.automatic_gun_25mm);
__LN.BR[1].connector_name = 'Point_Gun_02'
------------------------------------------
ws = GT_t.inc_ws();
GT.WS[ws] = {}
GT.WS[ws].center = 'CENTER_TOWER_03'
GT.WS[ws].drawArgument1 = 34
GT.WS[ws].drawArgument2 = 35
GT.WS[ws].angles = {
                    {math.rad(0), math.rad(-140), math.rad(-5), math.rad(85)},  --toto_funguje_pre_pravu_stranu(predok)
                    };
GT.WS[ws].reference_angle_Y = math.rad(-90);   --ako_je_otoceny_cannon_default_od_pozicie_nula
__LN = add_launcher(GT.WS[ws], GT_t.LN_t.automatic_gun_25mm);
__LN.BR[1].connector_name = 'Point_Gun_03'
------------------------------------------
ws = GT_t.inc_ws();
GT.WS[ws] = {}
GT.WS[ws].center = 'CENTER_TOWER_04'
GT.WS[ws].drawArgument1 = 36
GT.WS[ws].drawArgument2 = 37
GT.WS[ws].angles = {
                    {math.rad(-80), math.rad(80), math.rad(-5), math.rad(85)},  --toto_funguje_pre_zadnu_stranu
                    };
GT.WS[ws].reference_angle_Y = math.rad(180);   --ako_je_otoceny_cannon_default_od_pozicie_nula
__LN = add_launcher(GT.WS[ws], GT_t.LN_t.automatic_gun_25mm);
__LN.BR[1].connector_name = 'Point_Gun_04'
--------------------------------------------------------------------------------
--missile_systems(ASTER15)


--Sylver_A43_VLS 

GT_t.WS_t.Sylver_A43_VLS = {}
GT_t.WS_t.Sylver_A43_VLS.moveable = false
GT_t.WS_t.Sylver_A43_VLS.angles = {
					{math.rad(180), math.rad(-180), math.rad(-90), math.rad(90)},
					};
GT_t.WS_t.Sylver_A43_VLS.LN = {}
GT_t.WS_t.Sylver_A43_VLS.LN[1] = {}
GT_t.WS_t.Sylver_A43_VLS.LN[1].type = 4
GT_t.WS_t.Sylver_A43_VLS.LN[1].distanceMin = 1700
GT_t.WS_t.Sylver_A43_VLS.LN[1].distanceMax = 30000
GT_t.WS_t.Sylver_A43_VLS.LN[1].reactionTime = 8
GT_t.WS_t.Sylver_A43_VLS.LN[1].launch_delay = 6;
GT_t.WS_t.Sylver_A43_VLS.LN[1].reflection_limit = 0.1;
GT_t.WS_t.Sylver_A43_VLS.LN[1].sensor = {}
set_recursive_metatable(GT_t.WS_t.Sylver_A43_VLS.LN[1].sensor, GT_t.WSN_t[0])
GT_t.WS_t.Sylver_A43_VLS.LN[1].PL = {}
GT_t.WS_t.Sylver_A43_VLS.LN[1].PL[1] = {}
GT_t.WS_t.Sylver_A43_VLS.LN[1].PL[1].ammo_capacity = 15
GT_t.WS_t.Sylver_A43_VLS.LN[1].PL[1].type_ammunition = {4,4,34,5}
GT_t.WS_t.Sylver_A43_VLS.LN[1].PL[1].name_ammunition = "ASTER15"
GT_t.WS_t.Sylver_A43_VLS.LN[1].PL[1].reload_time = 1000000; -- never during the mission
GT_t.WS_t.Sylver_A43_VLS.LN[1].BR = { {pos = {0, 0, 0} } }

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

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Sylver_A43_VLS )
GT.WS[ws].area = 'BORT_L'                                     
GT.WS[ws].center = 'Rocket_Point_04'
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 = 48;
GT.WS[ws].LN[1].BR = {
	{connector_name = 'Rocket_Point_01', drawArgument = 190},       
	{connector_name = 'Rocket_Point_02', drawArgument = 191},       
	{connector_name = 'Rocket_Point_03', drawArgument = 192},       
	{connector_name = 'Rocket_Point_04', drawArgument = 193},       
	{connector_name = 'Rocket_Point_05', drawArgument = 194},       
	{connector_name = 'Rocket_Point_06', drawArgument = 195},       
	{connector_name = 'Rocket_Point_07', drawArgument = 196},       
	{connector_name = 'Rocket_Point_08', drawArgument = 197},       
	{connector_name = 'Rocket_Point_09', drawArgument = 198},       
	{connector_name = 'Rocket_Point_10', drawArgument = 199},       
	{connector_name = 'Rocket_Point_11', drawArgument = 200},       
	{connector_name = 'Rocket_Point_12', drawArgument = 201},       
	{connector_name = 'Rocket_Point_13', drawArgument = 202},       
	{connector_name = 'Rocket_Point_14', drawArgument = 203},       
	{connector_name = 'Rocket_Point_15', drawArgument = 204},       
	{connector_name = 'Rocket_Point_16', drawArgument = 205}, }     
-------------------------------------------------------------

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.Sylver_A43_VLS )
GT.WS[ws].area = 'NOSE_R'                                      
GT.WS[ws].center = 'Rocket_Point_20'
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 = 48;
GT.WS[ws].LN[1].BR = {
	{connector_name = 'Rocket_Point_17', drawArgument = 206},       
	{connector_name = 'Rocket_Point_18', drawArgument = 207},       
	{connector_name = 'Rocket_Point_19', drawArgument = 208},       
	{connector_name = 'Rocket_Point_20', drawArgument = 209},       
	{connector_name = 'Rocket_Point_21', drawArgument = 210},       
	{connector_name = 'Rocket_Point_22', drawArgument = 211},       
	{connector_name = 'Rocket_Point_23', drawArgument = 212},       
	{connector_name = 'Rocket_Point_24', drawArgument = 213},	      
	{connector_name = 'Rocket_Point_25', drawArgument = 214},       
	{connector_name = 'Rocket_Point_26', drawArgument = 215},       
	{connector_name = 'Rocket_Point_27', drawArgument = 216},       
	{connector_name = 'Rocket_Point_28', drawArgument = 217},       
	{connector_name = 'Rocket_Point_29', drawArgument = 218},       
	{connector_name = 'Rocket_Point_30', drawArgument = 219},       
	{connector_name = 'Rocket_Point_31', drawArgument = 220},       
	{connector_name = 'Rocket_Point_32', drawArgument = 221}, }   
--------------------------------------------------------------------------------
--missile_systems(SADRAL)



GT_t.LN_t.mistral = {}
GT_t.LN_t.mistral.type = 4
GT_t.LN_t.mistral.distanceMin = 200
GT_t.LN_t.mistral.distanceMax = 4500
GT_t.LN_t.mistral.reactionTime = 2;
GT_t.LN_t.mistral.launch_delay = 1;
GT_t.LN_t.mistral.reflection_limit = 0.22
GT_t.LN_t.mistral.ECM_K = -1
GT_t.LN_t.mistral.sensor = {}
set_recursive_metatable(GT_t.LN_t.mistral.sensor, GT_t.WSN_t[0])
GT_t.LN_t.mistral.PL = {}
GT_t.LN_t.mistral.PL[1] = {}
GT_t.LN_t.mistral.PL[1].ammo_capacity = 3
GT_t.LN_t.mistral.PL[1].reload_time = 120;
GT_t.LN_t.mistral.PL[1].type_ammunition = {4,4,34,6}
GT_t.LN_t.mistral.PL[1].name_ammunition = "MISTRAL"
GT_t.LN_t.mistral.BR = { { pos = {1, 0, 0}, drawArgument = 4}, }

GT_t.WS_t.sadral_manpad = {}
GT_t.WS_t.sadral_manpad.pos = {-0.071, 1.623,0}
GT_t.WS_t.sadral_manpad.angles = {
					{math.rad(180), math.rad(-180), math.rad(-45), math.rad(80)},
					};
GT_t.WS_t.sadral_manpad.drawArgument1 = 0
GT_t.WS_t.sadral_manpad.drawArgument2 = 1
GT_t.WS_t.sadral_manpad.omegaY = 1.5;
GT_t.WS_t.sadral_manpad.omegaZ = 1.5;
GT_t.WS_t.sadral_manpad.pidY = {p=40,i=1.0,d=7, inn = 5};
GT_t.WS_t.sadral_manpad.pidZ = {p=40,i=1.0,d=7, inn = 5};
GT_t.WS_t.sadral_manpad.reloadAngleY = -100
GT_t.WS_t.sadral_manpad.LN = {}
GT_t.WS_t.sadral_manpad.LN[1] = {}
set_recursive_metatable(GT_t.WS_t.sadral_manpad.LN[1], GT_t.LN_t.mistral)
GT_t.WS_t.sadral_manpad.LN[1].launch_delay = 15;



----------------------------------
local ws;

ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.sadral_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.sadral_manpad.LN[1], GT_t.LN_t.mistral);
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.sadral_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.sadral_manpad.LN[1], GT_t.LN_t.mistral);
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 = "CharlesdeGaulle"
GT.DisplayName = _("CharlesdeGaulle")
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 = "P0091000067";
--------------------------------
--[[
GT.attribute = {wsType_Navy,wsType_Ship,wsType_ArmedShip,TICONDEROGA,
                    "Cruisers",
                    "RADAR_BAND1_FOR_ARM",
                    "DetectionByAWACS",
				};
GT.Categories = {
          {name = "HelicopterCarrier"},
					{name = "Armed Ship"}                                                                                                                                                             
					
				}; 
           ]]
--------------------------------
GT.attribute = {wsType_Navy,wsType_Ship,wsType_AirCarrier,
                    "Aircraft Carriers",
                    "cord",
                    "ski_jump",
                    "RADAR_BAND1_FOR_ARM",
				};



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

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

        
add_surface_unit(GT)