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