solaESKF_EIGEN

Dependencies:   mbed LPS25HB_I2C LSM9DS1 PIDcontroller LoopTicker GPSUBX_UART_Eigen SBUS_without_mainfile MedianFilter Eigen UsaPack solaESKF_Eigen Vector3 CalibrateMagneto FastPWM

Revision:
21:df4e4e857a3e
Parent:
20:2c3f113a8e8f
Child:
22:da9893b71f24
--- a/main.cpp	Tue Feb 09 03:31:18 2021 +0000
+++ b/main.cpp	Tue Feb 09 09:03:00 2021 +0000
@@ -51,7 +51,7 @@
 // のセットアップ
 // (float Kp, float Ki, float Kd, float tSample);
 const double PID_dt = 0.01;
-PID test_control(0.1, 0.1, 0.1, PID_dt);
+PID test_control(1.2, 0.0, 0.0, PID_dt);
 Timer t;
 
 int ch1, ch2;
@@ -104,7 +104,8 @@
     // のセットアップ
     test_control.setInputLimits(-60.0,60.0); // 60°が限界
     test_control.setOutputLimits(1200, 1800);
-    test_control.setSetPoint(0); // 仮(実際にはsbusの読み込みなど)
+    test_control.setSetPoint(0.0); // 仮(実際にはsbusの読み込みなど)
+    test_control.setBias((1200+1800)/2); // out range の真ん中に設定する(out rangeの中央が安定点のため)
     t.start();
     while(1) {
         tstart = t.read();