Source Code

This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure!

033795,000002:                                                                                                  ## Copyright:   Public domain.
033796,000003:                                                                                                  ## Filename:    THROTTLE_CONTROL_ROUTINES.agc
033797,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
033798,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
033799,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
033800,000007:                                                                                                  ## Assembler:   yaYUL
033801,000008:                                                                                                  ## Contact:     HARTMUTH GUTSCHE <hgutsche@xplornet.com>.
033802,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
033803,000010:                                                                                                  ## Pages:       793-797
033804,000011:                                                                                                  ## Mod history: 2009-05-20 HG   Transcribed from page images.
033805,000012:                                                                                                  ##              2010-12-31 JL   Fixed page number comments.
033806,000013:                                                                                                  ##              2016-12-16 RSB  Proofed text comments with octopus/ProoferComments
033807,000014:                                                                                                  ##                              and corrected the errors found.
033808,000015:                                                                                                  ##              2017-03-03 RSB  Snapshot of Luminary 99 Rev 1. 
033809,000016:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
033810,000017:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
033811,000018: 

Page 793

033813,000020: 31,2216                                           BANK     31                                    
033814,000021: 31,2000                                           SETLOC   FTHROT                                
033815,000022: 31,2000                                           BANK                                           
033816,000023: 31,2216  E7,1612                                  EBANK=   PIF                                   
033817,000024: 31,2216                                           COUNT*   $$/THROT                              
033818,000025: 
033819,000026:                                                                                                  #  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
033820,000027:                                                                                                  #  HERE FC, DESIRED THRUST, AND FP, PRESENT THRUST, UNWEIGHTED, ARE COMPUTED.
033821,000028: 
033822,000029: 31,2216           31246        THROTTLE           CA       ABDELV                                #  COMPUTE PRESENT ACCELERATION IN UNITS OF
033823,000030: 31,2217           00006                           EXTEND                                         #  2(-4) M/CS/CS, SAVING SERVICER TROUBLE
033824,000031: 31,2220           72417                           MP       /AF/CNST                              
033825,000032: 31,2221           00006                 +3        EXTEND                                         
033826,000033: 31,2222           23607                           QXCH     RTNHOLD                               
033827,000034: 31,2223           02400        AFDUMP             TC       MASSMULT                              
033828,000035: 31,2224           53470                           DXCH     FP                                    #  FP = PRESENT THRUST
033829,000036: 31,2225           00006                           EXTEND                                         
033830,000037: 31,2226           31464                           DCA      /AFC/                                 
033831,000038: 31,2227           02400                           TC       MASSMULT                              
033832,000039: 31,2230           55615                           TS       FC                                    #  FC = THRUST DESIRED BY GUIDANCE
033833,000040: 31,2231           53466                           DXCH     FCODD                                 #  FCODD = WHAT IT IS GOING TO GET
033834,000041: 
033835,000042:                                                                                                  #  IF IT HAS BEEN LESS THAN 3 SECONDS SINCE THE LAST THROTTLING, AUGMENT FP USING THE FWEIGHT CALCULATED THEN.
033836,000043: 
033837,000044: 31,2232           41617                           CS       TTHROT                                #  THIS CODING ASSUMES A FLATOUT WITHIN
033838,000045: 31,2233           60025                           AD       TIME1                                 #        80 SECONDS BEFORE FIRST THROTTLE CALL
033839,000046: 31,2234           74733                           MASK     POSMAX                                
033840,000047: 31,2235           40000                           COM                                            
033841,000048: 31,2236           65002                           AD       3SECS                                 
033842,000049: 31,2237           00006                           EXTEND                                         
033843,000050: 31,2240           62244                           BZMF     WHERETO                               #  BRANCH IF (TIME1-TTHROT +1) > 3 SECONDS
033844,000051: 31,2241           00006                           EXTEND                                         
033845,000052: 31,2242           31611                           DCA      FWEIGHT                               
033846,000053: 31,2243           21470                           DAS      FP                                    
033847,000054: 
033848,000055:                                                                                                  #      THIS LOGIC DETERMINES THE THROTTLING IN THE REGION 10% - 94%.  THE MANUAL THROTTLE, NOMINALLY SET AT
033849,000056:                                                                                                  #  MINIMUM BY ASTRONAUT OR MISSION CONTROL PROGRAMS, PROVIDES THE LOWER BOUND.  A STOP IN THE THROTTLE HARDWARE
033850,000057:                                                                                                  #  PROVIDES THE UPPER.
033851,000058: 
033852,000059: 31,2244           35014        WHERETO            CA       EBANK5                                #  INITIALIZE L*WCR*T AND H*GHCR*T FROM
033853,000060: 31,2245           54003                           TS       EBANK                                 #        PAD LOADED ERASABLES IN W-MATRIX

