Source Code

These source-code files are part of a reconstructed copy of Comanche 72, the first release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

023390,000002:                                                                                                  ## Copyright:   Public domain.
023391,000003:                                                                                                  ## Filename:    TPI_SEARCH.agc
023392,000004:                                                                                                  ## Purpose:     A section of Comanche revision 072.
023393,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
023394,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
023395,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
023396,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
023397,000009:                                                                                                  ##              from a printout of Comanche 055, binary dumps of a set of
023398,000010:                                                                                                  ##              Comanche 067 rope modules, and changelogs between Comanche 067
023399,000011:                                                                                                  ##              and 072. It has been adapted such that the resulting bugger words
023400,000012:                                                                                                  ##              exactly match those specified for Comanche 072 in NASA drawing
023401,000013:                                                                                                  ##              2021153G, which gives relatively high confidence that the
023402,000014:                                                                                                  ##              reconstruction is correct.
023403,000015:                                                                                                  ## Assembler:   yaYUL
023404,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
023405,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
023406,000018:                                                                                                  ## Mod history: 2024-05-13 MAS  Created from Comanche 067.
023407,000019: 
023408,000020:                                                                                                  #  PROGRAM DESCRIPTION S17.1 AND S17.2
023409,000021: 
023410,000022:                                                                                                  #  FUNCTIONAL DESCRIPTION
023411,000023: 
023412,000024:                                                                                                  #  THE TPI SEARCH ROUTINE DETERMINES THE MINIMUM TOTAL VELOCITY TRANSFER TRAJECTORY FROM A GIVEN TPI
023413,000025:                                                                                                  #  MANEUVER TIME WITHIN THE CONSTRAINT OF A SAFE PERICENTER.  THIS VELOCITY IS THE SUM OF THE IMPULSIVE VELOCITIES
023414,000026:                                                                                                  #  FOR THE TPI AND TPF MANEUVERS.
023415,000027: 
023416,000028:                                                                                                  #  THE S17.1 ROUTINE EXTRAPOLATES THE STATE VECTORS OF BOTH VEHICLES TO THE TPI TIME AND COMPUTES THE
023417,000029:                                                                                                  #  RELATIVE PHASE ANGLE BETWEEN THE VEHICLES, THE ALTITUDE DIFFERENCE (I.E. THE MAGNITUDE DIFFERENCE OF THE 
023418,000030:                                                                                                  #  POSITION VECTORS) AND SELECTS A SEARCH SECTOR BASED ON THE SIGN OF THE ALTITUDE DIFFERENCE.
023419,000031: 
023420,000032:                                                                                                  #  THE S17.2 ROUTINE FURTHER DEFINES THE SEARCH SECTOR BY COMPUTING ANGULAR LIMITS AND USES THE TIME THETA
023421,000033:                                                                                                  #  SUBROUTINE TO COMPUTE THE SEARCH START AND END TIMES.  THE SEARCH IS THEN MADE IN AN ITERATIVE LOOP USING THE
023422,000034:                                                                                                  #  LAMBERT SUBROUTINE TO COMPUTE THE VELOCITIES REQUIRED AT TPI TIME AND AT TPF TIME.  EXIT FROM THE SEARCH LOOP
023423,000035:                                                                                                  #  IS MADE WHEN SOLUTION CRITERIA ARE MET (NORMAL EXIT) OR AS SOON AS IT IS EVIDENT THAT NO SOLUTION EXISTS IN
023424,000036:                                                                                                  #  THE SECTOR SEARCHED.
023425,000037: 
023426,000038:                                                                                                  #  CALLING SEQUENCE
023427,000039: 
023428,000040:                                                                                                  #        BOTH ROUTINES ARE CALLED IN INTERPRETIVE CODE AND RETURN VIA QPRET.  S17.1 HAS ONLY A NORMAL EXIT.
023429,000041:                                                                                                  #        S17.2 RETURNS VIA QPRET FOR NORMAL EXIT AND TO ALARUMS FOR ERROR EXIT.
023430,000042: 
023431,000043:                                                                                                  #  SUBROUTINES CALLED
023432,000044: 
023433,000045:                                                                                                  #        CSMCONIC
023434,000046:                                                                                                  #        LEMCONIC
023435,000047:                                                                                                  #        TIMETHET
023436,000048:                                                                                                  #        INITVEL
023437,000049: 
023438,000050: 36,2012                                           BANK     36                                    
023439,000051: 35,2000                                           SETLOC   P17S1                                 
023440,000052: 35,2000                                           BANK                                           
023441,000053: 
023442,000054: 35,3123                                           COUNT    36/TPI                                
023443,000055: 
023444,000056: 35,3123  E7,1537                                  EBANK=   RACT3                                 
023445,000057: 
023446,000058:                                                                                                  #  **** TEMPORARY ****
023447,000059: 
023448,000060: 35,3123           00004 31566  HPE                2DEC     157420.0   B-29                       #  EARTH'S MIN. PERICENTER ALTITUDE 85 N.M.
023449,000061: 
023450,000062: 35,3125           00000 12326  HPL                2DEC     10668.0213 B-29                       #  MOON:S MIN. PERICENTER ALTITUDE 35000 FT
023451,000063: 
023452,000064: 35,3127           00002 16100  CDSEC              2DEC     40000      B-28                       
023453,000065: 
023454,000066: 35,3131           00000 35230  CLSEC              2DEC     15000      B-28                       
023455,000067: 
023456,000068: 35,3133           12137 06033  PIINVERS           2DEC     .3183098862                            
023457,000069: 
023458,000070: 35,3135           06161 30707  SEC1THET           2DEC     .1944444444                            
023459,000071: 
023460,000072: 35,3137           35252 25253  SEC2THET           2DEC     .9166666667                            
023461,000073: 
023462,000074: 35,3141           67777 77777  MANYFEET           2DEC     -1.0       B-2                        
023463,000075: 
023464,000076: 35,3143           00000 30760  LIMVEL             2DEC     .6096      E-2        B-7             #  2FPS
023465,000077: 
023466,000078: 35,3145           00000 00114  DFTMOON            2DEC     .1524      E3         B-29            #  500 FEET
023467,000079: 
023468,000080: 35,3147           00040 30447  DP-.002            2DEC     0.002                                 
023469,000081: 
023470,000082: 36,2000                                           SETLOC   P17S                                  
023471,000083: 36,2000                                           BANK                                           
023472,000084: 36,2012           71220        S17.1              STQ      DLOAD                                 
023473,000085: 36,2013           01340                                    NORMEX                                
023474,000086: 36,2014           03663                                    TTPI                                  
023475,000087: 36,2015           34041                           STCALL   TDEC1                                 #  ADVANCE PASSIVE VEHICLE TO TPI
023476,000088: 36,2016           27135                                    LEMCONIC                              
023477,000089: 36,2017           77624                           CALL                                           
023478,000090: 36,2020           45233                                    LEMSTORE                              
023479,000091: 36,2021           77745                           DLOAD                                          
023480,000092: 36,2022           03663                                    TTPI                                  
023481,000093: 36,2023           34041                           STCALL   TDEC1                                 #  ADVANCE ACTIVE VEHICLE TO TPI
023482,000094: 36,2024           27123                                    CSMCONIC                              
023483,000095: 36,2025           77624                           CALL                                           
023484,000096: 36,2026           45243                                    CSMSTORE                              
023485,000097: 36,2027           77775                           VLOAD                                          
023486,000098: 36,2030           03540                                    RACT3                                 
023487,000099: 36,2031           63246                           ABVAL    PDVL                                  #  /RA/ 0D                       PL 2D
023488,000100: 36,2032           03554                                    RPASS3                                
023489,000101: 36,2033           65256                           UNIT     PDDL                                  #  UNIT RP 0D                    PL 6D
023490,000102: 36,2034           43021                           BDSU     SET                                   
023491,000103: 36,2035           00045                                    36D                                   #  /RP/ -/RA/
023492,000104: 36,2036           00076                                    KFLAG                                 #  OFF = +
023493,000105: 36,2037           43040                           BMN      CLEAR                                 
023494,000106: 36,2040           74042                                    +2                                    
023495,000107: 36,2041           00276                                    KFLAG                                 #  ON = -
023496,000108: 36,2042           27754                           STOVL    DELHITE                               
023497,000109: 36,2043           00001                                    0D                                    
023498,000110: 36,2044           53435                           VXV      UNIT                                  
023499,000111: 36,2045           03562                                    VPASS3                                
023500,000112: 36,2046           27646                           STOVL    E2                                    #  ALMOST IT SAVE FOR 17.2
023501,000113: 36,2047           03540                                    RACT3                                 
023502,000114: 36,2050           46206                           PUSH     VPROJ                                 
023503,000115: 36,2051           03646                                    E2                                    
023504,000116: 36,2052           51352                           VSL2     BVSU                                  #  RPA
023505,000117: 36,2053           50256                           UNIT     DOT                                   
023506,000118: 36,2054           00001                                    0D                                    
023507,000119: 36,2055           65552                           SL1      ACOS                                  
023508,000120: 36,2056           77715                           PDVL                                           
023509,000121: 36,2057           50235                           VXV      DOT                                   
023510,000122: 36,2060           03540                                    RACT3                                 
023511,000123: 36,2061           03646                                    E2                                    
023512,000124: 36,2062           75325                           PDDL     SIGN                                  
023513,000125: 36,2063           77626                           STADR                                          
023514,000126: 36,2064           61160                           STODL    THETZERO                              #  CENTRAL ANGLE
023515,000127: 36,2065           00047                                    X1                                    
023516,000128: 36,2066           37746                           STCALL   XRS                                   #  SAVE INDICES FOR FURTHER USE
023517,000129: 36,2067           01340                                    NORMEX                                #    += ACTIVE AHEAD  -= ACTIVE BEHIND
023518,000130: 36,2070           77220        S17.2              STQ      VLOAD                                 #  COMPUTE SEARCH SECTOR LIMITS
023519,000131: 36,2071           03657                                    QTEMP                                 
023520,000132: 36,2072           03540                                    RACT3                                 
023521,000133: 36,2073           50256                           UNIT     DOT                                   
023522,000134: 36,2074           03646                                    E2                                    
023523,000135: 36,2075           75446                           ABS      SQRT                                  
023524,000136: 36,2076           43352                           SL1      DAD                                   
023525,000137: 36,2077           33150                                    DP-.002                               #  ADD .002 RADIANS TO IT
023526,000138: 36,2100           57414                           BON      DCOMP                                 #  GIVES CORRECT SINE, COSINE MUST BE
023527,000139: 36,2101           00316                                    KFLAG                                 #  COMP. ADD .5 FOR ANGLE
023528,000140: 36,2102           74103                                    +1                                    
023529,000141:                                                                                                  #  PHI(0)=180-(-(THETAZERO +K5IT)), PHI(I)=180-(-(THETAZERO+K2IT))
023530,000142:                                                                                                  #  SIN(180-ALPHA)=SIN(ALPHA) ETC
023531,000143: 36,2103           40205                           DMP      SETPD                                 
023532,000144: 36,2104           33134                                    PIINVERS                              #  REVOLUTIONARY HERES TWO IT
023533,000145: 36,2105           00001                                    0D                                    
023534,000146: 36,2106           45206                           PUSH     DSU                                   
023535,000147: 36,2107           02617                                    THETZERO                              
023536,000148: 36,2110           02611                           STORE    IT                                    #  PHI(I) , -(THETZERO + K2IT)
023537,000149: 36,2111           41525                           PDDL     PUSH                                  
023538,000150: 36,2112           43342                           SR1      DAD                                   
023539,000151: 36,2113           41415                           DAD      PUSH                                  #  PHI(0) , -(THETZERO + K5IT)
023540,000152: 36,2114           43156                           SIN      SET                                   
023541,000153: 36,2115           03466                                    RVSW                                  
023542,000154: 36,2116           16732                           STODL    SNTH                                  
023543,000155: 36,2117           50146                           COS      BMN                                   
023544,000156: 36,2120           74122                                    +2                                    
023545,000157: 36,2121           77676                           DCOMP                                          
023546,000158: 36,2122           16734                           STODL    CSTH                                  
023547,000159: 36,2123           03746                                    XRS                                   
023548,000160: 36,2124           24047                           STOVL    X1                                    
023549,000161: 36,2125           03554                                    RPASS3                                
023550,000162: 36,2126           77657                           VSR*                                           
023551,000163: 36,2127           57176                                    0,2                                   
023552,000164: 36,2130           26657                           STOVL    RVEC                                  
023553,000165: 36,2131           03562                                    VPASS3                                
023554,000166: 36,2132           77657                           VSR*                                           
023555,000167: 36,2133           57176                                    0,2                                   
023556,000168: 36,2134           36746                           STCALL   VVEC                                  
023557,000169: 36,2135           24744                                    TIMETHET                              
023558,000170: 36,2136           77745                           DLOAD                                          #  SAVE START TIME AND GET END TIME
023559,000171: 36,2137           00037                                    T                                     
023560,000172: 36,2140           03752                           STORE    TF                                    
023561,000173: 36,2141           16627                           STODL    TFO                                   
023562,000174: 36,2142           02611                                    IT                                    
023563,000175: 36,2143           73406                           PUSH     SIN                                   
023564,000176: 36,2144           16732                           STODL    SNTH                                  
023565,000177: 36,2145           50146                           COS      BMN                                   
023566,000178: 36,2146           74150                                    +2                                    
023567,000179: 36,2147           77676                           DCOMP                                          
023568,000180: 36,2150           02734                           STORE    CSTH                                  
023569,000181: 36,2151           45150                           LXA,1    CALL                                  
023570,000182: 36,2152           03745                                    XRS                                   
023571,000183: 36,2153           24744                                    TIMETHET                              
023572,000184:                                                                                                  #  INITIALIZE LOOP
023573,000185: 36,2154           43145                           DLOAD    CLEAR                                 
023574,000186: 36,2155           00037                                    T                                     
023575,000187: 36,2156           03661                                    ITSWICH                               
023576,000188: 36,2157           16621                           STODL    TFI                                   #  SAVE TIME FOR LOOP TEST
023577,000189: 36,2160           15342                                    DPPOSMAX                              
023578,000190: 36,2161           16623                           STODL    DELVEE                                
023579,000191: 36,2162           33142                                    MANYFEET                              
023580,000192: 36,2163           16625                           STODL    HP                                    
023581,000193: 36,2164           33136                                    SEC1THET                              #  70 DEGREES
023582,000194: 36,2165           71214                           BON      DLOAD                                 
023583,000195: 36,2166           00316                                    KFLAG                                 
023584,000196: 36,2167           74171                                    +2                                    
023585,000197: 36,2170           33140                                    SEC2THET                              #  330 DEGREES
023586,000198: 36,2171           37750                           STCALL   THETL                                 
023587,000199: 36,2172           74214                                    CONCAUL                               
023588,000200: 36,2173           70545        BIS                DLOAD    SR1                                   
023589,000201: 36,2174           02734                                    CSTH                                  
023590,000202: 36,2175           14021                           STODL    COSTH                                 
023591,000203: 36,2176           02732                                    SNTH                                  
023592,000204: 36,2177           77742                           SR1                                            
023593,000205: 36,2200           34023                           STCALL   SINTH                                 #  GET 4 QUADRANT THETA
023594,000206: 36,2201           47260                                    ARCTRIG                               
023595,000207: 36,2202           43244                           BPL      DAD                                   
023596,000208: 36,2203           74205                                    +2                                    
023597,000209: 36,2204           15342                                    DPPOSMAX                              #  PUT THETA BETWEEN 0,1
023598,000210: 36,2205           65221                           BDSU     PDDL                                  
023599,000211: 36,2206           03750                                    THETL                                 
023600,000212: 36,2207           03752                                    TF                                    
023601,000213: 36,2210           75225                           DSU      SIGN                                  #  FAST TIMES
023602,000214: 36,2211           02621                                    TFI                                   
023603,000215: 36,2212           77640                           BMN                                            
023604,000216: 36,2213           74416                                    RNGETEST                              #  TIME MUST HAVE A STOP
023605,000217:                                                                                                  #  ADVANCE PASSIVE FOR TARGET VECTOR
023606,000218: 36,2214           77745        CONCAUL            DLOAD                                          
023607,000219: 36,2215           03663                                    TTPI                                  
023608,000220: 36,2216           43015                           DAD      BON                                   
023609,000221: 36,2217           03752                                    TF                                    
023610,000222: 36,2220           01312                                    AVFLAG                                
023611,000223: 36,2221           74226                                    ADVCSM                                
023612,000224: 36,2222           34041                           STCALL   TDEC1                                 
023613,000225: 36,2223           27135                                    LEMCONIC                              
023614,000226: 36,2224           77650                           GOTO                                           
023615,000227: 36,2225           74230                                    JUNCT3                                
023616,000228: 36,2226           34041        ADVCSM             STCALL   TDEC1                                 
023617,000229: 36,2227           27123                                    CSMCONIC                              
023618,000230:                                                                                                  #  SAVE BACK VALUES OF HP AND DELVEE
023619,000231: 36,2230           77775        JUNCT3             VLOAD                                          
023620,000232: 36,2231           00007                                    VATT                                  
023621,000233: 36,2232           27640                           STOVL    VPASS4                                
023622,000234: 36,2233           00001                                    RATT                                  
023623,000235: 36,2234           03632                           STORE    RPASS4                                
023624,000236: 36,2235           17415                           STODL    RTARG                                 
023625,000237: 36,2236           03752                                    TF                                    
023626,000238: 36,2237           17423                           STODL    DELLT4                                
023627,000239: 36,2240           02625                                    HP                                    
023628,000240: 36,2241           16631                           STODL    HPO                                   
023629,000241: 36,2242           02623                                    DELVEE                                
023630,000242: 36,2243           16633                           STODL    DELVEO                                
023631,000243:                                                                                                  #  PREPARE FOR LAMBERT
023632,000244: 36,2244           03663                                    TTPI                                  
023633,000245: 36,2245           17503                           STODL    INTIME                                
023634,000246: 36,2246           03746                                    XRS                                   
023635,000247: 36,2247           17746                           STODL    RTX1                                  
023636,000248: 36,2250           15334                                    HI6ZEROS                              
023637,000249: 36,2251           65201                           SETPD    PDDL                                  
023638,000250: 36,2252           00001                                    0D                                    
023639,000251: 36,2253           33122                                    EPSFOUR                               
023640,000252: 36,2254           77715                           PDVL                                           
023641,000253: 36,2255           03540                                    RACT3                                 
023642,000254: 36,2256           27570                           STOVL    RINIT                                 
023643,000255: 36,2257           03546                                    VACT3                                 
023644,000256: 36,2260           37576                           STCALL   VINIT                                 
023645,000257: 36,2261           22000                                    INITVEL                               
023646,000258:                                                                                                  #  COMPUTE H ET CETERA
023647,000259: 36,2262           52375                           VLOAD    VSU                                   
023648,000260: 36,2263           03620                                    VTPRIME                               
023649,000261: 36,2264           03640                                    VPASS4                                
023650,000262: 36,2265           41446                           ABVAL    PUSH                                  
023651,000263: 36,2266           26637                           STOVL    RELDELV                               #  /V2-VP(TPI+TF)/
023652,000264: 36,2267           03646                                    DELVEET3                              #  V1-VA
023653,000265: 36,2270           77646                           ABVAL                                          #  /V1-VA/
023654,000266: 36,2271           02635                           STORE    MAGVTPI                               
023655,000267: 36,2272           45415                           DAD      STADR                                 
023656,000268: 36,2273           61154                           STODL    DELVEE                                
023657,000269: 36,2274           03746                                    XRS                                   
023658,000270: 36,2275           24047                           STOVL    X1                                    
023659,000271: 36,2276           03612                                    VIPRIME                               
023660,000272: 36,2277           77657                           VSR*                                           
023661,000273: 36,2300           57176                                    0,2                                   
023662,000274: 36,2301           26746                           STOVL    VVEC                                  
023663,000275: 36,2302           03540                                    RACT3                                 
023664,000276: 36,2303           77657                           VSR*                                           
023665,000277: 36,2304           57176                                    0,2                                   
023666,000278: 36,2305           36657                           STCALL   RVEC                                  
023667,000279: 36,2306           45163                                    PERIAPO                               
023668,000280: 36,2307           71354                           LXA,2    DLOAD                                 
023669,000281: 36,2310           03746                                    XRS        +1                         
023670,000282: 36,2311           77657                           SL*                                            
023671,000283: 36,2312           57576                                    0,2                                   
023672,000284: 36,2313           02625                           STORE    HP                                    
023673,000285:                                                                                                  #  ITSWICH DENOTES INTERPOLATION -- SOLUTION ACCEPTANCE IS FORCED
023674,000286: 36,2314           71214                           BON      DLOAD                                 
023675,000287: 36,2315           03701                                    ITSWICH                               
023676,000288: 36,2316           74427                                    ENDEN                                 
023677,000289: 36,2317           02321                                    HPERMIN                               
023678,000290: 36,2320           50025                           DSU      BMN                                   
023679,000291: 36,2321           02625                                    HP                                    
023680,000292: 36,2322           74365                                    HALFSAFE                              
023681,000293: 36,2323           45325                           PDDL     DSU                                   #  WAS PERICENTER ALT SAFE
023682,000294: 36,2324           02321                                    HPERMIN                               
023683,000295: 36,2325           02631                                    HPO                                   
023684,000296: 36,2326           45240                           BMN      DSU                                   #  (HPLIM-HPO)-(HPLIM-HP)=HP-HPO
023685,000297: 36,2327           74344                                    INTERP                                #  SOLUTION AT HAND
023686,000298: 36,2330           71240                           BMN      DLOAD                                 
023687,000299: 36,2331           73254                                    ALARUMS                               #  ITS GETTING WORSE - SOUND THE ALARM
023688,000300: 36,2332           33130                                    CDSEC                                 
023689,000301: 36,2333           57414        JUNCT1             BOFF     DCOMP                                 #  OFF IS PLUS ON IS MINUS
023690,000302: 36,2334           00356                                    KFLAG                                 
023691,000303: 36,2335           74336                                    +1                                    
023692,000304: 36,2336           03744                           STORE    DELTEE                                
023693,000305: 36,2337           43345        JUNCT2             DLOAD    DAD                                   
023694,000306: 36,2340           03744                                    DELTEE                                
023695,000307: 36,2341           03752                                    TF                                    
023696,000308: 36,2342           37752                           STCALL   TF                                    
023697,000309: 36,2343           74173                                    BIS                                   #  RECYCLE
023698,000310: 36,2344           45214        INTERP             SET      DSU                                   #  HP-HPO
023699,000311: 36,2345           03461                                    ITSWICH                               
023700,000312: 36,2346           65301                           NORM     PDDL                                  
023701,000313: 36,2347           00047                                    X1                                    
023702,000314: 36,2350           33146                                    DFTMOON                               
023703,000315: 36,2351           45215                           DAD      DSU                                   
023704,000316: 36,2352           02321                                    HPERMIN                               
023705,000317: 36,2353           02625                                    HP                                    
023706,000318: 36,2354           70501                           NORM     SR1                                   
023707,000319: 36,2355           00050                                    X2                                    
023708,000320: 36,2356           56264                           XSU,2    DDV                                   
023709,000321: 36,2357           00046                                    X1                                    
023710,000322: 36,2360           53605                           DMP      SR*                                   
023711,000323: 36,2361           03744                                    DELTEE                                
023712,000324: 36,2362           57177                                    0          -1,2                       
023713,000325: 36,2363           37744                           STCALL   DELTEE                                
023714,000326: 36,2364           74337                                    JUNCT2                                
023715,000327: 36,2365           45325        HALFSAFE           PDDL     DSU                                   #  SAVE HP-HPLIM FOR POSSIBLE
023716,000328: 36,2366           02623                                    DELVEE                                
023717,000329: 36,2367           02633                                    DELVEO                                #  SAVE THIS TOO
023718,000330: 36,2370           51406                           PUSH     ABS                                   
023719,000331: 36,2371           50025                           DSU      BMN                                   
023720,000332: 36,2372           33144                                    LIMVEL                                #  2 FT PS
023721,000333: 36,2373           74427                                    ENDEN                                 
023722,000334: 36,2374           45345                           DLOAD    DSU                                   
023723,000335: 36,2375           02321                                    HPERMIN                               
023724,000336: 36,2376           02631                                    HPO                                   
023725,000337: 36,2377           77725                           PDDL                                           
023726,000338: 36,2400           71240                           BMN      DLOAD                                 
023727,000339: 36,2401           74410                                    LRGRDVO                               
023728,000340: 36,2402           71244                           BPL      DLOAD                                 
023729,000341: 36,2403           74344                                    INTERP                                
023730,000342: 36,2404           03744                                    DELTEE                                
023731,000343: 36,2405           57542                           SR1      DCOMP                                 
023732,000344: 36,2406           37744                           STCALL   DELTEE                                
023733,000345: 36,2407           74337                                    JUNCT2                                
023734,000346: 36,2410           77745        LRGRDVO            DLOAD                                          
023735,000347: 36,2411           71240                           BMN      DLOAD                                 
023736,000348: 36,2412           74337                                    JUNCT2                                
023737,000349: 36,2413           33132                                    CLSEC                                 
023738,000350: 36,2414           77650                           GOTO                                           
023739,000351: 36,2415           74333                                    JUNCT1                                
023740,000352:                                                                                                  #  TIME RAN OUT ASSUME SOLUTION IF SAFE PERICENTER
023741,000353: 36,2416           45345        RNGETEST           DLOAD    DSU                                   
023742,000354: 36,2417           02625                                    HP                                    
023743,000355: 36,2420           02321                                    HPERMIN                               
023744,000356: 36,2421           71240                           BMN      DLOAD                                 
023745,000357: 36,2422           73254                                    ALARUMS                               
023746,000358: 36,2423           03752                                    TF                                    
023747,000359: 36,2424           77625                           DSU                                            
023748,000360: 36,2425           03744                                    DELTEE                                
023749,000361: 36,2426           03752                           STORE    TF                                    #  TIME OF SOLUTION
023750,000362: 36,2427           77775        ENDEN              VLOAD                                          
023751,000363: 36,2430           03620                                    VTPRIME                               
023752,000364: 36,2431           65241                           DOT      PDDL                                  #  SG2 WITH MAGNITUDE
023753,000365: 36,2432           03632                                    RPASS4                                
023754,000366: 36,2433           02637                                    RELDELV                               
023755,000367: 36,2434           45565                           SIGN     STADR                                 #  NOW SIGN(RELDELV)=SIGN(SG2)
023756,000368: 36,2435           41140                           STCALL   RELDELV                               
023757,000369: 36,2436           16441                                    TRANSANG                              #  COMPUTE OMEGA T, CENTRAL ANGLE
023758,000370: 36,2437           50375                           VLOAD    DOT                                   
023759,000371: 36,2440           03540                                    RACT3                                 
023760,000372: 36,2441           03612                                    VIPRIME                               #  SG1
023761,000373: 36,2442           51165                           SIGN     BPL                                   #  IF POSITIVE THEN SG1 = SG2 OTHERWISE
023762,000374: 36,2443           02637                                    RELDELV                               
023763,000375: 36,2444           74454                                    USEKAY                                #  SIGN(SG2-SG1)=SIGN(SG2)=SIGN(RELDELV)
023764,000376: 36,2445           57535                           SLOAD    DCOMP                                 
023765,000377: 36,2446           33117                                    DECTWO                                
023766,000378: 36,2447           51165                           SIGN     BPL                                   
023767,000379: 36,2450           02637                                    RELDELV                               
023768,000380: 36,2451           74462                                    NEXUS                                 
023769,000381: 36,2452           52076                           DCOMP    GOTO                                  
023770,000382: 36,2453           74460                                    USEKAY     +4                         
023771,000383: 36,2454           43135        USEKAY             SLOAD    BON                                   
023772,000384: 36,2455           33117                                    DECTWO                                
023773,000385: 36,2456           00316                                    KFLAG                                 
023774,000386: 36,2457           74462                                    NEXUS                                 
023775,000387: 36,2460           77625                           DSU                                            
023776,000388: 36,2461           36157                                    P21ONENN                              
023777,000389: 36,2462           17766        NEXUS              STODL    NN1                                   
023778,000390: 36,2463           02625                                    HP                                    
023779,000391: 36,2464           36641                           STCALL   POSTTPI                               
023780,000392: 36,2465           03657                                    QTEMP                                 
023781,000393: 07,2441                                           BANK     07                                    
023782,000394: 07,2000                                           SETLOC   XANG                                  
023783,000395: 07,2000                                           BANK                                           
023784,000396: 07,2441                                           COUNT    07/XANG                               
023785,000397: 
023786,000398:                                                                                                  #  CENTRAL ANGLE SUBROUTINE
023787,000399: 
023788,000400:                                                                                                  #  THIS SUBROUTINE COMPUTES THE CENTRAL ANGLE OF TRAVEL OF THE
023789,000401:                                                                                                  #  PASSIVE VEHICLE DURING THE TRANSFER.
023790,000402: 
023791,000403: 07,2441           40220        TRANSANG           STQ      SETPD                                 
023792,000404: 07,2442           02370                                    SUBEXIT                               
023793,000405: 07,2443           00001                                    0                                     
023794,000406: 07,2444           73150                           LXA,1    LXA,2                                 
023795,000407: 07,2445           03745                                    XRS                                   
023796,000408: 07,2446           03746                                    XRS        +1                         
023797,000409: 07,2447           53775                           VLOAD    VSR*                                  
023798,000410: 07,2450           03640                                    VPASS4                                
023799,000411: 07,2451           57176                                    0,2                                   
023800,000412: 07,2452           22746                           STODL*   VVEC                                  
023801,000413: 07,2453           11742                                    MUTABLE    +2,1                       
023802,000414: 07,2454           53715                           PDVL     VSR*                                  #  SQRT MU (+18 OR +15)                  00D
023803,000415: 07,2455           03632                                    RPASS4                                
023804,000416: 07,2456           57176                                    0,2                                   
023805,000417: 07,2457           64646                           ABVAL    PDDL*                                 #  MAGNITUDE OF R        (+29 OR +27)    02D
023806,000418: 07,2460           11740                                    MUTABLE,1                             
023807,000419: 07,2461           47515                           PDVL     VSQ                                   #  1/MU                  (+34 OR +28)    04D
023808,000420: 07,2462           02746                                    VVEC                                  
023809,000421: 07,2463           57301                           NORM     DMPR                                  #  PUSH LIST AT 02D
023810,000422: 07,2464           00047                                    X1                                    
023811,000423: 07,2465           53605                           DMP      SRR*                                  
023812,000424: 07,2466           00003                                    02D                                   
023813,000425: 07,2467           21576                                    0          -3,1                       
023814,000426: 07,2470           77621                           BDSU                                           #  R V**/MU              (+6)
023815,000427: 07,2471           11616                                    D1/32                                 
023816,000428: 07,2472           65301                           NORM     PDDL                                  
023817,000429: 07,2473           00047                                    X1                                    #  (2 - R V**/MU)        (+6-N)
023818,000430: 07,2474           56362                           SR1R     DDV                                   #  MAGNITUDE OF R        (+30 OR +28)
023819,000431: 07,2475           41457                           SL*      PUSH                                  #  R/(2 - R V**/MU)      (+29 OR +27)    02D
023820,000432: 07,2476           20174                                    0          -5,1                       
023821,000433: 07,2477           75542                           SR1      SQRT                                  
023822,000434: 07,2500           77605                           DMP                                            
023823,000435: 07,2501           65301                           NORM     PDDL                                  #  ASUBP***                              00D
023824,000436: 07,2502           00047                                    X1                                    
023825,000437: 07,2503           56342                           SR1      DDV                                   
023826,000438: 07,2504           53605                           DMP      SL*                                   
023827,000439: 07,2505           03752                                    TF                                    
023828,000440: 07,2506           20201                                    0,1                                   
023829,000441: 07,2507           60325                           PDDL     NORM                                  
023830,000442: 07,2510           11630                                    2PISC                                 
023831,000443: 07,2511           00047                                    X1                                    
023832,000444: 07,2512           56325                           PDDL     DDV                                   
023833,000445: 07,2513           77657                           SL*                                            
023834,000446: 07,2514           20176                                    0          -3,1                       #  CENTANG = (SQRT(MU/ASUP***)TF)
023835,000447: 07,2515           37754                           STCALL   CENTANG                               #  IN REVOLUTIONS B-0
023836,000448: 07,2516           02370                                    SUBEXIT                               
023837,000449: 35,3151                                           BANK     35                                    
023838,000450: 35,2000                                           SETLOC   P17S1                                 
023839,000451: 35,2000                                           BANK                                           
023840,000452: 35,3151                                           COUNT    35/P17                                
023841,000453: 
023842,000454:                                                                                                  #  TPI SEARCH DISPLAY ROUTINE
023843,000455: 
023844,000456: 35,3151           04627        P17                TC       AVFLAGA                               #  AVFLAG = CSM, SET TRACK + UPDATE FLAGS
023845,000457: 35,3152           03154                           TC       P17.1                                 
023846,000458: 35,3153           04642        P77                TC       AVFLAGP                               #  AVFLAG = LEM, SET TRACK + UPDATE FLAGS
023847,000459: 35,3154           04647        P17.1              TC       P20FLGON                              #        SET UPDATE FLAG
023848,000460: 35,3155           34614                           CAF      V06N37                                #        DISPLAY TTPI TIME
023849,000461: 35,3156           04575                           TC       VNPOOH                                
023850,000462: 35,3157           06006                           TC       INTPRET                               
023851,000463: 35,3160           45014                           CLEAR    CALL                                  
023852,000464: 35,3161           00670                                    UPDATFLG                              
023853,000465: 35,3162           74012                                    S17.1                                 #  UPDATE STATE VECTORS TO TTPI
023854,000466: 35,3163           76014                           SET      AXT,1                                 
023855,000467: 35,3164           00470                                    UPDATFLG                              
023856,000468: 35,3165           00002                           DEC      2          B-14                       #  DELTA H = 2 K POSITIVE, KFLAG OFF
023857,000469: 35,3166           76014                           BOFF     AXT,1                                 
023858,000470: 35,3167           00356                                    KFLAG                                 
023859,000471: 35,3170           73172                                    +2                                    
023860,000472: 35,3171           00001                           DEC      1          B-14                       #  DELTA H = 1 K NEGATIVE, KFLAG ON
023861,000473: 35,3172           77530                           SXA,1    EXIT                                  
023862,000474: 35,3173           01132                                    OPTION2                               
023863,000475: 35,3174           33263                           CAF      V06N72                                #  DISPLAY PHI, DELTA H, SEARCH OPTION K
023864,000476: 35,3175           03237                           TC       VNCOMP17                              
023865,000477: 35,3176           06006                           TC       INTPRET                               
023866,000478: 35,3177           43014                           CLEAR    SET                                   
023867,000479: 35,3200           00670                                    UPDATFLG                              
023868,000480: 35,3201           00076                                    KFLAG                                 
023869,000481: 35,3202           45335                           SLOAD    DSU                                   
023870,000482: 35,3203           01133                                    OPTION2                               #  RESET KFLAG ON FOR OPTION =1
023871,000483: 35,3204           36157                                    P21ONENN                              #             OFF FOR OPTION =2
023872,000484: 35,3205           43030                           BHIZ     CLEAR                                 
023873,000485: 35,3206           73210                                    +2                                    
023874,000486: 35,3207           00276                                    KFLAG                                 
023875,000487: 35,3210           46135                           SLOAD    BHIZ                                  
023876,000488: 35,3211           03747                                    XRS        +1                         
023877,000489: 35,3212           73216                                    +4                                    
023878,000490: 35,3213           52145                           DLOAD    GOTO                                  
023879,000491: 35,3214           33126                                    HPL                                   
023880,000492: 35,3215           73220                                    P17.2                                 
023881,000493: 35,3216           77745                           DLOAD                                          
023882,000494: 35,3217           33124                                    HPE                                   
023883,000495: 35,3220           36321        P17.2              STCALL   HPERMIN                               
023884,000496: 35,3221           74070                                    S17.2                                 
023885,000497: 35,3222           77414                           SET      EXIT                                  
023886,000498: 35,3223           00470                                    UPDATFLG                              
023887,000499: 35,3224           34616        P17.3              CAF      V06N58                                #  DISPLAY DELTA VTPI, DELTA VTPF, AND H
023888,000500: 35,3225           03237                           TC       VNCOMP17                              
023889,000501: 35,3226           34615                           CAF      V06N55                                #  DISPLAY PERICENTER CODE AND CENTRAL ANG,
023890,000502: 35,3227           04676                           TC       BANKCALL                              
023891,000503: 35,3230           21057                           CADR     GOFLASHR                              
023892,000504: 35,3231           04106                           TC       GOTOPOOH                              #  TERMINATE PROGRAM
023893,000505: 35,3232           04106                           TC       GOTOPOOH                              #  END PROGRAM
023894,000506: 35,3233           03154                           TC       P17.1                                 #  RECYCLE WITH NEW TTPI OR SEARCH OPTION
023895,000507: 35,3234           35032                           CAF      TWO                                   #  BLANK R2
023896,000508: 35,3235           05542                           TC       BLANKET                               
023897,000509: 35,3236           15233                           TCF      ENDOFJOB                              
023898,000510: 35,3237  E4,1767                                  EBANK=   RTRN                                  
023899,000511: 
023900,000512: 35,3237           00006        VNCOMP17           EXTEND                                         
023901,000513: 35,3240           23766                           QXCH     QSAVED                                
023902,000514: 35,3241           55765                           TS       VERBNOUN                              
023903,000515: 35,3242           31765                           CA       VERBNOUN                              
023904,000516: 35,3243           04676                           TCR      BANKCALL                              
023905,000517: 35,3244           20720                           CADR     GOFLASH                               
023906,000518: 35,3245           04106                           TC       GOTOPOOH                              #  TERMINATE PROGRAM
023907,000519: 35,3246           01766                           TC       QSAVED                                #  PROCEED
023908,000520: 35,3247           40154                           CS       MPAC                                  #  RECYCLE WITH NEW TPI TIME
023909,000521: 35,3250           65026                           AD       BIT6                                  #  OR PROCEED WITH NEW SEARCH OPTION
023910,000522: 35,3251           00006                           EXTEND                                         
023911,000523: 35,3252           13154                           BZF      P17.1                                 
023912,000524: 35,3253           03242                           TC       VNCOMP17   +3                         
023913,000525: 35,3254           77414        ALARUMS            SET      EXIT                                  
023914,000526: 35,3255           00470                                    UPDATFLG                              
023915,000527: 35,3256           05664                           TC       ALARM                                 
023916,000528: 35,3257           00124                           OCT      00124                                 #  NO SAFE PERCENTER IN THIS SECTOR
023917,000529: 35,3260           35064                           CAF      V05N09                                
023918,000530: 35,3261           03237                           TC       VNCOMP17                              
023919,000531: 35,3262           04106                           TC       GOTOPOOH                              #  PROCEED ILLEGAL TERMINATE PROGRAM
023920,000532: 35,3263           01510        V06N72             VN       0672                                  
023921,000533: 

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