function [Xw,Xh,Xac_LE,Xac,Xac_wb,Xac_w,Xac_h,XacP_c_h,XacP_c_w,Xbar]=Cma2(q,c_w,S_w,CLa_w,eta_h,S_h,deda,CLa_h,CLa_wb,xLE,Xcg)
%3.3 Cma

%q=.9047;
%c_w=1.1771;
%S_w=13.5;
%CLa_w=4.6458;
%CLa_h=3.5437;
%CLa_wb=1;

XacP_c_h=0.25;	%fig 3.9
K1=1.17; %from fig 3.10
K2=0; %from fig3.11
Xac_h=K1*(XacP_c_h-K2); %eqn 3.20

XacP_c_w=0.253;	%fig 3.9 - from report => calculated Xac_w/c_r_w due to improper call to 
															%primed value when coded
K1=1.17;		%from fig 3.10
K2=0;		%from fig 3.11
%Xac_w=K1*(XacP_c_w-K2);	%eqn 3.20
Xac_w=.3*c_w;

dmda=q*c_w/36.5* ( 2.5^2*1.5*.3+1.5^2*1.2*1.5); %eqn 3.22
dXac_b=-dmda/(q*S_w*c_w*CLa_w);	%eqn 3.21

Xac_wb=Xac_w + dXac_b;  %eqn 3.19

Xac = ( Xac_wb+CLa_h/CLa_wb*eta_h*S_h/S_w*Xac_h*(1-deda) ) / (1+CLa_h/CLa_wb*eta_h*S_h/S_w*(1-deda));
			%eqn 3.18
Xac_LE=xLE+Xac; %aerodynamic center from nose

%change sign to get pos number in Xh
Xw=Xcg-Xac_w;
Xh=-Xac_h+Xcg;
Xbar=Xw;
return