Yaw drifts counter-clockwise when stationary #21

Closed
opened 2026-02-28 17:34:55 -05:00 by seb · 0 comments
Owner

Bug

With the FC sitting still on the desk, yaw accumulates in the CCW direction (~35 counts per sample = ~3.5°/s drift).

Observed telemetry (board stationary):

{"y":0}
{"y":-35}
{"y":-71}
{"y":-107}

Cause

Pure gyro Z integration with no drift correction. MPU6000 gyro has a zero-rate offset (bias) that accumulates over time. Without a magnetometer there is no absolute yaw reference.

Possible fixes

  1. Gyro bias calibration at startup — sample gz for ~1s while stationary, subtract mean from all subsequent readings
  2. High-pass filter — suppress slow drift while keeping fast rotations
  3. Dead zone — ignore gz values below a noise threshold (e.g. ±0.5°/s)
  4. Accept it — yaw drift is inherent without a magnetometer; the YAW RESET button in the UI is the manual workaround

Option 1 (startup bias cal) is the standard approach and would eliminate most of the drift.

## Bug With the FC sitting still on the desk, yaw accumulates in the CCW direction (~35 counts per sample = ~3.5°/s drift). Observed telemetry (board stationary): ``` {"y":0} {"y":-35} {"y":-71} {"y":-107} ``` ## Cause Pure gyro Z integration with no drift correction. MPU6000 gyro has a zero-rate offset (bias) that accumulates over time. Without a magnetometer there is no absolute yaw reference. ## Possible fixes 1. **Gyro bias calibration at startup** — sample gz for ~1s while stationary, subtract mean from all subsequent readings 2. **High-pass filter** — suppress slow drift while keeping fast rotations 3. **Dead zone** — ignore gz values below a noise threshold (e.g. ±0.5°/s) 4. **Accept it** — yaw drift is inherent without a magnetometer; the YAW RESET button in the UI is the manual workaround Option 1 (startup bias cal) is the standard approach and would eliminate most of the drift.
seb closed this issue 2026-02-28 18:45:18 -05:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#21
No description provided.