Research Article

A Spatial-Contextual Indoor Trajectory Prediction Approach via Hidden Markov Models

Algorithm 1

Wi-Fi access point grouping algorithm.
input: A linklist storing the access points and similarity threshold
output: A set of groups satisfying the condition with respect to
1: ;
2: fordo
3:  if Tlink[i].visit TRUE then
4:   CONTINUE;
5:  else
6:   TLink[i].id = groupNum;
7:   TLink[i].visit = TRUE;
8:   Create a new group
9:   .append(TLink[i]);
10:  end if
11:  for to do
12:   if Tlink[j].visit==TRUE then
13:    CONTINUE;
14:   end if
15:   ifthen
16:    Tlink[j].id = groupNum;
17:    Tlink[j].visit = TRUE;
18:    .append(TLink[j])
19:    end if
20:  end for
21:  : end for
23: Return