Source Code
|
These source-code files are part of a reconstructed copy of LUM69 Revision 2, the
flown Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.
The reconstruction began with source code of Luminary 69 revision 0 previously transcribed from a digitized copy of that program. The code was then updated by back-porting the R-2 lunar potential model from previously-transcribed source code of Luminary 99. These required changes were described in the original Luminary memos 75 and 78. The reconstructed code 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 069 printout, although the added code would likely have changed page numbers for a real LUM69 Revision 2 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. |
021831,000002: ## Copyright: Public domain.
021832,000003: ## Filename: S-BAND_ANTENNA_FOR_LM.agc
021833,000004: ## Purpose: A section of LUM69 revision 2.
021834,000005: ## It is part of the reconstructed source code for the flown
021835,000006: ## version of the flight software for the Lunar Module's (LM)
021836,000007: ## Apollo Guidance Computer (AGC) for Apollo 10. The code has
021837,000008: ## been recreated from a copy of Luminary revsion 069, using
021838,000009: ## changes present in Luminary 099 which were described in
021839,000010: ## Luminary memos 75 and 78. The code has been adapted such
021840,000011: ## that the resulting bugger words exactly match those specified
021841,000012: ## for LUM69 revision 2 in NASA drawing 2021152B, which gives
021842,000013: ## relatively high confidence that the reconstruction is correct.
021843,000014: ## Reference: pp. 498-501
021844,000015: ## Assembler: yaYUL
021845,000016: ## Contact: Ron Burkey <info@sandroid.org>.
021846,000017: ## Website: www.ibiblio.org/apollo/index.html
021847,000018: ## Mod history: 2019-07-27 MAS Created from Luminary 69.
021848,000019:
|
Page 498 |
021850,000021: # SUBROUTINE NAME: R05 - S-BAND ANTENNA FOR LM
021851,000022:
021852,000023: # MOD0 BY T. JAMES
021853,000024: # MOD1 BY P. SHAKIR
021854,000025:
021855,000026: # FUNCTIONAL DESCRIPTION
021856,000027:
021857,000028: # THE S-BAND ANTENNA ROUTINE, R05, COMPUTES AND DISPLAYS THE PITCH AND
021858,000029: # YAW ANTENNA GIMBAL ANGLES REQUIRED TO POINT THE LM STEERABLE ANTENNA
021859,000030: # TOWARD THE CENTER OF THE EARTH. THIS ROUTINE IS SELECTED BY THE ASTRO-
021860,000031: # NAUT VIA DSKY ENTRY DURING COASTING FLIGHT OR WHEN THE LM IS ON THE MOON
021861,000032: # SURFACE. THE EARTH OR MOON REFERENCE COORDINATE SYSTEM IS USED DEPENDING
021862,000033: # ON WHETHER THE LM IS ABOUT TO ENTER OR HAS ALREADY ENTERED THE MOON
021863,000034: # SPHERE OF INFLUENCE, RESPECTIVELY
021864,000035:
021865,000036: # TO CALL SUBROUTINE, ASTRONAUT KEYS IN V 64 E
021866,000037:
021867,000038: # SUBROUTINES CALLED-
021868,000039: # R02BOTH
021869,000040: # INTPRET
021870,000041: # LOADTIME
021871,000042: # LEMCONIC
021872,000043: # LUNPOS
021873,000044: # CDUTRIG
021874,000045: # *SMNB*
021875,000046: # BANKCALL
021876,000047: # B5OFF
021877,000048: # ENDOFJOB
021878,000049: # BLANKET
021879,000050:
021880,000051: # RETURNS WITH
021881,000052: # PITCH ANGLE IN PITCHANG REV. B0
021882,000053: # YAW ANGLE IN YAWANG REV. B0
021883,000054:
021884,000055: # ERASABLES USED
021885,000056: # PITCHANG
021886,000057: # YAWANG
021887,000058: # RLM
021888,000059: # VAC AREA
021889,000060:
021890,000061: 41,3731 BANK 41
021891,000062: 42,2000 SETLOC SBAND
021892,000063: 42,2000 BANK
021893,000064:
021894,000065: 42,3602 E7,1467 EBANK= WHOCARES
021895,000066: 42,3602 COUNT* $$/R05
021896,000067: 42,3602 04616 SBANDANT TC BANKCALL
|
Page 499 |
021898,000069: 42,3603 11175 CADR R02BOTH # CHECK IF IMU IS ON AND ALIGNED
021899,000070: 42,3604 06036 TC INTPRET
021900,000071: 42,3605 47001 SETPD RTB
021901,000072: 42,3606 00001 0D
021902,000073: 42,3607 21462 LOADTIME # PICK UP CURRENT TIME
021903,000074: 42,3610 34041 STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
021904,000075: 42,3611 27100 LEMCONIC # USING CONIC INTEGRATION
021905,000076: 42,3612 46135 SLOAD BHIZ
021906,000077: 42,3613 00050 X2 # X2 =0 EARTH SPHERE, X2 =2 MOON SPHERE
021907,000078: 42,3614 65632 CONV4
021908,000079: 42,3615 77775 VLOAD
021909,000080: 42,3616 00001 RATT
021910,000081: 42,3617 16211 STODL RLM
021911,000082: 42,3620 00015 TAT
021912,000083: 42,3621 77624 CONV3 CALL
021913,000084: 42,3622 33663 LUNPOS # UNIT POSITION VECTOR FROM EARTH TO MOON
021914,000085: 42,3623 74375 VLOAD VXSC
021915,000086: 42,3624 02723 VMOON
021916,000087: 42,3625 24001 REMDIST # MEAN DISTANCE FROM EARTH TO MOON
021917,000088: 42,3626 53372 VSL1 VAD
021918,000089: 42,3627 02211 RLM
021919,000090: 42,3630 77650 GOTO
021920,000091: 42,3631 65634 CONV5
021921,000092: 42,3632 77775 CONV4 VLOAD
021922,000093: 42,3633 00001 RATT # UE = -UNIT(RATT) EARTH SPHERE
021923,000094: 42,3634 53401 CONV5 SETPD UNIT # UE = -UNIT((REM)(UEM) + RL) MOON SPHERE
021924,000095: 42,3635 00001 0D # SET PL POINTER TO 0
021925,000096: 42,3636 45076 VCOMP CALL
021926,000097: 42,3637 47443 CDUTRIG # COMPUTE SINES AND COSINES OF CDU ANGLES
021927,000098: 42,3640 76521 MXV VSL1 # TRANSFORM REF. COORDINATE SYSTEM TO
021928,000099: 42,3641 01734 REFSMMAT # STABLE MEMBER B-1 X B-1 X B+1 = B-1
021929,000100: 42,3642 71206 PUSH DLOAD # 8D
021930,000101: 42,3643 06424 HI6ZEROS
021931,000102: 42,3644 02205 STORE PITCHANG
021932,000103: 42,3645 26207 STOVL YAWANG # ZERO OUT ANGLES
021933,000104: 42,3646 77624 CALL
021934,000105: 42,3647 47575 *SMNB*
021935,000106: 42,3650 16211 STODL RLM # PRE-MULTIPLY RLM BY (NBSA) MATRIX(B0)
021936,000107: 42,3651 02213 RLM +2
021937,000108: 42,3652 45206 PUSH DSU
021938,000109: 42,3653 02211 RLM
021939,000110: 42,3654 77605 DMP
021940,000111: 42,3655 25765 1OVSQRT2
021941,000112: 42,3656 16213 STODL RLM +2
021942,000113: 42,3657 41215 DAD DMP
021943,000114: 42,3660 02211 RLM
021944,000115: 42,3661 25765 1OVSQRT2
021945,000116: 42,3662 26211 STOVL RLM # R B-1
021946,000117: 42,3663 02211 RLM
021947,000118: 42,3664 63256 UNIT PDVL
|
Page 500 |
021949,000120: 42,3665 02211 RLM
021950,000121: 42,3666 72431 VPROJ VSL2 # PROJECTION OF R ONTO LM XZ PLANE
021951,000122: 42,3667 06420 HIUNITY
021952,000123: 42,3670 40045 BVSU BOV # CLEAR OVERFLOW INDICATOR IF ON
021953,000124: 42,3671 02211 RLM
021954,000125: 42,3672 65673 COVCNV
021955,000126: 42,3673 40056 COVCNV UNIT BOV # EXIT ON OVERFLOW
021956,000127: 42,3674 65741 SBANDEX
021957,000128: 42,3675 47206 PUSH VXV # URP VECTOR B-1
021958,000129: 42,3676 06416 HIUNITZ
021959,000130: 42,3677 57572 VSL1 VCOMP # UZ X URP = -(URP X UZ)
021960,000131: 42,3700 02211 STORE RLM # X VEC B-1
021961,000132: 42,3701 63241 DOT PDVL # SGN(X.UY) UNSCALED
021962,000133: 42,3702 06420 HIUNITY
021963,000134: 42,3703 02211 RLM
021964,000135: 42,3704 75246 ABVAL SIGN
021965,000136: 42,3705 77736 ASIN # ASIN((SGN(X.UY))ABV(X)) REV B0
021966,000137: 42,3706 26205 STOVL PITCHANG
021967,000138: 42,3707 00007 URP
021968,000139: 42,3710 51041 DOT BPL
021969,000140: 42,3711 06416 HIUNITZ
021970,000141: 42,3712 65717 NOADJUST # YES, -90 TO +90
021971,000142: 42,3713 45345 DLOAD DSU
021972,000143: 42,3714 06422 HIDPHALF
021973,000144: 42,3715 02205 PITCHANG
021974,000145: 42,3716 02205 STORE PITCHANG
021975,000146: 42,3717 47375 NOADJUST VLOAD VXV
021976,000147: 42,3720 00001 UR # Z = (UR X URP)
021977,000148: 42,3721 00007 URP
021978,000149: 42,3722 77772 VSL1
021979,000150: 42,3723 16211 STODL RLM # Z VEC B-1
021980,000151: 42,3724 02205 PITCHANG
021981,000152: 42,3725 74356 SIN VXSC
021982,000153: 42,3726 06416 HIUNITZ
021983,000154: 42,3727 71525 PDDL COS
021984,000155: 42,3730 02205 PITCHANG
021985,000156: 42,3731 52361 VXSC VSU
021986,000157: 42,3732 06422 HIUNITX # (UX COS ALPHA) - (UZ SIN ALPHA)
021987,000158: 42,3733 63241 DOT PDVL # YAW.Z
021988,000159: 42,3734 02211 RLM
021989,000160: 42,3735 02211 RLM
021990,000161: 42,3736 75246 ABVAL SIGN
021991,000162: 42,3737 77736 ASIN
021992,000163: 42,3740 02207 STORE YAWANG
021993,000164: 42,3741 77776 SBANDEX EXIT
021994,000165: 42,3742 31044 CA EXTVBACT
021995,000166: 42,3743 74747 MASK BIT5 # IS BIT5 STILL ON
021996,000167: 42,3744 00006 EXTEND
021997,000168: 42,3745 15472 BZF ENDEXT # NO
021998,000169: 42,3746 35017 CAF PRIO5
|
Page 501 |
022000,000171: 42,3747 05146 TC PRIOCHNG
022001,000172: 42,3750 33763 CAF V06N51 # DISPLAY ANGLES
022002,000173: 42,3751 04616 TC BANKCALL
022003,000174: 42,3752 20231 CADR GOMARKFR
022004,000175: 42,3753 05563 TC B5OFF # TERMINATE
022005,000176: 42,3754 05563 TC B5OFF # PROCEED
022006,000177: 42,3755 05155 TC ENDOFJOB # RECYCLE
022007,000178: 42,3756 34751 CAF BIT3 # IMMEDIATE RETURN
022008,000179: 42,3757 05464 TC BLANKET # BLANK R3
022009,000180: 42,3760 34740 CAF PRIO4
022010,000181: 42,3761 05146 TC PRIOCHNG
022011,000182: 42,3762 03604 TC SBANDANT +2 # YES, CONTINUE DISPLAYING ANGLES
022012,000183: 42,3763 01463 V06N51 VN 0651
022013,000184: 42,3764 26501 07463 1OVSQRT2 2DEC .7071067815 # 1/SQRT(2)
022014,000185:
022015,000186: 42,3766 UR EQUALS 0D
022016,000187: 42,3766 URP EQUALS 6D
022017,000188: 42,3766 30,2000 SBANK= LOWSUPER
End of include-file S-BAND_ANTENNA_FOR_LM.agc. Parent file is MAIN.agc