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 pi−k to pi−1, compute and check if all their centered slope angle variations satisfy −Δ≤δj,2≤Δ(i−k≤j≤i−1). If the condition does not meet, kb=k. If k≥km, 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+1≤j≤i+k). If the condition does not meet, kf=k. If k≥km, 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.