Source Code
![]() |
This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure! |
014923,000002: ## Copyright: Public domain.
014924,000003: ## Filename: GIMBAL_LOCK_AVOIDANCE.agc
014925,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
014926,000005: ## It is part of the source code for the Lunar Module's (LM)
014927,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
014928,000007: ## Assembler: yaYUL
014929,000008: ## Contact: Ron Burkey <info@sandroid.org>.
014930,000009: ## Website: www.ibiblio.org/apollo.
014931,000010: ## Pages: 364
014932,000011: ## Mod history: 2009-05-17 RSB Adapted from the corresponding
014933,000012: ## Luminary131 file, using page
014934,000013: ## images from Luminary 1A.
014935,000014: ## 2010-12-31 JL Fixed page number comment.
014936,000015: ## 2016-12-14 RSB Proofed text comments with octopus/ProoferComments
014937,000016: ## but no errors found.
014938,000017: ## 2017-03-03 RSB Snapshot of Luminary 99 Rev 1.
014939,000018: ## 2017-03-15 RSB Comment-text proofed using 5-way
014940,000019: ## side-by-side diff of Luminary 69/99/116/131/210,
014941,000020: ## but no errors (or any differences) found.
014942,000021:
![]() |
Page 364 |
014944,000023: 15,2050 BANK 15
014945,000024:
014946,000025: 22,2000 SETLOC KALCMON1
014947,000026: 22,2000 BANK
014948,000027:
014949,000028: # DETECTING GIMBAL LOCK
014950,000029: 22,2744 22,2744 LOCSKIRT EQUALS NOGIMLOC
014951,000030:
014952,000031: 22,2744 77614 NOGIMLOC SET
014953,000032: 22,2745 01074 CALCMAN3
014954,000033: 22,2746 70740 WCALC LXC,1 DLOAD*
014955,000034: 22,2747 01325 RATEINDX # CHOOSE THE DESIRED MANEUVER RATE
014956,000035: 22,2750 04772 ARATE,1 # FROM A LIST OF FOUR
014957,000036: 22,2751 45002 SR4 CALL # COMPUTE THE INCREMENTAL ROTATION MATRIX
014958,000037: 22,2752 44527 DELCOMP # DEL CORRESPONDING TO A 1 SEC ROTATION
014959,000038: # ABOUT COF
014960,000039: 22,2753 74343 DLOAD* VXSC
014961,000040: 22,2754 04772 ARATE,1
014962,000041: 22,2755 03271 COF
014963,000042: 22,2756 17326 STODL BRATE # COMPONENT MANEUVER RATES 45 DEG/SEC
014964,000043: 22,2757 03336 AM
014965,000044: 22,2760 55605 DMP DDV*
014966,000045: 22,2761 05002 ANGLTIME
014967,000046: 22,2762 04772 ARATE,1
014968,000047: 22,2763 77661 SR
014969,000048: 22,2764 20606 5
014970,000049: 22,2765 03334 STORE TM # MANEUVER EXECUTION TIME SCALED AS T2
014971,000050: 22,2766 77614 SETGO
014972,000051: 22,2767 01035 CALCMAN2 # D(OFF) = CONTINUE MANEUVER
014973,000052: 22,2770 45010 NEWANGL +1 # 1(ON) = START MANEUVER
014974,000053:
014975,000054: # THE FOUR SELECTABLE FREE FALL MANEUVER RATES SELECTED BY
014976,000055: # LOADING RATEINDX WITH 0, 2, 4, 6, RESPECTIVELY
014977,000056:
014978,000057: 22,2771 00221 24255 ARATE 2DEC .0088888888 # = 0.2 DEG/SEC $ 22.5 DEG/SEC
014979,000058:
014980,000059: 22,2773 00554 02660 2DEC .0222222222 # = 0.5 DEG/SEC $ 22.5 DEG/SEC
014981,000060:
014982,000061: 22,2775 02660 13301 2DEC .0888888888 # = 2.0 DEG/SEC $ 22.5 DEG/SEC
014983,000062:
014984,000063: 22,2777 16161 30707 2DEC .4444444444 # = 10.0 DEG/SEC $ 22.5 DEG/SEC
014985,000064:
014986,000065: 22,3001 00003 04000 ANGLTIME 2DEC .0001907349 # = 100B-19 FUDGE FACTOR TO CONVERT
014987,000066: # MANEUVER ANGLE TO MANEUVER TIME
014988,000067:
014989,000068:
End of include-file GIMBAL_LOCK_AVOIDANCE.agc. Parent file is MAIN.agc