Skip to content
Snippets Groups Projects
Commit 2080b6ae authored by Marco Luigi Gaibotti's avatar Marco Luigi Gaibotti
Browse files

[code-refactoring][automatricesProtub] Added options and output arguments

parent d1f53902
Branches arp
No related tags found
1 merge request!11Merge code-refactoring into master
function mainAutoMatProtub(rocket) function [coeffsTot, coeffsTotHighAOA] = mainAutoMatProtub(rocket, options)
arguments arguments
rocket = []; % Empty by default rocket = []; % Empty by default
options.saveVars logical = true
end end
%% PATH %% PATH
currentPath = fileparts(mfilename("fullpath")); currentPath = fileparts(mfilename("fullpath"));
...@@ -86,11 +87,13 @@ input = createDissileInput(rocket, autoMatSettings.vars); ...@@ -86,11 +87,13 @@ input = createDissileInput(rocket, autoMatSettings.vars);
[coeffsTot, finsCN] = dissileMatcom(input); [coeffsTot, finsCN] = dissileMatcom(input);
%% SAVE DATA %% SAVE DATA
if options.saveVars
saveVars(autoMatSettings.varsHighAOA, rocket, mission, coeffsTotHighAOA, finsCNHighAOA, ... saveVars(autoMatSettings.varsHighAOA, rocket, mission, coeffsTotHighAOA, finsCNHighAOA, ...
chosenXcg, xcgTime, autoMatSettings.saveFinsCN, 'aeroCoefficientsHighAOA'); chosenXcg, xcgTime, autoMatSettings.saveFinsCN, 'aeroCoefficientsHighAOA');
saveVars(autoMatSettings.vars, rocket, mission, coeffsTot, finsCN, ... saveVars(autoMatSettings.vars, rocket, mission, coeffsTot, finsCN, ...
chosenXcg, xcgTime, autoMatSettings.saveFinsCN, 'aeroCoefficients'); chosenXcg, xcgTime, autoMatSettings.saveFinsCN, 'aeroCoefficients');
AMtime = toc; end
AMtime = toc;
fprintf('Aerodynamics Prediction completed \n') fprintf('Aerodynamics Prediction completed \n')
fprintf('Elapsed time for aerodynamic matrices computation: %3.3f s\n', AMtime); fprintf('Elapsed time for aerodynamic matrices computation: %3.3f s\n', AMtime);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment