NAME

OpenGbg::Service::AirQuality::Measurement - An air quality measurement

SYNOPSIS

my $aq = OpenGbg->new->air_quality;
my $measurement = $aq->get_latest_measurement;

printf '%5.2f %s' => $measurement->temperature, $measurement->temperature_unit;

WEATHER ATTRIBUTES

All of these attribues are decimal numbers.

For all weather attributes there is also a unit attribute (${attribute_name}_unit) that returns a textual representation the unit.

temperature

The temperature (in degrees centigrade) during the measurement.

humidity

The humidity (in percent) during the measurement.

solar_insolation

The solar insolation (in W/square metre) during the measurement.

air_pressure

The air pressure (in hPa) during the measurement.

wind_speed

The wind speed (in metres/second) during the mesaurement.

wind_direction

The wind direction (in degrees) during the measurement.

rainfall

The rainfall (in mm) during the measurement.

AIR QUALITY ATTRIBUTES

All of these attribues are normally decimal numbers. Empty string or undef denotes missing information.

The unit for all is microgram/cubic metre.

For all air quality attributes there is also a unit attribute (${attribute_name}_unit) that returns a textual representation the unit.

More interesting is the index attribute (${attribute_name}_index), that returns a decimal number indicating the level for that particular attribute.

The ${attribute_name}_levels returns a textual indicator of the index (values: low levels, medium levels, high levels, very high levels). Empty string if the index is the empty string.

Note: The web service sometimes returns negative values for some of these measurements.

total_index

The overall Air Quality Index. Calculated from some of the other indices.

co

The amount of carbon monoxide in the air.

o3

The amount of ground level ozone in the air.

no2

The amount of nitrogen dioxide in the air.

nox

The amount of nitrogen oxides in the air.

pm2_5

The amount of particulates (less than 2.5 micrometers) in the air.

pm10

The amount of particulates (less than 10 micrometers) in the air.

so2

The amount of sulfur dioxide in the air.

METHODS

to_text()

Returns a string with the station data in a table.

AUTHOR

Erik Carlsson <info@code301.com>

COPYRIGHT

Copyright 2014 - Erik Carlsson

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.