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
60
61
62
63
|
#ifndef body_INC
#define body_INC
#include <Eigen/Dense>
#include <iostream>
#include "types.h"
#define R_HEIGHT 1e-2 /* measurement noise of height measurement */
#define IMU_NOISE 800e-6 /* IMU process noise */
#define IMU_RANDOMWALK 5e-6 /* Bias process noise */
using Eigen::Matrix;
using Eigen::Vector3d;
using Eigen::Quaterniond;
/*
* =====================================================================================
* Class: Body
* Description: State representation of body.
* =====================================================================================
*/
class Body
{
public:
/* ==================== LIFECYCLE ======================================= */
Body (){}; /* constructor */
/* ==================== ACCESSORS ======================================= */
Vector3d ned();
Vector3d vel();
/* ==================== MUTATORS ======================================= */
void accelerometer_bias( const Vector3d &b);
void pos( const UTM &utm);
void dx( const Matrix<double,9,1> &del);
void vel(const Matrix<double,3,1> &v);
/* ==================== OPERATORS ======================================= */
Matrix<double,9,9> F(const Vector3d &ang, const Quaterniond &q, double dt);
Matrix<double,1,9> H();
Matrix<double,1,1> h();
void motionModel ( const Vector3d &acc, const Vector3d &ang,
const Quaterniond &q, const double dt);
Matrix<double,9,9> Q(double dt);
Matrix<double,1,1> R();
Matrix<double,1,1> S(const Matrix<double,9,9> &Pxx);
Matrix<double,3,3> skewSymmetric(const Vector3d &x);
void unicsv();
protected:
/* ==================== METHODS ======================================= */
/* ==================== DATA MEMBERS ======================================= */
private:
/* ==================== METHODS ======================================= */
/* ==================== DATA MEMBERS ======================================= */
Matrix<double,9,1> X;
char utm_c;
int utm_i;
}; /* ----- end of class Body ----- */
#endif /* ----- #ifndef body_INC ----- */
|