## 4 Discussion  
This study set out to systematically evaluate the effect of the initial sensor orientation on the error from accelerometer-derived angles against optoelectronic motion-capture-derived angles (step 1). A mathematical method of correction to reduce these errors was then proposed (step 2). Results (step 1) demonstrated that using accelerometer data to derive angles results in increasing errors proportional to the initial orientation angle from the optimum, and this feature is accentuated during dynamic (versus static) movement. Previously studies calculating peak ROM angles, in comparison to a gold standard, have reported limits of agreement ranging from \(-8.06^{\circ}\) to \(5.67^{\circ}\)[25] and \(-3.86^{\circ}\) to \(4.69^{\circ}\)[11]. Data from the current study showed similar but tighter limits of agreement (\(-1.65^{\circ}\) to \(4.38^{\circ}\)) prior to correction, and therefore it is possible that some of the range of these errors is due to sensor orientation, especially as no mention of orientation correction was made in these works. Furthermore, previous studies have reported changes in accelerometer-derived pelvis ROM in idiopathic scoliosis [31] and knee ROM errors [32] of \(4.5^{\circ}\) and \(2.4^{\circ}\), respectively [31; 32]. As demonstrated in step 1, it is also possible that this magnitude of error relates to attachment orientation, especially with the known obliquity of the spine with scoliosis [33]. The current study extends the analysis from peak ROM errors to through-range errors, contributing to the evidence of using the sensors in an ecologically valid manner. This required the exploration of the effect of movement velocity on sensor error. Previous studies have explored angular velocity through differentiation of accelerometer-derived angles, but it is not clear if any correction for orientation was completed [20]. However, no studies have systematically explored the relationship between error and velocity or the effect of a mathematical correction. The current findings suggest that without correction for orientation, the RMSE throughout is a function of velocity (Figure 6), illustrated through dynamic errors being larger than static errors. This is the first study to explore this for accelerometer-derived angles. Uncorrected error values were similar to previous studies that have reported dynamic errors of around \(7^{\circ}\) for accelerometers moving through a single plane of motion [34]. These findings imply that utilizing 'off-the-shelf accelerometers' for motion analysis warrants caution, particularly when uncorrected data are employed. A significant contribution from this work is the production of error prediction equations, enabling users to determine the likely error expected from accelerometer-derived angles. This can serve as a useful tool for planning data collection or correcting existingdata, where the expected magnitude of change from an intervention, for example, can be compared to the magnitude of error. Interestingly, the error associated with orientation offset in two axes is cumulative such that it is of greater magnitude than that of the tilt error plus the twist error (Figure 3A-C) and is compounded during dynamic movement. The linear regression 'goodness of fit' was excellent for the sagittal plane regardless of velocity, but lower for the frontal plane. Therefore, caution is advised when using it to estimate error as the prediction is less likely to represent the value authentically. However, the R\({}^{2}\) for dual offsets (>0.74) suggest that a good prediction of error in the frontal plane is still possible, and when applied to the real-world testing of individuals, sensor attachment is likely to feature offsets in both planes. Reliability was shown to be excellent regardless of initial orientation, suggesting that accelerometer-derived angles without correction can be used for repeated measures. However, this would only be the case if the sensors were not removed so as to avoid introducing reattachment orientation error.