LibDriver SGP40
Loading...
Searching...
No Matches
driver_sgp40_algorithm.h
Go to the documentation of this file.
1
42
43#ifndef DRIVER_SGP40_ALGORITHM_H
44#define DRIVER_SGP40_ALGORITHM_H
45
46#include <math.h>
47#include <stdio.h>
48#include <stdint.h>
49#include <string.h>
50
51#ifdef __cplusplus
52extern "C"{
53#endif
54
61
65#define SGP40_ALGORITHM_TYPE_VOC (0)
66#define SGP40_ALGORITHM_TYPE_NOX (1)
67
72{
85 float m_uptime;
86 float m_sraw;
115
121
128void sgp40_algorithm_init_with_sampling_interval(sgp40_gas_index_algorithm_t *params, int32_t algorithm_type, float sampling_interval);
129
135void sgp40_algorithm_init(sgp40_gas_index_algorithm_t *params, int32_t algorithm_type);
136
142void sgp40_algorithm_get_sampling_interval(const sgp40_gas_index_algorithm_t *params, float *sampling_interval);
143
150void sgp40_algorithm_set_states(sgp40_gas_index_algorithm_t *params, float state0, float state1);
151
158void sgp40_algorithm_get_states(const sgp40_gas_index_algorithm_t *params, float* state0, float* state1);
159
171 int32_t learning_time_offset_hours, int32_t learning_time_gain_hours,
172 int32_t gating_max_duration_minutes, int32_t std_initial,
173 int32_t gain_factor);
174
185void sgp40_algorithm_get_tuning_parameters(const sgp40_gas_index_algorithm_t *params, int32_t *index_offset,
186 int32_t *learning_time_offset_hours, int32_t *learning_time_gain_hours,
187 int32_t *gating_max_duration_minutes, int32_t *std_initial,
188 int32_t *gain_factor);
189
196void sgp40_algorithm_process(sgp40_gas_index_algorithm_t *params, int32_t sraw, int32_t *gas_index);
197
201
202#ifdef __cplusplus
203}
204#endif
205
206#endif
void sgp40_algorithm_get_tuning_parameters(const sgp40_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 sgp40_algorithm_get_states(const sgp40_gas_index_algorithm_t *params, float *state0, float *state1)
algorithm get states
void sgp40_algorithm_init(sgp40_gas_index_algorithm_t *params, int32_t algorithm_type)
algorithm init
void sgp40_algorithm_set_tuning_parameters(sgp40_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
struct sgp40_gas_index_algorithm_s sgp40_gas_index_algorithm_t
sgp40 gas index algorithm structure definition
void sgp40_algorithm_process(sgp40_gas_index_algorithm_t *params, int32_t sraw, int32_t *gas_index)
algorithm process
void sgp40_algorithm_get_sampling_interval(const sgp40_gas_index_algorithm_t *params, float *sampling_interval)
algorithm get sampling interval
void sgp40_algorithm_reset(sgp40_gas_index_algorithm_t *params)
algorithm reset
void sgp40_algorithm_init_with_sampling_interval(sgp40_gas_index_algorithm_t *params, int32_t algorithm_type, float sampling_interval)
algorithm init with sampling interval
void sgp40_algorithm_set_states(sgp40_gas_index_algorithm_t *params, float state0, float state1)
algorithm set states
sgp40 gas index algorithm structure definition