Nucleo-64 version

Dependents:   particle_filter_test read_sensor_data Bike_Sensor_Fusion Encoder ... more

Files at this revision

API Documentation at this revision

Comitter:
KCHuang
Date:
Thu Jun 11 13:41:02 2020 +0000
Parent:
16:682ed25a1f5d
Commit message:
20200611

Changed in this revision

LSM9DS0.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 682ed25a1f5d -r 5b28bc7fd9ba LSM9DS0.cpp
--- a/LSM9DS0.cpp	Thu Mar 26 07:34:17 2020 +0000
+++ b/LSM9DS0.cpp	Thu Jun 11 13:41:02 2020 +0000
@@ -876,7 +876,7 @@
     pitchAcc  = (float)atan2f(-data[1], -data[2])*180.0f/PI;//Let Z toggle to avoid pi to -pi transition.
   
     /* Apply Complementary Filter */
-    roll = roll * 0.98f + rollAcc * 0.02f;
+    roll = roll * 0.97f + rollAcc * 0.03f;
 //    pitch = pitch * 0.9f + pitchAcc * 0.1f;//0.95
 //    pitch = pitch * 0.94f + pitchAcc * 0.06f;//0.95
 //    if(pitch < 0)// = (pitch > 0 )? pitch:pitch;