C# Class Porrey.Uwp.IoT.SensorStability.StabilityMonitor

Measures the stability of multiple sensor readings over a period of time to determine if the reading is stable. This is useful, for example, for a sensor such as a scale where the weight will vary until while an object is placed on the scale but will eventually stabilize. This class aids in determining when such a sensor has a stable value.
Datei anzeigen Open project: porrey/iot

Public Methods

Method Description
AddReading ( double sensorReading ) : System.Threading.Tasks.Task

Adds a new reading to the meter and updates the stability measurement.

StabilityMonitor ( int sampleSize = 10 ) : System

Creates an instance of Windows.Devices.Sensors.SensorStability.StabilityMonitor with the specified Maximum Consecutive readings required for a stable sensor reading.

Method Details

AddReading() public method

Adds a new reading to the meter and updates the stability measurement.
public AddReading ( double sensorReading ) : System.Threading.Tasks.Task
sensorReading double The sensor reading of type T.
return System.Threading.Tasks.Task

StabilityMonitor() public method

Creates an instance of Windows.Devices.Sensors.SensorStability.StabilityMonitor with the specified Maximum Consecutive readings required for a stable sensor reading.
public StabilityMonitor ( int sampleSize = 10 ) : System
sampleSize int Specifies the number of samples to collect.
return System