close all
clear all

rho = 1025;
L = 1;
c = .75;
A = L*c;

D_AOA = [0  10  70   145  170 180];
D_CM =  [-0 -0 -0.4 -0.4 -0.3  -0];
D_AOA = D_AOA*pi/180;

u = 1;
aoa = 0:.01:pi;

for i = 1:length(aoa)

  [CL, CD] = Coef0015(aoa(i));
  Dy = (0.5*CD*rho*A*u^2)*sin(aoa(i));
  Ly = (0.5*CL*rho*A*u^2)*cos(aoa(i));

  
  CM = interp1(D_AOA,D_CM,aoa(i));
  M = (0.5*CM*rho*A*u.^2)*c;
  
  
  ddf(i) = M/(-c*(Dy+Ly))+.25;

end



D_AOA = [0    10  25 65 90 115 155 170 180];
D_df =  [.25 .25 .38 .47 .5 .53 .62 .75 .75];


plot(aoa*180/pi,ddf,D_AOA,D_df,aoa*180/pi,df(aoa));