equationoftime 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/LICENSE.md +22 -0
- data/LICENSE.txt +22 -0
- data/README.md +80 -0
- data/README2.txt +70 -0
- data/Rakefile +80 -0
- data/doc/GeoLatLng.html +770 -0
- data/doc/_index.html +123 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +179 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +179 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +611 -0
- data/doc/top-level-namespace.html +112 -0
- data/equationoftime.gemspec +35 -0
- data/examples/Equation_of_Time.jpg +0 -0
- data/examples/analemma_data_generator.rb +53 -0
- data/examples/check_date_type.rb +57 -0
- data/examples/compare_geoc_long_ra.rb +31 -0
- data/examples/data_table.rb +26 -0
- data/examples/earth_rotation.rb +13 -0
- data/examples/eot_methods_list.rb +16 -0
- data/examples/eot_plot.r +57 -0
- data/examples/eot_suntimes.rb +140 -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 +10 -0
- data/examples/geo_locator.rb +12 -0
- data/examples/getjd.rb +45 -0
- data/examples/input_suntimes.rb +21 -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_series.yaml +14239 -0
- data/examples/nutation_table5_3a.txt +682 -0
- data/examples/nutation_table5_3a.yaml +9532 -0
- data/examples/ptime.rb +162 -0
- data/examples/read_nutation_data.rb +399 -0
- data/examples/suntimes.rb +28 -0
- data/examples/suntimes_test.rb +47 -0
- data/examples/test_poly_eval.rb +38 -0
- data/examples/time_scales.rb +29 -0
- data/examples/usage_example.rb +13 -0
- data/examples/use_angles.rb +155 -0
- data/lib/eot/angles.rb +337 -0
- data/lib/eot/constants.rb +168 -0
- data/lib/eot/displays.rb +213 -0
- data/lib/eot/geo_lat_lng_smt.rb +80 -0
- data/lib/eot/init.rb +93 -0
- data/lib/eot/nutation.rb +70 -0
- data/lib/eot/nutation_table5_3a.yaml +9532 -0
- data/lib/eot/times.rb +130 -0
- data/lib/eot/utilities.rb +129 -0
- data/lib/eot/version.rb +6 -0
- data/lib/eot.rb +11 -0
- data/tests/minitest/aliased_angles_spec.rb +287 -0
- data/tests/minitest/aliased_displays_spec.rb +106 -0
- data/tests/minitest/aliased_times_spec.rb +36 -0
- data/tests/minitest/aliased_utilities_spec.rb +49 -0
- data/tests/minitest/angles_spec.rb +313 -0
- data/tests/minitest/constants_spec.rb +27 -0
- data/tests/minitest/delta_epsilon_spec.rb +35 -0
- data/tests/minitest/displays_spec.rb +111 -0
- data/tests/minitest/geo_spec.rb +36 -0
- data/tests/minitest/init_spec.rb +32 -0
- data/tests/minitest/nutation_spec.rb +33 -0
- data/tests/minitest/times_spec.rb +137 -0
- data/tests/minitest/utilities_spec.rb +121 -0
- data/tests/spec_config.rb +3 -0
- data/wiki.md +46 -0
- data/wiki2.md +4 -0
- metadata +240 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1514a89d8789f0090e320b4f2765caa93fd2d388
|
4
|
+
data.tar.gz: 87dd53ff6e943054f70640630ff31286d0758325
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6cb5e5ec8fc7883bd2485ada6cb92cc331fddbdda8a6965ae77160e7580148984bdbe1a23c5779d16f0879db1e0c29f85310033174e82dd4b5f75e28417be389
|
7
|
+
data.tar.gz: 7350097176c9322dac5fdfd0e2830f8fa2a878de8b34d528559a7e65efccc2c1282d70f079709079aca46a1e15031856884a5314a8d3327c5b780d54a6a7512a
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
data/Gemfile
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Douglas G. Allen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 DouglasAllen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/equationoftime.png)](http://badge.fury.io/rb/equationoftime)
|
2
|
+
##[*RDocs*](http://rubydoc.info/gems/equationoftime/3.0.0/frames)
|
3
|
+
##[*Graphic Plot 1*](https://github.com/DouglasAllen/equationoftime-3.0.0/blob/master/examples/figure_1.jpg) created from [*equation_of_time.py*](https://bitbucket.org/cmcqueen1975/sundials/src/26a0f54a7c18fc3b54a3a4cff4f79192fcef1a91/equation_of_time.py?at=default)
|
4
|
+
##[*Graphic Plot 2*](https://github.com/DouglasAllen/equationoftime-3.0.0/blob/master/examples/Equation_of_Time.jpg) created from [*R script*](http://en.wikipedia.org/wiki/File:Zeitgleichung.png)
|
5
|
+
##[*Solar Time*](http://www.maa.mhn.de/Scholar/times.html#solar)
|
6
|
+
##[*Web Calculator*](http://www.nature1st.net/bogan/astro/time/jsjdetst.html)
|
7
|
+
# equationoftime gem
|
8
|
+
##[*Equation of Time download*](https://rubygems.org/gems/equationoftime)
|
9
|
+
##[*Equation of Time Ruby Sinatra Website*](http://equationoftime.herokuapp.com/)
|
10
|
+
|
11
|
+
#Installation:
|
12
|
+
|
13
|
+
Fork it and Clone it:
|
14
|
+
|
15
|
+
$ git clone git@github.com:DouglasAllen/equationoftime-3.0.0.git
|
16
|
+
|
17
|
+
Enter dir:
|
18
|
+
|
19
|
+
$ cd equationoftime-3.0.0
|
20
|
+
|
21
|
+
Execute:
|
22
|
+
|
23
|
+
$ bundle
|
24
|
+
|
25
|
+
Run minitest tests:
|
26
|
+
|
27
|
+
$ rake
|
28
|
+
|
29
|
+
Build gem:
|
30
|
+
|
31
|
+
$ rake build
|
32
|
+
|
33
|
+
Local install of gem build:
|
34
|
+
|
35
|
+
$ rake install
|
36
|
+
|
37
|
+
|
38
|
+
Add this line to your application's Gemfile:
|
39
|
+
|
40
|
+
gem 'equationoftime'
|
41
|
+
|
42
|
+
And then execute:
|
43
|
+
|
44
|
+
$ bundle
|
45
|
+
|
46
|
+
Or install it yourself as:
|
47
|
+
|
48
|
+
$ gem install equationoftime
|
49
|
+
|
50
|
+
#Usage:
|
51
|
+
|
52
|
+
$ irb --simple-prompt
|
53
|
+
|
54
|
+
require 'eot'
|
55
|
+
eot = Eot.new; "note: nutation data loading is normal if you leave this off."
|
56
|
+
eot.string_eot()
|
57
|
+
|
58
|
+
#[Wikis](https://github.com/DouglasAllen/equationoftime-3.0.0/blob/master/wiki.md)
|
59
|
+
|
60
|
+
|
61
|
+
Notes:
|
62
|
+
|
63
|
+
1. for other time equations see:[*gist 2032003*](https://gist.github.com/2032003)
|
64
|
+
|
65
|
+
|
66
|
+
Suggestions:
|
67
|
+
|
68
|
+
1. http://equationoftime.herokuapp.com/analemma Itererates through a years worth of dates and computes analemma data.
|
69
|
+
2. A file is included in examples named analemma_data_generator.rb and may help you get started.
|
70
|
+
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.
|
71
|
+
4. See the wikis for more usage examples.
|
72
|
+
|
73
|
+
Contributing:
|
74
|
+
|
75
|
+
1. Fork it
|
76
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
77
|
+
3. Commit your changes (`git commit -am "Added some feature"`)
|
78
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
79
|
+
5. Create new Pull Request
|
80
|
+
|
data/README2.txt
ADDED
@@ -0,0 +1,70 @@
|
|
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/Rakefile
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
|
5
|
+
task :default => [ :test ]
|
6
|
+
|
7
|
+
#RSpec::Core::RakeTask.new(:spec) do | t |
|
8
|
+
# t.pattern = "./tests/spec/*_spec.rb"
|
9
|
+
# t.rspec_opts = []
|
10
|
+
#end
|
11
|
+
|
12
|
+
require 'rake/testtask'
|
13
|
+
|
14
|
+
Rake::TestTask.new(:test) do |t|
|
15
|
+
t.libs << "test"
|
16
|
+
t.test_files = FileList['tests/minitest/*_spec.rb']
|
17
|
+
t.verbose = true
|
18
|
+
t.options
|
19
|
+
end
|
20
|
+
|
21
|
+
require "bundler/gem_tasks"
|
22
|
+
|
23
|
+
require "rake/win32"
|
24
|
+
|
25
|
+
# Rake::TestTask.new(:mine) do |t|
|
26
|
+
|
27
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/aliased_angles_spec.rb")
|
28
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/aliased_angles_spec.rb")
|
29
|
+
|
30
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/aliased_displays_spec.rb")
|
31
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/aliased_displays_spec.rb")
|
32
|
+
|
33
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/aliased_utilities_spec.rb")
|
34
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/aliased_utilities_spec.rb")
|
35
|
+
|
36
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/angles_spec.rb")
|
37
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/angles_spec.rb")
|
38
|
+
|
39
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/constants_spec.rb")
|
40
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/constants_spec.rb")
|
41
|
+
|
42
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/displays_spec.rb")
|
43
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/displays_spec.rb")
|
44
|
+
|
45
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/init_spec.rb")
|
46
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/init_spec.rb")
|
47
|
+
|
48
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/nutation_spec.rb")
|
49
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/nutation_spec.rb")
|
50
|
+
|
51
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/times_spec.rb")
|
52
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/times_spec.rb")
|
53
|
+
|
54
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/utilities_spec.rb")
|
55
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/utilities_spec.rb")
|
56
|
+
|
57
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/vars_spec.rb")
|
58
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/vars_spec.rb")
|
59
|
+
|
60
|
+
# end
|
61
|
+
|
62
|
+
require 'yard'
|
63
|
+
|
64
|
+
YARD::Rake::YardocTask.new(:yardoc) do |t|
|
65
|
+
t.files = ['lib/**/*.rb']
|
66
|
+
# puts t.methods
|
67
|
+
end
|
68
|
+
|
69
|
+
require 'rdoc/task'
|
70
|
+
|
71
|
+
desc 'generate API documentation to rdocs/index.html'
|
72
|
+
Rake::RDocTask.new(:rdox) do |rd|
|
73
|
+
|
74
|
+
rd.rdoc_dir = 'rdocs'
|
75
|
+
|
76
|
+
rd.rdoc_files.include 'lib/**/*.rb', 'README.md', 'README.txt', 'wiki.md'
|
77
|
+
|
78
|
+
rd.options << '--line-numbers'
|
79
|
+
|
80
|
+
end
|