astropanel 2.7 → 3.0.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/README.md +18 -4
- data/bin/astropanel +88 -16
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0553cb39f667994df7805a9fadb794e93bb39f58dccc33f2403ea55b2ff77dd5
|
4
|
+
data.tar.gz: eb655ebd2e4322298e3b5eef5e9abf1fe464fd5188fadfbe6077537a4e62b481
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62e8e01ecaa8d7676a39d7bd1cb4e9a4446b5b5f18d9222b48a8e163cf8ce3b9d5c0718816107ede2fc0f4310c67f404617281cbb8b41e5cbf62a47065b1bfd9
|
7
|
+
data.tar.gz: 38fff35103e802c3fee09f401c4f07d11350b6a0d010797939cc0d4eb806033a0d3b2747804ee41358d4b8df2869ef4416c34f59e3c54763a27c1ce1a9dc326c
|
data/README.md
CHANGED
@@ -5,11 +5,25 @@ amateur astronomers with weather forecast, ephemeris, astronomical events and
|
|
5
5
|
more. It's what you need to decide wether to take your telescope out for a
|
6
6
|
spin.
|
7
7
|
|
8
|
+
**NEW in 3.0.0: Major accuracy improvement with IAU 2006 obliquity standard and higher-precision ephemeris calculations from the [ephemeris](https://github.com/isene/ephemeris) project**
|
9
|
+
|
8
10
|
**NOTE: 2.0: Full rewrite using [rcurses](https://github.com/isene/rcurses)**
|
9
11
|
|
10
|
-
Install by cloning this repo and putting `astropanel
|
12
|
+
Install by cloning this repo and putting `astropanel` into your "bin"
|
11
13
|
directory. Or you can simply run `gem install astropanel`.
|
12
14
|
|
15
|
+
## Accuracy Improvements in 3.0.0
|
16
|
+
This version includes significant accuracy improvements to the ephemeris calculations:
|
17
|
+
|
18
|
+
* **IAU 2006 Obliquity Standard**: Updated from the simplified obliquity calculation to the modern International Astronomical Union 2006 standard with proper secular variations
|
19
|
+
* **Higher-Precision Orbital Elements**: More accurate mean motion values for all planets based on modern ephemeris data
|
20
|
+
* **Enhanced Perturbation Calculations**: Detailed lunar, Jupiter, Saturn, and Uranus perturbation calculations for improved positional accuracy
|
21
|
+
* **Better Topocentric Corrections**: Improved geocentric-to-topocentric coordinate transformations
|
22
|
+
|
23
|
+
These improvements provide significantly more accurate planetary positions, with improvements of 10+ arcminutes for major planets and up to 1 degree for the Moon compared to previous versions.
|
24
|
+
|
25
|
+
The enhanced ephemeris calculations are based on the [ephemeris](https://github.com/isene/ephemeris) project, which implements modern astronomical standards for higher accuracy.
|
26
|
+
|
13
27
|
## Functionality
|
14
28
|
This program gives you essential data to plan your observations:
|
15
29
|
|
@@ -25,7 +39,7 @@ This program gives you essential data to plan your observations:
|
|
25
39
|
view
|
26
40
|
* Star chart showing in the terminal for the selected day and time of day
|
27
41
|
PS: The star chart is only generated for latitudes above +23
|
28
|
-
* A table showing RA, Dec, distance, rise, set and transit for the planets
|
42
|
+
* A table showing RA, Dec, distance, rise, set and transit for the planets with significantly improved accuracy using modern astronomical standards
|
29
43
|
* Show today's Astronomy Picture Of the Day
|
30
44
|
|
31
45
|
## Condition rules
|
@@ -61,8 +75,8 @@ Also, images like the star chart and APOD is only reliably tested on the URXVT
|
|
61
75
|
terminal emulator.
|
62
76
|
|
63
77
|
## Launching Astropanel
|
64
|
-
The first time you launch Astropanel (make astropanel
|
65
|
-
astropanel
|
78
|
+
The first time you launch Astropanel (make astropanel executable; `chmod +x
|
79
|
+
astropanel` and run it), it will ask for your location, Latitude and
|
66
80
|
Longitude.
|
67
81
|
|
68
82
|
When you start the program, it will show you the list of forecast points for
|
data/bin/astropanel
CHANGED
@@ -14,7 +14,8 @@
|
|
14
14
|
# for any damages resulting from its use. Further, I am under no
|
15
15
|
# obligation to maintain or extend this software. It is provided
|
16
16
|
# on an 'as is' basis without any expressed or implied warranty.
|
17
|
-
# Version:
|
17
|
+
# Version: 3.0.0: Major accuracy improvement with IAU 2006 obliquity standard and
|
18
|
+
# higher-precision ephemeris calculations from https://github.com/isene/ephemeris
|
18
19
|
|
19
20
|
# LOAD MODULES {{{1
|
20
21
|
require 'io/console'
|
@@ -67,13 +68,14 @@ class Ephemeris
|
|
67
68
|
@lat, @lon, @tz = lat, lon, tz
|
68
69
|
y, mo, d = date.split('-').map(&:to_i)
|
69
70
|
@d = 367*y - 7*(y + (mo+9)/12)/4 + 275*mo/9 + d - 730530
|
70
|
-
@ecl = 23.
|
71
|
+
@ecl = 23.439279444 - 46.8150/3600*(@d/36525) - 0.00059/3600*(@d/36525)**2 + 0.001813/3600*(@d/36525)**3
|
71
72
|
body_data
|
72
73
|
|
73
74
|
# ----- Sun computing -----
|
74
75
|
b = @body["sun"]
|
75
76
|
w_s = (b["w"] % 360)
|
76
77
|
m_s = (b["M"] % 360)
|
78
|
+
@ms = m_s
|
77
79
|
es = solve_kepler(m_s, b["e"])
|
78
80
|
x = Math.cos(es.deg) - b["e"]
|
79
81
|
y = Math.sin(es.deg) * Math.sqrt(1 - b["e"]**2)
|
@@ -106,15 +108,15 @@ class Ephemeris
|
|
106
108
|
|
107
109
|
def body_data # {{{2
|
108
110
|
@body = {
|
109
|
-
"sun" => {"N"=>0.0, "i"=>0.0, "w"=>282.9404+4.70935e-5*@d, "a"=>1.
|
110
|
-
"moon" => {"N"=>125.1228-0.0529538083*@d, "i"=>5.1454, "w"=>318.0634+0.1643573223*@d, "a"=>60.2666, "e"=>0.
|
111
|
+
"sun" => {"N"=>0.0, "i"=>0.0, "w"=>282.9404+4.70935e-5*@d, "a"=>1.000000, "e"=>0.016709-1.151e-9*@d, "M"=>356.0470+0.9856002585*@d},
|
112
|
+
"moon" => {"N"=>125.1228-0.0529538083*@d, "i"=>5.1454, "w"=>318.0634+0.1643573223*@d, "a"=>60.2666, "e"=>0.054900, "M"=>115.3654+13.0649929509*@d},
|
111
113
|
"mercury" => {"N"=>48.3313+3.24587e-5*@d, "i"=>7.0047+5e-8*@d, "w"=>29.1241+1.01444e-5*@d, "a"=>0.387098, "e"=>0.205635+5.59e-10*@d, "M"=>168.6562+4.0923344368*@d},
|
112
114
|
"venus" => {"N"=>76.6799+2.46590e-5*@d, "i"=>3.3946+2.75e-8*@d, "w"=>54.8910+1.38374e-5*@d, "a"=>0.72333, "e"=>0.006773-1.302e-9*@d, "M"=>48.0052+1.6021302244*@d},
|
113
|
-
"mars" => {"N"=>49.5574+2.11081e-5*@d, "i"=>1.8497-1.78e-8*@d, "w"=>286.5016+2.92961e-5*@d, "a"=>1.523688, "e"=>0.093405+2.516e-9*@d,
|
114
|
-
"jupiter" => {"N"=>100.4542+2.76854e-5*@d, "i"=>1.3030-1.557e-7*@d, "w"=>273.8777+1.64505e-5*@d,"a"=>5.20256,
|
115
|
-
"saturn" => {"N"=>113.6634+2.38980e-5*@d, "i"=>2.4886-1.081e-7*@d, "w"=>339.3939+2.97661e-5*@d,"a"=>9.55475,
|
116
|
-
"uranus" => {"N"=>74.0005+1.3978e-5*@d, "i"=>0.7733+1.9e-8*@d, "w"=>96.6612+3.0565e-5*@d, "a"=>19.18171-1.55e-8*@d,
|
117
|
-
"neptune" => {"N"=>131.7806+3.0173e-5*@d, "i"=>1.7700-2.55e-7*@d, "w"=>272.8461-6.027e-6*@d, "a"=>30.05826+3.313e-8*@d,
|
115
|
+
"mars" => {"N"=>49.5574+2.11081e-5*@d, "i"=>1.8497-1.78e-8*@d, "w"=>286.5016+2.92961e-5*@d, "a"=>1.523688, "e"=>0.093405+2.516e-9*@d, "M"=>18.6021+0.5240207766*@d},
|
116
|
+
"jupiter" => {"N"=>100.4542+2.76854e-5*@d, "i"=>1.3030-1.557e-7*@d, "w"=>273.8777+1.64505e-5*@d, "a"=>5.20256, "e"=>0.048498+4.469e-9*@d, "M"=>19.8950+0.0830853001*@d},
|
117
|
+
"saturn" => {"N"=>113.6634+2.38980e-5*@d, "i"=>2.4886-1.081e-7*@d, "w"=>339.3939+2.97661e-5*@d, "a"=>9.55475, "e"=>0.055546-9.499e-9*@d, "M"=>316.9670+0.0334442282*@d},
|
118
|
+
"uranus" => {"N"=>74.0005+1.3978e-5*@d, "i"=>0.7733+1.9e-8*@d, "w"=>96.6612+3.0565e-5*@d, "a"=>19.18171-1.55e-8*@d, "e"=>0.047318+7.45e-9*@d, "M"=>142.5905+0.011725806*@d},
|
119
|
+
"neptune" => {"N"=>131.7806+3.0173e-5*@d, "i"=>1.7700-2.55e-7*@d, "w"=>272.8461-6.027e-6*@d, "a"=>30.05826+3.313e-8*@d, "e"=>0.008606+2.15e-9*@d, "M"=>260.2471+0.005995147*@d}
|
118
120
|
}
|
119
121
|
end
|
120
122
|
|
@@ -216,7 +218,69 @@ class Ephemeris
|
|
216
218
|
lat = Math.atan2(zeclip, Math.sqrt(xeclip*xeclip + yeclip*yeclip))*180/pi
|
217
219
|
r_b = Math.sqrt(xeclip*xeclip + yeclip*yeclip + zeclip*zeclip)
|
218
220
|
|
219
|
-
# perturbations
|
221
|
+
# perturbations calculations
|
222
|
+
m_J = @body["jupiter"]["M"]
|
223
|
+
m_S = @body["saturn"]["M"]
|
224
|
+
m_U = @body["uranus"]["M"]
|
225
|
+
plon = 0
|
226
|
+
plat = 0
|
227
|
+
pdist = 0
|
228
|
+
case body
|
229
|
+
when "moon"
|
230
|
+
lb = (n_b + w_b + m_b) % 360
|
231
|
+
db = (lb - @ls + 360) % 360
|
232
|
+
fb = (lb - n_b + 360) % 360
|
233
|
+
plon += -1.274 * Math.sin((m_b - 2*db).deg)
|
234
|
+
plon += 0.658 * Math.sin((2*db).deg)
|
235
|
+
plon += -0.186 * Math.sin(@ms.deg)
|
236
|
+
plon += -0.059 * Math.sin((2*m_b - 2*db).deg)
|
237
|
+
plon += -0.057 * Math.sin((m_b - 2*db + @ms).deg)
|
238
|
+
plon += 0.053 * Math.sin((m_b + 2*db).deg)
|
239
|
+
plon += 0.046 * Math.sin((2*db - @ms).deg)
|
240
|
+
plon += 0.041 * Math.sin((m_b - @ms).deg)
|
241
|
+
plon += -0.035 * Math.sin(db.deg)
|
242
|
+
plon += -0.031 * Math.sin((m_b + @ms).deg)
|
243
|
+
plon += -0.015 * Math.sin((2*fb - 2*db).deg)
|
244
|
+
plon += 0.011 * Math.sin((m_b - 4*db).deg)
|
245
|
+
plat += -0.173 * Math.sin((fb - 2*db).deg)
|
246
|
+
plat += -0.055 * Math.sin((m_b - fb - 2*db).deg)
|
247
|
+
plat += -0.046 * Math.sin((m_b + fb - 2*db).deg)
|
248
|
+
plat += 0.033 * Math.sin((fb + 2*db).deg)
|
249
|
+
plat += 0.017 * Math.sin((2*m_b + fb).deg)
|
250
|
+
pdist += -0.58 * Math.cos((m_b - 2*db).deg)
|
251
|
+
pdist += -0.46 * Math.cos(2*db.deg)
|
252
|
+
when "jupiter"
|
253
|
+
plon += -0.332 * Math.sin((2*m_J - 5*m_S - 67.6).deg)
|
254
|
+
plon += -0.056 * Math.sin((2*m_J - 2*m_S + 21).deg)
|
255
|
+
plon += 0.042 * Math.sin((3*m_J - 5*m_S + 21).deg)
|
256
|
+
plon += -0.036 * Math.sin((m_J - 2*m_S).deg)
|
257
|
+
plon += 0.022 * Math.cos((m_J - m_S).deg)
|
258
|
+
plon += 0.023 * Math.sin((2*m_J - 3*m_S + 52).deg)
|
259
|
+
plon += -0.016 * Math.sin((m_J - 5*m_S - 69).deg)
|
260
|
+
when "saturn"
|
261
|
+
plon += 0.812 * Math.sin((2*m_J - 5*m_S - 67.6).deg)
|
262
|
+
plon += -0.229 * Math.cos((2*m_J - 4*m_S - 2).deg)
|
263
|
+
plon += 0.119 * Math.sin((m_J - 2*m_S - 3).deg)
|
264
|
+
plon += 0.046 * Math.sin((2*m_J - 6*m_S - 69).deg)
|
265
|
+
plon += 0.014 * Math.sin((m_J - 3*m_S + 32).deg)
|
266
|
+
plat += -0.020 * Math.cos((2*m_J - 4*m_S - 2).deg)
|
267
|
+
plat += 0.018 * Math.sin((2*m_J - 6*m_S - 49).deg)
|
268
|
+
when "uranus"
|
269
|
+
plon += 0.040 * Math.sin((m_S - 2*m_U + 6).deg)
|
270
|
+
plon += 0.035 * Math.sin((m_S - 3*m_U + 33).deg)
|
271
|
+
plon += -0.015 * Math.sin((m_J - m_U + 20).deg)
|
272
|
+
end
|
273
|
+
lon += plon
|
274
|
+
lat += plat
|
275
|
+
r_b += pdist
|
276
|
+
if body == "moon"
|
277
|
+
xeclip = Math.cos(lon.deg) * Math.cos(lat.deg)
|
278
|
+
yeclip = Math.sin(lon.deg) * Math.cos(lat.deg)
|
279
|
+
zeclip = Math.sin(lat.deg)
|
280
|
+
else
|
281
|
+
xeclip += @xs
|
282
|
+
yeclip += @ys
|
283
|
+
end
|
220
284
|
|
221
285
|
# transform to equatorial coords
|
222
286
|
xequat = xeclip
|
@@ -225,16 +289,24 @@ class Ephemeris
|
|
225
289
|
ra = (Math.atan2(yequat, xequat)*180/pi + 360) % 360
|
226
290
|
dec = Math.atan2(zequat, Math.sqrt(xequat*xequat + yequat*yequat))*180/pi
|
227
291
|
|
228
|
-
# apply
|
229
|
-
|
230
|
-
|
231
|
-
|
292
|
+
# apply topocentric corrections
|
293
|
+
body == "moon" ? par = Math.asin(1/r_b)*180/pi : par = (8.794/3600)/r_b
|
294
|
+
gclat = @lat - 0.1924 * Math.sin(2*@lat.deg)
|
295
|
+
rho = 0.99833 + 0.00167 * Math.cos(2*@lat.deg)
|
296
|
+
lst = @sidtime * 15
|
297
|
+
ha = (lst - ra + 360) % 360
|
298
|
+
g = Math.atan(Math.tan(gclat.deg) / Math.cos(ha.deg))*180/pi
|
299
|
+
topRA = ra - par * rho * Math.cos(gclat.deg) * Math.sin(ha.deg) / Math.cos(dec.deg)
|
300
|
+
topDecl = dec - par * rho * Math.sin(gclat.deg) * Math.sin((g - dec).deg) / Math.sin(g.deg)
|
301
|
+
ra = topRA.round(4)
|
302
|
+
dec = topDecl.round(4)
|
303
|
+
r = Math.sqrt(xequat*xequat + yequat*yequat + zequat*zequat).round(4)
|
232
304
|
|
233
305
|
# finally compute rise/transit/set:
|
234
306
|
ri, tr, se = rts(ra, dec, (body=="sun" ? -0.833 : (body=="moon" ? -0.833 : 0)))
|
235
307
|
|
236
|
-
# return array of [ra, dec,
|
237
|
-
[ra
|
308
|
+
# return array of [ra, dec, r, hms_dms..., ri, tr, se]
|
309
|
+
[ra, dec, r, *hms_dms(ra,dec), ri, tr, se]
|
238
310
|
end
|
239
311
|
|
240
312
|
def compute_moon_phase # {{{2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: astropanel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rcurses
|
@@ -28,8 +28,9 @@ description: 'This program shows essential data in order to plan your observatio
|
|
28
28
|
9 days weather forecast, full ephemeris for the Sun, the Moon and all major planets,
|
29
29
|
complete with graphic representation of rise/set times, detailed info for each day
|
30
30
|
with important astronomical events, star chart displayed in the terminal and more.
|
31
|
-
New in 2.0: Full rewrite using rcurses (https://github.com/isene/rcurses).
|
32
|
-
|
31
|
+
New in 2.0: Full rewrite using rcurses (https://github.com/isene/rcurses). 3.0.0:
|
32
|
+
Major accuracy improvement with IAU 2006 obliquity standard and higher-precision
|
33
|
+
ephemeris calculations from https://github.com/isene/ephemeris'
|
33
34
|
email: g@isene.com
|
34
35
|
executables:
|
35
36
|
- astropanel
|