Source Code

This is the source-code for the Apollo 9 Command Module's Guidance Computer. These files were derived originally from the scan from MIT's Dibner Institute's now-discontinued website titled "History of Recent Science and Technology", which in turn was originally created by Gary Neff, though his high-quality scans were unfortunately reduced in legibility when presented online. The markings on the front of the printout imply that it was the original AGC developer Norm Brodeur's copy. A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original AGC developer Fred Martin. The source code was transcribed from those images by Ron Burkey. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

023918,000002:                                                                                                  ## Copyright:   Public domain.
023919,000003:                                                                                                  ## Filename:    TPI_SEARCH.agc
023920,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
023921,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
023922,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
023923,000007:                                                                                                  ## Assembler:   yaYUL
023924,000008:                                                                                                  ## Reference:   pp. 541-551.
023925,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
023926,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
023927,000011:                                                                                                  ## Mod history: 08/14/04 RSB.   Began transcribing.
023928,000012:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
023929,000013:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
023930,000014:                                                                                                  ##                              numbers in 1701.pdf.
023931,000015:                                                                                                  ##              2017-01-20 RSB  Cross-diff'd comment text (not whitespace)
023932,000016:                                                                                                  ##                              vs the already-proofed corresponding Colossus
023933,000017:                                                                                                  ##                              237 and Comanche 55 source-code files
023934,000018:                                                                                                  ##                              and corrected errors found.
023935,000019:                                                                                                  ##              2017-03-09 RSB  Fixed VNP00H to VNPOOH.
023936,000020:                                                                                                  ##
023937,000021:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
023938,000022:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
023939,000023:                                                                                                  ## document read, in part:
023940,000024:                                                                                                  ##
023941,000025:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
023942,000026:                                                                                                  ##      2021111-041.  October 28, 1968.  
023943,000027:                                                                                                  ##
023944,000028:                                                                                                  ##      This AGC program shall also be referred to as
023945,000029:                                                                                                  ##                              Colossus 1A
023946,000030:                                                                                                  ##
023947,000031:                                                                                                  ##      Prepared by
023948,000032:                                                                                                  ##                      Massachusetts Institute of Technology
023949,000033:                                                                                                  ##                      75 Cambridge Parkway
023950,000034:                                                                                                  ##                      Cambridge, Massachusetts
023951,000035:                                                                                                  ##      under NASA contract NAS 9-4065.
023952,000036:                                                                                                  ##
023953,000037:                                                                                                  ## Refer directly to the online document mentioned above for further information.
023954,000038:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
023955,000039:                                                                                                  ##
023956,000040:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
023957,000041:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
023958,000042:                                                                                                  ## source file, and then is proofed to incorporate any changes.
023959,000043: 

Page 541

023961,000045:                                                                                                  #  PROGRAM DESCRIPTION S17.1 AND S17.2
023962,000046: 
023963,000047:                                                                                                  #  FUNCTIONAL DESCRIPTION
023964,000048: 
023965,000049:                                                                                                  #  THE TPI SEARCH ROUTINE DETERMINES THE MINIMUM TOTAL VELOCITY TRANSFER TRAJECTORY FROM A GIVEN TPI
023966,000050:                                                                                                  #  MANEUVER TIME WITHIN THE CONSTRAINT OF A SAFE PERICENTER.  THIS VELOCITY IS THE SUM OF THE IMPULSIVE VELOCITIES
023967,000051:                                                                                                  #  FOR THE TPI AND TPF MANEUVERS.
023968,000052: 
023969,000053:                                                                                                  #  THE S17.1 ROUTINE EXTRAPOLATES THE STATE VECTORS OF BOTH VEHICLES TO THE TPI TIME AND COMPUTES THE
023970,000054:                                                                                                  #  RELATIVE PHASE ANGLE BETWEEN THE VEHICLES, THE ALTITUDE DIFFERENCE (I.E. THE MAGNITUDE DIFFERENCE OF THE 
023971,000055:                                                                                                  #  POSITION VECTORS) AND SELECTS A SEARCH SECTOR BASED ON THE SIGN OF THE ALTITUDE DIFFERENCE.
023972,000056: 
023973,000057:                                                                                                  #  THE S17.2 ROUTINE FURTHER DEFINES THE SEARCH SECTOR BY COMPUTING ANGULAR LIMITS AND USES THE TIME THETA
023974,000058:                                                                                                  #  SUBROUTINE TO COMPUTE THE SEARCH START AND END TIMES.  THE SEARCH IS THEN MADE IN AN ITERATIVE LOOP USING THE
023975,000059:                                                                                                  #  LAMBERT SUBROUTINE TO COMPUTE THE VELOCITIES REQUIRED AT TPI TIME AND AT TPF TIME.  EXIT FROM THE SEARCH LOOP
023976,000060:                                                                                                  #  IS MADE WHEN SOLUTION CRITERIA ARE MET (NORMAL EXIT) OR AS SOON AS IT IS EVIDENT THAT NO SOLUTION EXISTS IN
023977,000061:                                                                                                  #  THE SECTOR SEARCHED.
023978,000062: 
023979,000063:                                                                                                  #  CALLING SEQUENCE
023980,000064: 
023981,000065:                                                                                                  #        BOTH ROUTINES ARE CALLED IN INTERPRETIVE CODE AND RETURN VIA QPRET.  S17.1 HAS ONLY A NORMAL EXIT.
023982,000066:                                                                                                  #        S17.2 RETURNS VIA QPRET FOR NORMAL EXIT AND TO ALARUMS FOR ERROR EXIT.
023983,000067: 
023984,000068:                                                                                                  #  SUBROUTINES CALLED
023985,000069: 
023986,000070:                                                                                                  #        CSMCONIC
023987,000071:                                                                                                  #        LEMCONIC
023988,000072:                                                                                                  #        TIMETHET
023989,000073:                                                                                                  #        INITVEL
023990,000074: 
023991,000075: 36,2000                                           BANK     36                                    
023992,000076: 36,2000                                           SETLOC   P17S                                  
023993,000077: 36,2000                                           BANK                                           
023994,000078: 
023995,000079: 36,2000                                           COUNT    36/TPI                                
023996,000080: 
023997,000081: 36,2000  E7,1537                                  EBANK=   RACT3                                 
023998,000082: 
023999,000083:                                                                                                  #  **** TEMPORARY ****
024000,000084: 
024001,000085: 36,2000           00004 31566  HPE                2DEC     157420.0   B-29                       #  EARTH'S MIN. PERICENTER ALTITUDE 85 N.M.
024002,000086: 
024003,000087: 36,2002           00000 12326  HPL                2DEC     10668.0213 B-29                       #  MOON:S MIN. PERICENTER ALTITUDE 35000 FT
024004,000088: 
024005,000089: 36,2004           00002 16100  CDSEC              2DEC     40000      B-28                       
024006,000090: 
024007,000091: 36,2006           00000 35230  CLSEC              2DEC     15000      B-28                       
024008,000092: 
024009,000093: 36,2010           12137 06033  PIINVERS           2DEC     .3183098862                            
024010,000094: 
024011,000095: 36,2012           06161 30707  SEC1THET           2DEC     .1944444444                            
024012,000096: 

