**Abbreviations**

The following abbreviations are used in this manuscript:


#### **Appendix A. Derivation of Pelvis-to-Ankle Distance Measurement**

This section explains the derivation of the measurement pelvis-to-ankle vector (Equation (46)) as obtained from pelvis-to-ankle distance measurements, ˘*dpla k* and ˘*dpra k* , while assuming hinged knee joints and constant body segmen<sup>t</sup> lengths. For the sake of brevity, only the left side formulation is shown. The right side (i.e., pelvis to right ankle vector) can be calculated similarly.

*Sensors* **2020**, *20*, 6829

First, we solve for an estimated left knee angle, ˆ *θlkk* (Equation (47)), from the measured pelvis to left ankle distance, ˘ *dpla k* . The pelvis to left ankle vector, *τpla m* (*μ***<sup>ˆ</sup>**<sup>−</sup>*k* , *θlkk* ) (Equation (A6)), can be defined as the sum of the mid-pelvis to hip, thigh long axis, and shank long axis vectors.

$$\tau\_{\text{pla}}(\mathfrak{a}\_{k}^{-}, \theta\_{k}^{lk}) = \overbrace{\frac{\mathfrak{d}\_{p}^{p}}{2}\,\mathscr{T}\_{k}^{p-}}^{\mathfrak{p}\_{p\text{la}} - \text{half-p}\text{-axis} + \text{shank }z \cdot \text{axis}}^{\mathfrak{p}\_{p\text{la}} - \text{half-p}\text{-axis} + \text{shank }z \cdot \text{asin}}^{\mathfrak{p}\_{p\text{la}}} + d^{\text{lt}}\,\mathscr{T}\_{k}^{l\text{s}} \overbrace{\left(i\_{x}\sin\left(\theta\_{k}^{lk}\right) - i\_{z}\cos\left(\theta\_{k}^{lk}\right)\right)}^{\text{high } z\text{-axis in shank frame}} \tag{A1}$$

By definition of ( ˘*dpla k* )2 and expanding *τpla m* (*μ***<sup>ˆ</sup>**<sup>−</sup>*k* , *θlkk* ) with Equation (A1), we obtain

$$\begin{split} (\boldsymbol{d}\_{k}^{\mathrm{pla}})^{2} &= (\boldsymbol{\tau}\_{\mathrm{pla}}(\boldsymbol{\mathfrak{h}}\_{k}^{-},\boldsymbol{\theta}\_{k}^{\mathrm{lk}}))^{T} \boldsymbol{\tau}\_{\mathrm{pla}}(\boldsymbol{\mathfrak{h}}\_{k}^{-},\boldsymbol{\theta}\_{k}^{\mathrm{lk}}) \\ &= \boldsymbol{\Psi}\_{\mathrm{pla}}^{T}\boldsymbol{\Psi}\_{\mathrm{pla}} - 2\boldsymbol{d}^{\mathrm{ll}}\boldsymbol{\Psi}\_{\mathrm{pla}}^{T}\boldsymbol{\Upsilon}^{\mathrm{las}} \ \boldsymbol{i}\_{z}\cos\left(\boldsymbol{\theta}\_{k}^{\mathrm{lk}}\right) + 2\boldsymbol{d}^{\mathrm{ll}}\boldsymbol{\Psi}\_{\mathrm{pla}}^{T}\boldsymbol{\Upsilon}^{\mathrm{las}} \ \boldsymbol{i}\_{x}\sin\left(\boldsymbol{\theta}\_{k}^{\mathrm{lk}}\right) + \left(\boldsymbol{d}^{\mathrm{ll}}\right)^{2} \end{split} \tag{A2}$$

Equation (A2) can be rearranged in the form of Equation (A3) with *α*, *β*, *γ* as shown in Equation (A4).

$$
\alpha \cos \left( \theta\_k^{lk} \right) + \beta \sin \left( \theta\_k^{lk} \right) = \gamma \tag{A3}
$$

$$a = -2d^{lt} \boldsymbol{\Psi}\_{pla}^T \hat{\mathbf{T}}\_k^{ls-} \ \mathbf{i}\_{z\prime} \quad \boldsymbol{\beta} = 2d^{lt} \boldsymbol{\Psi}\_{pla}^T \hat{\mathbf{T}}\_k^{ls-} \ \mathbf{i}\_{x\prime} \quad \gamma = (d\_k^{pla})^2 - \boldsymbol{\Psi}\_{pla}^T \boldsymbol{\Psi}\_{pla} - (d^{lt})^2 \tag{A4}$$

Solving for ˆ *θlkk* from Equation (A3) gives us a quadratic equation with two solutions as shown in Equations (A5) and (47). Between the two solutions, ˆ *θlkk* is set as the ˆ*θlkk* whose value is closer to the current left knee angle estimate from the prediction step. This solution serves as a pseudomeasurement of the knee angle.

$$\hat{\theta}\_k^{lk} = \cos^{-1}\left(\frac{a\gamma \pm \beta\sqrt{a^2 + \beta^2 - \gamma^2}}{a^2 + \beta^2}\right) \tag{A5}$$

Finally, **<sup>Z</sup>***pla*,*k*, the KF measurement shown in Eqs. (A6) and (46), is the inter-IMU vector between the pelvis and left ankle, calculated using Equation (A1) with input ˆ *θlkk*.

$$\mathbf{Z}\_{pla,k} = \pi\_m^{pla} (\mathfrak{A}\_k^-, \mathring{\theta}\_k^{lk}) \tag{A6}$$
