AQI: Adding ugm3 calculation to ppd42ns and aqi calculation to upm_utilities

Contributions by: Rex Tsai <rex.cc.tsai@gmail.com>

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
Abhishek Malik
2017-02-10 11:49:11 -08:00
parent b9988469ba
commit 7a60cd5abe
4 changed files with 79 additions and 2 deletions

View File

@@ -1,7 +1,9 @@
/*
* Authors:
* Jon Trulson <jtrulson@ics.com>
* Copyright (c) 2016 Intel Corporation.
* Contributions: Rex Tsai <rex.cc.tsai@gmail.com>
* Abhishek Malik <abhishek.malik@intel.com>
* Copyright (c) 2017 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -113,6 +115,15 @@ uint32_t upm_elapsed_ms(upm_clock_t *clock);
*/
uint32_t upm_elapsed_us(upm_clock_t *clock);
/**
* Return the AQI (based on EPA standards) using the ugm3 value
* calculated by the sensor module.
*
* @param ugm3 micrograms per cubic meter
* @return calculated AQI
*/
int upm_ugm3_to_aqi (double ugm3);
#ifdef __cplusplus
}
#endif