Daniel Agar 9955cb4cc8
update accelerometer calibration to use Levenberg Marquardt least squares fit
- update accel cal to use Levenberg Marquardt least squares fit (same as magnetometer)
    - this is more robust to user positioning error as it only requires a nice distribution of points and doesn't actually depend on the user holding the vehicle in each orientation (although the calibration flow is still structured this way)
 - use online Welford mean to gather clean readings per orientation
 - reset if movement during per side data gathering
 - detect invalid rotations (and soon auto correct like mag)
 - add `CAL_ACC_SIDES` (analogous to CAL_MAG_SIDES) to limit accel calibration to a subset of orientations (when full set is difficult or impossible)
 - accel quick calibration (commander calibrate accel quick) assume vehicle is aligned with gravity and adjust offsets immediately
2021-11-10 16:21:25 -05:00
..