equationoftime 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.md +22 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +80 -0
  8. data/README2.txt +70 -0
  9. data/Rakefile +80 -0
  10. data/doc/GeoLatLng.html +770 -0
  11. data/doc/_index.html +123 -0
  12. data/doc/class_list.html +54 -0
  13. data/doc/css/common.css +1 -0
  14. data/doc/css/full_list.css +57 -0
  15. data/doc/css/style.css +339 -0
  16. data/doc/file.README.html +179 -0
  17. data/doc/file_list.html +56 -0
  18. data/doc/frames.html +26 -0
  19. data/doc/index.html +179 -0
  20. data/doc/js/app.js +219 -0
  21. data/doc/js/full_list.js +178 -0
  22. data/doc/js/jquery.js +4 -0
  23. data/doc/method_list.html +611 -0
  24. data/doc/top-level-namespace.html +112 -0
  25. data/equationoftime.gemspec +35 -0
  26. data/examples/Equation_of_Time.jpg +0 -0
  27. data/examples/analemma_data_generator.rb +53 -0
  28. data/examples/check_date_type.rb +57 -0
  29. data/examples/compare_geoc_long_ra.rb +31 -0
  30. data/examples/data_table.rb +26 -0
  31. data/examples/earth_rotation.rb +13 -0
  32. data/examples/eot_methods_list.rb +16 -0
  33. data/examples/eot_plot.r +57 -0
  34. data/examples/eot_suntimes.rb +140 -0
  35. data/examples/equation_of_time.py +186 -0
  36. data/examples/figure_1.jpg +0 -0
  37. data/examples/file_converter.rb +31 -0
  38. data/examples/from_readme.rb +10 -0
  39. data/examples/geo_locator.rb +12 -0
  40. data/examples/getjd.rb +45 -0
  41. data/examples/input_suntimes.rb +21 -0
  42. data/examples/julian_day_formula.rb +29 -0
  43. data/examples/julian_day_formula.txt +12 -0
  44. data/examples/my_time_conversion.rb +21 -0
  45. data/examples/nutation_series.txt +678 -0
  46. data/examples/nutation_series.yaml +14239 -0
  47. data/examples/nutation_table5_3a.txt +682 -0
  48. data/examples/nutation_table5_3a.yaml +9532 -0
  49. data/examples/ptime.rb +162 -0
  50. data/examples/read_nutation_data.rb +399 -0
  51. data/examples/suntimes.rb +28 -0
  52. data/examples/suntimes_test.rb +47 -0
  53. data/examples/test_poly_eval.rb +38 -0
  54. data/examples/time_scales.rb +29 -0
  55. data/examples/usage_example.rb +13 -0
  56. data/examples/use_angles.rb +155 -0
  57. data/lib/eot/angles.rb +337 -0
  58. data/lib/eot/constants.rb +168 -0
  59. data/lib/eot/displays.rb +213 -0
  60. data/lib/eot/geo_lat_lng_smt.rb +80 -0
  61. data/lib/eot/init.rb +93 -0
  62. data/lib/eot/nutation.rb +70 -0
  63. data/lib/eot/nutation_table5_3a.yaml +9532 -0
  64. data/lib/eot/times.rb +130 -0
  65. data/lib/eot/utilities.rb +129 -0
  66. data/lib/eot/version.rb +6 -0
  67. data/lib/eot.rb +11 -0
  68. data/tests/minitest/aliased_angles_spec.rb +287 -0
  69. data/tests/minitest/aliased_displays_spec.rb +106 -0
  70. data/tests/minitest/aliased_times_spec.rb +36 -0
  71. data/tests/minitest/aliased_utilities_spec.rb +49 -0
  72. data/tests/minitest/angles_spec.rb +313 -0
  73. data/tests/minitest/constants_spec.rb +27 -0
  74. data/tests/minitest/delta_epsilon_spec.rb +35 -0
  75. data/tests/minitest/displays_spec.rb +111 -0
  76. data/tests/minitest/geo_spec.rb +36 -0
  77. data/tests/minitest/init_spec.rb +32 -0
  78. data/tests/minitest/nutation_spec.rb +33 -0
  79. data/tests/minitest/times_spec.rb +137 -0
  80. data/tests/minitest/utilities_spec.rb +121 -0
  81. data/tests/spec_config.rb +3 -0
  82. data/wiki.md +46 -0
  83. data/wiki2.md +4 -0
  84. 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
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *.rbc
3
+ .rspec
4
+ .bundle
5
+ .config
6
+ .yardoc
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc
12
+
13
+ lib/bundler/man
14
+ pkg
15
+ rdoc
16
+ spec/reports
17
+ test/tmp
18
+ test/version_tmp
19
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in equationoftime.gemspec
4
+ gemspec
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