first commit

This commit is contained in:
2023-12-18 14:36:22 +08:00
commit 0f3cf0952c
184 changed files with 91562 additions and 0 deletions

10
MPU6050/APP/kalman.c Normal file
View File

@ -0,0 +1,10 @@
#include "kalman.h"
//һά<D2BB><CEAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD>
void kalmanfiter(struct KalmanFilter *EKF,float input)
{
EKF->NewP = EKF->LastP + EKF->Q;
EKF->Kg = EKF->NewP / (EKF->NewP + EKF->R);
EKF->Out = EKF->Out + EKF->Kg * (input - EKF->Out);
EKF->LastP = (1 - EKF->Kg) * EKF->NewP;
}