Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.
/ darksky-rtps Public archive

RTPS bridge for DarkSky API using eProsima's FastRTPS

License

Notifications You must be signed in to change notification settings

raveious/darksky-rtps

Repository files navigation

DarkSky RTPS Node

RTPS bridge for DarkSky API using eProsima's FastRTPS.

What happened to Weather Underground?

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.

Requirements

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

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

Data Sharing

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

Docker Deployment

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