Page 542

024014,000098: 36,2014           35252 25253  SEC2THET           2DEC     .9166666667                            
024015,000099: 
024016,000100: 36,2016           67777 77777  MANYFEET           2DEC     -1.0       B-2                        
024017,000101: 
024018,000102: 36,2020           00000 30760  LIMVEL             2DEC     .6096      E-2        B-7             #  2FPS
024019,000103: 
024020,000104: 36,2022           00000 00114  DFTMOON            2DEC     .1524      E3         B-29            #  500 FEET
024021,000105: 
024022,000106: 36,2024           00040 30447  DP-.002            2DEC     0.002                                 
024023,000107: 
024024,000108: 36,2026           71220        S17.1              STQ      DLOAD                                 
024025,000109: 36,2027           01340                                    NORMEX                                
024026,000110: 36,2030           03663                                    TTPI                                  
024027,000111: 36,2031           34041                           STCALL   TDEC1                                 #  ADVANCE PASSIVE VEHICLE TO TPI
024028,000112: 36,2032           27057                                    LEMCONIC                              
024029,000113: 36,2033           77624                           CALL                                           
024030,000114: 36,2034           45372                                    LEMSTORE                              
024031,000115: 36,2035           77745                           DLOAD                                          
024032,000116: 36,2036           03663                                    TTPI                                  
024033,000117: 36,2037           34041                           STCALL   TDEC1                                 #  ADVANCE ACTIVE VEHICLE TO TPI
024034,000118: 36,2040           27045                                    CSMCONIC                              
024035,000119: 36,2041           77624                           CALL                                           
024036,000120: 36,2042           45402                                    CSMSTORE                              
024037,000121: 36,2043           77775                           VLOAD                                          
024038,000122: 36,2044           03540                                    RACT3                                 
024039,000123: 36,2045           63246                           ABVAL    PDVL                                  #  /RA/ 0D                       PL 2D
024040,000124: 36,2046           03554                                    RPASS3                                
024041,000125: 36,2047           65256                           UNIT     PDDL                                  #  UNIT RP 0D                    PL 6D
024042,000126: 36,2050           43021                           BDSU     SET                                   
024043,000127: 36,2051           00045                                    36D                                   #  /RP/ -/RA/
024044,000128: 36,2052           00076                                    KFLAG                                 #  OFF = +
024045,000129: 36,2053           43040                           BMN      CLEAR                                 
024046,000130: 36,2054           74056                                    +2                                    
024047,000131: 36,2055           00276                                    KFLAG                                 #  ON = -
024048,000132: 36,2056           27754                           STOVL    DELHITE                               
024049,000133: 36,2057           00001                                    0D                                    
024050,000134: 36,2060           53435                           VXV      UNIT                                  
024051,000135: 36,2061           03562                                    VPASS3                                
024052,000136: 36,2062           27646                           STOVL    E2                                    #  ALMOST IT SAVE FOR 17.2
024053,000137: 36,2063           03540                                    RACT3                                 
024054,000138: 36,2064           46206                           PUSH     VPROJ                                 
024055,000139: 36,2065           03646                                    E2                                    
024056,000140: 36,2066           51352                           VSL2     BVSU                                  #  RPA
024057,000141: 36,2067           50256                           UNIT     DOT                                   
024058,000142: 36,2070           00001                                    0D                                    
024059,000143: 36,2071           65552                           SL1      ACOS                                  
024060,000144: 36,2072           77715                           PDVL                                           
024061,000145: 36,2073           50235                           VXV      DOT                                   
024062,000146: 36,2074           03540                                    RACT3                                 
024063,000147: 36,2075           03646                                    E2                                    

