Source Code
![]() |
These source-code files derive from a printout of Luminary 210 (Apollo 15-17
Lunar Module guidance computer program), from the personal library of
original AGC developer Don Eyles, digitally photographed at archive.org,
financially sponsored by Jim Lawton, and transcribed to source code by a
team of volunteers. This colorized, syntax-highlighted form was created
by assembling that transcribed source code. Note that the full page images
are available on the
Virtual AGC project page at archive.org, while reduced-size images
are presented at the VirtualAGC project website. Report or fix any
transcription errors at
the Virtual AGC project code repository. Notations on the program listing read, in part: GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY BY NASA 2021112-161 17:11 MAR. 19,1971Note that the date is the date of the printout, not the date of the program revision. |
016382,000002: ## Copyright: Public domain.
016383,000003: ## Filename: GIMBAL_LOCK_AVOIDANCE.agc
016384,000004: ## Purpose: A section of Luminary revision 210.
016385,000005: ## It is part of the source code for the Lunar Module's (LM)
016386,000006: ## Apollo Guidance Computer (AGC) for Apollo 15-17.
016387,000007: ## This file is intended to be a faithful transcription, except
016388,000008: ## that the code format has been changed to conform to the
016389,000009: ## requirements of the yaYUL assembler rather than the
016390,000010: ## original YUL assembler.
016391,000011: ## Reference: p. 376
016392,000012: ## Assembler: yaYUL
016393,000013: ## Contact: Ron Burkey <info@sandroid.org>.
016394,000014: ## Website: www.ibiblio.org/apollo/index.html
016395,000015: ## Mod history: 2016-11-17 JL Created from Luminary131 version.
016396,000016: ## 2016-11-24 HG Transcribed
016397,000017: ## 2016-12-23 RSB Proofed comment text with octopus/ProoferComments
016398,000018: ## but no errors found.
016399,000019:
![]() |
Page 376 |
016401,000021: 15,2162 BANK 15
016402,000022:
016403,000023: 22,2000 SETLOC KALCMON1
016404,000024: 22,2000 BANK
016405,000025:
016406,000026:
016407,000027: # DETECTING GIMBAL LOCK
016408,000028: 22,2744 22,2744 LOCSKIRT EQUALS NOGIMLOC
016409,000029:
016410,000030: 22,2744 77614 NOGIMLOC SET
016411,000031: 22,2745 01074 CALCMAN3
016412,000032: 22,2746 70740 WCALC LXC,1 DLOAD*
016413,000033: 22,2747 01322 RATEINDX # CHOOSE THE DESIRED MANEUVER RATE
016414,000034: 22,2750 04772 ARATE,1 # FROM A LIST OF FOUR
016415,000035: 22,2751 45002 SR4 CALL # COMPUTE THE INCREMENTAL ROTATION MATRIX
016416,000036: 22,2752 44527 DELCOMP # DEL CORRESPONDING TO A 1 SEC ROTATION
016417,000037: # ABOUT COF
016418,000038: 22,2753 74343 DLOAD* VXSC
016419,000039: 22,2754 04772 ARATE,1
016420,000040: 22,2755 03270 COF
016421,000041: 22,2756 17325 STODL BRATE # COMPONENT MANEUVER RATES 45 DEG/SEC
016422,000042: 22,2757 03335 AM
016423,000043: 22,2760 55605 DMP DDV*
016424,000044: 22,2761 05002 ANGLTIME
016425,000045: 22,2762 04772 ARATE,1
016426,000046: 22,2763 77661 SR
016427,000047: 22,2764 20606 5
016428,000048: 22,2765 03333 STORE TM # MANEUVER EXECUTION TIME SCALED AS T2
016429,000049: 22,2766 77614 SETGO
016430,000050: 22,2767 01035 CALCMAN2 # D(OFF) = CONTINUE MANEUVER
016431,000051: 22,2770 45010 NEWANGL +1 # 1(ON) = START MANEUVER
016432,000052: # THE FOUR SELECTABLE FREE FALL MANEUVER RATES SELECTED BY
016433,000053: # LOADING RATEINDX WITH 0,2,4,6, RESPECTIVELY
016434,000054:
016435,000055:
016436,000056: 22,2771 00221 24255 ARATE 2DEC .0088888888 # = 0.2 DEG/SEC $ 22.5 DEG/SEC
016437,000057: 22,2773 00554 02660 2DEC .0222222222 # = 0.5 DEG/SEC $ 22.5 DEG/SEC
016438,000058: 22,2775 02660 13301 2DEC .0888888888 # = 2.0 DEG/SEC $ 22.5 DEG/SEC
016439,000059: 22,2777 16161 30707 2DEC .4444444444 # = 10.0 DEG/SEC $ 22.5 DEG/SEC
016440,000060:
016441,000061: 22,3001 00003 04000 ANGLTIME 2DEC .0001907349 # = 100B-19 FUDGE FACTOR TO CONVERT
016442,000062: # MANEUVER ANGLE TO MANEUVER TIME
End of include-file GIMBAL_LOCK_AVOIDANCE.agc. Parent file is MAIN.agc