g = 9.81;


Long = 18;

tanCal_left = 0.042; %Max LD
tanCal_right = 0.042;
tanCal_pitch = 0;

alpha_left = alpha_foils*pi/180;
alpha_right = alpha_foils*pi/180;

y_foil_left = 12- G_shift;
y_foil_right = -12- G_shift;

L_mast = 27;

x_sail = x_foils;
y_sail = 0- G_shift;
z_sail = z_foils + L_mast/3;
A_sail = 165;
Baume = 10;
A_structure = 50;
CD_structure = 0.0;


Ix = 4e5;%2e5
Iy = 2e5;
Iz = 3.5e5;
M = 7e3;

E_foils = 6.5;
Chord = 0.5;

%Min & max chord for the hydrofoils
Chord_min = 0.2;
Chord_max = 2.5;
epsilon = 1e-2;


rho = 1e3;
rho_air = 1.293;

E_yaw = 3.6;%2;

Env_pitch = 2;

Chord_yaw = 0.3;
Chord_pitch = 0.3;

A_pitch = Env_pitch*Chord_pitch; 


x_yaw = -0.5*Long;
y_yaw = 0 - G_shift;
z_yaw = z_foils-1.5;%E_yaw/2 - 5;

x_pitch = -0.5*Long;
y_pitch = 0 - G_shift;
z_pitch = z_yaw - E_yaw;

Wind = 10;
Wind_x = -Wind*cos(Wind_angle);
Wind_y = -Wind*sin(Wind_angle);

Env = y_foil_left - y_foil_right;

Lambda0 = 1.7*Env;
Wave_angle0 = pi/4;
Wave_amp0 = 0.6;
V_wave0 = 0;


Lambda = Lambda0*[1/3 1/5];
Wave_angle = Wave_angle0 + [0.5*pi/4 1*pi/4];
Wave_amp = Wave_amp0*[1/2 1/4];
V_wave = V_wave0*[0.5 0.25];

N = length(Lambda);


Wave_param