Page 543

024065,000149: 36,2076           75325                           PDDL     SIGN                                  
024066,000150: 36,2077           77626                           STADR                                          
024067,000151: 36,2100           61160                           STODL    THETZERO                              #  CENTRAL ANGLE
024068,000152: 36,2101           00047                                    X1                                    
024069,000153: 36,2102           37746                           STCALL   XRS                                   #  SAVE INDICES FOR FURTHER USE
024070,000154: 36,2103           01340                                    NORMEX                                #    += ACTIVE AHEAD  -= ACTIVE BEHIND
024071,000155: 36,2104           77220        S17.2              STQ      VLOAD                                 #  COMPUTE SEARCH SECTOR LIMITS
024072,000156: 36,2105           03657                                    QTEMP                                 
024073,000157: 36,2106           03540                                    RACT3                                 
024074,000158: 36,2107           50256                           UNIT     DOT                                   
024075,000159: 36,2110           03646                                    E2                                    
024076,000160: 36,2111           75446                           ABS      SQRT                                  
024077,000161: 36,2112           43352                           SL1      DAD                                   
024078,000162: 36,2113           34025                                    DP-.002                               #  ADD .002 RADIANS TO IT
024079,000163: 36,2114           57414                           BON      DCOMP                                 #  GIVES CORRECT SINE, COSINE MUST BE
024080,000164: 36,2115           00316                                    KFLAG                                 #  COMP. ADD .5 FOR ANGLE
024081,000165: 36,2116           74117                                    +1                                    
024082,000166: 
024083,000167:                                                                                                  #  PHI(0)=180-(-(THETAZERO +K5IT)), PHI(I)=180-(-(THETAZERO+K2IT))
024084,000168:                                                                                                  #  SIN(180-ALPHA)=SIN(ALPHA) ETC
024085,000169: 
024086,000170: 36,2117           40205                           DMP      SETPD                                 
024087,000171: 36,2120           34011                                    PIINVERS                              #  REVOLUTIONARY HERES TWO IT
024088,000172: 36,2121           00001                                    0D                                    
024089,000173: 36,2122           45206                           PUSH     DSU                                   
024090,000174: 36,2123           02617                                    THETZERO                              
024091,000175: 36,2124           02611                           STORE    IT                                    #  PHI(I) , -(THETZERO + K2IT)
024092,000176: 36,2125           41525                           PDDL     PUSH                                  
024093,000177: 36,2126           43342                           SR1      DAD                                   
024094,000178: 36,2127           41415                           DAD      PUSH                                  #  PHI(0) , -(THETZERO + K5IT)
024095,000179: 36,2130           43156                           SIN      SET                                   
024096,000180: 36,2131           03466                                    RVSW                                  
024097,000181: 36,2132           16732                           STODL    SNTH                                  
024098,000182: 36,2133           50146                           COS      BMN                                   
024099,000183: 36,2134           74136                                    +2                                    
024100,000184: 36,2135           77676                           DCOMP                                          
024101,000185: 36,2136           16734                           STODL    CSTH                                  
024102,000186: 36,2137           03746                                    XRS                                   
024103,000187: 36,2140           24047                           STOVL    X1                                    
024104,000188: 36,2141           03554                                    RPASS3                                
024105,000189: 36,2142           77657                           VSR*                                           
024106,000190: 36,2143           57176                                    0,2                                   
024107,000191: 36,2144           26657                           STOVL    RVEC                                  
024108,000192: 36,2145           03562                                    VPASS3                                
024109,000193: 36,2146           77657                           VSR*                                           
024110,000194: 36,2147           57176                                    0,2                                   
024111,000195: 36,2150           36746                           STCALL   VVEC                                  
024112,000196: 36,2151           24737                                    TIMETHET                              
024113,000197: 36,2152           77745                           DLOAD                                          #  SAVE START TIME AND GET END TIME
024114,000198: 36,2153           00037                                    T                                     
024115,000199: 36,2154           03752                           STORE    TF                                    
024116,000200: 36,2155           16627                           STODL    TFO                                   

Page 544

