12#ifndef UNIDIMLIPMDCMBIASESTIMATOR_HPP
13#define UNIDIMLIPMDCMBIASESTIMATOR_HPP
15#include <state-observation/api.h>
37 constexpr static double defaultDt_ = 0.005;
38 constexpr static double defaultOmega_ =
tools::sqrt(cst::gravityConstant);
46 constexpr static double defaultDcmErrorStd = 0.01;
50 constexpr static double defaultBiasUncertainty = 0.01;
65 double omega_0 = defaultOmega_,
70 double dcmMeasureErrorStd = defaultDcmErrorStd,
73 double initBiasUncertainty = defaultBiasUncertainty);
90 bool measurementIsWithBias =
true,
92 double dcmMeasureErrorStd = defaultDcmErrorStd,
95 double initBiasuncertainty = defaultBiasUncertainty);
118 void setBias(
double bias,
double uncertainty);
155 return filter_.getEstimatedState(filter_.getMeasurementTime());
186 void updateMatricesABQ_();
190 double biasDriftStd_;
207 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
The class of a Linear Kalman filter.
static constexpr double defaultBiasDriftSecond
default expected drift of the bias every second
~UnidimLipmDcmEstimator()
Destroy the Lipm Dcm Bias Estimator object.
void setBias(double bias)
Set the Bias object from a guess.
double getUnbiasedDCM() const
Get the Unbiased DCM filtered by the estimator.
static constexpr double defaultDCMUncertainty
default uncertainty in the initial values of DCM and Bias
LinearKalmanFilter & getFilter()
Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions...
double getBias() const
Get the estimated Bias.
void setUnbiasedDCM(double dcm)
set the real DCM position from a guess
UnidimLipmDcmEstimator(double dt=defaultDt_, double omega_0=defaultOmega_, double biasDriftPerSecondStd=defaultBiasDriftSecond, double initDcm=0, double initZMP=0, double initBias=0, double dcmMeasureErrorStd=defaultDcmErrorStd, double zmpMeasureErrorStd=defaultZmpErrorStd, double initDcmUncertainty=defaultDCMUncertainty, double initBiasUncertainty=defaultBiasUncertainty)
Construct a new Unidimensional Lipm Dcm Estimator.
void setSamplingTime(double dt)
Set the Sampling Time.
void setDcmMeasureErrorStd(double)
Set the Dcm Measurement Error Standard.
void setUnbiasedDCM(double dcm, double uncertainty)
set the real DCM position from a guess
static constexpr double defaultZmpErrorStd
default error in the estimation of the sensors
void setInputs(double dcm, double zmp)
Set the Inputs of the estimator.
void resetWithInputs(double measuredDcm, double measuredZMP, bool measurementIsWithBias=true, double biasDriftPerSecondStd=defaultBiasDriftSecond, double dcmMeasureErrorStd=defaultDcmErrorStd, double zmpMeasureErrorStd=defaultZmpErrorStd, double initBias=0, double initBiasuncertainty=defaultBiasUncertainty)
Construct a new Lipm Dcm Bias Estimator object.
void setBias(double bias, double uncertainty)
Set the Bias object from a guess.
Vector2 update()
Runs the estimation. Needs to be called every timestep.
const LinearKalmanFilter & getFilter() const
Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions...
void setBiasDriftPerSecond(double driftPerSecond)
Set the Bias Drift Per Second.
void setLipmNaturalFrequency(double omega_0)
Set the Lipm Natural Frequency.
void setZmpMeasureErrorStd(double)
Set the Zmp Measurement Error Stamdard devbiation.
Defines the class of a Linear Kalman filter.
Gathers many kinds of algorithms.
double constexpr sqrt(double x)
Constexpr version of the square root.
Filtering of divergent component of motion (DCM) and estimation of a bias betweeen the DCM and the co...
Eigen::Matrix2d Matrix2
2D scalar Matrix
Eigen::Matrix< double, 2, 1 > Vector2
2d Vector
Eigen::Matrix< double, 1, 1 > Matrix1
1D scalar Matrix