Oyster Harvest Area Closure Analysis 0.1
Prediction and analysis of NSW oyster harvest area closures.
Loading...
Searching...
No Matches
location.h
Go to the documentation of this file.
1#ifndef HA_CLOSURE_ANALYSIS_LOCATION_H
2#define HA_CLOSURE_ANALYSIS_LOCATION_H
3
4#include <string.h>
5#include <stdlib.h>
6#include <stdio.h>
7#include <math.h>
8#include <cjson/cJSON.h>
9#include <curl/curl.h>
10#include <log.h>
11
13#include "http.h"
14#include "utils.h"
15
17#define WW_LOCATION_BUF 150
19#define WW_LOCATION_URL_BUF 200
21#define WW_MAX_NUM_LOCATONS 100
22
24typedef struct{
25 uint16_t id;
26 char location[WW_LOCATION_BUF];
27 char region[WW_LOCATION_BUF];
28 char state[WW_LOCATION_BUF];
29 char postcode[WW_LOCATION_BUF];
30 double latitude;
31 double longitude;
33
35typedef struct {
36 uint16_t count;
39
41CURLcode WillyWeather_GetLocationByName(char *name,
42 WW_Location_TypeDef *location_info);
43
44
45#endif //HA_CLOSURE_ANALYSIS_LOCATION_H
CURLcode WillyWeather_GetLocationByName(char *name, WW_Location_TypeDef *location_info)
Get an ID describing a location from Willy Weather.
Definition: location.c:26
#define WW_MAX_NUM_LOCATONS
Max number of locations in buffer.
Definition: location.h:21
#define WW_LOCATION_BUF
Buffer for location information.
Definition: location.h:17
Location data from Willy Weather request.
Definition: location.h:24
uint16_t id
Location ID for Willy Weather requests.
Definition: location.h:25
double longitude
Longitude of interest.
Definition: location.h:31
double latitude
Latitude of interest.
Definition: location.h:30
Locations of Willy Weather stations.
Definition: location.h:35
uint16_t count
Number of locations in locations list.
Definition: location.h:36