From 0e07429d27d7016d1cdb246a93d719b75e9a6138 Mon Sep 17 00:00:00 2001
From: Thomas Lambert <t.lambert@uliege.be>
Date: Sun, 11 Dec 2022 01:42:33 +0100
Subject: [PATCH] fix(process): add missing field

---
 processall.m      | 18 ++++++++++++------
 resultsanalysis.m |  3 ++-
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/processall.m b/processall.m
index 5e20280..ba46c5a 100644
--- a/processall.m
+++ b/processall.m
@@ -64,11 +64,11 @@ function ExpData = processall(idFile)
             [arduShort, ~] = loadardu(ExpData(iTest).arduFile);
 
             % DEBUG
-            figure;
-            hold on;
-            plot(tunnelData(:, 1));
-            plot(tunnelData(:, 3));
-            grid on;
+            % figure;
+            % hold on;
+            % plot(tunnelData(:, 1));
+            % plot(tunnelData(:, 3));
+            % grid on;
 
             [arduShort, tunnelData, ExpData(iTest).arduStart, ExpData(iTest).tunnelStart] = ...
                 syncdata(arduShort, tunnelData);
@@ -77,6 +77,7 @@ function ExpData = processall(idFile)
             ExpData(iTest).time = arduShort(:, 1);
             ExpData(iTest).Front.angles = arduShort(:, 2);
             ExpData(iTest).Front.power = arduShort(:, 4);
+            ExpData(iTest).Aft.angles = arduShort(:, 3);
             ExpData(iTest).Aft.power = arduShort(:, 5);
 
         else
@@ -108,7 +109,12 @@ function ExpData = processall(idFile)
         ExpData(iTest).Testcase.press = idTable(iTest, :).pres_air;
 
         if PLOT_CLEANED
-            plottime(ExpData(iTest), 'arduShort', false);
+            figure;
+            hold on;
+            plot(ExpData(iTest).Front.angles);
+            yyaxis right;
+            plot(ExpData(iTest).Front.forces(:, 3));
+
         end
 
         % Save the cleaned data
diff --git a/resultsanalysis.m b/resultsanalysis.m
index 14dc9fb..d8b87aa 100644
--- a/resultsanalysis.m
+++ b/resultsanalysis.m
@@ -33,9 +33,10 @@ function ResData = resultsanalysis(matFiles)
         end
         % Remove useless data
         ResData = rmfield(ResData, {'arduStart', 'tunnelStart'}); % Useless
+
         % FIXME: remove deprecated
         ResData = rmfield(ResData, {'arduFile', 'tunnelFile', ...
-                                    'dx', 'airspeed', 'freq', 'front', 'aft'});
+                                    'dx', 'airspeed', 'freq'});
 
         % Cache values to prevent excessive reloads
         matFiles_ = matFiles;
-- 
GitLab