Skip to main content
. 2023 Feb 16;23(4):2229. doi: 10.3390/s23042229
Algorithm 1 Cloud-based Data Analysis
Inputs: ya, yb, α, β, xaδ, xbδ
Output: Event code (0, 1, 2)
  1. Normalize all the time series so that all time series y and xb have a value between 0 and 1, inclusive.

  2. Normalize xa based on the maximum distance expected between the sensor and the user.

  3. Calculate DTW alignment cost between yb, xb

  4. event = 0

  5. if cost(yb, ) < α and  xaδ¯ < β, then

  6.  event = 1

  7. else if cost(yb, xbδ) < α and xaδ¯ > β, then

  8.  event = 2