Skip to main content
. 2022 Jul 21;22(14):5458. doi: 10.3390/s22145458
Algorithm 1 Real-time dynamic windowing

Require: Sequence of events E={e1,e2,,en}

Ensure: set of segmentations S={s1,s2,,sn}

  if S not exist then

  Initialize s1 and add e1 to s1

else if thenS exist

   for sj: j = 1 to n do <>

    if sj then

     SC = sensor correlation (ej, elast)

     Tcorfirst = time correlation (ej, efirst)

     Tcorlast = time correlation (ej, elast)

     if SC = True AND (Tcorfirst = True AND Tcorlast = True) then add ej to sj

     else if SC = True AND (Tcorfirst = False OR Tcorlast = False) then clear sj and start a new segmentation from the next event

     end if

    else if sj= then Initialize sj+1 and add ej to sj+1

    end if

end for

end if