Skip to main content
. 2016 Jul 29;16(8):1200. doi: 10.3390/s16081200
Algorithm 1 Monte Carlo localization.
1: Initialize particles X¯t=Xt=(wxt[1],wxt[2],,wxtM)
2: for m=1 to M do
3:   Update particles with the motion model: wxtm=Motionmodel(wxt1m)
4:   Calculate the belief of each particle with the measurement model: wm=p(zt|wxtm)
5:   X¯t=X¯t+<wxtm,wtm>
6: end for
7: for m=1 to M do
8:   draw wxtm from X¯t with probability ∝ wtm
9:   add wxtm to Xt
10: end for
11: for m=1 to M do
12:   if wtm<α(a constant), re-initialize wxt
13: end for
14: return Xt