Source Code
These source-code files are part of a reconstructed copy of Luminary 98, a
development version of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memo 85, using asterisks indicating changed lines in the listing as a guide. While no listing of this version is known to exist, nor are the memory-bank checksums available, the reconstruction is believed to be correct because it was an an intermediate step in reconstructing Luminary 97 whose reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152G. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 98 listing. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. |
020369,000002: ## Copyright: Public domain.
020370,000003: ## Filename: S-BAND_ANTENNA_FOR_LM.agc
020371,000004: ## Purpose: A section of Luminary revision 98.
020372,000005: ## It is part of the reconstructed source code for the a
020373,000006: ## development version of the flight software for the Lunar
020374,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
020375,000008: ## The code has been recreated from a copy of Luminary 99
020376,000009: ## revision 001, using asterisks indicating changed lines in
020377,000010: ## the listing and Luminary Memo #85, which lists changes between
020378,000011: ## Luminary 98 and 99.
020379,000012: ## Reference: pp. 486-489
020380,000013: ## Assembler: yaYUL
020381,000014: ## Contact: Ron Burkey <info@sandroid.org>.
020382,000015: ## Website: www.ibiblio.org/apollo/index.html
020383,000016: ## Mod history: 2019-07-28 MAS Created from Luminary 99.
020384,000017:
Page 486 |
020386,000019: # SUBROUTINE NAME: R05 - S-BAND ANTENNA FOR LM
020387,000020:
020388,000021: # MOD0 BY T. JAMES
020389,000022: # MOD1 BY P. SHAKIR
020390,000023:
020391,000024: # FUNCTIONAL DESCRIPTION
020392,000025:
020393,000026: # THE S-BAND ANTENNA ROUTINE, R05, COMPUTES AND DISPLAYS THE PITCH AND
020394,000027: # YAW ANTENNA GIMBAL ANGLES REQUIRED TO POINT THE LM STEERABLE ANTENNA
020395,000028: # TOWARD THE CENTER OF THE EARTH. THIS ROUTINE IS SELECTED BY THE ASTRO-
020396,000029: # NAUT VIA DSKY ENTRY DURING COASTING FLIGHT OR WHEN THE LM IS ON THE MOON
020397,000030: # SURFACE. THE EARTH OR MOON REFERENCE COORDINATE SYSTEM IS USED DEPENDING
020398,000031: # ON WHETHER THE LM IS ABOUT TO ENTER OR HAS ALREADY ENTERED THE MOON
020399,000032: # SPHERE OF INFLUENCE, RESPECTIVELY
020400,000033:
020401,000034: # TO CALL SUBROUTINE, ASTRONAUT KEYS IN V 64 E
020402,000035:
020403,000036: # SUBROUTINES CALLED -
020404,000037: # R02BOTH
020405,000038: # INTPRET
020406,000039: # LOADTIME
020407,000040: # LEMCONIC
020408,000041: # LUNPOS
020409,000042: # CDUTRIG
020410,000043: # *SMNB*
020411,000044: # BANKCALL
020412,000045: # B5OFF
020413,000046: # ENDOFJOB
020414,000047: # BLANKET
020415,000048:
020416,000049: # RETURNS WITH
020417,000050: # PITCH ANGLE IN PITCHANG REV. B0
020418,000051: # YAW ANGLE IN YAWANG REV. B0
020419,000052:
020420,000053: # ERASABLES USED
020421,000054: # PITCHANG
020422,000055: # YAWANG
020423,000056: # RLM
020424,000057: # VAC AREA
020425,000058:
020426,000059: 41,3731 BANK 41
020427,000060: 42,2000 SETLOC SBAND
020428,000061: 42,2000 BANK
020429,000062:
020430,000063: 42,3606 E7,1471 EBANK= WHOCARES
020431,000064: 42,3606 COUNT* $$/R05
020432,000065: 42,3606 04616 SBANDANT TC BANKCALL
Page 487 |
020434,000067: 42,3607 11254 CADR R02BOTH # CHECK IF IMU IS ON AND ALIGNED
020435,000068: 42,3610 06037 TC INTPRET
020436,000069: 42,3611 47001 SETPD RTB
020437,000070: 42,3612 00001 0D
020438,000071: 42,3613 21573 LOADTIME # PICK UP CURRENT TIME
020439,000072: 42,3614 34041 STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
020440,000073: 42,3615 27100 LEMCONIC # USING CONIC INTEGRATION
020441,000074: 42,3616 46135 SLOAD BHIZ
020442,000075: 42,3617 00050 X2 # X2 =0 EARTH SPHERE, X2 =2 MOON SPHERE
020443,000076: 42,3620 65636 CONV4
020444,000077: 42,3621 77775 VLOAD
020445,000078: 42,3622 00001 RATT
020446,000079: 42,3623 16205 STODL RLM
020447,000080: 42,3624 00015 TAT
020448,000081: 42,3625 77624 CONV3 CALL
020449,000082: 42,3626 33664 LUNPOS # UNIT POSITION VECTOR FROM EARTH TO MOON
020450,000083: 42,3627 74375 VLOAD VXSC
020451,000084: 42,3630 02723 VMOON
020452,000085: 42,3631 24001 REMDIST # MEAN DISTANCE FROM EARTH TO MOON
020453,000086: 42,3632 53372 VSL1 VAD
020454,000087: 42,3633 02205 RLM
020455,000088: 42,3634 77650 GOTO
020456,000089: 42,3635 65640 CONV5
020457,000090: 42,3636 77775 CONV4 VLOAD
020458,000091: 42,3637 00001 RATT # UE = -UNIT(RATT) EARTH SPHERE
020459,000092: 42,3640 53401 CONV5 SETPD UNIT # UE = -UNIT((REM)(UEM) + RL) MOON SPHERE
020460,000093: 42,3641 00001 0D # SET PL POINTER TO 0
020461,000094: 42,3642 45076 VCOMP CALL
020462,000095: 42,3643 47537 CDUTRIG # COMPUTE SINES AND COSINES OF CDU ANGLES
020463,000096: 42,3644 76521 MXV VSL1 # TRANSFORM REF. COORDINATE SYSTEM TO
020464,000097: 42,3645 01734 REFSMMAT # STABLE MEMBER B-1 X B-1 X B+1 = B-1
020465,000098: 42,3646 71206 PUSH DLOAD # 8D
020466,000099: 42,3647 06522 HI6ZEROS
020467,000100: 42,3650 02201 STORE PITCHANG
020468,000101: 42,3651 26203 STOVL YAWANG # ZERO OUT ANGLES
020469,000102: 42,3652 77624 CALL
020470,000103: 42,3653 47671 *SMNB*
020471,000104: 42,3654 16205 STODL RLM # PRE-MULTIPLY RLM BY (NBSA) MATRIX(B0)
020472,000105: 42,3655 02207 RLM +2
020473,000106: 42,3656 45206 PUSH DSU
020474,000107: 42,3657 02205 RLM
020475,000108: 42,3660 77605 DMP
020476,000109: 42,3661 25771 1OVSQRT2
020477,000110: 42,3662 16207 STODL RLM +2
020478,000111: 42,3663 41215 DAD DMP
020479,000112: 42,3664 02205 RLM
020480,000113: 42,3665 25771 1OVSQRT2
020481,000114: 42,3666 26205 STOVL RLM # R B-1
020482,000115: 42,3667 02205 RLM
020483,000116: 42,3670 63256 UNIT PDVL
Page 488 |
020485,000118: 42,3671 02205 RLM
020486,000119: 42,3672 72431 VPROJ VSL2 # PROJECTION OF R ONTO LM XZ PLANE
020487,000120: 42,3673 06516 HIUNITY
020488,000121: 42,3674 40045 BVSU BOV # CLEAR OVERFLOW INDICATOR IF ON
020489,000122: 42,3675 02205 RLM
020490,000123: 42,3676 65677 COVCNV
020491,000124: 42,3677 40056 COVCNV UNIT BOV # EXIT ON OVERFLOW
020492,000125: 42,3700 65745 SBANDEX
020493,000126: 42,3701 47206 PUSH VXV # URP VECTOR B-1
020494,000127: 42,3702 06514 HIUNITZ
020495,000128: 42,3703 57572 VSL1 VCOMP # UZ X URP = -(URP X UZ)
020496,000129: 42,3704 02205 STORE RLM # X VEC B-1
020497,000130: 42,3705 63241 DOT PDVL # SGN(X.UY) UNSCALED
020498,000131: 42,3706 06516 HIUNITY
020499,000132: 42,3707 02205 RLM
020500,000133: 42,3710 75246 ABVAL SIGN
020501,000134: 42,3711 77736 ASIN # ASIN((SGN(X.UY))ABV(X)) REV B0
020502,000135: 42,3712 26201 STOVL PITCHANG
020503,000136: 42,3713 00007 URP
020504,000137: 42,3714 51041 DOT BPL
020505,000138: 42,3715 06514 HIUNITZ
020506,000139: 42,3716 65723 NOADJUST # YES, -90 TO +90
020507,000140: 42,3717 45345 DLOAD DSU
020508,000141: 42,3720 06520 HIDPHALF
020509,000142: 42,3721 02201 PITCHANG
020510,000143: 42,3722 02201 STORE PITCHANG
020511,000144: 42,3723 47375 NOADJUST VLOAD VXV
020512,000145: 42,3724 00001 UR # Z = (UR X URP)
020513,000146: 42,3725 00007 URP
020514,000147: 42,3726 77772 VSL1
020515,000148: 42,3727 16205 STODL RLM # Z VEC B-1
020516,000149: 42,3730 02201 PITCHANG
020517,000150: 42,3731 74356 SIN VXSC
020518,000151: 42,3732 06514 HIUNITZ
020519,000152: 42,3733 71525 PDDL COS
020520,000153: 42,3734 02201 PITCHANG
020521,000154: 42,3735 52361 VXSC VSU
020522,000155: 42,3736 06520 HIUNITX # (UX COS ALPHA) - (UZ SIN ALPHA)
020523,000156: 42,3737 63241 DOT PDVL # YAW.Z
020524,000157: 42,3740 02205 RLM
020525,000158: 42,3741 02205 RLM
020526,000159: 42,3742 75246 ABVAL SIGN
020527,000160: 42,3743 77736 ASIN
020528,000161: 42,3744 02203 STORE YAWANG
020529,000162: 42,3745 77776 SBANDEX EXIT
020530,000163: 42,3746 31044 CA EXTVBACT
020531,000164: 42,3747 74747 MASK BIT5 # IS BIT5 STILL ON
020532,000165: 42,3750 00006 EXTEND
020533,000166: 42,3751 15472 BZF ENDEXT # NO
020534,000167: 42,3752 35017 CAF PRIO5
Page 489 |
020536,000169: 42,3753 05146 TC PRIOCHNG
020537,000170: 42,3754 33767 CAF V06N51 # DISPLAY ANGLES
020538,000171: 42,3755 04616 TC BANKCALL
020539,000172: 42,3756 20353 CADR GOMARKFR
020540,000173: 42,3757 05563 TC B5OFF # TERMINATE
020541,000174: 42,3760 05563 TC B5OFF # PROCEED
020542,000175: 42,3761 05155 TC ENDOFJOB # RECYCLE
020543,000176: 42,3762 34751 CAF BIT3 # IMMEDIATE RETURN
020544,000177: 42,3763 05464 TC BLANKET # BLANK R3
020545,000178: 42,3764 34740 CAF PRIO4
020546,000179: 42,3765 05146 TC PRIOCHNG
020547,000180: 42,3766 03610 TC SBANDANT +2 # YES, CONTINUE DISPLAYING ANGLES
020548,000181: 42,3767 01463 V06N51 VN 0651
020549,000182: 42,3770 26501 07463 1OVSQRT2 2DEC .7071067815 # 1/SQRT(2)
020550,000183:
020551,000184: 42,3772 UR EQUALS 0D
020552,000185: 42,3772 URP EQUALS 6D
020553,000186: 42,3772 30,2000 SBANK= LOWSUPER
020554,000187:
End of include-file S-BAND_ANTENNA_FOR_LM.agc. Parent file is MAIN.agc