equationoftime 4.1.6 → 4.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWNhMGU3ZGYzZWY3YjAxMzNmMTI5ZjY5YWQxY2VjNjRjNTc5ODRlMw==
4
+ YTNjYzYxZjhhMzRmNzQwYmU1MTFiNWQ1MTBiM2ZkYWQ0YTQ4M2QzOQ==
5
5
  data.tar.gz: !binary |-
6
- ZTIwMDE4ODE3NGYyNmMyZjFkOGIzMGFkZTY0MGRkNGUwMmUyY2IwMw==
6
+ ZGE4MmE5ZDQwMTVjZTM5NDVkZjhjMzU4Mjk1ODk2YzhiMmUxNDEwNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjZjMjU5NjBkMjcyMzRiYTcwM2FmYmI5ZGYwYjY2MzA0MmI3MjVjN2FhYzU3
10
- NzM2MjFjN2M3ZGNhNGQ2YWEwZmVlZTBiYzU3NTgwZDJhODg5NzA5ODUwZDhm
11
- Yzc4MjQzMDZmNWYzMGMzZWUwMmY4MjgyZjdjYmE2OWQ0OGY2MDc=
9
+ ODYyODg2MjBlOTFkMzY3YjNjYTZlY2E4MzE2MzNjN2E3ZGEzMTIzMTUwMTc2
10
+ ZjVjYjgxNDM2NDM2YzBlMGVjYWQ2MTQ5MGNhYTczZjg4ZmUwODFkMGM0Njlk
11
+ ZTViZjU1NTlhOWY1MzNhNGFiODFhYWNlMDFjZDM0NjlhMTI5NDI=
12
12
  data.tar.gz: !binary |-
13
- MjYxODJkODNhYzBjYjMyYjk2YzU2NzE3MzNhNzQ4NWY3NTc2Njk3NzFlN2Iz
14
- ZTZjZjZiNDY0MjNmYmExZTE0ZDg3OGRiNjcwYzA4YmEzOGVhNDRhMjFlZmU1
15
- MzYwYzQxMTA3MTlhNTM4ZGU2OGY4NTZiNDE0OWJhYzQzYWU5ODg=
13
+ NmNhZTc3MTM0NGI2ODVhNTQxMzNkZjk5NmJjZTg4MjA5YTcwODMwMzQ0Mjhk
14
+ MzNmMzk2MTdmMWJkZjhmZGU0MjY5NjA4ZTQ5YTczOWMzZTQxYzUwNzAzODMy
15
+ OWY3OWU2MjY2YTEwMGYyYjcxNTQ0NDJjZmEyZjc2Yzk2ODM2NTI=
data/.gitignore ADDED
@@ -0,0 +1,24 @@
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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- equationoftime (4.1.6)
4
+ equationoftime (4.1.7)
5
5
  addressable (~> 2.3.6)
6
6
  celes (~> 0.0.1)
7
7
  rest-client
data/Rakefile CHANGED
@@ -1,20 +1,42 @@
1
+ # -*- ruby -*-
2
+ require "rubygems"
1
3
  require 'bundler/gem_tasks'
2
4
  # require "bundler/install_tasks"
3
5
  require 'hoe'
6
+
4
7
  require 'rake/extensiontask'
5
8
  require 'rake/testtask'
6
9
  # require "rake/win32"
7
10
  require 'rdoc/task'
8
11
  require 'rspec/core/rake_task'
9
12
  require 'yard'
10
- # rake release VERSION=4.1.6
13
+
14
+ Hoe.plugins.delete :newb
15
+ # Hoe.plugins.delete :test
16
+ Hoe.plugins.delete :signing
17
+ Hoe.plugins.delete :publish
18
+ # Hoe.plugins.delete :clean
19
+ # Hoe.plugins.delete :package
20
+ Hoe.plugins.delete :compiler
21
+ Hoe.plugins.delete :debug
22
+ Hoe.plugins.delete :rcov
23
+ Hoe.plugins.delete :gemcutter
24
+ Hoe.plugins.delete :racc
25
+ Hoe.plugins.delete :inline
26
+ Hoe.plugins.delete :gem_prelude_sucks
27
+ Hoe.plugins.delete :flog
28
+ Hoe.plugins.delete :flay
29
+ Hoe.plugins.delete :deps
30
+ Hoe.plugins.delete :minitest
31
+ Hoe.plugins.delete :rdoc
32
+
11
33
  Hoe.spec 'equationoftime' do
