state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
tilt-estimator.hpp
Go to the documentation of this file.
1
11
12#ifndef TILTESTIMATORHPP
13#define TILTESTIMATORHPP
14
15#include <state-observation/api.h>
17
18namespace stateObservation
19{
20
35class STATE_OBSERVATION_DLLAPI TiltEstimator : public ZeroDelayObserver
36{
37public:
44 TiltEstimator(double alpha, double beta, double gamma, double dt);
45
50 void initEstimator(Vector3 x1 = Vector3::Zero(), Vector3 x2_prime = Vector3::UnitZ(), Vector3 x2 = Vector3::UnitZ());
51
53 void setAlpha(const double alpha)
54 {
55 alpha_ = alpha;
56 }
57 double getAlpha() const
58 {
59 return alpha_;
60 }
61
63 void setBeta(const double beta)
64 {
65 beta_ = beta;
66 }
67 double getBeta() const
68 {
69 return beta_;
70 }
71
73 void setGamma(const double gamma)
74 {
75 gamma_ = gamma;
76 }
77 double getGamma() const
78 {
79 return gamma_;
80 }
81
83 void setSamplingTime(const double dt)
84 {
85 dt_ = dt;
86 }
87 double getSamplingTime() const
88 {
89 return dt_;
90 }
91
93 void setMeasurement(const Vector3 & yv_k, const Vector3 & ya_k, const Vector3 & yg_k, TimeIndex k);
94
96
97 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
98
99protected:
101 double alpha_, beta_, gamma_;
102
104 double dt_;
105
108 Vector3 x1_hat_;
109 Vector3 x2_hat_prime_;
110 Vector3 x2_hat_;
111 Vector3 dx1_hat;
112
115};
116
117} // namespace stateObservation
118
119#endif // TILTESTIMATORHPP
Vector StateVector
StateVector is the type of state vector.
void setSamplingTime(const double dt)
set the sampling time of the measurements
double alpha_
The parameters of the estimator.
void setGamma(const double gamma)
set the gain of x2_hat variable
void setAlpha(const double alpha)
set the gain of x1_hat variable
TiltEstimator(double alpha, double beta, double gamma, double dt)
Vector3 x1_
variables used for the computation
void setMeasurement(const Vector3 &yv_k, const Vector3 &ya_k, const Vector3 &yg_k, TimeIndex k)
sets ths measurement (accelero and gyro stacked in one vector)
void setBeta(const double beta)
set the gain of x2prime_hat variable
StateVector oneStepEstimation_()
The tilt estimator loop.
void initEstimator(Vector3 x1=Vector3::Zero(), Vector3 x2_prime=Vector3::UnitZ(), Vector3 x2=Vector3::UnitZ())
initializes the state vector.
ZeroDelayObserver(Index n, Index m, Index p=0)
virtual void setMeasurement(const ObserverBase::MeasureVector &y_k, TimeIndex k)
Filtering of divergent component of motion (DCM) and estimation of a bias betweeen the DCM and the co...
Eigen::Vector3d Vector3
3D vector
Defines the base class of online zero delay observers. Zero delay observers are the classical state o...