state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
algebraic-sensor.hpp
Go to the documentation of this file.
1
9
10#ifndef SIMULATIONALGEBRAICSENSORHPP
11#define SIMULATIONALGEBRAICSENSORHPP
12
13#include <boost/assert.hpp>
14#include <Eigen/Core>
15
16#include <state-observation/api.h>
18
19namespace stateObservation
20{
33
34class STATE_OBSERVATION_DLLAPI AlgebraicSensor : public SensorBase
35{
36public:
39
41 virtual ~AlgebraicSensor() {}
42
45 virtual Vector getMeasurements(bool noisy = true);
46
48 virtual void setState(const Vector & state, TimeIndex k);
49
51 virtual TimeIndex getTime() const;
52
54 virtual Index getStateSize() const;
55
57 virtual Index getMeasurementSize() const;
58
62 virtual Index concatenateWithInput(Index n);
63
64protected:
68
69 virtual Index getStateSize_() const = 0;
70
71 virtual Index getMeasurementSize_() const = 0;
72
73 Vector computeNoisyMeasurement_();
74
75 virtual void checkState_(const Vector &);
76
77 TimeIndex time_;
78
79 Index concat_;
80
81 Vector state_;
82
83 Vector directInputToOutput_;
84
85 bool storedNoisyMeasurement_;
86
87 Vector noisyMeasurement_;
88
89 bool storedNoiselessMeasurement_;
90
91 Vector noiselessMeasurement_;
92};
93
94} // namespace stateObservation
95
96#endif // SIMULATIONALGEBRAICSENSORHPP
AlgebraicSensor()
Default constructor.
virtual void setState(const Vector &state, TimeIndex k)
Sets the value of the state at instant k.
virtual Vector computeNoiselessMeasurement_()=0
virtual Index concatenateWithInput(Index n)
virtual Index getMeasurementSize() const
get the size of the measurements. Pure virtual method.
virtual ~AlgebraicSensor()
virtual destructor
virtual Vector getMeasurements(bool noisy=true)
virtual TimeIndex getTime() const
gets the current time
virtual Index getStateSize() const
gets the state vector size. Pure virtual method.
SensorBase()
default constructor
Filtering of divergent component of motion (DCM) and estimation of a bias betweeen the DCM and the co...
Eigen::VectorXd Vector
Dynamic sized scalar vector.
Implements the base class of all sensors.