[fusion] Enable fast heading convergence when mag cal happens

Fusion was tuned to take gyro readings in consideration more than mag
readings as gyro is usually more trustworthy and not susceptible to
various mag disturbances. This enables the fusion hold correct
headings for a while even if device is getting close/into to mag
disturbances caused by e.g. a magnet, steel structure or simply desk
with metal frame.

However, this causes issues when fusion is started in a "bad" region
where mag field is not pointing to earth mag north or when the mag
sensor is not calibrated.  The heading will be inevitably wrong in the
beginning. However, it is also desired to quickly converge to the
right heading after bad condition is lifted. If the user executed a
mag calibration, that means the user likely noticed problem in heading
and would like to correct. It is safe to assume the magnetic field
around is relatively clean as user is actively participating and
have the fusion quickly converge to current magnetic field reading.

Existing implementation cannot tell if the transition is towards the
good or bad, and thus being conservative at all time. This change
implements fast heading convergence at mag calibration, which will
greatly allievate aforementioned issue.

Bug: 30903098
Bug: 30130336
Bug: 30092812
Bug: 26496265

Change-Id: I51616c7614ec4657587df2b2720e10dd8f3f3d66
(cherry picked from commit 6ecc0b705d9a05cd0ce29f8d02ade126689db388)
3 files changed