Page 794

033855,000062: 31,2246  E5,1506                                  EBANK=   LOWCRIT                               
033856,000063: 31,2246           00006                           EXTEND                                         
033857,000064: 31,2247           31507                           DCA      LOWCRIT                               
033858,000065: 31,2250           52131                           DXCH     L*WCR*T                               
033859,000066: 31,2251           35016                           CA       EBANK7                                
033860,000067: 31,2252           54003                           TS       EBANK                                 
033861,000068: 31,2253  E7,1612                                  EBANK=   PIF                                   
033862,000069: 31,2253           44755                           CS       ZERO                                  #  INITIALIZE PIFPSET
033863,000070: 31,2254           55606                           TS       PIFPSET                               
033864,000071: 31,2255           40131                           CS       H*GHCR*T                              
033865,000072: 31,2256           61620                           AD       FCOLD                                 
033866,000073: 31,2257           00006                           EXTEND                                         
033867,000074: 31,2260           62272                           BZMF     LOWFCOLD                              #  BRANCH IF FCOLD < OR = HIGHCRIT
033868,000075: 31,2261           40130                           CS       L*WCR*T                               
033869,000076: 31,2262           61465                           AD       FCODD                                 
033870,000077: 31,2263           00006                           EXTEND                                         
033871,000078: 31,2264           62267                           BZMF     FCOMPSET                              #  BRANCH IF FC < OR = LOWCRIT
033872,000079: 31,2265           31467                           CA       FP                                    #  SEE NOTE 1
033873,000080: 31,2266           12277                           TCF      FLATOUT1                              
033874,000081: 
033875,000082: 31,2267           42002        FCOMPSET           CS       FMAXODD                               #  SEE NOTE 2
033876,000083: 31,2270           61467                           AD       FP                                    
033877,000084: 31,2271           12301                           TCF      FLATOUT2                              
033878,000085: 
033879,000086: 31,2272           40131        LOWFCOLD           CS       H*GHCR*T                              
033880,000087: 31,2273           61465                           AD       FCODD                                 
033881,000088: 31,2274           00006                           EXTEND                                         
033882,000089: 31,2275           62302                           BZMF     DOPIF                                 #  BRANCH IF FC < OR = HIGHCRIT
033883,000090: 
033884,000091: 31,2276           32003                           CA       FMAXPOS                               #  NO:  THROTTLE-UP
033885,000092: 31,2277           53466        FLATOUT1           DXCH     FCODD                                 
033886,000093: 31,2300           34737                           CA       FEXTRA                                
033887,000094: 31,2301           55606        FLATOUT2           TS       PIFPSET                               
033888,000095: 
033889,000096:                                                                                                  #  NOTE 1        FC IS SET EQUAL TO FP SO PIF WILL BE ZERO.  THIS IS DESIRABLE
033890,000097:                                                                                                  #                AS THERE IS ACTUALLY NO THROTTLE CHANGE.
033891,000098: 
033892,000099:                                                                                                  #  NOTE2         HERE, SINCE WE ARE ABOUT TO RETURN TO THE THROTTLEABLE REGION
033893,000100:                                                                                                  #                (BELOW 55%) THE QUANTITY -(FMAXODD-FP) IS COMPUTED AND PUT
033894,000101:                                                                                                  #                INTO PIFPSET TO COMPENSATE FOR THE DIFFERENCE BETWEEN THE
033895,000102:                                                                                                  #                NUMBER OF BITS CORRESPONDING TO FULL THROTTLE (FMAXODD) AND THE
033896,000103:                                                                                                  #                NUMBER CORRESPONDING TO ACTUAL THRUST (FP).  THUS THE TOTAL
033897,000104:                                                                                                  #                THROTTLE COMMAND PIF = FC - FP - (FMAXODD - FP) = FC - FMAXODD.
033898,000105: 
033899,000106: 31,2302           03740        DOPIF              TC       FASTCHNG                              
033900,000107: 31,2303           00006                           EXTEND                                         
033901,000108: 31,2304           31466                           DCA      FCODD                                 
033902,000109: 31,2305           55620                           TS       FCOLD                                 
033903,000110: 31,2306           53613                           DXCH     PIF                                   
033904,000111: 31,2307           00006                           EXTEND                                         

