Methods for daily weather summaries

This site was established to manage weather readings from an Ecowitt GW1002 weather station to provide basic environmental data to associate with insect recording activities within the Araba Bioscan Project.

The weather station receives readings from indoor and outdoor temperature and humidity sensors, an indoor pressure sensor, a soil moisture sensor, a UV and light sensor, anemometer and rain gauge.

Data from the sensors is transmitted to ecowitt.net (login required). Readings are also collected by this site every five minutes.

The following measurements for each time interval are stored here:

A daily summary record is generated at 09:00 a.m. Canberra time. This summary includes the following calculated values for the 24-hour period:

Notes

Sunrise and sunset times are included from the Sunrise-Sunset api. These relate to the listed date.

Note 1 - calculation of means: All mean values are calculated using a separate weighting for each included measurement proportional to the time interval since the previous measurement. This is to compensate for the possibility of series of missed readings.

Note 2 - calculation of wind direction: Wind direction is calculated using weightings for each time interval and the associated wind speed and direction to derive a series of x and y offsets that accumulate through the day. The final wind direction is calculated using the arctangent of the ratio of the total x and y distances.

Note 3 - calculation of sun hours: The sun hour measurement represents the total length of all intervals for which the associated solar radiation measurement was greater than 120 m/W2.

Note 4 - calculation of rain totals: The rain total represents the rainfall recorded up to midnight, plus the rainfall recorded up to 09:00 on the day in question, minus any rainfall up to 09:00 the previous day.

Source code

Source code (in PHP) is available from a GitHub repository: dhobern/weather.