Moonphase Astrology

Date: 198x
Type: Program
Platform(s): TS 2068

Calculates the phase of the moon for a given date.

Appears on

Library tape of the Indiana Sinclair Timex User’s Group.

Gallery

Moonphase Astrology

Source Code

   10 REM MOONPHASE ASTROLOGY
   20 GO TO 1000
  100 REM input date
  110 CLS 
  130 PRINT "DETERNINATION OF MOONPHASE"
  135 PRINT 
  140 INPUT "DAY (dd): ";dd: PRINT "Day : ";dd
  150 INPUT "Month (mm): ";m: PRINT "Month: ";m
  160 INPUT "Year (yyyy): ";y: PRINT "Year: ";y
  170 IF m<3 THEN LET m=m+12: LET y=y-1
  180 RETURN 
  200 REM calculation
  210 LET t=INT (365.25*y)+INT (30.6*(m+1))+dd-694038
  220 LET t=t/36525
  230 LET la=350.737486+1236*t*360
  240 LET la=la+307*t+6*t/60
  250 LET la=la+51.18*t/3600-5.17*t*t/3600
  260 LET la=la-INT (la/360)*360
  270 LET la=INT (la+.5)
  280 RETURN 
  300 REM display result
  310 PRINT : PRINT 
  320 PRINT "Moonphase=";la;" degrees"
  330 PRINT : PRINT "Press any key"
  340 IF INKEY$="" THEN GO TO 340
  350 RETURN 
 1000 REM main program
 1010 GO SUB 100: REM input date
 1020 GO SUB 200: REM calculation
 1030 GO SUB 300: REM display result
 1040 GO TO 1010
 9997 STOP 
 9998 SAVE "MOONPHASE" LINE 1

People

No people associated with this content.

Scroll to Top