Source Code
These source-code files were transcribed from scans made from Don Eyles's personal
copy of Luminary 069. They were scanned at archive.org's Boston
facility, and the scanning was sponsored by Onno Hommes. The code was transcribed
from these scans by a team of volunteers who are referenced in the program
comments. Comments from the original source code are prefixed with a single '#' symbol,
whereas comments added later are prefixed by "##" or "###". In some cases, where
similar code blocks exist in previously-transcribed AGC programs (primarily
Luminary 99, from Apollo 11) those code blocks were used as a starting point and
then corrected to agree with the Luminary 69 scans. The full scans are available
at the Virtual AGC
project's collection at archive.org, while more-convenient reduced-size (but reduced-quality)
images are available at
the main Virtual AGC website. Report any errors noted by creating an
issue report at the Virtual AGC
project's GitHub repository. Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011 19:02 NOV. 25,1968Note that the date is the date of the printout, not the date of the program revision. |
035043,000002: ## Copyright: Public domain.
035044,000003: ## Filename: THROTTLE_CONTROL_ROUTINES.agc
035045,000004: ## Purpose: The main source file for Luminary revision 069.
035046,000005: ## It is part of the source code for the original release
035047,000006: ## of the flight software for the Lunar Module's (LM) Apollo
035048,000007: ## Guidance Computer (AGC) for Apollo 10. The actual flown
035049,000008: ## version was Luminary 69 revision 2, which included a
035050,000009: ## newer lunar gravity model and only affected module 2.
035051,000010: ## This file is intended to be a faithful transcription, except
035052,000011: ## that the code format has been changed to conform to the
035053,000012: ## requirements of the yaYUL assembler rather than the
035054,000013: ## original YUL assembler.
035055,000014: ## Reference: pp. 797-801
035056,000015: ## Assembler: yaYUL
035057,000016: ## Contact: Ron Burkey <info@sandroid.org>.
035058,000017: ## Website: www.ibiblio.org/apollo/index.html
035059,000018: ## Mod history: 2016-12-13 MAS Created from Luminary 99.
035060,000019: ## 2016-12-18 MAS Updated from comment-proofed Luminary 99 version.
035061,000020: ## 2017-01-06 RRB Updated for Luminary 69.
035062,000021: ## 2017-01-07 HG Fix operand FLGWRD6 -> FLAGWRD6
035063,000022: ## 2017-01-23 HG Add missing sequence of statements CA H*GHCR*T
035064,000023: ## TS FCODD
035065,000024: ## TCF DOPIF
035066,000025: ## Fix operator CS -> CA
035067,000026: ## 2017-01-28 RSB Proofed comment text using octopus/prooferComments
035068,000027: ## and fixed errors found.
035069,000028:
Page 797 |
035071,000030:
035072,000031: 31,2247 BANK 31
035073,000032: 31,2000 SETLOC FTHROT
035074,000033: 31,2000 BANK
035075,000034: 31,2247 E7,1610 EBANK= PIF
035076,000035: 31,2247 COUNT* $$/THROT
035077,000036:
035078,000037: # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
035079,000038: # HERE FC, DESIRED THRUST, AND FP, PRESENT THRUST, UNWEIGHTED, ARE COMPUTED.
035080,000039:
035081,000040: 31,2247 31246 THROTTLE CA ABDELV # COMPUTE PRESENT ACCELERATION IN UNITS OF
035082,000041: 31,2250 00006 EXTEND # 2(-4) M/CS/CS, SAVING SERVICER TROUBLE
035083,000042: 31,2251 72444 MP /AF/CNST
035084,000043: 31,2252 00006 +3 EXTEND
035085,000044: 31,2253 23605 QXCH RTNHOLD
035086,000045: 31,2254 02425 AFDUMP TC MASSMULT
035087,000046: 31,2255 53563 DXCH FP # FP = PRESENT THRUST
035088,000047: 31,2256 00006 EXTEND
035089,000048: 31,2257 31574 DCA /AFC/
035090,000049: 31,2260 02425 TC MASSMULT
035091,000050: 31,2261 55613 TS FC # FC = THRUST DESIRED BY GUIDANCE
035092,000051: 31,2262 53561 DXCH FCODD # FCODD = WHAT IT IS GOING TO GET
035093,000052:
035094,000053: # IF IT HAS BEEN LESS THAN 3 SECONDS SINCE THE LAST THROTTLING, AUGMENT FP USING THE FWEIGHT CALCULATED THEN.
035095,000054:
035096,000055: 31,2263 41615 CS TTHROT # THIS CODING ASSUMES A FLATOUT WITHIN
035097,000056: 31,2264 60025 AD TIME1 # 80 SECONDS BEFORE FIRST THROTTLE CALL
035098,000057: 31,2265 74733 MASK POSMAX
035099,000058: 31,2266 40000 COM
035100,000059: 31,2267 65002 AD 3SECS
035101,000060: 31,2270 00006 EXTEND
035102,000061: 31,2271 62275 BZMF WHERETO # BRANCH IF (TIME1-TTHROT +1) > 3 SECONDS
035103,000062: 31,2272 00006 EXTEND
035104,000063: 31,2273 31607 DCA FWEIGHT
035105,000064: 31,2274 21563 DAS FP
035106,000065:
035107,000066: # THIS LOGIC DETERMINES THE THROTTLING IN THE REGION 10% - 94%. THE MANUAL THROTTLE, NOMINALLY SET AT
035108,000067: # MINIMUM BY ASTRONAUT OR MISSION CONTROL PROGRAMS, PROVIDES THE LOWER BOUND. A STOP IN THE THROTTLE HARDWARE
035109,000068: # PROVIDES THE UPPER.
035110,000069:
035111,000070: 31,2275 35014 WHERETO CA EBANK5 # INITIALIZE L*WCR*T AND H*GHCR*T FROM
035112,000071: 31,2276 54003 TS EBANK # PAD LOADED ERASABLES IN W-MATRIX
Page 798 |
035114,000073: 31,2277 E5,1476 EBANK= LOWCRIT
035115,000074: 31,2277 00006 EXTEND
035116,000075: 31,2300 31477 DCA LOWCRIT
035117,000076: 31,2301 52131 DXCH L*WCR*T
035118,000077: 31,2302 35016 CA EBANK7
035119,000078: 31,2303 54003 TS EBANK
035120,000079: 31,2304 E7,1610 EBANK= PIF
035121,000080: 31,2304 44755 CS ZERO # INITIALIZE PIFPSET
035122,000081: 31,2305 55604 TS PIFPSET
035123,000082: 31,2306 40131 CS H*GHCR*T
035124,000083: 31,2307 61616 AD FCOLD
035125,000084: 31,2310 00006 EXTEND
035126,000085: 31,2311 62323 BZMF LOWFCOLD # BRANCH IF FCOLD < OR = HIGHCRIT
035127,000086: 31,2312 40130 CS L*WCR*T
035128,000087: 31,2313 61560 AD FCODD
035129,000088: 31,2314 00006 EXTEND
035130,000089: 31,2315 62320 BZMF FCOMPSET # BRANCH IF FC < OR = LOWCRIT
035131,000090: 31,2316 31562 CA FP # SEE NOTE 1
035132,000091: 31,2317 12337 TCF FLATOUT1
035133,000092:
035134,000093: 31,2320 42002 FCOMPSET CS FMAXODD # SEE NOTE 2
035135,000094: 31,2321 61562 AD FP
035136,000095: 31,2322 12341 TCF FLATOUT2
035137,000096:
035138,000097: 31,2323 40131 LOWFCOLD CS H*GHCR*T
035139,000098: 31,2324 61560 AD FCODD
035140,000099: 31,2325 00006 EXTEND
035141,000100: 31,2326 62342 BZMF DOPIF # BRANCH IF FC < OR = HIGHCRIT
035142,000101:
035143,000102: 31,2327 30102 CA FLAGWRD6 # IS POUTFLAG SET?
035144,000103: 31,2330 74745 MASK POUTBIT
035145,000104: 31,2331 00006 EXTEND
035146,000105: 31,2332 12336 BZF FLATOUT1 -1
035147,000106:
035148,000107: 31,2333 30131 CA H*GHCR*T # YES: THROTTLE-UP ONLY TO HIGHCRIT
035149,000108: 31,2334 55560 TS FCODD
035150,000109: 31,2335 12342 TCF DOPIF
035151,000110:
035152,000111: 31,2336 32003 CA FMAXPOS # NO: THROTTLE-UP
035153,000112: 31,2337 53561 FLATOUT1 DXCH FCODD
035154,000113: 31,2340 34737 CA FEXTRA
035155,000114: 31,2341 55604 FLATOUT2 TS PIFPSET
035156,000115:
035157,000116: # NOTE 1 FC IS SET EQUAL TO FP SO PIF WILL BE ZERO. THIS IS DESIRABLE
035158,000117: # AS THERE IS ACTUALLY NO THROTTLE CHANGE.
035159,000118:
035160,000119: # NOTE2 HERE, SINCE WE ARE ABOUT TO RETURN TO THE THROTTLEABLE REGION
035161,000120: # (BELOW 55%) THE QUANTITY -(FMAXODD-FP) IS COMPUTED AND PUT
035162,000121: # INTO PIFPSET TO COMPENSATE FOR THE DIFFERENCE BETWEEN THE
035163,000122: # NUMBER OF BITS CORRESPONDING TO FULL THROTTLE (FMAXODD) AND THE
Page 799 |
035165,000124: # NUMBER CORRESPONDING TO ACTUAL THRUST (FP). THUS THE TOTAL
035166,000125: # THROTTLE COMMAND PIF = FC - FP - (FMAXODD - FP) = FC - FMAXODD.
035167,000126:
035168,000127: 31,2342 03721 DOPIF TC FASTCHNG # RESTART PROTECTION
035169,000128: 31,2343 00006 EXTEND
035170,000129: 31,2344 31561 DCA FCODD
035171,000130: 31,2345 55616 TS FCOLD
035172,000131: 31,2346 53611 DXCH PIF
035173,000132: 31,2347 00006 EXTEND
035174,000133: 31,2350 41563 DCS FP
035175,000134: 31,2351 21611 DAS PIF # PIF = FC - FP, NEVER EQUALS +0
035176,000135:
035177,000136: 31,2352 31610 DOIT CA PIF
035178,000137: 31,2353 61604 AD PIFPSET # ADD IN PIFPSET, WITHOUT CHANGING PIF
035179,000138: 31,2354 55612 TS PSEUDO55
035180,000139: 31,2355 54055 TS THRUST
035181,000140: 31,2356 34750 CAF BIT4
035182,000141: 31,2357 00006 EXTEND
035183,000142: 31,2360 05014 WOR CHAN14
035184,000143: 31,2361 30025 CA TIME1
035185,000144: 31,2362 55615 TS TTHROT
035186,000145:
035187,000146: # SINCE /AF/ IS NOT AN INSTANTANEOUS ACCELERATION, BUT RATHER AN "AVERAGE" OF THE ACCELERATION LEVELS DURING
035188,000147: # THE PRECEEDING PIPA INTERVAL, AND SINCE FP IS COMPUTED DIRECTLY FROM /AF/, FP IN ORDER TO CORRESPOND TO THE
035189,000148: # ACTUAL THRUST LEVEL AT THE END OF THE INTERVAL MUST BE WEIGHTED BY
035190,000149:
035191,000150: # PIF(PPROCESS + TL) PIF /PIF/
035192,000151: # FWEIGHT = ------------------ + -------------
035193,000152: # PGUID 2 PGUID FRATE
035194,000153:
035195,000154: # WHERE PPROCESS IS THE TIME BETWEEN PIPA READING AND THE START OF THROTTLING, PGUID IS THE GUIDANCE PERIOD, AND
035196,000155: # FRATE IS THE THROTTLING RATE (32 UNITS PER CENTISECOND). PGUID IS ASSUMED TO BE 2 SECONDS. THE "TL" IN THE
035197,000156: # FIRST TERM REPRESENTS THE ENGINE'S RESPONSE LAG. HERE FWEIGHT IS COMPUTED FOR USE NEXT PASS.
035198,000157:
035199,000158: 31,2363 35003 CA 4SECS
035200,000159: 31,2364 54002 TS Q
035201,000160: 31,2365 41235 CS PIPTIME +1 # TIME OF LAST PIPA READING
035202,000161: 31,2366 60025 AD TIME1
035203,000162: 31,2367 62004 AD THROTLAG # COMPENSATE FOR ENGINE RESPONSE LAG
035204,000163: 31,2370 74357 MASK LOW8 # MAKE SURE SMALL AND POSITIVE
035205,000164: 31,2371 22007 ZL
035206,000165: 31,2372 00006 EXTEND
035207,000166: 31,2373 10002 DV Q
035208,000167: 31,2374 00006 EXTEND
035209,000168: 31,2375 71610 MP PIF
035210,000169: 31,2376 60000 DOUBLE
035211,000170: 31,2377 53607 DXCH FWEIGHT
035212,000171: 31,2400 37715 CA 2.PG.FRT
035213,000172: 31,2401 54002 TS Q
Page 800 |
035215,000174: 31,2402 11610 CCS PIF
035216,000175: 31,2403 64753 AD ONE
035217,000176: 31,2404 12406 TCF +2
035218,000177: 31,2405 64753 AD ONE
035219,000178: 31,2406 00006 EXTEND
035220,000179: 31,2407 71610 MP PIF
035221,000180: 31,2410 00006 EXTEND
035222,000181: 31,2411 10002 DV Q
035223,000182: 31,2412 22007 ZL
035224,000183: 31,2413 21607 DAS FWEIGHT
035225,000184:
035226,000185: 31,2414 01605 THDUMP TC RTNHOLD
035227,000186:
035228,000187: # FLATOUT THROTTLES UP THE DESCENT ENGINE, AND IS CALLED AS A BASIC SUBROUTINE.
035229,000188:
035230,000189: 31,2415 34737 FLATOUT CAF BIT13 # 4096 PULSES
035231,000190: 31,2416 55604 WHATOUT TS PIFPSET # USE PIFPSET SO FWEIGHT WILL BE ZERO
035232,000191: 31,2417 44755 CS ZERO
035233,000192: 31,2420 55616 TS FCOLD
035234,000193: 31,2421 55610 TS PIF
035235,000194: 31,2422 00006 EXTEND
035236,000195: 31,2423 23605 QXCH RTNHOLD
035237,000196: 31,2424 12352 TCF DOIT
035238,000197:
035239,000198: # MASSMULT SCALES ACCELERATION, ARRIVING IN A AND L IN UNITS OF 2(-4) M/CS/CS, TO FORCE IN PULSE UNITS.
035240,000199:
035241,000200: 31,2425 00006 MASSMULT EXTEND
035242,000201: 31,2426 22130 QXCH BUF
035243,000202: 31,2427 00006 EXTEND
035244,000203: 31,2430 71244 MP MASS # LEAVES ODDLY SCALED FORCE IN A AND L
035245,000204: 31,2431 52155 DXCH MPAC
035246,000205: 31,2432 07102 TC DMP # LEAVES PROPERLY SCALED FORCE IM MPAC
035247,000206: 31,2433 02005 ADRES SCALEFAC
035248,000207: 31,2434 07256 TC TPAGREE
035249,000208: 31,2435 30154 CA MPAC
035250,000209: 31,2436 00006 EXTEND
035251,000210: 31,2437 12442 BZF +3
035252,000211: 31,2440 34733 CAF POSMAX
035253,000212: 31,2441 00130 TC BUF
035254,000213: 31,2442 52156 DXCH MPAC +1
035255,000214: 31,2443 00130 TC BUF
035256,000215:
035257,000216: # CONSTANTS:-
035258,000217:
035259,000218: 31,2444 4737 FEXTRA = BIT13
Page 801 |
035261,000220: 31,2444 7715 2.PG.FRT = PRIO31 # DECIMAL 12800
035262,000221: 31,2444 04143 /AF/CNST DEC .13107
035263,000222:
035264,000223: # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
End of include-file THROTTLE_CONTROL_ROUTINES.agc. Parent file is MAIN.agc