function F_W = F_Wing(body,RB,n,name,inc_wave,k,b)

j = 0;
for i = 1:length(RB)
name2 = get(RB{i},'name');
  if(strcmp(name2,name))
    j = i;
  end
end
if(j == 0)
   error('ERROR: Can not find name match in F_Wing');
end

body2 = RB{j};



rho = get(body,'rho');

[V alpha] = relative_vel(body,n,body2,inc_wave);

V

%figure(4)
%plot(alpha*180/pi,V,'x');
%hold on 

Area = get(body,'Area');
[Cl Cd]=Coef0015(alpha);
L = .5*rho*Area(3)*V^2*Cl;
D = .5*rho*Area(3)*V^2*Cd;


%disp(['aoa = ',num2str(alpha*180/pi),' L = ',num2str(L),' D = ',num2str(D)]);

sv = body.sv;
theta = sv(5);
beta = alpha+theta;


F_W = zeros(1,6);
F_W(1) = L*sin(beta)-D*cos(beta);
F_W(2) = 0;
F_W(3) = L*cos(beta)+D*sin(beta);

%disp(['beta = ',num2str(beta*180/pi),' F_W(1) = ',num2str(F_W(1)),' F_W(3) = ',num2str(F_W(3))]);

theta_optimum = 10*pi/180;
theta_max = 20*pi/180;
th_target = theta_target(beta,theta_optimum,theta_max);


F_W(5) = -k*(sv(5)-th_target)-b*sv(11);