024118,000202: 36,2156           02611                                    IT                                    
024119,000203: 36,2157           73406                           PUSH     SIN                                   
024120,000204: 36,2160           16732                           STODL    SNTH                                  
024121,000205: 36,2161           50146                           COS      BMN                                   
024122,000206: 36,2162           74164                                    +2                                    
024123,000207: 36,2163           77676                           DCOMP                                          
024124,000208: 36,2164           02734                           STORE    CSTH                                  
024125,000209: 36,2165           45150                           LXA,1    CALL                                  
024126,000210: 36,2166           03745                                    XRS                                   
024127,000211: 36,2167           24737                                    TIMETHET                              
024128,000212:                                                                                                  #  INITIALIZE LOOP
024129,000213: 36,2170           43145                           DLOAD    CLEAR                                 
024130,000214: 36,2171           00037                                    T                                     
024131,000215: 36,2172           03661                                    ITSWICH                               
024132,000216: 36,2173           16621                           STODL    TFI                                   #  SAVE TIME FOR LOOP TEST
024133,000217: 36,2174           15340                                    DPPOSMAX                              
024134,000218: 36,2175           16623                           STODL    DELVEE                                
024135,000219: 36,2176           34017                                    MANYFEET                              
024136,000220: 36,2177           16625                           STODL    HP                                    
024137,000221: 36,2200           34013                                    SEC1THET                              #  70 DEGREES
024138,000222: 36,2201           71214                           BON      DLOAD                                 
024139,000223: 36,2202           00316                                    KFLAG                                 
024140,000224: 36,2203           74205                                    +2                                    
024141,000225: 36,2204           34015                                    SEC2THET                              #  330 DEGREES
024142,000226: 36,2205           37750                           STCALL   THETL                                 
024143,000227: 36,2206           74230                                    CONCAUL                               
024144,000228: 36,2207           70545        BIS                DLOAD    SR1                                   
024145,000229: 36,2210           02734                                    CSTH                                  
024146,000230: 36,2211           14021                           STODL    COSTH                                 
024147,000231: 36,2212           02732                                    SNTH                                  
024148,000232: 36,2213           77742                           SR1                                            
024149,000233: 36,2214           34023                           STCALL   SINTH                                 #  GET 4 QUADRANT THETA
024150,000234: 36,2215           47211                                    ARCTRIG                               
024151,000235: 36,2216           43244                           BPL      DAD                                   
024152,000236: 36,2217           74221                                    +2                                    
024153,000237: 36,2220           15340                                    DPPOSMAX                              #  PUT THETA BETWEEN 0,1
024154,000238: 36,2221           65221                           BDSU     PDDL                                  
024155,000239: 36,2222           03750                                    THETL                                 
024156,000240: 36,2223           03752                                    TF                                    
024157,000241: 36,2224           75225                           DSU      SIGN                                  #  FAST TIMES
024158,000242: 36,2225           02621                                    TFI                                   
024159,000243: 36,2226           77640                           BMN                                            
024160,000244: 36,2227           74432                                    RNGETEST                              #  TIME MUST HAVE A STOP
024161,000245:                                                                                                  #  ADVANCE PASSIVE FOR TARGET VECTOR
024162,000246: 36,2230           77745        CONCAUL            DLOAD                                          
024163,000247: 36,2231           03663                                    TTPI                                  
024164,000248: 36,2232           43015                           DAD      BON                                   
024165,000249: 36,2233           03752                                    TF                                    
024166,000250: 36,2234           01312                                    AVFLAG                                
024167,000251: 36,2235           74242                                    ADVCSM                                

Page 545

024169,000253: 36,2236           34041                           STCALL   TDEC1                                 
024170,000254: 36,2237           27057                                    LEMCONIC                              
024171,000255: 36,2240           77650                           GOTO                                           
024172,000256: 36,2241           74244                                    JUNCT3                                
024173,000257: 36,2242           34041        ADVCSM             STCALL   TDEC1                                 
024174,000258: 36,2243           27045                                    CSMCONIC                              
024175,000259:                                                                                                  #  SAVE BACK VALUES OF HP AND DELVEE
024176,000260: 36,2244           77775        JUNCT3             VLOAD                                          
024177,000261: 36,2245           00007                                    VATT                                  
024178,000262: 36,2246           27640                           STOVL    VPASS4                                
024179,000263: 36,2247           00001                                    RATT                                  
024180,000264: 36,2250           03632                           STORE    RPASS4                                
024181,000265: 36,2251           17415                           STODL    RTARG                                 
024182,000266: 36,2252           03752                                    TF                                    
024183,000267: 36,2253           17423                           STODL    DELLT4                                
024184,000268: 36,2254           02625                                    HP                                    
024185,000269: 36,2255           16631                           STODL    HPO                                   
024186,000270: 36,2256           02623                                    DELVEE                                
024187,000271: 36,2257           16633                           STODL    DELVEO                                
024188,000272:                                                                                                  #  PREPARE FOR LAMBERT
024189,000273: 36,2260           03663                                    TTPI                                  
024190,000274: 36,2261           17503                           STODL    INTIME                                
024191,000275: 36,2262           03746                                    XRS                                   
024192,000276: 36,2263           17746                           STODL    RTX1                                  
024193,000277: 36,2264           15332                                    HI6ZEROS                              
024194,000278: 36,2265           65201                           SETPD    PDDL                                  
024195,000279: 36,2266           00001                                    0D                                    
024196,000280: 36,2267           33147                                    EPSFOUR                               
024197,000281: 36,2270           77715                           PDVL                                           
024198,000282: 36,2271           03540                                    RACT3                                 
024199,000283: 36,2272           27570                           STOVL    RINIT                                 
024200,000284: 36,2273           03546                                    VACT3                                 
024201,000285: 36,2274           37576                           STCALL   VINIT                                 
024202,000286: 36,2275           22000                                    INITVEL                               
024203,000287:                                                                                                  #  COMPUTE H ET CETERA
024204,000288: 36,2276           52375                           VLOAD    VSU                                   
024205,000289: 36,2277           03620                                    VTPRIME                               
024206,000290: 36,2300           03640                                    VPASS4                                
024207,000291: 36,2301           41446                           ABVAL    PUSH                                  
024208,000292: 36,2302           26637                           STOVL    RELDELV                               #  /V2-VP(TPI+TF)/
024209,000293: 36,2303           03646                                    DELVEET3                              #  V1-VA
024210,000294: 36,2304           77646                           ABVAL                                          #  /V1-VA/
024211,000295: 36,2305           02635                           STORE    MAGVTPI                               
024212,000296: 36,2306           45415                           DAD      STADR                                 
024213,000297: 36,2307           61154                           STODL    DELVEE                                
024214,000298: 36,2310           03746                                    XRS                                   
024215,000299: 36,2311           24047                           STOVL    X1                                    
024216,000300: 36,2312           03612                                    VIPRIME                               
024217,000301: 36,2313           77657                           VSR*                                           
024218,000302: 36,2314           57176                                    0,2                                   

