% MPX-5, Sea Leval
% trim a vehicle by finding v and hdot
%   as a function of alpha and thrust
% constants
title_string='MPX-5, Sea Level'
Bhpmin=0;
Bhpmax=0.9;
alphamin=2/57.3;
alphamax=25/57.3;
N_bhp=11;
N_alpha=11;
inc=(Bhpmax-Bhpmin)/(N_bhp-1);
data=[];
%
cl0=0.10257;
cla=2.9842;
cd0=.015;
k=.0668;
weight=19.2; % lbf
s=9.375;     % ft^2
rho=.002378; % for sea level
phit=0;
EtaP=0.65;


parameter(1)=cl0;
parameter(2)=cla;
parameter(3)=cd0;
parameter(4)=k;
parameter(5)=weight;
parameter(6)=s;
parameter(7)=rho;
parameter(8)=phit;
parameter(9)=EtaP;


for Bhp=Bhpmin:inc:Bhpmax;
	temp=trimalpha(alphamin,alphamax,Bhp,N_alpha,parameter);
	data=[data;temp];
end
format short e
save data
disp('MPX-5, Sea Level')
data
%data=[v(ft/sec),hdot(ft/sec),alpha(rad),Bhp(hp),cost]
% v=data(:,1);
% hdot=data(:,2);
% alpha=data(:,3);
% Bhp=data(:,4);
% cost=data(:,5);
