Phimat(1,1) =cos(psi)*cos(theta); 
Phimat(1,2) =sin(psi)*cos(phi)+cos(psi)*sin(theta)*sin(phi); 
Phimat(1,3) =sin(psi)*sin(phi)-cos(psi)*sin(theta)*cos(phi); 
Phimat(2,1) =-sin(psi)*cos(theta); 
Phimat(2,2) =cos(psi)*cos(phi)-sin(psi)*sin(theta)*sin(phi); 
Phimat(2,3) =cos(psi)*sin(phi)+sin(psi)*sin(theta)*cos(phi); 
Phimat(3,1) =sin(theta); 
Phimat(3,2) =-cos(theta)*sin(phi); 
Phimat(3,3) =cos(theta)*cos(phi); 
GA_right(1,1) =x_foils+1/3*EE_right*(Chord_max-Chord_min)/E_foils-1/3*Chord_max; 
GA_right(2,1) =y_foil_right+cos(alpha_right)*(1/3*E_foils+2/3*EE_right); 
GA_right(3,1) =z_foils-sin(alpha_right)*(1/3*E_foils+2/3*EE_right); 
GA_left(1,1) =x_foils+1/3*EE_left*(Chord_max-Chord_min)/E_foils-1/3*Chord_max; 
GA_left(2,1) =y_foil_left+cos(alpha_left)*(-1/3*E_foils-2/3*EE_left); 
GA_left(3,1) =z_foils+sin(alpha_left)*(-1/3*E_foils-2/3*EE_left); 
GA_yaw(1,1) =x_yaw; 
GA_yaw(2,1) =y_yaw; 
GA_yaw(3,1) =z_yaw-1/2*E_yaw-1/2*EE_yaw; 
GA_pitch(1,1) =x_pitch; 
GA_pitch(2,1) =y_pitch; 
GA_pitch(3,1) =z_pitch; 
