solunar 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/DST_Files/Test.txt +11 -0
- data/data/DST_Files/USA.txt +11 -0
- data/data/Data_Files/Test.bin +0 -0
- data/data/Data_Files/USA.bin +0 -0
- data/data/Source_Files/Moon.txt +4019 -0
- data/data/Source_Files/Phase.TXT +545 -0
- data/data/Source_Files/Sun.txt +3729 -0
- data/data/Source_Files/ilum_2016.txt +31 -0
- data/data/Source_Files/ilum_2017.txt +31 -0
- data/data/Source_Files/ilum_2018.txt +32 -0
- data/data/Source_Files/ilum_2019.txt +31 -0
- data/data/Source_Files/ilum_2020.txt +31 -0
- data/data/Source_Files/ilum_2021.txt +31 -0
- data/data/Source_Files/ilum_2022.txt +31 -0
- data/data/Source_Files/ilum_2023.txt +31 -0
- data/data/Source_Files/ilum_2024.txt +31 -0
- data/data/Source_Files/ilum_2025.txt +31 -0
- data/data/Source_Files/ilum_2026.txt +32 -0
- data/ext/solunar/solunar.c +33 -31
- data/lib/solunar.rb +7 -4
- metadata +23 -5
data/lib/solunar.rb
CHANGED
@@ -1,21 +1,24 @@
|
|
1
1
|
class Solunar
|
2
2
|
|
3
|
-
|
3
|
+
NAME = "solunar"
|
4
|
+
VERSION = '0.0.4'
|
4
5
|
def version
|
5
|
-
"0.0.
|
6
|
+
"0.0.4"
|
6
7
|
end
|
7
8
|
|
8
9
|
def test
|
9
|
-
get_data("2017-05-01",
|
10
|
+
get_data("2017-05-01",10,29.2108,-81.0228,-5,1,0)
|
10
11
|
end
|
11
12
|
|
12
13
|
def get_data(date,count,lat,lon,tz_offset_hours,dst_offset_hours,military_time)
|
13
14
|
forecast = Array.new
|
14
|
-
|
15
|
+
dir = "#{Gem.dir}/gems/#{Solunar::NAME}-#{Solunar::VERSION}/data/"
|
16
|
+
res = generate(date,count,lat,lon,(tz_offset_hours*-60.0).to_i,(dst_offset_hours*60.0).to_i,military_time,dir)
|
15
17
|
#Most data comes from the "generate" function, which lives in solunar.c
|
16
18
|
#Major feed times are currently defined as two hours starting at the moon underfoot and moon transit
|
17
19
|
#Minor feed times are one hour after moon rise and moon set
|
18
20
|
res.split(";").each do |line|
|
21
|
+
next unless line.split(",").length > 7
|
19
22
|
puts line
|
20
23
|
segments = line.split(",")
|
21
24
|
day = Hash.new
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solunar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- "\"Sullivan
|
8
|
-
- Nathan","Dawson
|
7
|
+
- "\"Sullivan"
|
8
|
+
- Nathan","Dawson
|
9
9
|
- Rick"
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-10-
|
13
|
+
date: 2016-10-28 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: A gem that wraps the C code from Rick Dawson that computes the sun and
|
16
16
|
moon times based on date and coordinates. Takes a series of arguments, and returns
|
@@ -22,6 +22,24 @@ extensions:
|
|
22
22
|
- ext/solunar/extconf.rb
|
23
23
|
extra_rdoc_files: []
|
24
24
|
files:
|
25
|
+
- data/DST_Files/Test.txt
|
26
|
+
- data/DST_Files/USA.txt
|
27
|
+
- data/Data_Files/Test.bin
|
28
|
+
- data/Data_Files/USA.bin
|
29
|
+
- data/Source_Files/Moon.txt
|
30
|
+
- data/Source_Files/Phase.TXT
|
31
|
+
- data/Source_Files/Sun.txt
|
32
|
+
- data/Source_Files/ilum_2016.txt
|
33
|
+
- data/Source_Files/ilum_2017.txt
|
34
|
+
- data/Source_Files/ilum_2018.txt
|
35
|
+
- data/Source_Files/ilum_2019.txt
|
36
|
+
- data/Source_Files/ilum_2020.txt
|
37
|
+
- data/Source_Files/ilum_2021.txt
|
38
|
+
- data/Source_Files/ilum_2022.txt
|
39
|
+
- data/Source_Files/ilum_2023.txt
|
40
|
+
- data/Source_Files/ilum_2024.txt
|
41
|
+
- data/Source_Files/ilum_2025.txt
|
42
|
+
- data/Source_Files/ilum_2026.txt
|
25
43
|
- ext/solunar/DST_Files/Test.txt
|
26
44
|
- ext/solunar/DST_Files/USA.txt
|
27
45
|
- ext/solunar/Data_Files/Test.bin
|
@@ -64,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
82
|
version: '0'
|
65
83
|
requirements: []
|
66
84
|
rubyforge_project:
|
67
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.5.1
|
68
86
|
signing_key:
|
69
87
|
specification_version: 4
|
70
88
|
summary: Solunar Forecasting Gem
|