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

MAJOR FIX(forces)!: Fix issue in mean force calculation

The previous formatting was taking the mean values of the bounds of the
periods in the force signal, which corresponds essentially to the value
of the maximums. Instead it should return the mean value of the force
OVER THE FULL PERIOD.
parent 6f57a79d
No related branches found
No related tags found
No related merge requests found
......@@ -23,13 +23,14 @@ function [ResData] = calctrueforces(ResData)
inF = ResData(i, j).AllPhases(1).(pos).inertiaF;
inM = ResData(i, j).AllPhases(1).(pos).inertiaM;
else
inF = 0;
inM = 0;
inF = [0, 0, 0];
inM = [0, 0, 0];
end
% Raw force
meanFraw = mean(ResData(i, j).(pos).forces(indexes(iPart, :), :));
meanMraw = mean(ResData(i, j).(pos).moments(indexes(iPart, :), :));
idx = indexes(iPart, 1):indexes(iPart, 2);
meanFraw = mean(ResData(i, j).(pos).forces(idx, :));
meanMraw = mean(ResData(i, j).(pos).moments(idx, :));
% True value
ResData(i, j).AllPhases(1).(pos).meanF(iPart, :) = meanFraw - inF;
......
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