first commit

This commit is contained in:
2024-01-24 15:56:10 +08:00
commit 2c58355e63
40 changed files with 5524 additions and 0 deletions

12
IMU/kalman.c Normal file
View File

@ -0,0 +1,12 @@
#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;
}