Skip to main content
. 2018 Oct 3;18(10):3317. doi: 10.3390/s18103317
Algorithm 1. long trajectory calibration scheme
1: Input: online trajectory t and training trajectory T={ti,i=1,2,,n}
2: Output: user position (xi,yi)
3: Get the direction θ and length l of online trajectory t
4: If the last step of t is turn then
5:   Select similar trajectory according to θ and l
6: For each training trajectory T do
7:    Compute trajectory similarity degree di between t and ti using DTW algorithm
8:    Result validation
9: End for
10: If have perfect result then
11:    Calibrate the result of single-step tracking algorithm
12: End if
13: End if
14: If the last step of t is not turn, then
15:  Select similar trajectory according to θ
16:  For each training trajectory T do
17:  Compute trajectory similarity di between t and ti using subsequence DTW algorithm
18:  Result validation
19: End for
20: If have perfect match result then
21:    Calibrate the result of single-step tracking algorithm
22:   End if
23: End if
24: Return (xi,yi)