summaryrefslogtreecommitdiff
path: root/src/feature.h
blob: 2a492c24dc0def06d417608625b51ae42a748e8f (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  feature_INC
#define  feature_INC
#include <Eigen/Dense>
#include "types.h"

using Eigen::Vector3d;
using Eigen::Matrix;
using Eigen::MatrixXd;
using Eigen::Quaterniond;

/*
 * =====================================================================================
 *        Class:  Feature
 *  Description:  
 * =====================================================================================
 */
class Feature
{
    public:
        /* ====================  LIFECYCLE     ======================================= */
        Feature ();                             /* constructor */

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

        /* ====================  MUTATORS      ======================================= */
        void motionModel ( const Vector3d &ang, const Vector3d &vel, const double dt);

        /* ====================  OPERATORS     ======================================= */
        Matrix<double,3,9> Fx();
        Matrix<double,3,3> Fy( const Vector3d &vel, const Vector3d &ang);
        Matrix<double,6,9> Hx( const Vector3d &pos, const Quaterniond &q);
        Matrix<double,6,3> Hy( const Vector3d &pos, const Quaterniond &q);
        Matrix<double,6,1> h( const Vector3d &x, const Quaterniond &q);
        Matrix<double,3,6> L();

        Matrix<double,3,3> Q(const double dt);
        Matrix<double,6,6> R();
        Matrix<double,6,6> S ( const Matrix<double,9,9> &Pxx, const Matrix<double,9,3> &Pxy,
            const Matrix<double,3,3> &Pyy, const Vector3d &pos, const Quaterniond &q);

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

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

    private:
        /* ====================  METHODS       ======================================= */
        Vector3d p2x(const Vector3d &p);
        Vector3d x2p(const Vector3d &x);

        /* ====================  DATA MEMBERS  ======================================= */
        Vector3d X;
        Quaterniond q0;
        Vector3d xb0w;

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


#endif   /* ----- #ifndef feature_INC  ----- */