EE_right_flat(1,1) =(z+x_foils*sin(psi)*sin(phi)-x_foils*cos(psi)*sin(theta)*cos(phi)+cos(psi)*sin(phi)*y_foil_right+sin(psi)*sin(theta)*cos(phi)*y_foil_right+cos(theta)*cos(phi)*z_foils)/(-cos(psi)*sin(phi)*cos(alpha_right)-sin(psi)*sin(theta)*cos(phi)*cos(alpha_right)+cos(theta)*cos(phi)*sin(alpha_right)); 
EE_left_flat(1,1) =(z+x_foils*sin(psi)*sin(phi)-x_foils*cos(psi)*sin(theta)*cos(phi)+cos(psi)*sin(phi)*y_foil_left+sin(psi)*sin(theta)*cos(phi)*y_foil_left+cos(theta)*cos(phi)*z_foils)/(cos(psi)*sin(phi)*cos(alpha_left)+sin(psi)*sin(theta)*cos(phi)*cos(alpha_left)+cos(theta)*cos(phi)*sin(alpha_left)); 
EE_yaw_flat(1,1) =-1/cos(theta)/cos(phi)*(-z-x_yaw*sin(psi)*sin(phi)+x_yaw*cos(psi)*sin(theta)*cos(phi)-y_yaw*cos(psi)*sin(phi)-y_yaw*sin(psi)*sin(theta)*cos(phi)-cos(theta)*cos(phi)*z_yaw); 
