astronoby 0.10.0 → 0.11.1
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 -1
- data/CHANGELOG.md +159 -0
- data/README.md +13 -0
- data/UPGRADING.md +199 -0
- data/docs/README.md +32 -8
- data/docs/altitude_crossings.md +92 -0
- data/docs/configuration.md +8 -0
- data/docs/deep_sky_bodies.md +45 -0
- data/docs/glossary.md +2 -0
- data/docs/instant.md +14 -7
- data/docs/lunar_eclipses.md +128 -13
- data/docs/twilight_times.md +26 -11
- data/lib/astronoby/bodies/deep_sky_object_position.rb +6 -24
- data/lib/astronoby/cache.rb +13 -0
- data/lib/astronoby/constants.rb +1 -2
- data/lib/astronoby/constellations/data.rb +1 -1
- data/lib/astronoby/coordinates/equatorial.rb +15 -5
- data/lib/astronoby/delta_t.rb +44 -0
- data/lib/astronoby/ephem.rb +3 -1
- data/lib/astronoby/events/altitude_crossing.rb +29 -0
- data/lib/astronoby/events/altitude_crossing_calculator.rb +511 -0
- data/lib/astronoby/events/altitude_extreme.rb +31 -0
- data/lib/astronoby/events/lunar_eclipse.rb +49 -37
- data/lib/astronoby/events/lunar_eclipse_calculator.rb +143 -31
- data/lib/astronoby/events/lunar_eclipse_geometry.rb +115 -0
- data/lib/astronoby/events/lunar_eclipse_phase.rb +45 -0
- data/lib/astronoby/events/lunar_eclipse_visibility.rb +296 -0
- data/lib/astronoby/events/rise_transit_set_calculator.rb +9 -13
- data/lib/astronoby/events/twilight_calculator.rb +37 -147
- data/lib/astronoby/horizon.rb +40 -0
- data/lib/astronoby/horizontal_transformation.rb +112 -0
- data/lib/astronoby/instant.rb +50 -13
- data/lib/astronoby/orientation.rb +2 -1
- data/lib/astronoby/precession.rb +1 -1
- data/lib/astronoby/reference_frame.rb +8 -3
- data/lib/astronoby/reference_frames/apparent.rb +20 -8
- data/lib/astronoby/reference_frames/mean_of_date.rb +6 -0
- data/lib/astronoby/reference_frames/teme.rb +6 -0
- data/lib/astronoby/reference_frames/topocentric.rb +6 -0
- data/lib/astronoby/root_finder.rb +16 -9
- data/lib/astronoby/time/greenwich_apparent_sidereal_time.rb +10 -8
- data/lib/astronoby/time/greenwich_mean_sidereal_time.rb +11 -9
- data/lib/astronoby/util/time.rb +0 -22
- data/lib/astronoby/version.rb +1 -1
- data/lib/astronoby.rb +9 -1
- metadata +47 -6
- data/lib/astronoby/events/eclipse_phase.rb +0 -27
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: astronoby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rémy Hannequin
|
|
@@ -16,6 +16,9 @@ dependencies:
|
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '0.5'
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 0.5.1
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -23,8 +26,11 @@ dependencies:
|
|
|
23
26
|
- - "~>"
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
28
|
version: '0.5'
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 0.5.1
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
|
-
name:
|
|
33
|
+
name: horologium
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
|
29
35
|
requirements:
|
|
30
36
|
- - "~>"
|
|
@@ -37,6 +43,26 @@ dependencies:
|
|
|
37
43
|
- - "~>"
|
|
38
44
|
- !ruby/object:Gem::Version
|
|
39
45
|
version: '0.1'
|
|
46
|
+
- !ruby/object:Gem::Dependency
|
|
47
|
+
name: iers
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '0.3'
|
|
53
|
+
- - ">="
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: 0.3.1
|
|
56
|
+
type: :runtime
|
|
57
|
+
prerelease: false
|
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - "~>"
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '0.3'
|
|
63
|
+
- - ">="
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: 0.3.1
|
|
40
66
|
- !ruby/object:Gem::Dependency
|
|
41
67
|
name: matrix
|
|
42
68
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -127,14 +153,20 @@ dependencies:
|
|
|
127
153
|
requirements:
|
|
128
154
|
- - "~>"
|
|
129
155
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '0
|
|
156
|
+
version: '1.0'
|
|
157
|
+
- - "<"
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: '1.2'
|
|
131
160
|
type: :development
|
|
132
161
|
prerelease: false
|
|
133
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
134
163
|
requirements:
|
|
135
164
|
- - "~>"
|
|
136
165
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: '0
|
|
166
|
+
version: '1.0'
|
|
167
|
+
- - "<"
|
|
168
|
+
- !ruby/object:Gem::Version
|
|
169
|
+
version: '1.2'
|
|
138
170
|
- !ruby/object:Gem::Dependency
|
|
139
171
|
name: standard
|
|
140
172
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -167,6 +199,7 @@ files:
|
|
|
167
199
|
- Rakefile
|
|
168
200
|
- UPGRADING.md
|
|
169
201
|
- docs/README.md
|
|
202
|
+
- docs/altitude_crossings.md
|
|
170
203
|
- docs/angles.md
|
|
171
204
|
- docs/configuration.md
|
|
172
205
|
- docs/coordinates.md
|
|
@@ -225,21 +258,27 @@ files:
|
|
|
225
258
|
- lib/astronoby/data/constellations/sorted_declinations.dat
|
|
226
259
|
- lib/astronoby/data/constellations/sorted_right_ascensions.dat
|
|
227
260
|
- lib/astronoby/deflection.rb
|
|
261
|
+
- lib/astronoby/delta_t.rb
|
|
228
262
|
- lib/astronoby/distance.rb
|
|
229
263
|
- lib/astronoby/duration.rb
|
|
230
264
|
- lib/astronoby/earth_rotation.rb
|
|
231
265
|
- lib/astronoby/ephem.rb
|
|
232
266
|
- lib/astronoby/equinox_solstice.rb
|
|
233
267
|
- lib/astronoby/errors.rb
|
|
268
|
+
- lib/astronoby/events/altitude_crossing.rb
|
|
269
|
+
- lib/astronoby/events/altitude_crossing_calculator.rb
|
|
270
|
+
- lib/astronoby/events/altitude_extreme.rb
|
|
234
271
|
- lib/astronoby/events/conjunction.rb
|
|
235
272
|
- lib/astronoby/events/conjunction_opposition_calculator.rb
|
|
236
|
-
- lib/astronoby/events/eclipse_phase.rb
|
|
237
273
|
- lib/astronoby/events/extremum_calculator.rb
|
|
238
274
|
- lib/astronoby/events/extremum_event.rb
|
|
239
275
|
- lib/astronoby/events/greatest_elongation.rb
|
|
240
276
|
- lib/astronoby/events/greatest_elongation_calculator.rb
|
|
241
277
|
- lib/astronoby/events/lunar_eclipse.rb
|
|
242
278
|
- lib/astronoby/events/lunar_eclipse_calculator.rb
|
|
279
|
+
- lib/astronoby/events/lunar_eclipse_geometry.rb
|
|
280
|
+
- lib/astronoby/events/lunar_eclipse_phase.rb
|
|
281
|
+
- lib/astronoby/events/lunar_eclipse_visibility.rb
|
|
243
282
|
- lib/astronoby/events/moon_phases.rb
|
|
244
283
|
- lib/astronoby/events/opposition.rb
|
|
245
284
|
- lib/astronoby/events/rise_transit_set_calculator.rb
|
|
@@ -250,6 +289,8 @@ files:
|
|
|
250
289
|
- lib/astronoby/events/twilight_events.rb
|
|
251
290
|
- lib/astronoby/extremum_finder.rb
|
|
252
291
|
- lib/astronoby/geocentric_parallax.rb
|
|
292
|
+
- lib/astronoby/horizon.rb
|
|
293
|
+
- lib/astronoby/horizontal_transformation.rb
|
|
253
294
|
- lib/astronoby/instant.rb
|
|
254
295
|
- lib/astronoby/julian_date.rb
|
|
255
296
|
- lib/astronoby/libration.rb
|
|
@@ -308,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
308
349
|
- !ruby/object:Gem::Version
|
|
309
350
|
version: '0'
|
|
310
351
|
requirements: []
|
|
311
|
-
rubygems_version: 4.0.
|
|
352
|
+
rubygems_version: 4.0.20
|
|
312
353
|
specification_version: 4
|
|
313
354
|
summary: Astronomical calculations
|
|
314
355
|
test_files: []
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Astronoby
|
|
4
|
-
# A bounded phase of an eclipse, delimited by its two boundary instants.
|
|
5
|
-
class EclipsePhase
|
|
6
|
-
# @return [Astronoby::Instant] when the phase begins
|
|
7
|
-
attr_reader :starting_instant
|
|
8
|
-
|
|
9
|
-
# @return [Astronoby::Instant] when the phase ends
|
|
10
|
-
attr_reader :ending_instant
|
|
11
|
-
|
|
12
|
-
# @param starting_instant [Astronoby::Instant] when the phase begins
|
|
13
|
-
# @param ending_instant [Astronoby::Instant] when the phase ends
|
|
14
|
-
def initialize(starting_instant:, ending_instant:)
|
|
15
|
-
@starting_instant = starting_instant
|
|
16
|
-
@ending_instant = ending_instant
|
|
17
|
-
freeze
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# @return [Astronoby::Duration] phase duration
|
|
21
|
-
def duration
|
|
22
|
-
Duration.from_seconds(
|
|
23
|
-
(@ending_instant.to_time - @starting_instant.to_time).round
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|