% This function is part of the NMSM Pipeline, see file for full license.
%
% This function adjusts the belt speed for the specified foot.
%
% (struct, struct) -> (struct)
%
function inputs = applyBeltSpeedParameter(inputs, values)
parameterSet = inputs.auxdata.userDefinedVariables;
counter = 1;
for i = 1:length(parameterSet)
if strcmp(parameterSet{i}.type, 'belt_speed')
for j = 1:length(inputs.auxdata.contactSurfaces)
if parameterSet{i}.is_left_foot == ...
inputs.auxdata.contactSurfaces{j}.isLeftFoot
inputs.auxdata.contactSurfaces{j}.beltSpeed = ...
values.belt_speed(counter);
end
end
counter = counter + 1;
end
end
end