|
Algorithm 1. long trajectory calibration scheme |
| 1: |
Input: online trajectory t and training trajectory
|
| 2: |
Output: user position
|
| 3: |
Get the direction and length of online trajectory t |
| 4: |
If the last step of t is turn then
|
| 5: |
Select similar trajectory according to and
|
| 6: |
For each training trajectory T do
|
| 7: |
Compute trajectory similarity degree between t and 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 between t and 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
|