**9. Conclusions**

This study describes solutions for improving the accuracy of wearable sensor-based fingerprinting indoor localisation by mitigating the user's BSE on RSSI. An in-depth analysis of RSSI for different orientations of the user's body was performed, and a body shadowing compensation model is proposed. To calculate the orientation angle between a wearable device and an RN, an IMU-aided motion mode detection technique was implemented by

fusing the spatial knowledge from the indoor floor plan. The decision tree-based classifier yields an outstanding performance for motion mode detection that, in turn, accurately identifies the landmark to produce high precision for the estimation of the user's orientation angle. Results demonstrated that the implemented classifier achieves an overall accuracy of 97.31% for detecting a motion mode correctly, which eventually helps to compensate the errors caused by the user's body. To validate the proposed body shadowing compensation model, both the classical K-NN and the WK-NN methods were implemented with a unique weighting technique. For selecting the K nearest neighbours in the case of the WK-NN method, the spatial prominence of the neighbouring RPs was applied as the weights, which were calculated by using a unique landmark-assisted distance measurement method. Finally, the localisation performance of the proposed system was compared with two other recent studies that proposed different models for angle estimation and BSE compensation. The experimental results show a mean and median accuracy of 1.62 m and 1.46 m for the classical K-NN method, which is further improved to 1.01 m and 0.74 m, respectively, using the WK-NN method. Overall, the proposed BSE compensation model along with the landmark-assisted WK-NN method can realise sub-metre median localisation accuracy that noticeably outperforms the considered related studies. Although the proposed methods are intended for RSSI fingerprinting localisation, these can be adopted in other RSSI-based indoor localisation applications with body-mounted wearable devices. The main limitation of the proposed system is the dependency of the orientation angle estimation phase on the previously estimated location. Future work will include the implementation of the proposed system in multistorey buildings by addressing this issue.

**Author Contributions:** Conceptualisation, M.A.A.M. and D.V.A.; methodology, M.A.A.M.; software, M.A.A.M.; hardware, F.W.; investigation, M.A.A.M. and D.V.A.; resources, M.R.Y.; data curation, M.A.A.M.; writing—original draft preparation, M.A.A.M.; writing—review and editing, M.A.A.M., D.V.A., F.W., and M.R.Y.; visualisation, M.A.A.M.; supervision, M.R.Y.; project administration, M.R.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.
