Normalization class

A parameter class that primarily pertain to XLayers for customizing the intake of SensorEvent data.

  • autocompensates, a flag for toggling autocompensation after steady sensor samples for some time
  • delay, how long to wait before kicking in autocompensation, considering sensitivity to past samples in a buffer
  • compensation, an amount to shear from raw AccelerometerEvent data (x or y axis, as gyroscope is used for z data)
  • scalar, an amount to multiply by the calculated sensor parallax factor
  • samplingRate, how frequently sensor data samples are propagated
  • sensitivity, a double clamped between 0..1, that influences the maximum List length for a sensors data samples buffer.
    • A larger sensitivity and thus smaller samples buffer means new, strong outlier accelerometer data stands out more easily from the average of the past samples in the buffer

NOTE:

There is a fine balance between sensitivity and samplingRate. It is recommended to keep them default and modify delay as necessary.

Constructors

Normalization({bool autocompensates = true, Duration delay = const Duration(milliseconds: 1000), List<double> compensation = Compensation.none, List<double> scalar = const [1.0, 1.0, 1.0], Duration samplingRate = const Duration(milliseconds: 10), double sensitivity = 0.9})
A parameter class that primarily pertain to XLayers for customizing the intake of SensorEvent data.
const

Properties

autocompensates bool
Should these sensor samples be autocompensated? That is, with our without a supplied compensation, should values generate dynamically for the compensation that is subtracted from sensor samplings?
final
compensation List<double>
A List<double> ordered [x,y] that corresponds to an amount that gets shaved from each raw AccelerometerEvent, sampled at samplingRate, to compensate for a device being held in a "standard" position for some time.
final
delay Duration
A Duration that represents how long to wait before kicking autocompensation into play. Default is 1000ms.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
samplingRate Duration
A Duration that represents how frequently new sensor samples occur.
final
scalar List<double>
A List<double> ordered [x,y,z] that corresponds to an amount that is multiplied to the SensorEvent before output as parallax factor.
final
sensitivity double
How "sensitive" this Normalization should be as an double. Clamped between 0..1.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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