OSDN Git Service

Tweaked parameters for faster magnetometer calibration
authorAdriana Reus <adriana.reus@intel.com>
Mon, 26 May 2014 11:54:54 +0000 (14:54 +0300)
committersuyyala <sridhar.uyyala@intel.com>
Sat, 7 Jun 2014 16:37:47 +0000 (09:37 -0700)
commit635a483dea87f784e9f7f97f895718ef594536c9
tree56865927c8a81858f728ea8f051dc33e36d197cc
parente32477b608275457a82213689b72706630a6fec1
Tweaked parameters for faster magnetometer calibration

These parameters are taken into consideration when
collecting the data samples (the points that we are
going to fit on an ellipsoid).

MIN_DIFF
    Minimum difference between collected points (there
    is no point in collecting events that are similar
    or very close because we won't get a sphere or an
    ellipsoid that way, however a big value doesn't make
    much sense either because the time of collecting a
    certain number of "good" events would increase,
    many would be rejected)

MAX_SQR_ERR
    Maximum allowed error for a calibration, if a
    calibration has an error bigger than this we won't
    allow it.

LOOKBACK_COUNT
    The number of previous events that we consider that
    should be different enough from the current event
    (tightly coupled to the MIN_DIFF parameter).

The smaller the MIN_DIFF and the LOOPBACK_COUNT the faster
a collection is gathered.

The bigger the MAX_SQR_ERR the faster a calibration is accepted.

Testing shows that this new set of parameters leads to a faster
first calibration with no visible user impact on its quality.

Change-Id: Ibe09c02c00975321459d599039d7e4767a880e96
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
calibration.h