Page 795

033906,000113: 31,2310           41470                           DCS      FP                                    
033907,000114: 31,2311           21613                           DAS      PIF                                   #  PIF = FC - FP, NEVER EQUALS +0
033908,000115: 
033909,000116: 31,2312           31612        DOIT               CA       PIF                                   
033910,000117: 31,2313           61606                           AD       PIFPSET                               #  ADD IN PIFPSET, WITHOUT CHANGING PIF
033911,000118: 31,2314           55614                           TS       PSEUDO55                              
033912,000119: 31,2315           54055                           TS       THRUST                                
033913,000120: 31,2316           34750                           CAF      BIT4                                  
033914,000121: 31,2317           00006                           EXTEND                                         
033915,000122: 31,2320           05014                           WOR      CHAN14                                
033916,000123: 31,2321           30025                           CA       TIME1                                 
033917,000124: 31,2322           55617                           TS       TTHROT                                
033918,000125: 
033919,000126:                                                                                                  #  SINCE /AF/ IS NOT AN INSTANTANEOUS ACCELERATION, BUT RATHER AN "AVERAGE" OF THE ACCELERATION LEVELS DURING
033920,000127:                                                                                                  #  THE PRECEEDING PIPA INTERVAL, AND SINCE FP IS COMPUTED DIRECTLY FROM /AF/, FP IN ORDER TO CORRESPOND TO THE
033921,000128:                                                                                                  #  ACTUAL THRUST LEVEL AT THE END OF THE INTERVAL MUST BE WEIGHTED BY
033922,000129: 
033923,000130:                                                                                                  #                  PIF(PPROCESS + TL)     PIF /PIF/
033924,000131:                                                                                                  #        FWEIGHT = ------------------ + -------------
033925,000132:                                                                                                  #                       PGUID           2 PGUID FRATE
033926,000133: 
033927,000134:                                                                                                  #  WHERE PPROCESS IS THE TIME BETWEEN PIPA READING AND THE START OF THROTTLING, PGUID IS THE GUIDANCE PERIOD, AND
033928,000135:                                                                                                  #  FRATE IS THE THROTTLING RATE (32 UNITS PER CENTISECOND).  PGUID IS EITHER 1 OR 2 SECONDS.  THE "TL" IN THE
033929,000136:                                                                                                  #  FIRST TERM REPRESENTS THE ENGINE'S RESPONSE LAG.  HERE FWEIGHT IS COMPUTED FOR USE NEXT PASS.
033930,000137: 
033931,000138: 31,2323           31762                           CA       THISTPIP   +1                         #  INITIALIZE FWEIGHT COMP AS IF FOR P66
033932,000139: 31,2324           54130                           TS       BUF                                   
033933,000140: 
033934,000141: 31,2325           41011                           CS       MODREG                                #  ARE WE IN FACT IN P66?
033935,000142: 31,2326           62501                           AD       DEC66                                 
033936,000143: 31,2327           00006                           EXTEND                                         
033937,000144: 31,2330           12335                           BZF      FWCOMP                                #  YES
033938,000145: 
033939,000146: 31,2331           31235                           CA       PIPTIME    +1                         #  NO:  INITIALIZE FOR TWO SECOND PERIOD
033940,000147: 31,2332           54130                           TS       BUF                                   
033941,000148: 31,2333           35003                           CAF      4SECS                                 
033942,000149: 31,2334           12336                           TCF      FWCOMP     +1                         
033943,000150: 
033944,000151: 31,2335           35000        FWCOMP             CAF      2SECS                                 
033945,000152: 31,2336           54002                 +1        TS       Q                                     
033946,000153: 31,2337           00006                           EXTEND                                         
033947,000154: 31,2340           74746                           MP       BIT6                                  
033948,000155: 31,2341           22131                           LXCH     BUF        +1                         
033949,000156: 31,2342           40130                           CS       BUF                                   #  TIME OF LAST PIPA READING.
033950,000157: 31,2343           60025                           AD       TIME1                                 
033951,000158: 31,2344           62004                           AD       THROTLAG                              #  COMPENSATE FOR ENGINE RESPONSE LAG
033952,000159: 31,2345           74357                           MASK     LOW8                                  #  MAKE SURE SMALL AND POSITIVE
033953,000160: 31,2346           22007                           ZL                                             
033954,000161: 31,2347           00006                           EXTEND                                         

Page 796

033956,000163: 31,2350           10002                           DV       Q                                     
033957,000164: 31,2351           00006                           EXTEND                                         
033958,000165: 31,2352           71612                           MP       PIF                                   
033959,000166: 31,2353           60000                           DOUBLE                                         
033960,000167: 31,2354           53611                           DXCH     FWEIGHT                               
033961,000168: 31,2355           11612                           CCS      PIF                                   
033962,000169: 31,2356           64753                           AD       ONE                                   
033963,000170: 31,2357           12361                           TCF      +2                                    
033964,000171: 31,2360           64753                           AD       ONE                                   
033965,000172: 31,2361           00006                           EXTEND                                         
033966,000173: 31,2362           71612                           MP       PIF                                   
033967,000174: 31,2363           00006                           EXTEND                                         
033968,000175: 31,2364           10131                           DV       BUF        +1                         
033969,000176: 31,2365           22007                           ZL                                             
033970,000177: 31,2366           21611                           DAS      FWEIGHT                               
033971,000178: 
033972,000179: 31,2367           01607        THDUMP             TC       RTNHOLD                               
033973,000180: 
033974,000181:                                                                                                  #  FLATOUT THROTTLES UP THE DESCENT ENGINE, AND IS CALLED AS A BASIC SUBROUTINE.
033975,000182: 
033976,000183: 31,2370           34737        FLATOUT            CAF      BIT13                                 #  4096 PULSES
033977,000184: 31,2371           55606        WHATOUT            TS       PIFPSET                               #  USE PIFPSET SO FWEIGHT WILL BE ZERO
033978,000185: 31,2372           44755                           CS       ZERO                                  
033979,000186: 31,2373           55620                           TS       FCOLD                                 
033980,000187: 31,2374           55612                           TS       PIF                                   
033981,000188: 31,2375           00006                           EXTEND                                         
033982,000189: 31,2376           23607                           QXCH     RTNHOLD                               
033983,000190: 31,2377           12312                           TCF      DOIT                                  
033984,000191: 
033985,000192:                                                                                                  #  MASSMULT SCALES ACCELERATION, ARRIVING IN A AND L IN UNITS OF 2(-4) M/CS/CS, TO FORCE IN PULSE UNITS.
033986,000193: 
033987,000194: 31,2400           00006        MASSMULT           EXTEND                                         
033988,000195: 31,2401           22130                           QXCH     BUF                                   
033989,000196: 31,2402           52155                           DXCH     MPAC                                  
033990,000197: 31,2403           07103                           TC       DMP                                   
033991,000198: 31,2404           01244                           ADRES    MASS                                  
033992,000199: 31,2405           07103                           TC       DMP                                   #  LEAVES PROPERLY SCALED FORCE IM MPAC
033993,000200: 31,2406           02005                           ADRES    SCALEFAC                              
033994,000201: 31,2407           07257                           TC       TPAGREE                               
033995,000202: 31,2410           30154                           CA       MPAC                                  
033996,000203: 31,2411           00006                           EXTEND                                         
033997,000204: 31,2412           12415                           BZF      +3                                    
033998,000205: 31,2413           34733                           CAF      POSMAX                                
033999,000206: 31,2414           00130                           TC       BUF                                   
034000,000207: 31,2415           52156                           DXCH     MPAC       +1                         
034001,000208: 31,2416           00130                           TC       BUF                                   

Page 797

034003,000210:                                                                                                  #  CONSTANTS:-
034004,000211: 
034005,000212: 31,2417     4737               FEXTRA             =        BIT13                                 #  FEXT +5.13309020 E+4
034006,000213: 
034007,000214: 31,2417           04143        /AF/CNST           DEC      .13107                                
034008,000215: 
034009,000216:                                                                                                  #  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

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