12
34
  developer('Douglas Allen', 'kb9agt@gmail.com')
13
35
  license('MIT')
14
- #self.version = '4.1.6'
15
- self.readme_file = 'README.rdoc'
16
- self.history_file = 'CHANGELOG.rdoc'
17
- self.extra_rdoc_files = FileList['*.rdoc']
36
+
37
+ #self.readme_file = 'README.rdoc'
38
+ #self.history_file = 'CHANGELOG.rdoc'
39
+ #self.extra_rdoc_files = FileList[]
18
40
  extra_dev_deps << ['rake-compiler', '~> 0.9', '>= 0.9.3']
19
41
  self.spec_extras = { extensions: ['ext/eot/extconf.rb'] }
20
42
 
@@ -29,15 +51,15 @@ task default: [:test]
29
51
 
30
52
  Rake::TestTask.new(:test) do |t|
31
53
  t.libs << 'test'
32
- t.test_files = FileList['test/*_spec.rb']
54
+ t.test_files = FileList['test/eot/*_spec.rb']
33
55
  t.verbose = true
34
56
  t.options
35
57
  end
36
58
 
37
- RSpec::Core::RakeTask.new(:spec) do | t |
38
- t.pattern = './test/*_spec.rb'
39
- t.rspec_opts = []
40
- end
59
+ # RSpec::Core::RakeTask.new(:spec) do | t |
60
+ # t.pattern = './test/eot/*_spec.rb'
61
+ # t.rspec_opts = []
62
+ # end
41
63
 
42
64
  YARD::Rake::YardocTask.new(:yardoc) do |t|
43
65
  t.files = ['lib/**/*.rb']
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  # spec.files = `git ls-files -z`.split($/)#split("\x0")
24
24
  spec.extensions << 'ext/eot/extconf.rb'
25
25
  # spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
26
- # spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
26
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
27
27
  spec.require_paths = ['lib']
28
28
  spec.platform = Gem::Platform::RUBY
29
29
  # note: the last good build was with these development dependencies below
