equationoftime

Home

equationoftime.herokuapp.com/

Code

github.com/DouglasAllen/equationoftime

RDoc

rubydoc.info/gems/equationoftime/4.1.2/frames

Issues

github.com/DouglasAllen/equationoftime/issues

DESCRIPTION:

Calculate Sunrise and Sunset. Now uses native C wrappers. Lots of examples to play with for learning about Eot.

FEATURES/PROBLEMS:

  • Use GeoLatLng class to set coordinates or set them manually.

SYNOPSIS:

$ irb --simple-prompt

      require 'eot'
      eot = Eot.new
      eot.string_eot          # todays eot
      eot.addr                # what is the location
      eot.addr = "huston, tx" #changed location
      geo = GeoLatLng.new
      geo.addr = eot.addr     # set new location
      geo.set_coordinates     # set new coordinates
      eot.sunrise_jd          # todays sunrise as a jd
      eot.sunset_jd           # todays sunset as a jd
      eot.sunrise_dt          # todays sunrise as DateTime
      eot.sunset_dt           # todays sunset as a DateTime
      eot.ajd += 1            # tommorrow times can be read
      eot.ajd = 2451545       # ajd set to 2001-01-01 12:00

REQUIREMENTS:

  • bundle install

INSTALL:

  • rake install

DEVELOPERS:

After checking out the source, run:

$ rake newb

Or use patch to install as gem

$ gem install eot

This task will install any missing dependencies, run the tests/specs, and generate the RDoc.

LICENSE:

(The MIT License)

Copyright © 2014

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.