--mount_vfs_texture_path  (current_mod_path.."/Textures/Navy/santa_fe/santa_fe.zip")

GT = {};
GT_t.ws = 0;

set_recursive_metatable(GT, GT_t.generic_ship)

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

GT.life              = 3;
GT.mass              = 5.30e+006;
GT.max_velocity      = 14.9
GT.race_velocity     = 14.9
GT.economy_velocity  = 5.15
GT.economy_distance  = 7.2e+007
GT.race_distance     = 7.2e+006
GT.shipLength        = 64
GT.Width             = 6.3
GT.Height            = 6
GT.Length            = 65
GT.DeckLevel         = 3.0
GT.baseSubmersion    = 6.8;
GT.X_nose            = 30.3
GT.X_tail            = -34.7
GT.Tail_Width        = 1
GT.draft			 = 6

GT.Gamma_max         = 0.25
GT.Om                = 0.01
GT.speedup           = 0.4
GT.R_min             = 345.6
GT.distFindObstacles = 568.4
GT.airWeaponDist     = 30000
GT.airFindDist       = 10000

GT.minPeriscopeDepth = 9;  
GT.maxPeriscopeDepth = 12.0;

GT.animation_arguments = {
    nav_lights       = 69, 
    radar1_rotation  = -1,
    radar2_rotation  = -1,
    radar3_rotation  = -1,
    flag_animation   = -1,
    water_propeller  = 65,
    locator_rotation = 1,
    periscope        = 18,
	
}

GT.DM = {
	{ area_name = "HULL", 			area_arg = 82,	area_life = 10, area_fire = { pos = {-3.5, 2.5, 0.0}, size = 0.4}},
	{ area_name = "PROP",  			area_arg = 83,	area_life = 5},
		}	

GT.propeller_omega_max                 = 120.0

local start_diving_  = 1
local stop_diving_   = 15
local start_rising_  = stop_diving_
local stop_rising_   = 20

local totalDuration_ = stop_rising_

GT.toggle_alarm_state_interval = totalDuration_

GT.animation_arguments.alarm_state_sequence =
{
    totalDuration = totalDuration_,
    { 3, {{startTime=0.0, endTime = start_diving_, startVal = 0.0, endVal = 0.0},
          {startTime=start_diving_, endTime = stop_diving_, startVal = 0.0, endVal = 0.75},
          {startTime=start_rising_, endTime = totalDuration_, startVal = 0.75, endVal = 0.75}}
    },
 -- periscope etc
    {14, {{startTime=0.0, endTime = start_rising_, startVal = 0.0, endVal = 0.0},
          {startTime=start_rising_, endTime = stop_rising_, startVal = 0.0, endVal = 1.0},
          {startTime=stop_rising_, endTime = totalDuration_, startVal = 1.0, endVal = 1.0}}
    },
    {15, {{startTime=0.0, endTime = start_rising_, startVal = 0.0, endVal = 0.0},
          {startTime=start_rising_, endTime = stop_rising_, startVal = 0.0, endVal = 1.0},
          {startTime=stop_rising_, endTime = totalDuration_, startVal = 1.0, endVal = 1.0}}
    },
    --{16, {{startTime=0.0, endTime = start_diving_, startVal = 0.0, endVal = 1.0},
    --     {startTime=start_diving_, endTime = stop_diving_/3.0, startVal = 0.0, endVal = 1.0},
    --     {startTime=stop_diving_/3.0, endTime = totalDuration_, startVal = 0.0, endVal = 0.0}}
    --},
    {18, {{startTime=0.0, endTime = start_diving_, startVal = 0.0, endVal = 1.0},
         {startTime=start_diving_, endTime = stop_diving_/3.0, startVal = 0.0, endVal = 1.0},
         {startTime=stop_diving_/3.0, endTime = totalDuration_, startVal = 0.0, endVal = 0.0}}
    },
}

-- {depth, fx_dx, fx_len, fx_width)
                -- Depth : profondeur à laquelle s'appliquent les caracteristiques du sillage
                -- fx_dx : distance from stern to stern fx position / distance de la poupe à la poupe position fx
                -- fx_len : distance from bow to stern fx /  distance de la proue à la poupe fx
                -- fx_width : largeur de la trainée à l'arrière du sous-marin    
                -- les profondeurs sont en mètre : 1 pied = 0.305 m  /   1m = 3.28 pied

