home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 058.lha / Stars < prev    next >
Encoding:
Text File  |  1986-11-20  |  7.9 KB  |  247 lines

  1.  REM *****                            STARS                             *****
  2.  REM *****                  James A. Ingram  7-Jan-81                   *****
  3.  REM *****          Typed from Creative Computing Mag. June/83          *****
  4.  REM *****                  Conversion to AmigaBASIC                    *****
  5.  REM *****                             by                               *****
  6.  REM *****                      Delton  C. Brown                        *****
  7.  REM *****                     Houston, TX  77082                       *****
  8.  REM *****                          22-Jun-86                           *****
  9.  REM *****  Change values in 270: to reflect your latitude & longitude  *****
  10.  CLEAR 
  11.  CLS
  12.  PRINT "****************************************";
  13.  PRINT "****************************************"
  14.  PRINT "**                      TABLE OF VISIBLE SKY OBJECTS";TAB(76)"**"
  15.  PRINT "**     This program checks through a master containing";
  16.  PRINT " stars and other in- **"
  17.  PRINT "** teresting objects in the night sky, and determining which";
  18.  PRINT " ones are vis- ***"
  19.  PRINT "** ible at a specific time and date. It then calculates the ";
  20.  PRINT "compass bear-  **"
  21.  PRINT "** ing and altitude above the horizon for that time. The table  ";
  22.  PRINT "includes   **"
  23.  PRINT "** the name, magnitude, right ascension, declanation, bearing, an";
  24.  PRINT "d alti-   **"
  25.  PRINT "** tude. Note that time must be entered in 24 hour format (2:00 pm=14:";
  26.  PRINT "00)  **"
  27.  PRINT "** and that numbers less than 10 must be entered as 2 digits with a le";
  28.  PRINT "ad-  **"
  29.  PRINT "** ing zero (05).                                                          **"
  30.  PRINT "****************************************";
  31.  PRINT "****************************************"
  32.  PRINT
  33. 270 :  
  34.  lng=95.21
  35.  lat=29.45
  36.  gx=18
  37.  n=91
  38. 280 :
  39.  INPUT"Date (MM/DD) : ";dat$
  40.  INPUT"Time in 24 hr. format (HH:MM) : ";tim$
  41.  INPUT"Standard time (S) or Daylight (D) ";f$
  42.  INPUT"Maximum magnitude (minimum btightness) for table";mg
  43.   th=VAL(LEFT$(tim$,2))
  44.   tm=VAL(RIGHT$(tim$,2))
  45.   tz=th+tm/60
  46.   IF f$="d" AND f$="D" THEN gx=gx+1
  47.   gt=tz-gx
  48.   IF gt<0 THEN gt=gt+24  
  49. 345 :  
  50.   IF gt<24 THEN 360
  51.   gt=gt-24
  52.   GOTO 345
  53. 360 :
  54.   tl=gt+lng/360*24  
  55. 365 :  
  56.   IF tl<24 THEN 380
  57.   tl=tl-24
  58.   GOTO 365
  59. 380 :  
  60.   tl$=STR$(INT(tl))+":"+STR$(INT((tl-INT(tl))*60))
  61.   gt$=STR$(INT(gt))+":"+STR$(INT((gt-INT(gt))*60))
  62.   m=VAL(LEFT$(dat$,2))
  63.   dy=VAL(RIGHT$(dat$,2))
  64.   IF dy=22 AND m=9 THEN cd=0:GOTO 485
  65.   IF dy>22 AND m=9 THEN cd=dy-22:GOTO 485
  66.   IF m=10 THEN cd=8+dy:GOTO 485
  67.   IF m<9 OR (m=9 AND dy<22)THEN m=m+12:GOTO 440
  68.   IF m>10 THEN 440
  69.   PRINT "Improper date. Please re-enter.";GOTO 280
  70. 440 :  
  71.   r=m-10
  72.   cd=8
  73.   FOR x=1 TO r
  74.   READ d1
  75.   cd=cd+d1
  76.   NEXT x
  77.   DATA 31,30,31,31,28,31,30,31,30,31,31,30
  78.   RESTORE
  79.   cd=cd+dy
  80. 485 :
  81.   zlh=cd*24/365+tl
  82.   IF zlh>24 THEN zlh=zlh-24
  83.   zlh$=STR$(INT(zlh))+":"+STR$(INT((zlh-INT(zlh))*60))
  84.   CLS
  85.   PRINT TAB(20)"Celestial Object Availability Table"
  86.   GOSUB 830
  87.   PRINT :PRINT 
  88.   PRINT "Date "dat$;TAB(48)"Days from Sept. 22 = ";cd
  89.   PRINT "Local zone time ";tim$;" (GMT = ";gt$;")";
  90.   PRINT TAB(48)"Local star time ";tl$
  91.   GOSUB 830
  92.   PRINT "Latitude "lat;"Degrees North.";
  93.   PRINT TAB(48)"Longitude ";lng;"Degrees East."
  94.   PRINT "Objects brighter than magnitude";mg;
  95.   PRINT TAB(48)"Zenith at ";zlh$;" hrs. R.A."
  96.   GOSUB 830
  97.   PRINT :PRINT :PRINT 
  98.   PRINT "Object";TAB(33)"Mag.";TAB(41)"R.A.";
  99.   PRINT TAB(50)"Decl.";TAB(59)"Brng.";TAB(69)"Alt."
  100.   PRINT "---------------------------------------";
  101.   PRINT "---------------------------------------"
  102.   PRINT 
  103.   GOSUB 830
  104.   lat=lat*6.28318/360
  105.   lat=3.14159/2-lat
  106.   FOR j=1 TO n
  107.   READ n$,br,ra$,d
  108.   IF br>mg THEN 805
  109.   ra=VAL(LEFT$(ra$,2))+VAL(RIGHT$(ra$,2))/60
  110.   zra=(ra-zlh)*15
  111.   IF zra>360 THEN zra=zra-360
  112.   IF zra<0 THEN zra=zra+360
  113.   alt=90-d
  114.   zpi=zra*6.28318/360
  115.   api=alt*6.28318/360
  116.   x=SIN(api)*COS(zpi)
  117.   y=SIN(api)*SIN(zpi)
  118.   z=COS(api)
  119.   x1=x*COS(lat)-z*SIN(lat)
  120.   z1=x*SIN(lat)+z*COS(lat)
  121.   x=x1:z=z1
  122.   a=ATN(z/(SQR(x*x+y*y)))*360/6.28318
  123.   IF a<0 THEN 805
  124.   b=ATN(y/x)*360/6.28318
  125.   IF x>0 AND dy>0 THEN b=180-b:GOTO 770
  126.   IF x>0 AND dy<0 THEN b=180-b:GOTO 770
  127.   IF x<0 AND y>0 THEN b=-b:GOTO 770
  128.   IF x<0 AND y<0 THEN b=360-b:GOTO 770
  129. 770 :
  130.   PRINT n$;TAB(33)br;TAB(40)ra$;TAB(49)d;
  131.   PRINT USING"    ###.#";b;
  132.   PRINT USING"    ###.#";a
  133.   GOSUB 840
  134. 805 :  
  135.   NEXT j
  136.   END
  137. 830 :
  138.   FOR q=1 TO 500:NEXT q
  139.   RETURN
  140. 840 :  
  141.   FOR q=1 TO 100:NEXT q
  142.   RETURN
  143. 860 :  
  144.   DATA sirius (a-canis maj),-1.6,06.13,-16.7
  145.   DATA canopus (a-carina),-.7,06.23,-52.7
  146.   DATA arcturus (a-bootes),-.1,14.14,19.4
  147.   DATA vega (a-lyra),0,18.36,38.8
  148.   DATA capella (a-auriga),.1,05.14,46.1
  149.   DATA rigel (b-orion),2,05.13,-8.3
  150.   DATA procyon (a-canis min),4,07.37,5.4
  151.   DATA betelgeuse (a-orion),.1,05.54,7.4
  152.   DATA altair (a-aquila),.8,19.19,8.8
  153.   DATA aldebaran (a-taurus),.9,04.34,16.5
  154.   DATA antares (a-scopio),1,16.28,-26.3
  155.   DATA spica (a-virgo),1,13.24,-11
  156.   DATA fomalhaut (a-piscis aust),1.2,22.56,-29.7
  157.   DATA pollux (b-gemini),1.2,07.13,28.1
  158.   DATA deneb (a-cygnus),1.3,20.40,45.2
  159.   DATA regulus (a-leo),1.1,10.7,12.1
  160.   DATA castor (a-gemini),1.6,07.33,32
  161.   DATA adhara (e-canis maj),1.6,06.57,-28.9
  162.   DATA bellatrix (g-orion),1.6,05.24,6.1
  163.   DATA shaula (l-scorpio),1.6,17.32,-37.1
  164.   DATA elnath (b-taurus),1.7,05.24,28.6
  165.   DATA alnilam (e-orion),1.7,05.35,-1.2
  166.   DATA mirfak (a-perseus),1.8,03.22,49.8
  167.   DATA dubhe (a-ursa maj),1.8,11.2,61.9
  168.   DATA alioth (e-ursa maj),1.8,12.53,56.1
  169.   DATA gamma velorum,1.8,08.9,-47.3
  170.   DATA kaus australis (e-sagtrs),1.8,18.22,-34.4
  171.   DATA alnitak (z-orion),1.8,05.39,-2
  172.   DATA al nair (a-grus),1.8,22.6,-47.1
  173.   DATA alkaid (n-ursa maj),1.9,13.46,49.5
  174.   DATA alhena (g-gemini),1.9,06.36,16.4
  175.   DATA wezen (d-canis maj),1.9,07.7,-26.4
  176.   DATA theta scorpii,1.9,17.35,-43
  177.   DATA menkalinan (b-auriga),1.9,05.57,45
  178.   DATA mirzam (b-canis maj),2,06.21,-17.9
  179.   DATA delta velorum,2,08.44,-54.6
  180.   DATA polaris (a-ursa min),2,02.3,89.1
  181.   DATA alphard (a-hydra),2,09.26,-8.5
  182.   DATA hamal (a-aries),2,02.5,23.3
  183.   DATA diphda (b-cetus),2,00.42,-18.2
  184.   DATA menkent (th-centauri),2,14.5,-35.2
  185.   DATA mirach (b-andromrda),2,01.8,35.5
  186.   DATA nunki (s-saggtrs),2.1,18.53,-26.3
  187.   DATA rasalhaque (a-ophiuc),2.1,17.34,12.6
  188.   DATA alpheratz (a-androm),2.1,00.7,28.9
  189.   DATA algol (b-perseus),2.1,03.6,40.8
  190.   DATA kochab (b-ursa min),2.1,14.51,74.3
  191.   DATA almach (g-androm),2.1,02.2,42.2
  192.   DATA saiph (k-orion),2.1,05.54,7.4
  193.   DATA schedar (a-cassiopeia),2.1,00.39,56.4
  194.   DATA psi-pisces (dbl 30),5.5,01.4,21.2
  195.   DATA g-androm. (or-bl 10),2,02.2,42.2
  196.   DATA b-orion (rigel 9),0,05.13,-8.2
  197.   DATA th-orion (trapez),5.5,05.34,-5.5
  198.   DATA s-orion (tri. 11-41),4,05.37,-2.6
  199.   DATA a-canis maj (sirius 10),-1.5,06.44,-16.7
  200.   DATA a-gemini (castor 75),2,07.32,32
  201.   DATA t-cancer (or-bl 31),4,8.45,29
  202.   DATA g-leo (dbl 4.5),2.5,10.18,20.2
  203.   DATA z-ursa maj (mizar 14),2.5,13.23,55.2
  204.   DATA e-bootes (gd-bl 3),2.5,14.44,27.3
  205.   DATA z-corona (dbl 6),5,15.39,36.8
  206.   DATA nu-draco (dbl 62),5,17.32,55.2
  207.   DATA e-lyra (dbl-dbl 2.7),5,18.44,39.7
  208.   DATA b-cygni (albireo 34),3,19.30,27.8
  209.   DATA g-delphin (yl-gr 10),1.5,20.15,16
  210.   DATA ngc869 (perseus cl w),4.5,02.17,57
  211.   DATA ngc884 (perseus cl e),4.5,02.21,57
  212.   DATA ngc1528 (60 st. 25'),6.5,04.14,51.2
  213.   DATA ngc2632 (m11 beehve),4,08.39,20.1
  214.   DATA ngc6523 (m8 lagoon),5,18.2,-24.4
  215.   DATA ngc6618 (m17 omega),7,18.19,-16.2
  216.   DATA ngc6720 (m7 ring),9,18.53,33
  217.   DATA ngc6853 (m27 dumbl),7.5,19.59,22.6
  218.   DATA ngc5139 (omega glob),4,13.25,-47.4
  219.   DATA ngc6205 (m13 herc),5.5,16.41,36.5
  220.   DATA ngc6656 (m22 sagtr),6,18.35,-23.9
  221.   DATA ngc1952 (m1 crab),8.5,05.33,22
  222.   DATA orion neb (m12),4,05.33,-5
  223.   DATA androm galaxy (m31),4.8,00.40,41
  224.   DATA canes cluster (m3),6.3,13.40,29
  225.   DATA whirlpool gal (m51),8.1,13.28,47
  226.   DATA cygnus clust (m39),5.2,21.3,48
  227.   DATA ophiuc clust (m10),6.7,16.55,-4
  228.   DATA ophiuc clust (m12),6.6,16.45,-2
  229.   DATA ophiuc clust (m14),5.7,17.35,-3
  230.   DATA perseus sngl clstr (m34),5.5,02.39,43
  231.   DATA aquarius clstr (m2),6.3,21.31,-1
  232.   DATA gemini clstr (m35),5.3,06.6,24
  233.   DATA canis maj oc (m41),4.6,06.45,-21
  234.   DATA monoceros oc (m50),6.3,07.1,-8
  235.   
  236.   
  237.   
  238.   
  239.   
  240.   
  241.   
  242.   
  243.   
  244.   
  245.  
  246.   
  247.