|
Algorithm 3. Five-step turn detection algorithm. |
| Input: |
Angle value sequence = [
|
| Output: |
Direction change list . |
| 1: |
Findpeaks()/* Find the local maximum sequence |
| 2: |
for
in
do
|
| 3: |
if ( or ) and (>2) then
|
| 4: |
=
|
| 5: |
if () then
|
| 6: |
|
| 7: |
else if () then
|
| 8: |
|
| 9: |
else if () then
|
| 10: |
|
| 11: |
else if () then
|
| 12: |
|
| 13: |
else if () then
|
| 14 |
|
| 15: |
end for |
| 16: |
return
|