Source : trend_analysis

source code: trend_analysis

Analyze signal for its recent trend.

Trend() Compute the current trend in signal values
class dhtioc.trend_analysis.Trend[source]

Compute the current trend in signal values

Apply smoothing with various factors, and take the slope of the smoothed signal v. the smoothing factor.

compute(reading) (Re)compute the trend.
slope Set the trend as the slope of smoothed v.
compute(reading)[source]

(Re)compute the trend.

Actually, reset the stats registers and load new values

slope

Set the trend as the slope of smoothed v. (1-smoothing factor).