Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes
mrpt::obs::CObservationGasSensors::CMOSmodel Class Reference

Detailed Description

Declares a class within "CObservationGasSensors" that represents a set of gas concentration readings from the modelation of a MOS gas sensor readings.

This class provides the parameters and functions to simulate the inverse model of a MOS gas sensor.

See also
CObservationGasSensors

Definition at line 90 of file CObservationGasSensors.h.

#include <mrpt/obs/CObservationGasSensors.h>

Classes

struct  TdataMap
 The content of each m_lastObservations in the estimation when using the option : MOS_MODEl (useMOSmodel =1) More...
 

Public Member Functions

 CMOSmodel ()
 Constructor. More...
 
 ~CMOSmodel ()
 
bool get_GasDistribution_estimation (float &reading, mrpt::system::TTimeStamp &timestamp)
 Obtain an estimation of the gas distribution based on raw sensor readings. More...
 

Public Attributes

MOS-model parameters
size_t winNoise_size
 The size of the mobile average window used to reduce noise on sensor reagings. More...
 
int decimate_value
 [useMOSmodel] The decimate frecuency applied after noise filtering More...
 
float a_rise
 tau = a*AMPLITUDE +b (linear relationship) More...
 
float b_rise
 tau = a*AMPLITUDE +b (linear relationship) More...
 
float a_decay
 tau = a*AMPLITUDE +b (linear relationship) More...
 
float b_decay
 tau = a*AMPLITUDE +b (linear relationship) More...
 
bool save_maplog
 If true save generated gas map as a log file. More...
 

Protected Member Functions

void inverse_MOSmodeling (const float &reading, const mrpt::system::TTimeStamp &timestamp)
 Estimates the gas concentration based on readings and sensor model. More...
 
void noise_filtering (const float &reading, const mrpt::system::TTimeStamp &timestamp)
 Reduce noise by averaging with a mobile window of specific size (winNoise_size) More...
 
void save_log_map (const mrpt::system::TTimeStamp &timestamp, const float &reading, const float &estimation, const float &tau)
 Save the gas distribution estiamtion into a log file for offline representation. More...
 

Protected Attributes

TdataMap last_Obs
 The content of each m_lastObservations in the estimation when using the option : MOS_MODEl (useMOSmodel =1) More...
 
TdataMap temporal_Obs
 
std::vector< TdataMapm_antiNoise_window
 Vector to temporally store and averge readings to reduce noise. More...
 
std::ofstream * m_debug_dump
 Ofstream to save to file option "save_maplog". More...
 
uint16_t decimate_count
 Decimate value for oversampled enose readings. More...
 
double fixed_incT
 To force e-nose samples to have fixed time increments. More...
 
bool first_incT
 To force e-nose samples to have fixed time increments. More...
 
float min_reading
 Minimum reading value till the moment, used as approximation to baeline level. More...
 
bool first_iteration
 To avoid the model estimation on first iteration. More...
 

Constructor & Destructor Documentation

◆ CMOSmodel()

CObservationGasSensors::CMOSmodel::CMOSmodel ( )

Constructor.

Definition at line 180 of file CObservationGasSensors.cpp.

◆ ~CMOSmodel()

CObservationGasSensors::CMOSmodel::~CMOSmodel ( )

Definition at line 199 of file CObservationGasSensors.cpp.

Member Function Documentation

◆ get_GasDistribution_estimation()

bool CObservationGasSensors::CMOSmodel::get_GasDistribution_estimation ( float &  reading,
mrpt::system::TTimeStamp timestamp 
)

Obtain an estimation of the gas distribution based on raw sensor readings.

Definition at line 203 of file CObservationGasSensors.cpp.

References mrpt::system::pause(), and mrpt::obs::CObservation::timestamp.

Here is the call graph for this function:

◆ inverse_MOSmodeling()

void CObservationGasSensors::CMOSmodel::inverse_MOSmodeling ( const float &  reading,
const mrpt::system::TTimeStamp timestamp 
)
protected

Estimates the gas concentration based on readings and sensor model.

Definition at line 291 of file CObservationGasSensors.cpp.

References mrpt::system::timeDifference(), and mrpt::obs::CObservation::timestamp.

Here is the call graph for this function:

◆ noise_filtering()

void CObservationGasSensors::CMOSmodel::noise_filtering ( const float &  reading,
const mrpt::system::TTimeStamp timestamp 
)
protected

