Skip to main content
. 2022 Apr 7;22(8):2833. doi: 10.3390/s22082833
Algorithm 1: EKF for magnetic field SLAM

   Input: Δptw,Δqtb,ytbt=1N

   Output: p^t|twt=1N, q^t|twbt=1N, m^t|tt=1N

          Initialisation: p^0|0w=03×1, q^0|0wb=q0wb, m^0|0=0(Nm+3)×0, (19)

1: for t=1 to N do

2:    Dynamic update
p^t|t1w=p^t1|t1w+Δptw (26a)
q^t|t1wb=q^t1|t1wbΔqtb (26b)
m^t|t1=m^t1|t1 (26c)
Pt|t1=Pt1|t1+Q (26d)
3:    Measurement update
zt=R^t|t1wbytbΦp(p^t|t1w)m^t|t1 (27a)
St=HtPt|t1Ht+σm2I3 (27b)
Kt=Pt|t1HtSt1 (27c)
ξ^t=Ktzt (27d)
Pt|t=Pt|t1KtStKt (27e)
4:    Relinearization
p^t|tw=p^t|t1w+δ^tw (28a)
q^t|twb=expq(η^tw)q^t|t1wb (28b)
m^t|t=m^t|t1+ν^t (28c)

5: end for