| Algorithm 1. Detect candidate (window of last three accelerations) |
| If |
| Return (S = 1) |
| Elseif |
| Return (S = −1) |
| Else |
| Return (S = 0) |
| Algorithm 1. Detect candidate (window of last three accelerations) |
| If |
| Return (S = 1) |
| Elseif |
| Return (S = −1) |
| Else |
| Return (S = 0) |