1#ifndef PROGRAM_STATIONS_H
2#define PROGRAM_STATIONS_H
11#define BOM_STATION_MAX_RESPONSES 500
13#define BOM_STATION_ID_SIZE 7
15#define BOM_STATION_STATE_SIZE 4
17#define BOM_STATION_NAME_SIZE 150
19#define BOM_STATION_FILENAME_SIZE 150
22#define BOM_FTP_STATIONS_URL "ftp://ftp.bom.gov.au/anon/gen/clim_data/IDCKWCDEA0/tables/stations_db.txt"
int8_t BOM_LoadStationsFromTxt(const char *filename, BOM_WeatherStations_TypeDef *stations)
Load BOM station list from cached .txt file (obtained from BOM FTP server)
Definition: stations.c:81
#define BOM_STATION_NAME_SIZE
BOM site name size (length)
Definition: stations.h:17
#define BOM_STATION_STATE_SIZE
BOM state identifier size (length)
Definition: stations.h:15
#define BOM_STATION_MAX_RESPONSES
Max number of BOM sites to hold.
Definition: stations.h:11
#define BOM_STATION_FILENAME_SIZE
BOM filename max size.
Definition: stations.h:19
CURLcode BOM_GetWeatherStations(BOM_WeatherStations_TypeDef *stations)
Get a list of NSW BOM weather stations.
Definition: stations.c:17
#define BOM_STATION_ID_SIZE
BOM site id size (length)
Definition: stations.h:13
int16_t BOM_ClosestStationIndex(double latitude, double longitude, BOM_WeatherStations_TypeDef *stations)
Index of the closest BOM station to a define latitude and longitude.
Definition: stations.c:204
BOM weather station (id, state, name, latitude, longitude)
Definition: stations.h:25
double longitude
Longitude of station.
Definition: stations.h:31
double latitude
Latitude of station.
Definition: stations.h:30
BOM weather stations list and count.
Definition: stations.h:35
int16_t count
Definition: stations.h:36