astronoby 0.6.0 → 0.8.0
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/.ruby-version +1 -0
- data/.standard.yml +1 -0
- data/CHANGELOG.md +203 -3
- data/README.md +69 -288
- data/UPGRADING.md +267 -0
- data/docs/README.md +196 -0
- data/docs/angles.md +137 -0
- data/docs/celestial_bodies.md +107 -0
- data/docs/configuration.md +98 -0
- data/docs/coordinates.md +167 -0
- data/docs/ephem.md +85 -0
- data/docs/equinoxes_solstices_times.md +31 -0
- data/docs/glossary.md +152 -0
- data/docs/instant.md +139 -0
- data/docs/moon_phases.md +79 -0
- data/docs/observer.md +65 -0
- data/docs/reference_frames.md +138 -0
- data/docs/rise_transit_set_times.md +119 -0
- data/docs/twilight_times.md +123 -0
- data/lib/astronoby/aberration.rb +56 -31
- data/lib/astronoby/angle.rb +20 -16
- data/lib/astronoby/angles/dms.rb +2 -2
- data/lib/astronoby/angles/hms.rb +2 -2
- data/lib/astronoby/bodies/earth.rb +62 -0
- data/lib/astronoby/bodies/jupiter.rb +28 -0
- data/lib/astronoby/bodies/mars.rb +28 -0
- data/lib/astronoby/bodies/mercury.rb +32 -0
- data/lib/astronoby/bodies/moon.rb +51 -298
- data/lib/astronoby/bodies/neptune.rb +32 -0
- data/lib/astronoby/bodies/saturn.rb +37 -0
- data/lib/astronoby/bodies/solar_system_body.rb +232 -0
- data/lib/astronoby/bodies/sun.rb +33 -214
- data/lib/astronoby/bodies/uranus.rb +16 -0
- data/lib/astronoby/bodies/venus.rb +36 -0
- data/lib/astronoby/cache.rb +188 -0
- data/lib/astronoby/configuration.rb +92 -0
- data/lib/astronoby/constants.rb +17 -2
- data/lib/astronoby/constellation.rb +12 -0
- data/lib/astronoby/constellations/data.rb +42 -0
- data/lib/astronoby/constellations/finder.rb +35 -0
- data/lib/astronoby/constellations/repository.rb +20 -0
- data/lib/astronoby/coordinates/ecliptic.rb +2 -37
- data/lib/astronoby/coordinates/equatorial.rb +28 -10
- data/lib/astronoby/coordinates/horizontal.rb +0 -46
- data/lib/astronoby/corrections/light_time_delay.rb +90 -0
- data/lib/astronoby/data/constellations/constellation_names.dat +88 -0
- data/lib/astronoby/data/constellations/indexed_abbreviations.dat +88 -0
- data/lib/astronoby/data/constellations/radec_to_index.dat +238 -0
- data/lib/astronoby/data/constellations/sorted_declinations.dat +202 -0
- data/lib/astronoby/data/constellations/sorted_right_ascensions.dat +237 -0
- data/lib/astronoby/deflection.rb +187 -0
- data/lib/astronoby/distance.rb +9 -0
- data/lib/astronoby/ephem.rb +39 -0
- data/lib/astronoby/equinox_solstice.rb +22 -19
- data/lib/astronoby/errors.rb +4 -0
- data/lib/astronoby/events/moon_phases.rb +15 -13
- data/lib/astronoby/events/rise_transit_set_calculator.rb +376 -0
- data/lib/astronoby/events/rise_transit_set_event.rb +13 -0
- data/lib/astronoby/events/rise_transit_set_events.rb +13 -0
- data/lib/astronoby/events/twilight_calculator.rb +221 -0
- data/lib/astronoby/events/twilight_event.rb +28 -0
- data/lib/astronoby/events/twilight_events.rb +22 -115
- data/lib/astronoby/instant.rb +176 -0
- data/lib/astronoby/julian_date.rb +78 -0
- data/lib/astronoby/mean_obliquity.rb +24 -13
- data/lib/astronoby/nutation.rb +235 -42
- data/lib/astronoby/observer.rb +55 -0
- data/lib/astronoby/precession.rb +102 -18
- data/lib/astronoby/reference_frame.rb +50 -0
- data/lib/astronoby/reference_frames/apparent.rb +60 -0
- data/lib/astronoby/reference_frames/astrometric.rb +21 -0
- data/lib/astronoby/reference_frames/geometric.rb +20 -0
- data/lib/astronoby/reference_frames/mean_of_date.rb +38 -0
- data/lib/astronoby/reference_frames/topocentric.rb +72 -0
- data/lib/astronoby/time/greenwich_sidereal_time.rb +2 -2
- data/lib/astronoby/true_obliquity.rb +3 -3
- data/lib/astronoby/util/maths.rb +70 -73
- data/lib/astronoby/util/time.rb +455 -32
- data/lib/astronoby/vector.rb +36 -0
- data/lib/astronoby/velocity.rb +116 -0
- data/lib/astronoby/version.rb +1 -1
- data/lib/astronoby.rb +33 -5
- metadata +117 -24
- data/.tool-versions +0 -1
- data/Gemfile +0 -5
- data/Gemfile.lock +0 -80
- data/benchmark/README.md +0 -131
- data/benchmark/benchmark.rb +0 -259
- data/benchmark/data/imcce.csv.zip +0 -0
- data/benchmark/data/sun_calc.csv.zip +0 -0
- data/lib/astronoby/astronomical_models/ephemeride_lunaire_parisienne.rb +0 -143
- data/lib/astronoby/epoch.rb +0 -22
- data/lib/astronoby/events/observation_events.rb +0 -285
- data/lib/astronoby/events/rise_transit_set_iteration.rb +0 -218
- data/lib/astronoby/util/astrodynamics.rb +0 -60
data/lib/astronoby.rb
CHANGED
@@ -1,35 +1,63 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "astronoby/cache"
|
4
|
+
require "astronoby/configuration"
|
3
5
|
require "astronoby/constants"
|
4
6
|
require "astronoby/angle"
|
5
7
|
require "astronoby/angles/dms"
|
6
8
|
require "astronoby/angles/hms"
|
9
|
+
require "astronoby/constellation"
|
10
|
+
require "astronoby/constellations/repository"
|
11
|
+
require "astronoby/constellations/data"
|
12
|
+
require "astronoby/constellations/finder"
|
7
13
|
require "astronoby/distance"
|
8
|
-
require "astronoby/
|
9
|
-
require "astronoby/
|
14
|
+
require "astronoby/ephem"
|
15
|
+
require "astronoby/julian_date"
|
16
|
+
require "astronoby/instant"
|
17
|
+
require "astronoby/vector"
|
18
|
+
require "astronoby/velocity"
|
10
19
|
require "astronoby/astronomical_models/moon_phases_periodic_terms"
|
20
|
+
require "astronoby/bodies/solar_system_body"
|
11
21
|
require "astronoby/bodies/moon"
|
12
22
|
require "astronoby/bodies/sun"
|
23
|
+
require "astronoby/bodies/mercury"
|
24
|
+
require "astronoby/bodies/venus"
|
25
|
+
require "astronoby/bodies/earth"
|
26
|
+
require "astronoby/bodies/mars"
|
27
|
+
require "astronoby/bodies/jupiter"
|
28
|
+
require "astronoby/bodies/saturn"
|
29
|
+
require "astronoby/bodies/uranus"
|
30
|
+
require "astronoby/bodies/neptune"
|
13
31
|
require "astronoby/coordinates/ecliptic"
|
14
32
|
require "astronoby/coordinates/equatorial"
|
15
33
|
require "astronoby/coordinates/horizontal"
|
34
|
+
require "astronoby/corrections/light_time_delay"
|
16
35
|
require "astronoby/aberration"
|
36
|
+
require "astronoby/deflection"
|
17
37
|
require "astronoby/equinox_solstice"
|
18
38
|
require "astronoby/errors"
|
19
39
|
require "astronoby/events/moon_phases"
|
20
|
-
require "astronoby/events/
|
21
|
-
require "astronoby/events/
|
40
|
+
require "astronoby/events/rise_transit_set_event"
|
41
|
+
require "astronoby/events/rise_transit_set_events"
|
42
|
+
require "astronoby/events/rise_transit_set_calculator"
|
43
|
+
require "astronoby/events/twilight_event"
|
22
44
|
require "astronoby/events/twilight_events"
|
45
|
+
require "astronoby/events/twilight_calculator"
|
23
46
|
require "astronoby/geocentric_parallax"
|
24
47
|
require "astronoby/mean_obliquity"
|
25
48
|
require "astronoby/moon_phase"
|
26
49
|
require "astronoby/nutation"
|
27
50
|
require "astronoby/observer"
|
28
51
|
require "astronoby/precession"
|
52
|
+
require "astronoby/reference_frame"
|
53
|
+
require "astronoby/reference_frames/geometric"
|
54
|
+
require "astronoby/reference_frames/astrometric"
|
55
|
+
require "astronoby/reference_frames/mean_of_date"
|
56
|
+
require "astronoby/reference_frames/apparent"
|
57
|
+
require "astronoby/reference_frames/topocentric"
|
29
58
|
require "astronoby/refraction"
|
30
59
|
require "astronoby/time/greenwich_sidereal_time"
|
31
60
|
require "astronoby/time/local_sidereal_time"
|
32
|
-
require "astronoby/util/astrodynamics"
|
33
61
|
require "astronoby/util/maths"
|
34
62
|
require "astronoby/util/time"
|
35
63
|
require "astronoby/util/trigonometry"
|
metadata
CHANGED
@@ -1,15 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: astronoby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rémy Hannequin
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: ephem
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0.3'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - "~>"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0.3'
|
13
26
|
- !ruby/object:Gem::Dependency
|
14
27
|
name: matrix
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,6 +37,34 @@ dependencies:
|
|
24
37
|
- - "~>"
|
25
38
|
- !ruby/object:Gem::Version
|
26
39
|
version: 0.4.2
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: benchmark
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.4'
|
47
|
+
type: :development
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.4'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: irb
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.14'
|
61
|
+
type: :development
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.14'
|
27
68
|
- !ruby/object:Gem::Dependency
|
28
69
|
name: rake
|
29
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +99,28 @@ dependencies:
|
|
58
99
|
requirements:
|
59
100
|
- - "~>"
|
60
101
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
102
|
+
version: '3.0'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3.0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: simplecov
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0.22'
|
62
117
|
type: :development
|
63
118
|
prerelease: false
|
64
119
|
version_requirements: !ruby/object:Gem::Requirement
|
65
120
|
requirements:
|
66
121
|
- - "~>"
|
67
122
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
123
|
+
version: '0.22'
|
69
124
|
- !ruby/object:Gem::Dependency
|
70
125
|
name: standard
|
71
126
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,65 +135,105 @@ dependencies:
|
|
80
135
|
- - "~>"
|
81
136
|
- !ruby/object:Gem::Version
|
82
137
|
version: '1.3'
|
83
|
-
description:
|
84
|
-
by J. L. Lawrence, Practical Astronomy with your Calculator or Spreadsheet by Peter
|
85
|
-
Duffett-Smith and Jonathan Zwart, or Astronomical Algorithms by Jean Meeus
|
138
|
+
description: Astronomy and astrometry Ruby library for astronomical data and events.
|
86
139
|
email:
|
87
|
-
-
|
140
|
+
- remy.hannequin@gmail.com
|
88
141
|
executables: []
|
89
142
|
extensions: []
|
90
143
|
extra_rdoc_files: []
|
91
144
|
files:
|
92
145
|
- ".rspec"
|
93
|
-
- ".
|
146
|
+
- ".ruby-version"
|
147
|
+
- ".standard.yml"
|
94
148
|
- CHANGELOG.md
|
95
149
|
- CODE_OF_CONDUCT.md
|
96
150
|
- CONTRIBUTING.md
|
97
|
-
- Gemfile
|
98
|
-
- Gemfile.lock
|
99
151
|
- LICENSE.txt
|
100
152
|
- README.md
|
101
153
|
- Rakefile
|
102
154
|
- UPGRADING.md
|
103
|
-
-
|
104
|
-
-
|
105
|
-
-
|
106
|
-
-
|
155
|
+
- docs/README.md
|
156
|
+
- docs/angles.md
|
157
|
+
- docs/celestial_bodies.md
|
158
|
+
- docs/configuration.md
|
159
|
+
- docs/coordinates.md
|
160
|
+
- docs/ephem.md
|
161
|
+
- docs/equinoxes_solstices_times.md
|
162
|
+
- docs/glossary.md
|
163
|
+
- docs/instant.md
|
164
|
+
- docs/moon_phases.md
|
165
|
+
- docs/observer.md
|
166
|
+
- docs/reference_frames.md
|
167
|
+
- docs/rise_transit_set_times.md
|
168
|
+
- docs/twilight_times.md
|
107
169
|
- lib/astronoby.rb
|
108
170
|
- lib/astronoby/aberration.rb
|
109
171
|
- lib/astronoby/angle.rb
|
110
172
|
- lib/astronoby/angles/dms.rb
|
111
173
|
- lib/astronoby/angles/hms.rb
|
112
|
-
- lib/astronoby/astronomical_models/ephemeride_lunaire_parisienne.rb
|
113
174
|
- lib/astronoby/astronomical_models/moon_phases_periodic_terms.rb
|
175
|
+
- lib/astronoby/bodies/earth.rb
|
176
|
+
- lib/astronoby/bodies/jupiter.rb
|
177
|
+
- lib/astronoby/bodies/mars.rb
|
178
|
+
- lib/astronoby/bodies/mercury.rb
|
114
179
|
- lib/astronoby/bodies/moon.rb
|
180
|
+
- lib/astronoby/bodies/neptune.rb
|
181
|
+
- lib/astronoby/bodies/saturn.rb
|
182
|
+
- lib/astronoby/bodies/solar_system_body.rb
|
115
183
|
- lib/astronoby/bodies/sun.rb
|
184
|
+
- lib/astronoby/bodies/uranus.rb
|
185
|
+
- lib/astronoby/bodies/venus.rb
|
186
|
+
- lib/astronoby/cache.rb
|
187
|
+
- lib/astronoby/configuration.rb
|
116
188
|
- lib/astronoby/constants.rb
|
189
|
+
- lib/astronoby/constellation.rb
|
190
|
+
- lib/astronoby/constellations/data.rb
|
191
|
+
- lib/astronoby/constellations/finder.rb
|
192
|
+
- lib/astronoby/constellations/repository.rb
|
117
193
|
- lib/astronoby/coordinates/ecliptic.rb
|
118
194
|
- lib/astronoby/coordinates/equatorial.rb
|
119
195
|
- lib/astronoby/coordinates/horizontal.rb
|
196
|
+
- lib/astronoby/corrections/light_time_delay.rb
|
197
|
+
- lib/astronoby/data/constellations/constellation_names.dat
|
198
|
+
- lib/astronoby/data/constellations/indexed_abbreviations.dat
|
199
|
+
- lib/astronoby/data/constellations/radec_to_index.dat
|
200
|
+
- lib/astronoby/data/constellations/sorted_declinations.dat
|
201
|
+
- lib/astronoby/data/constellations/sorted_right_ascensions.dat
|
202
|
+
- lib/astronoby/deflection.rb
|
120
203
|
- lib/astronoby/distance.rb
|
121
|
-
- lib/astronoby/
|
204
|
+
- lib/astronoby/ephem.rb
|
122
205
|
- lib/astronoby/equinox_solstice.rb
|
123
206
|
- lib/astronoby/errors.rb
|
124
207
|
- lib/astronoby/events/moon_phases.rb
|
125
|
-
- lib/astronoby/events/
|
126
|
-
- lib/astronoby/events/
|
208
|
+
- lib/astronoby/events/rise_transit_set_calculator.rb
|
209
|
+
- lib/astronoby/events/rise_transit_set_event.rb
|
210
|
+
- lib/astronoby/events/rise_transit_set_events.rb
|
211
|
+
- lib/astronoby/events/twilight_calculator.rb
|
212
|
+
- lib/astronoby/events/twilight_event.rb
|
127
213
|
- lib/astronoby/events/twilight_events.rb
|
128
214
|
- lib/astronoby/geocentric_parallax.rb
|
215
|
+
- lib/astronoby/instant.rb
|
216
|
+
- lib/astronoby/julian_date.rb
|
129
217
|
- lib/astronoby/mean_obliquity.rb
|
130
218
|
- lib/astronoby/moon_phase.rb
|
131
219
|
- lib/astronoby/nutation.rb
|
132
220
|
- lib/astronoby/observer.rb
|
133
221
|
- lib/astronoby/precession.rb
|
222
|
+
- lib/astronoby/reference_frame.rb
|
223
|
+
- lib/astronoby/reference_frames/apparent.rb
|
224
|
+
- lib/astronoby/reference_frames/astrometric.rb
|
225
|
+
- lib/astronoby/reference_frames/geometric.rb
|
226
|
+
- lib/astronoby/reference_frames/mean_of_date.rb
|
227
|
+
- lib/astronoby/reference_frames/topocentric.rb
|
134
228
|
- lib/astronoby/refraction.rb
|
135
229
|
- lib/astronoby/time/greenwich_sidereal_time.rb
|
136
230
|
- lib/astronoby/time/local_sidereal_time.rb
|
137
231
|
- lib/astronoby/true_obliquity.rb
|
138
|
-
- lib/astronoby/util/astrodynamics.rb
|
139
232
|
- lib/astronoby/util/maths.rb
|
140
233
|
- lib/astronoby/util/time.rb
|
141
234
|
- lib/astronoby/util/trigonometry.rb
|
235
|
+
- lib/astronoby/vector.rb
|
236
|
+
- lib/astronoby/velocity.rb
|
142
237
|
- lib/astronoby/version.rb
|
143
238
|
homepage: https://github.com/rhannequin/astronoby
|
144
239
|
licenses:
|
@@ -147,7 +242,6 @@ metadata:
|
|
147
242
|
homepage_uri: https://github.com/rhannequin/astronoby
|
148
243
|
source_code_uri: https://github.com/rhannequin/astronoby
|
149
244
|
changelog_uri: https://github.com/rhannequin/astronoby/blob/main/CHANGELOG.md
|
150
|
-
post_install_message:
|
151
245
|
rdoc_options: []
|
152
246
|
require_paths:
|
153
247
|
- lib
|
@@ -162,8 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
256
|
- !ruby/object:Gem::Version
|
163
257
|
version: '0'
|
164
258
|
requirements: []
|
165
|
-
rubygems_version: 3.
|
166
|
-
signing_key:
|
259
|
+
rubygems_version: 3.7.1
|
167
260
|
specification_version: 4
|
168
261
|
summary: Astronomical calculations
|
169
262
|
test_files: []
|
data/.tool-versions
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby 3.2.2
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
astronoby (0.6.0)
|
5
|
-
matrix (~> 0.4.2)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
ast (2.4.2)
|
11
|
-
diff-lcs (1.5.1)
|
12
|
-
json (2.9.0)
|
13
|
-
language_server-protocol (3.17.0.3)
|
14
|
-
lint_roller (1.1.0)
|
15
|
-
matrix (0.4.2)
|
16
|
-
parallel (1.26.3)
|
17
|
-
parser (3.3.6.0)
|
18
|
-
ast (~> 2.4.1)
|
19
|
-
racc
|
20
|
-
racc (1.8.1)
|
21
|
-
rainbow (3.1.1)
|
22
|
-
rake (13.2.1)
|
23
|
-
regexp_parser (2.9.3)
|
24
|
-
rspec (3.13.0)
|
25
|
-
rspec-core (~> 3.13.0)
|
26
|
-
rspec-expectations (~> 3.13.0)
|
27
|
-
rspec-mocks (~> 3.13.0)
|
28
|
-
rspec-core (3.13.2)
|
29
|
-
rspec-support (~> 3.13.0)
|
30
|
-
rspec-expectations (3.13.3)
|
31
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
-
rspec-support (~> 3.13.0)
|
33
|
-
rspec-mocks (3.13.2)
|
34
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
-
rspec-support (~> 3.13.0)
|
36
|
-
rspec-support (3.13.2)
|
37
|
-
rubocop (1.68.0)
|
38
|
-
json (~> 2.3)
|
39
|
-
language_server-protocol (>= 3.17.0)
|
40
|
-
parallel (~> 1.10)
|
41
|
-
parser (>= 3.3.0.2)
|
42
|
-
rainbow (>= 2.2.2, < 4.0)
|
43
|
-
regexp_parser (>= 2.4, < 3.0)
|
44
|
-
rubocop-ast (>= 1.32.2, < 2.0)
|
45
|
-
ruby-progressbar (~> 1.7)
|
46
|
-
unicode-display_width (>= 2.4.0, < 3.0)
|
47
|
-
rubocop-ast (1.36.2)
|
48
|
-
parser (>= 3.3.1.0)
|
49
|
-
rubocop-performance (1.22.1)
|
50
|
-
rubocop (>= 1.48.1, < 2.0)
|
51
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
52
|
-
ruby-progressbar (1.13.0)
|
53
|
-
rubyzip (2.3.2)
|
54
|
-
standard (1.42.1)
|
55
|
-
language_server-protocol (~> 3.17.0.2)
|
56
|
-
lint_roller (~> 1.0)
|
57
|
-
rubocop (~> 1.68.0)
|
58
|
-
standard-custom (~> 1.0.0)
|
59
|
-
standard-performance (~> 1.5)
|
60
|
-
standard-custom (1.0.2)
|
61
|
-
lint_roller (~> 1.0)
|
62
|
-
rubocop (~> 1.50)
|
63
|
-
standard-performance (1.5.0)
|
64
|
-
lint_roller (~> 1.1)
|
65
|
-
rubocop-performance (~> 1.22.0)
|
66
|
-
unicode-display_width (2.6.0)
|
67
|
-
|
68
|
-
PLATFORMS
|
69
|
-
ruby
|
70
|
-
x86_64-linux
|
71
|
-
|
72
|
-
DEPENDENCIES
|
73
|
-
astronoby!
|
74
|
-
rake (~> 13.0)
|
75
|
-
rspec (~> 3.0)
|
76
|
-
rubyzip (~> 2.3)
|
77
|
-
standard (~> 1.3)
|
78
|
-
|
79
|
-
BUNDLED WITH
|
80
|
-
2.5.7
|
data/benchmark/README.md
DELETED
@@ -1,131 +0,0 @@
|
|
1
|
-
# Benchmark
|
2
|
-
|
3
|
-
This is a first attempt to benchmark the accuracy of the library. It is not
|
4
|
-
very scientific, but it gives a rough idea.
|
5
|
-
|
6
|
-
## Method
|
7
|
-
|
8
|
-
The goal is to answer these two questions:
|
9
|
-
- Is the library accurate enough compared to a source of truth?
|
10
|
-
- Is the library accurate enough compared with other Ruby libraries?
|
11
|
-
|
12
|
-
The source of truth is the <abbr title="Institut de Mécanique
|
13
|
-
Céleste et de Calcul des Éphémérides">IMCCE</abbr>, a French public
|
14
|
-
institude attached to the Paris Observatory. Their ephemerides are used by
|
15
|
-
governements and public institutions in multiple European countries, their
|
16
|
-
precesion is among the highest in the world.
|
17
|
-
They also provide web services to easily access all their data. Many thanks
|
18
|
-
for providing such high accuracy data for free.
|
19
|
-
|
20
|
-
The other Ruby library is [sun_calc](https://github.com/fishbrain/sun_calc).
|
21
|
-
|
22
|
-
474,336 combinations of dates, latitudes and longitudes have been used to
|
23
|
-
produce time predictions for the following events:
|
24
|
-
- sunrise
|
25
|
-
- sun's highest point
|
26
|
-
- sunset
|
27
|
-
- moonrise
|
28
|
-
- moon's highest point
|
29
|
-
- moonset
|
30
|
-
|
31
|
-
For each combination, we first find out which of SunCalc or Astronoby is the
|
32
|
-
closest to the IMCCE. Then we calculate the difference between Astronoby and
|
33
|
-
the IMCCE, to discover if the difference is larger than the defined
|
34
|
-
threshold of 5 minutes.
|
35
|
-
|
36
|
-
## Results
|
37
|
-
|
38
|
-
The following output has been generated using what will be part of version 0.6.
|
39
|
-
|
40
|
-
```
|
41
|
-
Unarchiving sun_calc.csv.zip...
|
42
|
-
Done unarchiving sun_calc.csv.zip.
|
43
|
-
Parsing sun_calc.csv...
|
44
|
-
Done parsing sun_calc.csv.
|
45
|
-
Unarchiving imcce.csv.zip...
|
46
|
-
Done unarchiving imcce.csv.zip.
|
47
|
-
Parsing imcce.csv...
|
48
|
-
Done parsing imcce.csv.
|
49
|
-
Comparing data...
|
50
|
-
2024-01-01: Done.
|
51
|
-
2024-01-02: Done.
|
52
|
-
...
|
53
|
-
2024-12-30: Done.
|
54
|
-
2024-12-31: Done.
|
55
|
-
Done comparing data.
|
56
|
-
|
57
|
-
|
58
|
-
Sun rising time:
|
59
|
-
astronoby: 295395 (62.28%)
|
60
|
-
sun_calc: 99710 (21.02%)
|
61
|
-
n/a: 79231 (16.7%)
|
62
|
-
|
63
|
-
Sun transit time:
|
64
|
-
astronoby: 434495 (91.6%)
|
65
|
-
sun_calc: 39769 (8.38%)
|
66
|
-
n/a: 72 (0.02%)
|
67
|
-
|
68
|
-
Sun setting time:
|
69
|
-
astronoby: 358428 (75.56%)
|
70
|
-
n/a: 79231 (16.7%)
|
71
|
-
sun_calc: 36677 (7.73%)
|
72
|
-
|
73
|
-
Moon rising time:
|
74
|
-
astronoby: 290866 (61.32%)
|
75
|
-
n/a: 113815 (23.99%)
|
76
|
-
sun_calc: 69655 (14.68%)
|
77
|
-
|
78
|
-
Moon transit time:
|
79
|
-
astronoby: 341902 (72.08%)
|
80
|
-
n/a: 101916 (21.49%)
|
81
|
-
sun_calc: 30518 (6.43%)
|
82
|
-
|
83
|
-
Moon setting time:
|
84
|
-
astronoby: 327099 (68.96%)
|
85
|
-
n/a: 114308 (24.1%)
|
86
|
-
sun_calc: 32929 (6.94%)
|
87
|
-
|
88
|
-
Moon illuminated fraction:
|
89
|
-
astronoby: 474336 (100.0%)
|
90
|
-
|
91
|
-
Sun rising time too far:
|
92
|
-
false: 452887 (95.48%)
|
93
|
-
true: 21449 (4.52%)
|
94
|
-
|
95
|
-
Sun transit time too far:
|
96
|
-
false: 396617 (83.62%)
|
97
|
-
true: 77719 (16.38%)
|
98
|
-
|
99
|
-
Sun setting time too far:
|
100
|
-
false: 453208 (95.55%)
|
101
|
-
true: 21128 (4.45%)
|
102
|
-
|
103
|
-
Moon rising time too far:
|
104
|
-
false: 459044 (96.78%)
|
105
|
-
true: 15292 (3.22%)
|
106
|
-
|
107
|
-
Moon transit time too far:
|
108
|
-
false: 384516 (81.06%)
|
109
|
-
true: 89820 (18.94%)
|
110
|
-
|
111
|
-
Moon setting time too far:
|
112
|
-
false: 459222 (96.81%)
|
113
|
-
true: 15114 (3.19%)
|
114
|
-
```
|
115
|
-
|
116
|
-
## Conclusion
|
117
|
-
|
118
|
-
As we can see, Astronoby is more accurate than SunCalc in a vast majority of
|
119
|
-
cases. When it comes to the Moon's illuminated fraction, Astronoby is always
|
120
|
-
more accurate than SunCalc.
|
121
|
-
|
122
|
-
`n/a` values means that at least one of the three sources don't have a value
|
123
|
-
for the combination of date, latitude and longitude. This happens because
|
124
|
-
the Moon and the Sun cannot always rise, transit and set everywhere on Earth
|
125
|
-
every day of the year. Latitudes close to the poles are more likely to miss
|
126
|
-
data.
|
127
|
-
|
128
|
-
Astronoby can be considered "good enough" for more around 90% of the cases,
|
129
|
-
which means there is still work to do if we want to always be less than 5
|
130
|
-
minutes away from the what the IMCCE provides. We can notice that transit
|
131
|
-
times are those that experience the most significant differences.
|