CompassSmoothing class sealed
Strategy used to calm down a jittery heading.
All strategies work on the circle, so a stream that alternates between 359 and 1 degrees settles near 0, never near 180.
- Implementers
Constructors
- CompassSmoothing.circularAverage({int window})
-
Circular mean of the last
windowsamples.constfactory - CompassSmoothing.lowPass({double alpha})
-
Exponential low-pass filter.
alphais the weight of each new sample in(0, 1]: small values are smooth but laggy,1is no smoothing.constfactory - CompassSmoothing.none()
-
Passes samples through untouched.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createSmoother(
) → HeadingSmoother - Creates a fresh stateful filter for one stream.
-
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