21 lines
542 B
C
21 lines
542 B
C
//
|
|
// Created by SJQ on 2024/3/7.
|
|
//
|
|
#include "kalman_filter.h"
|
|
#include "bsp_dwt.h"
|
|
#ifndef WHEEL_LEGGED_ESTIMATOR_H
|
|
#define WHEEL_LEGGED_ESTIMATOR_H
|
|
|
|
typedef struct
|
|
{
|
|
KalmanFilter_t EstimateKF_; //使用KF作为状态观测器
|
|
float Estimate_X_[2]; //观测器估计的状态量
|
|
uint32_t DWT_CNT_; //计时用
|
|
float dt_;
|
|
}estimator_t;
|
|
|
|
void estimator_init(estimator_t *est ,float process_noise, float measure_noise);
|
|
void estimator_update(estimator_t *est ,float x,float x_dot,float ax);
|
|
|
|
#endif //WHEEL_LEGGED_ESTIMATOR_H
|