function tcp = scale_arms(scaling_options, tcp, tcp_kpis_T4, scp_kpis, selIdx_arms_yneg, selIdx_arms_ypos)
% Scale the arm positions. Currently this function only handles the case where
% the arms are translated to match the new position of the shoulders after the
% scaling of the torso.
%
%
% Created by : ABR august@lightness.eu
% Date : 2024-06-11
if scaling_options.scale_arms_method == 2
  % No scaling of arms, only translation.

  translation_of_yneg_shoulder = tcp_kpis_T4.C5 - scp_kpis.C5;
  translation_of_ypos_shoulder = tcp_kpis_T4.C6 - scp_kpis.C6;
  tcp(selIdx_arms_yneg,:) = tcp(selIdx_arms_yneg,:) + translation_of_yneg_shoulder;
  tcp(selIdx_arms_ypos,:) = tcp(selIdx_arms_ypos,:) + translation_of_ypos_shoulder;
end
