Calibrate for more frequent updates

This commit is contained in:
Eiren Rain
2021-01-02 21:57:03 +03:00
parent 197c197889
commit 87ee966a0c

View File

@@ -77,15 +77,15 @@ float Mxyz[3];
// These are the free parameters in the Mahony filter and fusion scheme,
// Kp for proportional feedback, Ki for integral
// with MPU-9250, angles start oscillating at Kp=40. Ki does not seem to help and is not required.
#define Kp 30.0
#define Ki 0.0
#define Kp 8.0
#define Ki 0.1
// globals for AHRS loop timing
unsigned long now = 0, last = 0; //micros() timers
float deltat = 0; //loop time in seconds
unsigned long now_ms, last_ms = 0; //millis() timers
unsigned long update_ms = 200; //send updates every "update_ms" milliseconds
unsigned long update_ms = 20; //send updates every "update_ms" milliseconds
// Vector to hold quaternion