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

[handle-value-conversion][Rocket] Fixed coefficients loading system

parent 071fcde1
No related branches found
No related tags found
1 merge request!17Convertion from handle to value type classes
......@@ -136,7 +136,7 @@ classdef Rocket < Config
obj.parachutes = paraLoader.parachutes;
if options.loadCoefficients
obj.loadData();
obj = obj.loadData();
answer = '';
if isempty(obj.coefficients) || isempty(obj.coefficientsHighAOA)
answer = questdlg(['Coefficient matrices not found. ' ...
......@@ -151,7 +151,7 @@ classdef Rocket < Config
parserPath = fullfile(mission.msaPath, 'autoMatricesProtub');
addpath(genpath(parserPath));
mainAutoMatProtub(obj);
obj.loadData();
obj = obj.loadData();
case 'Cancel'
error('Rocket creation aborted')
otherwise
......
......@@ -7,8 +7,8 @@ function checks = checkGeometry(obj)
% - checks (n fields of geometry, 1): boolean value of the geometry checks
xCgRocket = round([ ...
obj.xCg(1); ...
obj.xCg(end) ...
obj.xcg(1); ...
obj.xcg(end) ...
], 3);
xCgTest = round([
......
......@@ -15,6 +15,8 @@ dataCoeffs = load(aeroPath);
dataCoeffsHighAOA = load(aeroHighAOAPath);
if isfield(dataCoeffs, motorName) && isfield(dataCoeffsHighAOA, motorName)
obj.coefficients = struct();
obj.coefficientsHighAOA = struct();
dataCoeffs = dataCoeffs.(motorName);
dataCoeffsHighAOA = dataCoeffsHighAOA.(motorName);
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment