10 #include <Eigen/Dense>
13 using namespace Eigen;
18 if ((measurement_matrix.rows() == 0) || (measurement_matrix.cols() == 0))
19 throw std::runtime_error(
"ERROR::LTIMEASUREMENTMODEL::CTOR\nERROR:\n\tMeasurement matrix dimensions cannot be 0.");
20 else if ((noise_covariance_matrix.rows() == 0) || (noise_covariance_matrix.cols() == 0))
21 throw std::runtime_error(
"ERROR::LTIMEASUREMENTMODEL::CTOR\nERROR:\n\tNoise covariance matrix dimensions cannot be 0.");
22 else if (noise_covariance_matrix.rows() != noise_covariance_matrix.cols())
23 throw std::runtime_error(
"ERROR::LTIMEASUREMENTMODEL::CTOR\nERROR:\n\tNoise covariance matrix must be a square matrix.");
24 else if (measurement_matrix.rows() != noise_covariance_matrix.rows())
25 throw std::runtime_error(
"ERROR::LTIMEASUREMENTMODEL::CTOR\nERROR:\n\tNumber of rows of the measurement matrix must be the same as the size of the noise covariance matrix.");
27 H_ = measurement_matrix;
28 R_ = noise_covariance_matrix;
34 return std::make_pair(
true, R_);