Research Article
Velocity-Preserving Trajectory Compression Based on Retrace Point Detection
Algorithm 1
Retrace point detection process.
Input: trajectory , ratio threshold , inscribed angle threshold . | Output: retrace points RP. | 1. i=1, j=3, RP = Φ. | 2. while j<n do | 3. Calculate Maximum direction deviation ; | The selected pair of the anchor point and float point (with the maximum direction deviation); | 4. if then | 5. Calculate inscribed angle θ and ratio threshold ; | 6. if θ>= and >= then | 7. RP∪; | 8. r=dis; | 9. while e+1<=n | 10. k=e+1; | 11. if dis(,)<=r then | 12. RP∪; | 13. e=e+1; | 14. else: | 15. break; | 16. end if | 17. end while | 18. else: | 19. i=e; | 20. j=i+2; | 21. end if | 22. end if | 23. else | 24. j=j+1; | 25. end if | 26.end while | Return retrace points set RP. |
|