Eigen Revision
Dependencies: mbed LPS25HB_I2C LSM9DS1 PIDcontroller Autopilot_Eigen LoopTicker GPSUBX_UART_Eigen SBUS_without_mainfile MedianFilter Eigen UsaPack solaESKF_Eigen Vector3 CalibrateMagneto FastPWM
Diff: imu.cpp
- Revision:
- 66:e5afad70fdd8
- Parent:
- 61:c05353850017
- Child:
- 68:b9f6938fab9d
--- a/imu.cpp Tue Jun 22 02:08:31 2021 +0000 +++ b/imu.cpp Tue Jun 22 02:19:14 2021 +0000 @@ -28,15 +28,4 @@ mag.x = -outputMag[0]; mag.y = -outputMag[1]; mag.z = -outputMag[2]; - - float lpc_acc = 0.95f; - LPacc = lpc_acc*acc + (1.0f-lpc_acc)*LPacc; - - float lpc_mag = 0.45f; - LPmag = lpc_mag*mag + (1.0f-lpc_mag)*LPmag; - - val_thmg = 0.99f*val_thmg+0.01f*acos((mag % acc)/mag.Norm()/acc.Norm()); - accref.z = 0.99f*accref.z + 0.01f*(-acc.Norm()); - - magref = ekf.calcMagRef(LPmag/LPmag.Norm()); } \ No newline at end of file