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

fix(loadardu): column issue with new time

parent 03f2d8cc
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ function arduData = loadardu(arduFile) ...@@ -9,7 +9,7 @@ function arduData = loadardu(arduFile)
% ----- % -----
% Output format: % Output format:
% The output array has one row per timestep. The columns are ordered as follows: % The output array has one row per timestep. The columns are ordered as follows:
% angleFrontLeft, angleFrontRight, angleAftLeft, angleAftRight, powerFront, powerAft % time, angleFrontLeft, angleFrontRight, angleAftLeft, angleAftRight, powerFront, powerAft
% %
% Syntax: % Syntax:
% arduData = loadardu(arduFile) load the Arduino data file, then clean it and return a cleaned % arduData = loadardu(arduFile) load the Arduino data file, then clean it and return a cleaned
...@@ -50,8 +50,8 @@ function arduData = loadardu(arduFile) ...@@ -50,8 +50,8 @@ function arduData = loadardu(arduFile)
arduData = table2array(arduTable); arduData = table2array(arduTable);
% Calculate power, remove tension and current % Calculate power, remove tension and current
power = arduData(:, [5, 7]) .* arduData(:, [6, 8]); power = arduData(:, [6, 8]) .* arduData(:, [7, 9]);
arduData(:, 5:end) = []; arduData(:, 6:end) = [];
arduData = [arduData, power]; arduData = [arduData, power];
% Recalculate angles properly % Recalculate angles properly
......
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