% Delivered to the Government in Accordance with Contract FA8650-10-C-7080
% 
%  (c) 2011 United Technologies Corp.
% Developed with the sponsorship of the Defense Advanced Research Projects Agency (DARPA).
%  
% Permission is hereby granted, free of charge, to any person obtaining a copy of this data, including any software or models in source or binary form, as well as any drawings, specifications, and documentation (collectively "the Data"), to deal in the Data without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Data, and to permit persons to whom the Data is furnished to do so, subject to the following conditions:
%  
% The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Data.
%  
% THE DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, SPONSORS, DEVELOPERS, CONTRIBUTORS, OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DATA OR THE USE OR OTHER DEALINGS IN THE DATA.
% 

function Conditions = TMSMission()
% Creates the Conditions structure with all mission point related data.
%

MP =  { 'P1' 'P2' 'P3' 'P4' 'P5' 'P6' 'P7' 'P8' 'P9' 'P10' 'P11' 'P12' 'P13' 'P14' 'D1' 'D2' 'D3'};

NameList = ...
   {'Mission Point'                    'MissionPoint' ...
    'Altitude'                         'Altitude' ...
    'Mach'                             'Mach' ...
    'Duration'                         'Duration' ...
    'Day Type'                         'DayType' ...
    'Tank Temp'                        'Tank.Temp' ...
    'GG Flow'                          'GGFlow' ...
    'AB Flow'                          'ABFlow' ...
    'Eng Act Flow'                     'EngActFlow' ...
    'N2'                               'N2' ...
    'ECS Heat'                         'ECS.Heat' ...
    'Hyd Heat'                         'Hyd.Heat' ...
    'Gen Heat'                         'Gen.Heat' ...
    'Eng Oil Heat'                     'EngOil.Heat' ...
    'Eng Oil Flow'                     'EngOil.Flow' ...
    'Eng Oil Max Temp'                 'EngOil.MaxTemp' ...
};
Conditions = ImportCSV([], NameList, 'TMSInput.csv',[],MP);

for ii = 1:length(MP)
    %*********************************************************************
    % CVS Version control line. DO NOT EDIT!
    Conditions{ii}.Opt.Rev.TMSMission = '$Revision: 1.0 $';  
    %*********************************************************************
end
    
for ii = 1:length(MP)
    Conditions{ii}.MPNumber = ii;
    Conditions{ii}.Tank.Fluid = DefineFluid('LinearFuel');
    Conditions{ii}.Tank.Press = ConvertUnits('psia', 100.0, 'import');
    Conditions{ii}.ECS.DeltaP = ConvertUnits('psia', 10.0, 'import');
    Conditions{ii}.Hyd.DeltaP = ConvertUnits('psia', 10.0, 'import');
    Conditions{ii}.Gen.DeltaP = ConvertUnits('psia', 10.0, 'import');
    Conditions{ii}.EngOil.DeltaP = ConvertUnits('psia', 10.0, 'import');
    Conditions{ii}.MaxFuelTemp= ConvertUnits('F', 325.0, 'import');
    Conditions{ii}.MFPumpGearRatio = 1.5;
    Conditions{ii}.ABPumpGearRatio = 1.5;
    Conditions{ii}.ActPumpDeltaP = ConvertUnits('psia', 2000.0, 'import'); 
end

%*********************************************************************
% CVS Version Control Log Data. DO NOT EDIT BELOW THIS LINE!
% $Log: TMSMission.m,v $
