mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 03:40:35 +08:00
Work on filter.
This commit is contained in:
+8
-6
@@ -10,17 +10,19 @@ int main()
|
||||
{
|
||||
const size_t n_x = 6;
|
||||
const size_t n_y = 5;
|
||||
SquareMatrix<float, n_x> P = eye<float, n_x>()*0.1;
|
||||
SquareMatrix<float, n_y> R = eye<float, n_y>()*0.1;
|
||||
SquareMatrix<float, n_x> P = eye<float, n_x>();
|
||||
SquareMatrix<float, n_y> R = eye<float, n_y>();
|
||||
Matrix<float, n_y, n_x> C;
|
||||
C(0,0) = 1;
|
||||
Vector<float, n_y> r;
|
||||
r.setZero();
|
||||
r(0) = 1;
|
||||
C.setIdentity();
|
||||
float data[] = {1,2,3,4,5};
|
||||
Vector<float, n_y> r(data);
|
||||
|
||||
Vector<float, n_x> dx;
|
||||
float beta = 0;
|
||||
kalman_correct<float, 6, 5>(P, C, R, r, dx, beta);
|
||||
|
||||
dx.print();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user