summaryrefslogtreecommitdiff
path: root/src/state.h
blob: c91c1ae254f47a52fc73b5bb14b6bc18655a7402 (plain)
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
51
52
53
54
55
56
57
58
59
#ifndef  state_INC
#define  state_INC
#include <Eigen/Dense>
#include "body.h"
#include "types.h"

#define MAXFEATURES 30
using Eigen::Matrix;
using Eigen::Dynamic;
using Eigen::Vector3d;
using Eigen::Quaterniond;
/*
 * =====================================================================================
 *        Class:  State
 *  Description:  
 * =====================================================================================
 */
class State
{
    public:
        /* ====================  LIFECYCLE     ======================================= */
        State ();                             /* constructor */

        /* ====================  ACCESSORS     ======================================= */

        /* ====================  MUTATORS      ======================================= */
        void accelerometer_bias(const Vector3d &b);
        void enu(const UTM &utm);
        void motionModel(const Vector3d &acc, const Vector3d &ang,
                const Quaterniond &q, const double dt);
        void position_covariance(const Matrix<double,3,3> &p);
        void velocity_covariance(const Matrix<double,3,3> &p);
        void vel(const Matrix<double,3,1> &v);
        void Pkk1 ( const Vector3d &ang, const Quaterniond &q, const double dt);

        /* ====================  OPERATORS     ======================================= */
        void update ( const Matrix<double,1,1> &z);
        void unicsv();

    protected:
        /* ====================  METHODS       ======================================= */

        /* ====================  DATA MEMBERS  ======================================= */

    private:
        /* ====================  METHODS       ======================================= */

        /* ====================  DATA MEMBERS  ======================================= */
        Body *body;
        Matrix<double, Dynamic, Dynamic, 0, 9+3*MAXFEATURES, 9+3*MAXFEATURES> P;
        char utm_c;
        int utm_i;


}; /* -----  end of class State  ----- */



#endif   /* ----- #ifndef state_INC  ----- */