Skip to content
Snippets Groups Projects
Verified Commit 3608fa0a authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

feat(plot): add test params to title

parent 0f7faee4
No related branches found
No related tags found
No related merge requests found
...@@ -44,12 +44,14 @@ function ExpData = processall(idFile) ...@@ -44,12 +44,14 @@ function ExpData = processall(idFile)
% [filePaths, fileNames] = getfiles(idFile); % [filePaths, fileNames] = getfiles(idFile);
idTable = loadid(idFile); idTable = loadid(idFile);
ExpData(size(idTable, 1)) = struct; ExpData(size(idTable, 1)) = struct;
for iTest = 1:size(idTable, 1) for iTest = 1:size(idTable, 1)
ExpData(iTest).arduFile = idTable(iTest, :).arduinoFile{:}; ExpData(iTest).arduFile = idTable(iTest, :).arduinoFile{:};
ExpData(iTest).tunnelFile = idTable(iTest, :).wtFile{:}; ExpData(iTest).tunnelFile = idTable(iTest, :).wtFile{:};
ExpData(iTest).dx = idTable(iTest, :).dstX;
ExpData(iTest).airspeed = idTable(iTest, :).v_air;
ExpData(iTest).freq = idTable(iTest, :).freq;
% Load and clean experimental data % Load and clean experimental data
[arduShort, arduFull] = loadardu(ExpData(iTest).arduFile); [arduShort, arduFull] = loadardu(ExpData(iTest).arduFile);
......
...@@ -25,7 +25,7 @@ function plottime(ExpData, arduType, plotStart) ...@@ -25,7 +25,7 @@ function plottime(ExpData, arduType, plotStart)
% Constants and defaults % Constants and defaults
SAMPLING = 1000; SAMPLING = 1000;
INTERVAL = 1 / 10; % A tenth of the whole data range INTERVAL = 1 / 5; % A tenth of the whole data range
% ALL_FORCES = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'}; % ALL_FORCES = {'Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'};
% ALL_FORCES = {'Fx', 'Fz'}; % ALL_FORCES = {'Fx', 'Fz'};
...@@ -33,15 +33,17 @@ function plottime(ExpData, arduType, plotStart) ...@@ -33,15 +33,17 @@ function plottime(ExpData, arduType, plotStart)
% Plot everything useful % Plot everything useful
for iDat = 1:numel(ExpData) for iDat = 1:numel(ExpData)
expParam = sprintf('d = %0.2f, f = %0.2f, V = %0.1f', ...
ExpData(iDat).dx, ExpData(iDat).freq, ExpData(iDat).airspeed);
for iForce = 1:numel(ALL_FORCES) for iForce = 1:numel(ALL_FORCES)
force = ALL_FORCES{iForce}; force = ALL_FORCES{iForce};
figure('Name', force); figure('Name', force);
title(ExpData(iDat).tunnelFile); title(ExpData(iDat).tunnelFile);
subplot(211); subplot(211);
title('Front module'); title(['Front module -- ', expParam]);
plotwithangle(ExpData(iDat), arduType, 'front', force, SAMPLING, INTERVAL, plotStart); plotwithangle(ExpData(iDat), arduType, 'front', force, SAMPLING, INTERVAL, plotStart);
subplot(212); subplot(212);
title('Aft module'); title(['Aft module -- ', expParam]);
plotwithangle(ExpData(iDat), arduType, 'aft', force, SAMPLING, INTERVAL, plotStart); plotwithangle(ExpData(iDat), arduType, 'aft', force, SAMPLING, INTERVAL, plotStart);
end end
end end
......
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