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. |
014909,000002: ## Copyright: Public domain.
014910,000003: ## Filename: KALCMANU_STEERING.agc
014911,000004: ## Purpose: A section of Luminary revision 98.
014912,000005: ## It is part of the reconstructed source code for the a
014913,000006: ## development version of the flight software for the Lunar
014914,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
014915,000008: ## The code has been recreated from a copy of Luminary 99
014916,000009: ## revision 001, using asterisks indicating changed lines in
014917,000010: ## the listing and Luminary Memo #85, which lists changes between
014918,000011: ## Luminary 98 and 99.
014919,000012: ## Reference: pp. 365-369
014920,000013: ## Assembler: yaYUL
014921,000014: ## Contact: Ron Burkey <info@sandroid.org>.
014922,000015: ## Website: www.ibiblio.org/apollo/index.html
014923,000016: ## Mod history: 2019-07-28 MAS Created from Luminary 99.
014924,000017:
Page 365 |
014926,000019: # GENERATION OF STEERING COMMANDS FOR DIGITAL AUTOPILOT FREE FALL MANEUVERS
014927,000020:
014928,000021: # NEW COMMANDS WILL BE GENERATED EVERY ONE SECOND DURING THE MANEUVER
014929,000022:
014930,000023: 22,3003 E6,1707 EBANK= TTEMP
014931,000024:
014932,000025: 22,3003 04616 NEWDELHI TC BANKCALL # CHECK FOR AUTO STABILIZATION
014933,000026: 22,3004 54262 CADR ISITAUTO # ONLY
014934,000027: 22,3005 10000 CCS A
014935,000028: 22,3006 12730 TCF NOGO -2
014936,000029: 22,3007 06037 NEWANGL TC INTPRET
014937,000030: 22,3010 75160 AXC,1 AXC,2
014938,000031: 22,3011 03246 MIS # COMPUTE THE NEW MATRIX FROM S/C TO
014939,000032: 22,3012 02230 KEL # STABLE MEMBER AXES
014940,000033: 22,3013 77624 CALL
014941,000034: 22,3014 44312 MXM3
014942,000035: 22,3015 45575 VLOAD STADR
014943,000036: 22,3016 50514 STOVL MIS +12D # CALCULATE NEW DESIRED CDU ANGLES
014944,000037: 22,3017 77626 STADR
014945,000038: 22,3020 50522 STOVL MIS +6D
014946,000039: 22,3021 77626 STADR
014947,000040: 22,3022 74530 STORE MIS
014948,000041: 22,3023 45160 AXC,1 CALL
014949,000042: 22,3024 03246 MIS
014950,000043: 22,3025 44654 DCMTOCDU # PICK UP THE NEW CDU ANGLES FROM MATRIX
014951,000044: 22,3026 77634 RTB
014952,000045: 22,3027 21620 V1STO2S
014953,000046: 22,3030 03304 STORE NCDU # NEW CDU ANGLES
014954,000047: 22,3031 77414 BONCLR EXIT
014955,000048: 22,3032 01215 CALCMAN2
014956,000049: 22,3033 45122 MANUSTAT # TO START MANEUVER
014957,000050: 22,3034 34752 CAF TWO # +0 OTHERWISE
014958,000051: 22,3035 55272 INCRDCDU TS SPNDX
014959,000052: 22,3036 51272 INDEX SPNDX
014960,000053: 22,3037 31676 CA BCDU # INITIAL CDU ANGLES
014961,000054: 22,3040 00006 EXTEND # OR PREVIOUS DESIRED CDU ANGLES
014962,000055: 22,3041 51272 INDEX SPNDX
014963,000056: 22,3042 21703 MSU NCDU
014964,000057: 22,3043 00006 EXTEND
014965,000058: 22,2000 SETLOC KALCMON1
014966,000059: 22,2000 BANK
014967,000060:
014968,000061: 22,3044 73121 MP DT/TAU
014969,000062: 22,3045 10000 CCS A # CONVERT TO 2S COMPLEMENT
014970,000063: 22,3046 64753 AD ONE
014971,000064: 22,3047 13051 TCF +2
014972,000065: 22,3050 40000 COM
014973,000066: 22,3051 51272 INDEX SPNDX
014974,000067: 22,3052 55640 TS DELDCDU # ANGLE INCREMENTS TO BE ADDED TO
014975,000068: 22,3053 51272 INDEX SPNDX # CDUXD, CDUYD, CDUZD EVERY TENTH SECOND
Page 366 |
014977,000070: 22,3054 31703 CA NCDU # BY LEM DAP
014978,000071: 22,3055 51272 INDEX SPNDX
014979,000072: 22,3056 57676 XCH BCDU
014980,000073: 22,3057 51272 INDEX SPNDX
014981,000074: 22,3060 55635 TS CDUXD
014982,000075: 22,3061 11272 CCS SPNDX
014983,000076: 22,3062 13035 TCF INCRDCDU # LOOP FOR THREE AXES
014984,000077:
014985,000078: 22,3063 00003 RELINT
014986,000079:
014987,000080: # COMPARE PRESENT TIME WITH TIME TO TERMINATE MANEUVER
014988,000081:
014989,000082: 22,3064 03075 TMANUCHK TC TIMECHK
014990,000083: 22,3065 13170 TCF CONTMANU
014991,000084: 22,3066 34753 CAF ONE
014992,000085: 22,3067 00004 MANUSTAL INHINT # END MAJOR PART OF MANEUVER WITHIN 1 SEC
014993,000086: 22,3070 05203 TC WAITLIST # UNDER WAITLIST CALL TO MANUSTOP
014994,000087: 22,3071 E6,1707 EBANK= TTEMP
014995,000088: 22,3071 03213 44066 2CADR MANUSTOP
014996,000089:
014997,000090: 22,3073 00003 RELINT
014998,000091: 22,3074 15155 TCF ENDOFJOB
014999,000092:
015000,000093: 22,3075 00006 TIMECHK EXTEND
015001,000094: 22,3076 40025 DCS TIME2
015002,000095: 22,3077 53710 DXCH TTEMP
015003,000096: 22,3100 00006 EXTEND
015004,000097: 22,3101 31734 DCA TM
015005,000098: 22,3102 21710 DAS TTEMP
015006,000099: 22,3103 11707 CCS TTEMP
015007,000100: 22,3104 00002 TC Q
015008,000101: 22,3105 13107 TCF +2
015009,000102: 22,3106 13117 TCF 2NDRETRN
015010,000103: 22,3107 11710 CCS TTEMP +1
015011,000104: 22,3110 00002 TC Q
015012,000105: 22,3111 13113 TCF MANUOFF
015013,000106: 22,3112 40000 COM
015014,000107: 22,3113 63166 MANUOFF AD ONESEK +1
015015,000108: 22,3114 00006 EXTEND
015016,000109: 22,3115 63117 BZMF 2NDRETRN
015017,000110: 22,3116 24002 INCR Q
015018,000111: 22,3117 24002 2NDRETRN INCR Q
015019,000112: 22,3120 00002 TC Q
015020,000113:
015021,000114: 22,3121 03146 DT/TAU DEC .1
015022,000115:
015023,000116: 22,3122 77776 MANUSTAT EXIT # INITIALIZATION ROUTINE
015024,000117: 22,3123 00006 EXTEND # FOR AUTOMATIC MANEUVERS
015025,000118: 22,3124 30025 DCA TIME2
Page 367 |
015027,000120: 22,3125 21734 DAS TM # TM+T0 MANEUVER COMPLETION TIME
015028,000121: 22,3126 00006 EXTEND
015029,000122: 22,3127 43166 DCS ONESEK
015030,000123: 22,3130 21734 DAS TM # (TM+T0)-1
015031,000124: 22,3131 00004 INHINT
015032,000125: 22,3132 34752 CAF TWO
015033,000126: 22,3133 55701 RATEBIAS TS KSPNDX
015034,000127: 22,3134 60000 DOUBLE
015035,000128: 22,3135 55702 TS KDPNDX
015036,000129: 22,3136 50000 INDEX A
015037,000130: 22,3137 31725 CA BRATE
015038,000131: 22,3140 51701 INDEX KSPNDX # STORE MANEUVER RATE IN
015039,000132: 22,3141 55643 TS OMEGAPD # OMEGAPD, OMEGAQD, OMEGARD
015040,000133: 22,3142 00006 EXTEND
015041,000134: 22,3143 63145 BZMF +2 # COMPUTE ATTITUDE ERROR
015042,000135: 22,3144 40000 COM # OFFSET = (WX)ABS(WX)/2AJX
015043,000136: 22,3145 00006 EXTEND # WHERE AJX= 2-JET ACCELERATION
015044,000137: 22,3146 73167 MP BIASCALE # = -1/16
015045,000138: 22,3147 00006 EXTEND
015046,000139: 22,3150 51702 INDEX KDPNDX
015047,000140: 22,3151 71725 MP BRATE
015048,000141: 22,3152 00006 EXTEND
015049,000142: 22,3153 51701 INDEX KSPNDX
015050,000143: 22,3154 11530 DV 1JACC # = AJX $ 90 DEG/SEC-SEC
015051,000144: 22,3155 51701 INDEX KSPNDX
015052,000145: 22,3156 55277 TS DELPEROR # $ 180 DEG
015053,000146: 22,3157 11701 CCS KSPNDX
015054,000147: 22,3160 13133 TCF RATEBIAS
015055,000148:
015056,000149: 22,3161 30025 CA TIME1
015057,000150: 22,3162 63166 AD ONESEK +1
015058,000151: 22,3163 57706 XCH NEXTIME
015059,000152: 22,3164 13034 TCF INCRDCDU -1
015060,000153:
015061,000154: 22,3165 00000 ONESEK DEC 0 B-14
015062,000155: 22,3166 00144 DEC 100 B-14
015063,000156:
015064,000157: 22,3167 75777 BIASCALE OCT 75777 # = -1/16
015065,000158:
015066,000159: 22,3170 40025 CONTMANU CS TIME1 # RESET FOR NEXT DCDU UPDATE
015067,000160: 22,3171 61706 AD NEXTIME
015068,000161: 22,3172 10000 CCS A
015069,000162: 22,3173 64753 AD ONE
015070,000163: 22,3174 13177 TCF MANUCALL
015071,000164: 22,3175 64735 AD NEGMAX
015072,000165: 22,3176 40000 COM
015073,000166: 22,3177 00004 MANUCALL INHINT # CALL FOR NEXT UPDATE VIA WAITLIST
015074,000167: 22,3200 05203 TC WAITLIST
015075,000168: 22,3201 E6,1707 EBANK= TTEMP
015076,000169: 22,3201 03206 44066 2CADR UPDTCALL
Page 368 |
015078,000171: 22,3203 33166 CAF ONESEK +1 # INCREMENT TIME FOR NEXT UPDATE
015079,000172: 22,3204 27706 ADS NEXTIME
015080,000173: 22,3205 15155 TCF ENDOFJOB
015081,000174:
015082,000175: 22,3206 37714 UPDTCALL CAF PRIO26 # SATELLITE PROGRAM TO CALL FOR UPDATE
015083,000176: 22,3207 05105 TC FINDVAC # OF STEERING COMMANDS
015084,000177: 22,3210 E6,1707 EBANK= TTEMP
015085,000178: 22,3210 03003 44066 2CADR NEWDELHI
015086,000179:
015087,000180: 22,3212 05261 TC TASKOVER
015088,000181:
Page 369 |
015090,000183: # ROUTINE FOR TERMINATING AUTOMATIC MANEUVERS
015091,000184:
015092,000185: 22,3213 34755 MANUSTOP CAF ZERO # ZERO MANEUVER RATES
015093,000186: 22,3214 55642 TS DELDCDU2
015094,000187: 22,3215 55645 TS OMEGARD
015095,000188: 22,3216 55301 TS DELREROR
015096,000189: 22,3217 55641 TS DELDCDU1
015097,000190: 22,3220 55644 TS OMEGAQD
015098,000191: 22,3221 55300 TS DELQEROR
015099,000192: 22,3222 30323 CA CPSI # SET DESIRED GIMBAL ANGLES TO
015100,000193: 22,3223 55637 TS CDUZD # DESIRED FINAL GIMBAL ANGLES
015101,000194: 22,3224 30322 CA CTHETA
015102,000195: 22,3225 55636 TS CDUYD
015103,000196: 22,3226 30321 ENDROLL CA CPHI # NO FINAL YAW
015104,000197: 22,3227 55635 TS CDUXD
015105,000198: 22,3230 34755 CAF ZERO
015106,000199: 22,3231 55643 TS OMEGAPD # I.E. MANEUVER DID NOT GO THRU
015107,000200: 22,3232 55640 TS DELDCDU # GIMBAL LOCK ORIGINALLY
015108,000201: 22,3233 55277 TS DELPEROR
015109,000202: 22,3234 31311 GOODMANU CA ATTPRIO # RESTORE USERS PRIO
015110,000203: 22,3235 54063 TS NEWPRIO
015111,000204:
015112,000205: 22,3236 34755 CA ZERO # ZERO ATTCADR
015113,000206: 22,3237 53310 DXCH ATTCADR
015114,000207:
015115,000208: 22,3240 05116 TC SPVAC # RETURN TO USER
015116,000209:
015117,000210: 22,3241 05261 TC TASKOVER
015118,000211:
015119,000212:
End of include-file KALCMANU_STEERING.agc. Parent file is MAIN.agc