View full-text article in PMC Sensors (Basel). 2023 Jan 4;23(2):557. doi: 10.3390/s23020557 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1: Two-Level Error Model EKF State Variables: x=p,v,q,δp,δv,δq,δa,δwT Initialization: x0,P0 Input: xk−1,Pk−1,1uk−1,zk Output: x^k,P^k 1: ak−1←amk−1+δak−1; wk−1←wmk−1+δwk−1; uk−1+←ak−1,wk−1T 2: x^k−←fk−1xk−1,uk−1+ 3: Pk−←Fk−1Pk−1Fk−1T+Gk−12Qk−1Gk−1T 4: Kk←Pk−HkTHkPk−HkT+3Rk−1 5: x^k+←x^k−+Kkzk−hkx^k−,0 6: P^k←I−KkHkPk− 7: p^k←p^k++δp^k+; v^k←v^k++δv^k+; q^k←q^k+⊗δq^k+ 8: x^k←p^k,v^k,q^k,δp^k+,δv^k+,δq^k+,δa^k+,δw^k+T 9: Return: x^k,P^k