12 using namespace Eigen;
17 std::unique_ptr<StateModel> state_model,
22 state_model_(std::move(state_model)),
23 type_(UKFPredictionType::Generic),
24 ut_weight_(state_model_->getInputDescription(), alpha, beta, kappa)
30 std::unique_ptr<AdditiveStateModel> state_model,
35 add_state_model_(std::move(state_model)),
36 type_(UKFPredictionType::Additive),
37 ut_weight_(add_state_model_->getInputDescription().noiseless_description(), alpha, beta, kappa)
43 state_model_(std::move(prediction.state_model_)),
44 add_state_model_(std::move(prediction.add_state_model_)),
45 type_(prediction.type_),
46 ut_weight_(std::move(prediction.ut_weight_))
52 if (
this == &prediction)
57 state_model_ = std::move(prediction.state_model_);
59 add_state_model_ = std::move(prediction.add_state_model_);
61 type_ = prediction.type_;
63 ut_weight_ = std::move(prediction.ut_weight_);
71 if (type_ == UKFPredictionType::Additive)
72 return *add_state_model_;
80 if (getStateModel().is_skipping())
82 pred_state = prev_state;
89 if (type_ == UKFPredictionType::Generic)
93 prev_state_augmented.
augmentWithNoise(state_model_->getNoiseCovarianceMatrix());
95 std::tie(pred_state, std::ignore) =
unscented_transform(prev_state_augmented, ut_weight_, *state_model_);
97 else if (type_ == UKFPredictionType::Additive)
99 std::tie(pred_state, std::ignore) =
unscented_transform(prev_state, ut_weight_, *add_state_model_);