@@ -0,0 +1,24 @@
1
+ # class Eot file = delta_times.rb
2
+ # methods converting delta angles to time
3
+ class Eot
4
+ # From delta_times.rb:
5
+ # Uses @ajd attribute
6
+ # Returns Oblique component of EOT in decimal minutes time
7
+ def time_delta_oblique
8
+ delta_oblique * R2D * SM
9
+ end
10
+
11
+ # From delta_times.rb:
12
+ # Uses @ajd attribute
13
+ # Returns Orbit component of EOT in decimal minutes time
14
+ def time_delta_orbit
15
+ delta_orbit * R2D * SM
16
+ end
17
+
18
+ # From delta_times.rb:
19
+ # Uses @ajd attribute
20
+ # Returns EOT as a float for decimal minutes time
21
+ def time_eot
22
+ eot * R2D * SM
23
+ end
24
+ end
@@ -0,0 +1,73 @@
1
+ # class Eot file = jd_times.rb
2
+ # methods returning JD numbers
3
+ class Eot
4
+ # From jd_times.rb:
5
+ # Uses @ajd attribute
6
+ # Returns astronomical twilight end as a Julian Day Number
7
+ def astronomical_twilight_end_jd
8
+ local_noon_dt.ajd + ha_sun(4) / P2
9
+ end
10
+
11
+ # From jd_times.rb:
12
+ # Uses @ajd attribute
13
+ # Returns astronomical twilight start as a Julian Day Number
14
+ def astronomical_twilight_start_jd
15
+ local_noon_dt.ajd - ha_sun(4) / P2
16
+ end
17
+
18
+ # From jd_times.rb:
19
+ # Uses @ajd attribute
20
+ # Returns civil twilight end as a Julian Day Number
21
+ def civil_twilight_end_jd
22
+ local_noon_dt.ajd + ha_sun(2) / P2
23
+ end
24
+
25
+ # From jd_times.rb:
26
+ # Uses @ajd attribute
27
+ # Returns civil twilight start as a Julian Day Number
28
+ def civil_twilight_start_jd
29
+ local_noon_dt.ajd - ha_sun(2) / P2
30
+ end
31
+
32
+ # From jd_times.rb:
33
+ # Uses @ajd attribute
34
+ # Returns EOT as an AJD Julian number
35
+ def eot_jd
36
+ time_eot / DAY_MINUTES
37
+ end
38
+
39
+ # From jd_times.rb:
40
+ # Uses @ajd and @longitude attributes
41
+ # Returns DateTime object of local mean noon or solar transit
42
+ def mean_local_noon_jd
43
+ @ajd - @longitude / 360.0
44
+ end
45
+
46
+ # From jd_times.rb:
47
+ # Uses @ajd attribute
48
+ # Returns nautical twilight end as a Julian Day Number
49
+ def nautical_twilight_end_jd
50
+ local_noon_dt.ajd + ha_sun(3) / P2
51
+ end
52
+
53
+ # From jd_times.rb:
54
+ # Uses @ajd attribute
55
+ # Returns nautical twilight start as a Julian Day Number
56
+ def nautical_twilight_start_jd
57
+ local_noon_dt.ajd - ha_sun(3) / P2
58
+ end
59
+
60
+ # From jd_times.rb:
61
+ # Uses @ajd attribute
62
+ # Returns Sunrise as a Julian Day Number
63
+ def sunrise_jd
64
+ local_noon_dt.ajd - ha_sun(1) / P2
65
+ end
66
+
67
+ # From jd_times.rb:
68
+ # Uses @ajd attribute
69
+ # Returns Sunset as a Julian Day Number
70
+ def sunset_jd
71
+ local_noon_dt.ajd + ha_sun(1) / P2
72
+ end
73
+ end
data/lib/eot/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # contains gem version
3
3
  class Eot
4
4
  # current version
5
- VERSION = '4.1.6'
5
+ VERSION = '4.1.7'
6
6
  end
metadata CHANGED
@@ -1,87 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: equationoftime
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.6
4
+ version: 4.1.7
5
5
  platform: ruby
6
6
  authors:
7
- - Douglas Allen
7
+ - DouglasAllen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-08 00:00:00.000000000 Z
11
+ date: 2014-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rdoc
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '1.7'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake-compiler
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: !binary |-
34
- MC45
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: !binary |-
38
- MC45LjM=
33
+ version: '10.0'
39
34
  type: :development
40
35
  prerelease: false
41
36
  version_requirements: !ruby/object:Gem::Requirement
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
- version: !binary |-
46
- MC45
47
- - - ! '>='
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: addressable
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 2.3.6
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
48
53
  - !ruby/object:Gem::Version
49
- version: !binary |-
50
- MC45LjM=
54
+ version: 2.3.6
51
55
  - !ruby/object:Gem::Dependency
52
- name: hoe
56
+ name: celes
53
57
  requirement: !ruby/object:Gem::Requirement
54
58
  requirements:
55
59
  - - ~>
56
60
  - !ruby/object:Gem::Version
57
- version: '3.13'
58
- type: :development
61
+ version: 0.0.1
62
+ type: :runtime
59
63
  prerelease: false
60
64
  version_requirements: !ruby/object:Gem::Requirement
61
65
  requirements:
62
66
  - - ~>
63
67
  - !ruby/object:Gem::Version
64
- version: '3.13'
65
- description: ! 'Calculate Sunrise and Sunset. Now uses native C wrappers.
66
-
67
- Lots of examples to play with for learning about Eot.'
68
+ version: 0.0.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: rest-client
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: ! "Calculate Sunrise and Sunset. Uses native C wrappers.\n Use
84
+ the patch \"gem install eot\" to install it."
68
85
  email:
69
86
  - kb9agt@gmail.com
70
87
  executables: []
71
88
  extensions:
