Algorithm 3 Judge wandering behavior. |
-
Input:
Divide the trajectory evenly into a area according to time.
set threshold :.
-
Output:
the trajectory if has wandering behavior. )
-
1:
for to a do
-
2:
Calculate the displacement and distance of the user’s movement in each area;
-
3:
if
then
-
4:
;
-
5:
end if
-
6:
end for
-
7:
if
then
-
8:
return true;
-
9:
else
-
10:
return false;
-
11:
end if
|