% Script to generate rate of climb data for Warrior 3
% Use data on page 5-19 of the Pilot's Information Manual
HP=0:1000:13000;
wt=2440*ones(size(HP)); %lbf
Vikts=79*ones(size(HP)); %Knots
[temp,press,rho,Hgeopvector]=atmosphere4(HP,0)

% data for ISA -15 degC
hdot1=[677 628 578 528 478 429 379 330 280 231 181 132 83 33] % fpm
deltaF1=-15*9/5
degF1=temp-459.67+deltaF1


% data for ISA  degC
hdot2=[644 595 545 495 446 396 346 298 248 198 149 99 49 0]; % fpm
degF2=temp-459.67


% data for ISA +30 degC
hdot3=[585 534 485 436 386 337 287 238 188 138 89 40 -10 -60]; % fpm
deltaF3=30*9/5
degF3=temp-459.67+deltaF3

hp=[HP HP HP]
TdegF=[degF1 degF2 degF3]
hdot=[hdot1 hdot2 hdot3]
W=[wt wt wt]
Viknots=[Vikts Vikts Vikts]

% Write data to command window
n=length(hp);
str2=['% Hp(ft)   OAT (degF)   Hdot(ft/min) Wt(lbf) Vi(knots)  for Warrior 3'];
disp(' '); disp(str2)
for i=1:n
    strx=[num2str(hp(i)),'       ',num2str(TdegF(i)),'       ',num2str(hdot(i)),'       ',num2str(W(i)),'       ',num2str(Viknots(i))];
    disp(strx)
end

disp(' '); disp('Copy the above data into a text file called Warrior 3_Glide_Data.txt.')
disp('This file is the input file for Step_1Alternate_Glide_Warrior3.m.')
format loose