72
89
  - ext/eot/extconf.rb
73
- extra_rdoc_files:
74
- - CHANGELOG.rdoc
75
- - LICENSE.rdoc
76
- - LICENSE.txt
77
- - Manifest.txt
78
- - README.rdoc
79
- - wiki.md
80
- - wiki2.md
90
+ extra_rdoc_files: []
81
91
  files:
82
92
  - .autotest
83
93
  - .buildpath
84
- - .gemtest
94
+ - .gitignore
85
95
  - .minitest.rb
86
96
  - .project
87
97
  - .rspec
@@ -96,10 +106,6 @@ files:
96
106
  - README.rdoc
97
107
  - Rakefile
98
108
  - equationoftime.gemspec
99
- - examples/Equation_of_Time.png
100
- - examples/my_lst.rb
101
- - examples/use_addr.rb
102
- - examples/use_ajd.rb
103
109
  - ext/eot/ceot.c
104
110
  - ext/eot/ceot.h
105
111
  - ext/eot/eot.c
@@ -108,34 +114,25 @@ files:
108
114
  - lib/eot/angle_displays.rb
109
115
  - lib/eot/angles.rb
110
116
  - lib/eot/constants.rb
117
+ - lib/eot/delta_times.rb
111
118
  - lib/eot/deltas.rb
112
119
  - lib/eot/geo_lat_lng_smt.rb
113
120
  - lib/eot/init.rb
121
+ - lib/eot/jd_times.rb
114
122
  - lib/eot/time_displays.rb
115
123
  - lib/eot/times.rb
116
124
  - lib/eot/trigonometric.rb
117
125
  - lib/eot/utilities.rb
118
126
  - lib/eot/version.rb
119
127
  - run_tests_eclipse.rb
120
- - test/eot/aliased_angles_spec.rb
121
- - test/eot/aliased_displays_spec.rb
122
- - test/eot/aliased_utilities_spec.rb
123
- - test/eot/angles_spec.rb
124
- - test/eot/constants_spec.rb
125
- - test/eot/displays_spec.rb
126
- - test/eot/geo_spec.rb
127
- - test/eot/init_spec.rb
128
- - test/eot/times_spec.rb
129
128
  - wiki.md
130
129
  - wiki2.md
131
- homepage: http://equationoftime.herokuapp.com/
130
+ homepage: https://github.com/DouglasAllen/equationoftime
132
131
  licenses:
133
132
  - MIT
134
133
  metadata: {}
135
134
  post_install_message:
136
- rdoc_options:
137
- - --main
138
- - README.rdoc
135
+ rdoc_options: []
139
136
  require_paths:
140
137
  - lib
141
138
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -153,14 +150,6 @@ rubyforge_project:
153
150
  rubygems_version: 2.4.2
154
151
  signing_key:
155
152
  specification_version: 4
156
- summary: Calculate Sunrise and Sunset
157
- test_files:
158
- - test/eot/displays_spec.rb
159
- - test/eot/times_spec.rb
160
- - test/eot/geo_spec.rb
161
- - test/eot/angles_spec.rb
162
- - test/eot/aliased_angles_spec.rb
163
- - test/eot/aliased_displays_spec.rb
164
- - test/eot/init_spec.rb
165
- - test/eot/constants_spec.rb
166
- - test/eot/aliased_utilities_spec.rb
153
+ summary: Equation of Time calculates time of solar transition.
154
+ test_files: []
155
+ has_rdoc:
data/.gemtest DELETED
File without changes
Binary file
data/examples/my_lst.rb DELETED
@@ -1,11 +0,0 @@
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
- gst = eot.string_deg_to_time(eot.tl_aries - -88.75 * Eot::D2R)
7
- era = eot.string_deg_to_time(eot.era - -88.75 * Eot::D2R)
8
- puts "LST gst #{gst} LST era #{era}"
9
- # the number is syncing my machine. machine may vary in this.
10
- sleep 0.99613381875
11
- end
data/examples/use_addr.rb DELETED
@@ -1,20 +0,0 @@
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 DELETED
@@ -1,40 +0,0 @@
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