AirQualityIndex
EPA NowCast + AQI breakpoint math for PM2.5, per meshtastic/design#54.
NowCast is a 12-hour rolling average of PM2.5 that weights recent hours more heavily than older ones, used in lieu of the official 24h EPA AQI average because it can report a value well before a full day of data exists. See https://usepa.servicenowservices.com/airnow (NowCast) and the EPA PM2.5 AQI breakpoint table.
Functions
Computes the NowCast PM2.5 concentration (µg/m³) from a node's PM2.5 readings (epoch-seconds to µg/m³ pairs), relative to nowEpochSeconds. Readings are binned into hourly buckets (0 = most recent hour) and averaged within each bucket. Returns null if there isn't enough history yet: the most recent hour must have a reading, and at least MIN_VALID_HOURS of the RECENT_WINDOW_HOURS most recent hours must be populated — EPA's minimum-data rule, so stale data spread across the older end of the 12h window can't produce a value.