Program will compute arrival times for the NOAA polar orbiting weather satellites. You will need to insert your appropriate latitude and longitude in line 150. The antenna aiming equations work in the northern hemisphere only. Enter all longitudes as positive west from Greenwich E.G. 170 E = 190 W
Appears on
Library tape of the Indiana Sinclair Timex User’s Group.
Source Code
10 REM Orbiter Charles A. Judge M.D. based on work of Grant Zehr and Ralph Taggart. Math routines based on material from The Satellite Experimenter's Handbook ARRL, Martin Davidoff 20 REM This program will compute arrival times for the NOAA polar orbiting weather satellites. You will need to insert your appropriate latitude and longitude in line 150. The antenna aiming equations work in the nortern hemisphere only. Enter all longitudes as positive west from Greenwich E.G. 170 E = 190 W 30 DEF FN r(t)=t-((INT (t/1000))*1000) 40 GO TO 120 50 LET a=a+p: LET n=n+1: IF a>md THEN LET a=a-md: LET d=d+1: IF FN r(d)>365 THEN LET d=k*10000+1 60 IF w<>1 THEN PRINT AT 15,5;d 70 LET c=c+inclong: IF c>360 THEN LET c=c-360 80 IF d<t THEN GO TO 50 90 IF w<>1 THEN GO SUB 770 100 LET w=1 110 GO TO 520 120 LET w=0: LET md=1440: LET d$="": LET px=1: LET x$="":: LET re=6371: LET hs=800: LET dr=2*PI/360: LET rd=1/dr 130 LET k=85 140 LET prntr=0: IF IN 251<63 THEN LET prntr=1 150 LET lat=38.5: LET long=76.6: REM change for your position! 160 LET lae=long-35: LET law=long+42: LET lde=long+140: LET ldw=long+225 170 CLS : PRINT "Polar Orbit Crossing Program"''"Predicts based on NOAA data as"'"of 12/1/85" 180 PRINT ;''"Which Satellite?"'' 190 PRINT TAB 5;"0 for NOAA 6";TAB 5;"1 for NOAA 9";TAB 5;"2 for NOAA 8" 200 LET n$=INKEY$: IF n$="" THEN GO TO 200 210 IF n$>"2" OR n$<"0" THEN GO TO 200 220 LET n3=VAL n$ 230 RESTORE 1670+10*n3 250 LET dflg=0 260 IF n3=0 OR n3=2 THEN LET dflg=2 270 IF n3=1 THEN LET dflg=1 280 READ a$,p,l,j,k,n,h,m,c,satinc 290 CLS : PRINT AT 2,0;"Satellite: ";a$;AT 5,0;"Orbital Parameters as of ";l;"/";j;"/";k;AT 8,0;"Period";TAB 13;p;AT 10,0;"Eq. Crossing";AT 11,0;"Time";TAB 13;h;":";INT m;AT 13,0;"Longitude";TAB 13;INT c 300 LPRINT ''"Satellite: ";a$'"Orbital Parameters as of ";l;"/";j;"/";k'"Period";TAB 13;p'"Eq. Crossing"'"Time";TAB 13;h;":";m'"Longitude";TAB 13;c 310 CLS 320 IF dflg=1 THEN PRINT AT 7,0;"Afternoon Satellite - ";AT 10,0;"Do you want daylight passes only?": INPUT q$: IF q$<>"y" AND q$<>"Y" THEN LET dflg=0 330 IF dflg=2 THEN PRINT AT 7,0;"Morning Satellite - ";AT 10,0;"Do you want daylight passes only?": INPUT q$: IF q$<>"y" AND q$<>"Y" THEN LET dflg=0 340 CLS 350 LET ly=0: IF k-(INT (k/4)*4)=0 THEN LET ly=1 360 GO SUB 900: LET d=r+(k*10000) 370 LET a=(h*60)+m 380 PRINT AT 5,0;"Enter Month, Day, and Year ";AT 7,10;"For Predict" 390 INPUT l: PRINT AT 10,15;l;"/";: INPUT j: PRINT j;"/";: INPUT k: PRINT k 400 LET ND=0 410 IF prntr=1 THEN PRINT '"ENTER NUMBER OF DAYS ";: INPUT NDAY: PRINT NDAY 420 PRINT '"Will you want tracking data? (Y/N)": INPUT z$ 430 GO SUB 900: LET t=r+(k*10000) 440 IF t>=d THEN GO TO 470 450 CLS : PRINT ''"This program does not compute data prior to reference crossing" 460 GO TO 380 470 CLS : PRINT AT 10,5;"Now Calculating Orbital";AT 12,10;"Crossings" 480 LET p$="": LET ps=0 490 LET inclong=(p/md)*360 500 PRINT AT 15,15;t 510 GO TO 50 520 GO SUB 540 530 GO TO 510 540 LET h=INT (a/60): LET m=INT (a-(h*60)+.5) 550 IF m=60 THEN LET m=0: LET h=h+1 560 LET b=INT (c+.5) 570 GO SUB 1180 580 IF px=0 THEN LET p$="" 590 GO SUB 1050 600 RETURN 610 GO TO 510 620 LET px=0: GO SUB 540: LET px=1: IF prntr=1 THEN LET ND=ND+1: IF ND>=NDAY THEN GO TO 660 630 IF prntr=0 THEN GO TO 670 640 LET t=t+1: GO SUB 820: GO SUB 770 650 GO TO 510 660 IF ps=1 THEN PRINT "@ Indicates previous day": LET ps=0 670 LET w=0: PRINT ''"(N) Next day"'"(O) Another day"'"(S) Another Spacecraft"'"(E) End": PRINT '"Enter Choice ";: FLASH 1: PRINT "?" 680 LET Q$=INKEY$: IF Q$="" THEN GO TO 680 690 FLASH 0 700 IF q$="s" OR q$="S" THEN CLS : GO TO 180 710 IF q$="n" OR q$="N" THEN LET t=t+1: GO SUB 820: GO TO 510 720 IF q$="o" OR q$="O" THEN CLS : GO TO 380 730 IF q$="e" OR q$="E" THEN PRINT "GOODBYE": STOP 740 GO TO 680 750 CLS : GO SUB 900: LET t=r+(k*10000) 760 IF t>d THEN GO SUB 770: GO TO 510 770 CLS 780 PRINT "Date: ";l;"/";j;"/";k;" ";a$: PRINT 790 LPRINT : LPRINT l;"/";j; 800 PRINT "Orbit Local Time Longitude": PRINT 810 RETURN 820 LET j=j+1 830 IF ((l=4) OR (l=6) OR (l=9) OR (l=11)) AND (j>30) THEN LET l=l+1: LET j=1: GO TO 870 840 IF (l=2) AND (j>28) AND ly=0 THEN LET l=l+1: LET j=1: GO TO 870 850 IF (l=2) AND (j>29) AND ly=1 THEN LET l=l+1: LET j=1: GO TO 870 860 IF j>31 THEN LET l=l+1: LET j=1 870 IF l>12 THEN LET l=1: LET k=k+1 880 LET hd=5: IF l>4 AND l<11 THEN LET hd=4 890 RETURN 900 IF l=1 THEN LET r=0 910 IF l=2 THEN LET r=31 920 IF l=3 THEN LET r=59 930 IF l=4 THEN LET r=90 940 IF l=5 THEN LET r=120 950 IF l=6 THEN LET r=151 960 IF l=7 THEN LET r=181 970 IF l=8 THEN LET r=212 980 IF l=9 THEN LET r=243 990 IF l=10 THEN LET r=273 1000 IF l=11 THEN LET r=304 1010 IF l=12 THEN LET r=334 1020 IF l>2 AND ly=1 THEN LET r=r+1 1030 LET hd=5: IF l>4 AND l<11 THEN LET hd=4 1040 LET r=r+j: RETURN 1050 IF ld>30 THEN RETURN 1060 IF ld<=11 THEN LET x$="**" 1070 IF ld<=5 THEN LET x$="***" 1080 PRINT n;TAB 7;p$;TAB 8;sh;":";sm;TAB 19;sl;TAB 23;d$;TAB 28;x$: IF p$="@" THEN LET ps=1 1090 IF dflg=1 AND (sh<11) THEN GO TO 1120 1100 IF dflg=2 AND sh>12 THEN GO TO 1120 1110 LPRINT TAB 7;p$;TAB 8;sh;":";sm;TAB 16;sl;TAB 22;d$;TAB 27;x$: IF p$="@" THEN LET ps=1 1120 LET x$="" 1130 LET b$=INKEY$: IF b$="" THEN GO TO 1160 1140 IF b$="a" THEN LET z$="y": GO TO 1160 1150 LET z$="n" 1160 IF z$="Y" OR z$="y" THEN INPUT "Do you want tracking data",q$: IF q$="y" OR q$="Y" THEN GO SUB 1440 1170 RETURN 1180 IF NOT ((c>lae AND c<law) OR (c>lde AND c<ldw)) THEN LET ld=60: RETURN 1190 IF c>=0 AND c<180 THEN LET td=(lat/360) 1200 IF c>=180 THEN LET td=(180-lat)/360 1210 LET sm=INT (m+(p*td)): IF td<.25 THEN LET sl=INT (c+(inclong/p*td)): LET d$="asc" 1220 IF td>.25 THEN LET sl=INT (c+183.1): LET d$="desc" 1230 IF sl>360 THEN LET sl=sl-360 1240 IF sl<=long THEN LET ld=long-sl 1250 IF sl>long THEN LET ld=sl-long 1260 LET p$="": LET sh=h: LET sm=INT sm 1270 IF sm>=60 THEN LET sm=sm-60: LET sh=h+1 1280 LET sh=sh-hd: IF sh<0 THEN LET sh=sh+24: LET p$="@" 1290 RETURN 1300 REM AZIMUTH AND ELEVATION CALCULATOR 1310 LET LLONG=-LONG*Dr: LET LLAT=LAT*DR 1320 LET Longd=Llong-SLONG: IF LONGD<-PI THEN LET LONGD=LONGD+(2*PI) 1330 IF LONGD>PI THEN LET LONGD=LONGD-(PI*2) 1340 LET flag=0: IF lONGD>=0 THEN LET flag=1 1350 LET COSB=(SIN (LLAT)*SIN (SLAT))+(COS (LLAT)*COS (SLAT)*COS (LONGD)) 1360 LET ANGB=ACS COSB 1370 LET COSA=(SIN (SLAT)-(SIN (LLAT)*COSB))/(COS LLAT*SIN ANGB) 1380 LET AZ=ACS COSA 1390 IF flag=1 THEN LET az=(2*PI)-az 1400 LET TANE=(((RE+HS)*COSB)-RE)/((RE+HS)*SIN ANGB) 1410 LET EL=ATN TANE 1420 LET AZ=AZ*RD: LET EL=EL*RD 1430 RETURN 1440 LET ir=satinc*dr 1450 LET pflg=0: LET xflg=0 1460 CLS : PRINT "Date: ";l;"/";j;"/";k;" ";a$: PRINT 1470 LPRINT 1480 PRINT AT 2,0;"TIME";TAB 6;"LAT";TAB 10;"LONG";TAB 17;"AZ";TAB 22;"EL": PRINT 1490 LPRINT : LPRINT "TIME";TAB 6;"LAT";TAB 10;"LONG";TAB 17;"AZ";TAB 22;"EL" 1500 LET minct=0 1510 IF c<180 THEN LET a1=2 1520 IF c>180 THEN LET a1=31 1530 FOR f=a1 TO p 1540 LET slat=ASN (SIN (ir)*SIN (2*PI*f/p)): LET slatd=slat*rd 1550 LET slong=(-c*dr)-(ACS (COS (2*PI*f/p)/(COS slat)))-(f/4*dr): LET slongd=slong*rd 1560 GO SUB 1300 1570 LET lt=a+f: LET h=INT (lt/60): LET m=INT (lt-(h*60)+.5): IF m=60 THEN LET m=0: LET h=h+1 1580 LET h=h-hd: IF h<0 THEN LET h=h+24 1590 IF slongd>360 THEN LET slongd=slongd-360 1600 IF slongd<-360 THEN LET slongd=slongd+360 1610 IF el>0 THEN PRINT h;":";m;TAB 7;INT slatd;TAB 12;INT -slongd;TAB 17;INT az;TAB 22;INT el: LET pflg=1: IF el>4 THEN LET minct=minct+1 1620 IF el>0 THEN LPRINT h;":";m;TAB 7;INT slatd;TAB 12;INT -slongd;TAB 17;INT az;TAB 22;INT el 1630 IF pflg=1 AND el<0 THEN LPRINT : LPRINT minct;" Minutes usable data": LPRINT : PRINT 'minct;" Minutes usable data": PRINT : RETURN 1640 NEXT f 1650 LET xflg=1: GO TO 1560 1660 REM 9000 1670 DATA "NOAA 6 137.5",101.1277,12,1,85,33421,00,31.62,86.22,99 1680 DATA "NOAA 9 137.62",102.0851,12,1,85,4988,0,46.32,152.93,99.0506 1690 DATA "NOAA 8 137.5",101.2979,12,01,85,13909,0,57.76,80.42,99 1700 CLEAR : SAVE "NOAA" LINE 1