Input: fingerprint
of anchor location in indoor environment and the signals 
measured by target node . 
Output: the target node’s location curve resulting from the operation of the algorithm. 
(1) = KNN % Using the KNN algorithm to find nearest position and get the observation values; 
(2) % Input the observation values () to the particle filter algorithm. 
(3) The filtering condition is as follows: 
+ % The distance between two adjacent locations should be smaller than 


% The topology constraints. 
(4) Until all times’ positioning and tracking is over, one can get the final positioning tracking curve. 