Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ringsaturn committed Feb 10, 2024
1 parent 48f24fd commit bb5f0cb
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
25 changes: 25 additions & 0 deletions aqistandard_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions epa/epa.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
goaqi "github.com/ringsaturn/go-aqi"
)

const Standard = goaqi.AQISTANDARD_US

var tables = map[goaqi.Pollutant][]float64{
goaqi.AQI: {0, 50, 100, 150, 200, 300, 400, 500},
goaqi.CO_8H: {0, 4.4, 9.4, 12.4, 15.4, 30.4, 40.4, 50.4}, // ppm
Expand Down
2 changes: 2 additions & 0 deletions mep/mep.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
goaqi "github.com/ringsaturn/go-aqi"
)

const Standard = goaqi.AQISTANDARD_CN

var tables = map[goaqi.Pollutant][]float64{
goaqi.AQI: {0, 50, 100, 150, 200, 300, 400, 500},
goaqi.CO_1H: {0, 5, 10, 35, 60, 90, 120, 150}, // mg/m3
Expand Down
8 changes: 8 additions & 0 deletions pollutant.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ const (
CO_8H Pollutant = 61 // Carbon Monoxide 8 hour
CO_24H Pollutant = 62 // Carbon Monoxide 24 hour
)

type AQIStandard int32

const (
AQISTANDARD_UNSPECIFIED AQIStandard = 0 // Unspecified
AQISTANDARD_US AQIStandard = 1 // US AQI
AQISTANDARD_CN AQIStandard = 2 // China AQI
)

0 comments on commit bb5f0cb

Please sign in to comment.