Package com.storedobject.iot
Class AQI
java.lang.Object
com.storedobject.iot.Index
com.storedobject.iot.AQI
- All Implemented Interfaces:
HasValue
The AQI class represents the Air Quality Index, a measure used to communicate how polluted the air currently is or how polluted it is forecast to become.
The AQI is used for assessing and reporting daily air quality levels and understanding their potential impact on health.
It typically takes into account various air pollutants such as ground-level ozone, particulate matter, carbon monoxide, sulfur dioxide, and nitrogen dioxide.
The class includes methods to set and retrieve these pollutant levels, calculate the overall AQI value, and interpret the results in terms of health advisories.
Assumptions about data: (1) Temperature is in degree celsius. (Used in the conversion of PPM to µg/m³). (2) PM 10 and PM 2.5 are in µg/m³. (3) O₃, CO, SO2, NO2 are in PPM.
- Author:
- Syam
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
compute()
static AQI
int
get()
int
getCause()
static String
getCauseValue
(int aqiCause) double
getCO()
int
getHour()
double
getNO2()
double
getO3()
double
getPM10()
double
getPM25()
double
getSO2()
getUnit()
double
getValue()
int
getYear()
void
setTemperature
(BiFunction<Integer, Integer, Double> temperature) toString()
-
Method Details
-
create
-
getValue
public double getValue() -
get
public int get() -
compute
-
getCause
public int getCause() -
getCauseValue
-
getCauseValue
-
setTemperature
-
getYear
public int getYear() -
getHour
public int getHour() -
getUnit
-
getO3
public double getO3() -
getCO
public double getCO() -
getSO2
public double getSO2() -
getNO2
public double getNO2() -
getPM10
public double getPM10() -
getPM25
public double getPM25() -
toString
-