state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
accelerometer-gyrometer.hpp
Go to the documentation of this file.
1
9
10#ifndef SIMULATIONACCELEROMETERGYROMETERSENSORHPP
11#define SIMULATIONACCELEROMETERGYROMETERSENSORHPP
12
13#include <boost/assert.hpp>
14#include <Eigen/Core>
15
16#include <state-observation/api.h>
20
21namespace stateObservation
22{
32
33class STATE_OBSERVATION_DLLAPI AccelerometerGyrometer : public AlgebraicSensor,
36{
37public:
38 AccelerometerGyrometer(bool matrixMode = false, bool withAcceleroBias = false, bool withGyroBias = false);
39
42
43 void setMatrixMode(bool matrixMode)
44 {
45 matrixMode_ = matrixMode;
46 updateStateSize_();
47 }
48
49 void setWithGyroBias(bool withGyroBias)
50 {
51 withGyroBias_ = withGyroBias;
52 updateStateSize_();
53 }
54
55 void setWithAcceleroBias(bool withAcceleroBias)
56 {
57 withAcceleroBias_ = withAcceleroBias;
58 updateStateSize_();
59 }
60
61protected:
63 virtual Index getStateSize_() const;
64
66 virtual Index getMeasurementSize_() const;
67
69
70 void updateStateSize_();
71
72 Matrix3 r_;
73 Vector3 acc_;
74 Vector3 omega_;
75 Vector output_;
76
77 bool withGyroBias_;
78 bool withAcceleroBias_;
79
80 bool matrixMode_;
81
82 static const Index stateSize_ = 10;
83 static const Index stateSizeMatrix_ = 15;
84 static const Index measurementSize_ = 6;
85
86 Index currentStateSize_;
87};
88
89} // namespace stateObservation
90
91#endif // SIMULATIONACCELEROMETERGYROMETERSENSORHPP
Gives a base class for algebraic sensors.
virtual Index getMeasurementSize_() const
Gets the measurements vector size.
virtual Index getStateSize_() const
Gets the state vector Size.
AlgebraicSensor()
Default constructor.
Implements the measurements given by an accelerometer.
Implements the gyrometer measurement algorithm.
Implements the accelerometer algorithm.
Filtering of divergent component of motion (DCM) and estimation of a bias betweeen the DCM and the co...
Eigen::Vector3d Vector3
3D vector
Eigen::Matrix3d Matrix3
3x3 Scalar Matrix
Eigen::VectorXd Vector
Dynamic sized scalar vector.
The implementation of the algorithm of a rotation velocity sensor.