加了个滤波1

This commit is contained in:
ws 2025-05-12 19:42:14 +08:00
parent 602a6a2728
commit 95ea791d34
3 changed files with 3 additions and 2 deletions

View File

@ -35,7 +35,7 @@ void KalmanCreate(extKalman_t *p,float T_Q,float T_R)
p->Q = T_Q;
p->R = T_R;
p->A = 1;
p->B = 0;
p->B = 0;
p->H = 1;
p->X_mid = p->X_last;
}

View File

@ -16,7 +16,7 @@ typedef struct {
float P_last; //上一时刻最优结果的协方差 P(k-1|k-1)
float kg; //kalman增益
float A; //系统参数
float B;
float B;
float Q;
float R;
float H;

View File

@ -21,6 +21,7 @@ void FunctionBall(void *argument)
(void)argument; /* 未使用argument消除警告 */
const uint32_t delay_tick = osKernelGetTickFreq() / TASK_FREQ_BALL;
ball.Filter_init(TASK_FREQ_BALL);
uint32_t tick = osKernelGetTickCount();
while(1)