% Thrust Trim Maps

load data
ifig=0;
clf
v=data(:,1);
hdot=data(:,2);
alpha=data(:,3);
thrust=data(:,4);
cost=data(:,5);
gamma=asin(hdot./v);
[n,m]=size(alpha);
t=zeros(11,1);
vv=zeros(11,1);
h=zeros(11,1);
int=zeros(11,1);

%%%%%  speed versus thrust
symb=['mo-';'cx-';'r+-';'g*-';'bs-';'md-';'cv-';'r^-';'g<-';'b>-';'ms-']

ifig=ifig+1;
figure(ifig)
clf
%plot(thrust,v,'+')
%plot(thrust,v)
title('Lear Jet trim speed versus thrust, clean, w=13000, h=39000ft')
xlabel('thrust (lbf)')
ylabel('speed (ft/sec)')

axis;
hold on
for i=1:11 
	for j=0:1:10; int(j+1)= j*11 + i; t(j+1)=thrust(j*11 + i); vv(j+1)=v(j*11 + i); end
	plot(t,vv,symb(i,:))
	%symb(i,:)
end
hold off
legend('alpha=0','alpha=1.2','alpha=2.4','alpha=3.6','alpha=4.8','alpha=6.0',...
      'alpha=7.2','alpha=8.4','alpha=9.6','alpha=10.8','alpha=12.0',-1)

	  
% hdot versus thrust
ifig=ifig+1;
figure(ifig)
clf
%plot(thrust,hdot,'+')
title('Lear Jet trim vertical velocity versus thrust, clean, w=13000, h=39000ft')
xlabel('thrust (lbf)')
ylabel('hdot (ft/sec)')
hold on
for i=1:11 
	for j=0:10; t(j+1)=thrust(j*11 + i); h(j+1)=hdot(j*11 + i); end
	plot(t,h,symb(i,:))
	%symb(i,:)
end
hold off
legend('alpha=0','alpha=1.2','alpha=2.4','alpha=3.6','alpha=4.8','alpha=6.0',...
      'alpha=7.2','alpha=8.4','alpha=9.6','alpha=10.8','alpha=12.0',-1)
	  
% gamma versus thrust
ifig=ifig+1;
figure(ifig)
clf
title('Lear Jet trim gamma versus thrust, clean, w=13000, h=39000ft')
xlabel('thrust (lbf)')
ylabel('gamma (deg)')
hold on
for i=1:11 
	for j=0:10; t(j+1)=thrust(j*11 + i); h(j+1)=57.3*gamma(j*11 + i); end
	plot(t,h,symb(i,:))
	%symb(i,:)
end
hold off
legend('alpha=0','alpha=1.2','alpha=2.4','alpha=3.6','alpha=4.8','alpha=6.0',...
      'alpha=7.2','alpha=8.4','alpha=9.6','alpha=10.8','alpha=12.0',-1)
	  


