项目作者: raveious

项目描述 :
RTPS bridge for DarkSky API using eProsima's FastRTPS
高级语言: C++
项目地址: git://github.com/raveious/darksky-rtps.git
创建时间: 2018-05-12T20:32:15Z
项目社区:https://github.com/raveious/darksky-rtps

开源协议:Apache License 2.0

下载


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

  1. $ git clone --recursive https://github.com/raveious/darksky-rtps.git darksky-rtps
  2. $ cd darksky-rtps
  3. $ mkdir build
  4. $ cd build
  5. $ 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.

  1. version: '3.1'
  2. services:
  3. weather_forcaster:
  4. image: raveious/darksky-rtps
  5. ports:
  6. - '44084:44084'
  7. - '17900:17900'
  8. - '17910:17910'
  9. - '17911:17911'
  10. secrets:
  11. - DARKSKY_KEY
  12. - DARKSKY_LATITUDE
  13. - DARKSKY_LONGITUDE
  14. secrets:
  15. DARKSKY_KEY:
  16. external: true
  17. DARKSKY_LATITUDE:
  18. external: true
  19. DARKSKY_LONGITUDE:
  20. external: true