compensation property

List<double> compensation
final

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.

If Reset.shouldReset is true, this compensation is applied in addition.

This "compensated" sensor data may differ from, say, raw y output which is 0 only when the device is flat on its back on a surface.

The default is [0, 0] which corresponds to no compensation for the X-axis nor Y-axis readings. Compensation.none applies a const [0,0] compensation.

An initialization around Compensation.mobilePortraitMostlyUpright ([0, 8.5]) roughly correlates to a mobile phone that is held upright, portrait mode toward a user's face.

Implementation

final List<double> compensation;