Bayes Filters Library
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
bfl::LTIMeasurementModel Class Referenceabstract

This class represent an linear measurement model Hx + w, where H is a time-invariant measurement matrix, x is a state vector and w is random noise. More...

#include <LTIMeasurementModel.h>

Inheritance diagram for bfl::LTIMeasurementModel:
[legend]

Public Member Functions

 LTIMeasurementModel (const Eigen::Ref< const Eigen::MatrixXd > &measurement_matrix, const Eigen::Ref< const Eigen::MatrixXd > &noise_covariance_matrix)
 
virtual ~LTIMeasurementModel () noexcept=default
 
std::pair< bool, Eigen::MatrixXd > getNoiseCovarianceMatrix () const override
 
Eigen::MatrixXd getMeasurementMatrix () const override
 
virtual std::pair< bool, bfl::DatapredictedMeasure (const Eigen::Ref< const Eigen::MatrixXd > &cur_states) const override
 
virtual std::pair< bool, bfl::Datainnovation (const bfl::Data &predicted_measurements, const bfl::Data &measurements) const override
 
virtual bool freeze (const Data &data=Data())=0
 
virtual std::pair< bool, Datameasure (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

virtual std::vector< std::string > log_file_names (const std::string &folder_path, const std::string &file_name_prefix)
 
virtual void log ()
 

Protected Attributes

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::string folder_path_
 
std::string file_name_prefix_
 
std::vector< std::string > file_names_
 
bool log_enabled_ = false
 
std::vector< std::ofstream > log_files_
 

Detailed Description

This class represent an linear measurement model Hx + w, where H is a time-invariant measurement matrix, x is a state vector and w is random noise.

Definition at line 23 of file LTIMeasurementModel.h.

Constructor & Destructor Documentation

◆ LTIMeasurementModel()

LTIMeasurementModel::LTIMeasurementModel ( const Eigen::Ref< const Eigen::MatrixXd > &  measurement_matrix,
const Eigen::Ref< const Eigen::MatrixXd > &  noise_covariance_matrix 
)

Definition at line 16 of file LTIMeasurementModel.cpp.

◆ ~LTIMeasurementModel()

virtual bfl::LTIMeasurementModel::~LTIMeasurementModel ( )
virtualdefaultnoexcept

Member Function Documentation

◆ disable_log()

bool Logger::disable_log ( )
inherited

◆ enable_log()

bool Logger::enable_log ( const std::string &  folder_path,
const std::string &  file_name_prefix 
)
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_.

Here is the call graph for this function:

◆ freeze()

virtual bool bfl::MeasurementModel::freeze ( const Data data = Data())
pure virtualinherited

◆ get_file_name_prefix()

std::string Logger::get_file_name_prefix ( ) const
inherited

Definition at line 91 of file Logger.cpp.

References bfl::Logger::file_name_prefix_.

◆ get_folder_path()

std::string Logger::get_folder_path ( ) const
inherited

Definition at line 85 of file Logger.cpp.

References bfl::Logger::folder_path_.

◆ getInputDescription()

VectorDescription MeasurementModel::getInputDescription ( ) const
virtualinherited

Reimplemented in bfl::SimulatedLinearSensor.

Definition at line 30 of file MeasurementModel.cpp.

◆ getMeasurementDescription()

VectorDescription MeasurementModel::getMeasurementDescription ( ) const
virtualinherited

◆ getMeasurementMatrix()

Eigen::MatrixXd LTIMeasurementModel::getMeasurementMatrix ( ) const
overridevirtual

Implements bfl::LinearMeasurementModel.

Definition at line 38 of file LTIMeasurementModel.cpp.

◆ getNoiseCovarianceMatrix()

std::pair< bool, Eigen::MatrixXd > LTIMeasurementModel::getNoiseCovarianceMatrix ( ) const
overridevirtual

Reimplemented from bfl::MeasurementModel.

Definition at line 32 of file LTIMeasurementModel.cpp.

◆ innovation()

std::pair< bool, bfl::Data > LinearMeasurementModel::innovation ( const bfl::Data predicted_measurements,
const bfl::Data measurements 
) const
overridevirtualinherited

Implements bfl::MeasurementModel.

Definition at line 24 of file LinearMeasurementModel.cpp.

◆ log()

void Logger::log ( )
protectedvirtualinherited

Reimplemented in bfl::SimulatedStateModel, bfl::SIS, and bfl::SimulatedLinearSensor.

Definition at line 109 of file Logger.cpp.

◆ log_file_names()

std::vector< std::string > Logger::log_file_names ( const std::string &  folder_path,
const std::string &  file_name_prefix 
)
protectedvirtualinherited

Reimplemented in bfl::LinearModel, bfl::SimulatedStateModel, and bfl::SIS.

Definition at line 97 of file Logger.cpp.

Referenced by bfl::Logger::enable_log().

◆ logger() [1/4]

template<typename... DataType>
void bfl::Logger::logger ( DataType...  data)
inlineinherited

Definition at line 42 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger() [2/4]

template<typename... DataType>
void bfl::Logger::logger ( DataType...  data) const
inlineinherited

Definition at line 56 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger() [3/4]

template<typename DatumType >
void bfl::Logger::logger ( DatumType  datum)
inlineinherited

Definition at line 35 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.

Referenced by bfl::SimulatedLinearSensor::log().

◆ logger() [4/4]

template<typename DatumType >
void bfl::Logger::logger ( DatumType  datum) const
inlineinherited

Definition at line 49 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.

◆ logger_helper() [1/4]

template<typename DatumType >
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum 
)
inlineprivateinherited

