mag calibration: improve 4 and 2 side calibration

- if less than 6 sides are calibrated, keep the existing calibration and
  update the offsets and scales
- if 2 sides are calibrated, estimate the offsets only (as this is enough
  if a full calibration was done already, and the problem is not
  constrained enough to estimate scales and offsets)
This commit is contained in:
Beat Küng
2019-11-29 14:14:00 -05:00
committed by Daniel Agar
parent 1d78f02733
commit b973b2ca64
5 changed files with 66 additions and 42 deletions
+5
View File
@@ -42,6 +42,11 @@ PARAM_DEFINE_INT32(CAL_MAG_PRIME, 0);
/**
* Bitfield selecting mag sides for calibration
*
* If set to two side calibration, only the offsets are estimated, the scale
* calibration is left unchanged. Thus an initial six side calibration is
* recommended.
*
* Bits:
* DETECT_ORIENTATION_TAIL_DOWN = 1
* DETECT_ORIENTATION_NOSE_DOWN = 2
* DETECT_ORIENTATION_LEFT = 4