GithubHelp home page GithubHelp logo

jcasman / aurora-detector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marioruiz/aurora-detector

0.0 2.0 0.0 19 KB

Using a 360 camera, Ricoh Theta S, and some ruby code, we can detect when a northern light is shining on the sky, take a picture, record a video, notify by email, twitter...

License: MIT License

Ruby 100.00%

aurora-detector's Introduction

Aurora Detector

Detects using a 360 camera if a northern light is showing in the sky and take the actions you want: take a picture, video, notify on twitter...

Since we use a 360 camera the whole sky is analyzed just with one picture.

The Aurora Detector is only working from sunset to sunrise and in case it is not completely cloudy.

Analyzes only the part of the picture that could be considered the sky.

Setup

What you need

  • 360 Camera. I'm using a Ricoh Theta S but can be easily adapted to the one you choose. Open Spherical Camera API from Google: https://developers.google.com/streetview/open-spherical-camera/
  • A charger for the camera (can disconnect the WIFI connection) or a battery bank.
  • Since the camera will be outside I recommend a cover case and maybe some heating system.
  • A computer (Raspberry 3 for example) with WIFI connection and internet connection not using the same WIFI connection, for example, Ethernet

Installation

# to get the latitude and longitude of your location:
# https://mynasadata.larc.nasa.gov/latitudelongitude-finder/
LATITUDE = 64.126521
LONGITUDE = -21.817439

# To be able to know the weather conditions get it on
# https://openweathermap.org/appid
WEATHER_API_KEY = "xxxx"

# percentage from top of the captured image to analyze (sky)
HORIZON = 35

# under this percentage of clouds we will analyze the sky
CLOUDY_LIMIT = 70

# Shutter speed: between 5-25 seconds. 5 when auroras moving fast
SHUTTER_SPEED = 5

# ISO sensitivity: 1600
ISO = 1600

Using it

  1. Turn on the Ricoh Theta S camera, be sure WIFI is on.
  2. Connect to the WIFI of the camera from the computer
  3. Be sure you have internet connection on the computer using a network cable for example
  4. In command line go to your Aurora Detector folder and run in command line:
ruby aurora_detector.rb

The logs file will be created: aurora_detector.log

In case it is later than the sunset time but earlier than the sunrise time the Aurora Detector will be analyzing the sky searching for northern lights.

The last image taken to analyze will be in files folder with the name image.jpg

In case an aurora is detected then it will be called the method 'alert' and it will be taken pictures for three minutes every 10 or 20 seconds, depending on how strong is the northern light.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/marioruiz/aurora-detector

License

The gem is available as open source under the terms of the MIT License.

aurora-detector's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.