RTPS bridge for DarkSky API using eProsima's FastRTPS
RTPS bridge for DarkSky API using eProsima’s FastRTPS.
Turns out that Weather Underground will be shutting down it’s API service as of 12/31/2018, so I decided to use DarkSky instead.
These variables can be set as either Docker secrets, or just as environment variables.
Variable Name | Description |
---|---|
DARKSKY_KEY | API key that you get by signing up on DarkSky. |
DARKSKY_LATITUDE | The latitude of the location you would like to publish. |
DARKSKY_LONGITUDE | The longitude of the location you would like to publish. |
DARKSKY_POLLING_RATE | Rate (in ms) at which DarkSky should be polled, and data published. With the calling rate limit, the default is set to 90 secs. |
Building from source using cmake
$ git clone --recursive https://github.com/raveious/darksky-rtps.git darksky-rtps
$ cd darksky-rtps
$ mkdir build
$ cd build
$ cmake .. && make
This application will publish DarkSky API data on the following topics, using the corresponding data types in domain 42.
Topic Name | Data Type |
---|---|
/weather/conditions | WeatherCondition |
/weather/alerts | WeatherAlert |
/weather/forcast/hourly | WeatherForcast |
/weather/forcast/daily | WeatherForcast |
You can use a use a docker-compose file like this one to deploy this as a service.
version: '3.1'
services:
weather_forcaster:
image: raveious/darksky-rtps
ports:
- '44084:44084'
- '17900:17900'
- '17910:17910'
- '17911:17911'
secrets:
- DARKSKY_KEY
- DARKSKY_LATITUDE
- DARKSKY_LONGITUDE
secrets:
DARKSKY_KEY:
external: true
DARKSKY_LATITUDE:
external: true
DARKSKY_LONGITUDE:
external: true