Page 546

024220,000304: 36,2315           26746                           STOVL    VVEC                                  
024221,000305: 36,2316           03540                                    RACT3                                 
024222,000306: 36,2317           77657                           VSR*                                           
024223,000307: 36,2320           57176                                    0,2                                   
024224,000308: 36,2321           36657                           STCALL   RVEC                                  
024225,000309: 36,2322           45322                                    PERIAPO                               
024226,000310: 36,2323           71354                           LXA,2    DLOAD                                 
024227,000311: 36,2324           03746                                    XRS        +1                         
024228,000312: 36,2325           77657                           SL*                                            
024229,000313: 36,2326           57576                                    0,2                                   
024230,000314: 36,2327           02625                           STORE    HP                                    
024231,000315:                                                                                                  #  ITSWICH DENOTES INTERPOLATION -- SOLUTION ACCEPTANCE IS FORCED
024232,000316: 36,2330           71214                           BON      DLOAD                                 
024233,000317: 36,2331           03701                                    ITSWICH                               
024234,000318: 36,2332           74443                                    ENDEN                                 
024235,000319: 36,2333           02321                                    HPERMIN                               
024236,000320: 36,2334           50025                           DSU      BMN                                   
024237,000321: 36,2335           02625                                    HP                                    
024238,000322: 36,2336           74401                                    HALFSAFE                              
024239,000323: 36,2337           45325                           PDDL     DSU                                   #  WAS PERICENTER ALT SAFE
024240,000324: 36,2340           02321                                    HPERMIN                               
024241,000325: 36,2341           02631                                    HPO                                   
024242,000326: 36,2342           45240                           BMN      DSU                                   #  (HPLIM-HPO)-(HPLIM-HP)=HP-HPO
024243,000327: 36,2343           74360                                    INTERP                                #  SOLUTION AT HAND
024244,000328: 36,2344           71240                           BMN      DLOAD                                 
024245,000329: 36,2345           73534                                    ALARUMS                               #  ITS GETTING WORSE - SOUND THE ALARM
024246,000330: 36,2346           34005                                    CDSEC                                 
024247,000331: 36,2347           57414        JUNCT1             BOFF     DCOMP                                 #  OFF IS PLUS ON IS MINUS
024248,000332: 36,2350           00356                                    KFLAG                                 
024249,000333: 36,2351           74352                                    +1                                    
024250,000334: 36,2352           03744                           STORE    DELTEE                                
024251,000335: 36,2353           43345        JUNCT2             DLOAD    DAD                                   
024252,000336: 36,2354           03744                                    DELTEE                                
024253,000337: 36,2355           03752                                    TF                                    
024254,000338: 36,2356           37752                           STCALL   TF                                    
024255,000339: 36,2357           74207                                    BIS                                   #  RECYCLE
024256,000340: 36,2360           45214        INTERP             SET      DSU                                   #  HP-HPO
024257,000341: 36,2361           03461                                    ITSWICH                               
024258,000342: 36,2362           65301                           NORM     PDDL                                  
024259,000343: 36,2363           00047                                    X1                                    
024260,000344: 36,2364           34023                                    DFTMOON                               
024261,000345: 36,2365           45215                           DAD      DSU                                   
024262,000346: 36,2366           02321                                    HPERMIN                               
024263,000347: 36,2367           02625                                    HP                                    
024264,000348: 36,2370           70501                           NORM     SR1                                   
024265,000349: 36,2371           00050                                    X2                                    
024266,000350: 36,2372           56264                           XSU,2    DDV                                   
024267,000351: 36,2373           00046                                    X1                                    
024268,000352: 36,2374           53605                           DMP      SR*                                   
024269,000353: 36,2375           03744                                    DELTEE                                

Page 547

