Skip to main content
. 2021 Apr 5;21(7):2543. doi: 10.3390/s21072543
Algorithm 1. Pseudocode to detail the orientation estimation process for each SFA.
for each pair of MIMUs (Xsens, APDM, and Shimmer)
  for each angular rate condition (slow, medium, fast)
remove the static bias for each gyroscope
compute the starting orientation for each MIMU
initialize the matrix e (#rows = length(p1), #columns = length(p2))
for each value p2 belonging to p2vec between [0, upper2]
for each value p1 belonging to p1vec between [0, upper1]
compute the absolute orientation of each MIMU separately with the SFA under analysis to obtain qAG and qBG
refer qAG and qBG to the starting orientation to obtain qA and qB, as done in (1)
compute the absolute orientation error of qA and qB separately using the gold standard qSP to obtain Δqabs A and Δqabs B, as done in (2)
convert Δqabs A and Δqabs B into angular rotation errors to obtain Δθabs A and Δθabs B
compute the average value between the two absolute errors to obtain Δθabs
compute the RMS of Δθabs considering only the dynamic parts of the recording to obtain ep1, p2
add ep1, p2 to the matrix e
end
end
find the optimal region of (p1vec,p2vec) which correspond to the range of e which includes its minimum (eopt) + 0.5 deg to obtain popt_1 and popt_2
find the value of e which correspond to the default parameter values to obtain edef
end
end