| Algorithm 2 Computation of track spread | ||
| Data: User’s trajectory data (pos = (x, y), array) | ||
| Results: Track spread (ts) feature | ||
| 1 | track_spread_array ← [], i = 1 | |
| 2 | track_center ← (mean (pos(x)), mean (pos(y))) | |
| 3 | while i < length(pos) do | |
| 4 | distance ← √(posi(x) − track_center(x))2 + (posi(y) − track_center(y))2 | |
| 5 | track_spread_array ← (ti − ti−1) | |
| 6 | end | |
| 7 | ts ← max (track_spread_array) | |
| 8 | end | |