Source Code
![]() |
These source-code files were from the printout at the MIT Museum, with many thanks
to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing
it to us. The printout was digitally photographed by Paul Fjeld. A team of
volunteers transcribed the source code manually from these images or, where
appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13)
source code to agree with the images from the printout. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061 20'35 OCT. 28,1968Note that the date is the date of the printout, not the date of the program revision. |
020898,000002: ## Copyright: Public domain.
020899,000003: ## Filename: S-BAND_ANTENNA_FOR_LM.agc
020900,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
020901,000005: ## It is part of the source code for the Lunar Module's (LM)
020902,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
020903,000007: ## Assembler: yaYUL
020904,000008: ## Contact: Ron Burkey <info@sandroid.org>.
020905,000009: ## Website: www.ibiblio.org/apollo.
020906,000010: ## Pages: 486-489
020907,000011: ## Mod history: 2009-05-17 RSB Adapted from the corresponding
020908,000012: ## Luminary131 file, using page
020909,000013: ## images from Luminary 1A.
020910,000014: ## 2009-06-07 RSB Corrected a misprint.
020911,000015: ## 2016-12-14 RSB Proofed text comments with octopus/ProoferComments
020912,000016: ## and corrected the errors found.
020913,000017: ##
020914,000018: ## This source code has been transcribed or otherwise adapted from
020915,000019: ## digitized images of a hardcopy from the MIT Museum. The digitization
020916,000020: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
020917,000021: ## the Museum. Many thanks to both. The images (with suitable reduction
020918,000022: ## in storage size and consequent reduction in image quality as well) are
020919,000023: ## available online at www.ibiblio.org/apollo. If for some reason you
020920,000024: ## find that the images are illegible, contact me at info@sandroid.org
020921,000025: ## about getting access to the (much) higher-quality images which Paul
020922,000026: ## actually created.
020923,000027: ##
020924,000028: ## Notations on the hardcopy document read, in part:
020925,000029: ##
020926,000030: ## Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
020927,000031: ## 16:27 JULY 14, 1969
020928,000032:
![]() |
Page 486 |
020930,000034: # SUBROUTINE NAME: R05 - S-BAND ANTENNA FOR LM
020931,000035:
020932,000036: # MOD0 BY T. JAMES
020933,000037: # MOD1 BY P. SHAKIR
020934,000038:
020935,000039: # FUNCTIONAL DESCRIPTION
020936,000040:
020937,000041: # THE S-BAND ANTENNA ROUTINE, R05, COMPUTES AND DISPLAYS THE PITCH AND
020938,000042: # YAW ANTENNA GIMBAL ANGLES REQUIRED TO POINT THE LM STEERABLE ANTENNA
020939,000043: # TOWARD THE CENTER OF THE EARTH. THIS ROUTINE IS SELECTED BY THE ASTRO-
020940,000044: # NAUT VIA DSKY ENTRY DURING COASTING FLIGHT OR WHEN THE LM IS ON THE MOON
020941,000045: # SURFACE. THE EARTH OR MOON REFERENCE COORDINATE SYSTEM IS USED DEPENDING
020942,000046: # ON WHETHER THE LM IS ABOUT TO ENTER OR HAS ALREADY ENTERED THE MOON
020943,000047: # SPHERE OF INFLUENCE, RESPECTIVELY
020944,000048:
020945,000049: # TO CALL SUBROUTINE, ASTRONAUT KEYS IN V 64 E
020946,000050:
020947,000051: # SUBROUTINES CALLED -
020948,000052: # R02BOTH
020949,000053: # INTPRET
020950,000054: # LOADTIME
020951,000055: # LEMCONIC
020952,000056: # LUNPOS
020953,000057: # CDUTRIG
020954,000058: # *SMNB*
020955,000059: # BANKCALL
020956,000060: # B5OFF
020957,000061: # ENDOFJOB
020958,000062: # BLANKET
020959,000063:
020960,000064: # RETURNS WITH
020961,000065: # PITCH ANGLE IN PITCHANG REV. B0
020962,000066: # YAW ANGLE IN YAWANG REV. B0
020963,000067:
020964,000068: # ERASABLES USED
020965,000069: # PITCHANG
020966,000070: # YAWANG
020967,000071: # RLM
020968,000072: # VAC AREA
020969,000073:
020970,000074: 41,3731 BANK 41
020971,000075: 42,2000 SETLOC SBAND
020972,000076: 42,2000 BANK
020973,000077:
020974,000078: 42,3606 E7,1471 EBANK= WHOCARES
020975,000079: 42,3606 COUNT* $$/R05
020976,000080: 42,3606 04616 SBANDANT TC BANKCALL
![]() |
Page 487 |
020978,000082: 42,3607 11254 CADR R02BOTH # CHECK IF IMU IS ON AND ALIGNED
020979,000083: 42,3610 06037 TC INTPRET
020980,000084: 42,3611 47001 SETPD RTB
020981,000085: 42,3612 00001 0D
020982,000086: 42,3613 21573 LOADTIME # PICK UP CURRENT TIME
020983,000087: 42,3614 34041 STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
020984,000088: 42,3615 27100 LEMCONIC # USING CONIC INTEGRATION
020985,000089: 42,3616 46135 SLOAD BHIZ
020986,000090: 42,3617 00050 X2 # X2 =0 EARTH SPHERE, X2 =2 MOON SPHERE
020987,000091: 42,3620 65636 CONV4
020988,000092: 42,3621 77775 VLOAD
020989,000093: 42,3622 00001 RATT
020990,000094: 42,3623 16205 STODL RLM
020991,000095: 42,3624 00015 TAT
020992,000096: 42,3625 77624 CONV3 CALL
020993,000097: 42,3626 33664 LUNPOS # UNIT POSITION VECTOR FROM EARTH TO MOON
020994,000098: 42,3627 74375 VLOAD VXSC
020995,000099: 42,3630 02723 VMOON
020996,000100: 42,3631 24001 REMDIST # MEAN DISTANCE FROM EARTH TO MOON
020997,000101: 42,3632 53372 VSL1 VAD
020998,000102: 42,3633 02205 RLM
020999,000103: 42,3634 77650 GOTO
021000,000104: 42,3635 65640 CONV5
021001,000105: 42,3636 77775 CONV4 VLOAD
021002,000106: 42,3637 00001 RATT # UE = -UNIT(RATT) EARTH SPHERE
021003,000107: 42,3640 53401 CONV5 SETPD UNIT # UE = -UNIT((REM)(UEM) + RL) MOON SPHERE
021004,000108: 42,3641 00001 0D # SET PL POINTER TO 0
021005,000109: 42,3642 45076 VCOMP CALL
021006,000110: 42,3643 47537 CDUTRIG # COMPUTE SINES AND COSINES OF CDU ANGLES
021007,000111: 42,3644 76521 MXV VSL1 # TRANSFORM REF. COORDINATE SYSTEM TO
021008,000112: 42,3645 01734 REFSMMAT # STABLE MEMBER B-1 X B-1 X B+1 = B-1
021009,000113: 42,3646 71206 PUSH DLOAD # 8D
021010,000114: 42,3647 06522 HI6ZEROS
021011,000115: 42,3650 02201 STORE PITCHANG
021012,000116: 42,3651 26203 STOVL YAWANG # ZERO OUT ANGLES
021013,000117: 42,3652 77624 CALL
021014,000118: 42,3653 47671 *SMNB*
021015,000119: 42,3654 16205 STODL RLM # PRE-MULTIPLY RLM BY (NBSA) MATRIX(B0)
021016,000120: 42,3655 02207 RLM +2
021017,000121: 42,3656 45206 PUSH DSU
021018,000122: 42,3657 02205 RLM
021019,000123: 42,3660 77605 DMP
021020,000124: 42,3661 25771 1OVSQRT2
021021,000125: 42,3662 16207 STODL RLM +2
021022,000126: 42,3663 41215 DAD DMP
021023,000127: 42,3664 02205 RLM
021024,000128: 42,3665 25771 1OVSQRT2
021025,000129: 42,3666 26205 STOVL RLM # R B-1
021026,000130: 42,3667 02205 RLM
021027,000131: 42,3670 63256 UNIT PDVL
![]() |
Page 488 |
021029,000133: 42,3671 02205 RLM
021030,000134: 42,3672 72431 VPROJ VSL2 # PROJECTION OF R ONTO LM XZ PLANE
021031,000135: 42,3673 06516 HIUNITY
021032,000136: 42,3674 40045 BVSU BOV # CLEAR OVERFLOW INDICATOR IF ON
021033,000137: 42,3675 02205 RLM
021034,000138: 42,3676 65677 COVCNV
021035,000139: 42,3677 40056 COVCNV UNIT BOV # EXIT ON OVERFLOW
021036,000140: 42,3700 65745 SBANDEX
021037,000141: 42,3701 47206 PUSH VXV # URP VECTOR B-1
021038,000142: 42,3702 06514 HIUNITZ
021039,000143: 42,3703 57572 VSL1 VCOMP # UZ X URP = -(URP X UZ)
021040,000144: 42,3704 02205 STORE RLM # X VEC B-1
021041,000145: 42,3705 63241 DOT PDVL # SGN(X.UY) UNSCALED
021042,000146: 42,3706 06516 HIUNITY
021043,000147: 42,3707 02205 RLM
021044,000148: 42,3710 75246 ABVAL SIGN
021045,000149: 42,3711 77736 ASIN # ASIN((SGN(X.UY))ABV(X)) REV B0
021046,000150: 42,3712 26201 STOVL PITCHANG
021047,000151: 42,3713 00007 URP
021048,000152: 42,3714 51041 DOT BPL
021049,000153: 42,3715 06514 HIUNITZ
021050,000154: 42,3716 65723 NOADJUST # YES, -90 TO +90
021051,000155: 42,3717 45345 DLOAD DSU
021052,000156: 42,3720 06520 HIDPHALF
021053,000157: 42,3721 02201 PITCHANG
021054,000158: 42,3722 02201 STORE PITCHANG
021055,000159: 42,3723 47375 NOADJUST VLOAD VXV
021056,000160: 42,3724 00001 UR # Z = (UR X URP)
021057,000161: 42,3725 00007 URP
021058,000162: 42,3726 77772 VSL1
021059,000163: 42,3727 16205 STODL RLM # Z VEC B-1
021060,000164: 42,3730 02201 PITCHANG
021061,000165: 42,3731 74356 SIN VXSC
021062,000166: 42,3732 06514 HIUNITZ
021063,000167: 42,3733 71525 PDDL COS
021064,000168: 42,3734 02201 PITCHANG
021065,000169: 42,3735 52361 VXSC VSU
021066,000170: 42,3736 06520 HIUNITX # (UX COS ALPHA) - (UZ SIN ALPHA)
021067,000171: 42,3737 63241 DOT PDVL # YAW.Z
021068,000172: 42,3740 02205 RLM
021069,000173: 42,3741 02205 RLM
021070,000174: 42,3742 75246 ABVAL SIGN
021071,000175: 42,3743 77736 ASIN
021072,000176: 42,3744 02203 STORE YAWANG
021073,000177: 42,3745 77776 SBANDEX EXIT
021074,000178: 42,3746 31044 CA EXTVBACT
021075,000179: 42,3747 74747 MASK BIT5 # IS BIT5 STILL ON
021076,000180: 42,3750 00006 EXTEND
021077,000181: 42,3751 15472 BZF ENDEXT # NO
021078,000182: 42,3752 35017 CAF PRIO5
![]() |
Page 489 |
021080,000184: 42,3753 05146 TC PRIOCHNG
021081,000185: 42,3754 33767 CAF V06N51 # DISPLAY ANGLES
021082,000186: 42,3755 04616 TC BANKCALL
021083,000187: 42,3756 20353 CADR GOMARKFR
021084,000188: 42,3757 05563 TC B5OFF # TERMINATE
021085,000189: 42,3760 05563 TC B5OFF # PROCEED
021086,000190: 42,3761 05155 TC ENDOFJOB # RECYCLE
021087,000191: 42,3762 34751 CAF BIT3 # IMMEDIATE RETURN
021088,000192: 42,3763 05464 TC BLANKET # BLANK R3
021089,000193: 42,3764 34740 CAF PRIO4
021090,000194: 42,3765 05146 TC PRIOCHNG
021091,000195: 42,3766 03610 TC SBANDANT +2 # YES, CONTINUE DISPLAYING ANGLES
021092,000196: 42,3767 01463 V06N51 VN 0651
021093,000197: 42,3770 26501 07463 1OVSQRT2 2DEC .7071067815 # 1/SQRT(2)
021094,000198:
021095,000199: 42,3772 UR EQUALS 0D
021096,000200: 42,3772 URP EQUALS 6D
021097,000201: 42,3772 30,2000 SBANK= LOWSUPER
021098,000202:
End of include-file S-BAND_ANTENNA_FOR_LM.agc. Parent file is MAIN.agc