42 int kappa = 3 - States) {
63 double lambda = std::pow(m_alpha, 2) * (States + m_kappa) - States;
64 double eta = std::sqrt(lambda + States);
70 sigmas.template block<States, 1>(0, 0) = x;
71 for (
int k = 0; k < States; ++k) {
72 sigmas.template block<States, 1>(0, k + 1) =
73 x + U.template block<States, 1>(0, k);
74 sigmas.template block<States, 1>(0, States + k + 1) =
75 x - U.template block<States, 1>(0, k);
91 double Wm(
int i)
const {
return m_Wm(i, 0); }
103 double Wc(
int i)
const {
return m_Wc(i, 0); }
116 void ComputeWeights(
double beta) {
117 double lambda = std::pow(m_alpha, 2) * (States + m_kappa) - States;
119 double c = 0.5 / (States + lambda);
123 m_Wm(0) = lambda / (States + lambda);
124 m_Wc(0) = lambda / (States + lambda) + (1 - std::pow(m_alpha, 2) + beta);
Generates sigma points and weights according to Van der Merwe's 2004 dissertation[1] for the Unscente...
Definition MerweScaledSigmaPoints.h:28
MerweScaledSigmaPoints(double alpha=1e-3, double beta=2, int kappa=3 - States)
Constructs a generator for Van der Merwe scaled sigma points.
Definition MerweScaledSigmaPoints.h:41
const Vectord< NumSigmas > & Wm() const
Returns the weight for each sigma point for the mean.
Definition MerweScaledSigmaPoints.h:84
double Wc(int i) const
Returns an element of the weight for each sigma point for the covariance.
Definition MerweScaledSigmaPoints.h:103
static constexpr int NumSigmas
Definition MerweScaledSigmaPoints.h:30
double Wm(int i) const
Returns an element of the weight for each sigma point for the mean.
Definition MerweScaledSigmaPoints.h:91
Matrixd< States, NumSigmas > SquareRootSigmaPoints(const Vectord< States > &x, const Matrixd< States, States > &S)
Computes the sigma points for an unscented Kalman filter given the mean (x) and square-root covarianc...
Definition MerweScaledSigmaPoints.h:61
const Vectord< NumSigmas > & Wc() const
Returns the weight for each sigma point for the covariance.
Definition MerweScaledSigmaPoints.h:96
Definition SystemServer.h:9
Eigen::Matrix< double, Rows, Cols, Options, MaxRows, MaxCols > Matrixd
Definition EigenCore.h:21
Eigen::Vector< double, Size > Vectord
Definition EigenCore.h:12
#define S(label, offset, message)
Definition Errors.h:113