| Algorithm 1. Recognition Process Algorithm of Steering Maneuver | |
| 1: | Begin: |
| 2: | Inputs: State, Gyro, En, numsModule, Yaw, Gyro_t, Turn_flag |
| 3: | switch State |
| 4: | case Slience and Excess |
| 5: | if En > En_low |
| 6: | State < −Excess |
| 7: | Record the holdTime and startPoint |
| 8: | else if En < En_high |
| 9: | State < −Bump |
| 10: | Record the start time and holdTime |
| 11: | else |
| 12: | State < −Slience |
| 13: | clear the holdTime |
| 14: | case Bump |
| 15: | if En > En_low |
| 16: | Record the holdTime |
| 17: | else |
| 18: | if holdTime < MinHoldTime |
| 19: | State < −Slience |
| 20: | clear the holdTime |
| 21: | endPoint = startPoint + holdTime |
| 22: | |
| 23: | distArray[numsModule] |
| 24: | for(times = 1;times < numsModule;times++) |
| 25: | { |
| 26: | distArray[times] = fastDTW (Gyro.startPoint, Gyro.endPoint, ref_Gyro) |
| 27: | } |
| 28: | driveResult = min(distArray) and Yaw |
| 29: | Gyro_t = Weather() |
| 30: | If Turn_flag == No |
| 31: | If Gyro > Gyro_t |
| 32: | driveResult = Sharp_CarelessDriving |
| 33: | else |
| 34: | driveResult = CarelessDriving |
| 35: | else |
| 36: | If Gyro > Gyro_t |
| 37: | driveResult = SharpDriving |
| 38: | else |
| 39: | driveResult = NomalDriving |