024271,000355: 36,2376           57177                                    0          -1,2                       
024272,000356: 36,2377           37744                           STCALL   DELTEE                                
024273,000357: 36,2400           74353                                    JUNCT2                                
024274,000358: 36,2401           45325        HALFSAFE           PDDL     DSU                                   #  SAVE HP-HPLIM FOR POSSIBLE
024275,000359: 36,2402           02623                                    DELVEE                                
024276,000360: 36,2403           02633                                    DELVEO                                #  SAVE THIS TOO
024277,000361: 36,2404           51406                           PUSH     ABS                                   
024278,000362: 36,2405           50025                           DSU      BMN                                   
024279,000363: 36,2406           34021                                    LIMVEL                                #  2 FT PS
024280,000364: 36,2407           74443                                    ENDEN                                 
024281,000365: 36,2410           45345                           DLOAD    DSU                                   
024282,000366: 36,2411           02321                                    HPERMIN                               
024283,000367: 36,2412           02631                                    HPO                                   
024284,000368: 36,2413           77725                           PDDL                                           
024285,000369: 36,2414           71240                           BMN      DLOAD                                 
024286,000370: 36,2415           74424                                    LRGRDVO                               
024287,000371: 36,2416           71244                           BPL      DLOAD                                 
024288,000372: 36,2417           74360                                    INTERP                                
024289,000373: 36,2420           03744                                    DELTEE                                
024290,000374: 36,2421           57542                           SR1      DCOMP                                 
024291,000375: 36,2422           37744                           STCALL   DELTEE                                
024292,000376: 36,2423           74353                                    JUNCT2                                
024293,000377: 36,2424           77745        LRGRDVO            DLOAD                                          
024294,000378: 36,2425           71240                           BMN      DLOAD                                 
024295,000379: 36,2426           74353                                    JUNCT2                                
024296,000380: 36,2427           34007                                    CLSEC                                 
024297,000381: 36,2430           77650                           GOTO                                           
024298,000382: 36,2431           74347                                    JUNCT1                                
024299,000383:                                                                                                  #  TIME RAN OUT ASSUME SOLUTION IF SAFE PERICENTER
024300,000384: 36,2432           45345        RNGETEST           DLOAD    DSU                                   
024301,000385: 36,2433           02625                                    HP                                    
024302,000386: 36,2434           02321                                    HPERMIN                               
024303,000387: 36,2435           71240                           BMN      DLOAD                                 
024304,000388: 36,2436           73534                                    ALARUMS                               
024305,000389: 36,2437           03752                                    TF                                    
024306,000390: 36,2440           77625                           DSU                                            
024307,000391: 36,2441           03744                                    DELTEE                                
024308,000392: 36,2442           03752                           STORE    TF                                    #  TIME OF SOLUTION
024309,000393: 36,2443           77775        ENDEN              VLOAD                                          
024310,000394: 36,2444           03620                                    VTPRIME                               
024311,000395: 36,2445           65241                           DOT      PDDL                                  #  SG2 WITH MAGNITUDE
024312,000396: 36,2446           03632                                    RPASS4                                
024313,000397: 36,2447           02637                                    RELDELV                               
024314,000398: 36,2450           45565                           SIGN     STADR                                 #  NOW SIGN(RELDELV)=SIGN(SG2)
024315,000399: 36,2451           41140                           STCALL   RELDELV                               
024316,000400: 36,2452           16440                                    TRANSANG                              #  COMPUTE OMEGA T, CENTRAL ANGLE
024317,000401: 36,2453           50375                           VLOAD    DOT                                   
024318,000402: 36,2454           03540                                    RACT3                                 
024319,000403: 36,2455           03612                                    VIPRIME                               #  SG1
024320,000404: 36,2456           51165                           SIGN     BPL                                   #  IF POSITIVE THEN SG1 = SG2 OTHERWISE

Page 548

024322,000406: 36,2457           02637                                    RELDELV                               
024323,000407: 36,2460           74470                                    USEKAY                                #  SIGN(SG2-SG1)=SIGN(SG2)=SIGN(RELDELV)
024324,000408: 36,2461           57535                           SLOAD    DCOMP                                 
024325,000409: 36,2462           33144                                    DECTWO                                
024326,000410: 36,2463           51165                           SIGN     BPL                                   
024327,000411: 36,2464           02637                                    RELDELV                               
024328,000412: 36,2465           74476                                    NEXUS                                 
024329,000413: 36,2466           52076                           DCOMP    GOTO                                  
024330,000414: 36,2467           74474                                    USEKAY     +4                         
024331,000415: 36,2470           43135        USEKAY             SLOAD    BON                                   
024332,000416: 36,2471           33144                                    DECTWO                                
024333,000417: 36,2472           00316                                    KFLAG                                 
024334,000418: 36,2473           74476                                    NEXUS                                 
024335,000419: 36,2474           77625                           DSU                                            
024336,000420: 36,2475           36100                                    P21ONENN                              
024337,000421: 36,2476           17646        NEXUS              STODL    NN1                                   
024338,000422: 36,2477           02625                                    HP                                    
024339,000423: 36,2500           36641                           STCALL   POSTTPI                               
024340,000424: 36,2501           03657                                    QTEMP                                 
024341,000425: 07,2440                                           BANK     07                                    
024342,000426: 07,2000                                           SETLOC   XANG                                  
024343,000427: 07,2000                                           BANK                                           
024344,000428: 07,2440                                           COUNT    07/XANG                               
024345,000429: 
024346,000430:                                                                                                  #  CENTRAL ANGLE SUBROUTINE
024347,000431: 
024348,000432:                                                                                                  #  THIS SUBROUTINE COMPUTES THE CENTRAL ANGLE OF TRAVEL OF THE
024349,000433:                                                                                                  #  PASSIVE VEHICLE DURING THE TRANSFER.
024350,000434: 
024351,000435: 07,2440           40220        TRANSANG           STQ      SETPD                                 
024352,000436: 07,2441           02370                                    SUBEXIT                               
024353,000437: 07,2442           00001                                    0                                     
024354,000438: 07,2443           73150                           LXA,1    LXA,2                                 
024355,000439: 07,2444           03745                                    XRS                                   
024356,000440: 07,2445           03746                                    XRS        +1                         
024357,000441: 07,2446           53775                           VLOAD    VSR*                                  
024358,000442: 07,2447           03640                                    VPASS4                                
024359,000443: 07,2450           57176                                    0,2                                   
024360,000444: 07,2451           22746                           STODL*   VVEC                                  
024361,000445: 07,2452           11633                                    MUTABLE    +2,1                       
024362,000446: 07,2453           53715                           PDVL     VSR*                                  #  SQRT MU (+18 OR +15)                  00D
024363,000447: 07,2454           03632                                    RPASS4                                
024364,000448: 07,2455           57176                                    0,2                                   
024365,000449: 07,2456           64646                           ABVAL    PDDL*                                 #  MAGNITUDE OF R        (+29 OR +27)    02D
024366,000450: 07,2457           11631                                    MUTABLE,1                             
024367,000451: 07,2460           47515                           PDVL     VSQ                                   #  1/MU                  (+34 OR +28)    04D
024368,000452: 07,2461           02746                                    VVEC                                  
024369,000453: 07,2462           57301                           NORM     DMPR                                  #  PUSH LIST AT 02D
024370,000454: 07,2463           00047                                    X1                                    
024371,000455: 07,2464           53605                           DMP      SRR*                                  
024372,000456: 07,2465           00003                                    02D                                   

