Skip to main content
. 2019 Apr 4;19(7):1617. doi: 10.3390/s19071617
Algorithm 1 Discrete curvature estimation for time series
  1. Initialize a maximum length of the searching vector km and a small angle variation Δ, within the range of which a sequence of data points can be considered as a DSS;

  2. Find the maximum length of the backward searching vector for data point pi. For the data points from pik to pi1, compute and check if all their centered slope angle variations satisfy Δδj,2Δ(ikji1). If the condition does not meet, kb=k. If kkm, kb=km;

  3. Find the maximum length of the forward searching vector for data point pi. For the data points from pi+1 to pi+k, compute and check if all their centered slope angle variations satisfy Δδj,2Δ(i+1ji+k). If the condition does not meet, kf=k. If kkm, kb=km;

  4. Compute the length of the backward and forward DSS, Lb, Lf, and the slope angles of the two DSS, θb, θf.

  5. Compute the curvature as Ci=(Lb+Lf)(θb+θf)4LbLf.