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!

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

Page 793

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

Page 794

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

Page 795

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

Page 796

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

Page 797

034017,000210:                                                                                                  #  CONSTANTS:-
034018,000211: 
034019,000212: 31,2417     4737               FEXTRA             =        BIT13                                 #  FEXT +5.13309020 E+4
034020,000213: 
034021,000214: 31,2417           04143        /AF/CNST           DEC      .13107                                
034022,000215: 
034023,000216:                                                                                                  #  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

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