clear
clear functions
close all
ifig=0;
hold off
disp(' '); disp('>>> Start of script. <<<'); disp(' ')
echo on
% Script to design an end-to-end propulsion system for an
% electric-powered propeller-driven aircraft.
% Given:
%   drag polar, 
%   aircraft weight, air density, 
%   pitch to diameter ratio of the prop and prop data,
%   motor constants for a particular motor.
%
% Find:
%   speed for maximum endurance,
%   propeller diameter,
%   gear ratio,
%   voltage at which to operate the motor,
%   battery sizes to acheive the desited battery voltage,
%   endurance for single strand and dual strand batteries,
%   for an aircraft flying straight and level.
%
% PHASE 1: AIRCRAFT SUBSYSTEM
%
% This data is roughly for the Boiler Express Aircraft
CD0=.0240; % drag coefficient when CL=0.
A=9; % aspect ratio span squared divided by reference area
e=.75; % Oswalds efficiency factor
V=10:1:40; % velocity in ft/sec
rho=.002377; % air density in slugs/ft^3
W= 10.25;    % aircraft weight in pounds (lbf)
S=   13.5;   % wing area

[Pop,Vop,EtaAircraft,Pre,Ve,ifig]=DesignAircraft(W,rho,S,CD0,A,e,V,ifig);
[Pop,Vop,EtaAircraft,Pre,Ve,ifig]=DesignAircraft2(W,rho,S,CD0,A,e,V,ifig);

echo off
