Tan_AoA_left(1,1) =(sin(alpha_left)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)-cos(alpha_left)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)+sin(alpha_left)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left)))-cos(alpha_left)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))/(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left))-(dphi*sin(theta)+dpsi)*(y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left)))+tanCal_left; 
Tan_AoA_right(1,1) =(-sin(alpha_right)*(-sin(psi)*cos(theta)*dx+(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy+(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz)-cos(alpha_right)*(sin(theta)*dx-cos(theta)*sin(phi)*dy+cos(theta)*cos(phi)*dz)-sin(alpha_right)*((dphi*sin(theta)+dpsi)*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right)))-cos(alpha_right)*((dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right))-(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max)))/(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right))-(dphi*sin(theta)+dpsi)*(y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right)))+tanCal_right; 
Tan_AoA_pitch(1,1) =(-sin(theta)*dx+cos(theta)*sin(phi)*dy-cos(theta)*cos(phi)*dz-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*y_pitch+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*x_pitch)/(cos(psi)*cos(theta)*dx+dy*sin(psi)*cos(phi)+dy*cos(psi)*sin(theta)*sin(phi)+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_pitch-(dphi*sin(theta)+dpsi)*y_pitch)+tanCal_pitch; 
Tan_AoA_yaw(1,1) =(sin(psi)*cos(theta)*dx-(cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi))*dy-(cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi))*dz-(dphi*sin(theta)+dpsi)*x_yaw+(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw))/(cos(psi)*cos(theta)*dx+(sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi))*dy+(sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi))*dz+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*(z_yaw-1/2*E_yaw-1/2*EE_yaw)-(dphi*sin(theta)+dpsi)*y_yaw)+tanCal_yaw; 
Tan_AoA_sail(1,1) =(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)+(dphi*sin(theta)+dpsi)*(x_sail-1/3*Baume/(1+tanAngle_sail^2)^(1/2))-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*z_sail-(cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_sail-(dphi*sin(theta)+dpsi)*(y_sail-1/3*Baume*tanAngle_sail/(1+tanAngle_sail^2)^(1/2)))*tanAngle_sail)/(cos(psi)*cos(theta)*dx-cos(psi)*cos(theta)*Wind_x+dy*sin(psi)*cos(phi)-sin(psi)*cos(phi)*Wind_y+dy*cos(psi)*sin(theta)*sin(phi)-cos(psi)*sin(theta)*sin(phi)*Wind_y+dz*sin(psi)*sin(phi)-dz*cos(psi)*sin(theta)*cos(phi)+(-dphi*sin(psi)*cos(theta)+dtheta*cos(psi))*z_sail-(dphi*sin(theta)+dpsi)*(y_sail-1/3*Baume*tanAngle_sail/(1+tanAngle_sail^2)^(1/2))+(-sin(psi)*cos(theta)*dx+sin(psi)*cos(theta)*Wind_x+dy*cos(psi)*cos(phi)-cos(psi)*cos(phi)*Wind_y-dy*sin(psi)*sin(theta)*sin(phi)+sin(psi)*sin(theta)*sin(phi)*Wind_y+dz*cos(psi)*sin(phi)+dz*sin(psi)*sin(theta)*cos(phi)+(dphi*sin(theta)+dpsi)*(x_sail-1/3*Baume/(1+tanAngle_sail^2)^(1/2))-(dphi*cos(psi)*cos(theta)+dtheta*sin(psi))*z_sail)*tanAngle_sail); 
