telescope-term 0.5.1 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/telescope +59 -31
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4b0126ce3cf3b86c84f8f52e82e76c7e9c8e6d00c91d10d0814f817a6e38e4e
|
4
|
+
data.tar.gz: ae64b594368f3934623f6805baf839d9c24649a6335167013fec173cb41aa781
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d6ae5826300b3bd8489bbb339a4af342ee3c48815d491fe1134d334548a49bb8c23e377dd5b89dc25c376b448ad5d05e3da93021da63f69ccb5cf032bb043d1
|
7
|
+
data.tar.gz: 11fb99f9393c15ffd4a1872a0b0a6454e0ea22120e353bd9bf4eed901699ef788d8939509a32cdd69962b5083cedd38cf015f4f78ea7371603f88a598625faff
|
data/bin/telescope
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
WELCOME TO TELESCOPE - A TERMINAL/CONSOLE PROGRAM FOR THE AMATEUR ASTRONOMER.
|
5
5
|
The top panel lists your telescopes with eyepieces in the lower panel. Add a telescope by pressing 't' and fill in the name, the
|
6
6
|
apperature (APP) and the focal length (FL) in the "command line" at the bottom and press ENTER. Add an eyepiece with 'e' and enter
|
7
|
-
a name, the focal length (FL) and apparent field of view (AFOV) and press ENTER. Select items by
|
7
|
+
a name, the focal length (FL) and apparent field of view (AFOV) and press ENTER. Select items by using the TAB/UP/DOWN cursor keys.
|
8
8
|
Press ENTER on a selected item to change the values in the command line. Delete an item by pressing 'D'. Move an with PgUP/PgDown keys.
|
9
9
|
Tag items with the SPACE key (untag all with 'u'), then press 'o' to create an observation log file (content shown in the lower panel).
|
10
10
|
Refresh all panels with the 'r' key. Escape the selected panels or the command line by pressing 'Ctrl-G'. Quit via 'q' (or 'Q' if you
|
@@ -54,6 +54,12 @@ end
|
|
54
54
|
class Numeric # NUMERIC CLASS EXTENSION
|
55
55
|
def deg
|
56
56
|
self * Math::PI / 180
|
57
|
+
end
|
58
|
+
def rad
|
59
|
+
self * 180 / Math::PI
|
60
|
+
end
|
61
|
+
def dec2
|
62
|
+
"%.2f" % self
|
57
63
|
end
|
58
64
|
end
|
59
65
|
class Curses::Window # CLASS EXTENSION
|
@@ -243,15 +249,37 @@ def main_getkey # GET KEY FROM USER
|
|
243
249
|
end
|
244
250
|
when 'UP' # Examples of moving up and down in a window
|
245
251
|
if @tsmark
|
246
|
-
|
252
|
+
if @tsmark == 0
|
253
|
+
@tsmark = false
|
254
|
+
else
|
255
|
+
@tsmark -= 1
|
256
|
+
end
|
247
257
|
elsif @epmark
|
248
|
-
|
258
|
+
if @epmark == 0
|
259
|
+
@epmark = false
|
260
|
+
@tsmark = @ts.length - 1
|
261
|
+
else
|
262
|
+
@epmark -= 1
|
263
|
+
end
|
264
|
+
else
|
265
|
+
@epmark = @ep.length - 1
|
249
266
|
end
|
250
267
|
when 'DOWN'
|
251
268
|
if @tsmark
|
252
|
-
|
269
|
+
if @tsmark == @ts.length - 1
|
270
|
+
@tsmark = false
|
271
|
+
@epmark = 0
|
272
|
+
else
|
273
|
+
@tsmark += 1
|
274
|
+
end
|
253
275
|
elsif @epmark
|
254
|
-
|
276
|
+
if @epmark == @ep.length - 1
|
277
|
+
@epmark = false
|
278
|
+
else
|
279
|
+
@epmark += 1
|
280
|
+
end
|
281
|
+
else
|
282
|
+
@tsmark = 0
|
255
283
|
end
|
256
284
|
when 'PgUP'
|
257
285
|
if @tsmark
|
@@ -333,7 +361,7 @@ def observe
|
|
333
361
|
mag = (5 * Math::log(d/10, 10) + 7.5).truncate(1).to_s
|
334
362
|
obs += " Max MAG: " + mag
|
335
363
|
sepd = (115.824/d).truncate(2).to_s
|
336
|
-
sepr = (3600*Math::asin(671E-6/d)
|
364
|
+
sepr = (3600*Math::asin(671E-6/d).rad).truncate(2).to_s
|
337
365
|
obs += " Min SEP: " + sepd + "/" + sepr + "\n"
|
338
366
|
end
|
339
367
|
obs += "No telescope(s) chosen for the observation\n" if @tstag.empty?
|
@@ -374,51 +402,51 @@ end
|
|
374
402
|
# TELESCOPE FUNCTIONS (top window, w_ts)
|
375
403
|
def w_ts_show
|
376
404
|
@w_ts.setpos(0,0)
|
377
|
-
heading = " TELESCOPES
|
405
|
+
heading = " TELESCOPES APP(mm) FL(mm) F/? <MAG xEYE MINx MAXx *FIELD GX/NEB PL/GCL PLd/2* TGHT2* DL-SEP RC-SEP MOON SUN"
|
378
406
|
heading += " " * (@w_ts.maxx - heading.length).abs
|
379
407
|
@w_ts.pa(255, 94, Curses::A_BOLD, heading)
|
380
408
|
@w_ts.fg = 15
|
381
409
|
@w_ts.bg = 0
|
382
410
|
@ts.each_with_index do |scope, i|
|
383
|
-
name = scope[0]
|
411
|
+
name = scope[0][0...18]
|
384
412
|
d = scope[1]
|
385
413
|
f = scope[2]
|
386
|
-
out = " " + name.ljust(
|
414
|
+
out = " " + name.ljust(18)
|
387
415
|
out += d.to_s.rjust(8)
|
388
416
|
out += f.to_s.rjust(8)
|
389
417
|
attr = Curses::A_BOLD
|
390
418
|
attr = attr | Curses::A_REVERSE if @tsmark == i
|
391
419
|
attr = attr | Curses::A_UNDERLINE if @tstag.include?(i)
|
392
|
-
@w_ts.pa(254, 0, attr, out)
|
420
|
+
@w_ts.pa(254, 0, attr, out) # Basic info (Name, APP, FL)
|
393
421
|
out = (f.to_f/d.to_f).truncate(1).to_s.rjust(6)
|
394
|
-
@w_ts.pa(254, 0, 0, out)
|
422
|
+
@w_ts.pa(254, 0, 0, out) # F/?
|
395
423
|
out = (5 * Math::log(d/10, 10) + 7.5).truncate(1).to_s.rjust(6)
|
396
|
-
@w_ts.pa(229, 0, 0, out)
|
424
|
+
@w_ts.pa(229, 0, 0, out) # <MAG
|
397
425
|
out = (d**2/49).to_i.to_s.rjust(6)
|
398
|
-
@w_ts.pa(229, 0, 0, out)
|
426
|
+
@w_ts.pa(229, 0, 0, out) # xEYE
|
399
427
|
out = magx(d, f, 1/7.to_f)
|
400
|
-
@w_ts.pa(194, 0, 0, out)
|
428
|
+
@w_ts.pa(194, 0, 0, out) # MINx
|
401
429
|
out = magx(d, f, 2)
|
402
|
-
@w_ts.pa(194, 0, 0, out)
|
430
|
+
@w_ts.pa(194, 0, 0, out) # MAXx
|
403
431
|
out = magx(d, f, 1/6.4)
|
404
|
-
@w_ts.pa(189, 0, 0, out)
|
432
|
+
@w_ts.pa(189, 0, 0, out) # *FIELD
|
405
433
|
out = magx(d, f, 1/3.6)
|
406
|
-
@w_ts.pa(189, 0, 0, out)
|
434
|
+
@w_ts.pa(189, 0, 0, out) # GX/NEB
|
407
435
|
out = magx(d, f, 1/2.1)
|
408
|
-
@w_ts.pa(189, 0, 0, out)
|
436
|
+
@w_ts.pa(189, 0, 0, out) # PL/GCL
|
409
437
|
out = magx(d, f, 1/1.3)
|
410
|
-
@w_ts.pa(189, 0, 0, out)
|
438
|
+
@w_ts.pa(189, 0, 0, out) # PLd/2*
|
411
439
|
out = magx(d, f, 1/0.7)
|
412
|
-
@w_ts.pa(189, 0, 0, out)
|
413
|
-
out = (115.824/d).truncate(2).to_s.rjust(7)
|
414
|
-
@w_ts.pa(219, 0, 0, out)
|
415
|
-
out = (3600*Math::asin(671E-6/d)
|
416
|
-
@w_ts.pa(219, 0, 0, out)
|
417
|
-
moon = (384E6*Math::tan((
|
440
|
+
@w_ts.pa(189, 0, 0, out) # TGHT2*
|
441
|
+
out = (115.824/d).truncate(2).dec2.to_s.rjust(7)
|
442
|
+
@w_ts.pa(219, 0, 0, out) # DL-SEP
|
443
|
+
out = (3600*Math::asin(671E-6/d).rad).truncate(2).dec2.to_s.rjust(8)
|
444
|
+
@w_ts.pa(219, 0, 0, out) # RC-SEP
|
445
|
+
moon = (384E6*Math::tan((115.824.deg/d)/3600))
|
418
446
|
out = moon.to_i.to_s.rjust(6) + "m"
|
419
|
-
@w_ts.pa(225, 0, 0, out)
|
447
|
+
@w_ts.pa(225, 0, 0, out) # MOON
|
420
448
|
out = (moon/2.5668).to_i.to_s.rjust(5) + "km"
|
421
|
-
@w_ts.pa(225, 0, 0, out)
|
449
|
+
@w_ts.pa(225, 0, 0, out) # SUN
|
422
450
|
@w_ts.p("\n")
|
423
451
|
end
|
424
452
|
@w_ts.clr_from_cur_line
|
@@ -433,7 +461,7 @@ end
|
|
433
461
|
def w_ep_show
|
434
462
|
@w_ep.setpos(0,0)
|
435
463
|
scopes = 5
|
436
|
-
heading = " ".rjust(
|
464
|
+
heading = " ".rjust(35)
|
437
465
|
@w_ep.pa(231, 240, 0, heading)
|
438
466
|
@ts.each do |scope|
|
439
467
|
@w_ep.pa(231, 240, Curses::A_BOLD, "│ ")
|
@@ -442,17 +470,17 @@ def w_ep_show
|
|
442
470
|
end
|
443
471
|
heading = " " * (@w_ep.maxx - @w_ep.curx)
|
444
472
|
@w_ep.p(heading)
|
445
|
-
heading = " EYEPIECES
|
473
|
+
heading = " EYEPIECES FL(mm) AFOV "
|
446
474
|
heading += "│ xMAGN FOV(dms) XPUP " * @ts.length
|
447
475
|
heading += " " * (@w_ep.maxx - heading.length).abs
|
448
476
|
@w_ep.pa(231, 240, Curses::A_BOLD, heading)
|
449
477
|
@w_ep.fg = 15
|
450
478
|
@w_ep.bg = 0
|
451
479
|
@ep.each_with_index do |ep, i|
|
452
|
-
name = ep[0]
|
480
|
+
name = ep[0][0...18]
|
453
481
|
m = ep[1].truncate(1)
|
454
482
|
a = ep[2]
|
455
|
-
out = " " + name.ljust(
|
483
|
+
out = " " + name.ljust(18)
|
456
484
|
out += m.to_s.rjust(8)
|
457
485
|
out += a.to_s.rjust(6) + "°"
|
458
486
|
attr = Curses::A_BOLD
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telescope-term
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -32,8 +32,8 @@ dependencies:
|
|
32
32
|
version: 1.3.2
|
33
33
|
description: 'With this program you can list your telescopes and eyepieces and get
|
34
34
|
a set of calculations done for each scope and for the combination of scope and eyepiece.
|
35
|
-
Easy interface. Run the program, then hit ''?'' to show the help file. New in v0.5.
|
36
|
-
|
35
|
+
Easy interface. Run the program, then hit ''?'' to show the help file. New in v0.5.4:
|
36
|
+
Fixed minor glitch.'
|
37
37
|
email: g@isene.com
|
38
38
|
executables:
|
39
39
|
- telescope
|