Rem PHASES DE LA LUNE*J.HERY D APRES J.MEEUS* EDI.20/11/85 If sin 90=1 Goto deg Print "Please set mode Print "to degrees. End Label deg U=0 Print "Enter year Input Y Print "Enter month, or Print "blank for all M=0 Input M S=M Z=Y G=0 If Y<1583 Goto greg G=1 Label greg K=int ((Y-1900)*12.3685) T=(Y-1899.5)/100 I=2415020+29K L=.0001178TT-.000000155TTT L=L+.75933+.53058868K L=L+.00033*sin (166.56+132.87T-.009173TT) L=L-.000837T-.000335TT N=.08084821133K N=360*(N-int N)+359.2242 N=N-.0000333TT N=N-.00000347TTT O=.07171366128K O=360*(O-int O)+306.0253 O=O+.0107306TT O=O+.00001236TTT V=.08519585128K V=360*(V-int V)+21.2964 V=V-.0016528TT-.00000239TTT Rem Main loop K=4*(S-1) If S>0 Goto fork K=0 Label fork J=I+7K F=L+.38264717K P=N+K/4*29.10535608 Q=O+K/4*385.81691806 W=V+K/4*390.67050646 Gosub calcf F=F+.5/1440 J=J+int F F=F-int F R=J+F+1.5 R=int (R-7*int (R/7)) Gosub 400 If YS Goto fin Label badyear U=U+.5 If U<2 Goto u₂ U=0 Label u₂ K=K+1 If K<54 Goto fork Label fin End Label calcf If U≠int U Goto uhalf Label uwhole F=F-.4068*sin Q F=F+(.1734-.000393T)*sin P F=F+.0161*sin (2Q)-.0004*sin (3Q) F=F+.0104*sin (2W)+.0004*sin (2W+P) F=F-.0074*sin (P-Q)-.0004*sin (2W-P) F=F-.0051*sin (P+Q)-.0006*sin (2W+Q) F=F+.0021*sin (2P)+.0005*sin (P+2Q) F=F+.0010*sin (2W-Q) Return Label uhalf F=F+(.1721-.0004T)*sin P+.0021*sin (2P) F=F-.6280*sin Q+.0089*sin (2Q) F=F-.0004*sin (3Q)+.0079*sin (2W) F=F-.0119*sin (P+Q)-.0047*sin (P-Q) F=F+.0003*sin (2W+P)-.0004*sin (2W-P) F=F-.0006*sin (2W+Q)+.0021*sin (2W-Q) F=F+.0003*sin (P+2Q)+.0004*sin (P-2Q)-.0003*sin (2P+Q) F=F+((1-U)/abs (1-U))*(.0028-.0004*cos P+.0003*cos Q) Return Label 400 F=F+.5 If F<1 Goto 415 F=F-1 J=J+1 Label 415 If G=1 Goto 425 A=J Goto 435 Label 425 B=int ((J/36524.25)-51.12264) A=J+1+B-int (B/4) Label 435 B=A+1524 C=int ((B/365.25)-.3343) D=int (365.25C) E=int ((B-D)/30.61) D=B-D-int (30.61E)+F M=E-1 Y=C-4716 If E<=13.5 Goto mok M=M-12 Label mok If M>=2.5 Goto yok Y=Y+1 Label yok H=24*(D-int D) D=int D Return Label ph If U=0 Goto phnm If U=0.5 Goto phfq If U=1 Goto phfm If U=1.5 Goto phlq Return Label phnm Print "New moon" Return Label phfq Print "First quarter" Return Label phfm Print "Full moon" Return Label phlq Print "Last quarter" Return Label wkd If R=0 Goto wk0 If R=1 Goto wk1 If R=2 Goto wk2 If R=3 Goto wk3 If R=4 Goto wk4 If R=5 Goto wk5 If R=6 Goto wk6 Return Label wk0 Print "Sunday" Return Label wk1 Print "Monday" Return Label wk2 Print "Tuesday" Return Label wk3 Print "Wednesday" Return Label wk4 Print "Thursday" Return Label wk5 Print "Friday" Return Label wk6 Print "Saturday" Return