12 using namespace Eigen;
21 scale_factor_(scale_factor)
28 const Ref<const MatrixXd>& pred_states
31 bool valid_measurements;
32 Data data_measurements;
33 std::tie(valid_measurements, data_measurements) = measurement_model.
measure();
35 MatrixXd measurements;
36 if (valid_measurements)
37 measurements = any::any_cast<MatrixXd&&>(std::move(data_measurements));
39 return std::make_pair(
false, VectorXd::Zero(1));
42 bool valid_predicted_measurements;
43 Data data_predicted_measurements;
44 std::tie(valid_predicted_measurements, data_predicted_measurements) = measurement_model.
predictedMeasure(pred_states);
46 MatrixXd predicted_measurements;
47 if (valid_predicted_measurements)
48 predicted_measurements = any::any_cast<MatrixXd&&>(std::move(data_predicted_measurements));
50 return std::make_pair(
false, VectorXd::Zero(1));
53 bool valid_innovation;
54 Data data_innovations;
55 std::tie(valid_innovation, data_innovations) = measurement_model.
innovation(predicted_measurements, measurements);
59 innovations = any::any_cast<MatrixXd&&>(std::move(data_innovations));
61 return std::make_pair(
false, VectorXd::Zero(1));
64 VectorXd likelihood(innovations.cols());
65 bool valid_covariance_matrix;
66 MatrixXd covariance_matrix;
69 if (!valid_covariance_matrix)
70 return std::make_pair(
false, VectorXd::Zero(1));
74 return std::make_pair(
true, likelihood);