Transfer gyro low pass filter to estimate.ino

Separate raw gyro data and filtered rates to different variables
This commit is contained in:
Oleg Kalachev
2024-04-20 14:52:01 +03:00
parent 24e8569905
commit 41a9a95747
8 changed files with 21 additions and 15 deletions

View File

@@ -26,6 +26,7 @@ float motors[4];
int16_t channels[16]; // raw rc channels
float controls[RC_CHANNELS];
Vector acc;
Vector gyro;
Vector rates;
Quaternion attitude;

View File

@@ -64,7 +64,7 @@ public:
step();
// read imu
rates = flu2frd(imu->AngularVelocity());
gyro = flu2frd(imu->AngularVelocity());
acc = this->accFilter.update(flu2frd(imu->LinearAcceleration()));
// read rc