equationoftime 4.1.1 → 4.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.autotest +39 -0
- data/.gemtest +0 -0
- data/.minitest.rb +2 -0
- data/.ruby-version +1 -0
- data/.settings/org.eclipse.ltk.core.refactoring.prefs +2 -0
- data/CHANGELOG.rdoc +6 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +44 -3
- data/Guardfile +29 -0
- data/{LICENSE.md → LICENSE.rdoc} +0 -0
- data/Manifest.txt +82 -0
- data/README.rdoc +66 -0
- data/Rakefile +60 -45
- data/equationoftime.gemspec +17 -9
- data/examples/Equation_of_Time.jpg +0 -0
- data/examples/analemma_data_generator.rb +58 -0
- data/examples/check_date_type.rb +60 -0
- data/examples/compare_geoc_long_ra.rb +44 -0
- data/examples/data_table_for_astro_dog.rb +45 -0
- data/examples/earth_rotation.rb +42 -0
- data/examples/eot_methods_list.rb +48 -0
- data/examples/eot_plot.r +57 -0
- data/examples/eot_suntimes.rb +149 -0
- data/examples/equation_of_time.py +186 -0
- data/examples/figure_1.jpg +0 -0
- data/examples/file_converter.rb +31 -0
- data/examples/from_readme.rb +14 -0
- data/examples/from_wiki.rb +46 -0
- data/examples/geo_locator.rb +16 -0
- data/examples/getjd.rb +45 -0
- data/examples/gmst_gast_non_sofa.rb +406 -0
- data/examples/input_suntimes.rb +24 -0
- data/examples/julian_day_formula.rb +29 -0
- data/examples/julian_day_formula.txt +12 -0
- data/examples/my_time_conversion.rb +21 -0
- data/examples/nutation_series.txt +678 -0
- data/examples/nutation_table5_3a.txt +682 -0
- data/examples/ptime.rb +162 -0
- data/examples/suntimes.rb +30 -0
- data/examples/suntimes_test.rb +50 -0
- data/examples/t_sofa.rb +8228 -0
- data/examples/test_celes.rb +51 -0
- data/examples/test_ceot.rb +55 -0
- data/examples/test_poly_eval.rb +32 -0
- data/examples/time_scales.rb +29 -0
- data/examples/times_year.rb +53 -0
- data/examples/usage_example.rb +26 -0
- data/examples/use_angles.rb +222 -0
- data/ext/{ceot/eot.c → eot/ceot.c} +1 -1
- data/ext/{ceot/eot.h → eot/ceot.h} +0 -0
- data/ext/{ceot/ceot.c → eot/eot.c} +2 -2
- data/ext/{ceot → eot}/extconf.rb +1 -1
- data/lib/eot.rb +2 -1
- data/lib/eot/angles.rb +28 -28
- data/lib/eot/constants.rb +2 -0
- data/lib/eot/displays.rb +17 -17
- data/lib/eot/eot.so +0 -0
- data/lib/eot/geo_lat_lng_smt.rb +44 -31
- data/lib/eot/init.rb +20 -19
- data/lib/eot/nutation.rb +1 -1
- data/lib/eot/times.rb +22 -22
- data/lib/eot/utilities.rb +5 -5
- data/lib/eot/version.rb +2 -6
- data/test/aliased_angles_spec.rb +239 -0
- data/test/aliased_displays_spec.rb +105 -0
- data/test/aliased_utilities_spec.rb +36 -0
- data/test/angles_spec.rb +264 -0
- data/test/constants_spec.rb +20 -0
- data/test/displays_spec.rb +110 -0
- data/test/geo_spec.rb +38 -0
- data/test/init_spec.rb +44 -0
- data/test/nutation_spec.rb +37 -0
- data/test/spec_config.rb +8 -0
- data/test/times_spec.rb +133 -0
- data/test/utilities_spec.rb +35 -0
- metadata +109 -115
- data/.gitignore +0 -24
- data/.rvmrc +0 -1
- data/README.md +0 -83
- data/README2.txt +0 -70
- data/wiki.md +0 -43
- data/wiki2.md +0 -4
data/.gitignore
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
.gem
|
2
|
-
.rbc
|
3
|
-
.rspec
|
4
|
-
.bundle
|
5
|
-
.config
|
6
|
-
.settings
|
7
|
-
.yardoc
|
8
|
-
Gemfile.lock
|
9
|
-
|
10
|
-
InstalledFiles
|
11
|
-
_yardoc
|
12
|
-
coverage
|
13
|
-
doc
|
14
|
-
lib/bundler/man
|
15
|
-
pkg
|
16
|
-
rdoc
|
17
|
-
spec/reports
|
18
|
-
test/tmp
|
19
|
-
test/version_tmp
|
20
|
-
tmp
|
21
|
-
ext/ceot/*.o
|
22
|
-
ext/ceot/*.so
|
23
|
-
ext/ceot/Makefile
|
24
|
-
lib/*.so
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use ruby-2.1.2 --default
|
data/README.md
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
[![Gem Version](https://badge.fury.io/rb/equationoftime.png)](http://badge.fury.io/rb/equationoftime)
|
2
|
-
|
3
|
-
##[*Graphic Plot 1*](https://github.com/DouglasAllen/equationoftime/blob/master/examples/figure_1.jpg)
|
4
|
-
created from [*equation_of_time.py*](https://bitbucket.org/cmcqueen1975/sundials/src/26a0f54a7c18fc3b54a3a4cff4f79192fcef1a91/equation_of_time.py?at=default)
|
5
|
-
|
6
|
-
[*Graphic Plot 1*](https://github.com/DouglasAllen/equationoftime/blob/master/examples/equation_of_time.py)
|
7
|
-
|
8
|
-
##[*Graphic Plot 2*](https://github.com/DouglasAllen/equationoftime/blob/master/examples/Equation_of_Time.jpg) created from [*R script*](http://en.wikipedia.org/wiki/File:Zeitgleichung.png)
|
9
|
-
##[*Solar Time*](http://www.maa.mhn.de/Scholar/times.html#solar)
|
10
|
-
##[*Web Calculator*](http://www.nature1st.net/bogan/astro/time/jsjdetst.html)
|
11
|
-
# equationoftime gem
|
12
|
-
##[*Equation of Time download*](https://rubygems.org/gems/equationoftime)
|
13
|
-
##[*Equation of Time Ruby Sinatra Website*](http://equationoftime.herokuapp.com/)
|
14
|
-
|
15
|
-
#Installation:
|
16
|
-
|
17
|
-
Fork it and Clone it:
|
18
|
-
|
19
|
-
$ git clone git@github.com:DouglasAllen/equationoftime.git
|
20
|
-
|
21
|
-
Enter dir:
|
22
|
-
|
23
|
-
$ cd equationoftime
|
24
|
-
|
25
|
-
Execute:
|
26
|
-
|
27
|
-
$ bundle install
|
28
|
-
|
29
|
-
Build extension:
|
30
|
-
|
31
|
-
$ rake compile:ceot
|
32
|
-
|
33
|
-
Run minitest tests:
|
34
|
-
|
35
|
-
$ rake
|
36
|
-
|
37
|
-
Local install of gem build:
|
38
|
-
|
39
|
-
$ rake install
|
40
|
-
|
41
|
-
|
42
|
-
Add this line to your application's Gemfile:
|
43
|
-
|
44
|
-
gem 'equationoftime'
|
45
|
-
|
46
|
-
And then execute:
|
47
|
-
|
48
|
-
$ bundle install
|
49
|
-
|
50
|
-
Or install it yourself as:
|
51
|
-
|
52
|
-
$ gem install equationoftime
|
53
|
-
|
54
|
-
#Usage:
|
55
|
-
|
56
|
-
$ irb --simple-prompt
|
57
|
-
|
58
|
-
require 'eot'
|
59
|
-
eot = Eot.new
|
60
|
-
eot.string_eot()
|
61
|
-
|
62
|
-
#[Wikis](https://github.com/DouglasAllen/equationoftime/blob/master/wiki.md)
|
63
|
-
|
64
|
-
|
65
|
-
Suggestions:
|
66
|
-
|
67
|
-
1. http://equationoftime.herokuapp.com/analemma Itererates through a years worth of dates and computes analemma data.
|
68
|
-
2. A file is included in examples named analemma_data_generator.rb and may help you get started.
|
69
|
-
3. See the [*astro dog*](https://github.com/DouglasAllen/Sinatra-projects/tree/master/astro_dog) project or the web post [*Heroku*](http://equationoftime.herokuapp.com/) for more info about the Equation of Time.
|
70
|
-
4. See the wikis for more usage examples.
|
71
|
-
|
72
|
-
Notes:
|
73
|
-
|
74
|
-
1. for other time equations see:[*gist 2032003*](https://gist.github.com/2032003)
|
75
|
-
|
76
|
-
Contributing:
|
77
|
-
|
78
|
-
1. Fork it
|
79
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
80
|
-
3. Commit your changes (`git commit -am "Added some feature"`)
|
81
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
82
|
-
5. Create new Pull Request
|
83
|
-
|
data/README2.txt
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
Installation:
|
2
|
-
|
3
|
-
Fork it and Clone it:
|
4
|
-
|
5
|
-
$ git clone git@github.com:DouglasAllen/equationoftime-2.3.8.git
|
6
|
-
|
7
|
-
Enter dir:
|
8
|
-
|
9
|
-
$ cd equation_of_time
|
10
|
-
|
11
|
-
Execute:
|
12
|
-
|
13
|
-
$ bundle install
|
14
|
-
|
15
|
-
Run minitest tests:
|
16
|
-
|
17
|
-
$ rake
|
18
|
-
|
19
|
-
Build gem:
|
20
|
-
|
21
|
-
$ gem build equationoftime.gemspec
|
22
|
-
|
23
|
-
Local install of gem build:
|
24
|
-
|
25
|
-
$ gem install equationoftime-2.3.8.gem -l
|
26
|
-
|
27
|
-
|
28
|
-
Add this line to your application's Gemfile:
|
29
|
-
|
30
|
-
gem 'equationoftime'
|
31
|
-
|
32
|
-
And then execute:
|
33
|
-
|
34
|
-
$ bundle
|
35
|
-
|
36
|
-
Or install it yourself as:
|
37
|
-
|
38
|
-
$ gem install equationoftime
|
39
|
-
|
40
|
-
Usage:
|
41
|
-
|
42
|
-
$ irb --simple-prompt
|
43
|
-
|
44
|
-
require 'eot'
|
45
|
-
eot = EqoT.new #(note: in irb you'll see nutation data loading. This is normal.)
|
46
|
-
eot.string_eot()
|
47
|
-
|
48
|
-
|
49
|
-
Notes:
|
50
|
-
|
51
|
-
1. Many other methods are useful. Try eot.methods
|
52
|
-
2. Peek inside /lib directory
|
53
|
-
3. Run the provided examples.
|
54
|
-
4. Look in the wikis
|
55
|
-
|
56
|
-
Suggestions:
|
57
|
-
|
58
|
-
1. Itererate through a years worth of dates and compute analemma data. see: http://equationoftime.herokuapp.com/analemma
|
59
|
-
2. A file is included in examples named analemma_data.rb and may help you get started.
|
60
|
-
3. see the astro dog (https://github.com/DouglasAllen/Sinatra-projects/tree/master/astro_dog) project here and the web post of it on Heroku (http://equationoftime.herokuapp.com/) for more info about the Equation of Time.
|
61
|
-
4. see the wikis for more usage examples.
|
62
|
-
|
63
|
-
Contributing:
|
64
|
-
|
65
|
-
1. Fork it
|
66
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
67
|
-
3. Commit your changes (`git commit -am "Added some feature"`)
|
68
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
69
|
-
5. Create new Pull Request
|
70
|
-
|
data/wiki.md
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
Wiki 1:
|
2
|
-
|
3
|
-
$ irb --simple-prompt
|
4
|
-
|
5
|
-
require 'eot'
|
6
|
-
eot = Eot.new()
|
7
|
-
loop do
|
8
|
-
puts "#{Time.now} #{eot.show_minutes(eot.now)}"
|
9
|
-
sleep 11
|
10
|
-
end
|
11
|
-
|
12
|
-
Wiki 2:
|
13
|
-
|
14
|
-
latitude, longitude, date = 41.9474, -88.74467, "2013-12-25"
|
15
|
-
require 'eot';eot = Eot.new()
|
16
|
-
eot.latitude = latitude; eot.longitude = longitude; eot.ajd = Date.parse(date).jd
|
17
|
-
eot.sunrise_dt().to_time
|
18
|
-
eot.sunset_dt().to_time
|
19
|
-
|
20
|
-
Wiki 3:
|
21
|
-
|
22
|
-
require 'eot';eot = Eot.new()
|
23
|
-
loop do
|
24
|
-
eot.ajd = DateTime.now.to_time.utc.to_datetime.ajd
|
25
|
-
puts eot.string_time(eot.tl_Aries() / 15.0)
|
26
|
-
sleep 0.73
|
27
|
-
end
|
28
|
-
|
29
|
-
Wiki 4:
|
30
|
-
|
31
|
-
require 'eot';eot = Eot.new()
|
32
|
-
"There are #{Eot::SM * 6} hours in a sidereal day."
|
33
|
-
"That is why on the next day the stars are about 4 minutes earlier."
|
34
|
-
obtime0 = Time.now
|
35
|
-
obtime1 = obtime0 + Eot::SM * 6 * 3600
|
36
|
-
"Now you know when to look next time."
|
37
|
-
|
38
|
-
Wiki 5:
|
39
|
-
|
40
|
-
require 'eot'; eot = Eot.new(); eot.ajd = Date.today.jd.to_f
|
41
|
-
DateTime.jd(eot.sunrise_jd + 0.5)
|
42
|
-
DateTime.jd(eot.sunset_jd + 0.5)
|
43
|
-
|
data/wiki2.md
DELETED