equationoftime 4.1.2 → 4.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.ruby-version +1 -1
- data/Gemfile +6 -4
- data/Gemfile.lock +21 -14
- data/Guardfile +4 -21
- data/Manifest.txt +18 -52
- data/README.rdoc +6 -6
- data/Rakefile +53 -92
- data/equationoftime.gemspec +48 -49
- data/examples/my_lst.rb +9 -0
- data/examples/use_addr.rb +20 -0
- data/examples/use_ajd.rb +40 -0
- data/ext/eot/ceot.c +18 -14
- data/ext/eot/extconf.rb +4 -5
- data/lib/eot/angle_displays.rb +95 -0
- data/lib/eot/angles.rb +160 -291
- data/lib/eot/constants.rb +78 -81
- data/lib/eot/deltas.rb +40 -0
- data/lib/eot/geo_lat_lng_smt.rb +30 -57
- data/lib/eot/init.rb +86 -124
- data/lib/eot/time_displays.rb +105 -0
- data/lib/eot/times.rb +118 -121
- data/lib/eot/trigometric.rb +51 -0
- data/lib/eot/utilities.rb +49 -50
- data/lib/eot/version.rb +3 -2
- data/lib/eot.rb +11 -5
- data/test/eot/aliased_angles_spec.rb +291 -0
- data/test/eot/aliased_displays_spec.rb +126 -0
- data/test/{aliased_utilities_spec.rb → eot/aliased_utilities_spec.rb} +32 -36
- data/test/eot/angles_spec.rb +261 -0
- data/test/eot/constants_spec.rb +17 -0
- data/test/eot/displays_spec.rb +111 -0
- data/test/eot/geo_spec.rb +40 -0
- data/test/eot/init_spec.rb +45 -0
- data/test/eot/times_spec.rb +137 -0
- data/wiki.md +55 -0
- data/wiki2.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +55 -69
- metadata.gz.sig +0 -0
- data/.settings/org.eclipse.ltk.core.refactoring.prefs +0 -2
- data/examples/analemma_data_generator.rb +0 -58
- data/examples/check_date_type.rb +0 -60
- data/examples/compare_geoc_long_ra.rb +0 -44
- data/examples/data_table_for_astro_dog.rb +0 -45
- data/examples/earth_rotation.rb +0 -42
- data/examples/eot_methods_list.rb +0 -48
- data/examples/eot_plot.r +0 -57
- data/examples/eot_suntimes.rb +0 -149
- data/examples/equation_of_time.py +0 -186
- data/examples/figure_1.jpg +0 -0
- data/examples/file_converter.rb +0 -31
- data/examples/from_readme.rb +0 -14
- data/examples/from_wiki.rb +0 -46
- data/examples/geo_locator.rb +0 -16
- data/examples/getjd.rb +0 -45
- data/examples/gmst_gast_non_sofa.rb +0 -406
- data/examples/input_suntimes.rb +0 -24
- data/examples/julian_day_formula.rb +0 -29
- data/examples/julian_day_formula.txt +0 -12
- data/examples/my_time_conversion.rb +0 -21
- data/examples/nutation_series.txt +0 -678
- data/examples/nutation_table5_3a.txt +0 -682
- data/examples/ptime.rb +0 -162
- data/examples/suntimes.rb +0 -30
- data/examples/suntimes_test.rb +0 -50
- data/examples/t_sofa.rb +0 -8228
- data/examples/test_celes.rb +0 -51
- data/examples/test_ceot.rb +0 -55
- data/examples/test_poly_eval.rb +0 -32
- data/examples/time_scales.rb +0 -29
- data/examples/times_year.rb +0 -53
- data/examples/usage_example.rb +0 -26
- data/examples/use_angles.rb +0 -222
- data/lib/eot/displays.rb +0 -216
- data/lib/eot/eot.so +0 -0
- data/lib/eot/nutation.rb +0 -78
- data/run_tests_eclipse.rb +0 -1
- data/test/aliased_angles_spec.rb +0 -239
- data/test/aliased_displays_spec.rb +0 -105
- data/test/angles_spec.rb +0 -264
- data/test/constants_spec.rb +0 -20
- data/test/displays_spec.rb +0 -110
- data/test/geo_spec.rb +0 -38
- data/test/init_spec.rb +0 -44
- data/test/nutation_spec.rb +0 -37
- data/test/spec_config.rb +0 -8
- data/test/times_spec.rb +0 -133
- data/test/utilities_spec.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d7c71c9180b8b4b0094d48ea229d33f6c6c29a0
|
4
|
+
data.tar.gz: 6f906ad06de3a024af3f3821ac43a0778957ba8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 313234036b84d2b1a8a3f51b20ddbe5faad9e91f6d5ec678aef861804aa01c201170c7bbecea1bc702dd92318cafafe5a381f70c53dfc6d17a4ba5b92c26fcf7
|
7
|
+
data.tar.gz: 130b5e3874268f119c3485e76cacaaa8c7cc2f9b9a2a75b61279487fa9acdaf1772cb50dc1673e9a83d45a1bf2b234c7c8e22c052a426196e45521d061197a8c
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.1.2
|
data/Gemfile
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
-
|
2
|
+
ruby '2.1.2'
|
3
3
|
# Specify your gem's dependencies in equationoftime.gemspec
|
4
4
|
gemspec
|
5
|
+
gem 'addressable'
|
5
6
|
group :development do
|
7
|
+
gem 'robocop'
|
6
8
|
gem 'hoe'
|
7
|
-
gem 'rake'
|
8
|
-
gem 'rake-compiler', '~> 0.9.3'
|
9
|
+
gem 'rake'
|
10
|
+
gem 'rake-compiler', '~> 0.9.3'
|
9
11
|
gem 'guard'
|
10
12
|
gem 'minitest'
|
11
13
|
gem 'guard-minitest'
|
@@ -13,4 +15,4 @@ group :development do
|
|
13
15
|
gem 'rspec'
|
14
16
|
gem 'yard'
|
15
17
|
gem 'rdoc'
|
16
|
-
end
|
18
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
equationoftime (4.1.
|
5
|
-
|
4
|
+
equationoftime (4.1.4)
|
5
|
+
addressable (~> 2.3.6)
|
6
|
+
celes (~> 0.0.1)
|
6
7
|
rest-client
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: https://rubygems.org/
|
10
11
|
specs:
|
11
12
|
ZenTest (4.10.1)
|
13
|
+
addressable (2.3.6)
|
12
14
|
celes (0.0.1)
|
13
15
|
celluloid (0.16.0)
|
14
16
|
timers (~> 4.0.0)
|
@@ -42,6 +44,7 @@ GEM
|
|
42
44
|
coderay (~> 1.1.0)
|
43
45
|
method_source (~> 0.8.1)
|
44
46
|
slop (~> 3.4)
|
47
|
+
rack (1.5.2)
|
45
48
|
rake (10.3.2)
|
46
49
|
rake-compiler (0.9.3)
|
47
50
|
rake
|
@@ -53,18 +56,20 @@ GEM
|
|
53
56
|
rest-client (1.7.2)
|
54
57
|
mime-types (>= 1.16, < 3.0)
|
55
58
|
netrc (~> 0.7)
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
rspec-
|
60
|
-
|
61
|
-
rspec-
|
62
|
-
rspec-
|
59
|
+
robocop (0.1.1)
|
60
|
+
rack
|
61
|
+
rspec (3.1.0)
|
62
|
+
rspec-core (~> 3.1.0)
|
63
|
+
rspec-expectations (~> 3.1.0)
|
64
|
+
rspec-mocks (~> 3.1.0)
|
65
|
+
rspec-core (3.1.2)
|
66
|
+
rspec-support (~> 3.1.0)
|
67
|
+
rspec-expectations (3.1.0)
|
63
68
|
diff-lcs (>= 1.2.0, < 2.0)
|
64
|
-
rspec-support (~> 3.
|
65
|
-
rspec-mocks (3.0
|
66
|
-
rspec-support (~> 3.
|
67
|
-
rspec-support (3.0
|
69
|
+
rspec-support (~> 3.1.0)
|
70
|
+
rspec-mocks (3.1.0)
|
71
|
+
rspec-support (~> 3.1.0)
|
72
|
+
rspec-support (3.1.0)
|
68
73
|
slop (3.6.0)
|
69
74
|
thor (0.19.1)
|
70
75
|
timers (4.0.1)
|
@@ -76,7 +81,8 @@ PLATFORMS
|
|
76
81
|
|
77
82
|
DEPENDENCIES
|
78
83
|
ZenTest
|
79
|
-
|
84
|
+
addressable
|
85
|
+
bundler (~> 1.7)
|
80
86
|
equationoftime!
|
81
87
|
guard
|
82
88
|
guard-minitest
|
@@ -85,5 +91,6 @@ DEPENDENCIES
|
|
85
91
|
rake
|
86
92
|
rake-compiler (~> 0.9.3)
|
87
93
|
rdoc
|
94
|
+
robocop
|
88
95
|
rspec
|
89
96
|
yard
|
data/Guardfile
CHANGED
@@ -1,29 +1,12 @@
|
|
1
|
-
# A sample Guardfile
|
2
1
|
# More info at https://github.com/guard/guard#readme
|
3
2
|
|
4
|
-
|
5
3
|
guard :minitest do
|
6
4
|
# with Minitest::Unit
|
7
|
-
watch(
|
8
|
-
watch(
|
9
|
-
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
5
|
+
watch('test/eot/*_test.rb')
|
6
|
+
watch('lib/eot/*.rb') { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
10
7
|
|
11
8
|
# with Minitest::Spec
|
12
|
-
watch(
|
13
|
-
watch(
|
14
|
-
watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
|
15
|
-
|
16
|
-
# Rails 4
|
17
|
-
# watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
18
|
-
# watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
|
19
|
-
# watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
|
20
|
-
# watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
|
21
|
-
# watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
|
22
|
-
# watch(%r{^test/.+_test\.rb$})
|
23
|
-
# watch(%r{^test/test_helper\.rb$}) { 'test' }
|
9
|
+
watch('test/eot/*_spec.rb')
|
10
|
+
watch('lib/eot/*.rb') { |m| "test/#{m[1]}_spec.rb" }
|
24
11
|
|
25
|
-
# Rails < 4
|
26
|
-
# watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
|
27
|
-
# watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
|
28
|
-
# watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
|
29
12
|
end
|
data/Manifest.txt
CHANGED
@@ -4,7 +4,6 @@
|
|
4
4
|
.project
|
5
5
|
.rspec
|
6
6
|
.ruby-version
|
7
|
-
.settings/org.eclipse.ltk.core.refactoring.prefs
|
8
7
|
CHANGELOG.rdoc
|
9
8
|
Gemfile
|
10
9
|
Gemfile.lock
|
@@ -16,67 +15,34 @@ README.rdoc
|
|
16
15
|
Rakefile
|
17
16
|
equationoftime.gemspec
|
18
17
|
examples/Equation_of_Time.jpg
|
19
|
-
examples/
|
20
|
-
examples/
|
21
|
-
examples/
|
22
|
-
examples/data_table_for_astro_dog.rb
|
23
|
-
examples/earth_rotation.rb
|
24
|
-
examples/eot_methods_list.rb
|
25
|
-
examples/eot_plot.r
|
26
|
-
examples/eot_suntimes.rb
|
27
|
-
examples/equation_of_time.py
|
28
|
-
examples/figure_1.jpg
|
29
|
-
examples/file_converter.rb
|
30
|
-
examples/from_readme.rb
|
31
|
-
examples/from_wiki.rb
|
32
|
-
examples/geo_locator.rb
|
33
|
-
examples/getjd.rb
|
34
|
-
examples/gmst_gast_non_sofa.rb
|
35
|
-
examples/input_suntimes.rb
|
36
|
-
examples/julian_day_formula.rb
|
37
|
-
examples/julian_day_formula.txt
|
38
|
-
examples/my_time_conversion.rb
|
39
|
-
examples/nutation_series.txt
|
40
|
-
examples/nutation_table5_3a.txt
|
41
|
-
examples/ptime.rb
|
42
|
-
examples/suntimes.rb
|
43
|
-
examples/suntimes_test.rb
|
44
|
-
examples/t_sofa.rb
|
45
|
-
examples/test_celes.rb
|
46
|
-
examples/test_ceot.rb
|
47
|
-
examples/test_poly_eval.rb
|
48
|
-
examples/time_scales.rb
|
49
|
-
examples/times_year.rb
|
50
|
-
examples/usage_example.rb
|
51
|
-
examples/use_angles.rb
|
18
|
+
examples/my_lst.rb
|
19
|
+
examples/use_addr.rb
|
20
|
+
examples/use_ajd.rb
|
52
21
|
ext/eot
|
53
22
|
ext/eot/ceot.c
|
54
23
|
ext/eot/ceot.h
|
55
24
|
ext/eot/eot.c
|
56
25
|
ext/eot/extconf.rb
|
57
26
|
lib/eot.rb
|
27
|
+
lib/eot/angle_displays.rb
|
58
28
|
lib/eot/angles.rb
|
59
29
|
lib/eot/constants.rb
|
60
|
-
lib/eot/
|
61
|
-
lib/eot/eot.so
|
30
|
+
lib/eot/deltas.rb
|
62
31
|
lib/eot/geo_lat_lng_smt.rb
|
63
32
|
lib/eot/init.rb
|
64
|
-
lib/eot/
|
33
|
+
lib/eot/time_displays.rb
|
65
34
|
lib/eot/times.rb
|
35
|
+
lib/eot/trigometric.rb
|
66
36
|
lib/eot/utilities.rb
|
67
37
|
lib/eot/version.rb
|
68
|
-
|
69
|
-
test/
|
70
|
-
test/
|
71
|
-
test/
|
72
|
-
test/
|
73
|
-
test/
|
74
|
-
test/
|
75
|
-
test/
|
76
|
-
test/
|
77
|
-
|
78
|
-
|
79
|
-
test/times_spec.rb
|
80
|
-
test/utilities_spec.rb
|
81
|
-
Rakefile
|
82
|
-
|
38
|
+
test/eot/aliased_angles_spec.rb
|
39
|
+
test/eot/aliased_displays_spec.rb
|
40
|
+
test/eot/aliased_utilities_spec.rb
|
41
|
+
test/eot/angles_spec.rb
|
42
|
+
test/eot/constants_spec.rb
|
43
|
+
test/eot/displays_spec.rb
|
44
|
+
test/eot/geo_spec.rb
|
45
|
+
test/eot/init_spec.rb
|
46
|
+
test/eot/times_spec.rb
|
47
|
+
wiki.md
|
48
|
+
wiki2.md
|
data/README.rdoc
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
= equationoftime
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
Home :: http://equationoftime.herokuapp.com/
|
4
|
+
Code :: https://github.com/DouglasAllen/equationoftime
|
5
|
+
RDoc :: http://rubydoc.info/gems/equationoftime/4.1.2/frames
|
6
|
+
Issues :: https://github.com/DouglasAllen/equationoftime/issues
|
7
7
|
|
8
8
|
|
9
9
|
== DESCRIPTION:
|
10
10
|
|
11
|
-
Calculate Sunrise and Sunset. Now uses native C
|
11
|
+
Calculate Sunrise and Sunset. Now uses native C wrappers.
|
12
12
|
Lots of examples to play with for learning about Eot.
|
13
13
|
|
14
14
|
== FEATURES/PROBLEMS:
|
@@ -20,7 +20,7 @@ Lots of examples to play with for learning about Eot.
|
|
20
20
|
$ irb --simple-prompt
|
21
21
|
|
22
22
|
require 'eot'
|
23
|
-
eot =
|
23
|
+
eot = Eot.new()
|
24
24
|
eot.string_eot()
|
25
25
|
|
26
26
|
== REQUIREMENTS:
|
data/Rakefile
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
2
|
# require "bundler/install_tasks"
|
3
3
|
require 'hoe'
|
4
4
|
require 'rake/extensiontask'
|
5
5
|
require 'rake/testtask'
|
6
|
-
#require "rake/win32"
|
6
|
+
# require "rake/win32"
|
7
7
|
require 'rdoc/task'
|
8
8
|
require 'rspec/core/rake_task'
|
9
9
|
require 'yard'
|
10
|
-
# rake release VERSION=4.1.
|
10
|
+
# rake release VERSION=4.1.4
|
11
11
|
Hoe.spec 'equationoftime' do
|
12
12
|
developer('Douglas Allen', 'kb9agt@gmail.com')
|
13
13
|
license('MIT')
|
14
|
-
self.version = '4.1.
|
14
|
+
self.version = '4.1.4'
|
15
15
|
self.readme_file = 'README.rdoc'
|
16
16
|
self.history_file = 'CHANGELOG.rdoc'
|
17
17
|
self.extra_rdoc_files = FileList['*.rdoc']
|
18
|
-
|
19
|
-
self.spec_extras = { :
|
18
|
+
extra_dev_deps << ['rake-compiler', '~> 0.9', '>= 0.9.3']
|
19
|
+
self.spec_extras = { extensions: ['ext/eot/extconf.rb'] }
|
20
20
|
|
21
21
|
Rake::ExtensionTask.new('eot', spec) do |ext|
|
22
22
|
ext.lib_dir = File.join('lib', 'eot')
|
@@ -25,23 +25,23 @@ end
|
|
25
25
|
|
26
26
|
Rake::Task[:test].prerequisites << :compile
|
27
27
|
|
28
|
-
task :
|
28
|
+
task default: [:test]
|
29
29
|
|
30
30
|
Rake::TestTask.new(:test) do |t|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
t.libs << 'test'
|
32
|
+
t.test_files = FileList['test/*_spec.rb']
|
33
|
+
t.verbose = true
|
34
|
+
t.options
|
35
35
|
end
|
36
36
|
|
37
37
|
RSpec::Core::RakeTask.new(:spec) do | t |
|
38
|
-
t.pattern =
|
38
|
+
t.pattern = './test/*_spec.rb'
|
39
39
|
t.rspec_opts = []
|
40
40
|
end
|
41
41
|
|
42
42
|
YARD::Rake::YardocTask.new(:yardoc) do |t|
|
43
43
|
t.files = ['lib/**/*.rb']
|
44
|
-
# puts t.methods
|
44
|
+
# puts t.methods
|
45
45
|
end
|
46
46
|
|
47
47
|
desc 'generate API documentation to rdocs/index.html'
|
@@ -50,90 +50,51 @@ Rake::RDocTask.new(:rdox) do |rd|
|
|
50
50
|
rd.rdoc_dir = 'rdocs'
|
51
51
|
|
52
52
|
rd.rdoc_files.include 'lib/**/*.rb', 'README.md', 'wiki.md'
|
53
|
-
|
53
|
+
|
54
54
|
rd.options << '--line-numbers'
|
55
|
-
|
56
|
-
end
|
57
55
|
|
58
|
-
=begin
|
59
|
-
require 'thor'
|
60
|
-
require 'bundler'
|
61
|
-
require 'rbconfig'
|
62
|
-
|
63
|
-
module Bundler
|
64
|
-
class GemHelper
|
65
|
-
def self.install_tasks(opts = nil)
|
66
|
-
|
67
|
-
# Determine the rakefile's location, don't use
|
68
|
-
# Rake.application.rakefile_location since it's buggy
|
69
|
-
# dir = File.dirname(Rake.application.rakefile_location)
|
70
|
-
|
71
|
-
rakefile_loc = nil
|
72
|
-
begin
|
73
|
-
fail
|
74
|
-
rescue RuntimeError => ex
|
75
|
-
on_win = RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
|
76
|
-
ex.backtrace.each do |frame|
|
77
|
-
if on_win
|
78
|
-
# Typically, on Windows Rake.application.rakefile is lowercase
|
79
|
-
# whereas the real file might not be, luckily case doesn't matter
|
80
|
-
frame = frame.downcase
|
81
|
-
end
|
82
|
-
m = /^((:?.+\/)#{Rake.application.rakefile}):\d+(:?:.+)?$/.match(frame)
|
83
|
-
if not m.nil?
|
84
|
-
rakefile_loc = m[1]
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
dir = File.dirname(rakefile_loc)
|
90
|
-
self.new(dir, opts && opts[:name]).install
|
91
|
-
end
|
92
|
-
end
|
93
56
|
end
|
94
|
-
=end
|
95
57
|
|
96
|
-
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#Rake::ExtensionTask.new
|
100
|
-
#
|
101
|
-
|
102
|
-
#end
|
58
|
+
# require 'rake/extensiontask'
|
59
|
+
# spec = Gem::Specification.load('equationoftime.gemspec')
|
60
|
+
# Rake::ExtensionTask.new('ceot', spec)
|
61
|
+
# Rake::ExtensionTask.new "ceot" do |ext|
|
62
|
+
# ext.lib_dir = "lib"
|
63
|
+
# end
|
103
64
|
|
104
65
|
# Rake::TestTask.new(:mine) do |t|
|
105
66
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
67
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/aliased_angles_spec.rb")
|
68
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/aliased_angles_spec.rb")
|
69
|
+
|
70
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/aliased_displays_spec.rb")
|
71
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/aliased_displays_spec.rb")
|
72
|
+
|
73
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/aliased_utilities_spec.rb")
|
74
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/aliased_utilities_spec.rb")
|
75
|
+
|
76
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/angles_spec.rb")
|
77
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/angles_spec.rb")
|
78
|
+
|
79
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/constants_spec.rb")
|
80
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/constants_spec.rb")
|
81
|
+
|
82
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/displays_spec.rb")
|
83
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/displays_spec.rb")
|
84
|
+
|
85
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/init_spec.rb")
|
86
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/init_spec.rb")
|
87
|
+
|
88
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/nutation_spec.rb")
|
89
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/nutation_spec.rb")
|
90
|
+
|
91
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/times_spec.rb")
|
92
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/times_spec.rb")
|
93
|
+
|
94
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/utilities_spec.rb")
|
95
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/utilities_spec.rb")
|
96
|
+
|
97
|
+
# Rake::Win32.rake_system("echo rspec ./tests/spec/vars_spec.rb")
|
98
|
+
# Rake::Win32.rake_system("rspec ./tests/spec/vars_spec.rb")
|
99
|
+
|
139
100
|
# end
|
data/equationoftime.gemspec
CHANGED
@@ -1,49 +1,48 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
lib = File.expand_path('
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'eot'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'eot/version.rb'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
# Metadata
|
9
|
+
spec.name = 'equationoftime'
|
10
|
+
spec.version = Eot::VERSION
|
11
|
+
spec.authors = ['DouglasAllen']
|
12
|
+
spec.email = ['kb9agt@gmail.com']
|
13
|
+
spec.summary = 'Equation of Time calculates time of solar transition.'
|
14
|
+
spec.description = 'Calculate Sunrise and Sunset. Uses native C wrappers.
|
15
|
+
Lots of examples to play with for learning.'
|
16
|
+
# spec.homepage = "http://equationoftime.herokuapp.com"
|
17
|
+
spec.homepage = 'https://github.com/DouglasAllen/equationoftime'
|
18
|
+
spec.license = 'MIT'
|
19
|
+
|
20
|
+
# Manifest
|
21
|
+
spec.files = Dir.glob('ext/**/*.{c,h,rb, so}') + Dir.glob('**') +
|
22
|
+
Dir.glob('lib/**/*.rb') + Dir.glob('.*')
|
23
|
+
# spec.files = `git ls-files -z`.split($/)#split("\x0")
|
24
|
+
spec.extensions << 'ext/eot/extconf.rb'
|
25
|
+
# spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
26
|
+
# spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
27
|
+
spec.require_paths = ['lib']
|
28
|
+
spec.platform = Gem::Platform::RUBY
|
29
|
+
# note: the last good build was with these development dependencies below
|
30
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
31
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
32
|
+
# spec. add_development_dependency 'rake-compiler', '~> 0.9.3'
|
33
|
+
# spec.add_development_dependency "hoe", "~> 3.12.0"
|
34
|
+
# spec.add_development_dependency "guard", "~> 2.6.1"
|
35
|
+
# spec.add_development_dependency "guard-minitest", "~> 2.3.2"
|
36
|
+
# spec.add_development_dependency "minitest", "~> 5.4.1"
|
37
|
+
# spec.add_development_dependency "ZenTest", "~> 4.10.1"
|
38
|
+
# spec.add_development_dependency "rspec", "~> 3.1.0"
|
39
|
+
# spec.add_development_dependency "yard", "~> 0.8.7.4"
|
40
|
+
# spec.add_development_dependency "rdoc", "~> 4.1.2"
|
41
|
+
spec.add_runtime_dependency 'addressable', '~> 2.3.6'
|
42
|
+
spec.add_runtime_dependency 'celes', '~> 0.0.1'
|
43
|
+
# spec.add_runtime_dependency "astro-algo"
|
44
|
+
# spec.add_runtime_dependency "multi_xml"
|
45
|
+
spec.add_runtime_dependency 'rest-client'
|
46
|
+
# spec.add_runtime_dependency "safe_yaml"
|
47
|
+
|
48
|
+
end
|
data/examples/my_lst.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'eot'
|
2
|
+
eot = Eot.new
|
3
|
+
puts 'My Local Apparent Sidereal Time'
|
4
|
+
loop do
|
5
|
+
eot.ajd = DateTime.now.to_time.utc.to_datetime.ajd
|
6
|
+
puts "LST = #{ eot.string_time(((eot.tl_aries * Eot::R2D) + -88.75) / 15.0) }"
|
7
|
+
dur = (1 - 0.0027379093499 / 1.002739093499) / 1.0027379093499
|
8
|
+
sleep dur
|
9
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'eot'
|
2
|
+
eot = Eot.new
|
3
|
+
geo = GeoLatLng.new
|
4
|
+
heredoc = <<HD
|
5
|
+
The default address is '#{eot.addr}' as a string.
|
6
|
+
It is concantenated to the GeoLatLng base address
|
7
|
+
Create an instance of GeoLatLng with new method
|
8
|
+
ex: geo = GeoLatLng.new
|
9
|
+
examine the base address geo.base_json
|
10
|
+
#{geo.base_json}
|
11
|
+
This is used to lookup your coordinates using Google
|
12
|
+
maps. Use geo.set_coordinates.
|
13
|
+
#{geo.set_coordinates}
|
14
|
+
Just change the address to any desired location.
|
15
|
+
Use comma or space seperated terms.
|
16
|
+
ex: "huston, tx"
|
17
|
+
#{geo.addr = 'huston, tx'}
|
18
|
+
#{geo.set_coordinates}
|
19
|
+
HD
|
20
|
+
puts heredoc
|
data/examples/use_ajd.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'eot'
|
2
|
+
eot = Eot.new
|
3
|
+
heredoc = <<HD
|
4
|
+
Setting the ajd sets a lot of other attributes.
|
5
|
+
All the angle calculations use this one setting.
|
6
|
+
ex: eot.ajd = 2451545.0
|
7
|
+
#{eot.ajd = 2_451_545.0}
|
8
|
+
You may get just about any value now from
|
9
|
+
various methods.
|
10
|
+
ex: eot.eot
|
11
|
+
#{eot.eot} radians
|
12
|
+
What day was that ajd?
|
13
|
+
eot.ajd_to_datetime(eot.ajd)
|
14
|
+
#{eot.ajd_to_datetime(eot.ajd)}
|
15
|
+
Sun apparent longitude.
|
16
|
+
eot.al_sun
|
17
|
+
#{eot.al_sun} radians
|
18
|
+
Try adding 80 days to the ajd
|
19
|
+
eot.ajd = 2451545.0 + 78
|
20
|
+
#{eot.ajd = 2_451_545.0 + 78}
|
21
|
+
#{eot.al_sun} radians
|
22
|
+
Almost a full circle in radians.
|
23
|
+
What day is that?
|
24
|
+
eot.ajd_to_datetime(eot.ajd)
|
25
|
+
#{eot.ajd_to_datetime(eot.ajd)}
|
26
|
+
That's near the Vernal Exquinox.
|
27
|
+
It nomally occurs 78 days after the Earth is
|
28
|
+
in perihelion of it's orbit around the Sun.
|
29
|
+
When does perihelion occur then?
|
30
|
+
A reasonable estimate is about the 3rd day of a new year.
|
31
|
+
eot.ajd = 2451545.0 + 2
|
32
|
+
#{eot.ajd = 2_451_545.0 + 2}
|
33
|
+
Now add the 78 days.
|
34
|
+
eot.ajd + 78
|
35
|
+
#{eot.ajd += 78}
|
36
|
+
#{eot.al_sun} radians
|
37
|
+
We completed the orbit plus a little extra.
|
38
|
+
It's just a rough estimate and is always changing.
|
39
|
+
HD
|
40
|
+
puts heredoc
|