Final1x

Dependencies:   GYRO_DISCO_L476VG mbed BSP_DISCO_L476VG COMPASS_DISCO_L476VG

Revision:
7:763b230d3b66
Parent:
6:6df9f66ca6bb
--- a/main.cpp	Sat Jun 13 16:28:37 2020 +0000
+++ b/main.cpp	Sat Feb 27 06:55:41 2021 +0000
@@ -1,6 +1,12 @@
+// pour modifier la sensibilite du gyro
+// dans le fichier stm32l476g_discovery_guroscope.c
+// ligne 106   
+//L3GD20_InitStructure.Full_Scale = L3GD20_FULLSCALE_2000;
 #include "mbed.h"
 #include "GYRO_DISCO_L476VG.h"
 #include "COMPASS_DISCO_L476VG.h"
+#define TE 0.01
+#define FC 0.1
 //
 GYRO_DISCO_L476VG gyro;
 COMPASS_DISCO_L476VG compass;
@@ -67,12 +73,12 @@
     double GyrF[2];
     wait(1);
     pc.printf("Super Inclinometre \n");
-    coef_filtre_PB(1,0.05,0.01,coef_acc);   // H0 f0 Te
-    coef_filtre_PB(1/(2*3.1415926*0.05),0.05,0.01,coef_gyr);   // H0 f0 Te
+    coef_filtre_PB(1,FC,TE,coef_acc);   // H0 f0 Te
+    coef_filtre_PB(1/(2*3.1415926*FC),FC,TE,coef_gyr);   // H0 f0 Te
     //pc.printf("a= %f   b=%f \n\r",coef_acc[0],coef_acc[1]);
     float gyoff=gyro_zero();
     float anoff=angle_zero();
-    ticker.attach(&mesure,0.01);
+    ticker.attach(&mesure,TE);
     unsigned char cpt=0;
     //
     while(1) {