StsProcessor class

Processor class for Sit-to-Stand (STS) test data.

Implements filtering and cycle detection for STS, using peaks/troughs analysis on filtered IMU data. Used by StsTestStep for post-processing sensor data after test completion.

The algorithm applies a moving average filter and detects sit-to-stand cycles by finding local minima and maxima on the relevant axis.

Returns an StsResult after test completion and data processing.

Inheritance

Constructors

StsProcessor.new({required StsConfig config})

Properties

config StsConfig
final
cycles List<Cycle>
getter/setter pair
detectedCycles List<SensorEvent>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
movingAverageFilteredData List<SensorEvent>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

countStsCyclesChest({required List<SensorEvent> accData, required List<SensorEvent> gyroData, required double accActualRate, required double gyroActualRate}) List<Cycle>
Detects sit-to-stand cycles for chest sensor placement.
countStsCyclesThigh({required List<SensorEvent> accData, required List<SensorEvent> gyroData, required double accActualRate, required double gyroActualRate}) List<Cycle>
Detects sit-to-stand cycles for thigh sensor placement.
detectCycles({required List<int> peaks, required List<int> troughs, required List<SensorEvent> filteredAcc, required List<DateTime> timestamps, required double minCycleDuration}) List<Cycle>
Detects sit-to-stand cycles based on peaks and troughs.
detectPeaks(List<double> data, List<DateTime> timestamps, double threshold, double minPeakDistanceSec) List<int>
Detects peaks in the data with a debounce period.
detectTroughs(List<double> data, List<DateTime> timestamps, double threshold, double minTroughDistanceSec) List<int>
Detects troughs in the data with a debounce period.
movingAverageFilter(List<double> input, double windowSize) List<double>
Applies a moving average filter to the input data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processData({required List<SensorEvent> accData, required List<SensorEvent> gyroData, required List<SensorEvent> magData, required double accActualRate, required double gyroActualRate, required double magActualRate}) Future<List<StsResult>>
Processes raw sensor data and returns a list of StsResults.
override
smoothingFilter(List<SensorEvent> input, double cutoff) List<SensorEvent>
Applies a smoothing filter to a list of SensorEvents.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited