home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / uknet1.zip / UKNET1.AAF < prev    next >
Text File  |  1994-01-14  |  97KB  |  5,083 lines

  1. ;ATC Net Variables
  2. ;--------------------------------------------------------
  3. ;A - Heading to current fix
  4. ;B - Constant = 10
  5. ;C - Constant = 180
  6. ;D - Radial from current fix
  7. ;E - Error between current radial D and reciprical course R
  8. ;F - 0/1/2/3 denote altitude assignment number
  9. ;G - Last assigned altitude
  10. ;H - Last ATC command reference number
  11. ;I - Previous center reference number
  12. ;J - Current center reference number
  13. ;K - Enroute altitude
  14. ;L - Last assigned heading
  15. ;M - Error between current heading assignment A and last heading
  16. ;    assignment L
  17. ;N - Last ATC command parameter (altitude, heading, etc..)
  18. ;O - Error between current altitude and assigned altitude
  19. ;P - Reference number of VOR currently being tracked (enroute phase)
  20. ;    0/1/2 landing clearance flags (approach phase)
  21. ;Q - 0/1 Fix initial tracking flag
  22. ;R - Reciprical course
  23. ;S - Difference between current heading and new heading A
  24. ;T - Departing runway (departure phase), 0/1 TOD (enroute phase)
  25. ;U - Temporary variable.  Constant = 5 during APP phase.
  26. ;V - 0/1 Center initial contact flag
  27. ;W - Non-zero when entering new center control zone
  28. ;X - No. times through "airspeed" check
  29. ;Y - No. times through "altitude" check
  30. ;Z - 0/1 Tuned to correct frequency
  31.  
  32. flightplan:
  33.   setvar(b,10)
  34.   setvar(p,0)
  35.   setvar(q,0)
  36.   setvar(v,0)
  37.   setvar(i,20)
  38.   setvar(j,15)
  39.   setvar(k,10000)
  40.   print "D - Choose destination only   R - Defined flight route"
  41.   if key("r")
  42.     goto pre1
  43.   endif
  44.   if key("d")
  45.     goto dest1
  46.   endif
  47.   goto flightplan
  48.  
  49. GKKtoGGD:
  50.   gosub centercheck
  51.   gosub error
  52.   if vartest(p,0,0)
  53.     gosub MIDVOR
  54.   endif
  55.   if vartest(p,1,1)
  56.     gosub WODNDB
  57.   endif
  58.   if vartest(p,2,2)
  59.     gosub CPTVOR
  60.   endif
  61.   if vartest(p,3,3)
  62.     gosub ALVINFIX
  63.   endif
  64.   gosub GGDbegin
  65.   goto GKKtoGGD
  66.  
  67. pre1:
  68.   print "A - GKK to GGD   B - Next   / - Main Menu"
  69.   if key("a")
  70.     setposition(18513.0022,13718.8826,0)
  71.     setvar(k,7000)
  72.     gosub GKKdeparture
  73.     setvar(t,0)
  74.     goto GKKtoGGD
  75.   endif
  76.   if key("b")
  77.     goto pre2
  78.   endif
  79.   if key("/")
  80.     goto flightplan
  81.   endif
  82.   goto pre1
  83.  
  84. GBBtoGKK:
  85.   gosub centercheck
  86.   gosub error
  87.   if vartest(p,0,0)
  88.     gosub HONVOR
  89.   endif
  90.   if vartest(p,1,1)
  91.     gosub MIDVOR
  92.   endif
  93.   gosub GKKbegin
  94.   goto GBBtoGKK
  95.  
  96. pre2:
  97.   print "A - GBB to GKK   B - Next   / - Main Menu"
  98.   if key("a")
  99.     setposition(19125.4616,13372.0173,0)
  100.     setvar(k,12000)
  101.     gosub GBBdeparture
  102.     setvar(t,0)
  103.     goto GBBtoGKK
  104.   endif
  105.   if key("b")
  106.     goto pre3
  107.   endif
  108.   if key("/")
  109.     goto flightplan
  110.   endif
  111.   goto pre2
  112.  
  113. GKKtoGBB:
  114.   gosub centercheck
  115.   gosub error
  116.   if cylinder(19127,13369,0,55)
  117.     if vartest(t,0,0)
  118.       setvar(t,1)
  119.       setvar(g,8000)
  120.       gosub newaltitude
  121.     endif
  122.   endif
  123.   if vartest(p,0,0)
  124.     gosub MIDVOR
  125.   endif
  126.   if vartest(p,1,1)
  127.     gosub WCONDB
  128.   endif
  129.   if vartest(p,2,2)
  130.     gosub DTYVOR
  131.   endif
  132.   if vartest(p,3,3)
  133.     gosub HONVOR
  134.   endif
  135.   gosub GBBbegin
  136.   goto GKKtoGBB
  137.  
  138. pre3:
  139.   print "A - GKK to GBB   B - Next   / - Main Menu"
  140.   if key("a")
  141.     setposition(18513.0022,13718.8826,0)
  142.     setvar(k,11000)
  143.     gosub GKKdeparture
  144.     setvar(t,0)
  145.     goto GKKtoGBB
  146.   endif
  147.   if key("b")
  148.     goto pre4
  149.   endif
  150.   if key("/")
  151.     goto flightplan
  152.   endif
  153.   goto pre3
  154.  
  155. GBBtoGLL:
  156.   gosub centercheck
  157.   gosub error
  158.   if vartest(p,0,0)
  159.     gosub HONVOR
  160.   endif
  161.   if vartest(p,1,1)
  162.     gosub WCONDB
  163.   endif
  164.   if vartest(p,2,2)
  165.     gosub BNNVOR
  166.   endif
  167.   gosub GLLbegin
  168.   goto GBBtoGLL
  169.  
  170. pre4:
  171.   print "A - GBB to GLL   B - Next   / - Main Menu"
  172.   if key("a")
  173.     setposition(19125.4616,13372.0173,0)
  174.     setvar(k,9000)
  175.     gosub GBBdeparture
  176.     setvar(t,0)
  177.     goto GBBtoGLL
  178.   endif
  179.   if key("b")
  180.     goto pre5
  181.   endif
  182.   if key("/")
  183.     goto flightplan
  184.   endif
  185.   goto pre4
  186.  
  187. GLLtoGBB:
  188.   gosub centercheck
  189.   gosub error
  190.   if cylinder(19127,13369,0,50)
  191.     if vartest(t,0,0)
  192.       setvar(t,1)
  193.       setvar(g,10000)
  194.       gosub newaltitude
  195.     endif
  196.   endif
  197.   if vartest(p,0,0)
  198.     gosub BPKVOR
  199.   endif
  200.   if vartest(p,1,1)
  201.     gosub DTYVOR
  202.   endif
  203.   if vartest(p,2,2)
  204.     gosub HONVOR
  205.   endif
  206.   gosub GBBbegin
  207.   goto GLLtoGBB
  208.  
  209. pre5:
  210.   print "A - GLL to GBB   B - Next   / - Main Menu"
  211.   if key("a")
  212.     setposition(18657.3714,13656.6998,0)
  213.     setvar(k,13000)
  214.     gosub GLLdeparture
  215.     setvar(t,0)
  216.     goto GLLtoGBB
  217.   endif
  218.   if key("b")
  219.     goto pre6
  220.   endif
  221.   if key("/")
  222.     goto flightplan
  223.   endif
  224.   goto pre5
  225.  
  226. GKKtoGJJ:
  227.   gosub centercheck
  228.   gosub error
  229.   if cylinder(17749,13049,0,60)
  230.     if vartest(t,0,0)
  231.       setvar(t,1)
  232.       setvar(g,10000)
  233.       gosub newaltitude
  234.     endif
  235.   endif
  236.   if vartest(p,0,0)
  237.     gosub MIDVOR
  238.   endif
  239.   if vartest(p,1,1)
  240.     gosub SAMVOR
  241.   endif
  242.   if vartest(p,2,2)
  243.     gosub ORTACFIX
  244.   endif
  245.   if vartest(p,3,3)
  246.     gosub JSYVOR
  247.   endif
  248.   gosub GJJbegin
  249.   goto GKKtoGJJ
  250.  
  251. pre6:
  252.   print "A - GKK to GJJ   B - Next   / - Main Menu"
  253.   if key("a")
  254.     setposition(18513.0022,13718.8826,0)
  255.     setvar(k,15000)
  256.     gosub GKKdeparture
  257.     setvar(t,0)
  258.     goto GKKtoGJJ
  259.   endif
  260.   if key("b")
  261.     goto pre7
  262.   endif
  263.   if key("/")
  264.     goto flightplan
  265.   endif
  266.   goto pre6
  267.  
  268. GJJtoGKK:
  269.   gosub centercheck
  270.   gosub error
  271.   if cylinder(18660,13565,0,60)
  272.     if vartest(t,0,0)
  273.       setvar(t,1)
  274.       setvar(g,10000)
  275.       gosub newaltitude
  276.     endif
  277.   endif
  278.   if vartest(p,0,0)
  279.     gosub ANGLAFIX
  280.   endif
  281.   if vartest(p,1,1)
  282.     gosub ORTACFIX
  283.   endif
  284.   if vartest(p,2,2)
  285.     gosub MIDVOR
  286.   endif
  287.   gosub GKKbegin
  288.   goto GJJtoGKK
  289.  
  290. pre7:
  291.   print "A - GJJ to GKK   B - Next   / - Main Menu"
  292.   if key("a")
  293.     setposition(17748.1495,13051.0154,0)
  294.     setvar(k,14000)
  295.     gosub GJJdeparture
  296.     setvar(t,0)
  297.     goto GJJtoGKK
  298.   endif
  299.   if key("b")
  300.     goto pre8
  301.   endif
  302.   if key("/")
  303.     goto flightplan
  304.   endif
  305.   goto pre7
  306.  
  307. GGDtoGKK:
  308.   gosub centercheck
  309.   gosub error
  310.   if vartest(p,0,0)
  311.     gosub CPTVOR
  312.   endif
  313.   if vartest(p,1,1)
  314.     gosub WODNDB
  315.   endif
  316.   if vartest(p,2,2)
  317.     gosub MIDVOR
  318.   endif
  319.   gosub GKKbegin
  320.   goto GGDtoGKK
  321.  
  322. pre8:
  323.   print "A - GGD to GKK   B - Next   / - Main Menu"
  324.   if key("a")
  325.     setposition(18704.9454,13047.5997,0)
  326.     setvar(k,8000)
  327.     gosub GGDdeparture
  328.     setvar(t,0)
  329.     goto GGDtoGKK
  330.   endif
  331.   if key("b")
  332.     goto pre9
  333.   endif
  334.   if key("/")
  335.     goto flightplan
  336.   endif
  337.   goto pre8
  338.  
  339. GLLtoGGD:
  340.   gosub centercheck
  341.   gosub error
  342.   if vartest(p,0,0)
  343.     gosub WODNDB
  344.   endif
  345.   if vartest(p,1,1)
  346.     gosub CPTVOR
  347.   endif
  348.   if vartest(p,2,2)
  349.     gosub BCNVOR
  350.   endif
  351.   gosub GGDbegin
  352.   goto GLLtoGGD
  353.  
  354. pre9:
  355.   print "A - GLL to GGD   B - Next   / - Main Menu"
  356.   if key("a")
  357.     setposition(18657.3714,13656.6998,0)
  358.     setvar(k,9000)
  359.     gosub GLLdeparture
  360.     setvar(t,0)
  361.     goto GLLtoGGD
  362.   endif
  363.   if key("b")
  364.     goto pre10
  365.   endif
  366.   if key("/")
  367.     goto flightplan
  368.   endif
  369.   goto pre9
  370.  
  371. GGDtoGLL:
  372.   gosub centercheck
  373.   gosub error
  374.   if vartest(p,0,0)
  375.     gosub CPTVOR
  376.   endif
  377.   if vartest(p,1,1)
  378.     gosub WODNDB
  379.   endif
  380.   gosub GLLbegin
  381.   goto GGDtoGLL
  382.  
  383. pre10:
  384.   print "A - GGD to GLL   B - Next   / - Main Menu"
  385.   if key("a")
  386.     setposition(18704.9454,13047.5997,0)
  387.     setvar(k,9000)
  388.     gosub GGDdeparture
  389.     setvar(t,0)
  390.     goto GGDtoGLL
  391.   endif
  392.   if key("b")
  393.     goto pre11
  394.   endif
  395.   if key("/")
  396.     goto flightplan
  397.   endif
  398.   goto pre10
  399.  
  400. GGDtoGBB:
  401.   gosub centercheck
  402.   gosub error
  403.   if vartest(p,0,0)
  404.     gosub BCNVOR
  405.   endif
  406.   if vartest(p,1,1)
  407.     gosub CHELTFIX
  408.   endif
  409.   if vartest(p,2,2)
  410.     gosub HONVOR
  411.   endif
  412.   gosub GBBbegin
  413.   goto GGDtoGBB
  414.  
  415. pre11:
  416.   print "A - GGD to GBB   B - Next   / - Main Menu"
  417.   if key("a")
  418.     setposition(18704.9454,13047.5997,0)
  419.     setvar(k,10000)
  420.     gosub GGDdeparture
  421.     setvar(t,0)
  422.     goto GGDtoGBB
  423.   endif
  424.   if key("b")
  425.     goto pre12
  426.   endif
  427.   if key("/")
  428.     goto flightplan
  429.   endif
  430.   goto pre11
  431.  
  432. GBBtoGGD:
  433.   gosub centercheck
  434.   gosub error
  435.   if vartest(p,0,0)
  436.     gosub HONVOR
  437.   endif
  438.   if vartest(p,1,1)
  439.     gosub CPTVOR
  440.   endif
  441.   if vartest(p,2,2)
  442.     gosub BCNVOR
  443.   endif
  444.   gosub GGDbegin
  445.   goto GBBtoGGD
  446.  
  447. pre12:
  448.   print "A - GBB to GGD   B - Next   / - Main Menu"
  449.   if key("a")
  450.     setposition(19125.4616,13372.0173,0)
  451.     setvar(k,9000)
  452.     gosub GBBdeparture
  453.     setvar(t,0)
  454.     goto GBBtoGGD
  455.   endif
  456.   if key("b")
  457.     goto pre13
  458.   endif
  459.   if key("/")
  460.     goto flightplan
  461.   endif
  462.   goto pre12
  463.  
  464. GTEtoGKK:
  465.   gosub centercheck
  466.   gosub error
  467.   if vartest(p,0,0)
  468.     gosub BHDVOR
  469.   endif
  470.   if vartest(p,1,1)
  471.     gosub SAMVOR
  472.     if vartest(f,0,0)
  473.       setvar(f,1)
  474.       setvar(g,6000)
  475.       gosub newaltitude
  476.     endif
  477.   endif
  478.   if vartest(p,2,2)
  479.     gosub MIDVOR
  480.   endif
  481.   gosub GKKbegin
  482.   goto GTEtoGKK
  483.  
  484. pre13:
  485.   print "A - GTE to GKK   B - Next   / - Main Menu"
  486.   if key("a")
  487.     setposition(18454.1804,12811.4203,0)
  488.     setvar(k,9000)
  489.     gosub GTEdeparture
  490.     setvar(t,0)
  491.     goto GTEtoGKK
  492.   endif
  493.   if key("b")
  494.     goto pre14
  495.   endif
  496.   if key("/")
  497.     goto flightplan
  498.   endif
  499.   goto pre13
  500.  
  501. GKKtoGTE:
  502.   gosub centercheck
  503.   gosub error
  504.   if cylinder(18454,12881,0,45)
  505.     if vartest(t,0,0)
  506.       setvar(t,1)
  507.       setvar(g,7000)
  508.       gosub newaltitude
  509.     endif
  510.   endif
  511.   if vartest(p,0,0)
  512.     gosub MIDVOR
  513.   endif
  514.   if vartest(p,1,1)
  515.     gosub SAMVOR
  516.   endif
  517.   if vartest(p,2,2)
  518.     gosub DAWLYFIX
  519.   endif
  520.   gosub GTEbegin
  521.   goto GKKtoGTE
  522.  
  523. pre14:
  524.   print "A - GKK to GTE   B - Next   / - Main Menu"
  525.   if key("a")
  526.     setposition(18513.0022,13718.8826,0)
  527.     setvar(k,10000)
  528.     gosub GKKdeparture
  529.     setvar(t,0)
  530.     goto GKKtoGTE
  531.   endif
  532.   if key("b")
  533.     goto pre15
  534.   endif
  535.   if key("/")
  536.     goto flightplan
  537.   endif
  538.   goto pre14
  539.  
  540. GTEtoGJJ:
  541.   gosub centercheck
  542.   gosub error
  543.   if cylinder(17749,13049,0,55)
  544.     if vartest(t,0,0)
  545.       setvar(t,1)
  546.       setvar(g,10000)
  547.       gosub newaltitude
  548.     endif
  549.   endif
  550.   if vartest(p,0,0)
  551.     gosub BHDVOR
  552.   endif
  553.   if vartest(p,1,1)
  554.     gosub SKERYFIX
  555.   endif
  556.   if vartest(p,2,2)
  557.     gosub GURVOR
  558.   endif
  559.   gosub GJJbegin
  560.   goto GTEtoGJJ
  561.  
  562. pre15:
  563.   print "A - GTE to GJJ   B - Next   / - Main Menu"
  564.   if key("a")
  565.     setposition(18454.1804,12811.4203,0)
  566.     setvar(k,14000)
  567.     gosub GTEdeparture
  568.     setvar(t,0)
  569.     goto GTEtoGJJ
  570.   endif
  571.   if key("b")
  572.     goto pre16
  573.   endif
  574.   if key("/")
  575.     goto flightplan
  576.   endif
  577.   goto pre15
  578.  
  579. GJJtoGTE:
  580.   gosub centercheck
  581.   gosub error
  582.   if cylinder(18455,12812,0,55)
  583.     if vartest(t,0,0)
  584.       setvar(t,1)
  585.       setvar(g,8000)
  586.       gosub newaltitude
  587.     endif
  588.   endif
  589.   if vartest(p,0,0)
  590.     gosub GURVOR
  591.   endif
  592.   if vartest(p,1,1)
  593.     gosub BHDVOR
  594.   endif
  595.   gosub GTEbegin
  596.   goto GJJtoGTE
  597.  
  598. pre16:
  599.   print "A - GJJ to GTE   B - Next   / - Main Menu"
  600.   if key("a")
  601.     setposition(17748.1495,13051.0154,0)
  602.     setvar(k,15000)
  603.     gosub GJJdeparture
  604.     setvar(t,0)
  605.     goto GJJtoGTE
  606.   endif
  607.   if key("b")
  608.     goto pre17
  609.   endif
  610.   if key("/")
  611.     goto flightplan
  612.   endif
  613.   goto pre16
  614.  
  615. GBBtoGJJ:
  616.   gosub centercheck
  617.   gosub error
  618.   if cylinder(17749,13049,0,60)
  619.     if vartest(t,0,0)
  620.       setvar(t,1)
  621.       setvar(g,10000)
  622.       gosub newaltitude
  623.     endif
  624.   endif
  625.   if vartest(p,0,0)
  626.     gosub HONVOR
  627.   endif
  628.   if vartest(p,1,1)
  629.     gosub CPTVOR
  630.   endif
  631.   if vartest(p,2,2)
  632.     gosub PEPISFIX
  633.   endif
  634.   if vartest(p,3,3)
  635.     gosub SAMVOR
  636.   endif
  637.   if vartest(p,4,4)
  638.     gosub ORTACFIX
  639.   endif
  640.   if vartest(p,5,5)
  641.     gosub JSYVOR
  642.   endif
  643.   gosub GJJbegin
  644.   goto GBBtoGJJ
  645.  
  646. pre17:
  647.   print "A - GBB to GJJ   B - Next   / - Main Menu"
  648.   if key("a")
  649.     setposition(19125.4616,13372.0173,0)
  650.     setvar(k,18000)
  651.     gosub GBBdeparture
  652.     setvar(t,0)
  653.     goto GBBtoGJJ
  654.   endif
  655.   if key("b")
  656.     goto pre18
  657.   endif
  658.   if key("/")
  659.     goto flightplan
  660.   endif
  661.   goto pre17
  662.  
  663. GJJtoGBB:
  664.   gosub centercheck
  665.   gosub error
  666.   if cylinder(19127,13369,0,60)
  667.     if vartest(t,0,0)
  668.       setvar(t,1)
  669.       setvar(g,10000)
  670.       gosub newaltitude
  671.     endif
  672.   endif
  673.   if vartest(p,0,0)
  674.     gosub ANGLAFIX
  675.   endif
  676.   if vartest(p,1,1)
  677.     gosub ORTACFIX
  678.   endif
  679.   if vartest(p,2,2)
  680.     gosub SAMVOR
  681.   endif
  682.   if vartest(p,3,3)
  683.     gosub WCONDB
  684.   endif
  685.   if vartest(p,4,4)
  686.     gosub DTYVOR
  687.   endif
  688.   if vartest(p,5,5)
  689.     gosub HONVOR
  690.   endif
  691.   gosub GBBbegin
  692.   goto GJJtoGBB
  693.  
  694. pre18:
  695.   print "A - GJJ to GBB   B - Next   / - Main Menu"
  696.   if key("a")
  697.     setposition(17748.1495,13051.0154,0)
  698.     setvar(k,17000)
  699.     gosub GJJdeparture
  700.     setvar(t,0)
  701.     goto GJJtoGBB
  702.   endif
  703.   if key("b")
  704.     goto pre1
  705.   endif
  706.   if key("/")
  707.     goto flightplan
  708.   endif
  709.   goto pre18
  710.  
  711. BNNVOR:
  712.   if vartest(q,0,0)
  713.     setvar(q,1)
  714. play "HASH.VOC"
  715.     print "FMS switching to waypoint BNN VOR"
  716.     wait(3)
  717.     setvar(f,0)
  718.   endif
  719.   if cylinder(18771,13646,0,6)
  720.     addvar(p,1)
  721.     setvar(q,0)
  722.   endif
  723.   if key("r")
  724.     if radial(18771,13646,0,0)
  725.     endif
  726.     printvar(result,"Radial from BNN VOR is ")
  727.   endif
  728.   return
  729.  
  730. CPTVOR:
  731.   if vartest(q,0,0)
  732.     setvar(q,1)
  733. play "HASH.VOC"
  734.     print "FMS switching to waypoint CPT VOR"
  735.     wait(3)
  736.     setvar(f,0)
  737.   endif
  738.   if cylinder(18693,13453,0,6)
  739.     addvar(p,1)
  740.     setvar(q,0)
  741.   endif
  742.   if key("r")
  743.     if radial(18693,13453,0,0)
  744.     endif
  745.     printvar(result,"Radial from CPT VOR is ")
  746.   endif
  747.   return
  748.  
  749. DTYVOR:
  750.   if vartest(q,0,0)
  751.     setvar(q,1)
  752. play "HASH.VOC"
  753.     print "FMS switching to waypoint DTY VOR"
  754.     wait(3)
  755.     setvar(f,0)
  756.   endif
  757.   if cylinder(18987,13521,0,6)
  758.     addvar(p,1)
  759.     setvar(q,0)
  760.   endif
  761.   if key("r")
  762.     if radial(18987,13521,0,0)
  763.     endif
  764.     printvar(result,"Radial from DTY VOR is ")
  765.   endif
  766.   return
  767.  
  768. HONVOR:
  769.   if vartest(q,0,0)
  770.     setvar(q,1)
  771. play "HASH.VOC"
  772.     print "FMS switching to waypoint HON VOR"
  773.     wait(3)
  774.     setvar(f,0)
  775.   endif
  776.   if cylinder(19082,13385,0,6)
  777.     addvar(p,1)
  778.     setvar(q,0)
  779.   endif
  780.   if key("r")
  781.     if radial(19082,13385,0,0)
  782.     endif
  783.     printvar(result,"Radial from HON VOR is ")
  784.   endif
  785.   return
  786.  
  787. BCNVOR:
  788.   if vartest(q,0,0)
  789.     setvar(q,1)
  790. play "HASH.VOC"
  791.     print "FMS switching to waypoint BCN VOR"
  792.     wait(3)
  793.     setvar(f,0)
  794.   endif
  795.   if cylinder(18874,12921,0,6)
  796.     addvar(p,1)
  797.     setvar(q,0)
  798.   endif
  799.   if key("r")
  800.     if radial(18874,12921,0,0)
  801.     endif
  802.     printvar(result,"Radial from BCN VOR is ")
  803.   endif
  804.   return
  805.  
  806. BPKVOR:
  807.   if vartest(q,0,0)
  808.     setvar(q,1)
  809. play "HASH.VOC"
  810.     print "FMS switching to waypoint BPK VOR"
  811.     wait(3)
  812.     setvar(f,0)
  813.   endif
  814.   if cylinder(18761,13822,0,6)
  815.     addvar(p,1)
  816.     setvar(q,0)
  817.   endif
  818.   if key("r")
  819.     if radial(18761,13822,0,0)
  820.     endif
  821.     printvar(result,"Radial from BPK VOR is ")
  822.   endif
  823.   return
  824.  
  825. MIDVOR:
  826.   if vartest(q,0,0)
  827.     setvar(q,1)
  828. play "HASH.VOC"
  829.     print "FMS switching to waypoint MID VOR"
  830.     wait(3)
  831.     setvar(f,0)
  832.   endif
  833.   if cylinder(18484,13590,0,6)
  834.     addvar(p,1)
  835.     setvar(q,0)
  836.   endif
  837.   if key("r")
  838.     if radial(18484,13590,0,0)
  839.     endif
  840.     printvar(result,"Radial from MID VOR is ")
  841.   endif
  842.   return
  843.  
  844. SAMVOR:
  845.   if vartest(q,0,0)
  846.     setvar(q,1)
  847. play "HASH.VOC"
  848.     print "FMS switching to waypoint SAM VOR"
  849.     wait(3)
  850.     setvar(f,0)
  851.   endif
  852.   if cylinder(18467,13389,0,6)
  853.     addvar(p,1)
  854.     setvar(q,0)
  855.   endif
  856.   if key("r")
  857.     if radial(18467,13389,0,0)
  858.     endif
  859.     printvar(result,"Radial from SAM VOR is ")
  860.   endif
  861.   return
  862.  
  863. JSYVOR:
  864.   if vartest(q,0,0)
  865.     setvar(q,1)
  866. play "HASH.VOC"
  867.     print "FMS switching to waypoint JSY VOR"
  868.     wait(3)
  869.     setvar(f,0)
  870.   endif
  871.   if cylinder(17749,13092,0,6)
  872.     addvar(p,1)
  873.     setvar(q,0)
  874.   endif
  875.   if key("r")
  876.     if radial(17749,13092,0,0)
  877.     endif
  878.     printvar(result,"Radial from JSY VOR is ")
  879.   endif
  880.   return
  881.  
  882. BHDVOR:
  883.   if vartest(q,0,0)
  884.     setvar(q,1)
  885. play "HASH.VOC"
  886.     print "FMS switching to waypoint BHD VOR"
  887.     wait(3)
  888.     setvar(f,0)
  889.   endif
  890.   if cylinder(18315,12767,0,6)
  891.     addvar(p,1)
  892.     setvar(q,0)
  893.   endif
  894.   if key("r")
  895.     if radial(18315,12767,0,0)
  896.     endif
  897.     printvar(result,"Radial from BHD VOR is ")
  898.   endif
  899.   return
  900.  
  901. GURVOR:
  902.   if vartest(q,0,0)
  903.     setvar(q,1)
  904. play "HASH.VOC"
  905.     print "FMS switching to waypoint GUR VOR"
  906.     wait(3)
  907.     setvar(f,0)
  908.   endif
  909.   if cylinder(17864,12949,0,6)
  910.     addvar(p,1)
  911.     setvar(q,0)
  912.   endif
  913.   if key("r")
  914.     if radial(17864,12949,0,0)
  915.     endif
  916.     printvar(result,"Radial from GUR VOR is ")
  917.   endif
  918.   return
  919.  
  920. WODNDB:
  921.   if vartest(q,0,0)
  922.     setvar(q,1)
  923. play "HASH.VOC"
  924.     print "FMS switching to waypoint WOD NDB"
  925.     wait(3)
  926.     setvar(f,0)
  927.   endif
  928.   if cylinder(18665,13543,0,6)
  929.     addvar(p,1)
  930.     setvar(q,0)
  931.   endif
  932.   if key("r")
  933.     if radial(18665,13543,0,0)
  934.     endif
  935.     printvar(result,"Radial from WOD NDB is ")
  936.   endif
  937.   return
  938.  
  939. WCONDB:
  940.   if vartest(q,0,0)
  941.     setvar(q,1)
  942. play "HASH.VOC"
  943.     print "FMS switching to waypoint WCO NDB"
  944.     wait(3)
  945.     setvar(f,0)
  946.   endif
  947.   if cylinder(18840,13543,0,6)
  948.     addvar(p,1)
  949.     setvar(q,0)
  950.   endif
  951.   if key("r")
  952.     if radial(18840,13543,0,0)
  953.     endif
  954.     printvar(result,"Radial from WCO NDB is ")
  955.   endif
  956.   return
  957.  
  958. ORTACFIX:
  959.   if vartest(q,0,0)
  960.     setvar(q,1)
  961. play "HASH.VOC"
  962.     print "FMS switching to waypoint ORTAC"
  963.     wait(3)
  964.     setvar(f,0)
  965.   endif
  966.   if cylinder(18076,13156,0,6)
  967.     addvar(p,1)
  968.     setvar(q,0)
  969.   endif
  970.   if key("r")
  971.     if radial(18076,13156,0,0)
  972.     endif
  973.     printvar(result,"Radial from ORTAC is ")
  974.   endif
  975.   return
  976.  
  977. ANGLAFIX:
  978.   if vartest(q,0,0)
  979.     setvar(q,1)
  980. play "HASH.VOC"
  981.     print "FMS switching to waypoint ANGLA"
  982.     wait(3)
  983.     setvar(f,0)
  984.   endif
  985.   if cylinder(17953,13136,0,6)
  986.     addvar(p,1)
  987.     setvar(q,0)
  988.   endif
  989.   if key("r")
  990.     if radial(17953,13136,0,0)
  991.     endif
  992.     printvar(result,"Radial from ANGLA is ")
  993.   endif
  994.   return
  995.  
  996. ALVINFIX:
  997.   if vartest(q,0,0)
  998.     setvar(q,1)
  999. play "HASH.VOC"
  1000.     print "FMS switching to waypoint ALVIN"
  1001.     wait(3)
  1002.     setvar(f,0)
  1003.   endif
  1004.   if cylinder(18821,13072,0,6)
  1005.     addvar(p,1)
  1006.     setvar(q,0)
  1007.   endif
  1008.   if key("r")
  1009.     if radial(18821,13072,0,0)
  1010.     endif
  1011.     printvar(result,"Radial from ALVIN is ")
  1012.   endif
  1013.   return
  1014.  
  1015. CHELTFIX:
  1016.   if vartest(q,0,0)
  1017.     setvar(q,1)
  1018. play "HASH.VOC"
  1019.     print "FMS switching to waypoint CHELT"
  1020.     wait(3)
  1021.     setvar(f,0)
  1022.   endif
  1023.   if cylinder(18898,13160,0,6)
  1024.     addvar(p,1)
  1025.     setvar(q,0)
  1026.   endif
  1027.   if key("r")
  1028.     if radial(18898,13160,0,0)
  1029.     endif
  1030.     printvar(result,"Radial from CHELT is ")
  1031.   endif
  1032.   return
  1033.  
  1034. PEPISFIX:
  1035.   if vartest(q,0,0)
  1036.     setvar(q,1)
  1037. play "HASH.VOC"
  1038.     print "FMS switching to waypoint PEPIS"
  1039.     wait(3)
  1040.     setvar(f,0)
  1041.   endif
  1042.   if cylinder(18564,13435,0,6)
  1043.     addvar(p,1)
  1044.     setvar(q,0)
  1045.   endif
  1046.   if key("r")
  1047.     if radial(18564,13435,0,0)
  1048.     endif
  1049.     printvar(result,"Radial from PEPIS is ")
  1050.   endif
  1051.   return
  1052.  
  1053. SKERYFIX:
  1054.   if vartest(q,0,0)
  1055.     setvar(q,1)
  1056. play "HASH.VOC"
  1057.     print "FMS switching to waypoint SKERY"
  1058.     wait(3)
  1059.     setvar(f,0)
  1060.   endif
  1061.   if cylinder(18123,12833,0,6)
  1062.     addvar(p,1)
  1063.     setvar(q,0)
  1064.   endif
  1065.   if key("r")
  1066.     if radial(18123,12833,0,0)
  1067.     endif
  1068.     printvar(result,"Radial from SKERY is ")
  1069.   endif
  1070.   return
  1071.  
  1072. DAWLYFIX:
  1073.   if vartest(q,0,0)
  1074.     setvar(q,1)
  1075. play "HASH.VOC"
  1076.     print "FMS switching to waypoint DAWLY"
  1077.     wait(3)
  1078.     setvar(f,0)
  1079.   endif
  1080.   if cylinder(18392,12788,0,6)
  1081.     addvar(p,1)
  1082.     setvar(q,0)
  1083.   endif
  1084.   if key("r")
  1085.     if radial(18392,12788,0,0)
  1086.     endif
  1087.     printvar(result,"Radial from DAWLY is ")
  1088.   endif
  1089.   return
  1090.  
  1091. centercheck:
  1092.   movevar(i,j)
  1093.   if cylinder(18662,13657,0,150)
  1094.     setvar(j,1)
  1095.     w := j - i
  1096.     if vartest(w,0,0)
  1097.       setvar(z,0)
  1098.       if com(134.50)
  1099.         setvar(z,1)
  1100.         if vartest(v,1,1)
  1101. play "HASH.VOC"
  1102.           print "BA 321 LONDON center with you.  Altimeter 29.92"
  1103.           wait(5)
  1104.           setvar(v,0)
  1105.         endif
  1106.       endif
  1107.       return
  1108.     endif
  1109.     if vartest(z,1,1)
  1110. play "HASH.VOC"
  1111.       print "BA 321 contact LONDON center on 134.50"
  1112.       wait(5)
  1113.       setvar(z,0)
  1114.       setvar(v,1)
  1115.     endif
  1116.     return
  1117.   endif
  1118.   if cylinder(17529,12332,0,150)
  1119.     setvar(j,2)
  1120.     w := j - i
  1121.     if vartest(w,0,0)
  1122.       setvar(z,0)
  1123.       if com(132.90)
  1124.         setvar(z,1)
  1125.         if vartest(v,1,1)
  1126. play "HASH.VOC"
  1127.           print "BA 321 BREST center with you.  Altimeter 29.92"
  1128.           wait(5)
  1129.           setvar(v,0)
  1130.         endif
  1131.       endif
  1132.       return
  1133.     endif
  1134.     if vartest(z,1,1)
  1135. play "HASH.VOC"
  1136.       print "BA 321 contact BREST center on 132.90"
  1137.       wait(5)
  1138.       setvar(z,0)
  1139.       setvar(v,1)
  1140.     endif
  1141.     return
  1142.   endif
  1143.   if cylinder(18464,13366,0,32767)
  1144.     setvar(j,3)
  1145.     w := j - i
  1146.     if vartest(w,0,0)
  1147.       setvar(z,0)
  1148.       if com(122.10)
  1149.         setvar(z,1)
  1150.         if vartest(v,1,1)
  1151. play "HASH.VOC"
  1152.           print "BA 321 GENERIC center with you.  Altimeter 29.92"
  1153.           wait(5)
  1154.           setvar(v,0)
  1155.         endif
  1156.       endif
  1157.       return
  1158.     endif
  1159.     if vartest(z,1,1)
  1160. play "HASH.VOC"
  1161.       print "BA 321 contact GENERIC center on 122.10"
  1162.       wait(5)
  1163.       setvar(z,0)
  1164.       setvar(v,1)
  1165.     endif
  1166.     return
  1167.   endif
  1168.   return
  1169.  
  1170. appinit:
  1171.   setvar(f,0)
  1172.   setvar(l,400)
  1173.   setvar(x,20)
  1174.   setvar(h,0)
  1175.   setvar(y,15)
  1176.   setvar(n,0)
  1177.   setvar(u,5)
  1178.   setvar (c,180)
  1179.   setvar(p,0)
  1180.   return
  1181.  
  1182. dest1:
  1183.   print "A - Exeter (GTE)   B - Next   / - Main menu"
  1184.   if key("a")
  1185.     if altagl(0,100)
  1186.       print "Begin your flight to Exeter"
  1187.       wait(2)
  1188.       gosub departcheck
  1189.       wait(10)
  1190.     endif
  1191. play "HASH.VOC"
  1192.     print "BA 321 resume own navigation"
  1193.     wait(10)
  1194.     goto GTEgeneric
  1195.   endif
  1196.   if key("b")
  1197.     goto dest2
  1198.   endif
  1199.   if key("/")
  1200.     goto flightplan
  1201.   endif
  1202.   goto dest1
  1203.  
  1204. GTEgeneric:
  1205.   gosub centercheck
  1206.   gosub GTEbegin
  1207.   goto GTEgeneric
  1208.  
  1209. GTEbegin:
  1210.   if cylinder(18455,12812,0,40)
  1211.     gosub appinit
  1212. play "HASH.VOC"
  1213.     print "BA 321 contact Exeter approach on 128.15"
  1214.     goto GTEradio
  1215.   endif
  1216.   return
  1217.  
  1218. GTEradio:
  1219.   if altagl(1500,32767)
  1220.     if com(128.15)
  1221.       wait(3)
  1222. play "HASH.VOC"
  1223.       print "BA 321 radar contact"
  1224.       goto GTEapproach
  1225.     endif
  1226.   endif
  1227.   goto GTEradio
  1228.  
  1229. GTEapproach:
  1230.   if cylinder(18455,12812,0,35)
  1231.     if vartest(w0dir,2912,19296)
  1232.       goto GTE8runway
  1233.     endif
  1234.     if vartest(w0dir,19296,32767)
  1235.       goto GTE13runway
  1236.     endif
  1237.     if vartest(w0dir,-32767,-29854)
  1238.       goto GTE13runway
  1239.     endif
  1240.     if vartest(w0dir,-29854,-13470)
  1241.       goto GTE26runway
  1242.     endif
  1243.     if vartest(w0dir,-13470,2912)
  1244.       goto GTE31runway
  1245.     endif
  1246.   endif
  1247.   gosub error
  1248.   goto GTEapproach
  1249.  
  1250. GTErunway:
  1251. play "HASH.VOC"
  1252.     if vartest(w0dir,2912,19296)
  1253.       setvar(t,8)
  1254.       print "Local winds are favoring runway 8"
  1255.     endif
  1256.     if vartest(w0dir,19296,32767)
  1257.       setvar(t,13)
  1258.       print "Local winds are favoring runway 13"
  1259.     endif
  1260.     if vartest(w0dir,-32767,-29854)
  1261.       setvar(t,13)
  1262.       print "Local winds are favoring runway 13"
  1263.     endif
  1264.     if vartest(w0dir,-29854,-13470)
  1265.       setvar(t,26)
  1266.       print "Local winds are favoring runway 26"
  1267.     endif
  1268.     if vartest(w0dir,-13470,2912)
  1269.       setvar(t,31)
  1270.       print "Local winds are favoring runway 31"
  1271.     endif
  1272.   return
  1273.  
  1274. GTE8runway:
  1275.   if com(128.15)
  1276. play "HASH.VOC"
  1277.     print "BA 321 expect vectors for runway 8"
  1278.     setvar(h,7)
  1279.     setvar(n,8)
  1280.     wait(15)
  1281.   endif
  1282.   if radial(18455,12812,259,304)
  1283.     goto GTE1fix
  1284.   endif
  1285.   if radial(18455,12812,304,349)
  1286.     goto GTE2fix
  1287.   endif
  1288.   if radial(18455,12812,349,360)
  1289.     goto GTE3fix
  1290.   endif
  1291.   if radial(18455,12812,0,79)
  1292.     goto GTE3fix
  1293.   endif
  1294.   if radial(18455,12812,79,169)
  1295.     goto GTE4fix
  1296.   endif
  1297.   if radial(18455,12812,169,214)
  1298.     goto GTE5fix
  1299.   endif
  1300.   if radial(18455,12812,214,259)
  1301.     goto GTE6fix
  1302.   endif
  1303.  
  1304. GTE1fix:
  1305.   if cylinder(18465,12725,0,3)
  1306. play "HASH.VOC"
  1307.     print "Cleared for NDB approach."
  1308.     wait(5)
  1309.     print "Contact Exeter tower on 119.80"
  1310.     goto GTE8final
  1311.   endif
  1312.   gosub error
  1313.   gosub GTEaltitude
  1314.   if radial(18465,12725,0,0)
  1315.   endif
  1316.   movevar(d,result)
  1317.   e := d - r
  1318.   if vartest(e,-15,15)
  1319.     goto GTE1fix
  1320.   endif
  1321.   gosub heading
  1322.   gosub GTEcommand
  1323.   goto GTE1fix
  1324.  
  1325. GTE2fix:
  1326.   if cylinder(18529,12702,0,3)
  1327.     goto GTE1fix
  1328.   endif
  1329.   gosub error
  1330.   gosub GTEaltitude
  1331.   if radial(18529,12702,0,0)
  1332.   endif
  1333.   movevar(d,result)
  1334.   e := d - r
  1335.   if vartest(e,-15,15)
  1336.     goto GTE2fix
  1337.   endif
  1338.   gosub heading
  1339.   gosub GTEcommand
  1340.   goto GTE2fix
  1341.  
  1342. GTE3fix:
  1343.   if cylinder(18622,12775,0,5)
  1344.     goto GTE2fix
  1345.   endif
  1346.   gosub error
  1347.   gosub GTEaltitude
  1348.   if radial(18622,12775,0,0)
  1349.   endif
  1350.   movevar(d,result)
  1351.   e := d - r
  1352.   if vartest(e,-15,15)
  1353.     goto GTE3fix
  1354.   endif
  1355.   gosub heading
  1356.   gosub GTEcommand
  1357.   goto GTE3fix
  1358.  
  1359. GTE4fix:
  1360.   if cylinder(18285,12840,0,5)
  1361.     goto GTE5fix
  1362.   endif
  1363.   gosub error
  1364.   gosub GTEaltitude
  1365.   if radial(18285,12840,0,0)
  1366.   endif
  1367.   movevar(d,result)
  1368.   e := d - r
  1369.   if vartest(e,-15,15)
  1370.     goto GTE4fix
  1371.   endif
  1372.   gosub heading
  1373.   gosub GTEcommand
  1374.   goto GTE4fix
  1375.  
  1376. GTE5fix:
  1377.   if cylinder(18344,12738,0,3)
  1378.     goto GTE6fix
  1379.   endif
  1380.   gosub error
  1381.   gosub GTEaltitude
  1382.   if radial(18344,12738,0,0)
  1383.   endif
  1384.   movevar(d,result)
  1385.   e := d - r
  1386.   if vartest(e,-15,15)
  1387.     goto GTE5fix
  1388.   endif
  1389.   gosub heading
  1390.   gosub GTEcommand
  1391.   goto GTE5fix
  1392.  
  1393. GTE6fix:
  1394.   if cylinder(18412,12735,0,3)
  1395. play "HASH.VOC"
  1396.     print "Cleared for NDB approach."
  1397.     wait(5)
  1398.     print "Contact Exeter tower on 119.80"
  1399.     goto GTE8final
  1400.   endif
  1401.   gosub error
  1402.   gosub GTEaltitude
  1403.   if radial(18412,12735,0,0)
  1404.   endif
  1405.   movevar(d,result)
  1406.   e := d - r
  1407.   if vartest(e,-15,15)
  1408.     goto GTE6fix
  1409.   endif
  1410.   gosub heading
  1411.   gosub GTEcommand
  1412.   goto GTE6fix
  1413.  
  1414. GTE8final:
  1415.   if com(119.80)
  1416.     if vartest(p,0,0)
  1417. play "HASH.VOC"
  1418.       print "Exeter tower with you."
  1419.       wait(5)
  1420.       setvar(p,1)
  1421.     endif
  1422.     if radial(18455,12812,252,272)
  1423. play "HASH.VOC"
  1424.       print "BA 321 cleared to land runway 8"
  1425.       goto GTEland
  1426.     endif
  1427.   endif
  1428.   goto GTE8final
  1429.  
  1430. GTE13runway:
  1431.   if com(128.15)
  1432. play "HASH.VOC"
  1433.     print "BA 321 expect vectors for runway 13"
  1434.     setvar(h,7)
  1435.     setvar(n,13)
  1436.     wait(15)
  1437.   endif
  1438.   if radial(18455,12812,308,353)
  1439.     goto GTE7fix
  1440.   endif
  1441.   if radial(18455,12812,353,360)
  1442.     goto GTE8fix
  1443.   endif
  1444.   if radial(18455,12812,0,38)
  1445.     goto GTE8fix
  1446.   endif
  1447.   if radial(18455,12812,38,128)
  1448.     goto GTE9fix
  1449.   endif
  1450.   if radial(18455,12812,128,218)
  1451.     goto GTE10fix
  1452.   endif
  1453.   if radial(18455,12812,218,263)
  1454.     goto GTE11fix
  1455.   endif
  1456.   if radial(18455,12812,263,308)
  1457.     goto GTE12fix
  1458.   endif
  1459.  
  1460. GTE7fix:
  1461.   if cylinder(18527,12762,0,3)
  1462. play "HASH.VOC"
  1463.     print "Cleared for NDB approach."
  1464.     wait(5)
  1465.     print "Contact Exeter tower on 119.80"
  1466.     goto GTE13final
  1467.   endif
  1468.   gosub error
  1469.   gosub GTEaltitude
  1470.   if radial(18527,12762,0,0)
  1471.   endif
  1472.   movevar(d,result)
  1473.   e := d - r
  1474.   if vartest(e,-15,15)
  1475.     goto GTE7fix
  1476.   endif
  1477.   gosub heading
  1478.   gosub GTEcommand
  1479.   goto GTE7fix
  1480.  
  1481. GTE8fix:
  1482.   if cylinder(18586,12796,0,3)
  1483.     goto GTE7fix
  1484.   endif
  1485.   gosub error
  1486.   gosub GTEaltitude
  1487.   if radial(18586,12796,0,0)
  1488.   endif
  1489.   movevar(d,result)
  1490.   e := d - r
  1491.   if vartest(e,-15,15)
  1492.     goto GTE8fix
  1493.   endif
  1494.   gosub heading
  1495.   gosub GTEcommand
  1496.   goto GTE8fix
  1497.  
  1498. GTE9fix:
  1499.   if cylinder(18592,12914,0,5)
  1500.     goto GTE8fix
  1501.   endif
  1502.   gosub error
  1503.   gosub GTEaltitude
  1504.   if radial(18592,12914,0,0)
  1505.   endif
  1506.   movevar(d,result)
  1507.   e := d - r
  1508.   if vartest(e,-15,15)
  1509.     goto GTE9fix
  1510.   endif
  1511.   gosub heading
  1512.   gosub GTEcommand
  1513.   goto GTE9fix
  1514.  
  1515. GTE10fix:
  1516.   if cylinder(18322,12702,0,5)
  1517.     goto GTE11fix
  1518.   endif
  1519.   gosub error
  1520.   gosub GTEaltitude
  1521.   if radial(18322,12702,0,0)
  1522.   endif
  1523.   movevar(d,result)
  1524.   e := d - r
  1525.   if vartest(e,-15,15)
  1526.     goto GTE10fix
  1527.   endif
  1528.   gosub heading
  1529.   gosub GTEcommand
  1530.   goto GTE10fix
  1531.  
  1532. GTE11fix:
  1533.   if cylinder(18438,12680,0,3)
  1534.     goto GTE12fix
  1535.   endif
  1536.   gosub error
  1537.   gosub GTEaltitude
  1538.   if radial(18438,12680,0,0)
  1539.   endif
  1540.   movevar(d,result)
  1541.   e := d - r
  1542.   if vartest(e,-15,15)
  1543.     goto GTE11fix
  1544.   endif
  1545.   gosub heading
  1546.   gosub GTEcommand
  1547.   goto GTE11fix
  1548.  
  1549. GTE12fix:
  1550.   if cylinder(18485,12729,0,3)
  1551. play "HASH.VOC"
  1552.     print "Cleared for NDB approach."
  1553.     wait(5)
  1554.     print "Contact Exeter tower on 119.80"
  1555.     goto GTE13final
  1556.   endif
  1557.   gosub error
  1558.   gosub GTEaltitude
  1559.   if radial(18485,12729,0,0)
  1560.   endif
  1561.   movevar(d,result)
  1562.   e := d - r
  1563.   if vartest(e,-15,15)
  1564.     goto GTE12fix
  1565.   endif
  1566.   gosub heading
  1567.   gosub GTEcommand
  1568.   goto GTE12fix
  1569.  
  1570. GTE13final:
  1571.   if com(119.80)
  1572.     if vartest(p,0,0)
  1573. play "HASH.VOC"
  1574.       print "Exeter tower with you."
  1575.       wait(5)
  1576.       setvar(p,1)
  1577.     endif
  1578.     if radial(18455,12812,301,321)
  1579. play "HASH.VOC"
  1580.       print "BA 321 cleared to land runway 13"
  1581.       goto GTEland
  1582.     endif
  1583.   endif
  1584.   goto GTE13final
  1585.  
  1586. GTE26runway:
  1587.   if com(128.15)
  1588. play "HASH.VOC"
  1589.     print "BA 321 expect vectors for runway 26"
  1590.     setvar(h,7)
  1591.     setvar(n,26)
  1592.     wait(15)
  1593.   endif
  1594.   if radial(18455,12812,79,124)
  1595.     goto GTE13fix
  1596.   endif
  1597.   if radial(18455,12812,124,169)
  1598.     goto GTE14fix
  1599.   endif
  1600.   if radial(18455,12812,169,259)
  1601.     goto GTE15fix
  1602.   endif
  1603.   if radial(18455,12812,259,349)
  1604.     goto GTE16fix
  1605.   endif
  1606.   if radial(18455,12812,349,360)
  1607.     goto GTE17fix
  1608.   endif
  1609.   if radial(18455,12812,0,34)
  1610.     goto GTE17fix
  1611.   endif
  1612.   if radial(18455,12812,34,79)
  1613.     goto GTE18fix
  1614.   endif
  1615.  
  1616. GTE13fix:
  1617.   if cylinder(18444,12898,0,3)
  1618. play "HASH.VOC"
  1619.     print "BA 321 turn to heading 300 and intercept localizer."
  1620.     wait(5)
  1621.     print "Contact Exeter tower on 119.80"
  1622.     goto GTE26final
  1623.   endif
  1624.   gosub error
  1625.   gosub GTEaltitude
  1626.   if radial(18444,12898,0,0)
  1627.   endif
  1628.   movevar(d,result)
  1629.   e := d - r
  1630.   if vartest(e,-15,15)
  1631.     goto GTE13fix
  1632.   endif
  1633.   gosub heading
  1634.   gosub GTEcommand
  1635.   goto GTE13fix
  1636.  
  1637. GTE14fix:
  1638.   if cylinder(18380,12921,0,3)
  1639.     goto GTE13fix
  1640.   endif
  1641.   gosub error
  1642.   gosub GTEaltitude
  1643.   if radial(18380,12921,0,0)
  1644.   endif
  1645.   movevar(d,result)
  1646.   e := d - r
  1647.   if vartest(e,-15,15)
  1648.     goto GTE14fix
  1649.   endif
  1650.   gosub heading
  1651.   gosub GTEcommand
  1652.   goto GTE14fix
  1653.  
  1654. GTE15fix:
  1655.   if cylinder(18287,12848,0,5)
  1656.     goto GTE14fix
  1657.   endif
  1658.   gosub error
  1659.   gosub GTEaltitude
  1660.   if radial(18287,12848,0,0)
  1661.   endif
  1662.   movevar(d,result)
  1663.   e := d - r
  1664.   if vartest(e,-15,15)
  1665.     goto GTE15fix
  1666.   endif
  1667.   gosub heading
  1668.   gosub GTEcommand
  1669.   goto GTE15fix
  1670.  
  1671. GTE16fix:
  1672.   if cylinder(18624,12783,0,5)
  1673.     goto GTE17fix
  1674.   endif
  1675.   gosub error
  1676.   gosub GTEaltitude
  1677.   if radial(18624,12783,0,0)
  1678.   endif
  1679.   movevar(d,result)
  1680.   e := d - r
  1681.   if vartest(e,-15,15)
  1682.     goto GTE16fix
  1683.   endif
  1684.   gosub heading
  1685.   gosub GTEcommand
  1686.   goto GTE16fix
  1687.  
  1688. GTE17fix:
  1689.   if cylinder(18565,12885,0,3)
  1690.     goto GTE18fix
  1691.   endif
  1692.   gosub error
  1693.   gosub GTEaltitude
  1694.   if radial(18565,12885,0,0)
  1695.   endif
  1696.   movevar(d,result)
  1697.   e := d - r
  1698.   if vartest(e,-15,15)
  1699.     goto GTE17fix
  1700.   endif
  1701.   gosub heading
  1702.   gosub GTEcommand
  1703.   goto GTE17fix
  1704.  
  1705. GTE18fix:
  1706.   if cylinder(18497,12888,0,3)
  1707. play "HASH.VOC"
  1708.     print "BA 321 turn to heading 210 and intercept localizer."
  1709.     wait(5)
  1710.     print "Contact Exeter tower on 119.80"
  1711.     goto GTE26final
  1712.   endif
  1713.   gosub error
  1714.   gosub GTEaltitude
  1715.   if radial(18497,12888,0,0)
  1716.   endif
  1717.   movevar(d,result)
  1718.   e := d - r
  1719.   if vartest(e,-15,15)
  1720.     goto GTE18fix
  1721.   endif
  1722.   gosub heading
  1723.   gosub GTEcommand
  1724.   goto GTE18fix
  1725.  
  1726. GTE26final:
  1727.   if com(119.80)
  1728.     if vartest(p,0,0)
  1729. play "HASH.VOC"
  1730.       print "Exeter tower with you."
  1731.       wait(5)
  1732.       setvar(p,1)
  1733.     endif
  1734.     if radial(18455,12812,72,92)
  1735. play "HASH.VOC"
  1736.       print "BA 321 cleared to land runway 26"
  1737.       goto GTEland
  1738.     endif
  1739.   endif
  1740.   goto GTE26final
  1741.  
  1742. GTE31runway:
  1743.   if com(128.15)
  1744. play "HASH.VOC"
  1745.     print "BA 321 expect vectors for runway 31"
  1746.     setvar(h,7)
  1747.     setvar(n,31)
  1748.     wait(15)
  1749.   endif
  1750.   if radial(18455,12812,128,173)
  1751.     goto GTE19fix
  1752.   endif
  1753.   if radial(18455,12812,173,218)
  1754.     goto GTE20fix
  1755.   endif
  1756.   if radial(18455,12812,218,308)
  1757.     goto GTE21fix
  1758.   endif
  1759.   if radial(18455,12812,308,360)
  1760.     goto GTE22fix
  1761.   endif
  1762.   if radial(18455,12812,0,38)
  1763.     goto GTE22fix
  1764.   endif
  1765.   if radial(18455,12812,38,83)
  1766.     goto GTE23fix
  1767.   endif
  1768.   if radial(18455,12812,83,128)
  1769.     goto GTE24fix
  1770.   endif
  1771.  
  1772. GTE19fix:
  1773.   if cylinder(18382,12861,0,3)
  1774. play "HASH.VOC"
  1775.     print "Cleared for NDB approach."
  1776.     wait(5)
  1777.     print "Contact Exeter tower on 119.80"
  1778.     goto GTE31final
  1779.   endif
  1780.   gosub error
  1781.   gosub GTEaltitude
  1782.   if radial(18382,12861,0,0)
  1783.   endif
  1784.   movevar(d,result)
  1785.   e := d - r
  1786.   if vartest(e,-15,15)
  1787.     goto GTE19fix
  1788.   endif
  1789.   gosub heading
  1790.   gosub GTEcommand
  1791.   goto GTE19fix
  1792.  
  1793. GTE20fix:
  1794.   if cylinder(18323,12827,0,3)
  1795.     goto GTE19fix
  1796.   endif
  1797.   gosub error
  1798.   gosub GTEaltitude
  1799.   if radial(18323,12827,0,0)
  1800.   endif
  1801.   movevar(d,result)
  1802.   e := d - r
  1803.   if vartest(e,-15,15)
  1804.     goto GTE20fix
  1805.   endif
  1806.   gosub heading
  1807.   gosub GTEcommand
  1808.   goto GTE20fix
  1809.  
  1810. GTE21fix:
  1811.   if cylinder(18317,12709,0,5)
  1812.     goto GTE20fix
  1813.   endif
  1814.   gosub error
  1815.   gosub GTEaltitude
  1816.   if radial(18317,12709,0,0)
  1817.   endif
  1818.   movevar(d,result)
  1819.   e := d - r
  1820.   if vartest(e,-15,15)
  1821.     goto GTE21fix
  1822.   endif
  1823.   gosub heading
  1824.   gosub GTEcommand
  1825.   goto GTE21fix
  1826.  
  1827. GTE22fix:
  1828.   if cylinder(18587,12921,0,5)
  1829.     goto GTE23fix
  1830.   endif
  1831.   gosub error
  1832.   gosub GTEaltitude
  1833.   if radial(18587,12921,0,0)
  1834.   endif
  1835.   movevar(d,result)
  1836.   e := d - r
  1837.   if vartest(e,-15,15)
  1838.     goto GTE22fix
  1839.   endif
  1840.   gosub heading
  1841.   gosub GTEcommand
  1842.   goto GTE22fix
  1843.  
  1844. GTE23fix:
  1845.   if cylinder(18471,12943,0,3)
  1846.     goto GTE24fix
  1847.   endif
  1848.   gosub error
  1849.   gosub GTEaltitude
  1850.   if radial(18471,12943,0,0)
  1851.   endif
  1852.   movevar(d,result)
  1853.   e := d - r
  1854.   if vartest(e,-15,15)
  1855.     goto GTE23fix
  1856.   endif
  1857.   gosub heading
  1858.   gosub GTEcommand
  1859.   goto GTE23fix
  1860.  
  1861. GTE24fix:
  1862.   if cylinder(18424,12894,0,3)
  1863. play "HASH.VOC"
  1864.     print "Cleared for NDB approach."
  1865.     wait(5)
  1866.     print "Contact Exeter tower on 119.80"
  1867.     goto GTE31final
  1868.   endif
  1869.   gosub error
  1870.   gosub GTEaltitude
  1871.   if radial(18424,12894,0,0)
  1872.   endif
  1873.   movevar(d,result)
  1874.   e := d - r
  1875.   if vartest(e,-15,15)
  1876.     goto GTE24fix
  1877.   endif
  1878.   gosub heading
  1879.   gosub GTEcommand
  1880.   goto GTE24fix
  1881.  
  1882. GTE31final:
  1883.   if com(119.80)
  1884.     if vartest(p,0,0)
  1885. play "HASH.VOC"
  1886.       print "Exeter tower with you."
  1887.       wait(5)
  1888.       setvar(p,1)
  1889.     endif
  1890.     if radial(18455,12812,121,141)
  1891. play "HASH.VOC"
  1892.       print "BA 321 cleared to land runway 31"
  1893.       goto GTEland
  1894.     endif
  1895.   endif
  1896.   goto GTE31final
  1897.  
  1898. GTEland:
  1899.   if varmask(ground,1)
  1900.     print "(c) 1993 - John Mechalas"
  1901.     wait(3)
  1902.     goto stop
  1903.   endif
  1904.   goto GTEland
  1905.  
  1906. GTEaltitude:
  1907.   if cylinder(18455,12812,23,30)
  1908.     if vartest(f,0,0)
  1909.     setvar(g,3500)
  1910.       if com(128.15)
  1911. play "HASH.VOC"
  1912.         if altitude(3600,32767)
  1913.           print "BA 321 descend and maintain 3500"
  1914.           setvar(h,4)
  1915.           setvar(n,3500)
  1916.           wait(5)
  1917.         endif
  1918.         if altitude(0,3400)
  1919.           print "BA 321 climb and maintain 3500"
  1920.           setvar(h,3)
  1921.           setvar(n,3500)
  1922.           wait(5)
  1923.         endif
  1924.       endif
  1925.       setvar(f,1)
  1926.     endif
  1927.   endif
  1928.   if cylinder(18455,12812,0,22)
  1929.     if vartest(f,0,1)
  1930.     setvar(g,2100)
  1931.       if com(128.15)
  1932. play "HASH.VOC"
  1933.         if altitude(2200,32767)
  1934.           print "BA 321 descend and maintain 2100"
  1935.           setvar(h,4)
  1936.           setvar(n,2100)
  1937.           wait(5)
  1938.         endif
  1939.         if altitude(0,2000)
  1940.           print "BA 321 climb and maintain 2100"
  1941.           setvar(h,3)
  1942.           setvar(n,2100)
  1943.           wait(5)
  1944.         endif
  1945.       endif
  1946.       setvar(f,2)
  1947.     endif
  1948.   endif
  1949.   return
  1950.  
  1951. GTEcommand:
  1952.   s := a - result
  1953.   if vartest(s,-360,0)
  1954.     addvar(s,360)
  1955.   endif
  1956.   m := l - a
  1957.   if vartest(m,0,0)
  1958.     return
  1959.   endif
  1960.   if com(128.15)
  1961.     movevar(n,a)
  1962. play "HASH.VOC"
  1963.     if vartest(s,0,180)
  1964.       printvar(a,"BA 321 turn right heading ")
  1965.       setvar(h,2)
  1966.     endif
  1967.     if vartest(s,180,360)
  1968.       printvar(a,"BA 321 turn left heading ")
  1969.       setvar(h,1)
  1970.     endif
  1971.   endif
  1972.   movevar(l,a)
  1973.   wait(10)
  1974.   return
  1975.  
  1976. GTEdeparture:
  1977.   if altitude(0,0)
  1978.   endif
  1979.   u := result / b / b * b * b
  1980.   addvar(u,4000)
  1981.   print "Taxi to departing runway and contact tower on 119.80 to begin flight."
  1982.  
  1983. GTEground:
  1984.   if com(119.80)
  1985.     gosub GTErunway
  1986.     wait(5)
  1987.     goto GTEhold
  1988.   endif
  1989.   goto GTEground
  1990.  
  1991. GTEhold:
  1992.   if groundspeed(0,0)
  1993.     if com(119.80)
  1994. play "HASH.VOC"
  1995.       printvar(t,"BA 321 cleared for takeoff on runway ")
  1996.       wait(5)
  1997.       goto GTEtakeoff
  1998.     endif
  1999.   endif
  2000.   goto GTEhold
  2001.  
  2002. GTEtakeoff:
  2003.   if altagl(500,32767)
  2004.     if com(119.80)
  2005. play "HASH.VOC"
  2006.       print "Contact Exeter departure on 128.15"
  2007.       setvar(f,0)
  2008.       wait(3)
  2009.       goto GTEclimbout
  2010.     endif
  2011.   endif
  2012.   goto GTEtakeoff
  2013.  
  2014. GTEclimbout:
  2015.   setvar(z,0)
  2016.   if com(128.15)
  2017.     setvar(z,1)
  2018.     if vartest(f,0,0)
  2019.       wait(3)
  2020. play "HASH.VOC"
  2021.       print "BA 321 radar contact"
  2022.       wait(5)
  2023.       addvar(f,1)
  2024.     endif
  2025.   endif
  2026.   if cylinder(18455,12812,0,0)
  2027.   endif
  2028.   movevar(r,result)
  2029.   gosub vectoring
  2030.   if vartest(f,3,3)
  2031.     setvar(x,0)
  2032.     setvar(y,0)
  2033.     return
  2034.   endif
  2035.   goto GTEclimbout
  2036.  
  2037. dest2:
  2038.   print "A - Jersey (GJJ)   B - Next   / - Main menu"
  2039.   if key("a")
  2040.     if altagl(0,100)
  2041.       print "Begin your flight to Jersey"
  2042.       wait(2)
  2043.       gosub departcheck
  2044.       wait(10)
  2045.     endif
  2046. play "HASH.VOC"
  2047.     print "BA 321 resume own navigation"
  2048.     wait(10)
  2049.     goto GJJgeneric
  2050.   endif
  2051.   if key("b")
  2052.     goto dest3
  2053.   endif
  2054.   if key("/")
  2055.     goto flightplan
  2056.   endif
  2057.   goto dest2
  2058.  
  2059. GJJgeneric:
  2060.   gosub centercheck
  2061.   gosub GJJbegin
  2062.   goto GJJgeneric
  2063.  
  2064. GJJbegin:
  2065.   if cylinder(17749,13049,0,40)
  2066.     gosub appinit
  2067. play "HASH.VOC"
  2068.     print "BA 321 contact Jersey approach on 120.30"
  2069.     goto GJJradio
  2070.   endif
  2071.   return
  2072.  
  2073. GJJradio:
  2074.   if altagl(1500,32767)
  2075.     if com(120.30)
  2076.       wait(3)
  2077. play "HASH.VOC"
  2078.       print "BA 321 radar contact"
  2079.       goto GJJapproach
  2080.     endif
  2081.   endif
  2082.   goto GJJradio
  2083.  
  2084. GJJapproach:
  2085.   if cylinder(17749,13049,0,35)
  2086.     if vartest(w0dir,-546,32221)
  2087.       goto GJJ9runway
  2088.     endif
  2089.     if vartest(w0dir,32221,32767)
  2090.       goto GJJ27runway
  2091.     endif
  2092.     if vartest(w0dir,-32767,-546)
  2093.       goto GJJ27runway
  2094.     endif
  2095.   endif
  2096.   gosub error
  2097.   goto GJJapproach
  2098.  
  2099. GJJrunway:
  2100. play "HASH.VOC"
  2101.     if vartest(w0dir,-546,32221)
  2102.       setvar(t,9)
  2103.       print "BA 321 taxi to runway 9 and hold short"
  2104.     endif
  2105.     if vartest(w0dir,32221,32767)
  2106.       setvar(t,27)
  2107.       print "BA 321 taxi to runway 27 and hold short"
  2108.     endif
  2109.     if vartest(w0dir,-32767,-546)
  2110.       setvar(t,27)
  2111.       print "BA 321 taxi to runway 27 and hold short"
  2112.     endif
  2113.   return
  2114.  
  2115. GJJ9runway:
  2116.   if com(120.30)
  2117. play "HASH.VOC"
  2118.     print "BA 321 expect vectors for runway 9"
  2119.     setvar(h,7)
  2120.     setvar(n,9)
  2121.     wait(15)
  2122.   endif
  2123.   if radial(17749,13049,264,309)
  2124.     goto GJJ1fix
  2125.   endif
  2126.   if radial(17749,13049,309,354)
  2127.     goto GJJ2fix
  2128.   endif
  2129.   if radial(17749,13049,354,360)
  2130.     goto GJJ3fix
  2131.   endif
  2132.   if radial(17749,13049,0,84)
  2133.     goto GJJ3fix
  2134.   endif
  2135.   if radial(17749,13049,84,174)
  2136.     goto GJJ4fix
  2137.   endif
  2138.   if radial(17749,13049,174,219)
  2139.     goto GJJ5fix
  2140.   endif
  2141.   if radial(17749,13049,219,264)
  2142.     goto GJJ6fix
  2143.   endif
  2144.  
  2145. GJJ1fix:
  2146.   if cylinder(17766,12963,0,3)
  2147. play "HASH.VOC"
  2148.     print "BA 321 turn to heading 130 and intercept localizer."
  2149.     wait(5)
  2150.     print "Contact Jersey tower on 119.45"
  2151.     goto GJJ9final
  2152.   endif
  2153.   gosub error
  2154.   gosub GJJaltitude
  2155.   if radial(17766,12963,0,0)
  2156.   endif
  2157.   movevar(d,result)
  2158.   e := d - r
  2159.   if vartest(e,-15,15)
  2160.     goto GJJ1fix
  2161.   endif
  2162.   gosub heading
  2163.   gosub GJJcommand
  2164.   goto GJJ1fix
  2165.  
  2166. GJJ2fix:
  2167.   if cylinder(17832,12946,0,3)
  2168.     goto GJJ1fix
  2169.   endif
  2170.   gosub error
  2171.   gosub GJJaltitude
  2172.   if radial(17832,12946,0,0)
  2173.   endif
  2174.   movevar(d,result)
  2175.   e := d - r
  2176.   if vartest(e,-15,15)
  2177.     goto GJJ2fix
  2178.   endif
  2179.   gosub heading
  2180.   gosub GJJcommand
  2181.   goto GJJ2fix
  2182.  
  2183. GJJ3fix:
  2184.   if cylinder(17919,13026,0,5)
  2185.     goto GJJ2fix
  2186.   endif
  2187.   gosub error
  2188.   gosub GJJaltitude
  2189.   if radial(17919,13026,0,0)
  2190.   endif
  2191.   movevar(d,result)
  2192.   e := d - r
  2193.   if vartest(e,-15,15)
  2194.     goto GJJ3fix
  2195.   endif
  2196.   gosub heading
  2197.   gosub GJJcommand
  2198.   goto GJJ3fix
  2199.  
  2200. GJJ4fix:
  2201.   if cylinder(17577,13062,0,5)
  2202.     goto GJJ5fix
  2203.   endif
  2204.   gosub error
  2205.   gosub GJJaltitude
  2206.   if radial(17577,13062,0,0)
  2207.   endif
  2208.   movevar(d,result)
  2209.   e := d - r
  2210.   if vartest(e,-15,15)
  2211.     goto GJJ4fix
  2212.   endif
  2213.   gosub heading
  2214.   gosub GJJcommand
  2215.   goto GJJ4fix
  2216.  
  2217. GJJ5fix:
  2218.   if cylinder(17645,12966,0,3)
  2219.     goto GJJ6fix
  2220.   endif
  2221.   gosub error
  2222.   gosub GJJaltitude
  2223.   if radial(17645,12966,0,0)
  2224.   endif
  2225.   movevar(d,result)
  2226.   e := d - r
  2227.   if vartest(e,-15,15)
  2228.     goto GJJ5fix
  2229.   endif
  2230.   gosub heading
  2231.   gosub GJJcommand
  2232.   goto GJJ5fix
  2233.  
  2234. GJJ6fix:
  2235.   if cylinder(17713,12968,0,3)
  2236. play "HASH.VOC"
  2237.     print "BA 321 turn to heading 40 and intercept localizer."
  2238.     wait(5)
  2239.     print "Contact Jersey tower on 119.45"
  2240.     goto GJJ9final
  2241.   endif
  2242.   gosub error
  2243.   gosub GJJaltitude
  2244.   if radial(17713,12968,0,0)
  2245.   endif
  2246.   movevar(d,result)
  2247.   e := d - r
  2248.   if vartest(e,-15,15)
  2249.     goto GJJ6fix
  2250.   endif
  2251.   gosub heading
  2252.   gosub GJJcommand
  2253.   goto GJJ6fix
  2254.  
  2255. GJJ9final:
  2256.   if com(119.45)
  2257.     if vartest(p,0,0)
  2258. play "HASH.VOC"
  2259.       print "Jersey tower with you."
  2260.       wait(5)
  2261.       setvar(p,1)
  2262.     endif
  2263.     if radial(17749,13049,257,277)
  2264. play "HASH.VOC"
  2265.       print "BA 321 cleared to land runway 9"
  2266.       goto GJJland
  2267.     endif
  2268.   endif
  2269.   goto GJJ9final
  2270.  
  2271. GJJ27runway:
  2272.   if com(120.30)
  2273. play "HASH.VOC"
  2274.     print "BA 321 expect vectors for runway 27"
  2275.     setvar(h,7)
  2276.     setvar(n,27)
  2277.     wait(15)
  2278.   endif
  2279.   if radial(17749,13049,84,129)
  2280.     goto GJJ7fix
  2281.   endif
  2282.   if radial(17749,13049,129,174)
  2283.     goto GJJ8fix
  2284.   endif
  2285.   if radial(17749,13049,174,264)
  2286.     goto GJJ9fix
  2287.   endif
  2288.   if radial(17749,13049,264,354)
  2289.     goto GJJ10fix
  2290.   endif
  2291.   if radial(17749,13049,354,360)
  2292.     goto GJJ11fix
  2293.   endif
  2294.   if radial(17749,13049,0,39)
  2295.     goto GJJ11fix
  2296.   endif
  2297.   if radial(17749,13049,39,84)
  2298.     goto GJJ12fix
  2299.   endif
  2300.  
  2301. GJJ7fix:
  2302.   if cylinder(17731,13134,0,3)
  2303. play "HASH.VOC"
  2304.     print "BA 321 turn to heading 310 and intercept localizer."
  2305.     wait(5)
  2306.     print "Contact Jersey tower on 119.45"
  2307.     goto GJJ27final
  2308.   endif
  2309.   gosub error
  2310.   gosub GJJaltitude
  2311.   if radial(17731,13134,0,0)
  2312.   endif
  2313.   movevar(d,result)
  2314.   e := d - r
  2315.   if vartest(e,-15,15)
  2316.     goto GJJ7fix
  2317.   endif
  2318.   gosub heading
  2319.   gosub GJJcommand
  2320.   goto GJJ7fix
  2321.  
  2322. GJJ8fix:
  2323.   if cylinder(17665,13151,0,3)
  2324.     goto GJJ7fix
  2325.   endif
  2326.   gosub error
  2327.   gosub GJJaltitude
  2328.   if radial(17665,13151,0,0)
  2329.   endif
  2330.   movevar(d,result)
  2331.   e := d - r
  2332.   if vartest(e,-15,15)
  2333.     goto GJJ8fix
  2334.   endif
  2335.   gosub heading
  2336.   gosub GJJcommand
  2337.   goto GJJ8fix
  2338.  
  2339. GJJ9fix:
  2340.   if cylinder(17578,13071,0,5)
  2341.     goto GJJ8fix
  2342.   endif
  2343.   gosub error
  2344.   gosub GJJaltitude
  2345.   if radial(17578,13071,0,0)
  2346.   endif
  2347.   movevar(d,result)
  2348.   e := d - r
  2349.   if vartest(e,-15,15)
  2350.     goto GJJ9fix
  2351.   endif
  2352.   gosub heading
  2353.   gosub GJJcommand
  2354.   goto GJJ9fix
  2355.  
  2356. GJJ10fix:
  2357.   if cylinder(17920,13035,0,5)
  2358.     goto GJJ11fix
  2359.   endif
  2360.   gosub error
  2361.   gosub GJJaltitude
  2362.   if radial(17920,13035,0,0)
  2363.   endif
  2364.   movevar(d,result)
  2365.   e := d - r
  2366.   if vartest(e,-15,15)
  2367.     goto GJJ10fix
  2368.   endif
  2369.   gosub heading
  2370.   gosub GJJcommand
  2371.   goto GJJ10fix
  2372.  
  2373. GJJ11fix:
  2374.   if cylinder(17852,13131,0,3)
  2375.     goto GJJ12fix
  2376.   endif
  2377.   gosub error
  2378.   gosub GJJaltitude
  2379.   if radial(17852,13131,0,0)
  2380.   endif
  2381.   movevar(d,result)
  2382.   e := d - r
  2383.   if vartest(e,-15,15)
  2384.     goto GJJ11fix
  2385.   endif
  2386.   gosub heading
  2387.   gosub GJJcommand
  2388.   goto GJJ11fix
  2389.  
  2390. GJJ12fix:
  2391.   if cylinder(17784,13129,0,3)
  2392. play "HASH.VOC"
  2393.     print "BA 321 turn to heading 220 and intercept localizer."
  2394.     wait(5)
  2395.     print "Contact Jersey tower on 119.45"
  2396.     goto GJJ27final
  2397.   endif
  2398.   gosub error
  2399.   gosub GJJaltitude
  2400.   if radial(17784,13129,0,0)
  2401.   endif
  2402.   movevar(d,result)
  2403.   e := d - r
  2404.   if vartest(e,-15,15)
  2405.     goto GJJ12fix
  2406.   endif
  2407.   gosub heading
  2408.   gosub GJJcommand
  2409.   goto GJJ12fix
  2410.  
  2411. GJJ27final:
  2412.   if com(119.45)
  2413.     if vartest(p,0,0)
  2414. play "HASH.VOC"
  2415.       print "Jersey tower with you."
  2416.       wait(5)
  2417.       setvar(p,1)
  2418.     endif
  2419.     if radial(17749,13049,77,97)
  2420. play "HASH.VOC"
  2421.       print "BA 321 cleared to land runway 27"
  2422.       goto GJJland
  2423.     endif
  2424.   endif
  2425.   goto GJJ27final
  2426.  
  2427. GJJland:
  2428.   if varmask(ground,1)
  2429.     if com(119.45)
  2430.       print "BA 321 contact ground control on 121.90"
  2431.     endif
  2432.     if com(121.90)
  2433.       goto taxi
  2434.     endif
  2435.   endif
  2436.   goto GJJland
  2437.  
  2438. GJJaltitude:
  2439.   if cylinder(17749,13049,16,30)
  2440.     if vartest(f,0,0)
  2441.     setvar(g,3000)
  2442.       if com(120.30)
  2443. play "HASH.VOC"
  2444.         if altitude(3100,32767)
  2445.           print "BA 321 descend and maintain 3000"
  2446.           setvar(h,4)
  2447.           setvar(n,3000)
  2448.           wait(5)
  2449.         endif
  2450.         if altitude(0,2900)
  2451.           print "BA 321 climb and maintain 3000"
  2452.           setvar(h,3)
  2453.           setvar(n,3000)
  2454.           wait(5)
  2455.         endif
  2456.       endif
  2457.       setvar(f,1)
  2458.     endif
  2459.   endif
  2460.   if cylinder(17749,13049,0,15)
  2461.     if vartest(f,0,1)
  2462.     setvar(g,2000)
  2463.       if com(120.30)
  2464. play "HASH.VOC"
  2465.         if altitude(2100,32767)
  2466.           print "BA 321 descend and maintain 2000"
  2467.           setvar(h,4)
  2468.           setvar(n,2000)
  2469.           wait(5)
  2470.         endif
  2471.         if altitude(0,1900)
  2472.           print "BA 321 climb and maintain 2000"
  2473.           setvar(h,3)
  2474.           setvar(n,2000)
  2475.           wait(5)
  2476.         endif
  2477.       endif
  2478.       setvar(f,2)
  2479.     endif
  2480.   endif
  2481.   return
  2482.  
  2483. GJJcommand:
  2484.   s := a - result
  2485.   if vartest(s,-360,0)
  2486.     addvar(s,360)
  2487.   endif
  2488.   m := l - a
  2489.   if vartest(m,0,0)
  2490.     return
  2491.   endif
  2492.   if com(120.30)
  2493.     movevar(n,a)
  2494. play "HASH.VOC"
  2495.     if vartest(s,0,180)
  2496.       printvar(a,"BA 321 turn right heading ")
  2497.       setvar(h,2)
  2498.     endif
  2499.     if vartest(s,180,360)
  2500.       printvar(a,"BA 321 turn left heading ")
  2501.       setvar(h,1)
  2502.     endif
  2503.   endif
  2504.   movevar(l,a)
  2505.   wait(10)
  2506.   return
  2507.  
  2508. GJJdeparture:
  2509.   if altitude(0,0)
  2510.   endif
  2511.   u := result / b / b * b * b
  2512.   addvar(u,4000)
  2513.   print "Contact ground control on 121.90 to begin flight."
  2514.  
  2515. GJJground:
  2516.   if com(121.90)
  2517.     gosub GJJrunway
  2518.     wait(5)
  2519.     goto GJJhold
  2520.   endif
  2521.   goto GJJground
  2522.  
  2523. GJJhold:
  2524.   if groundspeed(0,0)
  2525.     if com(119.45)
  2526. play "HASH.VOC"
  2527.       printvar(t,"BA 321 cleared for takeoff on runway ")
  2528.       wait(5)
  2529.       goto GJJtakeoff
  2530.     endif
  2531.   endif
  2532.   goto GJJhold
  2533.  
  2534. GJJtakeoff:
  2535.   if altagl(500,32767)
  2536.     if com(119.45)
  2537. play "HASH.VOC"
  2538.       print "Contact Jersey departure on 120.30"
  2539.       setvar(f,0)
  2540.       wait(3)
  2541.       goto GJJclimbout
  2542.     endif
  2543.   endif
  2544.   goto GJJtakeoff
  2545.  
  2546. GJJclimbout:
  2547.   setvar(z,0)
  2548.   if com(120.30)
  2549.     setvar(z,1)
  2550.     if vartest(f,0,0)
  2551.       wait(3)
  2552. play "HASH.VOC"
  2553.       print "BA 321 radar contact"
  2554.       wait(5)
  2555.       addvar(f,1)
  2556.     endif
  2557.   endif
  2558.   if cylinder(17749,13049,0,0)
  2559.   endif
  2560.   movevar(r,result)
  2561.   gosub vectoring
  2562.   if vartest(f,3,3)
  2563.     setvar(x,0)
  2564.     setvar(y,0)
  2565.     return
  2566.   endif
  2567.   goto GJJclimbout
  2568.  
  2569. dest3:
  2570.   print "A - London Heathrow (GLL)   B - Next   / - Main menu"
  2571.   if key("a")
  2572.     if altagl(0,100)
  2573.       print "Begin your flight to London Heathrow"
  2574.       wait(2)
  2575.       gosub departcheck
  2576.       wait(10)
  2577.     endif
  2578. play "HASH.VOC"
  2579.     print "BA 321 resume own navigation"
  2580.     wait(10)
  2581.     goto GLLgeneric
  2582.   endif
  2583.   if key("b")
  2584.     goto dest4
  2585.   endif
  2586.   if key("/")
  2587.     goto flightplan
  2588.   endif
  2589.   goto dest3
  2590.  
  2591. GLLgeneric:
  2592.   gosub centercheck
  2593.   gosub GLLbegin
  2594.   goto GLLgeneric
  2595.  
  2596. GLLbegin:
  2597.   if cylinder(18660,13656,0,40)
  2598.     gosub appinit
  2599. play "HASH.VOC"
  2600.     print "BA 321 contact Heathrow approach on 119.20"
  2601.     goto GLLradio
  2602.   endif
  2603.   return
  2604.  
  2605. GLLradio:
  2606.   if altagl(1500,32767)
  2607.     if com(119.20)
  2608.       wait(3)
  2609. play "HASH.VOC"
  2610.       print "BA 321 radar contact"
  2611.       goto GLLapproach
  2612.     endif
  2613.   endif
  2614.   goto GLLradio
  2615.  
  2616. GLLapproach:
  2617.   if cylinder(18660,13656,0,35)
  2618.     if vartest(w0dir,910,32767)
  2619.       goto GLL9runway
  2620.     endif
  2621.     if vartest(w0dir,-32767,-3458)
  2622.       goto GLL9runway
  2623.     endif
  2624.     if vartest(w0dir,29308,32767)
  2625.       goto GLL23runway
  2626.     endif
  2627.     if vartest(w0dir,-32767,-19842)
  2628.       goto GLL23runway
  2629.     endif
  2630.     if vartest(w0dir,-19842,910)
  2631.       goto GLL27runway
  2632.     endif
  2633.   endif
  2634.   gosub error
  2635.   goto GLLapproach
  2636.  
  2637. GLLrunway:
  2638. play "HASH.VOC"
  2639.     if vartest(w0dir,910,32767)
  2640.       setvar(t,9)
  2641.       print "BA 321 taxi to runway 9 and hold short"
  2642.     endif
  2643.     if vartest(w0dir,-32767,-3458)
  2644.       setvar(t,9)
  2645.       print "BA 321 taxi to runway 9 and hold short"
  2646.     endif
  2647.     if vartest(w0dir,29308,32767)
  2648.       setvar(t,23)
  2649.       print "BA 321 taxi to runway 23 and hold short"
  2650.     endif
  2651.     if vartest(w0dir,-32767,-19842)
  2652.       setvar(t,23)
  2653.       print "BA 321 taxi to runway 23 and hold short"
  2654.     endif
  2655.     if vartest(w0dir,-19842,910)
  2656.       setvar(t,27)
  2657.       print "BA 321 taxi to runway 27 and hold short"
  2658.     endif
  2659.   return
  2660.  
  2661. GLL9runway:
  2662.   if com(119.20)
  2663. play "HASH.VOC"
  2664.     print "BA 321 expect vectors for runway 9"
  2665.     setvar(h,7)
  2666.     setvar(n,9)
  2667.     wait(15)
  2668.   endif
  2669.   if radial(18660,13656,272,317)
  2670.     goto GLL1fix
  2671.   endif
  2672.   if radial(18660,13656,317,360)
  2673.     goto GLL2fix
  2674.   endif
  2675.   if radial(18660,13656,0,2)
  2676.     goto GLL2fix
  2677.   endif
  2678.   if radial(18660,13656,2,92)
  2679.     goto GLL3fix
  2680.   endif
  2681.   if radial(18660,13656,92,182)
  2682.     goto GLL4fix
  2683.   endif
  2684.   if radial(18660,13656,182,227)
  2685.     goto GLL5fix
  2686.   endif
  2687.   if radial(18660,13656,227,272)
  2688.     goto GLL6fix
  2689.   endif
  2690.  
  2691. GLL1fix:
  2692.   if cylinder(18689,13573,0,3)
  2693. play "HASH.VOC"
  2694.     print "BA 321 turn to heading 130 and intercept localizer."
  2695.     wait(5)
  2696.     print "Contact London Heathrow tower on 118.70"
  2697.     goto GLL9final
  2698.   endif
  2699.   gosub error
  2700.   gosub GLLaltitude
  2701.   if radial(18689,13573,0,0)
  2702.   endif
  2703.   movevar(d,result)
  2704.   e := d - r
  2705.   if vartest(e,-15,15)
  2706.     goto GLL1fix
  2707.   endif
  2708.   gosub heading
  2709.   gosub GLLcommand
  2710.   goto GLL1fix
  2711.  
  2712. GLL2fix:
  2713.   if cylinder(18757,13566,0,3)
  2714.     goto GLL1fix
  2715.   endif
  2716.   gosub error
  2717.   gosub GLLaltitude
  2718.   if radial(18757,13566,0,0)
  2719.   endif
  2720.   movevar(d,result)
  2721.   e := d - r
  2722.   if vartest(e,-15,15)
  2723.     goto GLL2fix
  2724.   endif
  2725.   gosub heading
  2726.   gosub GLLcommand
  2727.   goto GLL2fix
  2728.  
  2729. GLL3fix:
  2730.   if cylinder(18831,13657,0,5)
  2731.     goto GLL2fix
  2732.   endif
  2733.   gosub error
  2734.   gosub GLLaltitude
  2735.   if radial(18831,13657,0,0)
  2736.   endif
  2737.   movevar(d,result)
  2738.   e := d - r
  2739.   if vartest(e,-15,15)
  2740.     goto GLL3fix
  2741.   endif
  2742.   gosub heading
  2743.   gosub GLLcommand
  2744.   goto GLL3fix
  2745.  
  2746. GLL4fix:
  2747.   if cylinder(18488,13645,0,5)
  2748.     goto GLL5fix
  2749.   endif
  2750.   gosub error
  2751.   gosub GLLaltitude
  2752.   if radial(18488,13645,0,0)
  2753.   endif
  2754.   movevar(d,result)
  2755.   e := d - r
  2756.   if vartest(e,-15,15)
  2757.     goto GLL4fix
  2758.   endif
  2759.   gosub heading
  2760.   gosub GLLcommand
  2761.   goto GLL4fix
  2762.  
  2763. GLL5fix:
  2764.   if cylinder(18569,13559,0,3)
  2765.     goto GLL6fix
  2766.   endif
  2767.   gosub error
  2768.   gosub GLLaltitude
  2769.   if radial(18569,13559,0,0)
  2770.   endif
  2771.   movevar(d,result)
  2772.   e := d - r
  2773.   if vartest(e,-15,15)
  2774.     goto GLL5fix
  2775.   endif
  2776.   gosub heading
  2777.   gosub GLLcommand
  2778.   goto GLL5fix
  2779.  
  2780. GLL6fix:
  2781.   if cylinder(18636,13571,0,3)
  2782. play "HASH.VOC"
  2783.     print "BA 321 turn to heading 40 and intercept localizer."
  2784.     wait(5)
  2785.     print "Contact London Heathrow tower on 118.70"
  2786.     goto GLL9final
  2787.   endif
  2788.   gosub error
  2789.   gosub GLLaltitude
  2790.   if radial(18636,13571,0,0)
  2791.   endif
  2792.   movevar(d,result)
  2793.   e := d - r
  2794.   if vartest(e,-15,15)
  2795.     goto GLL6fix
  2796.   endif
  2797.   gosub heading
  2798.   gosub GLLcommand
  2799.   goto GLL6fix
  2800.  
  2801. GLL9final:
  2802.   if com(118.70)
  2803.     if vartest(p,0,0)
  2804. play "HASH.VOC"
  2805.       print "London Heathrow tower with you."
  2806.       wait(5)
  2807.       setvar(p,1)
  2808.     endif
  2809.     if radial(18660,13656,265,285)
  2810. play "HASH.VOC"
  2811.       print "BA 321 cleared to land runway 9"
  2812.       goto GLLland
  2813.     endif
  2814.   endif
  2815.   goto GLL9final
  2816.  
  2817. GLL23runway:
  2818.   if com(119.20)
  2819. play "HASH.VOC"
  2820.     print "BA 321 expect vectors for runway 23"
  2821.     setvar(h,7)
  2822.     setvar(n,23)
  2823.     wait(15)
  2824.   endif
  2825.   if radial(18660,13656,44,89)
  2826.     goto GLL7fix
  2827.   endif
  2828.   if radial(18660,13656,89,134)
  2829.     goto GLL8fix
  2830.   endif
  2831.   if radial(18660,13656,134,224)
  2832.     goto GLL9fix
  2833.   endif
  2834.   if radial(18660,13656,224,314)
  2835.     goto GLL10fix
  2836.   endif
  2837.   if radial(18660,13656,314,359)
  2838.     goto GLL11fix
  2839.   endif
  2840.   if radial(18660,13656,359,360)
  2841.     goto GLL12fix
  2842.   endif
  2843.   if radial(18660,13656,0,44)
  2844.     goto GLL12fix
  2845.   endif
  2846.  
  2847. GLL7fix:
  2848.   if cylinder(18701,13733,0,3)
  2849. play "HASH.VOC"
  2850.     print "BA 321 turn to heading 270 and intercept localizer."
  2851.     wait(5)
  2852.     print "Contact London Heathrow tower on 118.70"
  2853.     goto GLL23final
  2854.   endif
  2855.   gosub error
  2856.   gosub GLLaltitude
  2857.   if radial(18701,13733,0,0)
  2858.   endif
  2859.   movevar(d,result)
  2860.   e := d - r
  2861.   if vartest(e,-15,15)
  2862.     goto GLL7fix
  2863.   endif
  2864.   gosub heading
  2865.   gosub GLLcommand
  2866.   goto GLL7fix
  2867.  
  2868. GLL8fix:
  2869.   if cylinder(18661,13788,0,3)
  2870.     goto GLL7fix
  2871.   endif
  2872.   gosub error
  2873.   gosub GLLaltitude
  2874.   if radial(18661,13788,0,0)
  2875.   endif
  2876.   movevar(d,result)
  2877.   e := d - r
  2878.   if vartest(e,-15,15)
  2879.     goto GLL8fix
  2880.   endif
  2881.   gosub heading
  2882.   gosub GLLcommand
  2883.   goto GLL8fix
  2884.  
  2885. GLL9fix:
  2886.   if cylinder(18543,13782,0,5)
  2887.     goto GLL8fix
  2888.   endif
  2889.   gosub error
  2890.   gosub GLLaltitude
  2891.   if radial(18543,13782,0,0)
  2892.   endif
  2893.   movevar(d,result)
  2894.   e := d - r
  2895.   if vartest(e,-15,15)
  2896.     goto GLL9fix
  2897.   endif
  2898.   gosub heading
  2899.   gosub GLLcommand
  2900.   goto GLL9fix
  2901.  
  2902. GLL10fix:
  2903.   if cylinder(18782,13535,0,5)
  2904.     goto GLL11fix
  2905.   endif
  2906.   gosub error
  2907.   gosub GLLaltitude
  2908.   if radial(18782,13535,0,0)
  2909.   endif
  2910.   movevar(d,result)
  2911.   e := d - r
  2912.   if vartest(e,-15,15)
  2913.     goto GLL10fix
  2914.   endif
  2915.   gosub heading
  2916.   gosub GLLcommand
  2917.   goto GLL10fix
  2918.  
  2919. GLL11fix:
  2920.   if cylinder(18792,13653,0,3)
  2921.     goto GLL12fix
  2922.   endif
  2923.   gosub error
  2924.   gosub GLLaltitude
  2925.   if radial(18792,13653,0,0)
  2926.   endif
  2927.   movevar(d,result)
  2928.   e := d - r
  2929.   if vartest(e,-15,15)
  2930.     goto GLL11fix
  2931.   endif
  2932.   gosub heading
  2933.   gosub GLLcommand
  2934.   goto GLL11fix
  2935.  
  2936. GLL12fix:
  2937.   if cylinder(18738,13694,0,3)
  2938. play "HASH.VOC"
  2939.     print "BA 321 turn to heading 180 and intercept localizer."
  2940.     wait(5)
  2941.     print "Contact London Heathrow tower on 118.70"
  2942.     goto GLL23final
  2943.   endif
  2944.   gosub error
  2945.   gosub GLLaltitude
  2946.   if radial(18738,13694,0,0)
  2947.   endif
  2948.   movevar(d,result)
  2949.   e := d - r
  2950.   if vartest(e,-15,15)
  2951.     goto GLL12fix
  2952.   endif
  2953.   gosub heading
  2954.   gosub GLLcommand
  2955.   goto GLL12fix
  2956.  
  2957. GLL23final:
  2958.   if com(118.70)
  2959.     if vartest(p,0,0)
  2960. play "HASH.VOC"
  2961.       print "London Heathrow tower with you."
  2962.       wait(5)
  2963.       setvar(p,1)
  2964.     endif
  2965.     if radial(18660,13656,37,57)
  2966. play "HASH.VOC"
  2967.       print "BA 321 cleared to land runway 23"
  2968.       goto GLLland
  2969.     endif
  2970.   endif
  2971.   goto GLL23final
  2972.  
  2973. GLL27runway:
  2974.   if com(119.20)
  2975. play "HASH.VOC"
  2976.     print "BA 321 expect vectors for runway 27"
  2977.     setvar(h,7)
  2978.     setvar(n,27)
  2979.     wait(15)
  2980.   endif
  2981.   if radial(18660,13656,92,137)
  2982.     goto GLL13fix
  2983.   endif
  2984.   if radial(18660,13656,137,182)
  2985.     goto GLL14fix
  2986.   endif
  2987.   if radial(18660,13656,182,272)
  2988.     goto GLL15fix
  2989.   endif
  2990.   if radial(18660,13656,272,360)
  2991.     goto GLL16fix
  2992.   endif
  2993.   if radial(18660,13656,0,2)
  2994.     goto GLL16fix
  2995.   endif
  2996.   if radial(18660,13656,2,47)
  2997.     goto GLL17fix
  2998.   endif
  2999.   if radial(18660,13656,47,92)
  3000.     goto GLL18fix
  3001.   endif
  3002.  
  3003. GLL13fix:
  3004.   if cylinder(18630,13738,0,3)
  3005. play "HASH.VOC"
  3006.     print "BA 321 turn to heading 310 and intercept localizer."
  3007.     wait(5)
  3008.     print "Contact London Heathrow tower on 118.70"
  3009.     goto GLL27final
  3010.   endif
  3011.   gosub error
  3012.   gosub GLLaltitude
  3013.   if radial(18630,13738,0,0)
  3014.   endif
  3015.   movevar(d,result)
  3016.   e := d - r
  3017.   if vartest(e,-15,15)
  3018.     goto GLL13fix
  3019.   endif
  3020.   gosub heading
  3021.   gosub GLLcommand
  3022.   goto GLL13fix
  3023.  
  3024. GLL14fix:
  3025.   if cylinder(18562,13745,0,3)
  3026.     goto GLL13fix
  3027.   endif
  3028.   gosub error
  3029.   gosub GLLaltitude
  3030.   if radial(18562,13745,0,0)
  3031.   endif
  3032.   movevar(d,result)
  3033.   e := d - r
  3034.   if vartest(e,-15,15)
  3035.     goto GLL14fix
  3036.   endif
  3037.   gosub heading
  3038.   gosub GLLcommand
  3039.   goto GLL14fix
  3040.  
  3041. GLL15fix:
  3042.   if cylinder(18488,13654,0,5)
  3043.     goto GLL14fix
  3044.   endif
  3045.   gosub error
  3046.   gosub GLLaltitude
  3047.   if radial(18488,13654,0,0)
  3048.   endif
  3049.   movevar(d,result)
  3050.   e := d - r
  3051.   if vartest(e,-15,15)
  3052.     goto GLL15fix
  3053.   endif
  3054.   gosub heading
  3055.   gosub GLLcommand
  3056.   goto GLL15fix
  3057.  
  3058. GLL16fix:
  3059.   if cylinder(18831,13666,0,5)
  3060.     goto GLL17fix
  3061.   endif
  3062.   gosub error
  3063.   gosub GLLaltitude
  3064.   if radial(18831,13666,0,0)
  3065.   endif
  3066.   movevar(d,result)
  3067.   e := d - r
  3068.   if vartest(e,-15,15)
  3069.     goto GLL16fix
  3070.   endif
  3071.   gosub heading
  3072.   gosub GLLcommand
  3073.   goto GLL16fix
  3074.  
  3075. GLL17fix:
  3076.   if cylinder(18750,13752,0,3)
  3077.     goto GLL18fix
  3078.   endif
  3079.   gosub error
  3080.   gosub GLLaltitude
  3081.   if radial(18750,13752,0,0)
  3082.   endif
  3083.   movevar(d,result)
  3084.   e := d - r
  3085.   if vartest(e,-15,15)
  3086.     goto GLL17fix
  3087.   endif
  3088.   gosub heading
  3089.   gosub GLLcommand
  3090.   goto GLL17fix
  3091.  
  3092. GLL18fix:
  3093.   if cylinder(18683,13740,0,3)
  3094. play "HASH.VOC"
  3095.     print "BA 321 turn to heading 220 and intercept localizer."
  3096.     wait(5)
  3097.     print "Contact London Heathrow tower on 118.70"
  3098.     goto GLL27final
  3099.   endif
  3100.   gosub error
  3101.   gosub GLLaltitude
  3102.   if radial(18683,13740,0,0)
  3103.   endif
  3104.   movevar(d,result)
  3105.   e := d - r
  3106.   if vartest(e,-15,15)
  3107.     goto GLL18fix
  3108.   endif
  3109.   gosub heading
  3110.   gosub GLLcommand
  3111.   goto GLL18fix
  3112.  
  3113. GLL27final:
  3114.   if com(118.70)
  3115.     if vartest(p,0,0)
  3116. play "HASH.VOC"
  3117.       print "London Heathrow tower with you."
  3118.       wait(5)
  3119.       setvar(p,1)
  3120.     endif
  3121.     if radial(18660,13656,85,105)
  3122. play "HASH.VOC"
  3123.       print "BA 321 cleared to land runway 27"
  3124.       goto GLLland
  3125.     endif
  3126.   endif
  3127.   goto GLL27final
  3128.  
  3129. GLLland:
  3130.   if varmask(ground,1)
  3131.     if com(118.70)
  3132.       print "BA 321 contact ground control on 121.90"
  3133.     endif
  3134.     if com(121.90)
  3135.       goto taxi
  3136.     endif
  3137.   endif
  3138.   goto GLLland
  3139.  
  3140. GLLaltitude:
  3141.   if cylinder(18660,13656,26,35)
  3142.     if vartest(f,0,0)
  3143.     setvar(g,7000)
  3144.       if com(119.20)
  3145. play "HASH.VOC"
  3146.         if altitude(7100,32767)
  3147.           print "BA 321 descend and maintain 7000"
  3148.           setvar(h,4)
  3149.           setvar(n,7000)
  3150.           wait(5)
  3151.         endif
  3152.         if altitude(0,6900)
  3153.           print "BA 321 climb and maintain 7000"
  3154.           setvar(h,3)
  3155.           setvar(n,7000)
  3156.           wait(5)
  3157.         endif
  3158.       endif
  3159.       setvar(f,1)
  3160.     endif
  3161.   endif
  3162.   if cylinder(18660,13656,0,25)
  3163.     if vartest(f,0,1)
  3164.     setvar(g,2500)
  3165.       if com(119.20)
  3166. play "HASH.VOC"
  3167.         if altitude(2600,32767)
  3168.           print "BA 321 descend and maintain 2500"
  3169.           setvar(h,4)
  3170.           setvar(n,2500)
  3171.           wait(5)
  3172.         endif
  3173.         if altitude(0,2400)
  3174.           print "BA 321 climb and maintain 2500"
  3175.           setvar(h,3)
  3176.           setvar(n,2500)
  3177.           wait(5)
  3178.         endif
  3179.       endif
  3180.       setvar(f,2)
  3181.     endif
  3182.   endif
  3183.   return
  3184.  
  3185. GLLcommand:
  3186.   s := a - result
  3187.   if vartest(s,-360,0)
  3188.     addvar(s,360)
  3189.   endif
  3190.   m := l - a
  3191.   if vartest(m,0,0)
  3192.     return
  3193.   endif
  3194.   if com(119.20)
  3195.     movevar(n,a)
  3196. play "HASH.VOC"
  3197.     if vartest(s,0,180)
  3198.       printvar(a,"BA 321 turn right heading ")
  3199.       setvar(h,2)
  3200.     endif
  3201.     if vartest(s,180,360)
  3202.       printvar(a,"BA 321 turn left heading ")
  3203.       setvar(h,1)
  3204.     endif
  3205.   endif
  3206.   movevar(l,a)
  3207.   wait(10)
  3208.   return
  3209.  
  3210. GLLdeparture:
  3211.   if altitude(0,0)
  3212.   endif
  3213.   u := result / b / b * b * b
  3214.   addvar(u,4000)
  3215.   print "Contact clearance delivery on 121.70 to begin flight."
  3216.   if com(121.70)
  3217. play "HASH.VOC"
  3218.     print "BA 321 cleared for IFR flight via filed routing."
  3219.     wait(4)
  3220.     printvar(u,"Climb and maintain ")
  3221.     wait(3)
  3222.     printvar(k,"Within 10 minutes of departure expect ")
  3223.     wait(3)
  3224.     print "Departure frequency is 119.20"
  3225.     wait(3)
  3226.     print "Contact ground control on 121.90 for taxi instructions."
  3227.     goto GLLground
  3228.   endif
  3229.   goto GLLdeparture
  3230. GLLground:
  3231.   if com(121.90)
  3232.     gosub GLLrunway
  3233.     wait(5)
  3234.     goto GLLhold
  3235.   endif
  3236.   goto GLLground
  3237.  
  3238. GLLhold:
  3239.   if groundspeed(0,0)
  3240.     if com(118.70)
  3241. play "HASH.VOC"
  3242.       printvar(t,"BA 321 cleared for takeoff on runway ")
  3243.       wait(5)
  3244.       goto GLLtakeoff
  3245.     endif
  3246.   endif
  3247.   goto GLLhold
  3248.  
  3249. GLLtakeoff:
  3250.   if altagl(500,32767)
  3251.     if com(118.70)
  3252. play "HASH.VOC"
  3253.       print "Contact Heathrow departure on 119.20"
  3254.       setvar(f,0)
  3255.       wait(3)
  3256.       goto GLLclimbout
  3257.     endif
  3258.   endif
  3259.   goto GLLtakeoff
  3260.  
  3261. GLLclimbout:
  3262.   setvar(z,0)
  3263.   if com(119.20)
  3264.     setvar(z,1)
  3265.     if vartest(f,0,0)
  3266.       wait(3)
  3267. play "HASH.VOC"
  3268.       print "BA 321 radar contact"
  3269.       wait(5)
  3270.       addvar(f,1)
  3271.     endif
  3272.   endif
  3273.   if cylinder(18660,13656,0,0)
  3274.   endif
  3275.   movevar(r,result)
  3276.   gosub vectoring
  3277.   if vartest(f,3,3)
  3278.     setvar(x,0)
  3279.     setvar(y,0)
  3280.     return
  3281.   endif
  3282.   goto GLLclimbout
  3283.  
  3284. dest4:
  3285.   print "A - Birmingham International (GBB)   B - Next   / - Main menu"
  3286.   if key("a")
  3287.     if altagl(0,100)
  3288.       print "Begin your flight to Birmingham International"
  3289.       wait(2)
  3290.       gosub departcheck
  3291.       wait(10)
  3292.     endif
  3293. play "HASH.VOC"
  3294.     print "BA 321 resume own navigation"
  3295.     wait(10)
  3296.     goto GBBgeneric
  3297.   endif
  3298.   if key("b")
  3299.     goto dest5
  3300.   endif
  3301.   if key("/")
  3302.     goto flightplan
  3303.   endif
  3304.   goto dest4
  3305.  
  3306. GBBgeneric:
  3307.   gosub centercheck
  3308.   gosub GBBbegin
  3309.   goto GBBgeneric
  3310.  
  3311. GBBbegin:
  3312.   if cylinder(19127,13369,0,40)
  3313.     gosub appinit
  3314. play "HASH.VOC"
  3315.     print "BA 321 contact Birmingham approach on 118.05"
  3316.     goto GBBradio
  3317.   endif
  3318.   return
  3319.  
  3320. GBBradio:
  3321.   if altagl(1500,32767)
  3322.     if com(118.05)
  3323.       wait(3)
  3324. play "HASH.VOC"
  3325.       print "BA 321 radar contact"
  3326.       goto GBBapproach
  3327.     endif
  3328.   endif
  3329.   goto GBBradio
  3330.  
  3331. GBBapproach:
  3332.   if cylinder(19127,13369,0,35)
  3333.     if vartest(w0dir,11104,32767)
  3334.       goto GBB15runway
  3335.     endif
  3336.     if vartest(w0dir,-32767,-21662)
  3337.       goto GBB15runway
  3338.     endif
  3339.     if vartest(w0dir,-21662,11104)
  3340.       goto GBB33runway
  3341.     endif
  3342.   endif
  3343.   gosub error
  3344.   goto GBBapproach
  3345.  
  3346. GBBrunway:
  3347. play "HASH.VOC"
  3348.     if vartest(w0dir,11104,32767)
  3349.       setvar(t,15)
  3350.       print "BA 321 taxi to runway 15 and hold short"
  3351.     endif
  3352.     if vartest(w0dir,-32767,-21662)
  3353.       setvar(t,15)
  3354.       print "BA 321 taxi to runway 15 and hold short"
  3355.     endif
  3356.     if vartest(w0dir,-21662,11104)
  3357.       setvar(t,33)
  3358.       print "BA 321 taxi to runway 33 and hold short"
  3359.     endif
  3360.   return
  3361.  
  3362. GBB15runway:
  3363.   if com(118.05)
  3364. play "HASH.VOC"
  3365.     print "BA 321 expect vectors for runway 15"
  3366.     setvar(h,7)
  3367.     setvar(n,15)
  3368.     wait(15)
  3369.   endif
  3370.   if radial(19127,13369,328,360)
  3371.     goto GBB1fix
  3372.   endif
  3373.   if radial(19127,13369,0,13)
  3374.     goto GBB1fix
  3375.   endif
  3376.   if radial(19127,13369,13,58)
  3377.     goto GBB2fix
  3378.   endif
  3379.   if radial(19127,13369,58,148)
  3380.     goto GBB3fix
  3381.   endif
  3382.   if radial(19127,13369,148,238)
  3383.     goto GBB4fix
  3384.   endif
  3385.   if radial(19127,13369,238,283)
  3386.     goto GBB5fix
  3387.   endif
  3388.   if radial(19127,13369,283,328)
  3389.     goto GBB6fix
  3390.   endif
  3391.  
  3392. GBB1fix:
  3393.   if cylinder(19211,13347,0,3)
  3394. play "HASH.VOC"
  3395.     print "BA 321 turn to heading 190 and intercept localizer."
  3396.     wait(5)
  3397.     print "Contact Birmingham International tower on 118.30"
  3398.     goto GBB15final
  3399.   endif
  3400.   gosub error
  3401.   gosub GBBaltitude
  3402.   if radial(19211,13347,0,0)
  3403.   endif
  3404.   movevar(d,result)
  3405.   e := d - r
  3406.   if vartest(e,-15,15)
  3407.     goto GBB1fix
  3408.   endif
  3409.   gosub heading
  3410.   gosub GBBcommand
  3411.   goto GBB1fix
  3412.  
  3413. GBB2fix:
  3414.   if cylinder(19255,13399,0,3)
  3415.     goto GBB1fix
  3416.   endif
  3417.   gosub error
  3418.   gosub GBBaltitude
  3419.   if radial(19255,13399,0,0)
  3420.   endif
  3421.   movevar(d,result)
  3422.   e := d - r
  3423.   if vartest(e,-15,15)
  3424.     goto GBB2fix
  3425.   endif
  3426.   gosub heading
  3427.   gosub GBBcommand
  3428.   goto GBB2fix
  3429.  
  3430. GBB3fix:
  3431.   if cylinder(19221,13512,0,5)
  3432.     goto GBB2fix
  3433.   endif
  3434.   gosub error
  3435.   gosub GBBaltitude
  3436.   if radial(19221,13512,0,0)
  3437.   endif
  3438.   movevar(d,result)
  3439.   e := d - r
  3440.   if vartest(e,-15,15)
  3441.     goto GBB3fix
  3442.   endif
  3443.   gosub heading
  3444.   gosub GBBcommand
  3445.   goto GBB3fix
  3446.  
  3447. GBB4fix:
  3448.   if cylinder(19039,13221,0,5)
  3449.     goto GBB5fix
  3450.   endif
  3451.   gosub error
  3452.   gosub GBBaltitude
  3453.   if radial(19039,13221,0,0)
  3454.   endif
  3455.   movevar(d,result)
  3456.   e := d - r
  3457.   if vartest(e,-15,15)
  3458.     goto GBB4fix
  3459.   endif
  3460.   gosub heading
  3461.   gosub GBBcommand
  3462.   goto GBB4fix
  3463.  
  3464. GBB5fix:
  3465.   if cylinder(19156,13239,0,3)
  3466.     goto GBB6fix
  3467.   endif
  3468.   gosub error
  3469.   gosub GBBaltitude
  3470.   if radial(19156,13239,0,0)
  3471.   endif
  3472.   movevar(d,result)
  3473.   e := d - r
  3474.   if vartest(e,-15,15)
  3475.     goto GBB5fix
  3476.   endif
  3477.   gosub heading
  3478.   gosub GBBcommand
  3479.   goto GBB5fix
  3480.  
  3481. GBB6fix:
  3482.   if cylinder(19183,13302,0,3)
  3483. play "HASH.VOC"
  3484.     print "BA 321 turn to heading 100 and intercept localizer."
  3485.     wait(5)
  3486.     print "Contact Birmingham International tower on 118.30"
  3487.     goto GBB15final
  3488.   endif
  3489.   gosub error
  3490.   gosub GBBaltitude
  3491.   if radial(19183,13302,0,0)
  3492.   endif
  3493.   movevar(d,result)
  3494.   e := d - r
  3495.   if vartest(e,-15,15)
  3496.     goto GBB6fix
  3497.   endif
  3498.   gosub heading
  3499.   gosub GBBcommand
  3500.   goto GBB6fix
  3501.  
  3502. GBB15final:
  3503.   if com(118.30)
  3504.     if vartest(p,0,0)
  3505. play "HASH.VOC"
  3506.       print "Birmingham International tower with you."
  3507.       wait(5)
  3508.       setvar(p,1)
  3509.     endif
  3510.     if radial(19127,13369,321,341)
  3511. play "HASH.VOC"
  3512.       print "BA 321 cleared to land runway 15"
  3513.       goto GBBland
  3514.     endif
  3515.   endif
  3516.   goto GBB15final
  3517.  
  3518. GBB33runway:
  3519.   if com(118.05)
  3520. play "HASH.VOC"
  3521.     print "BA 321 expect vectors for runway 33"
  3522.     setvar(h,7)
  3523.     setvar(n,33)
  3524.     wait(15)
  3525.   endif
  3526.   if radial(19127,13369,148,193)
  3527.     goto GBB7fix
  3528.   endif
  3529.   if radial(19127,13369,193,238)
  3530.     goto GBB8fix
  3531.   endif
  3532.   if radial(19127,13369,238,328)
  3533.     goto GBB9fix
  3534.   endif
  3535.   if radial(19127,13369,328,360)
  3536.     goto GBB10fix
  3537.   endif
  3538.   if radial(19127,13369,0,58)
  3539.     goto GBB10fix
  3540.   endif
  3541.   if radial(19127,13369,58,103)
  3542.     goto GBB11fix
  3543.   endif
  3544.   if radial(19127,13369,103,148)
  3545.     goto GBB12fix
  3546.   endif
  3547.  
  3548. GBB7fix:
  3549.   if cylinder(19042,13390,0,3)
  3550. play "HASH.VOC"
  3551.     print "BA 321 turn to heading 10 and intercept localizer."
  3552.     wait(5)
  3553.     print "Contact Birmingham International tower on 118.30"
  3554.     goto GBB33final
  3555.   endif
  3556.   gosub error
  3557.   gosub GBBaltitude
  3558.   if radial(19042,13390,0,0)
  3559.   endif
  3560.   movevar(d,result)
  3561.   e := d - r
  3562.   if vartest(e,-15,15)
  3563.     goto GBB7fix
  3564.   endif
  3565.   gosub heading
  3566.   gosub GBBcommand
  3567.   goto GBB7fix
  3568.  
  3569. GBB8fix:
  3570.   if cylinder(18998,13338,0,3)
  3571.     goto GBB7fix
  3572.   endif
  3573.   gosub error
  3574.   gosub GBBaltitude
  3575.   if radial(18998,13338,0,0)
  3576.   endif
  3577.   movevar(d,result)
  3578.   e := d - r
  3579.   if vartest(e,-15,15)
  3580.     goto GBB8fix
  3581.   endif
  3582.   gosub heading
  3583.   gosub GBBcommand
  3584.   goto GBB8fix
  3585.  
  3586. GBB9fix:
  3587.   if cylinder(19032,13225,0,5)
  3588.     goto GBB8fix
  3589.   endif
  3590.   gosub error
  3591.   gosub GBBaltitude
  3592.   if radial(19032,13225,0,0)
  3593.   endif
  3594.   movevar(d,result)
  3595.   e := d - r
  3596.   if vartest(e,-15,15)
  3597.     goto GBB9fix
  3598.   endif
  3599.   gosub heading
  3600.   gosub GBBcommand
  3601.   goto GBB9fix
  3602.  
  3603. GBB10fix:
  3604.   if cylinder(19214,13516,0,5)
  3605.     goto GBB11fix
  3606.   endif
  3607.   gosub error
  3608.   gosub GBBaltitude
  3609.   if radial(19214,13516,0,0)
  3610.   endif
  3611.   movevar(d,result)
  3612.   e := d - r
  3613.   if vartest(e,-15,15)
  3614.     goto GBB10fix
  3615.   endif
  3616.   gosub heading
  3617.   gosub GBBcommand
  3618.   goto GBB10fix
  3619.  
  3620. GBB11fix:
  3621.   if cylinder(19097,13498,0,3)
  3622.     goto GBB12fix
  3623.   endif
  3624.   gosub error
  3625.   gosub GBBaltitude
  3626.   if radial(19097,13498,0,0)
  3627.   endif
  3628.   movevar(d,result)
  3629.   e := d - r
  3630.   if vartest(e,-15,15)
  3631.     goto GBB11fix
  3632.   endif
  3633.   gosub heading
  3634.   gosub GBBcommand
  3635.   goto GBB11fix
  3636.  
  3637. GBB12fix:
  3638.   if cylinder(19070,13435,0,3)
  3639. play "HASH.VOC"
  3640.     print "BA 321 turn to heading 280 and intercept localizer."
  3641.     wait(5)
  3642.     print "Contact Birmingham International tower on 118.30"
  3643.     goto GBB33final
  3644.   endif
  3645.   gosub error
  3646.   gosub GBBaltitude
  3647.   if radial(19070,13435,0,0)
  3648.   endif
  3649.   movevar(d,result)
  3650.   e := d - r
  3651.   if vartest(e,-15,15)
  3652.     goto GBB12fix
  3653.   endif
  3654.   gosub heading
  3655.   gosub GBBcommand
  3656.   goto GBB12fix
  3657.  
  3658. GBB33final:
  3659.   if com(118.30)
  3660.     if vartest(p,0,0)
  3661. play "HASH.VOC"
  3662.       print "Birmingham International tower with you."
  3663.       wait(5)
  3664.       setvar(p,1)
  3665.     endif
  3666.     if radial(19127,13369,141,161)
  3667. play "HASH.VOC"
  3668.       print "BA 321 cleared to land runway 33"
  3669.       goto GBBland
  3670.     endif
  3671.   endif
  3672.   goto GBB33final
  3673.  
  3674. GBBland:
  3675.   if varmask(ground,1)
  3676.     if com(118.30)
  3677.       print "BA 321 contact ground control on 121.80"
  3678.     endif
  3679.     if com(121.80)
  3680.       goto taxi
  3681.     endif
  3682.   endif
  3683.   goto GBBland
  3684.  
  3685. GBBaltitude:
  3686.   if cylinder(19127,13369,26,35)
  3687.     if vartest(f,0,0)
  3688.     setvar(g,5300)
  3689.       if com(118.05)
  3690. play "HASH.VOC"
  3691.         if altitude(5400,32767)
  3692.           print "BA 321 descend and maintain 5300"
  3693.           setvar(h,4)
  3694.           setvar(n,5300)
  3695.           wait(5)
  3696.         endif
  3697.         if altitude(0,5200)
  3698.           print "BA 321 climb and maintain 5300"
  3699.           setvar(h,3)
  3700.           setvar(n,5300)
  3701.           wait(5)
  3702.         endif
  3703.       endif
  3704.       setvar(f,1)
  3705.     endif
  3706.   endif
  3707.   if cylinder(19127,13369,0,25)
  3708.     if vartest(f,0,1)
  3709.     setvar(g,2500)
  3710.       if com(118.05)
  3711. play "HASH.VOC"
  3712.         if altitude(2600,32767)
  3713.           print "BA 321 descend and maintain 2500"
  3714.           setvar(h,4)
  3715.           setvar(n,2500)
  3716.           wait(5)
  3717.         endif
  3718.         if altitude(0,2400)
  3719.           print "BA 321 climb and maintain 2500"
  3720.           setvar(h,3)
  3721.           setvar(n,2500)
  3722.           wait(5)
  3723.         endif
  3724.       endif
  3725.       setvar(f,2)
  3726.     endif
  3727.   endif
  3728.   return
  3729.  
  3730. GBBcommand:
  3731.   s := a - result
  3732.   if vartest(s,-360,0)
  3733.     addvar(s,360)
  3734.   endif
  3735.   m := l - a
  3736.   if vartest(m,0,0)
  3737.     return
  3738.   endif
  3739.   if com(118.05)
  3740.     movevar(n,a)
  3741. play "HASH.VOC"
  3742.     if vartest(s,0,180)
  3743.       printvar(a,"BA 321 turn right heading ")
  3744.       setvar(h,2)
  3745.     endif
  3746.     if vartest(s,180,360)
  3747.       printvar(a,"BA 321 turn left heading ")
  3748.       setvar(h,1)
  3749.     endif
  3750.   endif
  3751.   movevar(l,a)
  3752.   wait(10)
  3753.   return
  3754.  
  3755. GBBdeparture:
  3756.   if altitude(0,0)
  3757.   endif
  3758.   u := result / b / b * b * b
  3759.   addvar(u,4000)
  3760.   print "Contact ground control on 121.80 to begin flight."
  3761.  
  3762. GBBground:
  3763.   if com(121.80)
  3764.     gosub GBBrunway
  3765.     wait(5)
  3766.     goto GBBhold
  3767.   endif
  3768.   goto GBBground
  3769.  
  3770. GBBhold:
  3771.   if groundspeed(0,0)
  3772.     if com(118.30)
  3773. play "HASH.VOC"
  3774.       printvar(t,"BA 321 cleared for takeoff on runway ")
  3775.       wait(5)
  3776.       goto GBBtakeoff
  3777.     endif
  3778.   endif
  3779.   goto GBBhold
  3780.  
  3781. GBBtakeoff:
  3782.   if altagl(500,32767)
  3783.     if com(118.30)
  3784. play "HASH.VOC"
  3785.       print "Contact Birmingham departure on 118.05"
  3786.       setvar(f,0)
  3787.       wait(3)
  3788.       goto GBBclimbout
  3789.     endif
  3790.   endif
  3791.   goto GBBtakeoff
  3792.  
  3793. GBBclimbout:
  3794.   setvar(z,0)
  3795.   if com(118.05)
  3796.     setvar(z,1)
  3797.     if vartest(f,0,0)
  3798.       wait(3)
  3799. play "HASH.VOC"
  3800.       print "BA 321 radar contact"
  3801.       wait(5)
  3802.       addvar(f,1)
  3803.     endif
  3804.   endif
  3805.   if cylinder(19127,13369,0,0)
  3806.   endif
  3807.   movevar(r,result)
  3808.   gosub vectoring
  3809.   if vartest(f,3,3)
  3810.     setvar(x,0)
  3811.     setvar(y,0)
  3812.     return
  3813.   endif
  3814.   goto GBBclimbout
  3815.  
  3816. dest5:
  3817.   print "A - London Gatwick (GKK)   B - Next   / - Main menu"
  3818.   if key("a")
  3819.     if altagl(0,100)
  3820.       print "Begin your flight to London Gatwick"
  3821.       wait(2)
  3822.       gosub departcheck
  3823.       wait(10)
  3824.     endif
  3825. play "HASH.VOC"
  3826.     print "BA 321 resume own navigation"
  3827.     wait(10)
  3828.     goto GKKgeneric
  3829.   endif
  3830.   if key("b")
  3831.     goto dest6
  3832.   endif
  3833.   if key("/")
  3834.     goto flightplan
  3835.   endif
  3836.   goto dest5
  3837.  
  3838. GKKgeneric:
  3839.   gosub centercheck
  3840.   gosub GKKbegin
  3841.   goto GKKgeneric
  3842.  
  3843. GKKbegin:
  3844.   if cylinder(18511,13713,0,40)
  3845.     gosub appinit
  3846. play "HASH.VOC"
  3847.     print "BA 321 contact Gatwick approach on 125.85"
  3848.     goto GKKradio
  3849.   endif
  3850.   return
  3851.  
  3852. GKKradio:
  3853.   if altagl(1500,32767)
  3854.     if com(125.85)
  3855.       wait(3)
  3856. play "HASH.VOC"
  3857.       print "BA 321 radar contact"
  3858.       goto GKKapproach
  3859.     endif
  3860.   endif
  3861.   goto GKKradio
  3862.  
  3863. GKKapproach:
  3864.   if cylinder(18511,13713,0,35)
  3865.     if vartest(w0dir,-1456,31310)
  3866.       goto GKK8runway
  3867.     endif
  3868.     if vartest(w0dir,31310,32767)
  3869.       goto GKK26runway
  3870.     endif
  3871.     if vartest(w0dir,-32767,-1456)
  3872.       goto GKK26runway
  3873.     endif
  3874.   endif
  3875.   gosub error
  3876.   goto GKKapproach
  3877.  
  3878. GKKrunway:
  3879. play "HASH.VOC"
  3880.     if vartest(w0dir,-1456,31310)
  3881.       setvar(t,8)
  3882.       print "BA 321 taxi to runway 8 and hold short"
  3883.     endif
  3884.     if vartest(w0dir,31310,32767)
  3885.       setvar(t,26)
  3886.       print "BA 321 taxi to runway 26 and hold short"
  3887.     endif
  3888.     if vartest(w0dir,-32767,-1456)
  3889.       setvar(t,26)
  3890.       print "BA 321 taxi to runway 26 and hold short"
  3891.     endif
  3892.   return
  3893.  
  3894. GKK8runway:
  3895.   if com(125.85)
  3896. play "HASH.VOC"
  3897.     print "BA 321 expect vectors for runway 8"
  3898.     setvar(h,7)
  3899.     setvar(n,8)
  3900.     wait(15)
  3901.   endif
  3902.   if radial(18511,13713,259,304)
  3903.     goto GKK1fix
  3904.   endif
  3905.   if radial(18511,13713,304,349)
  3906.     goto GKK2fix
  3907.   endif
  3908.   if radial(18511,13713,349,360)
  3909.     goto GKK3fix
  3910.   endif
  3911.   if radial(18511,13713,0,79)
  3912.     goto GKK3fix
  3913.   endif
  3914.   if radial(18511,13713,79,169)
  3915.     goto GKK4fix
  3916.   endif
  3917.   if radial(18511,13713,169,214)
  3918.     goto GKK5fix
  3919.   endif
  3920.   if radial(18511,13713,214,259)
  3921.     goto GKK6fix
  3922.   endif
  3923.  
  3924. GKK1fix:
  3925.   if cylinder(18521,13626,0,3)
  3926. play "HASH.VOC"
  3927.     print "BA 321 turn to heading 120 and intercept localizer."
  3928.     wait(5)
  3929.     print "Contact London Gatwick tower on 124.25"
  3930.     goto GKK8final
  3931.   endif
  3932.   gosub error
  3933.   gosub GKKaltitude
  3934.   if radial(18521,13626,0,0)
  3935.   endif
  3936.   movevar(d,result)
  3937.   e := d - r
  3938.   if vartest(e,-15,15)
  3939.     goto GKK1fix
  3940.   endif
  3941.   gosub heading
  3942.   gosub GKKcommand
  3943.   goto GKK1fix
  3944.  
  3945. GKK2fix:
  3946.   if cylinder(18585,13603,0,3)
  3947.     goto GKK1fix
  3948.   endif
  3949.   gosub error
  3950.   gosub GKKaltitude
  3951.   if radial(18585,13603,0,0)
  3952.   endif
  3953.   movevar(d,result)
  3954.   e := d - r
  3955.   if vartest(e,-15,15)
  3956.     goto GKK2fix
  3957.   endif
  3958.   gosub heading
  3959.   gosub GKKcommand
  3960.   goto GKK2fix
  3961.  
  3962. GKK3fix:
  3963.   if cylinder(18678,13676,0,5)
  3964.     goto GKK2fix
  3965.   endif
  3966.   gosub error
  3967.   gosub GKKaltitude
  3968.   if radial(18678,13676,0,0)
  3969.   endif
  3970.   movevar(d,result)
  3971.   e := d - r
  3972.   if vartest(e,-15,15)
  3973.     goto GKK3fix
  3974.   endif
  3975.   gosub heading
  3976.   gosub GKKcommand
  3977.   goto GKK3fix
  3978.  
  3979. GKK4fix:
  3980.   if cylinder(18341,13741,0,5)
  3981.     goto GKK5fix
  3982.   endif
  3983.   gosub error
  3984.   gosub GKKaltitude
  3985.   if radial(18341,13741,0,0)
  3986.   endif
  3987.   movevar(d,result)
  3988.   e := d - r
  3989.   if vartest(e,-15,15)
  3990.     goto GKK4fix
  3991.   endif
  3992.   gosub heading
  3993.   gosub GKKcommand
  3994.   goto GKK4fix
  3995.  
  3996. GKK5fix:
  3997.   if cylinder(18400,13639,0,3)
  3998.     goto GKK6fix
  3999.   endif
  4000.   gosub error
  4001.   gosub GKKaltitude
  4002.   if radial(18400,13639,0,0)
  4003.   endif
  4004.   movevar(d,result)
  4005.   e := d - r
  4006.   if vartest(e,-15,15)
  4007.     goto GKK5fix
  4008.   endif
  4009.   gosub heading
  4010.   gosub GKKcommand
  4011.   goto GKK5fix
  4012.  
  4013. GKK6fix:
  4014.   if cylinder(18468,13636,0,3)
  4015. play "HASH.VOC"
  4016.     print "BA 321 turn to heading 30 and intercept localizer."
  4017.     wait(5)
  4018.     print "Contact London Gatwick tower on 124.25"
  4019.     goto GKK8final
  4020.   endif
  4021.   gosub error
  4022.   gosub GKKaltitude
  4023.   if radial(18468,13636,0,0)
  4024.   endif
  4025.   movevar(d,result)
  4026.   e := d - r
  4027.   if vartest(e,-15,15)
  4028.     goto GKK6fix
  4029.   endif
  4030.   gosub heading
  4031.   gosub GKKcommand
  4032.   goto GKK6fix
  4033.  
  4034. GKK8final:
  4035.   if com(124.25)
  4036.     if vartest(p,0,0)
  4037. play "HASH.VOC"
  4038.       print "London Gatwick tower with you."
  4039.       wait(5)
  4040.       setvar(p,1)
  4041.     endif
  4042.     if radial(18511,13713,252,272)
  4043. play "HASH.VOC"
  4044.       print "BA 321 cleared to land runway 8"
  4045.       goto GKKland
  4046.     endif
  4047.   endif
  4048.   goto GKK8final
  4049.  
  4050. GKK26runway:
  4051.   if com(125.85)
  4052. play "HASH.VOC"
  4053.     print "BA 321 expect vectors for runway 26"
  4054.     setvar(h,7)
  4055.     setvar(n,26)
  4056.     wait(15)
  4057.   endif
  4058.   if radial(18511,13713,79,124)
  4059.     goto GKK7fix
  4060.   endif
  4061.   if radial(18511,13713,124,169)
  4062.     goto GKK8fix
  4063.   endif
  4064.   if radial(18511,13713,169,259)
  4065.     goto GKK9fix
  4066.   endif
  4067.   if radial(18511,13713,259,349)
  4068.     goto GKK10fix
  4069.   endif
  4070.   if radial(18511,13713,349,360)
  4071.     goto GKK11fix
  4072.   endif
  4073.   if radial(18511,13713,0,34)
  4074.     goto GKK11fix
  4075.   endif
  4076.   if radial(18511,13713,34,79)
  4077.     goto GKK12fix
  4078.   endif
  4079.  
  4080. GKK7fix:
  4081.   if cylinder(18500,13799,0,3)
  4082. play "HASH.VOC"
  4083.     print "BA 321 turn to heading 300 and intercept localizer."
  4084.     wait(5)
  4085.     print "Contact London Gatwick tower on 124.25"
  4086.     goto GKK26final
  4087.   endif
  4088.   gosub error
  4089.   gosub GKKaltitude
  4090.   if radial(18500,13799,0,0)
  4091.   endif
  4092.   movevar(d,result)
  4093.   e := d - r
  4094.   if vartest(e,-15,15)
  4095.     goto GKK7fix
  4096.   endif
  4097.   gosub heading
  4098.   gosub GKKcommand
  4099.   goto GKK7fix
  4100.  
  4101. GKK8fix:
  4102.   if cylinder(18436,13822,0,3)
  4103.     goto GKK7fix
  4104.   endif
  4105.   gosub error
  4106.   gosub GKKaltitude
  4107.   if radial(18436,13822,0,0)
  4108.   endif
  4109.   movevar(d,result)
  4110.   e := d - r
  4111.   if vartest(e,-15,15)
  4112.     goto GKK8fix
  4113.   endif
  4114.   gosub heading
  4115.   gosub GKKcommand
  4116.   goto GKK8fix
  4117.  
  4118. GKK9fix:
  4119.   if cylinder(18343,13749,0,5)
  4120.     goto GKK8fix
  4121.   endif
  4122.   gosub error
  4123.   gosub GKKaltitude
  4124.   if radial(18343,13749,0,0)
  4125.   endif
  4126.   movevar(d,result)
  4127.   e := d - r
  4128.   if vartest(e,-15,15)
  4129.     goto GKK9fix
  4130.   endif
  4131.   gosub heading
  4132.   gosub GKKcommand
  4133.   goto GKK9fix
  4134.  
  4135. GKK10fix:
  4136.   if cylinder(18680,13684,0,5)
  4137.     goto GKK11fix
  4138.   endif
  4139.   gosub error
  4140.   gosub GKKaltitude
  4141.   if radial(18680,13684,0,0)
  4142.   endif
  4143.   movevar(d,result)
  4144.   e := d - r
  4145.   if vartest(e,-15,15)
  4146.     goto GKK10fix
  4147.   endif
  4148.   gosub heading
  4149.   gosub GKKcommand
  4150.   goto GKK10fix
  4151.  
  4152. GKK11fix:
  4153.   if cylinder(18621,13786,0,3)
  4154.     goto GKK12fix
  4155.   endif
  4156.   gosub error
  4157.   gosub GKKaltitude
  4158.   if radial(18621,13786,0,0)
  4159.   endif
  4160.   movevar(d,result)
  4161.   e := d - r
  4162.   if vartest(e,-15,15)
  4163.     goto GKK11fix
  4164.   endif
  4165.   gosub heading
  4166.   gosub GKKcommand
  4167.   goto GKK11fix
  4168.  
  4169. GKK12fix:
  4170.   if cylinder(18553,13789,0,3)
  4171. play "HASH.VOC"
  4172.     print "BA 321 turn to heading 210 and intercept localizer."
  4173.     wait(5)
  4174.     print "Contact London Gatwick tower on 124.25"
  4175.     goto GKK26final
  4176.   endif
  4177.   gosub error
  4178.   gosub GKKaltitude
  4179.   if radial(18553,13789,0,0)
  4180.   endif
  4181.   movevar(d,result)
  4182.   e := d - r
  4183.   if vartest(e,-15,15)
  4184.     goto GKK12fix
  4185.   endif
  4186.   gosub heading
  4187.   gosub GKKcommand
  4188.   goto GKK12fix
  4189.  
  4190. GKK26final:
  4191.   if com(124.25)
  4192.     if vartest(p,0,0)
  4193. play "HASH.VOC"
  4194.       print "London Gatwick tower with you."
  4195.       wait(5)
  4196.       setvar(p,1)
  4197.     endif
  4198.     if radial(18511,13713,72,92)
  4199. play "HASH.VOC"
  4200.       print "BA 321 cleared to land runway 26"
  4201.       goto GKKland
  4202.     endif
  4203.   endif
  4204.   goto GKK26final
  4205.  
  4206. GKKland:
  4207.   if varmask(ground,1)
  4208.     if com(124.25)
  4209.       print "BA 321 contact ground control on 121.80"
  4210.     endif
  4211.     if com(121.80)
  4212.       goto taxi
  4213.     endif
  4214.   endif
  4215.   goto GKKland
  4216.  
  4217. GKKaltitude:
  4218.   if cylinder(18511,13713,26,35)
  4219.     if vartest(f,0,0)
  4220.     setvar(g,6500)
  4221.       if com(125.85)
  4222. play "HASH.VOC"
  4223.         if altitude(6600,32767)
  4224.           print "BA 321 descend and maintain 6500"
  4225.           setvar(h,4)
  4226.           setvar(n,6500)
  4227.           wait(5)
  4228.         endif
  4229.         if altitude(0,6400)
  4230.           print "BA 321 climb and maintain 6500"
  4231.           setvar(h,3)
  4232.           setvar(n,6500)
  4233.           wait(5)
  4234.         endif
  4235.       endif
  4236.       setvar(f,1)
  4237.     endif
  4238.   endif
  4239.   if cylinder(18511,13713,0,25)
  4240.     if vartest(f,0,1)
  4241.     setvar(g,3000)
  4242.       if com(125.85)
  4243. play "HASH.VOC"
  4244.         if altitude(3100,32767)
  4245.           print "BA 321 descend and maintain 3000"
  4246.           setvar(h,4)
  4247.           setvar(n,3000)
  4248.           wait(5)
  4249.         endif
  4250.         if altitude(0,2900)
  4251.           print "BA 321 climb and maintain 3000"
  4252.           setvar(h,3)
  4253.           setvar(n,3000)
  4254.           wait(5)
  4255.         endif
  4256.       endif
  4257.       setvar(f,2)
  4258.     endif
  4259.   endif
  4260.   return
  4261.  
  4262. GKKcommand:
  4263.   s := a - result
  4264.   if vartest(s,-360,0)
  4265.     addvar(s,360)
  4266.   endif
  4267.   m := l - a
  4268.   if vartest(m,0,0)
  4269.     return
  4270.   endif
  4271.   if com(125.85)
  4272.     movevar(n,a)
  4273. play "HASH.VOC"
  4274.     if vartest(s,0,180)
  4275.       printvar(a,"BA 321 turn right heading ")
  4276.       setvar(h,2)
  4277.     endif
  4278.     if vartest(s,180,360)
  4279.       printvar(a,"BA 321 turn left heading ")
  4280.       setvar(h,1)
  4281.     endif
  4282.   endif
  4283.   movevar(l,a)
  4284.   wait(10)
  4285.   return
  4286.  
  4287. GKKdeparture:
  4288.   if altitude(0,0)
  4289.   endif
  4290.   u := result / b / b * b * b
  4291.   addvar(u,4000)
  4292.   print "Contact clearance delivery on 121.95 to begin flight."
  4293.   if com(121.95)
  4294. play "HASH.VOC"
  4295.     print "BA 321 cleared for IFR flight via filed routing."
  4296.     wait(4)
  4297.     printvar(u,"Climb and maintain ")
  4298.     wait(3)
  4299.     printvar(k,"Within 10 minutes of departure expect ")
  4300.     wait(3)
  4301.     print "Departure frequency is 125.85"
  4302.     wait(3)
  4303.     print "Contact ground control on 121.80 for taxi instructions."
  4304.     goto GKKground
  4305.   endif
  4306.   goto GKKdeparture
  4307. GKKground:
  4308.   if com(121.80)
  4309.     gosub GKKrunway
  4310.     wait(5)
  4311.     goto GKKhold
  4312.   endif
  4313.   goto GKKground
  4314.  
  4315. GKKhold:
  4316.   if groundspeed(0,0)
  4317.     if com(124.25)
  4318. play "HASH.VOC"
  4319.       printvar(t,"BA 321 cleared for takeoff on runway ")
  4320.       wait(5)
  4321.       goto GKKtakeoff
  4322.     endif
  4323.   endif
  4324.   goto GKKhold
  4325.  
  4326. GKKtakeoff:
  4327.   if altagl(500,32767)
  4328.     if com(124.25)
  4329. play "HASH.VOC"
  4330.       print "Contact Gatwick departure on 125.85"
  4331.       setvar(f,0)
  4332.       wait(3)
  4333.       goto GKKclimbout
  4334.     endif
  4335.   endif
  4336.   goto GKKtakeoff
  4337.  
  4338. GKKclimbout:
  4339.   setvar(z,0)
  4340.   if com(125.85)
  4341.     setvar(z,1)
  4342.     if vartest(f,0,0)
  4343.       wait(3)
  4344. play "HASH.VOC"
  4345.       print "BA 321 radar contact"
  4346.       wait(5)
  4347.       addvar(f,1)
  4348.     endif
  4349.   endif
  4350.   if cylinder(18511,13713,0,0)
  4351.   endif
  4352.   movevar(r,result)
  4353.   gosub vectoring
  4354.   if vartest(f,3,3)
  4355.     setvar(x,0)
  4356.     setvar(y,0)
  4357.     return
  4358.   endif
  4359.   goto GKKclimbout
  4360.  
  4361. dest6:
  4362.   print "A - Bristol (GGD)   B - Next   / - Main menu"
  4363.   if key("a")
  4364.     if altagl(0,100)
  4365.       print "Begin your flight to Bristol"
  4366.       wait(2)
  4367.       gosub departcheck
  4368.       wait(10)
  4369.     endif
  4370. play "HASH.VOC"
  4371.     print "BA 321 resume own navigation"
  4372.     wait(10)
  4373.     goto GGDgeneric
  4374.   endif
  4375.   if key("b")
  4376.     goto dest7
  4377.   endif
  4378.   if key("/")
  4379.     goto flightplan
  4380.   endif
  4381.   goto dest6
  4382.  
  4383. GGDgeneric:
  4384.   gosub centercheck
  4385.   gosub GGDbegin
  4386.   goto GGDgeneric
  4387.  
  4388. GGDbegin:
  4389.   if cylinder(18704,13043,0,40)
  4390.     gosub appinit
  4391. play "HASH.VOC"
  4392.     print "BA 321 contact Bristol approach on 127.75"
  4393.     goto GGDradio
  4394.   endif
  4395.   return
  4396.  
  4397. GGDradio:
  4398.   if altagl(1500,32767)
  4399.     if com(127.75)
  4400.       wait(3)
  4401. play "HASH.VOC"
  4402.       print "BA 321 radar contact"
  4403.       goto GGDapproach
  4404.     endif
  4405.   endif
  4406.   goto GGDradio
  4407.  
  4408. GGDapproach:
  4409.   if cylinder(18704,13043,0,35)
  4410.     if vartest(w0dir,546,32767)
  4411.       goto GGD9runway
  4412.     endif
  4413.     if vartest(w0dir,-32767,-32221)
  4414.       goto GGD9runway
  4415.     endif
  4416.     if vartest(w0dir,-32221,546)
  4417.       goto GGD27runway
  4418.     endif
  4419.   endif
  4420.   gosub error
  4421.   goto GGDapproach
  4422.  
  4423. GGDrunway:
  4424. play "HASH.VOC"
  4425.     if vartest(w0dir,546,32767)
  4426.       setvar(t,9)
  4427.       print "Local winds are favoring runway 9"
  4428.     endif
  4429.     if vartest(w0dir,-32767,-32221)
  4430.       setvar(t,9)
  4431.       print "Local winds are favoring runway 9"
  4432.     endif
  4433.     if vartest(w0dir,-32221,546)
  4434.       setvar(t,27)
  4435.       print "Local winds are favoring runway 27"
  4436.     endif
  4437.   return
  4438.  
  4439. GGD9runway:
  4440.   if com(127.75)
  4441. play "HASH.VOC"
  4442.     print "BA 321 expect vectors for runway 9"
  4443.     setvar(h,7)
  4444.     setvar(n,9)
  4445.     wait(15)
  4446.   endif
  4447.   if radial(18704,13043,270,315)
  4448.     goto GGD1fix
  4449.   endif
  4450.   if radial(18704,13043,315,360)
  4451.     goto GGD2fix
  4452.   endif
  4453.   if radial(18704,13043,360,360)
  4454.     goto GGD3fix
  4455.   endif
  4456.   if radial(18704,13043,0,90)
  4457.     goto GGD3fix
  4458.   endif
  4459.   if radial(18704,13043,90,180)
  4460.     goto GGD4fix
  4461.   endif
  4462.   if radial(18704,13043,180,225)
  4463.     goto GGD5fix
  4464.   endif
  4465.   if radial(18704,13043,225,270)
  4466.     goto GGD6fix
  4467.   endif
  4468.  
  4469. GGD1fix:
  4470.   if cylinder(18730,12959,0,3)
  4471. play "HASH.VOC"
  4472.     print "BA 321 turn to heading 130 and intercept localizer."
  4473.     wait(5)
  4474.     print "Contact Bristol tower on 133.85"
  4475.     goto GGD9final
  4476.   endif
  4477.   gosub error
  4478.   gosub GGDaltitude
  4479.   if radial(18730,12959,0,0)
  4480.   endif
  4481.   movevar(d,result)
  4482.   e := d - r
  4483.   if vartest(e,-15,15)
  4484.     goto GGD1fix
  4485.   endif
  4486.   gosub heading
  4487.   gosub GGDcommand
  4488.   goto GGD1fix
  4489.  
  4490. GGD2fix:
  4491.   if cylinder(18798,12949,0,3)
  4492.     goto GGD1fix
  4493.   endif
  4494.   gosub error
  4495.   gosub GGDaltitude
  4496.   if radial(18798,12949,0,0)
  4497.   endif
  4498.   movevar(d,result)
  4499.   e := d - r
  4500.   if vartest(e,-15,15)
  4501.     goto GGD2fix
  4502.   endif
  4503.   gosub heading
  4504.   gosub GGDcommand
  4505.   goto GGD2fix
  4506.  
  4507. GGD3fix:
  4508.   if cylinder(18875,13038,0,5)
  4509.     goto GGD2fix
  4510.   endif
  4511.   gosub error
  4512.   gosub GGDaltitude
  4513.   if radial(18875,13038,0,0)
  4514.   endif
  4515.   movevar(d,result)
  4516.   e := d - r
  4517.   if vartest(e,-15,15)
  4518.     goto GGD3fix
  4519.   endif
  4520.   gosub heading
  4521.   gosub GGDcommand
  4522.   goto GGD3fix
  4523.  
  4524. GGD4fix:
  4525.   if cylinder(18532,13038,0,5)
  4526.     goto GGD5fix
  4527.   endif
  4528.   gosub error
  4529.   gosub GGDaltitude
  4530.   if radial(18532,13038,0,0)
  4531.   endif
  4532.   movevar(d,result)
  4533.   e := d - r
  4534.   if vartest(e,-15,15)
  4535.     goto GGD4fix
  4536.   endif
  4537.   gosub heading
  4538.   gosub GGDcommand
  4539.   goto GGD4fix
  4540.  
  4541. GGD5fix:
  4542.   if cylinder(18609,12949,0,3)
  4543.     goto GGD6fix
  4544.   endif
  4545.   gosub error
  4546.   gosub GGDaltitude
  4547.   if radial(18609,12949,0,0)
  4548.   endif
  4549.   movevar(d,result)
  4550.   e := d - r
  4551.   if vartest(e,-15,15)
  4552.     goto GGD5fix
  4553.   endif
  4554.   gosub heading
  4555.   gosub GGDcommand
  4556.   goto GGD5fix
  4557.  
  4558. GGD6fix:
  4559.   if cylinder(18677,12959,0,3)
  4560. play "HASH.VOC"
  4561.     print "BA 321 turn to heading 40 and intercept localizer."
  4562.     wait(5)
  4563.     print "Contact Bristol tower on 133.85"
  4564.     goto GGD9final
  4565.   endif
  4566.   gosub error
  4567.   gosub GGDaltitude
  4568.   if radial(18677,12959,0,0)
  4569.   endif
  4570.   movevar(d,result)
  4571.   e := d - r
  4572.   if vartest(e,-15,15)
  4573.     goto GGD6fix
  4574.   endif
  4575.   gosub heading
  4576.   gosub GGDcommand
  4577.   goto GGD6fix
  4578.  
  4579. GGD9final:
  4580.   if com(133.85)
  4581.     if vartest(p,0,0)
  4582. play "HASH.VOC"
  4583.       print "Bristol tower with you."
  4584.       wait(5)
  4585.       setvar(p,1)
  4586.     endif
  4587.     if radial(18704,13043,263,283)
  4588. play "HASH.VOC"
  4589.       print "BA 321 cleared to land runway 9"
  4590.       goto GGDland
  4591.     endif
  4592.   endif
  4593.   goto GGD9final
  4594.  
  4595. GGD27runway:
  4596.   if com(127.75)
  4597. play "HASH.VOC"
  4598.     print "BA 321 expect vectors for runway 27"
  4599.     setvar(h,7)
  4600.     setvar(n,27)
  4601.     wait(15)
  4602.   endif
  4603.   if radial(18704,13043,90,135)
  4604.     goto GGD7fix
  4605.   endif
  4606.   if radial(18704,13043,135,180)
  4607.     goto GGD8fix
  4608.   endif
  4609.   if radial(18704,13043,180,270)
  4610.     goto GGD9fix
  4611.   endif
  4612.   if radial(18704,13043,270,360)
  4613.     goto GGD10fix
  4614.   endif
  4615.   if radial(18704,13043,360,360)
  4616.     goto GGD11fix
  4617.   endif
  4618.   if radial(18704,13043,0,45)
  4619.     goto GGD11fix
  4620.   endif
  4621.   if radial(18704,13043,45,90)
  4622.     goto GGD12fix
  4623.   endif
  4624.  
  4625. GGD7fix:
  4626.   if cylinder(18677,13126,0,3)
  4627. play "HASH.VOC"
  4628.     print "BA 321 turn to heading 310 and intercept localizer."
  4629.     wait(5)
  4630.     print "Contact Bristol tower on 133.85"
  4631.     goto GGD27final
  4632.   endif
  4633.   gosub error
  4634.   gosub GGDaltitude
  4635.   if radial(18677,13126,0,0)
  4636.   endif
  4637.   movevar(d,result)
  4638.   e := d - r
  4639.   if vartest(e,-15,15)
  4640.     goto GGD7fix
  4641.   endif
  4642.   gosub heading
  4643.   gosub GGDcommand
  4644.   goto GGD7fix
  4645.  
  4646. GGD8fix:
  4647.   if cylinder(18609,13136,0,3)
  4648.     goto GGD7fix
  4649.   endif
  4650.   gosub error
  4651.   gosub GGDaltitude
  4652.   if radial(18609,13136,0,0)
  4653.   endif
  4654.   movevar(d,result)
  4655.   e := d - r
  4656.   if vartest(e,-15,15)
  4657.     goto GGD8fix
  4658.   endif
  4659.   gosub heading
  4660.   gosub GGDcommand
  4661.   goto GGD8fix
  4662.  
  4663. GGD9fix:
  4664.   if cylinder(18532,13047,0,5)
  4665.     goto GGD8fix
  4666.   endif
  4667.   gosub error
  4668.   gosub GGDaltitude
  4669.   if radial(18532,13047,0,0)
  4670.   endif
  4671.   movevar(d,result)
  4672.   e := d - r
  4673.   if vartest(e,-15,15)
  4674.     goto GGD9fix
  4675.   endif
  4676.   gosub heading
  4677.   gosub GGDcommand
  4678.   goto GGD9fix
  4679.  
  4680. GGD10fix:
  4681.   if cylinder(18875,13047,0,5)
  4682.     goto GGD11fix
  4683.   endif
  4684.   gosub error
  4685.   gosub GGDaltitude
  4686.   if radial(18875,13047,0,0)
  4687.   endif
  4688.   movevar(d,result)
  4689.   e := d - r
  4690.   if vartest(e,-15,15)
  4691.     goto GGD10fix
  4692.   endif
  4693.   gosub heading
  4694.   gosub GGDcommand
  4695.   goto GGD10fix
  4696.  
  4697. GGD11fix:
  4698.   if cylinder(18798,13136,0,3)
  4699.     goto GGD12fix
  4700.   endif
  4701.   gosub error
  4702.   gosub GGDaltitude
  4703.   if radial(18798,13136,0,0)
  4704.   endif
  4705.   movevar(d,result)
  4706.   e := d - r
  4707.   if vartest(e,-15,15)
  4708.     goto GGD11fix
  4709.   endif
  4710.   gosub heading
  4711.   gosub GGDcommand
  4712.   goto GGD11fix
  4713.  
  4714. GGD12fix:
  4715.   if cylinder(18730,13126,0,3)
  4716. play "HASH.VOC"
  4717.     print "BA 321 turn to heading 220 and intercept localizer."
  4718.     wait(5)
  4719.     print "Contact Bristol tower on 133.85"
  4720.     goto GGD27final
  4721.   endif
  4722.   gosub error
  4723.   gosub GGDaltitude
  4724.   if radial(18730,13126,0,0)
  4725.   endif
  4726.   movevar(d,result)
  4727.   e := d - r
  4728.   if vartest(e,-15,15)
  4729.     goto GGD12fix
  4730.   endif
  4731.   gosub heading
  4732.   gosub GGDcommand
  4733.   goto GGD12fix
  4734.  
  4735. GGD27final:
  4736.   if com(133.85)
  4737.     if vartest(p,0,0)
  4738. play "HASH.VOC"
  4739.       print "Bristol tower with you."
  4740.       wait(5)
  4741.       setvar(p,1)
  4742.     endif
  4743.     if radial(18704,13043,83,103)
  4744. play "HASH.VOC"
  4745.       print "BA 321 cleared to land runway 27"
  4746.       goto GGDland
  4747.     endif
  4748.   endif
  4749.   goto GGD27final
  4750.  
  4751. GGDland:
  4752.   if varmask(ground,1)
  4753.     print "(c) 1993 - John Mechalas"
  4754.     wait(3)
  4755.     goto stop
  4756.   endif
  4757.   goto GGDland
  4758.  
  4759. GGDaltitude:
  4760.   if cylinder(18704,13043,26,35)
  4761.     if vartest(f,0,0)
  4762.     setvar(g,3000)
  4763.       if com(127.75)
  4764. play "HASH.VOC"
  4765.         if altitude(3100,32767)
  4766.           print "BA 321 descend and maintain 3000"
  4767.           setvar(h,4)
  4768.           setvar(n,3000)
  4769.           wait(5)
  4770.         endif
  4771.         if altitude(0,2900)
  4772.           print "BA 321 climb and maintain 3000"
  4773.           setvar(h,3)
  4774.           setvar(n,3000)
  4775.           wait(5)
  4776.         endif
  4777.       endif
  4778.       setvar(f,1)
  4779.     endif
  4780.   endif
  4781.   if cylinder(18704,13043,0,25)
  4782.     if vartest(f,0,1)
  4783.     setvar(g,2000)
  4784.       if com(127.75)
  4785. play "HASH.VOC"
  4786.         if altitude(2100,32767)
  4787.           print "BA 321 descend and maintain 2000"
  4788.           setvar(h,4)
  4789.           setvar(n,2000)
  4790.           wait(5)
  4791.         endif
  4792.         if altitude(0,1900)
  4793.           print "BA 321 climb and maintain 2000"
  4794.           setvar(h,3)
  4795.           setvar(n,2000)
  4796.           wait(5)
  4797.         endif
  4798.       endif
  4799.       setvar(f,2)
  4800.     endif
  4801.   endif
  4802.   return
  4803.  
  4804. GGDcommand:
  4805.   s := a - result
  4806.   if vartest(s,-360,0)
  4807.     addvar(s,360)
  4808.   endif
  4809.   m := l - a
  4810.   if vartest(m,0,0)
  4811.     return
  4812.   endif
  4813.   if com(127.75)
  4814.     movevar(n,a)
  4815. play "HASH.VOC"
  4816.     if vartest(s,0,180)
  4817.       printvar(a,"BA 321 turn right heading ")
  4818.       setvar(h,2)
  4819.     endif
  4820.     if vartest(s,180,360)
  4821.       printvar(a,"BA 321 turn left heading ")
  4822.       setvar(h,1)
  4823.     endif
  4824.   endif
  4825.   movevar(l,a)
  4826.   wait(10)
  4827.   return
  4828.  
  4829. GGDdeparture:
  4830.   if altitude(0,0)
  4831.   endif
  4832.   u := result / b / b * b * b
  4833.   addvar(u,4000)
  4834.   print "Taxi to departing runway and contact tower on 133.85 to begin flight."
  4835.  
  4836. GGDground:
  4837.   if com(133.85)
  4838.     gosub GGDrunway
  4839.     wait(5)
  4840.     goto GGDhold
  4841.   endif
  4842.   goto GGDground
  4843.  
  4844. GGDhold:
  4845.   if groundspeed(0,0)
  4846.     if com(133.85)
  4847. play "HASH.VOC"
  4848.       printvar(t,"BA 321 cleared for takeoff on runway ")
  4849.       wait(5)
  4850.       goto GGDtakeoff
  4851.     endif
  4852.   endif
  4853.   goto GGDhold
  4854.  
  4855. GGDtakeoff:
  4856.   if altagl(500,32767)
  4857.     if com(133.85)
  4858. play "HASH.VOC"
  4859.       print "Contact Bristol departure on 127.75"
  4860.       setvar(f,0)
  4861.       wait(3)
  4862.       goto GGDclimbout
  4863.     endif
  4864.   endif
  4865.   goto GGDtakeoff
  4866.  
  4867. GGDclimbout:
  4868.   setvar(z,0)
  4869.   if com(127.75)
  4870.     setvar(z,1)
  4871.     if vartest(f,0,0)
  4872.       wait(3)
  4873. play "HASH.VOC"
  4874.       print "BA 321 radar contact"
  4875.       wait(5)
  4876.       addvar(f,1)
  4877.     endif
  4878.   endif
  4879.   if cylinder(18704,13043,0,0)
  4880.   endif
  4881.   movevar(r,result)
  4882.   gosub vectoring
  4883.   if vartest(f,3,3)
  4884.     setvar(x,0)
  4885.     setvar(y,0)
  4886.     return
  4887.   endif
  4888.   goto GGDclimbout
  4889.  
  4890. vectoring:
  4891.   if vartest(r,0,5)
  4892.     if vartest(f,1,1)
  4893.       movevar(g,u)
  4894.       addvar(f,1)
  4895.       if vartest(z,1,1)
  4896. play "HASH.VOC"
  4897.         printvar(u,"BA 321 climb and maintain ")
  4898.         setvar(h,3)
  4899.         movevar(n,u)
  4900.         wait(3)
  4901.       endif
  4902.     endif
  4903.   endif
  4904.   if vartest(r,2,10)
  4905.     if vartest(d,0,0)
  4906.       if vartest(z,1,1)
  4907. play "HASH.VOC"
  4908.         print "BA 321 proceed direct to first navigation fix"
  4909.         addvar(d,1)
  4910.       endif
  4911.     endif
  4912.   endif
  4913.   if vartest(r,10,20)
  4914.     if vartest(f,2,2)
  4915.       movevar(g,k)
  4916.       addvar(f,1)
  4917.       if vartest(z,1,1)
  4918. play "HASH.VOC"
  4919.         printvar(k,"BA 321 climb and maintain ")
  4920.         setvar(h,3)
  4921.         movevar(n,k)
  4922.         wait(7)
  4923.       endif
  4924.     endif
  4925.   endif
  4926.   gosub error
  4927.   return
  4928.  
  4929. dest7:
  4930.   goto dest1
  4931.  
  4932. taxi:
  4933.   print "BA 321 taxi to the ramp.  Thank you for flying ATC Net."
  4934.   wait(3)
  4935.   print "ATC Net is (c) 1993 by John Mechalas"
  4936.   wait(3)
  4937.   print "Reset the adventure to fly again"
  4938.  
  4939. stop:
  4940.   goto stop
  4941.  
  4942. heading:
  4943.   a := d / u * u
  4944.   addvar(a,-180)
  4945. adjust:
  4946.   if vartest(a,-32768,0)
  4947.     addvar(a,360)
  4948.     goto adjust
  4949.   endif
  4950.   if vartest(a,361,32767)
  4951.     addvar(a,-360)
  4952.     goto adjust
  4953.   endif
  4954.   if heading(0,0)
  4955.   endif
  4956.   return
  4957.  
  4958. error:
  4959.   if key("w")
  4960.     if course()
  4961.     endif
  4962.     printvar(result,"Course is ")
  4963.     wait(1)
  4964.   endif
  4965.   if key("/")
  4966.     if vartest(h,1,1)
  4967.       printvar(n,"BA 321 turn left heading ")
  4968.     endif
  4969.     if vartest(h,2,2)
  4970.       printvar(n,"BA 321 turn right heading ")
  4971.     endif
  4972.     if vartest(h,3,3)
  4973.       printvar(n,"BA 321 climb and maintain ")
  4974.     endif
  4975.     if vartest(h,4,4)
  4976.       printvar(n,"BA 321 descend and maintain ")
  4977.     endif
  4978.     if vartest(h,5,5)
  4979.       printvar(n,"BA 321 check altimeter and maintain ")
  4980.     endif
  4981.     if vartest(h,6,6)
  4982.       print "BA 321 reduce speed to 250 knots"
  4983.     endif
  4984.     if vartest(h,7,7)
  4985.       printvar(n,"BA 321 expect vectors for runway ")
  4986.     endif
  4987.   endif
  4988.   if course(0,0)
  4989.   endif
  4990.   r := result - c
  4991.   if vartest(r,-360,0)
  4992.     addvar(r,360)
  4993.   endif
  4994.   if airspeed(270,10000)
  4995.     if altitude(0,9800)
  4996.       if vartest(x,15,32767)
  4997. play "HASH.VOC"
  4998.         print "BA 321 reduce speed to 250 knots."
  4999.         setvar(h,6)
  5000.         setvar(x,0)
  5001.       endif
  5002.       addvar(x,1)
  5003.     endif
  5004.   endif
  5005.   if vartest(f,0,2)
  5006.     if altitude(0,0)
  5007.     endif
  5008.     o := result - g
  5009.     if vartest(o,300,32767)
  5010.       if vartest(vely,100,32767)
  5011.         if vartest(y,10,32767)
  5012. play "HASH.VOC"
  5013.           printvar(g,"BA 321 check altimeter and maintain ")
  5014.           setvar(h,5)
  5015.           movevar(n,g)
  5016.           setvar(y,0)
  5017.         endif
  5018.         addvar(y,1)
  5019.       endif
  5020.     endif
  5021.     if vartest(o,-32767,-300)
  5022.       if vartest(vely,-32767,-100)
  5023.         if vartest(y,10,32767)
  5024. play "HASH.VOC"
  5025.           printvar(g,"BA 321 check altimeter and maintain ")
  5026.           setvar(h,5)
  5027.           movevar(n,g)
  5028.           setvar(y,0)
  5029.         endif
  5030.         addvar(y,1)
  5031.       endif
  5032.     endif
  5033.   endif
  5034.   return
  5035.  
  5036. newaltitude:
  5037.   if altitude(0,0)
  5038.   endif
  5039.   e := g - result
  5040.   if vartest(z,1,1)
  5041. play "HASH.VOC"
  5042.     if vartest(e,-32767,-1)
  5043.       printvar(g,"BA 321 descend and maintain ")
  5044.       movevar(n,g)
  5045.       setvar(h,4)
  5046.     endif
  5047.     if vartest(e,1,32767)
  5048.       printvar(g,"BA 321 climb and maintain ")
  5049.       movevar(n,g)
  5050.       setvar(h,3)
  5051.     endif
  5052.   endif
  5053.   wait(5)
  5054.   return
  5055.  
  5056. departcheck:
  5057.   if cylinder(18704,13043,0,2)
  5058.     goto GGDdeparture
  5059.   endif
  5060.   if cylinder(18511,13713,0,2)
  5061.     goto GKKdeparture
  5062.   endif
  5063.   if cylinder(19127,13369,0,2)
  5064.     goto GBBdeparture
  5065.   endif
  5066.   if cylinder(18660,13656,0,2)
  5067.     goto GLLdeparture
  5068.   endif
  5069.   if cylinder(17749,13049,0,2)
  5070.     goto GJJdeparture
  5071.   endif
  5072.   if cylinder(18455,12812,0,2)
  5073.     goto GTEdeparture
  5074.   endif
  5075.   if altagl(0,1000)
  5076.     goto departcheck
  5077.   endif
  5078.   setvar(z,1)
  5079.   return
  5080.  
  5081.  
  5082. EOF
  5083.