LibDriver SGP41
Loading...
Searching...
No Matches
driver_sgp41_algorithm.h
Go to the documentation of this file.
1
42
43#ifndef DRIVER_SGP41_ALGORITHM_H
44#define DRIVER_SGP41_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 SGP41_ALGORITHM_TYPE_VOC (0)
66#define SGP41_ALGORITHM_TYPE_NOX (1)
67
72{
85 float m_uptime;
86 float m_sraw;
115
121
128void sgp41_algorithm_init_with_sampling_interval(sgp41_gas_index_algorithm_t *params, int32_t algorithm_type, float sampling_interval);
129
135void sgp41_algorithm_init(sgp41_gas_index_algorithm_t *params, int32_t algorithm_type);
136
142void sgp41_algorithm_get_sampling_interval(const sgp41_gas_index_algorithm_t *params, float *sampling_interval);
143
150void sgp41_algorithm_set_states(sgp41_gas_index_algorithm_t *params, float state0, float state1);
151
158void sgp41_algorithm_get_states(const sgp41_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 sgp41_algorithm_get_tuning_parameters(const sgp41_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 sgp41_algorithm_process(sgp41_gas_index_algorithm_t *params, int32_t sraw, int32_t *gas_index);
197
201
202#ifdef __cplusplus
203}
204#endif
205
206#endif
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_process(sgp41_gas_index_algorithm_t *params, int32_t sraw, int32_t *gas_index)
algorithm process
void sgp41_algorithm_get_states(const sgp41_gas_index_algorithm_t *params, float *state0, float *state1)
algorithm get states
void sgp41_algorithm_get_sampling_interval(const sgp41_gas_index_algorithm_t *params, float *sampling_interval)
algorithm get 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
struct sgp41_gas_index_algorithm_s sgp41_gas_index_algorithm_t
sgp41 gas index algorithm structure definition
void sgp41_algorithm_init(sgp41_gas_index_algorithm_t *params, int32_t algorithm_type)
algorithm init
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_reset(sgp41_gas_index_algorithm_t *params)
algorithm reset
void sgp41_algorithm_set_states(sgp41_gas_index_algorithm_t *params, float state0, float state1)
algorithm set states
sgp41 gas index algorithm structure definition