ZMOD4510 Nitrogen Dioxide and Ozone Firmware Documentation
Nitrogen Dioxide and Ozone Library API

Modules

 Return codes of the algorithm functions.
 

Files

file  no2_o3.h
 This file contains the data structure definitions and the function definitions for the NO2 O3 algorithm.
 

Functions

int8_t init_no2_o3 (no2_o3_handle_t *handle)
 Initializes the NO2 O3 algorithm. More...
 
int8_t calc_no2_o3 (no2_o3_handle_t *handle, const zmod4xxx_dev_t *dev, const no2_o3_inputs_t *algo_input, no2_o3_results_t *results)
 calculates NO2 O3 results from present sample. More...
 

Data Structures

struct  algorithm_version
 Variables that describe the library version. More...
 
struct  no2_o3_handle_t
 Variables that describe the sensor or the algorithm state. More...
 
struct  no2_o3_results_t
 Variables that receive the algorithm outputs. More...
 
struct  no2_o3_inputs_t
 Variables that are needed for algorithm. More...
 

Detailed Description


Data Structure Documentation

◆ algorithm_version

struct algorithm_version

Variables that describe the library version.

Data Fields

uint8_t major
 
uint8_t minor
 
uint8_t patch
 

◆ no2_o3_handle_t

struct no2_o3_handle_t

Variables that describe the sensor or the algorithm state.

Data Fields

uint32_t sample_counter
 
float rmoxs_smooth [4]
 
float logrmoxs_mean [4]
 
float logrmoxs_var [4]
 
float o3_1min_ppb
 
float o3_1h_ppb
 
float o3_8h_ppb
 
float no2_1min_ppb
 
float no2_1h_ppb
 

Field Documentation

◆ sample_counter

uint32_t sample_counter

Sample counter. Will saturate at 0xFFFFFFFF.

◆ no2_o3_results_t

struct no2_o3_results_t

Variables that receive the algorithm outputs.

Data Fields

float rmox [4]
 
float temperature
 
float O3_conc_ppb
 
float NO2_conc_ppb
 
uint16_t FAST_AQI
 
uint16_t EPA_AQI
 

Field Documentation

◆ EPA_AQI

uint16_t EPA_AQI

EPA_AQI stands for the Air Quality Index according to the EPA standard based on ozone.

◆ FAST_AQI

uint16_t FAST_AQI

FAST_AQI stands for a 1-minute average of the Air Quality Index according to the EPA standard based on ozone

◆ NO2_conc_ppb

float NO2_conc_ppb

NO2_conc_ppb stands for the NO2 concentration in part-per-billion

◆ O3_conc_ppb

float O3_conc_ppb

O3_conc_ppb stands for the ozone concentration in part-per-billion

◆ rmox

float rmox[4]

MOx resistance.

◆ temperature

float temperature

Temperature (degC) used for ambient compensation

◆ no2_o3_inputs_t

struct no2_o3_inputs_t

Variables that are needed for algorithm.

Parameters
[in]adc_resultValue from read_adc_result function
[in]humidity_pctrelative ambient humidity (%)
[in]temperature_degcambient temperature (degC)

Data Fields

uint8_t * adc_result
 
float humidity_pct
 
float temperature_degc
 

Function Documentation

◆ calc_no2_o3()

int8_t calc_no2_o3 ( no2_o3_handle_t handle,
const zmod4xxx_dev_t dev,
const no2_o3_inputs_t algo_input,
no2_o3_results_t results 
)

calculates NO2 O3 results from present sample.

Parameters
[in]handlePointer to algorithm state variable.
[in]devPointer to the device.
[in]algo_inputStructure containing inputs required for algo calculation.
[out]resultsPointer for storing the algorithm results.
Returns
error code.

◆ init_no2_o3()

int8_t init_no2_o3 ( no2_o3_handle_t handle)

Initializes the NO2 O3 algorithm.

Parameters
[out]handlePointer to algorithm state variable.
Returns
error code.