LibDriver SGP41
Loading...
Searching...
No Matches
sgp41 algorithm function

sgp41 algorithm modules More...

Collaboration diagram for sgp41 algorithm function:

Data Structures

struct  sgp41_gas_index_algorithm_s
 sgp41 gas index algorithm structure definition More...

Macros

#define SGP41_ALGORITHM_TYPE_VOC   (0)
 sgp41 algorithm type definition
#define SGP41_ALGORITHM_TYPE_NOX   (1)

Typedefs

typedef struct sgp41_gas_index_algorithm_s sgp41_gas_index_algorithm_t
 sgp41 gas index algorithm structure definition

Functions

void sgp41_algorithm_reset (sgp41_gas_index_algorithm_t *params)
 algorithm reset
void sgp41_algorithm_init_with_sampling_interval (sgp41_gas_index_algorithm_t *params, int32_t algorithm_type, float sampling_interval)
 algorithm init with sampling interval
void sgp41_algorithm_init (sgp41_gas_index_algorithm_t *params, int32_t algorithm_type)
 algorithm init
void sgp41_algorithm_get_sampling_interval (const sgp41_gas_index_algorithm_t *params, float *sampling_interval)
 algorithm get sampling interval
void sgp41_algorithm_set_states (sgp41_gas_index_algorithm_t *params, float state0, float state1)
 algorithm set states
void sgp41_algorithm_get_states (const sgp41_gas_index_algorithm_t *params, float *state0, float *state1)
 algorithm get states
void sgp41_algorithm_set_tuning_parameters (sgp41_gas_index_algorithm_t *params, int32_t index_offset, int32_t learning_time_offset_hours, int32_t learning_time_gain_hours, int32_t gating_max_duration_minutes, int32_t std_initial, int32_t gain_factor)
 algorithm set tuning parameters
void sgp41_algorithm_get_tuning_parameters (const sgp41_gas_index_algorithm_t *params, int32_t *index_offset, int32_t *learning_time_offset_hours, int32_t *learning_time_gain_hours, int32_t *gating_max_duration_minutes, int32_t *std_initial, int32_t *gain_factor)
 algorithm get tuning parameters
void sgp41_algorithm_process (sgp41_gas_index_algorithm_t *params, int32_t sraw, int32_t *gas_index)
 algorithm process

Detailed Description

sgp41 algorithm modules

Macro Definition Documentation

◆ SGP41_ALGORITHM_TYPE_NOX

#define SGP41_ALGORITHM_TYPE_NOX   (1)

nox type

Definition at line 66 of file driver_sgp41_algorithm.h.

◆ SGP41_ALGORITHM_TYPE_VOC

#define SGP41_ALGORITHM_TYPE_VOC   (0)

sgp41 algorithm type definition

voc type

Definition at line 65 of file driver_sgp41_algorithm.h.

Typedef Documentation

◆ sgp41_gas_index_algorithm_t

sgp41 gas index algorithm structure definition

Function Documentation

◆ sgp41_algorithm_get_sampling_interval()

void sgp41_algorithm_get_sampling_interval ( const sgp41_gas_index_algorithm_t * params,
float * sampling_interval )

algorithm get sampling interval

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure
[out]*sampling_intervalpointer to a sampling interval buffer

Definition at line 600 of file driver_sgp41_algorithm.c.

◆ sgp41_algorithm_get_states()

void sgp41_algorithm_get_states ( const sgp41_gas_index_algorithm_t * params,
float * state0,
float * state1 )

algorithm get states

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure
[out]*state0pointer to a state0 buffer
[out]*state1pointer to a state1 buffer

Definition at line 611 of file driver_sgp41_algorithm.c.

◆ sgp41_algorithm_get_tuning_parameters()

void sgp41_algorithm_get_tuning_parameters ( const sgp41_gas_index_algorithm_t * params,
int32_t * index_offset,
int32_t * learning_time_offset_hours,
int32_t * learning_time_gain_hours,
int32_t * gating_max_duration_minutes,
int32_t * std_initial,
int32_t * gain_factor )

algorithm get tuning parameters

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure
[out]*index_offsetpointer to a index offset buffer
[out]*learning_time_offset_hourspointer to a learning time offset hours buffer
[out]*learning_time_gain_hourspointer to a learning time gain hours buffer
[out]*gating_max_duration_minutespointer to a gating max duration minutes buffer
[out]*std_initialpointer to a std initial buffer
[out]*gain_factorpointer to a gain factor buffer

Definition at line 666 of file driver_sgp41_algorithm.c.

◆ sgp41_algorithm_init()

void sgp41_algorithm_init ( sgp41_gas_index_algorithm_t * params,
int32_t algorithm_type )

algorithm init

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure
[in]algorithm_typealgorithm type

Definition at line 590 of file driver_sgp41_algorithm.c.

Here is the call graph for this function:

◆ sgp41_algorithm_init_with_sampling_interval()

void sgp41_algorithm_init_with_sampling_interval ( sgp41_gas_index_algorithm_t * params,
int32_t algorithm_type,
float sampling_interval )

algorithm init with sampling interval

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure
[in]algorithm_typealgorithm type
[in]sampling_intervalsampling interval

Definition at line 556 of file driver_sgp41_algorithm.c.

Here is the call graph for this function:

◆ sgp41_algorithm_process()

void sgp41_algorithm_process ( sgp41_gas_index_algorithm_t * params,
int32_t sraw,
int32_t * gas_index )

algorithm process

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure
[in]srawsource raw
[out]*gas_indexpointer to a gas index buffer

Definition at line 686 of file driver_sgp41_algorithm.c.

◆ sgp41_algorithm_reset()

void sgp41_algorithm_reset ( sgp41_gas_index_algorithm_t * params)

algorithm reset

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure

Definition at line 542 of file driver_sgp41_algorithm.c.

◆ sgp41_algorithm_set_states()

void sgp41_algorithm_set_states ( sgp41_gas_index_algorithm_t * params,
float state0,
float state1 )

algorithm set states

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure
[in]state0set state0
[in]state1set state1

Definition at line 623 of file driver_sgp41_algorithm.c.

◆ sgp41_algorithm_set_tuning_parameters()

void sgp41_algorithm_set_tuning_parameters ( sgp41_gas_index_algorithm_t * params,
int32_t index_offset,
int32_t learning_time_offset_hours,
int32_t learning_time_gain_hours,
int32_t gating_max_duration_minutes,
int32_t std_initial,
int32_t gain_factor )

algorithm set tuning parameters

Parameters
[in]*paramspointer to an sgp41 gas index algorithm handle structure
[in]index_offsetindex offset
[in]learning_time_offset_hourslearning time offset hours
[in]learning_time_gain_hourslearning time gain hours
[in]gating_max_duration_minutesgating max duration minutes
[in]std_initialstd initial
[in]gain_factorgain factor

Definition at line 642 of file driver_sgp41_algorithm.c.