start: 'WIDTH 80, 50 0 CLEAR DEFDBL A-H, J-Z DEFINT I CL$ = CHR$(12)'CLEAR SCREEN BS$ = CHR$(29)'BACKSPACE ON SCREEN DEF FNL$ (A$) = CHR$(ASC(A$ + " ") AND (&H5F OR (ASC(A$ + " ") < &H60)))'lower case to upper PI = 3.141592649999999# NP = 15: 'SUN,MOON,EIGHT PLANETS, AND THE NODE DIM PN$(NP): 'PLANET NAMES DIM PP(NP): 'PLANET POSITIONS DIM PD(NP): 'PLANET DECLINATION DIM PM(NP): 'PLANET MOTION DIM PC(NP) 'MIDPOINTS DIM t(3) DIM CU(12), CU$(12): 'THE TWELVE PLACIDUS CUSPS DIM PS(12 + NP, 2): 'SORTED HOUSES & PLANETS PN$(1) = "Sun": PN$(2) = "Moon": PN$(3) = "Mercury" PN$(4) = "Venus": PN$(5) = "Mars": PN$(6) = "Jupiter" PN$(7) = "Saturn": PN$(8) = "Uranus": PN$(9) = "Neptune" PN$(10) = "Pluto": PN$(11) = "N Node": PN$(12) = "Ceres" PN$(13) = "Pallas": PN$(14) = "Juno": PN$(15) = "Vesta" CU$(1) = "Ascendant": CU$(7) = "7th house" CU$(2) = "2nd house": CU$(8) = "8th House" CU$(3) = "3rd house": CU$(9) = "9th house" CU$(4) = "4th house": CU$(10) = "Midheaven" CU$(5) = "5th house": CU$(11) = "11th house" CU$(6) = "6th house": CU$(12) = "12th house" '************************** MAIN ROUTINE ************* DO RESTORE PRINT CL$; PRINT PRINT PRINT " Starflight by Mother Nature (Version .000001)" PRINT PRINT " Main Menu" PRINT PRINT TAB(5); "Command"; TAB(14); "Key"; TAB(19); "Description" PRINT TAB(5); "-------"; TAB(14); "---"; TAB(19); "---------------------------------" PRINT TAB(5); "Data"; TAB(15); "K"; TAB(19); "- will be from the keyboard." PRINT TAB(15); "R"; TAB(19); "- is read from a file." PRINT TAB(15); "W"; TAB(19); "- is written to a file." PRINT PRINT TAB(5); "List"; TAB(15); "G"; TAB(19); "- general information and houses." PRINT TAB(15); "P"; TAB(19); "- the planet positions." PRINT TAB(15); "A"; TAB(19); "- the aspects." PRINT TAB(15); "D"; TAB(19); "- all the data." PRINT TAB(15); "F"; TAB(19); "- all files in current directory." PRINT TAB(15); "H"; TAB(19); "- to hardcopy (on/off)" PRINT TAB(15); "C"; TAB(19); "- to calculate a date." PRINT PRINT TAB(5); "End"; TAB(15); "E"; TAB(19); "- the program." PRINT TAB(5); STRING$(47, "-") PRINT PRINT " Your choice: "; A$ = "" WHILE A$ = "" A$ = INKEY$ WEND A$ = UCASE$(A$) 'convert to upper case PRINT A$; FOR X = 1 TO 1000 NEXT X PRINT CL$ 'clear screen IF LP = 1 THEN LPRINT CL$ SELECT CASE A$ CASE "K" GOSUB Compute.chart CASE "C" GOSUB Datefig CASE "H" GOSUB Printer.status CASE "G" GOSUB General.info GOSUB Do.wait CASE "P" GOSUB Planet.position GOSUB Do.wait CASE "A" GOSUB Planet.aspects GOSUB Do.wait CASE "F" GOSUB 6230 CASE "W" GOSUB 5400 CASE "R" GOSUB 5550 CASE "D" GOSUB General.info GOSUB Planet.position GOSUB Planet.aspects CASE "E" RESET ON ERROR GOTO 0 END END SELECT LOOP The.end: Compute.chart: PRINT "To compute a natal chart, please answer a few questions" PRINT GOSUB Catch.data: 'GET INPUT DATA GOSUB 1720: 'COMPUTE JUL DAYS, GMT DATE, SIDERIAL TIME ETC. GOSUB 2940: 'PRINT GENERAL INFO AND HOUSES GOSUB 4510 'GOSUB Do.wait: 'COMPUTE PLANETS POSITIONS AND WAIT RETURN Planet.position: GOSUB 3240 'GOSUB Do.wait: 'LIST PLANET POSITIONS AND WAIT RETURN Planet.aspects: GOSUB 3390 'GOSUB Do.wait: 'COMPUTE AND LIST ASPECTS AND WAIT RETURN Do.wait: PRINT PRINT "<>" A$ = "" WHILE A$ = "" A$ = INKEY$ WEND RETURN Printer.status: IF LP = 0 THEN LP = 1 PRINT "Printer is now on" ELSE LP = 0 PRINT "Printer is now off" END IF GOSUB Do.wait RETURN Catch.data: 800 PRINT "Note: questions with (y/n) answers default to: y": PRINT 805 INPUT "Subject's name"; NA$ 810 PRINT "Was "; NA$; " born during daylight savings (y/n)"; 820 A$ = "" INPUT A$ IF UCASE$(LEFT$(FNL$(A$), 1)) = "N" THEN DS$ = "Standard" ELSE DS$ = "Daylight" END IF PRINT "The current date and time is: "; DATE$; " "; TIME$ 830 PRINT "TIME (7:23:21AM)? "; HO = 0 MI = 0 SE = 0 840 A$ = "": GOSUB 850: GOTO 880 850 GOSUB 870 X = ASC(B$) IF ASC(B$) = 8 THEN IF LEN(A$) > 0 THEN PRINT CHR$(29); " "; CHR$(29); END IF ELSE PRINT B$; END IF IF X = 8 OR X = 13 THEN 860 ELSE A$ = A$ + B$: GOTO 850 860 IF X = 13 THEN RETURN: ELSE IF LEN(A$) = 0 THEN GOTO 850: ELSE A$ = LEFT$(A$, LEN(A$) - 1): GOTO 850 870 B$ = INKEY$: IF B$ = "" THEN 870 ELSE RETURN 880 HO = VAL(A$) 890 FOR I = 1 TO LEN(A$) 900 B$ = FNL$(MID$(A$, I, 1)) 910 IF B$ = "A" OR B$ = "P" THEN 1080 920 IF B$ = ":" THEN A$ = RIGHT$(A$, LEN(A$) - I): GOTO 950 930 NEXT I 940 GOTO 1070 950 MI = VAL(A$) 960 FOR I = 1 TO LEN(A$) 970 B$ = FNL$(MID$(A$, I, 1)) 980 IF B$ = "A" OR B$ = "P" THEN 1080 990 IF B$ = ":" THEN A$ = RIGHT$(A$, LEN(A$) - I): GOTO 1020 1000 NEXT I 1010 GOTO 1070 1020 SE = VAL(A$) 1030 FOR I = 1 TO LEN(A$) 1040 B$ = FNL$(MID$(A$, I, 1)) 1050 IF B$ = "A" OR B$ = "P" THEN 1080 1060 NEXT I 1070 GOTO 830 1080 LT$ = B$ 1090 LT = HO + MI / 60 + SE / 3600: IF HO < 0 OR HO > 23 OR MI < 0 OR MI > 59 OR SE < 0 OR SE > 59 OR LT < 0 THEN 830 1100 PRINT : LT = LT + (DS$ = "Daylight") - 12 * (LT$ = "P" AND HO < 12) + 12 * (LT$ = "A" AND HO = 12) 1110 GOSUB 1120: GOTO 1300 1120 INPUT "Date (3/21/81)"; A$ 1130 MO = 0: DA = 0: YE = 0: MO = VAL(A$): FOR I = 1 TO LEN(A$): IF MID$(A$, I, 1) = "/" THEN A$ = RIGHT$(A$, LEN(A$) - I): GOTO 1160 1140 NEXT I 1150 GOTO 1120 1160 DA = VAL(A$): FOR I = 1 TO LEN(A$): IF MID$(A$, I, 1) = "/" THEN A$ = RIGHT$(A$, LEN(A$) - I): GOTO 1190 1170 NEXT I 1180 GOTO 1120 1190 IF LEN(A$) = 0 THEN 1120 1200 YE = VAL(A$) 1210 IF YE < 100 THEN YE = YE + 1900 1220 IF YE < 1900 OR YE > 2000 THEN 1120 1230 IF MO < 1 OR MO > 12 THEN 1120 1240 IF DA < 1 OR DA > 31 THEN 1120 1250 IF DA = 31 AND (MO = 2 OR MO = 4 OR MO = 6) THEN 1120 1260 IF DA = 31 AND (MO = 9 OR MO = 11) THEN 1120 1270 IF MO = 2 AND DA > 29 THEN 1120 1280 IF MO = 2 AND DA = 29 AND (YE = 1900 OR YE - INT(YE / 4) * 4 <> 0) THEN 1120 RETURN 1300 PRINT PRINT "Please check these:" PRINT "Name: "; TAB(20); NA$ 1310 PRINT "Local "; DS$; " Time"; TAB(20); HO; ":"; MI; ":"; SE; LT$; "M" 1320 PRINT "Date"; TAB(20); MO; "/"; DA; "/"; YE 1330 A$ = "" INPUT "Do these look OK (y/n)"; A$: A$ = FNL$(A$) 1340 IF LEFT$(A$, 1) = "N" THEN PRINT "Lets try again...": GOTO 800 1350 GOSUB 1360: GOTO 1470 1360 LINE INPUT "Place: "; PL$ 1370 INPUT "Latitude (37N48)"; A$: IF A$ = "" THEN 1370 1372 FOR I = 1 TO LEN(A$) MID$(A$, I, 1) = FNL$(MID$(A$, I, 1)) NEXT I 1380 AD = VAL(A$) FOR I = 1 TO LEN(A$) LA$ = MID$(A$, I, 1) IF LA$ = "N" OR LA$ = "S" THEN A$ = MID$(A$, I + 1, LEN(A$) - I): GOTO 1410 1390 NEXT I 1400 GOTO 1370 1410 AM = VAL(A$) 1420 IF AD < 0 OR AD > 90 OR AM < 0 OR AM > 59 THEN 1370 1430 LA = AD + AM / 60 1440 IF LA > 90 THEN PRINT "That latitude is too high!": GOTO 1370 1450 IF LA$ = "S" THEN LA = -1 * LA 1460 RETURN 1470 INPUT "Longitude (122W16)"; A$: IF A$ = "" THEN 1470 1472 FOR I = 1 TO LEN(A$) MID$(A$, I, 1) = FNL$(MID$(A$, I, 1)) NEXT 1480 FOR I = 1 TO LEN(A$) IF MID$(A$, I, 1) = "E" THEN A$ = LEFT$(A$, I - 1) + "M" + RIGHT$(A$, LEN(A$) - I) EXIT FOR END IF NEXT I 1490 BD = VAL(A$) FOR I = 1 TO LEN(A$) LO$ = MID$(A$, I, 1) IF LO$ = "W" OR LO$ = "M" THEN A$ = MID$(A$, I + 1, LEN(A$) - I) GOTO 1520 END IF 1500 NEXT I 1510 GOTO 1470 1520 BM = VAL(A$) 1530 IF BD < 0 OR BD > 180 THEN 1470 1540 IF BM < 0 OR BM > 59 THEN 1470 1550 LO = BD + BM / 60 1560 IF LO > 180 THEN PRINT "That longitude is too high!": GOTO 1470 1570 IF LO$ = "W" THEN LO = -1 * LO 1580 IF LO$ = "M" THEN LO$ = "E" 1590 PRINT PRINT "Place"; TAB(21); PL$ 1600 PRINT "Latitude"; TAB(20); AD; LA$; AM 1610 PRINT "Longitude"; TAB(20); BD; LO$; BM 1620 A$ = "" INPUT "Do the place, latitude, and longitude look OK (y/n)"; A$ A$ = FNL$(A$) 1630 IF LEFT$(A$, 1) = "N" THEN 1350 1640 IF LO$ = "W" THEN A = -1 ELSE A = 1 END IF 1650 A = A * INT((ABS(LO) + 7.5) / 15) 1660 PRINT "Is the time zone "; A; "hours different from greenwich (y/n)"; 1670 A$ = "" INPUT A$ A$ = FNL$(A$) 1680 IF LEFT$(A$, 1) = "N" THEN INPUT "What is the difference"; A 1690 GT = LT - A: 'GREENWICH TIME 1700 INPUT "What house system? Placidus OR Koch (p/k)"; A$ A$ = FNL$(LEFT$(A$, 1)) HS = 1 IF A$ = "K" THEN HS = 2 1710 RETURN 1720 GOSUB 1730 GOSUB 1790 GOSUB 1820 RETURN 1730 M = MO D = DA Y = YE GOSUB 1960 JD = X'COMPUTE JULIAN DAYS 1740 IF GT < 0 THEN GT = GT + 24: JD = JD - 1: GOTO 1740 1750 IF GT > 24 THEN GT = GT - 24: JD = JD + 1: GOTO 1750 1760 X = JD: GOSUB 2030: GM = M: GD = D: GY = Y: 'COMPUTE GREENWICH DATE 1770 TC = ((JD - 2415020#) + GT / 24# - .5#) / 36525#: 'CENTURY INCREMENT 1780 RETURN 1790 GOSUB 2200: 'COMPUTE SIDERIAL TIME 1800 OB = (23.452294# - 1.301249999999999D-02 * TC) * PI / 180# 'ECLIPTIC OBLIQUITY 1810 RETURN 1820 S = ST: L = LA: 'COMPUTE PLACIDUS CUSPS 1830 FOR I = 1 TO 6 1840 N = I 1850 IF HS = 0 THEN HS = 1 1860 IF HS = 1 THEN GOSUB 2700: 'PLACIDUS HOUSES 1870 IF HS = 2 THEN GOSUB 2570: 'KOCH HOUSE 1880 IF HS = 2 THEN N = I + 9 1890 IF N > 12 THEN N = N - 12 1900 CU(N) = K 1910 N = N + 6: IF N > 12 THEN N = N - 12 1920 CU(N) = (K + 180) - INT((K + 180) / 360) * 360 1930 NEXT I 1940 RI = CU(1) MC = CU(10): 'GET ASCENDANT AND MIDHEAVEN 1950 RETURN 1960 'SUBROUTINE JULIAN DAYS (X) CREATED FROM (M,D,Y) 1970 A1 = Y 1980 A2 = D + 365 * A1 1990 IF M >= 3 THEN A2 = A2 - INT(.4 * M + 2.299999): A1 = A1 + 1 2000 X = A2 + 31 * M + INT((A1 - 1) / 4) - INT((A1 - 1) / 100) + INT((A1 - 1) / 400) 2010 X = X + 1721029# 2020 RETURN 2030 'SUBROUTINE DATE (M,D,Y) CREATED FROM JULIAN DAYS (X) 2040 X2 = X - 1721029# 2050 Y = INT(X2 / 365) 2060 X1 = X2 - Y * 365 - INT(Y / 4) + INT(Y / 100) - INT(Y / 400) 2070 M = INT(X1 / 31) 2080 D = X1 - M * 31 + INT(.4 * M + 2.299999) 2090 IF D > 31 THEN M = M + 1: GOTO 2080 2100 IF D = 31 AND ((M = 4) OR (M = 6) OR (M = 9) OR (M = 11)) THEN M = M + 1: GOTO 2080 2110 IF M < 3 THEN Y = Y - 1: GOTO 2060 2120 IF M > 12 THEN M = M - 12: Y = Y + 1 2130 RETURN 2140 'SUBROUTINE TIME (H,M,S) CREATED FROM TIME (T) 2150 T1 = t + 1# / 7200# 2160 H = FIX(T1) 2170 T1 = T1 - H: M = FIX(T1 * 60#) 2180 T1 = T1 - M / 60#: S = FIX(T1 * 3600#) 2190 RETURN 2200 'SUBROUTINE SIDERIAL TIME (ST) FROM (TC,GT,LO) 2210 ST = (6.6460656# + 2400.0513# * TC + .0000258 * TC * TC + GT) * 15 + LO 2220 ST = ST - INT(ST / 360) * 360: ST = ST / 15 2230 RETURN 2240 'SUBROUTINE SIGN (S$) CREATED FROM (S) 2250 S1 = S / 30 2260 S2 = INT(S1) 2270 S3 = (S1 - S2) * 30 2280 S4 = FIX((S3 - INT(S3)) * 60) SELECT CASE S2 CASE 0 S$ = "Aries" CASE 1 S$ = "Taurus" CASE 2 S$ = "Gemini" CASE 3 S$ = "Cancer" CASE 4 S$ = "Leo" CASE 5 S$ = "Virgo" CASE 6 S$ = "Libra" CASE 7 S$ = "Scorpio" CASE 8 S$ = "Sagittarius" CASE 9 S$ = "Capricorn" CASE 10 S$ = "Aquarius" CASE 11 S$ = "Pisces" END SELECT 2410 S$ = STR$(INT(S3)) + " " + S$ + STR$(INT(S4)) 2420 RETURN 2430 'SUBROUTINE ANGLE (S) CREATED FROM SIGN (S$) S = S2 * 30 RETURN 2570 'SUBROUTINE KOCH CUSPS (K) FROM HOUSE,LATITUDE,SIDERIAL-TIME (N,L,S) 2580 S = ST * PI / 12 L = LA * PI / 180 W = SIN(S) * TAN(L) * TAN(OB) GOSUB 2840: 'ARCSIN(W) 2590 IF N = 1 THEN X1 = S - W 2600 X2 = PI / 2 + W 2610 S1 = X2 / 3 2620 N1 = ATN(TAN(L) / COS(X1)) 2630 L1 = N1 + OB 2640 K = ATN(COS(N1) * TAN(X1) / COS(L1)) 2650 IF K < 0 THEN K = K + PI 2660 IF SIN(X1) < 0 THEN K = K + PI 2670 X1 = X1 + S1 2680 K = K * 180 / PI K = K - INT(K / 360) * 360 2690 RETURN 2700 'SUBROUTINE PLACIDUS CUSPS (K) FROM HOUSE,LATITUDE,SIDERIAL-TIME (N,L,S) 2710 C = PI / 180# 2720 N1 = (ABS(N - 7) - 3) / 3 2730 S1 = S * 15 * C 2740 t = (N + 2) * 30 * C 2750 L1 = L * C X1 = 1 2760 W = SIN(X1) * TAN(OB) * TAN(L1) 2770 GOSUB 2840 2780 X2 = N1 * W + S1 + t 2790 IF ABS(X2 - X1) > .001 THEN X1 = X2: GOTO 2760 2800 IF X2 - PI / 2 < 9.999999E-06 THEN K = 90: GOTO 2830 2810 K = ATN(TAN(X2) / COS(OB)) / C - FIX((X2 / C + 90#) / 180#) * 180# 2820 K = K - INT(K / 360#) * 360# 2830 RETURN 2840 'SUBROUTINE ARCSIN (W) 2850 IF W = -1 THEN W = -PI / 2#: GOTO 2880 2860 IF W = 1 THEN W = PI / 2#: GOTO 2880 2870 W = ATN(W / SQR(1# - W * W)) 2880 RETURN Arccos: 'SUBROUTINE ARCCOS (W) SELECT CASE W CASE -1 W = PI CASE 1 W = 0 CASE ELSE W = -ATN(W / SQR(-W * W + 1#)) + PI / 2# END SELECT RETURN General.info: 2940 'PRINT HOUSE AND OTHER INFO PRINT 2950 IF LP = 1 THEN LPRINT " " 2960 PRINT "Chart data for: "; NA$; "." 2970 IF LP = 1 THEN LPRINT "Chart data for: "; NA$; "." PRINT IF LP = 1 THEN LPRINT " " 2980 PRINT "Date"; TAB(30); MO; "/"; DA; "/"; YE 2990 IF LP = 1 THEN LPRINT "Date"; TAB(30); MO; "/"; DA; "/"; YE 3000 PRINT "Local "; DS$; " Time"; TAB(30); HO; ":"; MI; ":"; SE; LT$; "M" 3010 IF LP = 1 THEN LPRINT "Local "; DS$; " time"; TAB(30); HO; ":"; MI; ":"; SE; LT$; "M" 3020 PRINT "Place"; TAB(31); PL$ 3030 IF LP = 1 THEN LPRINT "Place"; TAB(31); PL$ 3040 PRINT "Latitude"; TAB(30); AD; LA$; AM 3050 IF LP = 1 THEN LPRINT "Latitude"; TAB(30); AD; LA$; AM 3060 PRINT "Longitude"; TAB(30); BD; LO$; BM 3070 IF LP = 1 THEN LPRINT "Longitude"; TAB(30); BD; LO$; BM 3080 t = GT: GOSUB 2140: PRINT "Greenwich mean time is"; TAB(30); H; ":"; M; ":"; S 3090 IF LP = 1 THEN LPRINT "Greenwich mean time is"; TAB(30); H; ":"; M; ":"; S 3100 t = ST: GOSUB 2140: PRINT "Siderial time is"; TAB(30); H; ":"; M; ":"; S 3110 IF LP = 1 THEN LPRINT "Siderial time is"; TAB(30); H; ":"; M; ":"; S PRINT IF LP = 1 THEN LPRINT 3120 'PRINT PLACIDUS OR KOCH CUSPS 3130 IF HS = 2 THEN PRINT "Koch cusps:": ELSE PRINT "Placidus cusps:" 3140 IF LP = 1 THEN IF HS = 2 THEN LPRINT "Koch cusps:": ELSE LPRINT "Placidus cusps:" 3150 FOR I = 1 TO 6 3160 S = CU(I): GOSUB 2240 3170 PRINT CU$(I) + " " + S$; TAB(31); 3180 IF LP = 1 THEN LPRINT CU$(I) + " " + S$; TAB(31); 3190 S = CU(I + 6): GOSUB 2240 3200 PRINT CU$(I + 6) + " " + S$ 3210 IF LP = 1 THEN LPRINT CU$(I + 6) + " " + S$ 3220 NEXT 3230 RETURN 3240 PRINT IF LP = 1 THEN LPRINT " " PRINT "Planet data for: "; NA$; "." IF LP = 1 THEN LPRINT "Planet data for: "; NA$; "." PRINT IF LP = 1 THEN LPRINT " " PRINT "Planet"; TAB(21); "Longitude"'; TAB(45); "Latitude" PRINT "------"; TAB(21); "---------"'; TAB(45); "--------" 3250 IF LP = 1 THEN LPRINT : LPRINT "Planet"; TAB(21); "Longitude"'; TAB(45); "Latitude" 3260 FOR I = 1 TO NP 'PRINT PLANETS 3270 PRINT PN$(I); TAB(20); 3280 IF LP = 1 THEN LPRINT PN$(I); TAB(20); 3290 S = PP(I) GOSUB 2240 PRINT S$; 3300 IF LP = 1 THEN LPRINT S$; '3310 IF PM(I) < 0 THEN PRINT " RX"; : ELSE PRINT ""; 3310 IF PM(I) < 0 THEN PRINT " RX": ELSE PRINT "" '3320 IF LP = 1 THEN IF PM(I) < 0 THEN LPRINT " RX"; : ELSE LPRINT ""; 3320 IF LP = 1 THEN IF PM(I) < 0 THEN LPRINT " RX": ELSE LPRINT "" '3330 T = ABS(PD(I)): GOSUB 2140: PRINT TAB(44); H; : IF PD(I) >= 0 THEN PRINT "N"; : ELSE PRINT "S"; '3340 IF LP = 1 THEN LPRINT TAB(44); H; : IF PD(I) >= 0 THEN LPRINT "N"; : ELSE LPRINT "S"; '3350 PRINT M; "'"; S; "''" '3360 IF LP = 1 THEN LPRINT M; "'"; S; "''" 3370 NEXT I 3380 RETURN 3390 'ASPECTS PRINT IF LP = 1 THEN LPRINT " " PRINT "Aspect data for: "; NA$; "." IF LP = 1 THEN LPRINT "Aspect data for: "; NA$; "." PRINT IF LP = 1 THEN LPRINT " " 3400 PRINT TAB(8); " Sun "; " Moon"; 3410 IF LP = 1 THEN LPRINT : LPRINT TAB(8); " Sun "; " Moon"; 3420 FOR I = 3 TO 10: PRINT " "; LEFT$(PN$(I), 4); 3430 IF LP = 1 THEN LPRINT " "; LEFT$(PN$(I), 4); 3440 NEXT I: PRINT "": IF LP = 1 THEN LPRINT 3450 FOR I = 1 TO 10 3460 PRINT PN$(I); TAB(8); 3470 IF LP = 1 THEN LPRINT PN$(I); TAB(8); 3480 FOR I1 = 1 TO 10 3490 IF I1 = I THEN A$ = "****": PRINT " ????"; : GOTO 3710 3500 PRINT " ????"; 3510 K = ABS(PP(I) - PP(I1)): GOSUB 3520: GOTO 3710 3520 IF K > 180 THEN K = ABS(K - 360): GOTO 3520 3530 IF K < 0 THEN K = K + 360: GOTO 3520 3540 IF ABS(K) <= 8 THEN A$ = "Conj": GOTO 3700 3550 IF ABS(K - 180) <= 8 THEN A$ = "Opos": GOTO 3700 3560 IF ABS(K - 120) <= 6 THEN A$ = "Trin": GOTO 3700 3570 IF ABS(K - 90) <= 5 THEN A$ = "Squa": GOTO 3700 3580 IF ABS(K - 60) <= 3 THEN A$ = "Sext": GOTO 3700 3590 IF ABS(K - 45) <= 2 THEN A$ = "Smsq": GOTO 3700 3600 IF ABS(K - 135) <= 2 THEN A$ = "Sesq": GOTO 3700 3610 IF ABS(K - 30) <= 1 THEN A$ = "Smsx": GOTO 3700 3620 IF ABS(K - 150) <= 1 THEN A$ = "Incj": GOTO 3700 3630 IF ABS(K - 72) <= 1.5 THEN A$ = "Qunt": GOTO 3700 3640 IF ABS(K - (360 / 7)) <= 1.5 THEN A$ = "Sept": GOTO 3700 3650 IF ABS(K - 40) <= 1 THEN A$ = "Novi": GOTO 3700 3660 IF ABS(K - 144) <= 2 THEN A$ = "Bqnt": GOTO 3700 3670 IF ABS(K - (2 * 360 / 7)) <= 2 THEN A$ = "Bsep": GOTO 3700 3680 IF ABS(K - (3 * 360 / 7)) <= 2 THEN A$ = "Tsep": GOTO 3700 3690 A$ = " " 3700 RETURN 3710 PRINT STRING$(5, BS$); : PRINT " "; A$; 3720 IF LP = 1 THEN LPRINT " "; A$; 3730 NEXT I1 3740 PRINT "" 3750 IF LP = 1 THEN LPRINT "" 3760 NEXT I 3770 PRINT : IF LP = 1 THEN LPRINT 3780 PRINT "Asc"; TAB(8); 3790 IF LP = 1 THEN LPRINT "Asc"; TAB(8); 3800 FOR I = 1 TO 10: K = ABS(RI - PP(I)): PRINT " ||||"; : GOSUB 3520: PRINT STRING$(5, BS$); " "; A$; 3810 IF LP = 1 THEN LPRINT " "; A$; 3820 NEXT I: PRINT "" 3830 IF LP = 1 THEN LPRINT "" 3840 PRINT "MidH"; TAB(8); 3850 IF LP = 1 THEN LPRINT "Mid"; TAB(8); 3860 FOR I = 1 TO 10: K = ABS(MC - PP(I)): PRINT " ||||"; : GOSUB 3520: PRINT STRING$(5, BS$); " "; A$; 3870 IF LP = 1 THEN LPRINT " "; A$; 3880 NEXT I: PRINT "" 3890 IF LP = 1 THEN LPRINT "" 3900 RETURN 'SUN DATA DATA 358.4758,35999.0498,-.0002,.01675,-.4D-4,0,1,101.2208,1.7192,.00045,0,0,0,0,0,0 'MERC 102.2974 DATA 102.2794,149472.5151,0,.20561,.2D-4,0,.387098,28.7538,.3703,.0001,47.1459,1.185,.0002,7.0029,.0019,-.2E-4 'VENU 212.6032 DATA 212.6032,58517.8039,.0013,.00682,-.5D-4,0,.7233,54.3842,.5082,-.14D-2,75.7796,.8999,.4D-3,3.3936,.1D-2,0 'MARS 319.5294 DATA 319.5294,19139.8585,.2E-03,.09331,.9E-4,0,1.5237,285.4318,1.0698,.1E-3,48.7864,.77099,0,1.8503,-.7E-3,0 'JUPITER DATA 225.4928125,3033.687936,0 DATA .048381440,-.155E-4,0,5.202904930,273.3930152,1.338344640,0,99.41984827,1.058291520,0,1.309658500 'JUPITER HARMONICS AT -.001 DATA -.5156130E-2,0,-.0010,-.0005,.0045,.0051,581.6589,-9.7377,-.0005,2510.6543,-12.5381 DATA -.0026,1313.7145,-61.4095,.0013,2370.7940,-24.6397,-.0013,3599.2992,37.6800,-.0010,2574.6924 DATA 31.4306,-.00096,6708.1816,-114.4988,-.0006,5499.4267,-74.9716,-.0013,1419.0437,54.2159,.0006 DATA 6339.2773,-109.0102,.0007,4824.4717,-50.8501,.0020,-.0134,.0127,-.0023,676.1597,.9329,.00045 DATA 2361.3553,174.9531,.0015,1427.4621,-188.8358,.0006,2110.1291,153.6404,.0014,3606.8061,-57.6744 DATA -.0017,2540.1554,121.7431,-.00099,6704.7824,-22.2534,-.0006,5480.1660,24.5140,.00096 'SATURN AT 174.2153 DATA 1651.2817,-118.2299,.0006,6310.7640,-4.8278,.0007,4826.6105,36.2451,174.2153,1223.50796 DATA 0,.05423,-.2D-3,0,9.5525,338.9117,-.3167,0,112.8261,.8259,0,2.4908 'SATURN HARMONICS AT -.0009 DATA -.0047,0,-.0009,.0037,0,.0134,1238.9,-16.4,-.00426,3040.9,-25.2,.0064 DATA 1835.3,36.1,-.0153,610.8,-44.2,-.0015,2480.5,-69.4,-.0014,.0026,0,.0111 DATA 1242.2,78.3,-.0045,3034.96,62.8,-.0066,1829.2,-51.5,-.0078,640.6,24.2 DATA -.0016,2363.4,-141.4,.0006,-.0002,0,-.0005,1251.1,43.7,.0005,622.8 'URANUS AT 74.1757 DATA 13.7,.0003,1824.7,-71.1,.0001,2997.1,78.2,74.1757,427.2742,0,.04682 '8S HARMOS AT .0021 DATA .00042,0,19.2215,95.6863,2.0508,0,73.5222,.5242,0,.7726,.1D-3,0,-.0021 DATA -.0159,0,.0299,422.3,-17.7,-.0049,3035.1,-31.3,-.0038,945.3,60.1 DATA -.0023,1227,-4.99,.0134,-.02186,0,.0317,404.3,81.9,-.00495,3037.9,57.3 DATA .004,993.5,-54.4,-.0018,1249.4,79.2,-.0003,.0005,0,.0005,352.5,-54.99 'P9 AT 30.13294 DATA .0001,3027.5,54.2,-.0001,1150.3,-88,30.13294,240.45516,0,.00913,-.00127 DATA 0,30.11375,284.1683,-21.6329,0,130.68415,1.1005,0,1.7794,-.0098,0,.1832 DATA -.6718,.2726,-.1923,175.7,31.8,.0122,542.1,189.6,.0027,1219.4,178.1 DATA -.00496,3035.6,-31.3,-.1122,.166,-.0544,-.00496,3035.3,58.7,.0961,177.1 DATA -68.8,-.0073,630.9,51,-.0025,1236.6,78,.00196,-.0119,.0111,.0001 DATA 3049.3,44.2,-.0002,893.9,48.5,.00007,1416.5,-25.2,229.781,145.1781,0 DATA .24797,.002898,0,39.539,113.537,.2086,0,108.944,1.3739,0,17.1514 DATA -.0161,0,-.0426,.073,-.029,.0371,372,-331.3,-.0049,3049.6,-39.2,-.0108 DATA 566.2,318.3,.0003,1746.5,-238.3,-.0603,.5002,-.6126,.049,273.97,89.97 DATA -.0049,3030.6,61.3,.0027,1075.3,-28.1,-.0007,1402.3,20.3,.0145,-.0928 DATA .1195,.0117,302.6,-77.3,.00198,528.1,48.6,-.0002,1000.4,-46.1 'CERES DATA 108.2925,7820.365556,0,.0794314,0,0,2.7672273,71.07944444 DATA 0,0,80.23555556,1.396011111,0,10.59694444,0,0 'PALLAS DATA 106.6641667,7806.531667,0,.2347096 DATA 0,0,2.7704955,310.1661111,0,0 DATA 172.4972222,1.396011111,0,34.81416667,0,0 'JUNO DATA 267.685,8256.081111,0,.2562318,0,0,2.6689897 DATA 245.3752778,0,0,170.1377778,1.396011111,.000308333 DATA 13.0164444,0,0 'VESTA DATA 138.7733333,9924.931111,0,.0902807,0,0 DATA 2.360723,149.6386111,0,0,103.2197222,1.396011111 DATA .000308333,7.139444444,0,0 4510 'PLANETS POSITIONS 4520 RESTORE 4530 PRINT "I am computing the positions from the Sun to "; PN$(NP); ". "; 4540 FOR I = 1 TO NP 4550 PRINT PN$(I); " "; 4560 IF I = 2 THEN GOSUB 5070: GOTO 4820 4570 IF I = 11 THEN 4820 4580 MK = 2 * PI 4590 GOSUB 4900: M = S - INT(S / MK) * MK: MK = 360 4600 GOSUB 4900: E = S * 180 / PI 4610 EA = M: FOR I1 = 1 TO 5: EA = M + E * SIN(EA): NEXT I1 4620 READ AU 4630 E1 = 1.720209E-02 / (AU ^ 1.5 * (1 - E * COS(EA))) 4640 XW = -(AU * E1) * SIN(EA): YW = (AU * E1) * (1 - E * E) ^ .5 * COS(EA) 4650 GOSUB 4900: AP = S: GOSUB 4900: AN = S 4660 GOSUB 4900: NN = S 4670 X = XW: Y = YW: GOSUB 5040 4680 XH = X: YH = Y: ZH = G 4690 MK = 360: IF I = 1 THEN XA = -XH: YA = -YH: ZA = -ZH: AB = 0: GOTO 4710 4700 XW = XH + XA: YW = YH + YA: ZW = ZH + ZA 4710 X = AU * (COS(EA) - E): Y = AU * SIN(EA) * (1 - E * E) ^ .5 4720 GOSUB 5040: XX = X: YY = Y: ZZ = G 4730 IF I > 5 AND I < 11 THEN GOSUB 4980: XX = XX + t(2): YY = YY + t(1): ZZ = ZZ + t(3) 4740 XK = (XX * YH - YY * XH) / (XX * XX + YY * YY) 4750 BR = 0: GOSUB 4840: AB = 1 4760 'CH(I)=SS:CL(I)=C 4770 IF I = 1 THEN X1 = XX: Y1 = YY: Z1 = ZZ: GOTO 4800 4780 XX = XX - X1: YY = YY - Y1: ZZ = ZZ - Z1 4790 XK = (XX * YW - YY * XW) / (XX * XX + YY * YY) 4800 BR = .0057683 * SQR(XX * XX + YY * YY + ZZ * ZZ) * XK * 180 / PI: ' ABERRATION 4810 GOSUB 4840: PP(I) = SS: PD(I) = p: PM(I) = XK 4820 NEXT I 4830 RETURN: '****** END OF PLANETS ROUTINE 4840 X = XX: Y = YY: GOSUB 4930: K = A: C = A * 180 / PI + NU + BR: IF I = 1 AND AB = 1 THEN C = (C + 180) - INT((C + 180) / MK) * MK: MK = 360 4850 C = (C + SD) - INT((C + SD) / MK) * MK: MK = 360: SS = C: Y = ZZ: X = R: GOSUB 4930: IF A > .3499999 THEN A = A - 2 * PI 4860 p = A * 180 / PI 4870 IF p > 180 THEN p = p - 360: GOTO 4870 4880 IF p < -180 THEN p = p + 360: GOTO 4880 4890 RETURN 4900 READ S, S1, S2: S = (S + S1 * TC + S2 * TC * TC) * PI / 180: RETURN 4910 IF A = 0 THEN A = 1.7E-09 4920 X = R * COS(A): Y = R * SIN(A): RETURN 4930 IF Y = 0 THEN Y = 1.7E-09 4940 R = (X * X + Y * Y) ^ .5 4950 A = ATN(Y / X): IF A < 0 THEN A = A + PI 4960 IF Y < 0 THEN A = A + PI 4970 RETURN 4980 K(6) = 11: K(7) = 5: K(8) = 4: K(10) = 4: K(9) = 4: 'NUMBER OF HARMONIC TERMS FOR PLANET 4990 FOR IK = 1 TO 3: IF I = 6 AND IK = 3 THEN t(3) = 0: RETURN 5000 IF IK = 3 THEN K(I) = K(I) - 1 5010 'ASSEMBLE TERMS 5020 GOSUB 4900: A = 0: FOR IJ = 1 TO K(I): READ U, V, W 5030 A = A + U * (PI / 180) * COS((V * TC + W) * PI / 180): NEXT IJ: t(IK) = (S + A) * 180 / PI: NEXT IK: RETURN 5040 GOSUB 4930: A = A + AP: GOSUB 4910: D = X: X = Y: Y = 0: GOSUB 4930: A = A + NN: GOSUB 4910: G = Y: Y = X: X = D 5050 GOSUB 4930: A = A + AN: IF A < 0 THEN A = A + 2 * PI 5060 GOSUB 4910 RETURN 5070 'MOON 5080 LL = 973563# + 1732564379# * TC - 4 * TC * TC 5090 G = 1012400# + 6189 * TC 5100 N = 933060# - 6962910# * TC + 7.5 * TC * TC 5110 G1 = 1203590# + 14648523# * TC - 37 * TC * TC 5120 D = 1262660# + 1602961611# * TC - 5 * TC * TC: M = 3600 5130 L = (LL - G1) / M: L1 = ((LL - D) - G) / M: F = (LL - N) / M: D = D / M: Y = 2 * D 5140 ML = 0: A = 22639.59: B = L: GOSUB 5310: A = -4586.47: B = L - Y: GOSUB 5310 5150 A = 2369.909: B = Y: GOSUB 5310: A = 769: B = 2 * L: GOSUB 5310: A = -668.1469: B = L1: GOSUB 5310 5160 A = -411.608: B = 2 * F: GOSUB 5310: A = -211.656: B = 2 * L - Y: GOSUB 5310 5170 A = -205.962: B = L + L1 - Y: GOSUB 5310: A = 191.953: B = L + Y: GOSUB 5310 5180 A = -165.145: B = L1 - Y: GOSUB 5310: A = 147.6869: B = L - L1: GOSUB 5310: A = -125.1539: B = D: GOSUB 5310 5190 A = -109.6729: B = L + L1: GOSUB 5310: A = -55.173: B = 2 * F - Y: GOSUB 5310 5200 A = -45.09899: B = L + 2 * F: GOSUB 5310: A = 39.52899: B = L - 2 * F: GOSUB 5310 5210 A = -38.428: B = L - 2 * Y: GOSUB 5310: A = 36.124: B = 3 * L: GOSUB 5310 5220 A = -30.773: B = 2 * L - 2 * Y: GOSUB 5310: A = 28.475: B = L - L1 - Y: GOSUB 5310 5230 A = -24.42: B = L1 + Y: GOSUB 5310: A = 18.60899: B = L - D: GOSUB 5310 5240 A = -8.465998: B = L + D: GOSUB 5310 5250 PP(2) = ((LL + ML) / M) - INT(((LL + ML) / M) / 360#) * 360# 5260 ML = N: A = 5392: B = 2 * F - Y: GOSUB 5310: A = -541: B = L1: GOSUB 5310: A = -442: B = Y: GOSUB 5310 5270 A = 423: B = 2 * F: GOSUB 5310: A = -291: B = 2 * L - 2 * F: GOSUB 5310 5280 PP(11) = (ML / M) - INT((ML / M) / 360) * 360 5290 GOSUB 5320 5300 RETURN 5310 ML = ML + A * SIN(PI / 180 * B) RETURN 5320 'MOONS DECL 5330 ML = 0 A = 18461.5 B = F GOSUB 5310 A = 1010 B = L + F GOSUB 5310 A = -999 B = F - L GOSUB 5310 5340 A = -624 B = F - Y GOSUB 5310 A = 199 B = F + Y - L GOSUB 5310 5350 A = -167 B = L + F - Y GOSUB 5310 A = 117 B = F + Y GOSUB 5310 5360 A = 62 B = 2 * L + F GOSUB 5310 A = -33 B = F - Y - L GOSUB 5310 5370 A = -32 B = F - 2 * L GOSUB 5310 A = -30 B = L1 + F - Y GOSUB 5310 5380 PD(2) = SGN(ML) * ((ABS(ML) / M) / 360 - INT((ABS(ML) / M) / 360)) * 360 5390 RETURN 5400 PRINT "Write disk file" PRINT INPUT "What is the new filename (or quit)"; A$ 5405 IF A$ = "" THEN 5400 5406 FOR I = 1 TO LEN(A$) MID$(A$, I, 1) = FNL$(MID$(A$, I, 1)) NEXT 5410 IF A$ = "QUIT" THEN RETURN 5420 ON ERROR GOTO 5440 OPEN "O", 1, A$ ON ERROR GOTO 0 5430 GOTO 5450 5440 CLOSE #1 PRINT "I cannot open "; A$ RESUME 5400 5450 FOR I = 1 TO 2 5460 PRINT "Writing copy number "; I 5470 WRITE #1, NA$, LA, LO, GT, JD, TC, MO, DA, YE, NP, DS$, HO, MI, SE, LT$, PL$ 5480 WRITE #1, PP(1), PP(2), PP(3), PP(4), PP(5), PP(6), PP(7), PP(8), PP(9), PP(10), PP(11), PP(12), PP(13) 5490 WRITE #1, PD(1), PD(2), PD(3), PD(4), PD(5), PD(6), PD(7), PD(8), PD(9), PD(10), PD(11), PD(12), PD(13) 5500 WRITE #1, PM(1), PM(2), PM(3), PM(4), PM(5), PM(6), PM(7), PM(8), PM(9), PM(10), PM(11), PM(12), PM(13) 5510 WRITE #1, PP(14), PP(15), PD(14), PD(15), PM(14), PM(15), AD, LA$, AM, BD, LO$, BM, ST 5520 NEXT I 5530 CLOSE #1 5540 RETURN 5550 GOSUB 5560: IF A$ = "QUIT" THEN RETURN ELSE GOSUB 5690: RETURN'READ DISK AND GET HOUSE SYSTEM 5560 PRINT "Read disk file" PRINT : INPUT "What is the filename (OR QUIT)"; A$ 5562 IF A$ = "" THEN 5560 5564 FOR I = 1 TO LEN(A$) MID$(A$, I, 1) = FNL$(MID$(A$, I, 1)) NEXT 5570 IF A$ = "QUIT" THEN RETURN 5580 ON ERROR GOTO 5600 OPEN "I", 1, A$ ON ERROR GOTO 0 5590 GOTO 5610 5600 CLOSE #1 PRINT "I cannot open "; A$ RESUME 5560 5610 PRINT "I'm now reading the disk file." 5620 INPUT #1, NA$, LA, LO, GT, JD, TC, MO, DA, YE, NP, DS$, HO, MI, SE, LT$, PL$: GOSUB 5710 5630 INPUT #1, PP(1), PP(2), PP(3), PP(4), PP(5), PP(6), PP(7), PP(8), PP(9), PP(10), PP(11), PP(12), PP(13): GOSUB 5710 5640 INPUT #1, PD(1), PD(2), PD(3), PD(4), PD(5), PD(6), PD(7), PD(8), PD(9), PD(10), PD(11), PD(12), PD(13): GOSUB 5710 5650 INPUT #1, PM(1), PM(2), PM(3), PM(4), PM(5), PM(6), PM(7), PM(8), PM(9), PM(10), PM(11), PM(12), PM(13): GOSUB 5710 5660 INPUT #1, PP(14), PP(15), PD(14), PD(15), PM(14), PM(15), AD, LA$, AM, BD, LO$, BM, ST: GOSUB 5710 5670 CLOSE #1 PRINT 5680 RETURN 5690 GOSUB 1700 GOSUB 1790 GOSUB 1820'GET HOUSE SYSTEM, ST & OB, COMPUTE CUSPS 5700 RETURN 5710 PRINT " * "; RETURN 6230 FILES GOSUB Do.wait RETURN Datefig: REM ************************************************ REM * program: date figurer REM * last update 12-10-1994 REM * note leap year calculation REM * ---------------------------------------------- DIM p(12 + 1), M$(12) Z1 = 0 Z2 = 0 M1 = 0 Y1 = 0 D1 = 0 FOR X = 1 TO 12 + 1 READ p(X) NEXT X p(1) = 0 p(2) = 31 p(3) = 59 p(4) = 90 p(5) = 120 p(6) = 151 p(7) = 181 p(8) = 212 p(9) = 243 p(10) = 273 p(11) = 304 p(12) = 334 p(&HD) = 365 ' 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 CLS PRINT PRINT PRINT GOSUB Monthready PRINT PRINT TAB(16); STRING$(48, 196) PRINT PRINT TAB(16); " Date Computer" PRINT PRINT " Enter birth year : YYYY" WHILE Y1 < 1800 OR Y1 > 3000 LOCATE 9, 36 INPUT "", Y1 WEND PRINT " month: MM" WHILE M1 < 1 OR M1 > 12 LOCATE 10, 36 INPUT "", M1 WEND PRINT " day : DD" IF M1 <> 2 THEN What = (p(M1 + 1) - p(M1)) ELSEIF ((Y1 / 4) = INT(Y1 / 4)) THEN What = 29 ELSE What = 28 END IF WHILE D1 < 1 OR D1 > What LOCATE 11, 36 INPUT "", D1 WEND IF ((Y1 / 4) - INT(Y1 / 4)) = 0 THEN Z1 = 1 GOSUB Leap.past.february END IF N1 = p(M1) + D1 PRINT INPUT " Enter current age: ", A N2 = N1 + A Y2 = Y1 IF N2 > 365 THEN N2 = N2 - 365 Y2 = Y1 + 1 END IF IF ((Y2 / 4) - (INT(Y2 / 4))) = 0 THEN Z2 = 1 END IF IF (Z1 = 0 AND Z2 = 1) THEN GOSUB Leap.past.february END IF IF (Z1 = 1 AND Z2 = 0) THEN GOSUB Past.february END IF FOR Y = 1 TO 12 IF N2 <= p(Y) THEN M2 = Y - 1 EXIT FOR END IF NEXT Y PRINT 'D2 = (N2 - 1) - P(M2) D2 = (N2) - p(M2) IF D2 <= 0 THEN D2 = (N2 - 1) - p(M2 - 1) END IF PRINT TAB(16); " Date to use is: "; M2; "/"; D2; "/"; Y2 PRINT TAB(16); " ("; M$(M2); D2; "of"; Y2; ")" PRINT PRINT TAB(16); STRING$(48, 196) PRINT PRINT "Press any key to continue:" God$ = INPUT$(1) RETURN Leap.past.february: FOR X = 3 TO 12 p(X) = p(X) + 1 NEXT X RETURN Past.february: FOR X = 3 TO 12 p(X) = p(X) - 1 NEXT X RETURN Monthready: M$(1) = "January" M$(2) = "February" M$(3) = "March" M$(4) = "April" M$(5) = "May" M$(6) = "June" M$(7) = "July" M$(8) = "August" M$(9) = "September" M$(10) = "October" M$(11) = "November" M$(12) = "December" RETURN