Research Article
Velocity-Preserving Trajectory Compression Based on Retrace Point Detection
Algorithm 2
Trajectory velocity-preserving process.
Input: trajectory , ratio threshold , inscribed angle threshold , velocity error μ. | Output: compressed trajectory . | 1. i =1, j=3 =Φ. | 2. while j<n do | 3. Calculate Maximum direction deviation ; | selected pair of anchor point and float point (with the maximum direction deviation); | 4. if | 5. ∪; | 6. i= the last index of set ; | 7. j=i+2; | 8. else: | 9. Calculate velocity error in buffer λ; | 10. if λ>=μ then | 11. ∪; | 12. i=j; | 13. j=i+2; | 14. else: | 15. j=j+1; | 16. end if | 17. end if | 18. end while | Return compressed trajectory . |
|