state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
zero-delay-observer.hpp
Go to the documentation of this file.
1
15
16#ifndef ZERODELAYOBSERVER_H
17#define ZERODELAYOBSERVER_H
18
19#include <deque>
20
21#include <state-observation/api.h>
23
24namespace stateObservation
25{
43class STATE_OBSERVATION_DLLAPI ZeroDelayObserver : public ObserverBase
44{
45public:
50 ZeroDelayObserver(Index n, Index m, Index p = 0) : ObserverBase(n, m, p) {}
51
54
56 virtual ~ZeroDelayObserver(){};
57
65 virtual void setState(const ObserverBase::StateVector & x_k, TimeIndex k);
66
76 virtual void setCurrentState(const ObserverBase::StateVector & x_k);
77
80 virtual void clearStates();
81
86 bool stateIsSet() const;
87
90 virtual void setMeasurement(const ObserverBase::MeasureVector & y_k, TimeIndex k);
91
96
98 virtual void clearMeasurements();
99
103 virtual void setInput(const ObserverBase::InputVector & u_k, TimeIndex k);
104
108 virtual void pushInput(const ObserverBase::InputVector & u_k);
109
112 virtual void clearInputs();
113
117
124 virtual TimeIndex estimateState();
125
151
155
157 virtual TimeIndex getCurrentTime() const;
158
160 Vector getInput(TimeIndex k) const;
161
163 virtual TimeSize getInputsNumber() const;
164
166 virtual TimeIndex getInputTime() const;
167
169 Vector getMeasurement(TimeIndex k) const;
170
172 virtual TimeIndex getMeasurementTime() const;
173
175 virtual TimeSize getMeasurementsNumber() const;
176
178 virtual void setStateSize(Index n);
179
181 virtual void setMeasureSize(Index m);
182
184 virtual void setInputSize(Index p);
185
186protected:
190
192
194 IndexedVector x_;
195
197 IndexedVectorArray y_;
198
200 IndexedVectorArray u_;
201
202public:
203 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
204};
205
206} // namespace stateObservation
207
208#endif // ZERODELAYOBSERVER
Vector StateVector
StateVector is the type of state vector.
Vector InputVector
InputVector is the type of the input vector.
ObserverBase(Index n, Index m, Index p=0)
Vector MeasureVector
MeasureVector is the type of measurements vector.
virtual TimeSize getMeasurementsNumber() const
Gets the number of regitered measurements.
virtual TimeSize getInputsNumber() const
Get the number of available inputs.
virtual void setInputSize(Index p)
changes the size of the input vector: reset the stored input vectors
virtual StateVector oneStepEstimation_()=0
virtual TimeIndex estimateState()
run the observer until the measurement vector is depleted.
virtual void pushInput(const ObserverBase::InputVector &u_k)
Set the input value at the next time indext.
virtual void setMeasureSize(Index m)
changes the size of the measurement vector: reset the stored measurement vectors
Vector getMeasurement(TimeIndex k) const
Get the measurement of the time index k.
virtual TimeIndex getInputTime() const
Get the time index of the last given input.
IndexedVectorArray u_
Container for the inputs.
bool stateIsSet() const
Returns if the state is set or not. The state being set is mandatory to start the estimator.
virtual void clearInputsAndMeasurements()
Remove all the given values of the inputs and measurements.
virtual void clearStates()
Removes the state estimation.
ZeroDelayObserver(Index n, Index m, Index p=0)
virtual void setCurrentState(const ObserverBase::StateVector &x_k)
Modify the value of the state vector at the current time.
IndexedVectorArray y_
Container for the measurements.
IndexedVector x_
while the measurements and iputs are put in lists
virtual void setMeasurement(const ObserverBase::MeasureVector &y_k, TimeIndex k)
virtual void setState(const ObserverBase::StateVector &x_k, TimeIndex k)
Set the value of the state vector at time index k.
virtual void setStateSize(Index n)
changes the size of the state vector: resets the stored state vector
virtual ObserverBase::StateVector getEstimatedState(TimeIndex k)
getestimated State
virtual TimeIndex getMeasurementTime() const
Get the time index of the last given measurement.
virtual void pushMeasurement(const ObserverBase::MeasureVector &y_k)
Sets the measurement value at the next time index.
virtual void setInput(const ObserverBase::InputVector &u_k, TimeIndex k)
virtual TimeIndex getCurrentTime() const
Get the value of the time index of the current state estimation.
virtual ObserverBase::StateVector getCurrentEstimatedState() const
Get the Current Estimated State.
ZeroDelayObserver()
Default constructor (default values for n,m,p are zero).
virtual void clearMeasurements()
Remove all the given values of the measurements.
Vector getInput(TimeIndex k) const
Get the value of the input of the time index k.
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.
Defines the base class of a state observer. The observer is destinated to any dynamical system with a...