1 REM PROGRAM NAME JETSET
2 REM IFR FLITE SIMULATOR, BOEING 747
3 REM CREATED 6-28-81 BY GENE SZYMANSKI
4 REM REVISED 2-28-82
5 KEY OFF : DEF SEG=&H40 : POKE &H17,PEEK(&H17) OR 96
9 REM CONVERTED TO IBM PC BASIC ON 10-30-82
45 REM VOR STATION FREQS TABLE
46 DIM VF(15)
47 VF(0)=115.9 : VF(1)=113.8 : VF(2)=112.7
48 VF(3)=117.7 : VF(4)=117.8 : VF(5)=112.2
49 VF(6)=117.4 : VF(7)=115.5 : VF(8)=116.4
50 VF(9)=113.6 : VF(10)=116.9 : VF(11)=117!
51 VF(12)=112.3 : VF(13)=117.9 : VF(14)=115.7
52 VF(15)=112.8
62 REM ILS CONSTANTS FOR AIRPORTS
63 DIM VG(15,1)
64 VG(0,0)=238 : VG(0,1)=28
66 VG(2,0)=240 : VG(2,1)=30
69 VG(5,0)=90 : VG(5,1)=217
71 VG(7,0)=299 : VG(7,1)=164
72 VG(8,0)=166 : VG(8,1)=42
79 VG(15,0)=341 : VG(15,1)=75
100 REM VOR STATION COORDINATES TABLE
101 DIM VP(15,1)
102 VP(0,0)=40.633 : VP(0,1)=73.773
103 VP(1,0)=40.202 : VP(1,1)=74.495
104 VP(2,0)=42.358 : VP(2,1)=70.99301
105 VP(3,0)=41.282 : VP(3,1)=70.027
106 VP(4,0)=42.74301 : VP(4,1)=73.802
107 VP(5,0)=46.41201 : VP(5,1)=84.315
108 VP(6,0)=38.35 : VP(6,1)=81.77001
109 VP(7,0)=40.917 : VP(7,1)=77.99301
110 VP(8,0)=42.928 : VP(8,1)=78.64701
111 VP(9,0)=41.358 : VP(9,1)=82.162
112 VP(10,0)=42.96701 : VP(10,1)=83.74201
113 VP(11,0)=44.555 : VP(11,1)=88.19501
114 VP(12,0)=41.547 : VP(12,1)=88.318
115 VP(13,0)=39.495 : VP(13,1)=76.97801
116 VP(14,0)=42.048 : VP(14,1)=83.458
117 VP(15,0)=39.637 : VP(15,1)=75.303
155 DATA FUEL,LBS,%,VHF,MHZ,THRUST,MAX,IDLE,REV
160 DATA PITCH," +"," -",DEG,FLAPS,UP,DWN,WHEELS,UP,MID,DOWN
165 DATA COMPASS,AIRSPEED,KTS," VERT",SPEED,FPM
170 DATA ALTITUDE,FEET,CLOCK
10000 REM BEGIN TAKEOFF MODULE HERE
10020 CLS : CLEAR ,,1000: RANDOMIZE (VAL(MID$(TIME$,7,2))*10)
10025 KR=57.2958
10030 DIM XM(13),WM(13)
10031 DIM P$(31)
10035 DATA 37,35,32,30,27,25,22,20,17,15,12,10,7,5
10040 DATA 6,11,16,21,26,31,36,41,46,51,56,61,66,71
10041 FOR I=0 TO 28:READ P$(I):NEXT
10045 FOR I=0 TO 13:READ XM(I):NEXT
10050 FOR I=0 TO 13:READ WM(I):NEXT
10055 M$(1)="_":M$(2)="_":M$(3)="_"
10060 DIM XE(13),WE(13)
10065 K1=29:K2=23
10070 FOR I=0 TO 13
10075 XE(I)=K1:WE(I)=K2
10080 K1=K1-2:K2=K2+4
10085 NEXT I
10090 IO=40
10095 RN=RND(0)
10100 RS=1:IF RN<.5 THEN RS=-1
10105 W1=75:IF RS=-1 THEN W1=255
10110 W2=INT(20*RND(1)+1) :W3=RS*W2
10115 DIM XL(14),XR(14)
10120 J=31:K=49
10125 FOR I=0 TO 14
10130 XL(I)=J:XR(I)=K
10135 J=J-2:K=K+2
10140 NEXT I
10145 DATA FUEL,LBS,%,VHF,MHZ,THRUST,MAX,IDLE,REV
10150 DATA PITCH," +"," -",DEG,FLAPS,UP,DOWN,WHEELS,UP,MID,DOWN
10155 DATA COMPASS,AIRSPEED,KTS," VERT",SPEED,FPM
10160 DATA ALTITUDE,FEET,CLOCK,BRAKE,SET,REL
10170 FOR I=0 TO 31:READ P$(I):NEXT I
10175 DIM S$(25)
10180 FOR I=1 TO 25:S$(I)=SPACE$(I):NEXT
10185 FOR I=0 TO 9:F(I)=0:NEXT
10190 REM INIT VARIABLES FOR TAKEOFF MODE
10195 FU=200000!:FP=0:CC=75:ZZ=0:RC=0:AL=0
10200 MZ=77:TR=6:FL=2:FA=0:WH=13:IX=40:HY=9:BR=11:BK=11
10205 AB=0
10215 LOCATE 9,18:PRINT"UNITED 312    CLEARED AS FILED"
10217 PRINT:PRINT
10218 PRINT"        SURFACE WINDS VARIABLE, GUSTING TO 15."
10219 PRINT"        MINIMUM CEILING CONDITIONS ARE IN EFFECT."
10230 PRINT"        SKY CONDITIONS AT 20,000 SCATTERED."
10235 PRINT"                       AT 30,000 BROKEN."
10240 PRINT:PRINT
10245 PRINT"UPON TAKEOFF, MAINTAIN HEADING 075 TO 3000, THEN PROCEED AS FILED."
10248 PRINT:PRINT:PRINT"                STAND BY FOR TAKEOFF CLEARANCE"
10255 TQ=7000:GOSUB 11535
10260 CLS
10265 LOCATE 11,18:PRINT"UNITED 312":PRINT:PRINT
10270 PRINT"YOU ARE CLEARED FOR TAKEOFF AT 0800 HOURS"
10275 TQ=3000:GOSUB 11535
10280 CLS
10285 TIME$="07:59:00":CLS
10290 TV$=TIME$:GOSUB 11555 :TL=TD
10295 GOSUB 10330
10300 GOSUB 10410
10305 GOSUB 10480
10310 PRINT "";:GOSUB 10615
10315 K$=INKEY$:IF LEN(K$)=0 GOTO 10325
10320 GOSUB 10790
10325 GOTO 10945
10330 REM DISPLAY PANEL HEADERS ONLY
10335 LOCATE 1,4:PRINT P$(0);S$(4);P$(5);S$(3);P$(9);S$(3);S$(6);S$(3);P$(20)
10340 LOCATE 11,60:PRINT P$(13);S$(3);P$(16);S$(2);P$(29)
10345 LOCATE 12,62:PRINT P$(14);S$(6);P$(14);S$(6);P$(30)
10350 LOCATE 14,62:PRINT P$(15);S$(4);P$(15);S$(4);P$(31)
10352 IF F(9)=1 GOTO 10405
10355 LOCATE 2,14:PRINT P$(6);S$(6);P$(10);S$(6)
10360 LOCATE 2,69:PRINT P$(28)
10365 LOCATE 3,2:PRINT P$(1);S$(4);P$(2);S$(21);S$(3);S$(13);P$(23)
10370 LOCATE 4,23:PRINT P$(11);S$(13);P$(21);S$(2);P$(24);S$(2);P$(26)
10375 LOCATE 5,1:PRINT P$(3)
10380 LOCATE 6,40:PRINT P$(22);S$(6);P$(25);S$(5);P$(27)
10385 LOCATE 7,1:PRINT P$(4);S$(10);P$(7);S$(3);P$(12);S$(7)
10390 LOCATE 8,14:PRINT P$(8)
10395 FOR Y=2 TO 8:LOCATE Y,13:PRINT CHR$(196):NEXT
10400 FOR Y=2 TO 4:LOCATE Y,22:PRINT CHR$(196):NEXT
10405 RETURN
10410 REM DISPLAY HORIZON LINE
10415 IF F(9)=0 GOTO 10430
10420 LOCATE 10,1:PRINT SPACE$(80);
10425 IF HY=20 GOTO 10440
10430 LOCATE (HY+1),1:PRINT STRING$(80,"_")
10435 RETURN
10440 OH=9:HY=10
10445 FOR I=HY TO 22
10450 LOCATE (OH+1),1:PRINT SPACE$(80);
10455 LOCATE (I+1),1:PRINT STRING$(80,"_");
10460 OH=I
10465 NEXT I
10470 LOCATE 24,(IO+1):PRINT" ";
10475 RETURN
10480 REM DISPLAY RUNWAY
10485 IF F(4)=1 GOTO 10525
10490 S=10:X=29
10495 FOR Y=11 TO 23
10500 LOCATE Y,(X+1):PRINT".";SPACE$(S);" ";SPACE$(S);".";
10505 X=X-2:S=S+2
10510 NEXT
10515 S$=S$(13)
10520 RETURN
10525 REM PRINTS RUNWAY GRAPHICS
10530 IF N>3 GOTO 10600
10535 LOCATE (OY+1),(OX+1):PRINT SPACE$(WM);
10540 LOCATE (NY+1),(NX+1):PRINT MK$;
10545 OY=NY:OX=NX
10550 WM=FW
10555 RETURN
10560 REM ENTRY WHEN SHIP IN FINAL ZONE
10565 LOCATE (OY+1),(OX+1):PRINT SPACE$(WM):IF F(9)=1 THEN RETURN
10570 FOR I=11 TO (NY-1+1)
10575 LOCATE I,(XE(J)+1):PRINT SPACE$(WE(J))
10580 NEXT I
10585 IF N>4 THEN RETURN
10590 LOCATE (NY+1),(NX+1):PRINT MK$;
10595 RETURN
10600 IF F(2)=1 GOTO 10560 ELSE F(2)=1
10605 FOR I=11 TO 14:LOCATE I,60:PRINT SPACE$(21):NEXT
10610 GOTO 10560
10615 REM DISPLAY INSTRUMENT READINGS
10620 YP=1:XP=0:F$="######":V1=FU:GOSUB 11600
10625 YP=1:XP=7:F$="###":V1=FP:GOSUB 11600
10630 YP=1:XP=39:V1=CC:GOSUB 11600
10635 YP=4:XP=39:V1=ZZ:GOSUB 11600
10640 YP=4:XP=46:F$="######":V1=RC:GOSUB 11600
10645 YP=4:XP=55:F$="##,###":V1=AL:GOSUB 11600
10650 YP=5:XP=0:F$="###":V1=MZ:GOSUB 11600
10655 REM DISPLAY THRUST
10660 FOR I=2 TO 8
10665 LOCATE I,12:COLOR 0,7:PRINT" "
10670 NEXT
10675 LOCATE (TR+1),12:PRINT">";
10680 REM DISPLAY PITCH
10685 FOR I=2 TO 4:LOCATE I,21:COLOR 0,7:PRINT" ":NEXT
10690 LOCATE (FL+1),21:PRINT">"
10695 F$="+###"
10700 YP=5:XP=20:V1=FA:GOSUB 11600
10705 REM DISPLAY FLAPS
10710 IF F(2)=1 GOTO 10760
10715 FOR I=12 TO 14:LOCATE I,60:COLOR 0,7:PRINT" ":NEXT
10720 LOCATE (BR+1),60:PRINT">"
10725 REM WHEELS
10730 FOR I=12 TO 14:LOCATE I,68:COLOR 0,7:PRINT" ":NEXT
10735 LOCATE (WH+1),68:PRINT">"
10740 REM BRAKES
10745 FOR I=12 TO 14:LOCATE I,76:COLOR 0,7:PRINT" ":NEXT
10750 LOCATE (BK+1),76:PRINT">"
10755 COLOR 7,0
10760 REM DISPLAY RUNWAY ALIGNMENT INDEX
10765 IF F(9)=1 THEN RETURN
10770 LOCATE 24,(IO+1):PRINT" ";
10775 LOCATE 24,(IX+1):PRINT CHR$(24);
10780 IO=IX
10785 RETURN
10790 REM KEY POLL SUBRTN
10795 IF K$="F" THEN KK=1:GOTO 10820
10800 IF K$="," OR K$="." THEN KK=2:GOTO 10820
10805 IF K$="B" THEN KK=3:GOTO 10820
10810 IF K$="8" OR K$="2" THEN KK=4:GOTO 10820
10815 IF K$="L" THEN KK=5:GOTO 10820
10817 IF K$="W" THEN KK=6:GOTO 10820
10818 IF K$="S" THEN KK=7:GOTO 10820
10820 ON KK GOSUB 10830,10845,10865,10880,10925,10941,10826
10825 RETURN
10826 REM THRUST KEY
10827 IF F(7)=1 AND BR=11 THEN TR=4
10829 RETURN
10830 REM THRUST KEY (INCREASE)
10831 IF F(7)=1 THEN RETURN
10835 IF F(0)=0 THEN RETURN
10840 F(1)=1:TR=1:RETURN
10845 REM RUDDER KEYS
10846 IF F(7)=1 THEN RETURN
10850 IF ZZ<=50 THEN RETURN
10855 IF K$="," THEN CC=CC-1 ELSE CC=CC+1
10860 RETURN
10865 REM BRAKES
10870 IF F(0)=1 THEN RETURN
10875 F(0)=1:BK=13:RETURN
10880 REM PITCH
10881 IF F(7)=1 THEN RETURN
10885 IF ZZ<=50 THEN RETURN
10890 FD=-10:IF K$=CHR$(50) THEN FD=10
10895 FA=FA+FD
10900 IF FA>60 THEN FA=60
10905 IF FA<-60 THEN FA=-60
10910 IF FA>0 THEN FL=1:RETURN
10915 IF FA=0 THEN FL=2:RETURN
10920 FL=3:RETURN
10925 REM FLAPS
10926 IF F(7)=1 AND WH=11 THEN BR=11:RETURN
10930 IF F(3)=1 THEN RETURN
10935 IF F(3)=0 THEN F(3)=1:BR=13: RETURN
10940 RETURN
10941 REM WHEELS
10942 IF F(7)=1 THEN WH=11
10944 RETURN
10945 REM SITUATION UPDATE ROUTINE
10950 TV$=TIME$:GOSUB 11555:TJ=TD-TL:TL=TD:LOCATE 1,67 :PRINT TV$
10955 IF F(9)=1 GOTO 12000
10960 IF F(0)=1 GOTO 10970
10965 GOSUB 11130:GOTO 10310
10970 IF F(4)=1 GOTO 10990
10975 F(4)=1
10980 XX=0:YY=0
10985 TX=TD:V0=0:N=1:OY=23:OX=5:WM=71
10990 REM
10995 A=(118-18*TR)*.04028
11000 GOSUB 11190
11005 IF AL>0 GOTO 11060
11010 IF YY>10500 OR ABS(XX)>100 GOTO 11390
11015 IF FA<=0 GOTO 11100
11020 IF ZZ<150 GOTO 11385
11025 IF FA>10 GOTO 11385
11030 IF F(3)=0 GOTO 11100
11035 AL=25
11040 GOSUB 11130
11045 GOSUB 11150
11050 GOSUB 11300
11055 GOTO 10305
11060 F(9)=1
11065 GOSUB 11130
11070 GOSUB 11150
11075 GOSUB 11170
11080 FOR I=11 TO 23:LOCATE I,1:PRINT SPACE$(80);:NEXT
11085 HY=20
11090 GOSUB 10410
11095 GOTO 11115
11100 GOSUB 11130
11105 GOSUB 11300
11110 GOTO 10305
11115 REM NOW DO DEPARTURE PROCEDURES
11120 GOTO 10310
11130 REM UPDATE FUEL
11135 FU=FU-40*TJ
11140 FP=FU/3120
11145 RETURN
11150 REM UPDATE RATE OF CLIMB
11155 RC=ZZ*SIN(ABS(FA/57.3))*1.693*60
11160 IF FA<0 THEN RC=-1*RC
11165 RETURN
11170 REM UPDATE ALT
11175 AL=AL+TJ*RC/60
11180 IF AL<=0 THEN AL=0
11185 RETURN
11190 REM EQUATIONS OF MOTION
11195 T=TJ
11200 V=V0+A*T
11205 VB=(V+V0)/2:V0=V
11210 S=VB*T
11215 IF TD<(TX+18) GOTO 11235
11220 TX=TD
11225 WB=RS*INT(2*RND(1)+1)
11230 CC=CC+WB
11235 DA=(CC-75)/57.3
11240 DY=S*COS(ABS(DA))
11245 DX=S*SIN(ABS(DA))
11250 IF DA<0 THEN DX=-1*DX
11255 YY=YY+DY
11260 XX=XX+DX
11265 ZZ=V/1.69278
11270 IF ZZ>20 THEN ZZ=ZZ+WS
11275 IX=40+FIX(XX*7/20):IF IX>79 THEN IX=79
11280 IF IX<0 THEN IX=0
11285 ZP=FIX(YY-2500*(N-1))
11290 IF ZP>2500 THEN N=N+1:GOTO 11285
11295 RETURN
11300 REM VARIABLES FOR RUNWAY GRAPHICS
11305 MP=FIX(10+(13*ZP)/2500)
11310 IF N>3 GOTO 11350
11315 NY=MP
11320 J=NY-10
11325 NX=XM(J)
11330 FW=WM(J)
11335 S$=SPACE$(J)
11340 MK$=M$(N)+S$(J)+"_"+S$(J)+"_"+S$(J)+"_"+S$(J)+"_"+S$(J)+"_"
11345 RETURN
11350 REM IN ZONE 4-MARKER IS RUNWAYS EDGE
11355 NY=MP
11360 J=NY-10
11365 NX=XE(J)
11370 IF N>4 THEN RETURN
11375 MK$=STRING$(WE(J),"_")
11380 RETURN
11385 AB=1:GOTO 11415
11390 AB=2:IF YY<10500 GOTO 11415
11395 FOR I=11 TO 23
11400 LOCATE I,1:PRINT SPACE$(80);
11405 NEXT I
11410 GOTO 11415
11415 REM ABORT
11420 FOR I=11 TO 23
11425 LOCATE I,1:COLOR 0,7:PRINT SPACE$(80);
11430 NEXT I
11435 LOCATE 11,30:PRINT"*** TAKEOFF FAILED***":PRINT:PRINT
11440 ON AB GOSUB 11455,11480
11445 LOCATE 20,35:COLOR 7,0:PRINT"END OF PROGRAM";
11450 END
11455 PRINT" YOU PULLED BACK ON THE STICK AT TOO SLOW A SPEED, OR YOU"
11460 PRINT" PULLED BACK THE STICK TOO FAR WHEN AT PROPER SPEED."
11465 PRINT" AS A RESULT THE TAIL END OF THE FUSELAGE SCRAPED THE RUNWAY"
11470 PRINT" AND THE AIRCRAFT SPUN OUT OF CONTROL."
11475 RETURN
11480 IF YY>10500 GOTO 11505
11485 PRINT" YOU FAILED TO STAY WITHIN THE RUNWAY BOUNDARIES."
11490 PRINT" AS A RESULT YOU VEERED OFF THE RUNWAY AND COLLIDED WITH"
11495 PRINT" THE RUNWAY LIGHTS."
11500 RETURN
11505 PRINT" YOU RAN OUT OF RUNWAY. AS A RESULT YOU ROLLED INTO THE "
11510 PRINT" MARSHLANDS LOCATED";FIX(YY)-10500;"FEET PAST THE END OF THE RUNWAY."
11515 IF F(3)=1 THEN RETURN
11520 PRINT:PRINT:PRINT" YOU FORGOT TO LOWER THE FLAPS."
11525 PRINT" AS A RESULT THE AIRCRAFT COULD NOT DEVELOP SUFFICIENT LIFT."
11530 RETURN
11535 REM TIME DELAY PAD
11540 FOR I=1 TO TQ
11545 NEXT I
11550 RETURN
11555 REM CONVERT RTC TO TIME OF DAY IN SECONDS ABSOLUTE
11560 J=7
11565 FOR I=0 TO 2
11570 TC$(I)=MID$(TV$,J,2)
11575 J=J-3
11580 TC(I)=VAL(TC$(I))
11585 TD=(3600*TC(2))+(60*TC(1))+TC(0)
11590 NEXT I
11595 RETURN
11600 REM PLOTS VARIABLE ON REVERSE BACKGROUND
11605 LOCATE (YP+1),(XP+1): COLOR 0,7 : PRINT "";
11610 PRINT USING F$;V1;
11615 PRINT "" : COLOR 7,0
11620 RETURN
12000 REM DEPARTURE ROUTINE
12010 IF F(7)=1 GOTO 12025 ELSE F(7)=1
12015 GOSUB 10340
12020 F(2)=0
12025 IF WH<>11 GOTO 12040 ELSE ZZ=ZZ+5
12030 IF BR<>11 GOTO 12040 ELSE ZZ=ZZ+5
12035 IF TR=4 AND AL>1800 THEN CHAIN"OJETCRUZ" ELSE GOTO 12090
12040 IF AL<1200 GOTO 12090
12042 LOCATE 13,1:PRINT"********** FLIGHT ABORTED **********"
12044 PRINT:PRINT
12046 PRINT"YOU FAILED TO PERFORM CRUCIAL TRIM MANEUVERS FOLLOWING LIFTOFF"
12048 PRINT"THE PROPER TRIM SEQUENCE,WHICH MUST BE COMPLETED BELOW 1200 FEET, IS AS FOLLOWS:"
12050 PRINT"   1-RAISE LANDING GEAR"
12052 PRINT"   2-RETRACT FLAPS"
12054 PRINT"   3-REDUCE THRUST"
12056 PRINT
12058 PRINT" ---------- END OF PROGRAM ---------- "
12060 END
12090 GOSUB 11130
12092 GOSUB 11150
12094 GOSUB 11170
12099 GOTO 10310
13000 REM END OF LISTING