GT.sternEffectDX = {
					{6.0, 10.0, 41.0, 4.0},
					{8.5, 10.0, 41.0, 3.0},
					{10.5, -15.0, 21.0, 2.0},
					{12.5, -20.0, 21.0, 1.0},
					{16.4, -25.0, 5.0, 0.0},
				}

GT.WS = {};
GT.WS.maxTargetDetectionRange = 450000;
GT.WS.radar_type = 102;
GT.WS.searchRadarMaxElevation = math.rad(60);
GT.WS.searchRadarFrequencies = {{50.0e6, 54.0e6}, {2.0e9, 2.2e9}}

local ws;

ws = GT_t.inc_ws();
GT.WS[ws] = {};
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.ship_Torpedo84 );
GT.WS[ws].reference_angle_Z = math.rad(5);
GT.WS[ws].canSetTacticalDir = false
GT.WS[ws].LN[1].BR = {
	{connector_name = 'TPO_01', recoilArgument = 177, recoilT0 = -1, recoilT1 = -0.5, recoilT2 = 0.5, recoilTime = 1.0},
	{connector_name = 'TPO_02', recoilArgument = 178, recoilT0 = -1, recoilT1 = -0.5, recoilT2 = 0.5, recoilTime = 1.0},
	{connector_name = 'TPO_03', recoilArgument = 179, recoilT0 = -1, recoilT1 = -0.5, recoilT2 = 0.5, recoilTime = 1.0},
	{connector_name = 'TPO_04', recoilArgument = 180, recoilT0 = -1, recoilT1 = -0.5, recoilT2 = 0.5, recoilTime = 1.0},
	{connector_name = 'TPO_05', recoilArgument = 181, recoilT0 = -1, recoilT1 = -0.5, recoilT2 = 0.5, recoilTime = 1.0},
	{connector_name = 'TPO_06', recoilArgument = 182, recoilT0 = -1, recoilT1 = -0.5, recoilT2 = 0.5, recoilTime = 1.0},
	{connector_name = 'TPO_07', recoilArgument = 183, recoilT0 = -1, recoilT1 = -0.5, recoilT2 = 0.5, recoilTime = 1.0},
	{connector_name = 'TPO_08', recoilArgument = 184, recoilT0 = -1, recoilT1 = -0.5, recoilT2 = 0.5, recoilTime = 1.0},
}

-- Harpoon
----------------  Classe Burke: 4 tubi di lancio dei missili Harpoon----------------------------------------------------------------------------
ws = GT_t.inc_ws();
GT.WS[ws] = {}
set_recursive_metatable(GT.WS[ws], GT_t.WS_t.ship_HARPOON )
GT.WS[ws].area = '';
GT.WS[ws].center = 'Rocket_Point_1'
GT.WS[ws].pos = {59.0,-0.0,7.50}

GT.WS[ws].LN[1].show_external_missile = false
GT.WS[ws].LN[1].PL[1].ammo_capacity = 4;
GT.WS[ws].LN[1].BR = {
		{connector_name = 'Rocket_Point_1', drawArgument = 153},
}


GT.Name = "HS_214"
GT.DisplayName = _("HS Type-214 Papanikolis Class")
GT.Rate = 50

GT.Sensors =
{
    OPTIC = {
        "long-range naval optics",
        "long-range naval LLTV",
        "long-range naval FLIR",
    },
    RADAR = {
        "PLAN Search Radar B",
        "052B SAM TR",
    }
};


GT.Singleton      = "no";
GT.mapclasskey    = "P0091000038";

GT.attribute = {
    wsType_Navy, wsType_Ship, wsType_Submarine, WSTYPE_PLACEHOLDER,
    "Submarines",
    "RADAR_BAND1_FOR_ARM",
    "DetectionByAWACS",
};


GT.tags  =
{
	"Submarine",
}
--GT.Countries = {'China', 'Russia', 'Argentina',};
GT.Countries = {'Greece',};
--GT.Countries = {'USA', 'ARG',};
--GT.Countries = {'USA', 'Chile',};
add_surface_unit(GT);