Page 549

024374,000458: 07,2466           21576                                    0          -3,1                       
024375,000459: 07,2467           77621                           BDSU                                           #  R V**/MU              (+6)
024376,000460: 07,2470           11506                                    D1/32                                 
024377,000461: 07,2471           65301                           NORM     PDDL                                  
024378,000462: 07,2472           00047                                    X1                                    #  (2 - R V**/MU)        (+6-N)
024379,000463: 07,2473           56362                           SR1R     DDV                                   #  MAGNITUDE OF R        (+30 OR +28)
024380,000464: 07,2474           41457                           SL*      PUSH                                  #  R/(2 - R V**/MU)      (+29 OR +27)    02D
024381,000465: 07,2475           20174                                    0          -5,1                       
024382,000466: 07,2476           75542                           SR1      SQRT                                  
024383,000467: 07,2477           77605                           DMP                                            
024384,000468: 07,2500           65301                           NORM     PDDL                                  #  ASUBP***                              00D
024385,000469: 07,2501           00047                                    X1                                    
024386,000470: 07,2502           56342                           SR1      DDV                                   
024387,000471: 07,2503           53605                           DMP      SL*                                   
024388,000472: 07,2504           03752                                    TF                                    
024389,000473: 07,2505           20201                                    0,1                                   
024390,000474: 07,2506           60325                           PDDL     NORM                                  
024391,000475: 07,2507           11520                                    2PISC                                 
024392,000476: 07,2510           00047                                    X1                                    
024393,000477: 07,2511           56325                           PDDL     DDV                                   
024394,000478: 07,2512           77657                           SL*                                            
024395,000479: 07,2513           20176                                    0          -3,1                       #  CENTANG = (SQRT(MU/ASUP***)TF)
024396,000480: 07,2514           37754                           STCALL   CENTANG                               #  IN REVOLUTIONS B-0
024397,000481: 07,2515           02370                                    SUBEXIT                               
024398,000482: 35,3431                                           BANK     35                                    
024399,000483: 35,2000                                           SETLOC   P17S1                                 
024400,000484: 35,2000                                           BANK                                           
024401,000485: 35,3431                                           COUNT    35/P17                                
024402,000486: 
024403,000487:                                                                                                  #  TPI SEARCH DISPLAY ROUTINE
024404,000488: 
024405,000489: 35,3431           03726        P17                TC       AVFLAGA                               #  AVFLAG = CSM, SET TRACK + UPDATE FLAGS
024406,000490: 35,3432           03434                           TC       P17.1                                 
024407,000491: 35,3433           03741        P77                TC       AVFLAGP                               #  AVFLAG = LEM, SET TRACK + UPDATE FLAGS
024408,000492: 35,3434           03746        P17.1              TC       P20FLGON                              #        SET UPDATE FLAG
024409,000493: 35,3435           33125                           CAF      V06N37                                #        DISPLAY TTPI TIME
024410,000494: 35,3436           03114                           TC       VNPOOH                                
024411,000495: 35,3437           06006                           TC       INTPRET                               
024412,000496: 35,3440           45014                           CLEAR    CALL                                  
024413,000497: 35,3441           00670                                    UPDATFLG                              
024414,000498: 35,3442           74026                                    S17.1                                 #  UPDATE STATE VECTORS TO TTPI
024415,000499: 35,3443           76014                           SET      AXT,1                                 
024416,000500: 35,3444           00470                                    UPDATFLG                              
024417,000501: 35,3445           00002                           DEC      2          B-14                       #  DELTA H = 2 K POSITIVE, KFLAG OFF
024418,000502: 35,3446           76014                           BOFF     AXT,1                                 
024419,000503: 35,3447           00356                                    KFLAG                                 
024420,000504: 35,3450           73452                                    +2                                    
024421,000505: 35,3451           00001                           DEC      1          B-14                       #  DELTA H = 1 K NEGATIVE, KFLAG ON
024422,000506: 35,3452           77530                           SXA,1    EXIT                                  
024423,000507: 35,3453           01132                                    OPTION2                               

