Algorithm 1.
Input: φ(t) | |
Output: φf(t) | |
1: | Initialize φf(t) = φ(t), stopped = false; |
2: | if stop detected then |
3: | stopped = true; |
4: | else |
5: | if |φ(t) − φf(t − Δt)| ≤ Δφ then |
6: | stopped = false; |
7: | end if |
8: | end if |
9: | if stopped = true or then |
10: | φf(t) = φf(t Δt); |
11: | else |
12: | φf(t) = φ(t); |
13: | end if |