Reduce noise by averaging with a mobile window of specific size (winNoise_size)

Definition at line 248 of file CObservationGasSensors.cpp.

References mrpt::system::pause(), and mrpt::obs::CObservation::timestamp.

Here is the call graph for this function:

◆ save_log_map()

void CObservationGasSensors::CMOSmodel::save_log_map ( const mrpt::system::TTimeStamp timestamp,
const float &  reading,
const float &  estimation,
const float &  tau 
)
protected

Save the gas distribution estiamtion into a log file for offline representation.

Definition at line 368 of file CObservationGasSensors.cpp.

References mrpt::format(), mrpt::system::os::sprintf(), mrpt::obs::CObservation::timestamp, and mrpt::system::timestampTotime_t().

Here is the call graph for this function:

Member Data Documentation

◆ a_decay

float mrpt::obs::CObservationGasSensors::CMOSmodel::a_decay

tau = a*AMPLITUDE +b (linear relationship)

Definition at line 111 of file CObservationGasSensors.h.

◆ a_rise

float mrpt::obs::CObservationGasSensors::CMOSmodel::a_rise

tau = a*AMPLITUDE +b (linear relationship)

Definition at line 107 of file CObservationGasSensors.h.

◆ b_decay

float mrpt::obs::CObservationGasSensors::CMOSmodel::b_decay

tau = a*AMPLITUDE +b (linear relationship)

Definition at line 113 of file CObservationGasSensors.h.

◆ b_rise

float mrpt::obs::CObservationGasSensors::CMOSmodel::b_rise

tau = a*AMPLITUDE +b (linear relationship)

Definition at line 109 of file CObservationGasSensors.h.

◆ decimate_count

uint16_t mrpt::obs::CObservationGasSensors::CMOSmodel::decimate_count
protected

Decimate value for oversampled enose readings.

Definition at line 151 of file CObservationGasSensors.h.

◆ decimate_value

int mrpt::obs::CObservationGasSensors::CMOSmodel::decimate_value

[useMOSmodel] The decimate frecuency applied after noise filtering

Definition at line 104 of file CObservationGasSensors.h.

◆ first_incT

bool mrpt::obs::CObservationGasSensors::CMOSmodel::first_incT
protected

To force e-nose samples to have fixed time increments.

Definition at line 155 of file CObservationGasSensors.h.

◆ first_iteration

bool mrpt::obs::CObservationGasSensors::CMOSmodel::first_iteration
protected

To avoid the model estimation on first iteration.

Definition at line 160 of file CObservationGasSensors.h.

◆ fixed_incT

double mrpt::obs::CObservationGasSensors::CMOSmodel::fixed_incT
protected

To force e-nose samples to have fixed time increments.

Definition at line 153 of file CObservationGasSensors.h.

◆ last_Obs

TdataMap mrpt::obs::CObservationGasSensors::CMOSmodel::last_Obs
protected

The content of each m_lastObservations in the estimation when using the option : MOS_MODEl (useMOSmodel =1)

Definition at line 145 of file CObservationGasSensors.h.

◆ m_antiNoise_window

std::vector<TdataMap> mrpt::obs::CObservationGasSensors::CMOSmodel::m_antiNoise_window
protected

Vector to temporally store and averge readings to reduce noise.

Definition at line 147 of file CObservationGasSensors.h.

◆ m_debug_dump

std::ofstream* mrpt::obs::CObservationGasSensors::CMOSmodel::m_debug_dump
protected

Ofstream to save to file option "save_maplog".

Definition at line 149 of file CObservationGasSensors.h.

◆ min_reading

float mrpt::obs::CObservationGasSensors::CMOSmodel::min_reading
protected

Minimum reading value till the moment, used as approximation to baeline level.

Definition at line 158 of file CObservationGasSensors.h.

◆ save_maplog

bool mrpt::obs::CObservationGasSensors::CMOSmodel::save_maplog

If true save generated gas map as a log file.

Definition at line 116 of file CObservationGasSensors.h.

◆ temporal_Obs

TdataMap mrpt::obs::CObservationGasSensors::CMOSmodel::temporal_Obs
protected

Definition at line 145 of file CObservationGasSensors.h.

◆ winNoise_size

size_t mrpt::obs::CObservationGasSensors::CMOSmodel::winNoise_size

The size of the mobile average window used to reduce noise on sensor reagings.

Definition at line 101 of file CObservationGasSensors.h.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019