home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
BEEHIVE
/
UTILITYS
/
SKYSHOW.LBR
/
SKYPLOT.BYS
/
SKYPLOT.BYS
Wrap
Text File
|
2000-06-30
|
20KB
|
604 lines
5 ' SKYPLOT.BAS : ADAPTED FROM SKYPLA.BAS BY ERNEST HELLIWELL
7 ' ORIGINAL PROGRAM FOR EXIDY SORCERER BY ERIC BURGESS
8 ' FROM HIS BOOK "CELESTIAL BASIC", PUBL BY SYBEX, 1982
9 ' ADJUSTED TO WORK WITH ADM-3A TYPE SCREENS (24x80)
10 CLEAR:WIDTH 255
20 DEF FNASN(X)=ATN(X/SQR(-X*X+1))
30 DEF FNACO(X)=-ATN(X/SQR(-X*X+1))+3.14159/2
40 DEF FNRAD(X)=(X)*3.14159/180
50 DEF FNDEG(X)=(X)*180/3.14159
55 CURON$=CHR$(5)+CHR$(2):CUROF$=CHR$(5)+CHR$(32)
57 BLINK$=CHR$(27)+CHR$(41)+CHR$(27)+CHR$(52)
58 BLOFF$=CHR$(27)+CHR$(40):BEL$=CHR$(7)
60 PI=3.14159:CL$=CHR$(26):HOME$=CHR$(30)
65 DEF FNAT$(ROW,COL)=CHR$(27)+CHR$(61)+CHR$(ROW+32)+CHR$(COL+32)
70 PRINT CL$;
80 PRINT FNAT$(2,28)"S K Y P L O T";
90 PRINT FNAT$(6,14)"Astronomy program for ADM-3A type terminals"
120 ZN=8:LA=FNRAD(38.24):L$="SEBASTOPOL, CA":LO=122.49
140 PRINT FNAT$(10,12)"Initial conditions are set for..."L$
160 PRINT FNAT$(13,25)"LATITUDE: "FNDEG(LA)
170 PRINT FNAT$(14,25)"LONGITUDE:"LO
180 PRINT FNAT$(15,25)"TIME ZONE:"ZN
190 PRINT FNAT$(18,15)"You can change these later, if you wish"
200 DF=0
210 FOR J7=2500 TO 1 STEP -1:NEXT J7
220 PRINT CL$;
230 PRINT FNAT$(2,32)"SKY PLOT"
240 PRINT FNAT$(4,35)"by"
250 PRINT FNAT$(6,25)"ERIC BURGESS F.R.A.S."
260 PRINT FNAT$(8,20)"Plots the stars for a requested"
270 PRINT FNAT$(9,22)"time and date, and shows the"
280 PRINT FNAT$(10,20)"Planets, Sun and Moon above the"
290 PRINT FNAT$(11,32)"horizon."
300 PRINT FNAT$(13,18)"Close to full the Moon is shown as 'o',"
310 PRINT FNAT$(14,20)"before full it is shown as ')' and"
320 PRINT FNAT$(15,22)"after full it is shown as '('."
330 PRINT FNAT$(17,26)"All rights reserved"
340 PRINT FNAT$(18,28)"S & T Software"
360 FOR J=2500 TO 1 STEP -1:NEXT J:PRINT CL$;
370 GOTO 1490
380 'DAYS FROM EPOCH
390 G=365*Y+D+((M-1)*31)
400 IF M>=3 THEN GOTO 420
410 G=G+INT((Y-1)/4)-INT(.75*INT((Y-1)/100+1)):RETURN
420 G=G-INT(2.3+M*.4)+INT(Y/4)-INT(.75*INT((Y/100)+1))
430 RETURN
440 'CALCUL OF LST
450 SG=.065711
460 T2=SG*NS+12.064707#+(((ZN+T1)/24)*SG)+T1
470 IF T2>24 THEN T2=T2-24:GOTO 470
480 IF T2<-24 THEN T2=T2+24:GOTO 480
490 IF T2<0 THEN T2=T2+24
500 T2$=STR$(T2)
510 T2=VAL(LEFT$(T2$,5))
520 RETURN
530 'ENTER VAR. FOR CALC LST
540 GOSUB 380:NS=G-722895!:GOSUB 440
550 'ENTER VAR. FOR CALC NO. OF DAYS
560 MO=M:DA=D:YR=Y
570 GOSUB 380:ND=G-715875!+T1/24
580 'STORE DATA FOR CALCS
590 IF F4=1 GOTO 870
600 RESTORE
610 DIM PD(9,9)
620 FOR YY=0 TO 8
630 FOR XX=0 TO 8
640 READ PD(YY,XX)
650 NEXT XX
655 NEXT YY
660 'ORBITAL ELEMENTS OF PLANETS, MERCURY-PLUTO
670 DATA .071425,3.8494,.388301,1.34041,.3871
680 DATA .07974,2.73514,.122173,.836013
690 DATA .027962,3.02812,.013195,2.28638,.7233
700 DATA .00506,3.85017,.059341,1.33168
710 DATA .017202,1.74022,.032044,1.78547,1,.017,3.33926,0
720 DATA 0,.009146,4.51234,.175301,5.85209,1.5237
730 DATA .141704,1.04656,.03142,.858702
740 DATA .001451,4.53364,.090478,.23911,5.2028
750 DATA .249374,1.76188,.01972,1.74533
760 DATA .000584,4.89884,.105558,1.61094,9.5385
770 DATA .534156,3.1257,.043633,1.977458
780 DATA .000205,2.46615,.088593,2.96706,19.182
790 DATA .901554,4.49084,.01396,1.28805
800 DATA .000104,3.78556,.016965,.773181,30.06
810 DATA .27054,2.33498,.031416,2.29162
820 DATA .000069,3.16948,.471239,3.91303,39.44
830 DATA 9.86,5.23114,.300197,1.91812
840 FOR I9=1 TO 9
850 READ P(I9):NEXT I9
860 DATA 109,86,83,77,74,83,85,78,80
870 F4=1
880 I=1
890 FOR J=0 TO 8
900 GOSUB 1000
910 A(I)=A:D(I)=D:L(I)=L
920 I=I+1:NEXT
930 FOR I=1 TO 9
940 IF I=3 THEN GOTO 980
950 PRINT CL$;"COMPUTING...PLEASE WAIT"
960 GOSUB 1110
970 Z(I)=Z:Q(I)=Q:X(I)=X:R(I)=R:V(I)=V:AL(I)=AL:AZ(I)=AZ
980 NEXT
990 RETURN
1000 'SUB FOR A, D, L
1010 A=ND*PD(J,0)+PD(J,1)
1020 IF A>PI*2 THEN A=(A/(PI*2)-INT(A/PI*2))*PI*2
1030 IF A<0 THEN A=A+PI*2:GOTO 1030
1040 C=PD(J,2)*SIN(A-PD(J,3))
1050 A=A+C
1060 IF A>PI*2 THEN A=A-PI*2
1070 IF A<0 THEN A=A+PI*2:GOTO 1070
1080 D=PD(J,4)+PD(J,5)*SIN(A-PD(J,6))
1090 L=PD(J,7)*SIN(A-PD(J,8))
1100 RETURN
1110 'ELEV AND AZ OF SUN AND PLANETS
1120 F=0:Z=A(3)-A(I)
1130 IF ABS(Z)>PI AND Z<0 THEN Z=Z+(PI*2)
1140 IF ABS(Z)>PI AND Z>0 THEN Z=Z-(PI*2)
1150 Q=SQR(D(I)^2+D(3)^2-2*D(I)*D(3)*COS(Z))
1160 P=(D(I)+D(3)+Q)/2
1170 X=2*FNACO(SQR(((P*(P-D(I)))/(D(3)*Q))))
1180 T=X*(12/PI)
1190 IF Z<0 THEN R=FNDEG(A(3)+PI-X)/15
1200 IF Z>0 THEN R=FNDEG(A(3)+PI+X)/15
1210 IF R>24 THEN R=R-24:GOTO 1220
1220 IF R<-24 THEN R=R+24:GOTO 1220
1230 IF R<0 THEN R=R+24:GOTO 1230
1240 IF Z<0 THEN V=SIN(A(3)+PI-X)*23.4419+FNDEG(L(I))
1250 IF Z>0 THEN V=SIN(A(3)+PI+X)*23.4419+FNDEG(L(I))
1260 HA=T2-R
1270 IF HA<-12 THEN HA=HA+24
1280 IF HA>12 THEN HA=HA-24
1290 HA=FNRAD(HA*15):V=FNRAD(V)
1300 AL=FNASN(SIN(V)*SIN(LA)+COS(V)*COS(LA)*COS(HA))
1310 AZ=FNACO((SIN(V)-SIN(LA)*SIN(AL))/(COS(LA)*COS(AL)))
1320 IF HA>0 THEN AZ=PI*2-AZ
1330 AL=FNDEG(AL):AZ=FNDEG(AZ)
1340 RS=FNDEG(A(3)+PI)/15
1350 IF RS>24 THEN RS=RS-24:GOTO 1350
1360 IF RS<-24 THEN RS=RS+24:GOTO 1360
1370 IF RS<0 THEN RS=RS+24:GOTO 1370
1380 VS=SIN(A(3)+PI)*23.4419
1390 HS=T2-RS
1400 IF HS<-12 THEN HS=HS+24
1410 IF HS>12 THEN HS=HS-24
1420 HS=FNRAD(HS*15):VS=FNRAD(VS)
1430 AS=FNASN(SIN(VS)*SIN(LA)+COS(VS)*COS(LA)*COS(HS))
1440 ZS=FNACO((SIN(VS)-SIN(LA)*SIN(AS))/(COS(LA)*COS(AS)))
1450 IF HS>0 THEN ZS=PI*2-ZS
1460 AS=FNDEG(AS):ZS=FNDEG(ZS)
1470 RETURN
1480 'BEGIN MAIN PROGRAM
1490 PRINT CL$;
1500 IF DF=0 THEN PRINT:PRINT:PRINT:GOTO 1640
1510 PRINT:PRINT "Want to see the variables Y/N? ";:AB$=INPUT$(1)
1520 IF AB$="N" THEN GOTO 1560
1530 PRINT:PRINT "Date:";YR;MO;DA;" LMT:";T1;"HRS";
1540 PRINT " Time Zone:";ZN
1550 PRINT "LAT:";FNDEG(LA);:PRINT " LONG:";LO:PRINT
1560 PRINT
1570 PRINT "Want to enter or change any variables Y/N? ";:A$=INPUT$(1)
1580 IF A$="N" THEN GOTO 1980
1590 PRINT CL$
1600 PRINT "Want to change the date of: ";YR;MO;DA;"Y/N? ";
1620 A1$=INPUT$(1)
1630 IF A1$="N" THEN GOTO 1740
1640 PRINT:PRINT "What is the date required?"
1650 PRINT:INPUT " Enter the YEAR: ",Y
1660 PRINT:INPUT " Enter the MONTH: ",M
1670 PRINT:INPUT " Enter the DAY: ",D
1680 MO=M:DA=D:YR=Y
1690 IF Y>1800 GOTO 1740
1700 PRINT:PRINT:PRINT "Is";Y;"the year you want Y/N? ";
1710 Y$=INPUT$(1)
1720 IF Y$="Y" GOTO 1740
1730 IF Y$="N" THEN GOTO 1640
1740 PRINT:PRINT:GOSUB 3440
1750 IF DF=0 THEN 1780
1760 PRINT TAB(16)"The LMT of: "T1"Y/N? ";
1770 A1$=INPUT$(1):IF A1$="N" THEN GOTO 1830
1780 PRINT CL$;"Input the LMT for the display":GOSUB 3320
1790 PRINT:PRINT "To change variables, answer 'Y' when asked, otherwise 'N'"
1810 IF DF=0 THEN 1830
1820 PRINT:Y$="LMT":GOSUB 3320
1830 PRINT
1840 PRINT TAB(16)"The TIME ZONE of: "ZN" Y/N? ";:A1$=INPUT$(1)
1850 IF A1$="N" THEN GOTO 1870
1855 PRINT
1860 PRINT:INPUT "Enter the TIME ZONE (West coast is 8): ",ZN
1870 PRINT
1880 PRINT TAB(15)"The LONGITUDE of: "LO" Y/N? ";:A1$=INPUT$(1)
1890 IF A1$="N" THEN GOTO 1910
1900 PRINT:GOSUB 3510
1910 PRINT
1920 PRINT TAB(16)"The LATITUDE of: ";FNDEG(LA);" Y/N? ";
1930 A1$=INPUT$(1)
1940 IF A1$="N" THEN GOTO 1980
1950 PRINT:INPUT "Enter the LATITUDE (Sebastopol=38.24): ",LA
1960 LA=FNRAD(LA)
1980 IF HR=1 AND A$="N" THEN HR=0:A$="":GOTO 2680
1990 IF HR=1 AND A$="Y" THEN HR=0:A$="":GOTO 2120
2000 PRINT CL$;
2010 PRINT FNAT$(6,0);"Which horizon do you want to see?"
2030 PRINT FNAT$(9,5);"1 EAST horizon ... 0 to 180 deg."
2040 PRINT FNAT$(10,5);"2 WEST horizon ...180 to 360 deg."
2050 PRINT FNAT$(11,5);"3 SOUTH horizon .. 90 to 270 deg."
2060 PRINT FNAT$(12,5);"4 NORTH horizon ..270 to 90 deg."
2070 PRINT:PRINT "Select one: ";:HZ$=INPUT$(1)
2080 IF (HZ$="1" OR HZ$="2" OR HZ$="3" OR HZ$="4") THEN 2100
2090 PRINT "INVALID ENTRY":GOTO 2010
2100 HZ=VAL(HZ$)
2109 DS=0:PRINT:PRINT
2110 PRINT "Do you want Stars displayed, as well as Planets,";
2111 PRINT " Sun and Moon (Y/N)? ";
2112 DS$=INPUT$(1):IF DS$="N" THEN DS=1:GOTO 2120
2113 IF DS$<>"Y" THEN PRINT "INVALID RESPONSE":PRINT:GOTO 2110
2120 'BEGIN CALCS
2130 FL=3
2140 PRINT CL$;"COMPUTING...PLEASE WAIT"
2150 IF FP=1 GOTO 2330
2160 DIM PO(30,64)
2170 P=-3968
2180 FOR YY=29 TO 0 STEP -1
2190 FOR XX=0 TO 63
2200 PO(YY,XX)=P
2210 P=P+1
2220 NEXT XX
2230 PRINT CL$;"COMPUTING...PLEASE WAIT"
2240 NEXT YY
2250 'DIM PP(8,8)
2260 'P=192
2270 'FOR X8=0 TO 7
2280 'FOR Y8=0 TO 7
2290 'PP(Y8,X8)=P
2300 'P=P+1
2310 'NEXT Y8
2315 'NEXT X8
2320 FP=1
2330 'SET UP GRAPHICS
2335 IF DS=1 THEN 2670
2350 GOTO 2670
2360 PRINT
2370 'PRINT COORDINATES
2380 ROW=0
2390 FOR I3=80 TO 20 STEP -10
2395 I3$=STR$(I3)
2400 PRINT FNAT$(ROW,1);MID$(I3$,2,2);" +";
2405 'PRINTS VERTICAL SCALE
2410 PRINT FNAT$(ROW+1,4);"|";
2420 PRINT FNAT$(ROW+2,4);"|";
2430 ROW=ROW+3
2435 NEXT I3
2440 PRINT FNAT$(21,1);"10 +";
2495 'PRINTS HORIZONTAL SCALE
2500 PRINT FNAT$(22,4)"|--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|";
2520 IF HZ=2 GOTO 2580
2530 IF HZ=3 GOTO 2610
2540 IF HZ=4 GOTO 2640
2550 PRINT FNAT$(23,4)"N 20 40 60 80 E 100 120 140 160 S";
2570 F6=1:PRINT HOME$;:RETURN
2580 PRINT FNAT$(23,4)"S 200 220 240 260 W 280 300 320 340 N";
2600 F6=1:PRINT HOME$;:RETURN
2610 PRINT FNAT$(23,4)"E 110 130 150 170 S 190 210 230 250 W";
2630 F6=1:PRINT HOME$;:RETURN
2640 PRINT FNAT$(23,4)"W 290 310 330 350 N 10 30 50 70 E";
2660 F6=1:PRINT HOME$;:RETURN
2670 GOSUB 530
2680 PRINT CL$;
2690 IF HZ=1 THEN HZ$="EAST horizon"
2700 IF HZ=2 THEN HZ$="WEST horizon"
2710 IF HZ=3 THEN HZ$="SOUTH horizon"
2720 IF HZ=4 THEN HZ$="NORTH horizon"
2730 GOSUB 3440
2740 GOSUB 2380
2750 U$="North"
2760 IF LA<0 THEN U$="South"
2770 PRINT FNAT$(0,63);"DATE"YR;MO;DA;
2775 PRINT FNAT$(1,63);"LMT"T1;"hrs";
2780 PRINT FNAT$(2,63);"LST"T2"hrs"
2785 PRINT FNAT$(3,63);HZ$;
2790 PRINT FNAT$(4,63);"LAT";ABS(FNDEG(LA));U$;
2800 PRINT FNAT$(6,63);BLINK$;"Please wait...";BLOFF$;
2810 PRINT HOME$;CUROF$;
2820 'PRINT SKY DOME
2825 IF DS=1 THEN 2850
2830 'POSITION STARS
2840 GOSUB 3580
2850 'POSITION SUN
2860 IF AS<0 GOTO 2950
2870 BS=ZS
2880 IF HZ=3 AND (BS>90 AND BS<270) THEN X1=BS-90:Y1=AS:GOTO 2930
2890 IF HZ=4 AND (BS>270 AND BS<360) THEN X1=BS-270:Y1=AS:GOTO 2930
2900 IF HZ=4 AND (BS>0 AND BS<85) THEN X1=BS+90:Y1=AS:GOTO 2930
2910 IF HZ=1 AND BS<=180 THEN X1=BS:Y1=AS:GOTO 2930
2920 IF HZ=2 AND BS>180 THEN X1=BS-180:Y1=AS:GOTO 2930
2925 GOTO 2950
2930 Y2=28/90*Y1+2.5:X2=55/180*X1+4
2940 XV=ABS(PO(INT(Y2),INT(X2))-192):GOSUB 5950:PRINT "@";
2950 'SELECT AND POSITION PLANETS
2960 FOR I8=1 TO 9
2970 BZ(I8)=AZ(I8)
2980 IF AL(I8)<5 OR AL(I8)>80 THEN GOTO 3110
2990 IF I8=3 THEN GOTO 3110
3000 IF HZ=1 AND BZ(I8)<=180 THEN GOTO 3060
3010 IF HZ=2 AND BZ(I8)>180 THEN BZ(I8)=BZ(I8)-180:GOTO 3060
3020 IF HZ=3 AND (BZ(I8)>90 AND BZ(I8)<270) THEN BZ(I8)=BZ(I8)-90:GOTO 3060
3030 IF HZ=4 AND (BZ(I8)>270 AND BZ(I8)<=360) THEN GOTO 3050
3040 IF HZ=4 AND (BZ(I8)>0 AND BZ(I8)<85) THEN BZ(I8)=BZ(I8)+90:GOTO 3060
3045 GOTO 3110
3050 BZ(I8)=BZ(I8)-270
3060 'POSITIONING ROUTINE
3070 X1=BZ(I8):Y1=AL(I8)
3080 IF (X1<5 OR X1>175) THEN GOTO 3110
3090 Y2=28/90*Y1+2.5:X2=55/180*X1+4
3100 XV=ABS(PO(INT(Y2),INT(X2))-192):GOSUB 5950:PRINT CHR$(P(I8));
3110 NEXT I8
3120 GOSUB 5230
3130 GOTO 3145
3140 'END SEQUENCE
3145 PRINT CURON$;BEL$;
3150 PRINT FNAT$(6,63);"Another ";
3155 PRINT FNAT$(7,65);"horizon Y/N? ";
3160 A$=INPUT$(1)
3170 M=MO:D=DA:Y=YR
3180 FP=1
3190 IF A$="N" THEN GOTO 3250
3200 HR=1:PRINT CL$;"Which horizon?"
3210 PRINT:PRINT TAB(7)"1 = EAST":PRINT TAB(7)"2 = WEST"
3220 PRINT TAB(7)"3 = SOUTH":PRINT TAB(7)"4 = NORTH"
3230 PRINT:PRINT "Select: ";:HZ$=INPUT$(1):HZ=VAL(HZ$)
3240 PRINT CL$;:HR=1:PRINT:PRINT:PRINT:GOTO 1570
3250 PRINT CL$;
3260 PRINT "Want another date Y/N? ";:A$=INPUT$(1)
3270 IF A$="Y" THEN GOTO 1510
3280 IF A$<>"N" THEN PRINT:PRINT "INVALID REPLY":GOTO 3260
3290 PRINT CL$;"ENDING SKY PLOT"
3300 END
3310 'TIME INPUT
3320 PRINT:PRINT "Want to input in (1) DEC. HRS"
3330 PRINT:PRINT TAB(12)"or in (2) HR,MI,SE?":PRINT
3335 PRINT "ENTER CHOICE: ";
3340 PT$=INPUT$(1):PT=VAL(PT$)
3350 IF PT=1 THEN PRINT:GOTO 3380
3360 IF PT=2 THEN PRINT:GOTO 3400
3370 PRINT "INVALID REPLY":PRINT:GOTO 3320
3380 PRINT:PRINT "Enter the LMT (hh.xxxx): ";
3390 INPUT "",T1:PRINT:GOTO 3430
3400 PRINT:PRINT:PRINT "Enter the LMT (HR,MI,SE): ";
3410 INPUT "",HR,MI,SE
3420 T1=HR+MI/60+SE/3600:PRINT
3430 RETURN
3440 'PRINTING HR,MI,SE
3450 RR=INT(T1)
3460 IM=(T1-INT(T1))*60
3470 ES=(IM-INT(IM))*60
3480 ES=INT(ES)
3490 IM=INT(IM)
3500 RETURN
3510 'CORRECT ZN FOR LONGITUDE
3520 PRINT:INPUT "Enter the LONGITUDE (Sebastopol is 122.49): ",LO
3530 LGC=(ZN*15)-LO
3540 IF LGC<0 THEN GOTO 3560
3550 ZN=ZN+ABS(LGC/15):GOTO 3570
3560 ZN=ZN+LGC/15
3570 RETURN
3580 'DEVELOP HA, RA, AZ AND AL FOR STARS
3590 IF SF=1 THEN 4620
3600 DIM ST(237,2)
3610 FOR SY=0 TO 236: FOR SX=0 TO 1
3620 READ ST(SY,SX)
3630 NEXT SX
3635 NEXT SY
3640 'DATA ON RA AND DEC OF STARS
3650 'URSA MINOR
3660 DATA 2,89,18,86,17,82,16,78,15,75,15.4,72,16.3,76
3670 'CEPHEUS
3680 DATA 20.8,61,21.5,70
3690 'CASSIOPEIA
3700 DATA 1.9,63,1.4,60,.9,60,.6,56,.1,59
3710 'PERSEUS
3720 DATA 3.3,50,3,53,3.7,48,3.1,41,3.9,40,3.9,32
3730 'URSA MAJOR
3740 DATA 11,57,11,63,11.9,54,12.2,58,12.9,57,13.4,55,13.7,50
3750 'DRACO
3760 DATA 16,59,16.4,62,17.1,66,17.5,52,17.9,51,18.3,73,19.2,68
3770 'CEPHEUS
3780 DATA 23.8,78,21.3,62,22.1,58,22.8,67
3790 'ANDROMEDA
3800 DATA 2,42,1.1,35,.6,31
3810 'TRIANGULUM
3820 DATA 2.1,35,1.8,29,2.2,34
3830 'PEGASUS
3840 DATA 22.7,30,.1,29,.2,14,21.7,10,22.2,6,22.7,10,23,4,23,28
3860 'AURIGA
3870 DATA 5.2,46,5.9,45,5.9,37,4.9,33,5,41
3880 'BOOTES
3890 DATA 14.5,39,15,40,15.3,33,14.2,20,13.9,19,14.7,27,15.5,27,15.4,29
3910 'CORONA
3920 DATA 15.6,27
3930 'HERCULES
3940 DATA 16.7,39,16.7,31,17,31,17.2,37,17.2,25,16.5,21,16.4,19
3950 'LYRA
3960 DATA 18.7,39,18.8,33,19,32
3970 'CYGNUS
3980 DATA 20.7,45,20.3,40,19.8,45,20.8,34,19.5,28
3990 'TAURUS
4000 DATA 3.6,24,3,4,2.7,3,4.5,17,5.4,29,5.6,21,3.7,24,4.3,15,4.45,19
4030 'ARIES
4040 DATA 2.1,23,1.8,21,1.8,19
4050 'ERIDANUS
4060 DATA 3.9,-13,3.3,-20
4070 'PISCES
4080 DATA 1.5,-9,1.2,-10
4090 'CETUS
4100 DATA .7,-18,1.1,-10,1.3,-9,2,2
4110 'ORION
4120 DATA 5.9,8,5.4,8,5.75,-2,5.6,-1,5.45,0,5.8,-10,5.6,-6,5.6,10,5.5,-21,5.2,-9
4140 'CANIS MAJOR
4150 DATA 6.7,-17,6.3,-18,6.9,-29,7.2,-27,7.4,-29
4160 'CANIS MINOR
4170 DATA 7.6,7,7.4,9
4180 'GEMINI
4190 DATA 7.6,32,7.7,28,7.3,22,6.7,25,6.6,16,6.4,22,6.3,22
4200 'LEO
4210 DATA 10.1,12,10.1,17,10.3,20,10.3,24,11.2,20,11.2,16,11.8,15,9.8,28,9.7,26
4230 'CANCER
4240 DATA 8.7,29,8.6,21
4250 'HYDRA
4260 DATA 9.5,-9,8.7,7,8.9,7,9.2,2,10.4,-17
4270 'VIRGO
4280 DATA 11.8,2,13.4,-11,13,11,12.9,3,12.7,-1,12.3,-1,13.1,-5
4290 'CRATER
4300 DATA 10.8,-16,10.9,-18,11.3,-15,11.4,-18
4310 'CORVUS
4320 DATA 12.5,-16,12.2,-17,12.5,-23,12.2,-22
4330 'SERPENS
4340 DATA 15.8,17,15.5,10,15.7,7,15.8,5,15.8,-3
4350 'LIBRA
4360 DATA 15.3,-9,14.8,-16
4370 'OPHIUCHUS
4380 DATA 17.5,12,17.2,25,17.6,5,17.7,3
4390 'SAGITTARIUS
4400 DATA 18.3,-30,18,-30,18.4,-25,18.9,-26,19,-30,19.1,-21,18.3,-21
4420 'SCORPIO
4430 DATA 16.5,-26,16.6,-28,16.4,-24,16,-20,15.9,-22,15.9,-26
4440 DATA 18.6,-43,16.7,-34,18.5,-37,18.7,-40,16.7,-38,22.9,-30
4460 'CAPRICORNUS
4470 DATA 21.7,-18,21.6,-18,21.4,-22,20.8,-28,20.7,-26,20.3,-14
4480 DATA 20.2,-12,22.9,-30
4490 'DELPHINUS
4500 DATA 20.5,11,20.6,15,20.7,15,20.6,16,20.8,16
4510 'AQUARIUS
4520 DATA 22.6,0,22.5,0,22.4,1,22.3,-2,22,0,21.5,-6
4530 'AQUILA
4540 DATA 19.8,9,19.7,10.5,19.9,6,19.1,13,18.95,14,20.1,-1
4550 'SOUTH POLAR REGION
4560 DATA 12.2,-59,12.1,-50,12.4,-57,12.7,-59,12.3,-63
4570 DATA 14,-60,14.7,-60,14.7,-65,15.9,-63,15.1,-69,16.9,-69
4580 DATA 20.3,-57,1.7,-57,2,-62,.4,-63,6.3,-52,6.8,-51
4590 DATA 8.8,-55,9.3,-55,9.2,-59,8.3,-60,9.1,-70,9.8,-65
4600 DATA 3.9,-75,12.5,-69,12.6,-68
4610 SF=1
4620 'GET AZ AND EL FOR EACH STAR AND POSITION IT ON SCREEN
4630 FOR K=0 TO 236
4640 SR=ST(K,0):SD=ST(K,1)
4650 HD=T2-SR
4660 IF HD<-12 THEN HD=HD+24
4670 IF HD>12 THEN HD=HD-24
4680 HA=HD*15
4690 HA=FNRAD(HA):SD=FNRAD(SD)
4700 SL=FNASN(SIN(SD)*SIN(LA)+COS(SD)*COS(LA)*COS(HA))
4710 SZ=(SIN(SD)-SIN(LA)*SIN(SL))/(COS(LA)*COS(SL))
4720 IF SZ>=1 THEN SZ=0:GOTO 4760
4730 IF SZ<=-1 THEN SZ=3.14159:GOTO 4760
4740 SZ=FNACO(SZ)
4750 IF HA>0 THEN SZ=PI*2-SZ
4760 SZ=FNDEG(SZ)
4770 IF SZ>360 THEN SZ=SZ-360
4780 IF SZ<0 THEN SZ=SZ+360
4790 SL=FNDEG(SL)
4800 IF SL>70 OR SL<10 THEN 4990
4810 IF HZ=1 THEN 4850
4820 IF HZ=2 THEN 4870
4830 IF HZ=3 THEN 4890
4840 IF HZ=4 THEN 4910
4850 IF (SZ>5 AND SZ<175) THEN GOTO 4940
4860 GOTO 4990
4870 IF (SZ>185 AND SZ<355) THEN SZ=SZ-180:GOTO 4940
4880 GOTO 4990
4890 IF (SZ>95 AND SZ<265) THEN SZ=SZ-90:GOTO 4940
4900 GOTO 4990
4910 IF (SZ>275 AND SZ<360) THEN SZ=SZ-270:GOTO 4940
4920 IF (SZ>=0 AND SZ<85) THEN SZ=SZ+90:GOTO 4940
4930 GOTO 4990
4940 'POSITION STAR
4950 X1=SZ:Y1=SL
4960 Y2=28/90*Y1+2.5:X2=55/180*X1+4
4970 Y3=8*(Y2-INT(Y2)):X3=8*(X2-INT(X2))
4980 XV=ABS(PO(INT(Y2),INT(X2))-192):GOSUB 5950:PRINT ".";
4990 NEXT K
5000 X1=0:Y1=0:Y2=0:X2=0:X=0
5010 RETURN
5020 'SET 8 X 8 GRID
5030 IF FS=1 THEN RETURN
5040 'LP=-512:XP=0:AP=7:GP=128
5050 'FOR IP=1 TO 8:FOR JP=1 TO 9
5060 'IF JP=9 THEN AP=AP+1
5070 'FOR KP=1 TO AP
5080 'XV=ABS((LP)-192):GOSUB 5950:PRINT CHR$(XP);
5090 'LP=LP+1
5100 'NEXT KP
5110 'IF JP=9 GOTO 5200
5120 'XV=ABS((LP)-192):GOSUB 5950:PRINT CHR$(GP);
5130 'LP=LP+1
5140 IF FP<>1 GOTO 5170
5150 PRINT CL$;"COMPUTING...PLEASE WAIT"
5160 GOTO 5190
5170 'IF JP=9 GOTO 5190
5180 'AP=AP-1:FP=1
5190 'NEXT JP
5200 FP=0:AP=7:XP=0:GP=GP*.5
5210 'NEXT IP
5220 FS=1:RETURN
5230 'POSITION MOON ON SCREEN
5240 ND=ND-.5
5250 LP=255.743
5260 LZ=311.169:LE=178.699:LM=LZ+360*ND/27.3216
5270 MD=LM:GOSUB 5890:LM=MD
5280 'CORRECT GOR ELLIPTICAL ORBIT
5300 PG=.111404*ND+LP
5310 MD=PG:GOSUB 5890
5320 PG=MD
5330 PG=LM-PG
5340 DR=6.2886*(SIN(FNRAD(PG)))
5350 LM=LM+DR
5360 RQ=LM:RM=LM/15
5370 IF RM>24 THEN RM=RM-24:GOTO 5370
5380 IF RM<0 THEN RM=RM+24
5390 AL=LE-ND*.052954
5400 ND=ND+.5
5410 MD=AL:GOSUB 5890
5420 AL=MD
5430 AL=RQ-AL
5440 IF AL<360 THEN AL=AL+360
5450 IF AL>360 THEN AL=AL-360
5460 HE=5.1333*SIN(AL*PI/180)
5470 DM=HE+23.1444*SIN(RQ*PI/180)
5480 HD=T2-RM
5490 IF HD<-12 THEN HD=HD+24
5500 IF HD>12 THEN HD=HD-24
5510 IF (HD>12 OR HD<-12) THEN GOTO 5940
5520 HA=FNRAD(HD*15):DM=FNRAD(DM)
5530 ML=FNASN(SIN(DM)*SIN(LA)+COS(DM)*COS(LA)*COS(HA))
5540 MZ=FNACO((SIN(DM)-SIN(LA)*SIN(ML))/(COS(LA)*COS(ML)))
5560 IF HA>0 THEN MZ=PI*2-MZ
5570 MZ=FNDEG(MZ)
5580 ML=FNDEG(ML)
5600 IF ML>80 OR ML<5 THEN 5800
5610 MX=MZ
5620 IF HZ=1 THEN 5660
5630 IF HZ=2 THEN 5680
5640 IF HZ=3 THEN 5700
5650 IF HZ=4 THEN 5720
5660 IF (MX>10 AND MX<170) THEN GOTO 5750
5670 GOTO 5800
5680 IF (MX>190 AND MX<350) THEN MX=MX-180:GOTO 5750
5690 GOTO 5800
5700 IF (MX>100 AND MX<260) THEN MX=MX-90:GOTO 5750
5710 GOTO 5800
5720 IF (MX>275 AND MX<=360) THEN MX=MX-270:GOTO 5750
5730 IF (MX>0 AND MX<85) THEN MX=MX+90:GOTO 5750
5740 GOTO 5800
5750 'POSITION MOON
5760 X1=MX:Y1=ML
5770 Y2=28/90*Y1+2.5:X2=55/180*X1+4
5780 GOSUB 5820
5790 XV=ABS(PO(INT(Y2),INT(X2))-192):GOSUB 5950:PRINT CHR$(MS);
5800 X1=0:X2=0:Y1=0:Y2=0
5810 RETURN
5820 PM=RS+12-RQ/15
5830 IF PM>24 THEN PM=PM-24
5840 IF PM>12 THEN PM=PM-24
5850 IF (PM>=-2 AND PM<=2) THEN MS=111:RETURN
5855 IF LA<0 AND PM<-2 THEN MS=41:RETURN
5860 IF PM<-2 THEN MS=40:RETURN
5865 IF LA<0 AND PM>2 THEN MS=40:RETURN
5870 IF PM>2 THEN MS=41
5880 RETURN
5890 IF MD<-3600 THEN MD=MD+3600:GOTO 5890
5900 IF MD<-360 THEN MD=MD+360:GOTO 5900
5910 IF MD<0 THEN MD=MD+360
5920 IF MD>3600 THEN MD=MD-3600:GOTO 5920
5930 IF MD>360 THEN MD=MD-360:GOTO 5930
5940 RETURN
5945 'CURSOR POSITIONING TRANSLATION ROUTINE
5950 BOL=3968:EOL=3905:NUM=0:ROW=0:COL=0
5960 IF (XV<=BOL AND XV>=EOL) THEN ROW=NUM:GOTO 5970 ELSE NUM=NUM+1:EOL=EOL-64:GOTO 5960
5970 EOL=3905
5980 IF ROW=0 THEN YV=XV-EOL:COL=63-YV:GOTO 6010
5990 LCOL=EOL-(ROW*64)
6000 YV=XV-LCOL:COL=63-YV
6010 PRINT FNAT$(ROW,COL);
6020 RETURN
HEN YV=XV-EOL:COL=63