Accelerometer & Gyro Calibration Produces invalid (shifted from "0") results when BoardLevelTrim and accel/gyro_bias have non-zero values on start of calibration

Description

The issue is present for Revolution Flight Controller but may affect other FC aswell...

The initial accel/gyro calibration on freshly updated/erased board gives correct results. Subsequent accel/gyro calibrations on the already setup FC, i.e. with BoardLevelTrim.Roll/Pitch set to non-zero values and withaccel_bias / gyro_bias x,y,z also non-zero will produce results that are bad (shifted from zero).

To reproduce the issue:

Get a fresh Revo FC with initially performed all calibrations (especially Accel / Gyro / BoardLevel). Set manually in Object Browser:

  • Settings | AccelGyroSettings | gyro_bias.[X] = 1

  • Settings | AccelGyroSettings | gyro_bias.[Y] = 100

  • Settings | AccelGyroSettings | gyro_bias.[Z] = 1000

Perform Configuration | Attitude | Calibration | Gyro Bias Calibration | Start ....... Save

In the scopes Raw GyroState shows values for

  • X: -23.6 deg/s

  • Y: -6.6 deg/s

  • Z: -0.2 deg/s

These values are far from expected +-0.1 deg/s.

If the initial gyro_bias.x / y / z are "0" OR BoardLevelTrim.Roll / Pitch are "0" then calibration results are correct.

Same applies to Accelerometer calibration.

Environment

None

Status

Assignee

Lalanne Laurent

Reporter

Julian Lilov

Labels

None

Fix versions

Affects versions

Priority

Medium
Configure