Page 550

024425,000509: 35,3454           33543                           CAF      V06N72                                #  DISPLAY PHI, DELTA H, SEARCH OPTION K
024426,000510: 35,3455           03517                           TC       VNCOMP17                              
024427,000511: 35,3456           06006                           TC       INTPRET                               
024428,000512: 35,3457           43014                           CLEAR    SET                                   
024429,000513: 35,3460           00670                                    UPDATFLG                              
024430,000514: 35,3461           00076                                    KFLAG                                 
024431,000515: 35,3462           45335                           SLOAD    DSU                                   
024432,000516: 35,3463           01133                                    OPTION2                               #  RESET KFLAG ON FOR OPTION =1
024433,000517: 35,3464           36100                                    P21ONENN                              #             OFF FOR OPTION =2
024434,000518: 35,3465           43030                           BHIZ     CLEAR                                 
024435,000519: 35,3466           73470                                    +2                                    
024436,000520: 35,3467           00276                                    KFLAG                                 
024437,000521: 35,3470           46135                           SLOAD    BHIZ                                  
024438,000522: 35,3471           03747                                    XRS        +1                         
024439,000523: 35,3472           73476                                    +4                                    
024440,000524: 35,3473           52145                           DLOAD    GOTO                                  
024441,000525: 35,3474           34003                                    HPL                                   
024442,000526: 35,3475           73500                                    P17.2                                 
024443,000527: 35,3476           77745                           DLOAD                                          
024444,000528: 35,3477           34001                                    HPE                                   
024445,000529: 35,3500           36321        P17.2              STCALL   HPERMIN                               
024446,000530: 35,3501           74104                                    S17.2                                 
024447,000531: 35,3502           77414                           SET      EXIT                                  
024448,000532: 35,3503           00470                                    UPDATFLG                              
024449,000533: 35,3504           33127        P17.3              CAF      V06N58                                #  DISPLAY DELTA VTPI, DELTA VTPF,AND H
024450,000534: 35,3505           03517                           TC       VNCOMP17                              
024451,000535: 35,3506           33126                           CAF      V06N55                                #  DISPLAY PERICENTER CODE AND CENTRAL ANG,
024452,000536: 35,3507           04555                           TC       BANKCALL                              
024453,000537: 35,3510           20763                           CADR     GOFLASHR                              
024454,000538: 35,3511           04106                           TC       GOTOPOOH                              #  TERMINATE PROGRAM
024455,000539: 35,3512           04106                           TC       GOTOPOOH                              #  END PROGRAM
024456,000540: 35,3513           03434                           TC       P17.1                                 #  RECYCLE WITH NEW TTPI OR SEARCH OPTION
024457,000541: 35,3514           34711                           CAF      TWO                                   #  BLANK R2
024458,000542: 35,3515           05415                           TC       BLANKET                               
024459,000543: 35,3516           15112                           TCF      ENDOFJOB                              
024460,000544: 35,3517  E4,1767                                  EBANK=   RTRN                                  
024461,000545: 
024462,000546: 35,3517           00006        VNCOMP17           EXTEND                                         
024463,000547: 35,3520           23766                           QXCH     QSAVED                                
024464,000548: 35,3521           55765                           TS       VERBNOUN                              
024465,000549: 35,3522           31765                           CA       VERBNOUN                              
024466,000550: 35,3523           04555                           TCR      BANKCALL                              
024467,000551: 35,3524           20624                           CADR     GOFLASH                               
024468,000552: 35,3525           03522                           TC       -3                                    #  TERMINATE ILLEGAL REDISPLAY
024469,000553: 35,3526           01766                           TC       QSAVED                                #  PROCEED
024470,000554: 35,3527           40154                           CS       MPAC                                  #  RECYCLE WITH NEW TPI TIME
024471,000555: 35,3530           64705                           AD       BIT6                                  #  OR PROCEED WITH NEW SEARCH OPTION
024472,000556: 35,3531           00006                           EXTEND                                         
024473,000557: 35,3532           13434                           BZF      P17.1                                 
024474,000558: 35,3533           03522                           TC       VNCOMP17   +3                         

Page 551

024476,000560: 35,3534           77414        ALARUMS            SET      EXIT                                  
024477,000561: 35,3535           00470                                    UPDATFLG                              
024478,000562: 35,3536           05537                           TC       ALARM                                 
024479,000563: 35,3537           00124                           OCT      00124                                 #  NO SAFE PERCENTER IN THIS SECTOR
024480,000564: 35,3540           34743                           CAF      V05N09                                
024481,000565: 35,3541           03517                           TC       VNCOMP17                              
024482,000566: 35,3542           04106                           TC       GOTOPOOH                              #  PROCEED ILLEGAL TERMINATE PROGRAM
024483,000567: 35,3543           01510        V06N72             VN       0672                                  
024484,000568: 

End of include-file TPI_SEARCH.agc.  Parent file is MAIN.agc