Add parameter for configuring gyro bias lpf

+ reset the filter on `reset` command
This commit is contained in:
Oleg Kalachev
2026-01-24 09:31:32 +03:00
parent 5b654e4d8e
commit 7ad3022798
3 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -19,6 +19,8 @@ Vector acc; // accelerometer output, m/s/s
Vector accBias;
Vector accScale(1, 1, 1);
LowPassFilter<Vector> gyroBiasFilter(0.001);
void setupIMU() {
print("Setup IMU\n");
imu.begin();
@@ -50,8 +52,6 @@ void readIMU() {
void calibrateGyroOnce() {
static Delay landedDelay(2);
if (!landedDelay.update(landed)) return; // calibrate only if definitely stationary
static LowPassFilter<Vector> gyroBiasFilter(0.001);
gyroBias = gyroBiasFilter.update(gyro);
}