Definition at line 81 of file Logger.h.

References bfl::Logger::log_files_.

Referenced by bfl::Logger::logger(), and bfl::Logger::logger_helper().

◆ logger_helper() [2/4]

template<typename DatumType >
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum 
) const
inlineprivateinherited

Definition at line 95 of file Logger.h.

References bfl::Logger::log_files_.

◆ logger_helper() [3/4]

template<typename DatumType , typename... DataType>
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum,
DataType...  data 
)
inlineprivateinherited

Definition at line 87 of file Logger.h.

References bfl::Logger::log_files_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger_helper() [4/4]

template<typename DatumType , typename... DataType>
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum,
DataType...  data 
) const
inlineprivateinherited

Definition at line 101 of file Logger.h.

References bfl::Logger::log_files_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ measure()

virtual std::pair<bool, Data> bfl::MeasurementModel::measure ( const Data data = Data()) const
pure virtualinherited

◆ predictedMeasure()

std::pair< bool, bfl::Data > LinearMeasurementModel::predictedMeasure ( const Eigen::Ref< const Eigen::MatrixXd > &  cur_states) const
overridevirtualinherited

Implements bfl::MeasurementModel.

Definition at line 16 of file LinearMeasurementModel.cpp.

◆ setProperty()

bool MeasurementModel::setProperty ( const std::string &  property)
virtualinherited

Reimplemented in bfl::MeasurementModelDecorator.

Definition at line 22 of file MeasurementModel.cpp.

Member Data Documentation

◆ file_name_prefix_

std::string bfl::Logger::file_name_prefix_
privateinherited

Definition at line 72 of file Logger.h.

Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_file_name_prefix().

◆ file_names_

std::vector<std::string> bfl::Logger::file_names_
privateinherited

Definition at line 74 of file Logger.h.

Referenced by bfl::Logger::disable_log(), and bfl::Logger::enable_log().

◆ folder_path_

std::string bfl::Logger::folder_path_
privateinherited

Definition at line 70 of file Logger.h.

Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_folder_path().

◆ H_

Eigen::MatrixXd bfl::LTIMeasurementModel::H_
protected

Measurement matrix.

Definition at line 39 of file LTIMeasurementModel.h.

Referenced by bfl::SimulatedLinearSensor::freeze(), and bfl::LinearModel::getMeasurementMatrix().

◆ log_enabled_

bool bfl::Logger::log_enabled_ = false
privateinherited

◆ log_files_

std::vector<std::ofstream> bfl::Logger::log_files_
mutableprivateinherited

◆ R_

Eigen::MatrixXd bfl::LTIMeasurementModel::R_
protected

Convariance matrix of the additive white noise of the measurements.

Definition at line 44 of file LTIMeasurementModel.h.

Referenced by bfl::LinearModel::getNoiseCovarianceMatrix().


The documentation for this class was generated from the following files: