Bayes Filters Library
|
#include <LinearModel.h>
Public Types | |
using | LinearMatrixComponent = std::pair< std::size_t, std::vector< std::size_t > > |
Pair of data representing. More... | |
Public Member Functions | |
LinearModel (const LinearMatrixComponent &linear_matrix_component, const Eigen::Ref< const Eigen::MatrixXd > &noise_covariance_matrix, const unsigned int seed) | |
LinearModel (const LinearMatrixComponent &linear_matrix_component, const Eigen::Ref< const Eigen::MatrixXd > &noise_covariance_matrix) | |
virtual | ~LinearModel () noexcept=default |
std::pair< bool, Eigen::MatrixXd > | getNoiseCovarianceMatrix () const override |
Eigen::MatrixXd | getMeasurementMatrix () const override |
virtual std::pair< bool, bfl::Data > | predictedMeasure (const Eigen::Ref< const Eigen::MatrixXd > &cur_states) const override |
virtual std::pair< bool, bfl::Data > | innovation (const bfl::Data &predicted_measurements, const bfl::Data &measurements) const override |
virtual bool | freeze (const Data &data=Data())=0 |
virtual std::pair< bool, Data > | measure (const Data &data=Data()) const =0 |
virtual bool | setProperty (const std::string &property) |
virtual VectorDescription | getInputDescription () const |
virtual VectorDescription | getMeasurementDescription () const |
bool | enable_log (const std::string &folder_path, const std::string &file_name_prefix) |
bool | disable_log () |
std::string | get_folder_path () const |
std::string | get_file_name_prefix () const |
template<typename DatumType > | |
void | logger (DatumType datum) |
template<typename... DataType> | |
void | logger (DataType... data) |
template<typename DatumType > | |
void | logger (DatumType datum) const |
template<typename... DataType> | |
void | logger (DataType... data) const |
Protected Member Functions | |
std::pair< bool, Eigen::MatrixXd > | getNoiseSample (const int num) const |
std::vector< std::string > | log_file_names (const std::string &folder_path, const std::string &file_name_prefix) override |
virtual void | log () |
Protected Attributes | |
double | T_ |
The Sampling interval in [time]. More... | |
Eigen::MatrixXd | sqrt_R_ |
Square root matrix of R_. More... | |
std::function< double()> | gauss_rnd_sample_ |
Random number generator function from a Normal distribution. More... | |
Eigen::MatrixXd | H_ |
Measurement matrix. More... | |
Eigen::MatrixXd | R_ |
Convariance matrix of the additive white noise of the measurements. More... | |
Private Member Functions | |
template<typename DatumType > | |
void | logger_helper (const size_t pos, DatumType datum) |
template<typename DatumType , typename... DataType> | |
void | logger_helper (const size_t pos, DatumType datum, DataType... data) |
template<typename DatumType > | |
void | logger_helper (const size_t pos, DatumType datum) const |
template<typename DatumType , typename... DataType> | |
void | logger_helper (const size_t pos, DatumType datum, DataType... data) const |
Private Attributes | |
std::mt19937_64 | generator_ |
std::normal_distribution< double > | distribution_ |
bool | log_enabled_ = false |
std::ofstream | log_file_measurements_ |
std::string | folder_path_ |
std::string | file_name_prefix_ |
std::vector< std::string > | file_names_ |
std::vector< std::ofstream > | log_files_ |
Definition at line 24 of file LinearModel.h.
using bfl::LinearModel::LinearMatrixComponent = std::pair<std::size_t, std::vector<std::size_t> > |
Pair of data representing.
Example: LinearMatrixComponent{4, {0, 2}} results in the following measurement matrix H = [ 1.0 0 0 0 ] [ 0 0 1.0 0 ]
Definition at line 37 of file LinearModel.h.
bfl::LinearModel::LinearModel | ( | const LinearMatrixComponent & | linear_matrix_component, |
const Eigen::Ref< const Eigen::MatrixXd > & | noise_covariance_matrix, | ||
const unsigned int | seed | ||
) |
bfl::LinearModel::LinearModel | ( | const LinearMatrixComponent & | linear_matrix_component, |
const Eigen::Ref< const Eigen::MatrixXd > & | noise_covariance_matrix | ||
) |
|
virtualdefaultnoexcept |
|
inherited |
Definition at line 68 of file Logger.cpp.
References bfl::Logger::file_names_, bfl::Logger::log_enabled_, and bfl::Logger::log_files_.
Referenced by bfl::Logger::~Logger().
|
inherited |
Definition at line 22 of file Logger.cpp.
References bfl::Logger::file_name_prefix_, bfl::Logger::file_names_, bfl::Logger::folder_path_, bfl::Logger::log_enabled_, bfl::Logger::log_file_names(), and bfl::Logger::log_files_.
Implemented in bfl::MeasurementModelDecorator, and bfl::SimulatedLinearSensor.
|
inherited |
Definition at line 91 of file Logger.cpp.
References bfl::Logger::file_name_prefix_.
|
inherited |
Definition at line 85 of file Logger.cpp.
References bfl::Logger::folder_path_.
|
virtualinherited |
Reimplemented in bfl::SimulatedLinearSensor.
Definition at line 30 of file MeasurementModel.cpp.
|
virtualinherited |
Reimplemented in bfl::SimulatedLinearSensor.
Definition at line 37 of file MeasurementModel.cpp.
Referenced by bfl::UKFCorrection::correctStep(), and bfl::sigma_point::unscented_transform().
|
overridevirtual |
Implements bfl::LinearMeasurementModel.
Definition at line 69 of file LinearModel.cpp.
References bfl::LTIMeasurementModel::H_.
|
overridevirtual |
Reimplemented from bfl::MeasurementModel.
Definition at line 63 of file LinearModel.cpp.
References bfl::LTIMeasurementModel::R_.
|
protected |
Definition at line 51 of file LinearModel.cpp.
References gauss_rnd_sample_, and sqrt_R_.
Referenced by bfl::SimulatedLinearSensor::freeze().
|
overridevirtualinherited |
Implements bfl::MeasurementModel.
Definition at line 24 of file LinearMeasurementModel.cpp.
|
protectedvirtualinherited |
Reimplemented in bfl::SimulatedStateModel, bfl::SIS, and bfl::SimulatedLinearSensor.
Definition at line 109 of file Logger.cpp.
|
inlineoverrideprotectedvirtual |
Reimplemented from bfl::Logger.
Definition at line 69 of file LinearModel.h.
|
inlineinherited |
Definition at line 42 of file Logger.h.
References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().
|
inlineinherited |
Definition at line 56 of file Logger.h.
References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().
|
inlineinherited |
Definition at line 35 of file Logger.h.
References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.
Referenced by bfl::SimulatedLinearSensor::log().
|
inlineinherited |
Definition at line 49 of file Logger.h.
References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.
|
inlineprivateinherited |
Definition at line 81 of file Logger.h.
References bfl::Logger::log_files_.
Referenced by bfl::Logger::logger(), and bfl::Logger::logger_helper().
|
inlineprivateinherited |
Definition at line 95 of file Logger.h.
References bfl::Logger::log_files_.
|
inlineprivateinherited |
Definition at line 87 of file Logger.h.
References bfl::Logger::log_files_, and bfl::Logger::logger_helper().
|
inlineprivateinherited |
Definition at line 101 of file Logger.h.
References bfl::Logger::log_files_, and bfl::Logger::logger_helper().
|
pure virtualinherited |
Implemented in bfl::SimulatedLinearSensor, and bfl::MeasurementModelDecorator.
Referenced by bfl::UKFCorrection::correctStep(), and bfl::GaussianLikelihood::likelihood().
|
overridevirtualinherited |
Implements bfl::MeasurementModel.
Definition at line 16 of file LinearMeasurementModel.cpp.
|
virtualinherited |
Reimplemented in bfl::MeasurementModelDecorator.
Definition at line 22 of file MeasurementModel.cpp.
|
private |
Definition at line 78 of file LinearModel.h.
|
privateinherited |
Definition at line 72 of file Logger.h.
Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_file_name_prefix().
|
privateinherited |
Definition at line 74 of file Logger.h.
Referenced by bfl::Logger::disable_log(), and bfl::Logger::enable_log().
|
privateinherited |
Definition at line 70 of file Logger.h.
Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_folder_path().
|
protected |
Random number generator function from a Normal distribution.
A call to gauss_rnd_sample_()
returns a doubleing point random number.
Definition at line 67 of file LinearModel.h.
Referenced by getNoiseSample().
|
private |
Definition at line 76 of file LinearModel.h.
|
protectedinherited |
Measurement matrix.
Definition at line 39 of file LTIMeasurementModel.h.
Referenced by bfl::SimulatedLinearSensor::freeze(), and getMeasurementMatrix().
|
private |
Definition at line 80 of file LinearModel.h.
|
mutableprivate |
Definition at line 82 of file LinearModel.h.
|
mutableprivateinherited |
Definition at line 78 of file Logger.h.
Referenced by bfl::Logger::disable_log(), bfl::Logger::enable_log(), bfl::Logger::logger(), and bfl::Logger::logger_helper().
|
protectedinherited |
Convariance matrix of the additive white noise of the measurements.
Definition at line 44 of file LTIMeasurementModel.h.
Referenced by getNoiseCovarianceMatrix().
|
protected |
Square root matrix of R_.
Definition at line 61 of file LinearModel.h.
Referenced by getNoiseSample().
|
protected |
The Sampling interval in [time].
Definition at line 56 of file LinearModel.h.