astronoby 0.7.0 → 0.9.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 -1
- data/CHANGELOG.md +145 -3
- data/README.md +59 -33
- data/UPGRADING.md +75 -21
- data/docs/README.md +224 -0
- data/docs/angles.md +137 -0
- data/docs/configuration.md +98 -0
- data/docs/coordinates.md +167 -0
- data/docs/deep_sky_bodies.md +101 -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/solar_system_bodies.md +107 -0
- data/docs/twilight_times.md +123 -0
- data/lib/astronoby/angle.rb +6 -2
- data/lib/astronoby/angular_velocity.rb +76 -0
- data/lib/astronoby/bodies/deep_sky_object.rb +44 -0
- data/lib/astronoby/bodies/deep_sky_object_position.rb +127 -0
- data/lib/astronoby/bodies/earth.rb +12 -2
- data/lib/astronoby/bodies/jupiter.rb +17 -0
- data/lib/astronoby/bodies/mars.rb +17 -0
- data/lib/astronoby/bodies/mercury.rb +21 -0
- data/lib/astronoby/bodies/moon.rb +50 -36
- data/lib/astronoby/bodies/neptune.rb +21 -0
- data/lib/astronoby/bodies/saturn.rb +26 -0
- data/lib/astronoby/bodies/solar_system_body.rb +162 -27
- data/lib/astronoby/bodies/sun.rb +25 -2
- data/lib/astronoby/bodies/uranus.rb +5 -0
- data/lib/astronoby/bodies/venus.rb +25 -0
- data/lib/astronoby/cache.rb +189 -0
- data/lib/astronoby/configuration.rb +92 -0
- data/lib/astronoby/constants.rb +11 -3
- 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/equatorial.rb +5 -8
- 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/distance.rb +6 -0
- data/lib/astronoby/equinox_solstice.rb +2 -2
- data/lib/astronoby/events/extremum_calculator.rb +233 -0
- data/lib/astronoby/events/extremum_event.rb +15 -0
- data/lib/astronoby/events/moon_phases.rb +15 -14
- data/lib/astronoby/events/rise_transit_set_calculator.rb +39 -12
- data/lib/astronoby/events/twilight_calculator.rb +116 -61
- data/lib/astronoby/events/twilight_events.rb +28 -0
- data/lib/astronoby/instant.rb +34 -6
- data/lib/astronoby/julian_date.rb +78 -0
- data/lib/astronoby/mean_obliquity.rb +8 -10
- data/lib/astronoby/nutation.rb +11 -3
- data/lib/astronoby/observer.rb +1 -1
- data/lib/astronoby/precession.rb +48 -38
- data/lib/astronoby/reference_frame.rb +2 -1
- data/lib/astronoby/reference_frames/apparent.rb +1 -11
- data/lib/astronoby/reference_frames/mean_of_date.rb +1 -1
- data/lib/astronoby/reference_frames/topocentric.rb +2 -12
- data/lib/astronoby/stellar_propagation.rb +162 -0
- data/lib/astronoby/time/greenwich_apparent_sidereal_time.rb +22 -0
- data/lib/astronoby/time/greenwich_mean_sidereal_time.rb +64 -0
- data/lib/astronoby/time/greenwich_sidereal_time.rb +20 -58
- data/lib/astronoby/time/local_apparent_sidereal_time.rb +42 -0
- data/lib/astronoby/time/local_mean_sidereal_time.rb +42 -0
- data/lib/astronoby/time/local_sidereal_time.rb +35 -26
- data/lib/astronoby/time/sidereal_time.rb +42 -0
- data/lib/astronoby/true_obliquity.rb +2 -3
- data/lib/astronoby/util/time.rb +62 -44
- data/lib/astronoby/velocity.rb +5 -0
- data/lib/astronoby/version.rb +1 -1
- data/lib/astronoby.rb +19 -1
- metadata +71 -11
- data/Gemfile +0 -5
- data/Gemfile.lock +0 -102
- 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/epoch.rb +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: becadc2ba01e7620f12b20a5192e8537ed9f717336bb43471734fd5be9561675
|
|
4
|
+
data.tar.gz: 47c5743867f09c58f49093645da7534def3836135883f44929d4da15f73a441a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b04c971a79ac8201e21398dc0cc02b920cdadde538a0eb7d5d59dbc260661cbda51f3a72a434695b596634848f361a96b9533074f399d23d1e3d21fac89d772
|
|
7
|
+
data.tar.gz: f71973fd392c15a243a28ac09e521e813adf4900eefacfbc55712bd4f942c46b3351cfe44e183c1e809b0285b0ffb22ab320afd26b84c3d329be7fe79897378d
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.4.
|
|
1
|
+
3.4.4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,147 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 - 2025-10-31
|
|
4
|
+
|
|
5
|
+
_If you are upgrading: please see [UPGRADING.md]._
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Add `#approaching_primary?` and `#receding_from_primary?` to solar system bodies ([#211])
|
|
10
|
+
* Calculate apoapsis and periapsis events ([#213])
|
|
11
|
+
* Improve precision of ΔT ([#219])
|
|
12
|
+
* Deep Sky Object: Compute astrometric position ([#217])
|
|
13
|
+
* Deep Sky Object: Compute apparent position ([#220])
|
|
14
|
+
* Deep Sky Object: Handle velocities properly ([#222])
|
|
15
|
+
* Deep Sky Object: Compute topocentric position ([#226])
|
|
16
|
+
* Deep Sky Object: difference between the body and the position ([#227])
|
|
17
|
+
* Deep Sky Object: Add support for RiseTransitSetCalculator ([#228])
|
|
18
|
+
|
|
19
|
+
### Improvements
|
|
20
|
+
|
|
21
|
+
* Drop `Astronoby::Apparent#angular_diameter` ([#221])
|
|
22
|
+
* Bump rubyzip from 3.0.2 to 3.2.1 by @dependabot ([#210], [#215], [#223], [#233])
|
|
23
|
+
* Bump standard from 1.50.0 to 1.51.1 by @dependabot ([#212], [#214])
|
|
24
|
+
* Be proud about the precision achieved ([#218])
|
|
25
|
+
* Use local apparent instead of local mean sidereal time for hour angle ([#225])
|
|
26
|
+
* Bump rspec from 3.13.1 to 3.13.2 by @dependabot ([#229])
|
|
27
|
+
* Bump benchmark from 0.4.1 to 0.5.0 by @dependabot ([#230])
|
|
28
|
+
* Add documentation for deep-sky objects ([#232])
|
|
29
|
+
* Bump rake from 13.3.0 to 13.3.1 by @dependabot ([#235])
|
|
30
|
+
|
|
31
|
+
### Backward-incompatible changes
|
|
32
|
+
|
|
33
|
+
* Drop `Astronoby::Apparent#angular_diameter` ([#221])
|
|
34
|
+
* Use local apparent instead of local mean sidereal time for hour angle ([#225])
|
|
35
|
+
|
|
36
|
+
**Full Changelog**: https://github.com/rhannequin/astronoby/compare/v0.8.0...v0.9.0
|
|
37
|
+
|
|
38
|
+
[#210]: https://github.com/rhannequin/astronoby/pull/210
|
|
39
|
+
[#211]: https://github.com/rhannequin/astronoby/pull/211
|
|
40
|
+
[#212]: https://github.com/rhannequin/astronoby/pull/212
|
|
41
|
+
[#213]: https://github.com/rhannequin/astronoby/pull/213
|
|
42
|
+
[#214]: https://github.com/rhannequin/astronoby/pull/214
|
|
43
|
+
[#215]: https://github.com/rhannequin/astronoby/pull/215
|
|
44
|
+
[#217]: https://github.com/rhannequin/astronoby/pull/217
|
|
45
|
+
[#218]: https://github.com/rhannequin/astronoby/pull/218
|
|
46
|
+
[#219]: https://github.com/rhannequin/astronoby/pull/219
|
|
47
|
+
[#220]: https://github.com/rhannequin/astronoby/pull/220
|
|
48
|
+
[#221]: https://github.com/rhannequin/astronoby/pull/221
|
|
49
|
+
[#222]: https://github.com/rhannequin/astronoby/pull/222
|
|
50
|
+
[#223]: https://github.com/rhannequin/astronoby/pull/223
|
|
51
|
+
[#225]: https://github.com/rhannequin/astronoby/pull/225
|
|
52
|
+
[#226]: https://github.com/rhannequin/astronoby/pull/226
|
|
53
|
+
[#227]: https://github.com/rhannequin/astronoby/pull/227
|
|
54
|
+
[#228]: https://github.com/rhannequin/astronoby/pull/228
|
|
55
|
+
[#229]: https://github.com/rhannequin/astronoby/pull/229
|
|
56
|
+
[#230]: https://github.com/rhannequin/astronoby/pull/230
|
|
57
|
+
[#232]: https://github.com/rhannequin/astronoby/pull/232
|
|
58
|
+
[#233]: https://github.com/rhannequin/astronoby/pull/233
|
|
59
|
+
[#235]: https://github.com/rhannequin/astronoby/pull/235
|
|
60
|
+
|
|
61
|
+
## 0.8.0 - 2025-09-01
|
|
62
|
+
|
|
63
|
+
_If you are upgrading: please see [UPGRADING.md]._
|
|
64
|
+
|
|
65
|
+
### Bug fixes
|
|
66
|
+
|
|
67
|
+
* Fix UPGRADING documentation ([#178])
|
|
68
|
+
* Fix possible division by zero in RTS ([#185])
|
|
69
|
+
|
|
70
|
+
### Features
|
|
71
|
+
|
|
72
|
+
* Introduce performance benchmark ([#183])
|
|
73
|
+
* Cache positions in RTS calculator ([#182])
|
|
74
|
+
* Internal global LRU cache ([#186])
|
|
75
|
+
* Global configuration ([#187])
|
|
76
|
+
* Compute the constellation a body is in ([#199])
|
|
77
|
+
* Add `#phase_angle` and `#illuminated_fraction` to planets ([#200])
|
|
78
|
+
* Apparent magnitude ([#201])
|
|
79
|
+
* Add #events_between to TwilightCalculator with better accuracy ([#204])
|
|
80
|
+
* `#angular_diameter` on Solar System bodies ([#207])
|
|
81
|
+
* Fix constellation boundaries near 24h right ascension ([#209])
|
|
82
|
+
|
|
83
|
+
### Improvements
|
|
84
|
+
|
|
85
|
+
* Bump standard from 1.49.0 to 1.50.0 by @dependabot ([#177])
|
|
86
|
+
* Bump ephem from 0.3.0 to 0.4.1 by @dependabot ([#181], [#191])
|
|
87
|
+
* Bump irb from 1.14.3 to 1.15.2 by @dependabot ([#184])
|
|
88
|
+
* Bump rspec from 3.13.0 to 3.13.1 by @dependabot ([#188])
|
|
89
|
+
* Bump benchmark from 0.4.0 to 0.4.1 by @dependabot ([#189])
|
|
90
|
+
* Bump rake from 13.2.1 to 13.3.0 by @dependabot ([#190])
|
|
91
|
+
* Bump matrix from 0.4.2 to 0.4.3 by @dependabot ([#193])
|
|
92
|
+
* Update rubyzip requirement from ~> 2.3 to ~> 3.0 by @dependabot ([#194])
|
|
93
|
+
* Bump rubyzip from 3.0.0 to 3.0.2 by @dependabot ([#202], [#206])
|
|
94
|
+
* Exclude benchmarks from release ([#196])
|
|
95
|
+
* `Epoch` refactoring into `JulianDate` ([#197])
|
|
96
|
+
* Support Ruby 3.4.4 ([#198])
|
|
97
|
+
* Bump actions/checkout from 4 to 5 ([#203])
|
|
98
|
+
* Internal documentation ([#205])
|
|
99
|
+
|
|
100
|
+
### Backward-incompatible changes
|
|
101
|
+
|
|
102
|
+
* `Epoch` refactoring into `JulianDate` ([#197])
|
|
103
|
+
* `#angular_diameter` on Solar System bodies ([#207])
|
|
104
|
+
* Rename "epoch" ([#208])
|
|
105
|
+
|
|
106
|
+
### Closed issues
|
|
107
|
+
|
|
108
|
+
* Consider adding typical usage/deployment info ([#179])
|
|
109
|
+
* Performance degradation in v0.7 ([#180])
|
|
110
|
+
|
|
111
|
+
**Full Changelog**: https://github.com/rhannequin/astronoby/compare/v0.7.0...v0.8.0
|
|
112
|
+
|
|
113
|
+
[#177]: https://github.com/rhannequin/astronoby/pull/177
|
|
114
|
+
[#178]: https://github.com/rhannequin/astronoby/pull/178
|
|
115
|
+
[#179]: https://github.com/rhannequin/astronoby/pull/179
|
|
116
|
+
[#180]: https://github.com/rhannequin/astronoby/pull/180
|
|
117
|
+
[#181]: https://github.com/rhannequin/astronoby/pull/181
|
|
118
|
+
[#182]: https://github.com/rhannequin/astronoby/pull/182
|
|
119
|
+
[#183]: https://github.com/rhannequin/astronoby/pull/183
|
|
120
|
+
[#184]: https://github.com/rhannequin/astronoby/pull/184
|
|
121
|
+
[#185]: https://github.com/rhannequin/astronoby/pull/185
|
|
122
|
+
[#186]: https://github.com/rhannequin/astronoby/pull/186
|
|
123
|
+
[#187]: https://github.com/rhannequin/astronoby/pull/187
|
|
124
|
+
[#188]: https://github.com/rhannequin/astronoby/pull/188
|
|
125
|
+
[#189]: https://github.com/rhannequin/astronoby/pull/189
|
|
126
|
+
[#190]: https://github.com/rhannequin/astronoby/pull/190
|
|
127
|
+
[#191]: https://github.com/rhannequin/astronoby/pull/191
|
|
128
|
+
[#193]: https://github.com/rhannequin/astronoby/pull/193
|
|
129
|
+
[#194]: https://github.com/rhannequin/astronoby/pull/194
|
|
130
|
+
[#196]: https://github.com/rhannequin/astronoby/pull/196
|
|
131
|
+
[#197]: https://github.com/rhannequin/astronoby/pull/197
|
|
132
|
+
[#198]: https://github.com/rhannequin/astronoby/pull/198
|
|
133
|
+
[#199]: https://github.com/rhannequin/astronoby/pull/199
|
|
134
|
+
[#200]: https://github.com/rhannequin/astronoby/pull/200
|
|
135
|
+
[#201]: https://github.com/rhannequin/astronoby/pull/201
|
|
136
|
+
[#202]: https://github.com/rhannequin/astronoby/pull/202
|
|
137
|
+
[#203]: https://github.com/rhannequin/astronoby/pull/203
|
|
138
|
+
[#204]: https://github.com/rhannequin/astronoby/pull/204
|
|
139
|
+
[#205]: https://github.com/rhannequin/astronoby/pull/205
|
|
140
|
+
[#206]: https://github.com/rhannequin/astronoby/pull/206
|
|
141
|
+
[#207]: https://github.com/rhannequin/astronoby/pull/207
|
|
142
|
+
[#208]: https://github.com/rhannequin/astronoby/pull/208
|
|
143
|
+
[#209]: https://github.com/rhannequin/astronoby/pull/209
|
|
144
|
+
|
|
3
145
|
## 0.7.0 - 2025-05-12
|
|
4
146
|
|
|
5
147
|
_If you are upgrading: please see [UPGRADING.md]._
|
|
@@ -296,7 +438,7 @@ _If you are upgrading: please see [UPGRADING.md]._
|
|
|
296
438
|
|
|
297
439
|
## 0.3.0 - 2024-03-29
|
|
298
440
|
|
|
299
|
-
_If you are upgrading: please see [
|
|
441
|
+
_If you are upgrading: please see [UPGRADING.md]._
|
|
300
442
|
|
|
301
443
|
### Improvements
|
|
302
444
|
|
|
@@ -315,7 +457,7 @@ _If you are upgrading: please see [`UPGRADING.md`]._
|
|
|
315
457
|
|
|
316
458
|
## 0.2.0 - 2024-03-24
|
|
317
459
|
|
|
318
|
-
_If you are upgrading: please see [
|
|
460
|
+
_If you are upgrading: please see [UPGRADING.md]._
|
|
319
461
|
|
|
320
462
|
### Features
|
|
321
463
|
|
|
@@ -386,4 +528,4 @@ _If you are upgrading: please see [`UPGRADING.md`]._
|
|
|
386
528
|
* Add `Astronoby::Angle`
|
|
387
529
|
* Support angles in degrees and radians
|
|
388
530
|
|
|
389
|
-
[
|
|
531
|
+
[UPGRADING.md]: https://github.com/rhannequin/astronoby/blob/main/UPGRADING.md
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/rhannequin/astronoby/actions?query=workflow%3ARuby)
|
|
4
4
|
|
|
5
|
-
Ruby library
|
|
5
|
+
Ruby library that provides a useful API for computing astronomical calculations.
|
|
6
6
|
|
|
7
7
|
Some algorithms are based on the following astrometry books:
|
|
8
8
|
* _Astronomical Algorithms_ by Jean Meeus
|
|
@@ -10,10 +10,8 @@ Some algorithms are based on the following astrometry books:
|
|
|
10
10
|
* _Practical Astronomy with your Calculator or Spreadsheet_ by Peter
|
|
11
11
|
Duffet-Smith and Jonathan Zwart
|
|
12
12
|
|
|
13
|
-
Solar System
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[NASA/JPL]: https://ssd.jpl.nasa.gov/planets/eph_export.html
|
|
13
|
+
Solar System bodies' positions are computed based on ephemerides from the
|
|
14
|
+
[IMCCE] or [NASA/JPL].
|
|
17
15
|
|
|
18
16
|
## Content
|
|
19
17
|
- [Installation](#installation)
|
|
@@ -35,45 +33,41 @@ executing:
|
|
|
35
33
|
|
|
36
34
|
$ gem install astronoby
|
|
37
35
|
|
|
38
|
-
[Bundler]: https://bundler.io
|
|
39
|
-
|
|
40
36
|
## Usage Documentation
|
|
41
37
|
|
|
42
|
-
Since version 0.7.0, the usage documentation resides in
|
|
38
|
+
Since version 0.7.0, the usage documentation resides in [`docs/`]. For
|
|
43
39
|
previous versions, you can access the documentation in the README for each
|
|
44
40
|
[release].
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
[
|
|
42
|
+
### See also
|
|
43
|
+
- [Quick Start Guide](docs/README.md) - for getting started examples
|
|
44
|
+
- [Solar System Bodies](docs/solar_system_bodies.md) - for understanding planets
|
|
45
|
+
and objects
|
|
46
|
+
- [Reference Frames](docs/reference_frames.md) - for coordinate systems
|
|
47
|
+
- [Observer Setup](docs/observer.md) - for location configuration
|
|
48
|
+
- [Glossary](docs/glossary.md) - for astronomical and technical terms
|
|
48
49
|
|
|
49
50
|
### Expected breaking changes notice
|
|
50
51
|
|
|
51
|
-
This library is still in heavy development. The public is not stable,
|
|
52
|
-
be aware new minor versions will probably lead to breaking changes
|
|
53
|
-
major one is released.
|
|
52
|
+
This library is still in heavy development. The public API is not stable, so
|
|
53
|
+
please be aware that new minor versions will probably lead to breaking changes
|
|
54
|
+
until a major one is released.
|
|
54
55
|
|
|
55
56
|
Changes are documented in the [CHANGELOG] and adapting to breaking changes is
|
|
56
57
|
described in the [UPGRADING] document.
|
|
57
58
|
|
|
58
|
-
[CHANGELOG]: https://github.com/rhannequin/astronoby/blob/main/CHANGELOG.md
|
|
59
|
-
[UPGRADING]: https://github.com/rhannequin/astronoby/blob/main/UPGRADING.md
|
|
60
|
-
|
|
61
59
|
## Precision
|
|
62
60
|
|
|
63
|
-
The current precision for the major Solar System bodies'
|
|
64
|
-
as seen from an observer on Earth is
|
|
65
|
-
|
|
61
|
+
The current precision for the major Solar System bodies' locations in the sky
|
|
62
|
+
as seen from an observer on Earth is around 1-2 arc seconds, with sub-arcsecond
|
|
63
|
+
often achieved. This corresponds to less than the apparent size of Neptune when
|
|
64
|
+
it is closest to Earth.
|
|
66
65
|
|
|
67
66
|
While the precision is not enough for spacecraft navigation, it is enough for
|
|
68
|
-
automated guiding of amateur telescopes.
|
|
69
|
-
|
|
70
|
-
The compared sources are: [IMCCE], [JPL Horizons], [Stellarium], and the
|
|
71
|
-
[Skyfield] library.
|
|
67
|
+
automated guiding of amateur telescopes and some professional use-cases.
|
|
72
68
|
|
|
73
|
-
[IMCCE]
|
|
74
|
-
[
|
|
75
|
-
[Stellarium]: https://stellarium.org
|
|
76
|
-
[Skyfield]: https://rhodesmill.org/skyfield/
|
|
69
|
+
The sources used for comparison are: [IMCCE], [JPL Horizons], [Stellarium],
|
|
70
|
+
and the [Skyfield] library.
|
|
77
71
|
|
|
78
72
|
## Development
|
|
79
73
|
|
|
@@ -86,15 +80,35 @@ release a new version, update the version number in `version.rb`, and then run
|
|
|
86
80
|
`bundle exec rake release`, which will create a git tag for the version, push
|
|
87
81
|
git commits and the created tag, and push the `.gem` file to [rubygems.org].
|
|
88
82
|
|
|
89
|
-
|
|
83
|
+
### Performance
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
The library is designed to be fast, but there is always room for improvement.
|
|
86
|
+
When comparing the performance of two implementations, please use the
|
|
87
|
+
performance benchmark in the console before and after your implementation.
|
|
92
88
|
|
|
93
|
-
|
|
89
|
+
$ bin/console
|
|
94
90
|
|
|
95
|
-
|
|
91
|
+
```rb
|
|
92
|
+
require_relative "benchmarks/performance"
|
|
96
93
|
|
|
97
|
-
|
|
94
|
+
PerformanceBenchmark.new.run
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
For fast feedback, you can customise the parameters:
|
|
98
|
+
|
|
99
|
+
```rb
|
|
100
|
+
PerformanceBenchmark
|
|
101
|
+
.new(warmup_runs: 1, measure_runs: 3, iterations_per_run: 5)
|
|
102
|
+
.run
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Performance is not absolute, which is why the results are not documented here.
|
|
106
|
+
What is important is to compare the relative performance of two implementations
|
|
107
|
+
and make sure new features do not degrade performance.
|
|
108
|
+
|
|
109
|
+
## Contributing
|
|
110
|
+
|
|
111
|
+
Please see [CONTRIBUTING.md].
|
|
98
112
|
|
|
99
113
|
## License
|
|
100
114
|
|
|
@@ -105,6 +119,18 @@ The gem is available as open source under the terms of the [MIT License].
|
|
|
105
119
|
## Code of Conduct
|
|
106
120
|
|
|
107
121
|
Everyone interacting in the Astronoby project's codebases, issue trackers, chat
|
|
108
|
-
rooms and mailing lists
|
|
122
|
+
rooms and mailing lists is expected to follow the [code of conduct].
|
|
109
123
|
|
|
124
|
+
[NASA/JPL]: https://ssd.jpl.nasa.gov/planets/eph_export.html
|
|
125
|
+
[Bundler]: https://bundler.io
|
|
126
|
+
[`docs/`]: https://github.com/rhannequin/astronoby/blob/main/docs
|
|
127
|
+
[release]: https://github.com/rhannequin/astronoby/releases
|
|
128
|
+
[CHANGELOG]: https://github.com/rhannequin/astronoby/blob/main/CHANGELOG.md
|
|
129
|
+
[UPGRADING]: https://github.com/rhannequin/astronoby/blob/main/UPGRADING.md
|
|
130
|
+
[IMCCE]: https://www.imcce.fr
|
|
131
|
+
[JPL Horizons]: https://ssd.jpl.nasa.gov/horizons.cgi
|
|
132
|
+
[Stellarium]: https://stellarium.org
|
|
133
|
+
[Skyfield]: https://rhodesmill.org/skyfield/
|
|
134
|
+
[rubygems.org]: https://rubygems.org
|
|
135
|
+
[CONTRIBUTING.md]: https://github.com/rhannequin/astronoby/blob/main/CONTRIBUTING.md
|
|
110
136
|
[code of conduct]: https://github.com/rhannequin/astronoby/blob/main/CODE_OF_CONDUCT.md
|
data/UPGRADING.md
CHANGED
|
@@ -7,9 +7,63 @@ changes to it as long as a major version has not been released.
|
|
|
7
7
|
If you are already using Astronoby and wish to follow the changes to its
|
|
8
8
|
public API, please read the upgrading notes for each release.
|
|
9
9
|
|
|
10
|
+
## Upgrading from 0.8.0 to 0.9.0
|
|
11
|
+
|
|
12
|
+
### Constant `MINUTES_PER_DEGREE` renamed
|
|
13
|
+
|
|
14
|
+
The constant `Constants::MINUTES_PER_DEGREE` has been renamed to
|
|
15
|
+
`Constants::ARC_MINUTES_PER_DEGREE` to clarify its purpose. The value remains
|
|
16
|
+
unchanged (`60.0`).
|
|
17
|
+
|
|
18
|
+
### Signature change in `RiseTransitSetCalculator`
|
|
19
|
+
|
|
20
|
+
The `RiseTransitSetCalculator` constructor's `ephem` key argument is not
|
|
21
|
+
mandatory anymore. This allows to support bodies that don't require ephemerides
|
|
22
|
+
(e.g. deep-sky objects).
|
|
23
|
+
|
|
24
|
+
### Sidereal time API change
|
|
25
|
+
|
|
26
|
+
It is is now preferred to use `Instant#gmst`, `Instant#gast`, `Instant#lmst` and
|
|
27
|
+
`Instant#last` to get sidereal times.
|
|
28
|
+
|
|
29
|
+
It is also possible to use dedicated classes:
|
|
30
|
+
- `GreenwichMeanSiderealTime`
|
|
31
|
+
- `GreenwichApparentSiderealTime`
|
|
32
|
+
- `LocalMeanSiderealTime`
|
|
33
|
+
- `LocalApparentSiderealTime`
|
|
34
|
+
|
|
35
|
+
## Upgrading from 0.7.0 to 0.8.0
|
|
36
|
+
|
|
37
|
+
### Benchmark directory changed
|
|
38
|
+
|
|
39
|
+
The precision benchmark has been moved to `benchmarks`.
|
|
40
|
+
|
|
41
|
+
### `Epoch` refactored into `JulianDate`
|
|
42
|
+
|
|
43
|
+
The `Epoch` class has been removed and replaced by `JulianDate`. This change is
|
|
44
|
+
meant to clarify the purpose of the class, which is to represent a Julian date
|
|
45
|
+
and not an epoch.
|
|
46
|
+
|
|
47
|
+
* Method `#to_utc` has been dropped in favor as is was ambiguous regarding the
|
|
48
|
+
timescale used.
|
|
49
|
+
* Therefore, constant `JULIAN_DAY_NUMBER_OFFSET` has also been dropped.
|
|
50
|
+
* `MeanObliquity::for_epoch` was renamed to `::at` and now takes an `instant` as
|
|
51
|
+
parameter
|
|
52
|
+
* `MeanObliquity::obliquity_of_reference_in_milliarcseconds` was renamed to
|
|
53
|
+
`::obliquity_of_reference_in_arcseconds`
|
|
54
|
+
* `TrueObliquity::for_epoch` was renamed to to `::at` and now takes an
|
|
55
|
+
`instant` as parameter
|
|
56
|
+
* `Coordinates::Equatorial#to_ecliptic` method now takes an `instant` as
|
|
57
|
+
parameter
|
|
58
|
+
|
|
59
|
+
### `#angular_diameter` moved from topocentric position to body
|
|
60
|
+
|
|
61
|
+
Previously accessible from the topocentric reference frame, the angular diameter
|
|
62
|
+
of a Solar System body is now accessible from the body itself.
|
|
63
|
+
|
|
10
64
|
## Upgrading from 0.6.0 to 0.7.0
|
|
11
65
|
|
|
12
|
-
|
|
66
|
+
### Signature change for `Sun` and `Moon`
|
|
13
67
|
|
|
14
68
|
Both classes are now initialized with the key arguments `ephem` and `instant`.
|
|
15
69
|
`ephem` comes from `Ephem.load` which provides the raw geometric data for Solar
|
|
@@ -17,7 +71,7 @@ System bodies. `instant` is an instance of `Instant`, the new concept for
|
|
|
17
71
|
representing an instant in time.
|
|
18
72
|
|
|
19
73
|
```rb
|
|
20
|
-
Ephem
|
|
74
|
+
Astronoby::Ephem.download(name: "de421.bsp", target: "tmp/de421.bsp")
|
|
21
75
|
ephem = Astronoby::Ephem.load("tmp/de421.bsp")
|
|
22
76
|
|
|
23
77
|
time = Time.utc(2025, 6, 19, 12, 0, 0)
|
|
@@ -30,7 +84,7 @@ Learn more on [ephem].
|
|
|
30
84
|
|
|
31
85
|
[ephem]: https://github.com/rhannequin/astronoby/wiki/Ephem
|
|
32
86
|
|
|
33
|
-
|
|
87
|
+
### Drop of methods for `Sun`
|
|
34
88
|
|
|
35
89
|
`Sun` doesn't expose the following class and instance methods anymore:
|
|
36
90
|
* `::equation_of_time` (replaced with `#equation_of_time`)
|
|
@@ -51,7 +105,7 @@ Learn more on [reference frames].
|
|
|
51
105
|
|
|
52
106
|
[reference frames]: https://github.com/rhannequin/astronoby/wiki/Reference-Frames
|
|
53
107
|
|
|
54
|
-
|
|
108
|
+
### Drop of instance methods for `Moon`
|
|
55
109
|
|
|
56
110
|
`Moon` doesn't expose the following nstance methods anymore:
|
|
57
111
|
* `#apparent_ecliptic_coordinates` (replaced with `#ecliptic` on reference frames)
|
|
@@ -65,7 +119,7 @@ Learn more on [reference frames].
|
|
|
65
119
|
* `#phase_angle`
|
|
66
120
|
* `#observation_events`
|
|
67
121
|
|
|
68
|
-
|
|
122
|
+
### Signature change for `Aberration`
|
|
69
123
|
|
|
70
124
|
`Aberration` is now initialized with the key arguments `astrometric_position`
|
|
71
125
|
and `observer_velocity`. `astrometric_position` is a position vector
|
|
@@ -92,7 +146,7 @@ aberration = Astronoby::Aberration.new(
|
|
|
92
146
|
)
|
|
93
147
|
```
|
|
94
148
|
|
|
95
|
-
|
|
149
|
+
### Signature change for `Angle#to_dms` and `Angle#to_hms`
|
|
96
150
|
|
|
97
151
|
`Angle#to_dms` and `Angle#to_hms` don't have arguments anymore. The angle value
|
|
98
152
|
is now taken from the object itself. This was a misbehavior in the previous
|
|
@@ -106,49 +160,49 @@ dms.format
|
|
|
106
160
|
# => "+45° 0′ 0.0″"
|
|
107
161
|
```
|
|
108
162
|
|
|
109
|
-
|
|
163
|
+
### Signature change for `EquinoxSolstice`
|
|
110
164
|
|
|
111
165
|
`EquinoxSolstice.new` now takes an additional argument expected to be an ephem
|
|
112
166
|
(`Astronoby::Ephem`).
|
|
113
167
|
|
|
114
|
-
|
|
168
|
+
### Signature change for `Nutation`
|
|
115
169
|
|
|
116
170
|
The expected `epoch` (`Astronoby::Epoch`) argument has been replaced by an
|
|
117
171
|
`instant` (`Astronoby::Instant`) key argument.
|
|
118
172
|
|
|
119
|
-
|
|
173
|
+
### Drop of `Nutation::for_ecliptic_longitude` and `Nutation::for_obliquity_of_the_ecliptic`
|
|
120
174
|
|
|
121
175
|
`Nutation::for_ecliptic_longitude` and `Nutation::for_obliquity_of_the_ecliptic`
|
|
122
176
|
methods have been removed. The `Nutation` class now exposes the
|
|
123
177
|
`#nutation_in_longitude` and `#nutation_in_obliquity` instance methods which
|
|
124
178
|
both return an angle (`Astronoby::Angle`).
|
|
125
179
|
|
|
126
|
-
|
|
180
|
+
### Signature change for `Precession`
|
|
127
181
|
|
|
128
182
|
The expected `coordinates` and `epoch` (`Astronoby::Epoch`) key arguments have
|
|
129
183
|
been replaced by an `instant` (`Astronoby::Instant`) key argument.
|
|
130
184
|
|
|
131
|
-
|
|
185
|
+
### Drop of `Precession#for_equatorial_coordinates` and `Precession#precess`
|
|
132
186
|
|
|
133
187
|
`Precession#for_equatorial_coordinates` and `Precession#precess` methods have
|
|
134
188
|
been refactoed into class methods.
|
|
135
189
|
|
|
136
|
-
|
|
190
|
+
### Drop of `Coordinates::Horizontal#to_equatorial`
|
|
137
191
|
|
|
138
192
|
`Coordinates::Horizontal#to_equatorial` has been removed as equatorial
|
|
139
193
|
coordinates are now available from the reference frames.
|
|
140
194
|
|
|
141
|
-
|
|
195
|
+
### Drop of instance methods for `Coordinates::Ecliptic`
|
|
142
196
|
|
|
143
197
|
`Coordinates::Ecliptic#to_true_equatorial` and
|
|
144
198
|
`Coordinates::Ecliptic#to_apparent_equatorial` have been removed as
|
|
145
199
|
equatorial coordinates are now available from the reference frames.
|
|
146
200
|
|
|
147
|
-
|
|
201
|
+
### Drop of `Coordinates::Equatorial#to_epoch`
|
|
148
202
|
|
|
149
203
|
`Coordinates::Equatorial#to_epoch` has been removed.
|
|
150
204
|
|
|
151
|
-
|
|
205
|
+
### Drop of `Events::ObservationEvents`
|
|
152
206
|
|
|
153
207
|
`Events::ObservationEvents` has been removed. The rising, transit and setting
|
|
154
208
|
times can now be calculated using `RiseTransitSetCalculator`.
|
|
@@ -179,12 +233,12 @@ event.setting_time
|
|
|
179
233
|
# => 2025-04-24 18:55:24 UTC
|
|
180
234
|
```
|
|
181
235
|
|
|
182
|
-
|
|
236
|
+
### Drop of `RiseTransitSetIteration`
|
|
183
237
|
|
|
184
238
|
`RiseTransitSetIteration` has been removed as it was only used by
|
|
185
239
|
`Events::ObservationEvents`.
|
|
186
240
|
|
|
187
|
-
|
|
241
|
+
### Drop of `Events::TwilightEvents`
|
|
188
242
|
|
|
189
243
|
`Events::TwilightEvents` has been removed. The twilight times can now be
|
|
190
244
|
calculated using `TwilightCalculator`.
|
|
@@ -224,20 +278,20 @@ event.evening_astronomical_twilight_time
|
|
|
224
278
|
# => 2025-04-24 20:56:34 UTC
|
|
225
279
|
```
|
|
226
280
|
|
|
227
|
-
|
|
281
|
+
### Drop of `EphemerideLunaireParisienne`
|
|
228
282
|
|
|
229
283
|
`EphemerideLunaireParisienne` has been removed.
|
|
230
284
|
|
|
231
|
-
|
|
285
|
+
### Drop of `Util::Astrodynamics`
|
|
232
286
|
|
|
233
287
|
`Util::Astrodynamics` has been removed.
|
|
234
288
|
|
|
235
|
-
|
|
289
|
+
### Drop of `Util::Maths.interpolate` and `Util::Maths.normalize_angles_for_interpolation`
|
|
236
290
|
|
|
237
291
|
`Util::Maths.interpolate` and `Util::Maths.normalize_angles_for_interpolation`
|
|
238
292
|
have been removed.
|
|
239
293
|
|
|
240
|
-
|
|
294
|
+
### Drop of `Constants::SECONDS_PER_DEGREE`
|
|
241
295
|
|
|
242
296
|
`Constants::SECONDS_PER_DEGREE` has been removed.
|
|
243
297
|
|