Demonstrate use of the cost model

%--------------------------------------------------------------------------
%   Copyright (c) 2019 Princeton Satellite Systems, Inc.
%   All rights reserve
%--------------------------------------------------------------------------
%   Since version 2019.1
%--------------------------------------------------------------------------


CPI_1982    = 96.5;
CPI_2013    = 233;
CEF_1982    = 1 + (CPI_2013 - CPI_1982)/CPI_1982;
costH2      = 4.50*CEF_1982; % 1982
mPSToKnots  = 1.94384;
kgToLbm     = 2.205;
rhoH2       = 70.85; % kg/m^3
mach        = 3;
alt         = 15000;
p           = StdAtm(alt);
v           = mach*p.speedOfSound*mPSToKnots;
year        = 2013;
cPI         = 233;
r_bl        = 200; % nm
mass        = 5.8578e+03;
massFuel    = 2.2422e+03;
massH2      = 1.9545e+03;
wFuel       = massFuel*kgToLbm;
W_ampr      = mass*kgToLbm;
costFuel    = (costH2*massH2)/massFuel;
rhoFuel     = rhoH2;

AircraftCostCalculation('weight',                          W_ampr,...
                'cpi_now',                                  cPI,...
                'speed',                                    v,...
                'cost per engine',                          20e6,...
                'number of static test airplanes',          1,...
                'number of rdte airplanes',                 2,...
                'number of engines',                        2,...
                'block distance',                           r_bl,...
                'fuel weight',                              wFuel,...
                'fuel price',                               costFuel,...
                'fuel density',                             rhoFuel,...
                'number of years',                          10,...
                'number of airplanes',                      450,...
                'number of crew',                           2,...
                'number of passengers',                     0,...
                'cost passenger insurance',                 0,...
                'cost cabin attendants',                    0,...
                'cost of maintaining ground equipment',     20000,...
                'cost passenger handling',                  0,...
                'cost of depreciation of ground equipment', 10000,...
                'cost of airplane servicing',               50000,...
                'year',                                     year);


%--------------------------------------
    'Description'                        'Estimated Cost in millions 2013…'
    'Airframe engineering and design'    '  1924'                           
    'Development support and testing'    '   201'                           
    'Flight test airplanes'              '  1809'                           
    'Flight test operations'             '    18'                           
    'RDT\&E Finance'                     '   198'                           
    'RDT\&E Profit'                      '   395'                           
    'Total RDT\&E'                       '  4546'                           
    'Description'                          'Estimated Cost in millions 2013…'
    'Airframe engineering and design'      '  3264'                           
    'Airplane program production'          ' 14912'                           
    'Manufacturing finance'                '  1818'                           
    'Total Manufacturing and Acquisi…'    ' 19994 ( 44.4 per plane)'         
    'Description'                 'Estimated Operating Cost per nm…'
    'Fuel and Oil'                '  3.34'                           
    'Direct personnel'            ' 10.91'                           
    'Consumable materials'        '  2.35'                           
    'Maintenance'                 ' 32.45'                           
    'Indirect operation costs'    '505.00'                           
    'Depreciation'                ' 14.59'                           
    'Direct operating cost'       ' 68.09'                           
    'Cost per flight  '           '113727.73'