Chord_right = Chord_max - (Chord_max - Chord_min)*(EE_right/E_foils);
Chord_left = Chord_max - (Chord_max - Chord_min)*(EE_left/E_foils);

A_left = 0.5*(Chord_left + Chord_min)*(E_foils - EE_left);
A_right = 0.5*(Chord_right + Chord_min)*(E_foils - EE_right);
A_yaw = Chord*(E_yaw - EE_yaw);

AR_left = ((E_foils-EE_left)^2)/A_left;
AR_right = ((E_foils-EE_right)^2)/A_right;

AR_yaw = A_yaw/Chord^2;
AR_pitch = A_pitch/Chord^2;

AR_sail = 4.4;

%Lift reduction due to AR is supposed polynomial, degree gamma

gamma = 1;


CL_left = (1 - (EE_left/E_foils)^gamma)*6.3802*Tan_AoA_left;
CD_left = 0.00485054892829 + 0.09060697805806*Tan_AoA_left^2 + 0.5*CL_left^2/(pi*AR_left);

CL_right = (1 - (EE_right/E_foils)^gamma)*6.3802*Tan_AoA_right;
CD_right = 0.00485054892829 + 0.09060697805806*Tan_AoA_right^2 + 0.5*CL_right^2/(pi*AR_right);

CL_yaw = 6.3802*Tan_AoA_yaw;
CD_yaw = 0.00485054892829 + 0.09060697805806*Tan_AoA_yaw^2 + 0.5*CL_yaw^2/(pi*AR_yaw);

CL_pitch = 6.3802*Tan_AoA_pitch;
CD_pitch = 0.00485054892829 + 0.09060697805806*Tan_AoA_pitch^2 + CL_pitch^2/(pi*AR_pitch);

%CL_sail = 2*Tan_AoA_sail;%tanCal_sail;
%CD_sail = 0.009 + 0.02*Tan_AoA_sail + 0.26*Tan_AoA_sail^2;% + CL_sail^2/(pi*AR_sail);

CL_sail = 1*Tan_AoA_sail;%tanCal_sail;
CD_sail = 0.0044 + 0.0102*Tan_AoA_sail + 0.1285*Tan_AoA_sail^2;% + CL_sail^2/(pi*AR_sail);
