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 window samples.
const
factory
CompassSmoothing.lowPass({double alpha})
Exponential low-pass filter. alpha is the weight of each new sample in (0, 1]: small values are smooth but laggy, 1 is no smoothing.
const
factory
CompassSmoothing.none()
Passes samples through untouched.
const
factory

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