Ver código fonte

changed smoothing values

eLandon_Miix 4 anos atrás
pai
commit
b715432bf1
3 arquivos alterados com 9 adições e 9 exclusões
  1. 2 2
      src/imu.cpp
  2. 5 5
      src/main.cpp
  3. 2 2
      src/oscmgr.cpp

+ 2 - 2
src/imu.cpp

@@ -18,8 +18,8 @@ Calib calib;
 
 BMM150class bmm150;
 
-float gyro_smoothing = 0.00001;
-float ahrs_smoothing = 0.001;
+float gyro_smoothing = 0.01;
+float ahrs_smoothing = 1;
 
 float accX = 0.0F;
 float accY = 0.0F;

+ 5 - 5
src/main.cpp

@@ -249,11 +249,11 @@ void loop() {
     sensor_last_sent = current_time;
     sendOSC_3f("/gyro", gyroX, gyroY, gyroZ);
     sendOSC("/gyro_smooth", gyro_rar.getValue()-2047);
-    sendOSC_3f("/acc", accX, accY, accZ);
-    sendOSC_3f("/ahrs", yaw_ahrs, pitch_ahrs, roll_ahrs);
-    sendOSC_3f("/ahrs_fixed", yaw, pitch, roll);
-    sendOSC_3f("/ahrs_smooth", yaw_smooth.get(), pitch_smooth.get(), roll_smooth.get());
-    sendOSC_3f("/ahrs_rar",yaw_rar.getValue()/10., pitch_rar.getValue()/10., roll_rar.getValue()/10.);
+    //sendOSC_3f("/acc", accX, accY, accZ);
+    // sendOSC_3f("/ahrs", yaw_ahrs, pitch_ahrs, roll_ahrs);
+    // sendOSC_3f("/ahrs_fixed", yaw, pitch, roll);
+    // sendOSC_3f("/ahrs_smooth", yaw_smooth.get(), pitch_smooth.get(), roll_smooth.get());
+    sendOSC_3f("/ahrs",yaw_rar.getValue()/10., pitch_rar.getValue()/10., roll_rar.getValue()/10.);
   }
 
 //update LCD

+ 2 - 2
src/oscmgr.cpp

@@ -15,8 +15,8 @@ IPAddress UDP_Out_IP(192, 168, 0, 27) ;
 int UDP_Out_Port = 12000 ;
 // IPAddress ipMulti(239, 0, 0, 56);
 // unsigned int portMulti = 12345;      // local port to listen on
-float OSC_gyro_smoothing = 0.00001;
-float OSC_ahrs_smoothing = 0.001;
+float OSC_gyro_smoothing = 0.01;
+float OSC_ahrs_smoothing = 1;
 
 template <typename TYPE> void sendOSC(const char * adress, TYPE parameter) {
   OSCMessage OSCmsg(adress);