Normalization class
A parameter class that primarily pertain to XLayer
s
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
ory
axis, as gyroscope is used forz
data) - scalar, an amount to multiply by the calculated sensor parallax factor
- samplingRate, how frequently sensor data samples are propagated
- sensitivity, a
double
clamped between0..1
, that influences the maximumList
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
- A larger
❗ 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
XLayer
s for customizing the intake ofSensorEvent
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 rawAccelerometerEvent
, 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 is1000ms
.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 theSensorEvent
before output as parallax factor.final - sensitivity → double
-
How "sensitive" this
Normalization
should be as andouble
. Clamped between0..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