Class CObservationGasSensors::CMOSmodel

Nested Relationships

This class is a nested type of Class CObservationGasSensors.

Nested Types

Class Documentation

class CMOSmodel

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.

MOS-model parameters

size_t winNoise_size = {30}

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

int decimate_value = {6}

[useMOSmodel] The decimate frecuency applied after noise filtering

float a_rise = {0}

tau = a*AMPLITUDE +b (linear relationship)

float b_rise = {0}

tau = a*AMPLITUDE +b (linear relationship)

float a_decay = {0}

tau = a*AMPLITUDE +b (linear relationship)

float b_decay = {0}

tau = a*AMPLITUDE +b (linear relationship)

bool save_maplog = {false}

If true save generated gas map as a log file

Public Functions

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

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

Protected Functions

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

Estimates the gas concentration based on readings and sensor model

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

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

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

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

Protected Attributes

TdataMap last_Obs

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

TdataMap temporal_Obs
std::vector<TdataMap> m_antiNoise_window

Vector to temporally store and averge readings to reduce noise

std::ofstream *m_debug_dump = {nullptr}

Ofstream to save to file option “save_maplog”

uint16_t decimate_count = {1}

Decimate value for oversampled enose readings

double fixed_incT = {0}

To force e-nose samples to have fixed time increments

bool first_incT = {true}

To force e-nose samples to have fixed time increments

float min_reading = {10}

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

bool first_iteration = {true}

To avoid the model estimation on first iteration

struct TdataMap

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

Public Members

float reading

Sensore reading

mrpt::system::TTimeStamp timestamp

Timestamp of the observation

float tau

tau value applied

float estimation

The value estimated according to the MOXmodel

float reading_filtered

Reading after smooth (noise averaging)