-
Notifications
You must be signed in to change notification settings - Fork 83
/
ExtendedKalman.h
51 lines (42 loc) · 1.08 KB
/
ExtendedKalman.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* File: ExtendedKalman.h
* Author: matt
*
* Created on 14 March 2013, 17:26
*/
#ifndef EXTENDEDKALMAN_H
#define EXTENDEDKALMAN_H
#include <iostream>
#include "struct_calibratedData.h"
#include "struct_euler.h"
#include "Quaternion.h"
#include "Eigen/Dense"
using Eigen::Matrix;
#define pi 3.14159265358979
class ExtendedKalmanClass
{
public:
ExtendedKalmanClass();
ExtendedKalmanClass(const ExtendedKalmanClass& orig);
virtual ~ExtendedKalmanClass();
QuaternionClass predict(s_calibratedData* calibratedData, float dt);
QuaternionClass update(s_calibratedData* calibratedData, float dt);
private:
double q0, q1, q2, q3;
double wx, wy, wz;
double wxb, wyb, wzb;
Matrix<double,7,7> Q;
Matrix<double, 7, 1> x;
Matrix<double, 7, 7> F;
Matrix<double, 7, 7> P;
Matrix<double, 3, 1> z;
Matrix<double, 3, 1> h;
Matrix<double, 3, 1> y;
Matrix<double, 3, 7> H;
Matrix<double, 3, 3> S;
Matrix<double, 3, 3> R;
Matrix<double, 7, 3> K;
Matrix<double, 7, 7> I;
double norm;
};
#endif /* EXTENDEDKALMAN_H */