Algorithm 1 HRV filtering procedure |
-
1:
for each < 0.3 s do
-
2:
Compute , (Equation (4)), (Equation (5)) and (Equation (7))
-
3:
-
4:
if 1.3 s and and then
-
5:
Right merge: Replace by and delete and its timestamp
-
6:
-
7:
else Compute , and (Equation (4)), (Equation (5)) and (Equation (7))
-
8:
if 1.3 s and and then
-
9:
Left merge: Replace by and delete and its timestamp
-
10:
-
11:
else if > 1.3 s and > 1.3 s then
-
12:
Delete both and
-
13:
-
14:
else if < 1.3 s and > 1.3 s then
-
15:
Replace by and delete and its timestamp
-
16:
-
17:
else if > 1.3 s and < 1.3 s then
-
18:
Replace by and delete and its timestamp
-
19:
-
20:
else if Both and < 1.3 s but errors and are higher than 0.4 then
-
21:
Keep the one with the smaller error
-
22:
end if
-
23:
end if
-
24:
end for
|