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. |
021971,000002: ## Copyright: Public domain.
021972,000003: ## Filename: S-BAND_ANTENNA_FOR_LM.agc
021973,000004: ## Purpose: The main source file for Luminary revision 069.
021974,000005: ## It is part of the source code for the original release
021975,000006: ## of the flight software for the Lunar Module's (LM) Apollo
021976,000007: ## Guidance Computer (AGC) for Apollo 10. The actual flown
021977,000008: ## version was Luminary 69 revision 2, which included a
021978,000009: ## newer lunar gravity model and only affected module 2.
021979,000010: ## This file is intended to be a faithful transcription, except
021980,000011: ## that the code format has been changed to conform to the
021981,000012: ## requirements of the yaYUL assembler rather than the
021982,000013: ## original YUL assembler.
021983,000014: ## Reference: pp. 498-501
021984,000015: ## Assembler: yaYUL
021985,000016: ## Contact: Ron Burkey <info@sandroid.org>.
021986,000017: ## Website: www.ibiblio.org/apollo/index.html
021987,000018: ## Mod history: 2016-12-13 MAS Created from Luminary 99.
021988,000019: ## 2016-12-14 MAS Updated from comment-proofed Luminary 99 version.
021989,000020: ## 2016-12-18 RRB Updated for Luminary 69.
021990,000021: ## 2016-12-27 HG Comment last line *** END OF LEMONAID.070 ***
021991,000022: ## 2017-01-27 RSB Proofed comment text using octopus/prooferComments
021992,000023: ## and fixed errors found.
021993,000024:
![]() |
Page 498 |
021995,000026: # SUBROUTINE NAME: R05 - S-BAND ANTENNA FOR LM
021996,000027:
021997,000028: # MOD0 BY T. JAMES
021998,000029: # MOD1 BY P. SHAKIR
021999,000030:
022000,000031: # FUNCTIONAL DESCRIPTION
022001,000032:
022002,000033: # THE S-BAND ANTENNA ROUTINE, R05, COMPUTES AND DISPLAYS THE PITCH AND
022003,000034: # YAW ANTENNA GIMBAL ANGLES REQUIRED TO POINT THE LM STEERABLE ANTENNA
022004,000035: # TOWARD THE CENTER OF THE EARTH. THIS ROUTINE IS SELECTED BY THE ASTRO-
022005,000036: # NAUT VIA DSKY ENTRY DURING COASTING FLIGHT OR WHEN THE LM IS ON THE MOON
022006,000037: # SURFACE. THE EARTH OR MOON REFERENCE COORDINATE SYSTEM IS USED DEPENDING
022007,000038: # ON WHETHER THE LM IS ABOUT TO ENTER OR HAS ALREADY ENTERED THE MOON
022008,000039: # SPHERE OF INFLUENCE, RESPECTIVELY
022009,000040:
022010,000041: # TO CALL SUBROUTINE, ASTRONAUT KEYS IN V 64 E
022011,000042:
022012,000043: # SUBROUTINES CALLED-
022013,000044: # R02BOTH
022014,000045: # INTPRET
022015,000046: # LOADTIME
022016,000047: # LEMCONIC
022017,000048: # LUNPOS
022018,000049: # CDUTRIG
022019,000050: # *SMNB*
022020,000051: # BANKCALL
022021,000052: # B5OFF
022022,000053: # ENDOFJOB
022023,000054: # BLANKET
022024,000055:
022025,000056: # RETURNS WITH
022026,000057: # PITCH ANGLE IN PITCHANG REV. B0
022027,000058: # YAW ANGLE IN YAWANG REV. B0
022028,000059:
022029,000060: # ERASABLES USED
022030,000061: # PITCHANG
022031,000062: # YAWANG
022032,000063: # RLM
022033,000064: # VAC AREA
022034,000065:
022035,000066: 41,3731 BANK 41
022036,000067: 42,2000 SETLOC SBAND
022037,000068: 42,2000 BANK
022038,000069:
022039,000070: 42,3602 E7,1467 EBANK= WHOCARES
022040,000071: 42,3602 COUNT* $$/R05
022041,000072: 42,3602 04616 SBANDANT TC BANKCALL
![]() |
Page 499 |
022043,000074: 42,3603 11175 CADR R02BOTH # CHECK IF IMU IS ON AND ALIGNED
022044,000075: 42,3604 06036 TC INTPRET
022045,000076: 42,3605 47001 SETPD RTB
022046,000077: 42,3606 00001 0D
022047,000078: 42,3607 21462 LOADTIME # PICK UP CURRENT TIME
022048,000079: 42,3610 34041 STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
022049,000080: 42,3611 27100 LEMCONIC # USING CONIC INTEGRATION
022050,000081: 42,3612 46135 SLOAD BHIZ
022051,000082: 42,3613 00050 X2 # X2 =0 EARTH SPHERE, X2 =2 MOON SPHERE
022052,000083: 42,3614 65632 CONV4
022053,000084: 42,3615 77775 VLOAD
022054,000085: 42,3616 00001 RATT
022055,000086: 42,3617 16211 STODL RLM
022056,000087: 42,3620 00015 TAT
022057,000088: 42,3621 77624 CONV3 CALL
022058,000089: 42,3622 33663 LUNPOS # UNIT POSITION VECTOR FROM EARTH TO MOON
022059,000090: 42,3623 74375 VLOAD VXSC
022060,000091: 42,3624 02723 VMOON
022061,000092: 42,3625 24001 REMDIST # MEAN DISTANCE FROM EARTH TO MOON
022062,000093: 42,3626 53372 VSL1 VAD
022063,000094: 42,3627 02211 RLM
022064,000095: 42,3630 77650 GOTO
022065,000096: 42,3631 65634 CONV5
022066,000097: 42,3632 77775 CONV4 VLOAD
022067,000098: 42,3633 00001 RATT # UE = -UNIT(RATT) EARTH SPHERE
022068,000099: 42,3634 53401 CONV5 SETPD UNIT # UE = -UNIT((REM)(UEM) + RL) MOON SPHERE
022069,000100: 42,3635 00001 0D # SET PL POINTER TO 0
022070,000101: 42,3636 45076 VCOMP CALL
022071,000102: 42,3637 47443 CDUTRIG # COMPUTE SINES AND COSINES OF CDU ANGLES
022072,000103: 42,3640 76521 MXV VSL1 # TRANSFORM REF. COORDINATE SYSTEM TO
022073,000104: 42,3641 01734 REFSMMAT # STABLE MEMBER B-1 X B-1 X B+1 = B-1
022074,000105: 42,3642 71206 PUSH DLOAD # 8D
022075,000106: 42,3643 06424 HI6ZEROS
022076,000107: 42,3644 02205 STORE PITCHANG
022077,000108: 42,3645 26207 STOVL YAWANG # ZERO OUT ANGLES
022078,000109: 42,3646 77624 CALL
022079,000110: 42,3647 47575 *SMNB*
022080,000111: 42,3650 16211 STODL RLM # PRE-MULTIPLY RLM BY (NBSA) MATRIX(B0)
022081,000112: 42,3651 02213 RLM +2
022082,000113: 42,3652 45206 PUSH DSU
022083,000114: 42,3653 02211 RLM
022084,000115: 42,3654 77605 DMP
022085,000116: 42,3655 25765 1OVSQRT2
022086,000117: 42,3656 16213 STODL RLM +2
022087,000118: 42,3657 41215 DAD DMP
022088,000119: 42,3660 02211 RLM
022089,000120: 42,3661 25765 1OVSQRT2
022090,000121: 42,3662 26211 STOVL RLM # R B-1
022091,000122: 42,3663 02211 RLM
022092,000123: 42,3664 63256 UNIT PDVL
![]() |
Page 500 |
022094,000125: 42,3665 02211 RLM
022095,000126: 42,3666 72431 VPROJ VSL2 # PROJECTION OF R ONTO LM XZ PLANE
022096,000127: 42,3667 06420 HIUNITY
022097,000128: 42,3670 40045 BVSU BOV # CLEAR OVERFLOW INDICATOR IF ON
022098,000129: 42,3671 02211 RLM
022099,000130: 42,3672 65673 COVCNV
022100,000131: 42,3673 40056 COVCNV UNIT BOV # EXIT ON OVERFLOW
022101,000132: 42,3674 65741 SBANDEX
022102,000133: 42,3675 47206 PUSH VXV # URP VECTOR B-1
022103,000134: 42,3676 06416 HIUNITZ
022104,000135: 42,3677 57572 VSL1 VCOMP # UZ X URP = -(URP X UZ)
022105,000136: 42,3700 02211 STORE RLM # X VEC B-1
022106,000137: 42,3701 63241 DOT PDVL # SGN(X.UY) UNSCALED
022107,000138: 42,3702 06420 HIUNITY
022108,000139: 42,3703 02211 RLM
022109,000140: 42,3704 75246 ABVAL SIGN
022110,000141: 42,3705 77736 ASIN # ASIN((SGN(X.UY))ABV(X)) REV B0
022111,000142: 42,3706 26205 STOVL PITCHANG
022112,000143: 42,3707 00007 URP
022113,000144: 42,3710 51041 DOT BPL
022114,000145: 42,3711 06416 HIUNITZ
022115,000146: 42,3712 65717 NOADJUST # YES, -90 TO +90
022116,000147: 42,3713 45345 DLOAD DSU
022117,000148: 42,3714 06422 HIDPHALF
022118,000149: 42,3715 02205 PITCHANG
022119,000150: 42,3716 02205 STORE PITCHANG
022120,000151: 42,3717 47375 NOADJUST VLOAD VXV
022121,000152: 42,3720 00001 UR # Z = (UR X URP)
022122,000153: 42,3721 00007 URP
022123,000154: 42,3722 77772 VSL1
022124,000155: 42,3723 16211 STODL RLM # Z VEC B-1
022125,000156: 42,3724 02205 PITCHANG
022126,000157: 42,3725 74356 SIN VXSC
022127,000158: 42,3726 06416 HIUNITZ
022128,000159: 42,3727 71525 PDDL COS
022129,000160: 42,3730 02205 PITCHANG
022130,000161: 42,3731 52361 VXSC VSU
022131,000162: 42,3732 06422 HIUNITX # (UX COS ALPHA) - (UZ SIN ALPHA)
022132,000163: 42,3733 63241 DOT PDVL # YAW.Z
022133,000164: 42,3734 02211 RLM
022134,000165: 42,3735 02211 RLM
022135,000166: 42,3736 75246 ABVAL SIGN
022136,000167: 42,3737 77736 ASIN
022137,000168: 42,3740 02207 STORE YAWANG
022138,000169: 42,3741 77776 SBANDEX EXIT
022139,000170: 42,3742 31044 CA EXTVBACT
022140,000171: 42,3743 74747 MASK BIT5 # IS BIT5 STILL ON
022141,000172: 42,3744 00006 EXTEND
022142,000173: 42,3745 15472 BZF ENDEXT # NO
022143,000174: 42,3746 35017 CAF PRIO5
![]() |
Page 501 |
022145,000176: 42,3747 05146 TC PRIOCHNG
022146,000177: 42,3750 33763 CAF V06N51 # DISPLAY ANGLES
022147,000178: 42,3751 04616 TC BANKCALL
022148,000179: 42,3752 20231 CADR GOMARKFR
022149,000180: 42,3753 05563 TC B5OFF # TERMINATE
022150,000181: 42,3754 05563 TC B5OFF # PROCEED
022151,000182: 42,3755 05155 TC ENDOFJOB # RECYCLE
022152,000183: 42,3756 34751 CAF BIT3 # IMMEDIATE RETURN
022153,000184: 42,3757 05464 TC BLANKET # BLANK R3
022154,000185: 42,3760 34740 CAF PRIO4
022155,000186: 42,3761 05146 TC PRIOCHNG
022156,000187: 42,3762 03604 TC SBANDANT +2 # YES, CONTINUE DISPLAYING ANGLES
022157,000188: 42,3763 01463 V06N51 VN 0651
022158,000189: 42,3764 26501 07463 1OVSQRT2 2DEC .7071067815 # 1/SQRT(2)
022159,000190:
022160,000191: 42,3766 UR EQUALS 0D
022161,000192: 42,3766 URP EQUALS 6D
022162,000193: 42,3766 30,2000 SBANK= LOWSUPER
End of include-file S-BAND_ANTENNA_FOR_LM.agc. Parent file is MAIN.agc