home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Killer
/
Game_Killer.bin
/
005.747WORLD.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-03-24
|
41KB
|
1,130 lines
1 '*****747WORLD*****
2 ' IFR FLIGHT SIMULATOR (BOEING 747)
3 ' CREATED BY GENE SZYMANSKI - BYTE 11-82
4 ' MODIFIED BY R. HOJABOOM - 11-6-82
5 ' AND AGAIN BY H.P.REISDORF 11/23/82
6 ' AND AGAIN BY J P BERNIER 418-653 4282 JAN. 1988 SEPT. 1990 MARCH 1992
8 KEY OFF:CLEAR,,8000:DIM P$(31),M$(20),TC(2),TC$(2),F(9):COLOR 7,0,0
9 DIM VO(5),BL(5),DP(7),CP(7),N$(3),KM(3),RS$(3),GX(2),GY(2),TW(2),LB(6)
10 DIM TM(3),AIS(2),FA(2),CC(2),AL(2),LL(1),GL(1),LS(1),GS(1)
21 KM(0)=7915.704468#
22 KM(1)=23.268932#
23 KM(2)=.0525
24 KM(3)=.000213
26 XQ=16
30 ' SET UP WIND TABLE
32 DIM WA(10,1)
34 FOR I=0 TO 10:WA(I,0)=10*I*RND(1)+20*I:NEXT
38 A=0
40 FOR I=1 TO 10:WA(I,1)=25*RND(1)+A:A=A+20:NEXT
41 RS$(0)=STRING$(31,"_")
42 RS$(1)=SPACE$(7)+"/"+SPACE$(7)+CHR$(124)+SPACE$(7)+"\"+SPACE$(7)
43 RS$(2)=SPACE$(6)+"/"+SPACE$(8)+CHR$(124)+SPACE$(8)+"\"+SPACE$(6)
44 RS$(3)=SPACE$(5)+"/"+STRING$(9,".")+CHR$(124)+STRING$(9,".")+"\"+SPACE$(5)
45 ' VOR FREQ TABLE
46 DIM VF(42)
47 VF(0)=115.9:VF(1)=113.8:VF(2)=112.7
48 VF(3)=117.8:VF(4)=113.6:VF(5)=112.2
49 VF(6)=113.9:VF(7)=115.5:VF(8)=116.4
50 VF(9)=112.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:VF(16)=113.1:VF(17)=116.8
53 VF(18)=114!:VF(19)=114.1:VF(20)=115.8
54 VF(21)=114.3:VF(22)=114.4:VF(23)=114.5
55 VF(24)=114.6:VF(25)=114.7:VF(26)=114.8
56 VF(27)=114.9:VF(28)=108!:VF(29)=111.1:VF(30)=116.7:VF(31)=110.5
57 VF(32)=110.8:VF(33)=115.3:VF(34)=110.2:VF(35)=109.7:VF(36)=113.3
58 VF(37)=109.5:VF(38)=111.9:VF(39)=110.9:VF(40)=116.3:VF(41)=108.5
59 VF(42)=109.3
62 ' ILS CONSTANTS FOR AIRPORTS
63 DIM VG(42,1)
64 VG(0,0)=238:VG(0,1)=40
65 VG(1,0)=260:VG(1,1)=75
66 VG(2,0)=230:VG(2,1)=40
67 VG(3,0)=260:VG(3,1)=90
68 VG(4,0)=260:VG(4,1)=70
70 VG(6,0)=145:VG(6,1)=320
71 VG(7,0)=299:VG(7,1)=164
72 VG(8,0)=166:VG(8,1)=42
73 VG(9,0)=162:VG(9,1)=328
79 VG(15,0)=341:VG(15,1)=75
80 VG(16,0)=255:VG(16,1)=80
81 VG(17,0)=345:VG(17,1)=160
82 VG(20,0)=80:VG(20,1)=280:VG(22,0)=250:VG(22,1)=90
83 VG(25,0)=300:VG(25,1)=60:VG(27,0)=350:VG(27,1)=210
85 VG(28,0)=120:VG(28,1)=300:VG(29,0)=240:VG(29,1)=60
86 VG(30,0)=100:VG(30,1)=270:VG(31,0)=300:VG(31,1)=130
87 VG(32,0)=120:VG(32,1)=280:VG(33,0)=320:VG(33,1)=150
88 VG(34,0)=85:VG(34,1)=270:VG(35,0)=280:VG(35,1)=90
89 VG(36,0)=310:VG(36,1)=120:VG(37,0)=335:VG(37,1)=150
90 VG(38,0)=95:VG(38,1)=270:VG(39,0)=90:VG(39,1)=260
91 VG(40,0)=350:VG(40,1)=180:VG(41,0)=100:VG(41,1)=300
92 VG(42,0)=80:VG(42,1)=300
100 ' VOR STATION AND AIRPORT COORDINATE TABLE
101 DIM VP(42,1):DIM RCO(42,1) 'RCO( ,0) LAT RCO( ,1) LONG AIRPORT
102 VP(0,0)=40.633:VP(0,1)=73.7733 'JF KENNEDY
103 VP(1,0)=39.8517:VP(1,1)=75.245:RCO(1,0)=39.86:RCO(1,1)=75.37 'PHILADELPHIA
104 VP(2,0)=42.3583:VP(2,1)=70.9933 'BOSTON
105 VP(3,0)=32.73333:VP(3,1)=117.1333 'SAN DIEGO
106 VP(4,0)=33.9333:VP(4,1)=118.43167# 'LOS ANGELES
107 VP(5,0)=46.41201:VP(5,1)=84.315 'SAULT STE MARIE
108 VP(6,0)=41.85:VP(6,1)=87.75 'CHICAGO
109 VP(7,0)=40.917:VP(7,1)=77.99301 'PHILIPSBURG
110 VP(8,0)=42.9283:VP(8,1)=78.64667 'BUFFALO
111 VP(9,0)=39.3:VP(9,1)=94.56671 'KANSAS CITY
112 VP(10,0)=46.80167:VP(10,1)=92.20333 'DULUTH
113 VP(11,0)=44.555:VP(11,1)=88.195 'GREEN BAY
114 VP(12,0)=44.385:VP(12,1)=74.20668 'SARNAC
115 VP(13,0)=38.19667:VP(13,1)=102.687 'LAMAR
116 VP(14,0)=42.41:VP(14,1)=83.01 'DETROIT
117 VP(15,0)=36.08:VP(15,1)=115.15833# 'LAS VEGAS
118 VP(16,0)=39.968:VP(16,1)=74.77:RCO(16,0)=39.92:RCO(16,1)=74.9 'PRACTICE NEAR PHILADELPHIA
119 VP(17,0)=47.435:VP(17,1)=122.30833# 'SEATTLE
120 VP(18,0)=46.7617:VP(18,1)=100.49833# 'BISMARK
121 VP(19,0)=47.45:VP(19,1)=111.41667# 'GREAT FALLS
122 VP(20,0)=37.62:VP(20,1)=122.37333# 'SAN FRANCISCO
123 VP(21,0)=40.85:VP(21,1)=111.98333# 'SALT LAKE CITY
124 VP(22,0)=49.0783:VP(22,1)=123.14833# 'VANCOUVER
125 VP(23,0)=34.985:VP(23,1)=78.875 'FAYETTEVILLE
126 VP(24,0)=31.5:VP(24,1)=81.47667 'BRUNSWICH
127 VP(25,0)=27.90833:VP(25,1)=81.685 'ST-PETERSBURG
128 VP(26,0)=33.67:VP(26,1)=86.9 'BIRMINGHAM
129 VP(27,0)=30.03:VP(27,1)=90.171667# 'NEW ORLEANS
130 VP(28,0)=61.25:VP(28,1)=149.82:RCO(28,0)=61.20433:RCO(28,1)=149.6436 'ANCHORAGE
131 VP(29,0)=39.9:VP(29,1)=-116.408:RCO(29,0)=39.8452:RCO(29,1)=-116.3017 'BEJING
132 VP(30,0)=-34.6:VP(30,1)=58.47:RCO(30,0)=-34.6402:RCO(30,1)=58.36332 'BUENOS AIRES
133 VP(31,0)=30!:VP(31,1)=-31.27:RCO(31,0)=30.02751:RCO(31,1)=-31.164 'CAIRO
134 VP(32,0)=21.315:VP(32,1)=-157.86:RCO(32,0)=21.24524:RCO(32,1)=-157.9258 'HONOLULU
135 VP(33,0)=-12.06:VP(33,1)=76.19:RCO(33,0)=-12.00351:RCO(33,1)=-157.9258 'LIMA
136 VP(34,0)=19.43:VP(34,1)=99.13:RCO(34,0)=19.45374:RCO(34,1)=99.03709 'MEXICO CITY
137 VP(35,0)=55.75:VP(35,1)=-37.62:RCO(35,0)=55.78455:RCO(35,1)=-37.475 'MOSCOW
138 VP(36,0)=28.5:VP(36,1)=-77.23001:RCO(36,0)=28.5666:RCO(36,1)=-77.1608 'NEW DELHI
139 VP(37,0)=48.75:VP(37,1)=-2.25:RCO(37,0)=48.84027:RCO(37,1)=-2.2099 'PARIS
140 VP(38,0)=1.34:VP(38,1)=-103.9:RCO(38,0)=1.319794:RCO(38,1)=-103.987 'SINGAPORE
141 VP(39,0)=-33.57:VP(39,1)=-151.14:RCO(39,0)=-33.58136:RCO(39,1)=-151.2495 'SYDNEY
142 VP(40,0)=-18.82:VP(40,1)=-47.52:RCO(40,0)=-18.73121:RCO(40,1)=-47.4867 'TANANARIVE
143 VP(41,0)=35.7:VP(41,1)=-139.75:RCO(41,0)=35.71925:RCO(41,1)=-139.8622 'TOKYO
144 VP(42,0)=45.5:VP(42,1)=73.6 'MONTREAL
185 GOTO 10000
190 ' BEGIN CRUISE MODULE INIT FLIGHT VARIABLES
191 RS=1:RN=RND(1):IF RN<.5 THEN RS=-1 ' WIND DIRECTION FOR ILS
192 RW=(10*RN)+5
193 RW=RS*RW:TRUE=-1:FALSE=0 ' DRIFT PER SECOND FOR ILS
195 FOR I=0 TO 9:F(I)=0:NEXT
198 FL=1:FA=10:BR=10:TH=3!:Y1=16:X1=2:KK=0:CC=CINT(CC)
200 RA=0:AIS(1)=AIS:FA(1)=10:CC(1)=CC:AL(1)=AL:RP=40
203 VO(1)=0:VO$="OUT ":VO(2)=8:VO(3)=0:VO(4)=999.9
204 GX(0)=0:GY(0)=0
205 XO=36481!:YO=0
220 TD=TIMER:TL=TD:' TL=TIME OF DAY IN SECONDS
221 TW(1)=TD
222 GOSUB 335 'DISPLAY PANEL
224 GOSUB 600 'DISPLAY INSTRUMENT READINGS
300 K$=INKEY$:IF K$="" GOTO 304
302 GOSUB 800 'KEY INPUT ROUTINE
304 GOTO 1000 ' UPDATE ROUTINE
305 GOTO 224 'DO IT ALL AGAIN
335 'DISPLAY PANEL
380 LOCATE 9,30:PRINT SPACE$(7);"RUDDER";SPACE$(11)
384 LOCATE 10,32:PRINT CHR$(218);STRING$(15,196);CHR$(191);
386 FOR X=32 TO 48 STEP 16
387 FOR Y=11 TO 23
388 LOCATE Y,X:PRINT CHR$(179);
389 NEXT Y
390 NEXT X
391 LOCATE 23,32:PRINT CHR$(192);STRING$(15,196);CHR$(217);
392 LOCATE 11,39:PRINT "VOR":LOCATE 12,44:PRINT "MHZ"
393 LOCATE 15,38:PRINT "RANGE"
394 LOCATE 17,35:PRINT ".....:....."
395 LOCATE 20,38:PRINT "RADIAL"
396 LOCATE 21,39:PRINT "DME":LOCATE 22,44:PRINT "NM";
397 FOR Y=2 TO 8:LOCATE Y,12:PRINT CHR$(196):NEXT
398 FOR Y=2 TO 4:LOCATE Y,21:PRINT CHR$(196):NEXT
400 LOCATE 10,8:PRINT CHR$(218);STRING$(15,196);CHR$(191)
402 FOR X=8 TO 24 STEP 16
404 FOR Y=11 TO 17
406 LOCATE Y,X:PRINT CHR$(179);
408 NEXT Y
410 NEXT X
412 LOCATE 18,8:PRINT CHR$(192);STRING$(15,196);CHR$(217);
414 LOCATE 14,27:PRINT "ILS"
418 GX(1)=0:GY(1)=0
420 GOSUB 2100
422 LOCATE 9,21:COLOR 0,7:PRINT " "
424 LOCATE 8,19:COLOR 7,0:PRINT "RADAR ALT"
499 RETURN
500 '
501 F(1)=0:F(2)=0:F(8)=0:F(5)=0:XO=36481!:YO=0:MK=0:KK=0:AAA=0
505 LOCATE 20,52:PRINT "ROGERS MISSED APPROACH":KK=KK+1:IF KK<100 THEN GOTO 505
510 KK=0:LOCATE 20,52:PRINT SPACE$(22):GOSUB 2118
520 COLOR 0,7:LOCATE 9,21:PRINT SPACE$(5):COLOR 7,0
530 FOR I=0 TO 4:LOCATE 19+I,1:PRINT SPACE$(31):NEXT
550 GOTO 305
600 ' DISPLAY INST. READ
601 COLOR 0,7:IF F(8)=1 THEN GOTO 615 ' RUDDER
602 LOCATE 8,32:PRINT SPACE$(17)
603 LOCATE 8,RP:PRINT CHR$(24)
605 LOCATE 2,1:F$="######":PRINT USING F$;FIX(FU)
610 LOCATE 2,8:F$="##":PRINT USING F$;FIX(FP)
615 LOCATE 2,39:F$="###":PRINT USING F$;CC
620 LOCATE 5,39:F$="####":PRINT USING F$;AIS
625 LOCATE 5,46:F$="########":PRINT USING F$;RC
630 LOCATE 5,55:F$="##,###":PRINT USING F$;INT(AL)
636 IF F(2)=1 THEN LOCATE 9,21:F$="#####":PRINT USING F$;INT(AL)
638 COLOR 7,0:LOCATE 1,67:PRINT TIME$
640 ' DISP. THRUST
650 COLOR 0,7:FOR I=2 TO 8
651 LOCATE I,11:PRINT " "
652 NEXT
655 LOCATE TR+1,11:PRINT ">";
660 ' DISP PITCH
665 FOR I=2 TO 4:LOCATE I,20:PRINT " ":NEXT
670 LOCATE FL+1,20:PRINT ">"
674 F$="+###"
675 LOCATE 6,20:PRINT USING F$;FA:COLOR 7,0
676 IF F(4)=1 THEN LOCATE 5,29:PRINT " ":GOTO 708
679 IF F(7)=0 AND STALL=O THEN LOCATE 5,29:PRINT " " ELSE LOCATE 5,29:COLOR 0,7:PRINT " ":COLOR 7,0 :SOUND 200,.5:RETURN
680 ' DISP FLAPS
690 COLOR 0,7:LOCATE 9,55:IF BR=10 THEN PRINT " UP "
695 IF BR=12 THEN PRINT " DWN "
696 COLOR 7,0
700 ' WHEELS
705 LOCATE 9,65:COLOR 0,7:IF WH THEN PRINT " DWN " ELSE PRINT " UP "
706 COLOR 7,0
708 ' BRAKES
709 COLOR 0,7:LOCATE 9,74:IF BK=13 THEN PRINT " REL " ELSE PRINT " SET "
710 COLOR 7,0:IF F(4)=1 THEN RETURN
712 ' LAT/LONG
713 COLOR 0,7:LOCATE 5,68:F$="####":PRINT USING F$;DP(4)
714 LOCATE 5,73:F$="###.#":PRINT USING F$;DP(5)
715 LOCATE 6,68:F$="####":PRINT USING F$;DP(6)
716 LOCATE 6,73:F$="###.#":PRINT USING F$;DP(7):COLOR 7,0
717 LOCATE 5,79:IF L1=0 THEN PRINT " " ELSE LOCATE 5,79:IF L1>0 THEN PRINT "N" ELSE IF L1<0 THEN PRINT "S"
718 LOCATE 6,79:IF GG2=0 THEN PRINT " " ELSE LOCATE 6,79:IF GG2>0 THEN PRINT "W" ELSE IF GG2<0 THEN PRINT "E"
719 LOCATE 22,52:PRINT "WIND: ";CINT(WV);" KNOTS "
720 LOCATE 23,57:PRINT "AT ";CINT(WD);" DEGREES "
723 IF F(2)=1 THEN RETURN
724 ' DISP VOR
725 COLOR 0,7:LOCATE 12,38:F$="###.#":PRINT USING F$;VO(1)
726 LOCATE 14,39:PRINT VO$
727 LOCATE 19,39:F$="###":PRINT USING F$;VO(3)
728 LOCATE 22,38:F$="###.#":PRINT USING F$;VO(4)
729 LOCATE 18,34:PRINT SPACE$(13)
730 IF VO$="OUT " GOTO 732
731 LOCATE 18,VO(2)+1:PRINT CHR$(193)
732 COLOR 7,0:RETURN
800 ' KEY INPUT
805 IF K$="F" OR K$="S" THEN GOTO 900
810 IF K$="," OR K$="." THEN GOTO 908
811 IF K$="/" THEN RA=0:RETURN
825 IF K$="U" OR K$="D" THEN GOTO 914
830 IF K$="W" THEN GOTO 928
835 IF K$="V" THEN GOTO 931
836 IF K$="R" THEN GOTO 935
837 IF K$="L" THEN GOTO 940
838 IF K$="A" THEN GOTO 944
839 IF K$="Q" THEN GOTO 946
840 IF K$="M" THEN GOTO 950
841 IF K$="\" THEN GOTO 953
842 IF K$="C" THEN GOTO 2500
843 IF K$="B" THEN GOTO 860
855 RETURN
860 IF F(4)<>1 THEN RETURN
865 IF BK=11 THEN BK=13:RETURN
870 IF BK=13 THEN BK=11:RETURN
900 ' THRUST
902 IF K$="F" THEN TR=TR-1 ELSE TR=TR+1
904 IF TR<1 THEN TR=1
906 IF TR>6 THEN TR=6
907 RETURN
908 ' RUDDER
909 IF K$="," GOTO 912 ELSE RA=RA+1
910 IF RA>4 THEN RA=4
911 RETURN
912 RA=RA-1:IF RA<-4 THEN RA=-4
913 RETURN
914 ' ELEVATOR
915 J=5:IF BR=12 THEN J=1
916 IF K$="U" THEN FA=FA+J ELSE FA=FA-J
918 IF FA>15 THEN FA=15
920 IF FA<-15 THEN FA=-15
922 IF FA>0 THEN FL=1:RETURN
924 IF FA=0 THEN FL=2:RETURN
926 FL=3:RETURN
928 ' WHEELS
929 IF WH THEN WH=FALSE:RETURN
930 IF NOT WH THEN WH=TRUE:RETURN
931 ' VOR FREQ
932 LOCATE 13,52:COLOR 0,7
933 LINE INPUT;"VOR FREQ ";VX$:VO(1)=VAL(VX$)
934 COLOR 7,0:LOCATE 13,52:PRINT SPC(26):RETURN
935 ' SET VOR RADIAL
936 LOCATE 13,52:COLOR 0,7
937 LINE INPUT;"VOR RADIAL ";VX$:VO(3)=VAL(VX$)
938 COLOR 7,0:LOCATE 13,52:PRINT SPC(26):RETURN
940 IF STALL=1 THEN RETURN ' FLAPS
941 IF BR=10 THEN BR=12:RETURN
942 IF BR=12 THEN BR=10:RETURN
944 ' AUTO KEY
945 F(3)=1:RETURN
946 ' REV THRUST
947 IF F(7)=1 THEN TR=7:RETURN
950 ' MISSED APPROACH
951 IF F(2)=1 THEN F(5)=1:RETURN
953 ' FLARE
954 IF F(2)=0 THEN FA=0:FL=2:RETURN
955 FA=1:FL=1
960 RETURN
1000 ' UPDATE
1001 TD=TIMER:TJ=TD-TL:IF TJ<0 THEN TJ=86400!+TJ
1002 TL=TD
1005 IF F(8)=1 THEN GOTO 1011
1010 GOSUB 1100
1011 GOSUB 1130:GOSUB 1160
1013 GOSUB 1145
1014 IF TR=7 THEN GOSUB 1800 ELSE GOSUB 1124
1016 GOSUB 1106
1018 GOSUB 1114
1019 GOSUB 1400 'OMEGA
1020 IF F(2)=1 GOTO 1600 ' ILS
1021 GOSUB 1500 'VOR
1030 IF AL<=0 THEN AF=1:GOTO 3000
1031 IF F(2)=0 GOTO 1099
1032 IF AL>0 GOTO 1068
1033 IF F(7)=1 GOTO 1090
1034 F(7)=1
1036 TY=YN
1038 TX=XN-1250
1042 IF FA>1 THEN AF=2:GOTO 3000
1044 IF FA<0 THEN AF=3:GOTO 3000
1046 IF F(6)=0 GOTO 1062
1048 IF AX>100 THEN AF=4:GOTO 3000
1050 IF AX>80 THEN AF=5:GOTO 3000
1052 IF WH=FALSE THEN AF=6:GOTO 3000
1054 IF TX>0 THEN AF=7:GOTO 3000
1056 IF TX<-10500 THEN AF=7:GOTO 3000
1058 IF ABS(TY)>100 THEN AF=7:GOTO 3000
1060 GOTO 1099
1062 AF=8:GOTO 3000
1068 IF F(5)=1 GOTO 1082
1070 IF FA>0 GOTO 1076
1072 IF FA<0 THEN F(6)=0
1074 GOTO 1099
1076 IF F(6)=0 THEN AX=AL:F(6)=1
1077 IF TR=6 GOTO 1080
1078 IF FA<2 THEN RC=-1800:GOTO 1099
1079 FA=2:FL=1:RC=-1800:GOTO 1099
1080 FA=1:FL=1:RC=-300:GOTO 1099
1082 IF AL<20 THEN AF=9:GOTO 3000
1086 GOTO 501
1090 IF XN<-9250 OR ABS(YN)>100 GOTO 1094
1091 IF AIS>0 GOTO 1099
1092 AF=0:GOTO 3000
1094 AF=9:GOTO 3000
1099 GOTO 305
1100 ' FUEL
1101 FU=FU-.47*(14-TR)*TJ:IF FU<0 THEN FU=0
1104 FP=100*(FU/200000!):RETURN
1106 IF F(7)=1 THEN RC=0:RETURN
1107 IF F(6)=1 THEN RETURN
1108 RC=AIS*SIN(ABS(FA/KR))*1.6878*60:IF AL>10000 AND FA>0 THEN RC=RC*(8000/AL)
1109 IF AL>44000! AND FA>0 THEN RC=RC*(45007!-AL)/1000
1110 IF FA<0 THEN RC=-1*RC
1112 RETURN
1114 'ALTITUDE
1115 IF F(7)=1 THEN RETURN
1116 AL=(AL+TJ*RC/60)
1118 IF AL<0 THEN AL=0:RETURN
1120 IF AL>=45000! THEN AL=45000!:FA=0:FL=0
1122 RETURN
1124 ' AIRSPEED
1125 AIS=700-80*TR
1126 ' AIS=AIS-2*FA
1127 IF BR=10 THEN AIS=AIS-2*FA:RETURN
1128 AIS=AIS/3+20:IF TR=6 AND F(2)=1 THEN AIS=102:AIS=AIS-2*FA:RETURN
1129 AIS=AIS-2*FA:RETURN
1130 IF F(5)=1 GOTO 1132
1131 IF F(2)=1 GOTO 1142
1132 IF RA=0 THEN RT=0:RETURN
1133 IF RA<0 THEN J=-1 ELSE J=1
1134 RA=ABS(RA):IF RA=1 THEN RT=1:GOTO 1137
1135 IF RA=2 THEN RT=3:GOTO 1137
1136 IF RA=3 THEN RT=6 ELSE RT=12
1137 RT=J*RT:RA=J*RA
1138 CC=CC+RT
1139 IF CC=>360 THEN CC=CC-360:RETURN
1140 IF CC<0 THEN CC=360+CC
1141 RETURN
1142 IF RA=0 THEN RETURN
1143 IF RA<0 THEN CC=CC-1 ELSE CC=CC+1
1144 RA=0:GOTO 1139
1145 ' RUDDER POSIT
1146 RP=40+RA+RA:RETURN
1160 'STALL IN CRUISE
1161 IF F(2)=1 THEN RETURN
1162 IF AIS<100 THEN GOTO 1163 ELSE STALL=0:RETURN
1163 STALL=1:GOSUB 679:FA=-3:FL=3:RETURN
1200 ' COMPUTE DISTANCE
1202 VL=ABS(LB-LC):BL(5)=-1:IF LB=>LC THEN BL(5)=1
1203 IF GC<5 THEN GC=360+GC
1204 IF GB<5 THEN GB=360+GB
1205 VG=ABS(GB-GC):BL(4)=1:IF GB=>GC THEN BL(4)=-1
1206 LA=LC:GOSUB 2400
1208 M1=MP
1210 LA=LB:GOSUB 2400
1212 M2=MP:DM=ABS(M2-M1)
1214 IF DM=0 GOTO 1220
1216 QO=VG/(DM/60):IF QO>114.59 GOTO 1220
1218 CA=KR*ATN(QO):DR=VL*(1/COS(CA/KR)):GOTO 1222
1220 CA=90:DR=VG*COS(LC/KR)
1222 DR=DR*60:IF BL(5)=-1 GOTO 1226
1224 IF BL(4)=1 THEN CR=CA ELSE CR=360-CA
1225 RETURN
1226 IF BL(4)=1 THEN CR=180-CA ELSE CR=180+CA
1228 RETURN
1250 ' WIND VECTOR
1252 I=FIX(AL/4000):IF I=>10 THEN I=10
1254 WD=WA(I,0):WV=WA(I,1)
1256 RETURN
1260 ' WIND SOLUTION
1262 A=CC:L=AJ:GOSUB 1300
1264 MX=LX:MY=LY
1266 GOSUB 1250
1268 A=WD+180:IF A=>360 THEN A=A-360
1270 L=WV:GOSUB 1300
1272 MX=MX+LX:MY=MY+LY:GOSUB 1350
1274 TK=MA:GS=VZ
1276 RETURN
1300 ' VECTOR TO RECTANGULAR
1302 IF A<=90 THEN Q=1:B=90-A:GOTO 1310
1304 IF A<=180 THEN Q=2:B=A-90:GOTO 1310
1306 IF A<=270 THEN Q=3:B=270-A:GOTO 1310
1308 Q=4:B=A-270
1310 LX=L*COS(B/KR):LY=L*SIN(B/KR)
1312 IF Q=1 THEN RETURN
1314 IF Q=2 THEN LY=-1*LY:RETURN
1316 IF Q=3 THEN LX=-1*LX:LY=-1*LY:RETURN
1318 LX=-1*LX
1320 RETURN
1350 ' POLAR VECTOR
1352 VZ=SQR(MX^2+MY^2)
1354 IF MX<=0 GOTO 1358
1356 IF MY<=0 THEN Q=2 ELSE Q=1
1357 GOTO 1360
1358 IF MY<=0 THEN Q=3 ELSE Q=4
1360 IF MX=0 THEN MA=90:GOTO 1366
1362 MQ=ABS(MY/MX)
1364 MA=KR*ATN(MQ)
1366 IF Q=1 THEN MA=90-MA:RETURN
1368 IF Q=2 THEN MA=90+MA:RETURN
1370 IF Q=3 THEN MA=270-MA:RETURN
1372 MA=270+MA
1374 RETURN
1400 ' OMEGA POSIT DISPLAY
1402 AIS(2)=AIS:FA(2)=FA:CC(2)=CC:AL(2)=AL
1404 AIS=AIS(1):FA=FA(1):CC=CC(1):AL=AL(1)
1406 IF AIS(2)<>AIS OR FA(2)<>FA GOTO 1440
1408 IF CC(2)<>CC OR AL(2)<>AL GOTO 1440
1409 IF TW(1)>TD THEN TW(1)=TD
1410 F(0)=1:IF TD<TW(1)+60 GOTO 1442
1412 AJ=AIS*COS(ABS(FA)/KR)
1414 GOSUB 1260
1416 DN=GS*(TD-TW(1))/3600
1418 CN=TK:L1=LL(1):G1=GL(1):GOSUB 2610
1420 GOSUB 2000
1422 F(0)=0:TW(1)=TD:LL(1)=L2:GL(1)=G2
1424 LS(1)=L2:GS(1)=G2
1426 FOR J=4 TO 7:DP(J)=CP(J):NEXT
1428 AIS(1)=AIS(2):FA(1)=FA(2):CC(1)=CC(2):AL(1)=AL(2)
1430 AIS=AIS(2):FA=FA(2):CC=CC(2):AL=AL(2)
1432 RETURN
1440 TW(1)=TD:F(0)=0
1442 AJ=AIS*COS(ABS(FA)/KR)
1444 GOSUB 1260
1446 DN=GS*TJ/3600
1448 CN=TK:L1=LS(1):G1=GS(1):GOSUB 2610
1450 GOSUB 2000
1452 LS(1)=L2:GS(1)=G2
1454 IF F(0)=1 GOTO 1458
1456 LL(1)=L2:GL(1)=G2
1458 GOTO 1426
1500 ' VOR
1502 IF VO(1)=0 GOTO 1540
1504 FOR J=0 TO 42:IF VO(1)=VF(J) GOTO 1506
1505 NEXT:GOTO 1540
1506 LC=VP(J,0):GC=VP(J,1)
1508 AR=VG(J,0):LL=VG(J,1)
1509 LB=L2:GB=G2
1510 LO=360-LL
1512 GOSUB 1200
1514 IF DR>300 GOTO 1540
1516 IF CR=>360 THEN CR=CR-360
1517 GOTO 1578
1518 VO$="FROM"
1519 VO(5)=CR-VO(3):IF VO(5)<=180 GOTO 1522
1520 VO(5)=VO(5)-360:GOTO 1524
1522 IF VO(5)<-180 THEN VO(5)=VO(5)+360
1524 IF ABS(VO(5))>90 THEN I1=VO(3):GOTO 1536
1526 IF VO$="FROM" THEN I=-1 ELSE I=1
1527 IF I=1 THEN VO(3)=I1
1528 VO(2)=40+I*INT(VO(5)):VO(4)=DR
1530 IF VO(2)<35 THEN VO(2)=34
1532 IF VO(2)>45 THEN VO(2)=45
1534 GOTO 1560
1536 VO$=" TO ":VO(3)=VO(3)+180:IF VO(3)=>360 THEN VO(3)=VO(3)-360
1538 GOTO 1519
1540 VO$="OUT ":VO(4)=999.9:F(3)=0:RETURN
1546 IF DR>12 OR DR<10 THEN MK=0:GOTO 1518
1548 IF AL>4000 THEN MK=0:GOTO 1518
1550 IF F(1)=1 THEN J=9 ELSE J=2.5
1552 IF CR>AR+J OR CR<AR-J THEN MK=0:GOTO 1518
1554 F(1)=1:MK=1:GOTO 1518
1560 IF MK=0 THEN COLOR 7,0
1561 IF MK=1 THEN COLOR 0,7:SOUND 400,.5
1562 LOCATE 2,30:PRINT " ":COLOR 7,0
1566 IF MK=0 THEN F(1)=0:RETURN
1570 IF CC>LL+1 OR CC<LL-1 THEN RETURN
1572 IF RA<>0 THEN RETURN
1574 F(1)=0:F(2)=1
1576 GOTO 1540
1578 IF F(3)=1 THEN VO(3)=CR:F(3)=0
1580 GOTO 1546
1600 ' ILS
1602 MK=1
1603 DW=RW*TJ:IF F(7)=1 THEN DW=0 'DW DRIFT IN FEET
1604 IF F(7)=1 THEN CC=LL:RA=0
1606 CJ=CC
1608 IF CJ>180 THEN CJ=360-CJ:CJ=-1*CJ
1610 HA=LO+CJ
1612 DC=360-HA:TS=1:IF HA<180 THEN DC=HA:TS=-1
1614 IF DC<0 THEN DC=-1*DC:TS=-1*TS
1616 TL$="W":IF TS=1 THEN TL$="E"
1618 DD=1.6878*AIS*TJ
1620 DY=DD*SIN(DC/KR):DX=DD*COS(DC/KR)
1622 XN=XO-DX:IF TL$="E" THEN DY=-1*DY
1624 YN=YO+DY+DW
1626 LM=KR*ATN(AL/XN)
1628 BE=KR*ATN(ABS(YN)/ABS(XN)):IF BE>2.5 THEN MK=0
1630 J=(LM-TH)/.25:IF XN<5000 THEN J=(LM-TH)/.5
1631 J=FIX(J)
1632 IF J>3 THEN J=3
1633 IF J<-3 THEN J=-3
1634 IF XN=>10000 THEN BE=BE/.1
1635 IF XN<10000 AND XN=>5000 THEN BE=BE/.25
1636 IF XN<5000 THEN BE=BE/.45
1637 BE=FIX(BE)
1638 IF BE>7 THEN BE=7
1639 IF YN>0 THEN BE=-1*BE
1640 IF MK=0 GOTO 1648
1642 IF XN>34960! AND XN<38000! THEN SND=400:IF AAA=1 THEN GOTO 1648 ELSE 1830
1644 IF XN>2534 AND XN<5574 THEN SND=1300:GOTO 1648
1646 MK=0
1648 GX(1)=BE:GY(1)=J
1650 GOSUB 2100
1654 IF MK=0 THEN COLOR 7,0,0
1655 IF MK=1 THEN COLOR 0,7,0:SOUND SND,.5
1656 LOCATE 2,30:PRINT " "
1658 COLOR 7,0:LOCATE 21,52:PRINT SPACE$(13)
1662 XO=XN:YO=YN
1664 IF F(8)=1 GOTO 1676
1666 IF XN>12000 GOTO 1676
1668 F(8)=1
1670 FOR I=0 TO 3
1672 LOCATE 19+I,1:PRINT RS$(I)
1674 NEXT I
1676 IF F(8)=0 GOTO 1699
1678 LOCATE 23,XQ:PRINT " "
1680 YU=FIX(YN/10):XC=16+YU
1682 IF XC<1 THEN XC=1
1684 IF XC>31 THEN XC=31
1686 LOCATE 23,XC:PRINT CHR$(234)
1688 XQ=XC
1699 GOTO 1031
1800 ' REV THRUST
1802 IF F(4)=1 GOTO 1806
1804 VO=AIS*1.6878:F(4)=1
1806 V=VO-(3.23636)*TJ:IF BK=11 THEN V=V-2
1808 IF V<=0 THEN V=0
1810 VO=V
1812 AIS=V/(1.6878)
1814 RETURN
1830 COLOR 0,7:FOR K=1 TO 150:LOCATE 21,52:PRINT "CLEAR TO LAND":NEXT K:AAA=1:GOTO 1644
2000 ' COMPUTE POSITION
2004 IF CN=0 THEN CA=0:LB(5)=1:LB(6)=1:GOTO 2014
2006 IF CN>0 AND CN<=90 THEN CA=CN:LB(5)=1:LB(6)=1:GOTO 2014
2008 IF CN>90 AND CN<=180 THEN CA=180-CN:LB(5)=-1:LB(6)=1:GOTO 2014
2010 IF CN>180 AND CN<=270 THEN CA=CN-180:LB(5)=-1:LB(6)=-1:GOTO 2014
2012 CA=360-CN:LB(5)=1:LB(6)=-1
2014 IF CA>89.5 GOTO 2034
2016 DL=DN*COS(CA/KR):DL=DL/60:LB(3)=LB(5)
2018 IF LB(3)=1 THEN L2=L1+DL:GOTO 2024
2020 L2=L1-DL
2024 LA=L1:GOSUB 2400
2026 M1=MP
2028 LA=L2:GOSUB 2400
2030 M2=MP
2032 DM=ABS(M1-M2):DG=DM*TAN(CA/KR):GOTO 2036
2034 L2=L1:DG=DN/COS(L1/KR)
2036 DG=DG/60:LB(4)=LB(6)
2038 IF LB(4)=-1 GOTO 2046
2040 G2=G1-DG:GOSUB 2600
2044 GOTO 2047
2046 G2=G1+DG:GOSUB 2600
2047 IF L2>=(89+59.9/60) THEN L1=90-.7/60:GOSUB 2445:CC=180+CC:GOSUB 2440
2048 IF L2<=-1*(89+59.9/60) THEN L1=-1*(90-.7/60):GOSUB 2446:CC=180+CC:GOSUB 2440
2050 CP(4)=FIX(L2):CP(5)=(L2-CP(4))*60
2051 IF G2>180 AND G2<360 THEN GG2=G2-360 ELSE GG2=G2
2052 CP(6)=FIX(GG2):CP(7)=(GG2-CP(6))*60
2054 RETURN
2100 IF F(2)=0 THEN RETURN ' PLOT GLIDESLOPE
2101 IF XN<=1250 THEN GOTO 2118
2102 X0=16+GX(0):X1=16+GX(1):Y0=14+GY(0):Y1=14+GY(1)
2103 COLOR 7,0,0
2104 FOR Y=11 TO 17:LOCATE Y,X0:PRINT " ":NEXT
2106 LOCATE Y0,9:PRINT STRING$(15,32)
2108 FOR Y=11 TO 17:LOCATE Y,X1:PRINT CHR$(197):NEXT
2110 LOCATE Y1,9:PRINT STRING$(15,197)
2112 LOCATE Y1,X1:PRINT CHR$(219)
2114 LOCATE 14,16:PRINT CHR$(234)
2116 GX(0)=GX(1):GY(0)=GY(1):GOTO 2140
2118 LOCATE Y1,9:PRINT STRING$(15,32)
2120 FOR Y=11 TO 17:LOCATE Y,X1:PRINT CHR$(32):NEXT
2130 LOCATE 14,16:PRINT CHR$(32)
2140 RETURN
2400 ' COMP MERIDIONAL PARTS
2416 IF LA>(89+59/60) OR LA<-1*(89+59/60) THEN LA=89+59/60
2418 S1=SIN(LA/KR)
2420 S2=S1*S1:S3=S1*S2
2422 TM(0)=TAN((45+LA/2)/KR)
2424 TM(0)=KM(0)*LOG(TM(0))/LOG(10)
2426 TM(1)=KM(1)*S1
2428 TM(2)=KM(2)*S3
2430 TM(3)=KM(3)*S2*S3
2432 MP=TM(0)-TM(1)-TM(2)-TM(3)
2436 RETURN
2440 GOSUB 1139:CC(2)=CC:CC(1)=CC:RETURN
2445 IF CC=0 THEN G2=G2+180:G1=G2:GS(1)=G2:GL(1)=G2:RETURN
2446 IF CC=180 THEN G2=G2+180:G1=G2:GS(1)=G2:GL(1)=G2:RETURN
2450 LOCATE 20,52:LINE INPUT;"OVER THE POLE, C ENTER: ";POLE$
2455 LOCATE 20,52:PRINT SPACE$(29):IF POLE$<>"C" THEN GOTO 2450
2460 LOCATE 20,52:PRINT SPACE$(29):GOSUB 2500:GOTO 1000
2500 LOCATE 13,50:COLOR 0,7
2505 LINE INPUT;"ALTITUDE: ";VX$:AL=VAL(VX$):AL(1)=AL:COLOR 7,0:LOCATE 12,50:PRINT SPC(31)
2510 COLOR 0,7:LOCATE 13,50:LINE INPUT;"LATITUDE (DEC.): ";VX$:LS(1)=VAL(VX$):LL(1)=LS(1):COLOR 7,0:LOCATE 13,50:PRINT SPC(31)
2515 COLOR 0,7:LOCATE 13,50:LINE INPUT;"LONGITUDE (DEC.): ";VX$:GS(1)=VAL(VX$):GOSUB 2620:GL(1)=GS(1)
2520 COLOR 7,0:LOCATE 13,50:PRINT SPC(31):RETURN
2600 IF G2<0 THEN G2=360+G2
2605 IF G2>=360 THEN G2=G2-360
2606 RETURN
2610 IF G1<0 THEN G1=360+G1
2615 IF G1>=360 THEN G1=G1-360
2616 RETURN
2620 IF GS(1)<0 THEN GS(1)=360+GS(1)
2625 IF GS(1)>=360 THEN GS(1)=GS(1)-360
2626 RETURN
3000 GOSUB 600:COLOR 7,0:LOCATE 20,52:LINE INPUT;"ENTER: FOR REPORT";RAPPORT$ 'ABORT
3002 M$(1)="---------- A CRASH HAS OCCURRED ----------"
3004 M$(2)="YOU ACCIDENTLY STALLED THE AIRCRAFT DURING FINAL APPROACH."
3006 M$(3)="THE STALL OCCURRED AT AN ALTITUDE OF"
3008 M$(4)="THE AIRCRAFT STRUCK THE GROUND IN A NOSE UP ATTITUDE."
3010 M$(5)="THE IMPACT RUPTURED THE TAIL SECTION OF THE PLANE."
3012 M$(6)="------ LOCATION OF CRASH ------"
3013 M$(7)="------ LANDING POSITION ------"
3016 M$(8)=" PITCH ANGLE="
3018 M$(9)=" AIRSPEED="
3020 M$(10)="YOU FLARED AT TOO HIGH AN ALTITUDE DURING FINAL APPROACH."
3022 M$(11)="THE RESULTING STALL OCCURRED AT AN ALTITUDE OF"
3024 M$(12)="THE IMPACT RUPTURED THE"
3026 M$(13)="YOU FORGOT TO LOWER THE LANDING GEAR."
3028 M$(14)="YOU FAILED TO TOUCH DOWN INSIDE THE RUNWAY."
3030 M$(15)="-------- AN IMPROPER LANDING WAS MADE --------"
3032 M$(16)="NO DAMAGE OR INJURIES OCCURRED."
3033 RL=0:IF TX>0 THEN RL=1
3034 RW=0:IF ABS(TY)>100 THEN RW=1
3040 N$(2)="FEET INSIDE OF RUNWAY (TOUCH DOWN)"
3041 IF TX>0 THEN N$(2)="FEET SHORT OF RUNWAY"
3042 N$(3)="FEET LEFT OF RUNWAY CENTERLINE"
3043 IF TY>0 THEN N$(3)="FEET RIGHT OF RUNWAY CENTERLINE"
3044 RX=FIX(TX):RX=ABS(RX)
3045 RY=FIX(TY):RY=ABS(RY)
3050 IF AF=0 GOTO 3600
3055 AX=INT(AX):FA=INT(FA):AIS=INT(AIS):GOSUB 3700
3060 ON AF GOTO 3100,3150,3200,3250,3300,3350,3400,3450,3500
3100 '
3102 LOCATE 12,1:PRINT M$(1)
3104 PRINT "YOU FLEW INTO THE GROUND."
3106 PRINT "THE INSTRUMENT READINGS AT THE TIME OF CRASH ARE AS SHOWN ABOVE."
3108 GOTO 3818
3150 LOCATE 12,1
3152 PRINT M$(1)
3154 PRINT M$(2)
3156 PRINT M$(3);AX;"FEET."
3158 PRINT M$(4)
3160 PRINT M$(5)
3162 N$(1)=M$(6)
3164 GOTO 3800
3200 LOCATE 12,1
3202 PRINT M$(1)
3204 PRINT "YOU FLEW INTO THE GROUND DURING FINAL APPROACH."
3206 PRINT "AT TIME OF CRASH, THE AIRCRAFT PROFILE WAS AS FOLLOWS:"
3208 PRINT M$(8);FA;"DEGREES"
3210 PRINT M$(9);AIS
3212 N$(1)=M$(6)
3214 GOTO 3800
3250 LOCATE 12,1
3252 PRINT M$(1)
3254 PRINT M$(10)
3256 PRINT M$(11);AX;"FEET."
3258 PRINT M$(12)+"FUSELAGE."
3260 N$(1)=M$(6)
3262 GOTO 3800
3300 LOCATE 12,1
3302 IF NOT WH THEN PRINT M$(1)
3304 IF WH THEN PRINT "------ A MINOR CRASH HAS OCCURRED -----"
3306 PRINT M$(10)
3308 PRINT M$(11);AX;"FEET."
3310 IF NOT WH THEN PRINT M$(13)
3312 IF NOT WH THEN PRINT M$(12)+"FUSELAGE."
3314 IF WH THEN PRINT "THE IMPACT DAMAGED THE LANDING GEAR."
3316 IF WH THEN PRINT "ALL PASSENGERS HAVE BEEN SAFELY EVACUATED."
3318 N$(1)=M$(6)
3320 GOTO 3800
3350 LOCATE 12,1
3352 PRINT M$(1)
3354 PRINT M$(13)
3356 PRINT "THE AIRCRAFT LANDED ON ITS BELLY, CAUSING MODERATE DAMAGE."
3358 PRINT "ALL PASSENGERS HAVE BEEN SAFELY EVACUATED."
3360 N$(1)=M$(6)
3361 GOTO 3800
3400 LOCATE 12,1
3402 PRINT M$(15)
3404 PRINT M$(14)
3406 N$(1)=M$(7)
3408 GOTO 3800
3450 LOCATE 12,1
3452 PRINT M$(15)
3454 PRINT "YOU FAILED TO EXECUTE A FLARE PRIOR TO TOUCHING DOWN."
3456 PRINT "THIS IS A VIOLATION OF COMPANY PROCEDURES."
3458 PRINT M$(16)
3460 N$(1)=M$(7)
3462 GOTO 3800
3500 LOCATE 12,1
3502 PRINT M$(15)
3504 PRINT "YOU ROLLED OFF THE RUNWAY AFTER TOUCHING DOWN."
3506 PRINT M$(16)
3514 IF XN<-9250 THEN PRINT "YOU ROLLED PAST FAR END OF RUNWAY"
3516 IF ABS(YN)>100 THEN PRINT "YOU ROLLED THRU RUNWAY SIDE BORDER"
3518 PRINT:N$(1)=M$(7):GOTO 3800
3600 GOSUB 3700:LOCATE 12,1
3602 PRINT "----- YOU HAVE SUCCESSFULLY COMPLETED THE FLIGHT -----"
3604 PRINT "ALL PROCEDURES WERE PROPERLY FOLLOWED."
3606 N$(1)=M$(7)
3610 PRINT "CONGRATULATIONS ON A SUCCESSFUL FLIGHT."
3612 GOTO 3800
3700 ' CLEAR TO DISPLAY REPORT
3702 FOR I=10 TO 23
3703 LOCATE I,1:PRINT SPACE$(80)
3706 NEXT I
3708 RETURN
3800 ' LANDING STATS
3802 PRINT
3804 PRINT SPC(26);N$(1)
3808 IF RL=0 THEN PRINT RX;N$(2)
3809 IF RL=1 THEN COLOR 0,7,0:PRINT RX;N$(2):COLOR 7,0,0
3812 IF RW=0 THEN PRINT RY;N$(3)
3813 IF RW=1 THEN COLOR 7,0,0:PRINT RY;N$(3)
3814 IF AF=0 THEN PRINT ABS(FIX(XN-1250));"FEET FROM END OF RUNWAY, PLANE AT STOP."
3816 PRINT "--- SIZE OF RUNWAY IS 10500 FEET BY 200 FEET ---"
3818 COLOR 7,0,0:GOTO 12300
10000 ' BEGIN TAKEOFF MODULE HERE
10020 CLS:GOTO 11600
10022 FALSE=0:TRUE=NOT FALSE
10025 KR=57.295779#:DIM XM(13),WM(13)
10030 DATA 37,35,32,30,27,25,22,20,17,15,12,10,7,5
10040 DATA 7,11,16,21,26,31,36,41,46,51,56,61,66,71
10045 FOR I=0 TO 13:READ XM(I):NEXT
10050 FOR I=0 TO 13:READ WM(I):NEXT
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
10090 IO=40
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
10145 DATA FUEL,LBS,%,VHF,MHZ,THRUST,MAX,IDLE,REV
10150 DATA PITCH," +"," -",DEG,FLAPS, UP , DWN ,WHEELS,UP,MID,DOWN
10155 DATA COMPASS,AIRSPEED,KTS," VERT",SPEED,FPM
10160 DATA ALTITUDE,FEET,CLOCK,BRAKE, SET , REL
10170 FOR I=O TO 31:READ P$(I):NEXT
10185 FOR I=0 TO 9:F(I)=0:NEXT
10190 ' INIT. VARIABLES FOR TAKEOFF MODE
10195 FU=200000!:FP=99:AIS=0:RC=0:AL=0
10200 MZ=121.5:TR=6:FL=2:FA=0:WH=TRUE:IX=40:BR=11:BK=11:NY=10:OHH=10:EDGE=0
10205 AB=0
10215 CLS:LOCATE 1,24:PRINT "UNITED 312 CLEARED AS FILED"
10217 PRINT:PRINT
10218 PRINT " SURFACE WINDS VARIABLE, GUSTING TO 15.":PRINT
10219 PRINT " MINIMUM CEILING CONDITIONS ARE IN EFFECT.":PRINT
10230 PRINT
10235 PRINT
10240 PRINT
10245 PRINT " AFTER TAKEOFF, MAINTAIN HEADING ";CC;" TO 3000, THEN PROCEED AS FILED"
10248 LOCATE 20,24:PRINT "STANDBY FOR TAKEOFF CLEARANCE";
10255 TQ=4000:GOSUB 11535
10260 CLS
10265 LOCATE 10,17:PRINT "UNITED 312":PRINT:PRINT
10270 PRINT " YOU ARE CLEARED FOR TAKEOFF "
10271 GOTO 12200
10275 TQ=2000:GOSUB 11535
10280 CLS
10290 TD=TIMER:TL=TD
10295 GOSUB 10330 ' DISPLAY CONTROL PANEL
10300 GOSUB 10410 ' DISPLAY HORIZON LINE
10305 GOSUB 10480 ' DISPLAY RUNWAY
10310 GOSUB 10615 ' DISPLAY INSTTUMENT READINGS
10315 K$=INKEY$:IF K$="" GOTO 10325
10320 GOSUB 10790 ' KEY PULL ROUTINE
10325 GOTO 10945 ' SITUATION UPDATE
10330 ' DISPLAY PANEL (HEADERS ONLY)
10335 LOCATE 1,3:PRINT P$(0);SPACE$(4);P$(5);SPACE$(3);P$(9);SPACE$(12);P$(20)
10340 LOCATE 8,55:PRINT P$(13);SPACE$(4);P$(16);SPACE$(4);P$(29)
10352 IF F(9)=1 THEN RETURN
10355 LOCATE 2,13:PRINT P$(6);SPACE$(6);P$(10);
10360 LOCATE 2,68:PRINT P$(28)
10365 LOCATE 3,1:PRINT P$(1);SPACE$(4);P$(2);SPACE$(37);P$(23)
10370 LOCATE 4,22:PRINT P$(11);SPACE$(13);P$(21);SPACE$(2);P$(24);SPACE$(2);P$(26)
10371 LOCATE 1,28:PRINT "MARKER":LOCATE 2,29:PRINT "> <"
10372 LOCATE 4,29:PRINT "STALL":LOCATE 5,28:PRINT "> <"
10375 LOCATE 5,1:PRINT P$(3)
10380 LOCATE 6,39:PRINT P$(22);SPACE$(6);P$(25);SPACE$(5);P$(27)
10385 LOCATE 7,1:PRINT P$(4);SPACE$(10);P$(7);SPACE$(3);P$(12);
10390 LOCATE 8,13:PRINT P$(8)
10391 LOCATE 4,68:PRINT "VLF OMEGA";:LOCATE 5,64:PRINT "LAT";
10392 LOCATE 6,63:PRINT "LONG";
10393 LOCATE 7,32:PRINT ". . . . : . . . ."
10395 FOR Y=2 TO 8:LOCATE Y,12:PRINT CHR$(196):NEXT
10400 FOR Y=2 TO 4:LOCATE Y,21:PRINT CHR$(196):NEXT
10401 COLOR 0,7:LOCATE 6,1:F$="###.#":PRINT USING F$;MZ:COLOR 7,0
10405 RETURN
10410 ' DISPLAY HORIZONTAL LINE
10415 IF F(9)=0 THEN GOTO 10430
10416 IF OHH=22 THEN RETURN ELSE GOTO 10440
10430 LOCATE 10,1:PRINT STRING$(80,CHR$(196))
10435 RETURN
10440 IF EDGE=1 GOTO 10450 ELSE MK$=STRING$(WE(J),CHR$(0)):LOCATE NY,NX:PRINT MK$:EDGE=1
10446 REM IF NY<23 THEN NY=NY+1:J=J+1:LOCATE NY,1:PRINT SPACE$(80)
10450 LOCATE OHH,1:PRINT SPACE$(80);
10455 LOCATE OHH+1,1:PRINT STRING$(80,CHR$(196))
10460 OHH=OHH+1
10475 RETURN
10480 ' DISPLAY RUNWAY
10485 IF F(4)=1 GOTO 10525
10490 S=10:X=29
10495 FOR Y=11 TO 22
10500 LOCATE Y,X:PRINT "/";SPACE$(S);CHR$(124);SPACE$(S);"\";
10505 X=X-2:S=S+2
10510 NEXT
10515 S$=SPACE$(13)
10520 RETURN
10525 ' RUNWAY GRAPHICS
10530 IF N>3 GOTO 10600
10535 LOCATE OY,OX:PRINT SPACE$(FIX(WM/2));CHR$(124);SPACE$(FIX(WM/2))
10540 LOCATE NY,NX:PRINT MK$;
10545 OY=NY:OX=NX
10550 WM=FW
10555 RETURN
10560 ' WHEN SHIP IN FINAL ZONE
10565 LOCATE OY,OX:PRINT SPACE$(FIX(WM/2));CHR$(124);SPACE$(FIX(WM/2)):IF F(9)=1 THEN RETURN
10570 FOR I=11 TO NY-1
10575 LOCATE I,XE(J):PRINT SPACE$(WE(J))
10580 NEXT I
10585 IF N>4 THEN RETURN
10590 LOCATE NY,NX:PRINT MK$;
10595 RETURN
10600 IF F(2)=1 GOTO 10560 ELSE F(2)=1
10605 FOR I=11 TO 13:LOCATE I,59:PRINT SPACE$(21):NEXT
10610 GOTO 10560
10615 ' DISPLAY INSTRUMENT READINGS
10620 COLOR 0,7:LOCATE 2,1:F$="######":PRINT USING F$;FIX(FU)
10625 LOCATE 2,8:F$="##":PRINT USING F$;FIX(FP)
10626 IF CC=>360 THEN CCC=CC-1 ELSE CCC=CC
10627 IF CC<0 THEN CCC=360+CC ELSE CCC=CC
10630 LOCATE 2,39:F$="###":PRINT USING F$;CCC
10635 LOCATE 5,39:F$="####":PRINT USING F$;AIS
10640 LOCATE 5,46:F$="########":PRINT USING F$;INT(RC)
10645 LOCATE 5,55:F$="##,###":PRINT USING F$;INT(AL):IF F(4)=1 THEN GOTO 10652
10646 LOCATE 5,68:F$="####":PRINT USING F$;DP(4)
10647 LOCATE 5,73:F$="###.#":PRINT USING F$;DP(5)
10648 LOCATE 6,68:F$="####":PRINT USING F$;DP(6)
10649 LOCATE 6,73:F$="###.#":PRINT USING F$;DP(7):COLOR 7,0
10650 LOCATE 5,79:IF L1=0 THEN PRINT " " ELSE LOCATE 5,79:IF L1>0 THEN PRINT "N" ELSE IF L1<0 THEN PRINT "S"
10651 LOCATE 6,79:IF G2=0 THEN PRINT " " ELSE LOCATE 6,79:IF G2>0 THEN PRINT "W" ELSE IF G2<0 THEN PRINT "E"
10652 COLOR 7,0:LOCATE 1,67:PRINT TIME$
10655 ' DISPLAY THRUST
10660 COLOR 0,7:FOR I=2 TO 8
10665 LOCATE I,11:PRINT " "
10670 NEXT
10675 LOCATE TR+1,11:PRINT ">";
10680 ' DISPLAY PITCH
10685 FOR I=2 TO 4:LOCATE I,20:PRINT " ":NEXT
10690 LOCATE FL+1,20:PRINT ">"
10695 F$="+###"
10700 LOCATE 6,20:PRINT USING F$;FA:COLOR 7,0
10705 ' DISPLAY FLAPS
10710 IF F(2)=1 GOTO 10760
10715 COLOR 0,7:LOCATE 9,55: IF BR=11 THEN PRINT " UP "
10717 IF BR=13 THEN PRINT " DWN "
10720 COLOR 7,0
10725 ' WHEELS
10730 LOCATE 9,64:COLOR 0,7:IF WH THEN PRINT " DWN " ELSE PRINT " UP "
10732 COLOR 7,0
10740 ' BRAKES
10745 COLOR 0,7:LOCATE 9,74:IF BK=13 THEN PRINT " REL " ELSE PRINT " SET "
10750 COLOR 7,0
10760 ' DISPLAY RUNWAY ALIGN INDEX
10765 IF F(9)=1 THEN RETURN
10770 LOCATE 23,IO:PRINT " ";
10775 LOCATE 23,IX:PRINT CHR$(24);
10780 IO=IX
10785 RETURN
10790 ' KEY POLL ROUTINE
10795 IF K$="F" THEN GOTO 10830
10800 IF K$="," OR K$="." THEN GOTO 10845
10805 IF K$="B" THEN GOTO 10865
10810 IF K$="U" OR K$="D" THEN GOTO 10880
10815 IF K$="L" THEN GOTO 10925
10817 IF K$="W" THEN GOTO 10941
10818 IF K$="S" THEN GOTO 10826
10825 RETURN
10826 ' THRUST KEY DECREASE
10827 IF F(7)=1 AND BR=11 THEN TR=4
10829 RETURN
10830 ' 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 ' RUDDER KEYS
10846 IF F(7)=1 THEN RETURN
10850 IF AIS<=50 THEN RETURN
10855 IF K$="," THEN CC=CC-1 ELSE CC=CC+1
10860 RETURN
10865 ' BRAKES
10870 IF F(0)=1 THEN RETURN
10875 F(0)=1:BK=13:RETURN
10880 ' PITCH
10881 IF F(7)=1 THEN RETURN
10885 IF AIS<=50 THEN RETURN
10890 FD=-10:IF K$="U" THEN FD=10
10895 FA=FA+FD
10900 IF FA>20 THEN FA=20
10905 IF FA<-20 THEN FA=-20
10910 IF FA>0 THEN FL=1:RETURN
10915 IF FA=0 THEN FL=2:RETURN
10920 FL=3:RETURN
10925 ' FLAPS
10926 IF F(7)=1 AND WH=FALSE 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 ' WHEELS
10942 IF F(7)=1 THEN WH=FALSE
10944 RETURN
10945 ' SITUATION UPDATE
10950 TD=TIMER:TJ=TD-TL:IF TJ<0 THEN TJ=86400!+TJ
10951 TL=TD
10952 IF FA>10 GOTO 11385
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 A=4.02
11000 GOSUB 11190
11010 IF YY>10500 OR ABS(XX)>100 GOTO 11390
11015 IF FA<=0 GOTO 11085
11020 IF AIS<150 GOTO 11385
11030 IF F(3)=0 GOTO 11085
11040 GOSUB 11130
11045 GOSUB 11150
11070 GOSUB 11170
11071 IF AL>0 THEN F(9)=1
11080 LOCATE 23,IO:PRINT " "
11085 GOSUB 11130
11090 GOSUB 10410
11105 GOSUB 11300
11110 GOTO 10305
11130 ' UPDATE FUEL
11131 IF TR=6 THEN FU=FU-1.3*TJ
11132 IF TR=4 THEN FU=FU-2.6*TJ
11135 IF TR=1 THEN FU=FU-4*TJ
11140 FP=100*(FU/200000!)
11145 RETURN
11150 ' RATE OF CLIMB
11155 RC=AIS*SIN(ABS(FA/KR))*1.6878*60
11156 IF RC>=6331 THEN RC=6331
11160 IF FA<0 THEN RC=-1*RC
11165 RETURN
11170 ' ALTITUDE
11175 AL=AL+TJ*RC/60
11180 IF AL<=0 THEN AL=0
11181 IF AL>=1900 THEN AL=1900
11185 RETURN
11190 ' MOTION EQUATIONS
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*RND(1) 'RUNWAY DRIFT BETWEEN -1 TO +1 DEGREE
11226 REM LOCATE 14,1: PRINT SEED
11227 REM LOCATE 15,1:PRINT RS
11228 REM LOCATE 16,1:PRINT WB
11230 CC=CC+WB
11235 DA=(CC-RUNWAY)/KR
11240 DY=S*COS(ABS(DA))
11245 DX=S*SIN(ABS(DA))
11250 IF DA<0 THEN DX=-1*DX
11255 YY=YY+DY
11256 LOCATE 9,30:PRINT "RUNWAY USED:";CINT(YY);"FEET"
11260 XX=XX+DX
11265 AIS=V/1.6878
11270 IF AIS>20 THEN AIS=AIS+WS
11271 COLOR 0,7:LOCATE 5,39:F$="####":PRINT USING F$;AIS:COLOR 7,0
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 ' VARIABLES FOR RUNWAY GRAPHICS
11305 MP=FIX(11+(12*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):SSS$=SPACE$(FIX(J/2))
11340 MK$="_"+S$+"_"+S$+"_"+SSS$+CHR$(124)+SSS$+"_"+S$+"_"+S$+"_"
11345 RETURN
11350 ' IN ZONE 4 MARKER IS RUNWAY EDGE
11355 NY=MP
11360 J=NY-10
11365 NX=XE(J)
11370 IF N>4 THEN RETURN
11375 MK$=STRING$(WE(J),CHR$(220)):IF EDGE=1 THEN MK$=STRING$(WE(J),CHR$(0))
11380 RETURN
11385 GOSUB 10615:AB=1:GOTO 11415
11390 AB=2:IF YY<10500 GOTO 11415
11395 FOR I=10 TO 22
11400 LOCATE I,1:PRINT SPACE$(80);
11405 NEXT I
11410 GOTO 11415
11415 ' ABORT
11420 FOR I=10 TO 23
11425 LOCATE I,1:COLOR 7,0,0:PRINT SPACE$(80)
11430 NEXT I
11435 LOCATE 12,29:PRINT "***TAKEOFF FAILED***":PRINT:PRINT
11440 ON AB GOSUB 11455,11480
11450 GOTO 12300
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 OF THE FUSELAGE SCRAPPED 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 BOUNDRIES."
11490 PRINT "AS A RESULT YOU VEERED OFF THE RUNWAY AND COLLIDED WITH"
11495 PRINT "THE CONTROL TOWER!!"
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."
11515 IF F(3)=1 THEN RETURN
11520 PRINT:PRINT " YOU FORGOT TO LOWER THE FLAPS."
11525 PRINT "AS A RESULT THE AIRCRAFT COULD NOT DEVELOP SUFFICIENT LIFT."
11530 RETURN
11535 ' TIME DELAY PAD
11540 FOR I=1 TO TQ
11545 NEXT I
11550 RETURN
11600 LOCATE 2,25:PRINT "CAPS LOCK SHOULD BE ON...."
11610 PRINT:LINE INPUT;"HIT M (without SHIFT) AND ENTER :";ANS$:IF ANS$="M" GOTO 11620 ELSE GOTO 10000
11620 LOCATE 7,1:PRINT "YOU SHOULD READ THE MANUAL AND ALL THE DOCUMENTATION BEFORE FLYING.."
11630 PRINT:PRINT "With a 8088 running at 4.77 MHz 747WORLD.EXE is satisfactory."
11640 PRINT "With a Turbo or fastest CPU the rate of turn will be too fast,"
11650 PRINT "but the 747WORLD.BAS may give good results. Adjust speed for a "
11660 PRINT "compromise between a fast instrument panel update and a realistic"
11670 PRINT "rate of turn...for example 360 degrees in about 2 to 3 minutes..."
11680 PRINT "in the first rudder position...It is possible to add a delay in"
11690 PRINT "the uptake portion of 747WORLD.BAS and compile again...."
11700 PRINT:PRINT:PRINT "YOUR CHOICE: 1 CONTINUE 2 EXIT"
11710 INPUT CHOICE:IF CHOICE=1 THEN GOTO 12400 ELSE END
12000 ' DEPARTURE ROUTINE
12010 IF F(7)=1 GOTO 12025 ELSE F(7)=1
12020 F(2)=0
12025 IF WH GOTO 12040 ELSE AIS=AIS+4
12030 IF BR<>11 GOTO 12040 ELSE AIS=AIS+4
12031 IF TR<>4 GOTO 12040
12032 IF AIS>=360 THEN AIS=360
12035 IF TR=4 AND AL=1900 GOTO 12036 ELSE GOTO 12090
12036 LOCATE 22,1:PRINT SPACE$(80):GOTO 190
12040 IF AL<1200 GOTO 12090
12041 LOCATE OHH,1:PRINT SPACE$(80)
12042 GOSUB 10615:LOCATE 12,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"
12049 PRINT "FEET, IS AS FOLLOWS:"
12050 PRINT " 1 - RAISE LANDING GEAR"
12052 PRINT " 2 - RETRACT FLAPS"
12054 PRINT " 3 - REDUCE THRUST"
12060 GOTO 12300
12090 IF OHH<22 THEN GOSUB 10410
12091 GOSUB 11130
12092 GOSUB 11150
12094 GOSUB 11170
12099 GOTO 10310
12200 KEY (9) ON:ON KEY (9) GOSUB 12230
12210 LOCATE 15,17:PRINT "PRESS F9 FOR ACKNOLEDGMENT: "
12220 FOR SEED=10 TO 100:NEXT:GOTO 12220
12230 KEY (9) OFF:RETURN 12240
12240 LOCATE 15,45:PRINT "ROGERS 312"
12260 RN=RND(-SEED)
12270 RS=1:IF RN<.5 THEN RS=-1 'RS WIND DRIFT DIRECTION TAKEOFF
12275 GOTO 10275
12300 PRINT:PRINT "YOUR CHOICE: 1 FOR MENU 2 FOR EXIT"
12310 INPUT CHOICE:IF CHOICE=1 THEN GOTO 1 ELSE END
12400 CLS: 'MENU
12410 LOCATE 1,25:PRINT "MENU: AIRPORTS":PRINT
12415 PRINT "ANCHORAGE, ALSK...28 BOSTON, MA..........2 BUFFALO, NY........ 8"
12420 PRINT "CHICAGO, IL...... 6 J F KENNEDY, NY.... 0 KANSAS CITY, MO.... 9"
12430 PRINT "LAS VEGAS, NV.....15 LOS ANGELES, CA.... 4 NEW ORLEANS, LA....27"
12431 PRINT "PHILADELPHIA, PA.. 1 PHILIPSBURG, PA.... 7 ST-PETERSBURG,LA...25"
12440 PRINT "SAN DIEGO, CA..... 3 SAN FRANCISCO, CA..20 SEATTLE, WA........17"
12450 PRINT "MONTREAL,QUE......42 VANCOUVER, BC......22"
12460 PRINT
12470 PRINT "BEIJING,CHINA.....29 BUENOS AIRES, ARG.30 CAIRO, EGYPT.......31"
12471 PRINT "HONOLULU, HAW.....32 LIMA, PERU........33 MEXICO CITY, MEX...34"
12472 PRINT "MOSCOW, USSR......35 NEW DELHI, INDIA..36 PARIS, FRANCE......37"
12473 PRINT "SINGAPORE, MAL....38 SYDNEY, AUSTRAL...39 TANANARIVE,MALAG...40"
12474 PRINT "TOKYO, JAPAN......41"
12495 PRINT:PRINT "TAKEOFF AND ILS PRACTICE:DEPART FROM PHILADELPHIA"
12496 PRINT:PRINT " LEVEL OFF AT 1900 FEET 120 KTS AND DIAL 113.1 MZ"
12500 PRINT " RADIAL TO MARKER 75 DEG. RUNWAY HEADING 80 DEG."
12510 PRINT:PRINT "MAKE YOUR CHOICE":INPUT CHOICE
12520 VO(1)=VF(CHOICE):LL(1)=VP(CHOICE,0):GL(1)=VP(CHOICE,1) 'LL(1)=RCO(CHOICE,0) GL(1)=RCO(CHOICE,1) FOR AIRPORT LAT LONG
12530 LS(1)=LL(1): GS(1)=GL(1)
12540 DP(4)=FIX(LL(1)):DP(5)=60*(LL(1)-FIX(LL(1)))
12550 DP(6)=FIX(GL(1)):DP(7)=60*(GL(1)-FIX(GL(1)))
12560 CC=VG(CHOICE,1):RUNWAY=CC
12570 PRINT:LINE INPUT;"RESET CLOCK AT 7:59 ? Y/N: ";ANS$:IF ANS$="Y" THEN TIME$="7:59"
12580 GOTO 10022
12590 END