1#ifndef PROGRAM_PRECIPITATION_H
2#define PROGRAM_PRECIPITATION_H
15#define WW_RANGE_CODE_SIZE 6
17#define WW_MAX_DAILY_RAINFALL_RESULTS 9
19#define WW_MAX_TS_SIZE 30
#define WW_MAX_DAILY_RAINFALL_RESULTS
Max number of daily rainfall forecast results from Willy Weather.
Definition: precipitation.h:17
CURLcode WillyWeather_GetRainfallForecast(WW_Location_TypeDef *location, WW_RainfallForecast_TypeDef *daily_rainfall)
Gets the rainfall forecast (next 7 days inc today) for a location.
Definition: precipitation.c:28
#define WW_MAX_TS_SIZE
Max timestamp size.
Definition: precipitation.h:19
void WillyWeather_RainfallToDB(WW_Location_TypeDef *location, WW_RainfallForecast_TypeDef *forecast, PGconn *psql_conn)
Rainfall to PostgreSQL table method.
Definition: precipitation.c:178
#define WW_RANGE_CODE_SIZE
Willy Weather range code (e.g. 0-15 or 5-10 or <0) max size.
Definition: precipitation.h:15
Location data from Willy Weather request.
Definition: location.h:24
Rainfall forecast for a day.
Definition: precipitation.h:22
int8_t probability
Chance of 0.2 mm of rain (0 to 100 %)
Definition: precipitation.h:34
int8_t end_range
Max expected rainfall (5, 10, 15, 25, 50, 100)
Definition: precipitation.h:28
char range_divider
Divider between min and max rainfall ('>' or '=')
Definition: precipitation.h:30
time_t date
UNIX timestamp date.
Definition: precipitation.h:23
int8_t start_range
Min expected rainfall (1, 5, 10, 15, 25, 50, null)
Definition: precipitation.h:26
Holds daily forecast rainfall information from Willy Weather.
Definition: precipitation.h:38
int16_t n_days
Definition: precipitation.h:40
uint16_t location_id
Location identifier.
Definition: precipitation.h:39