Source Code
These source-code files were from the printout at the MIT Museum, with many thanks
to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing
it to us. The printout was digitally photographed by Paul Fjeld. A team of
volunteers transcribed the source code manually from these images or, where
appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9)
source code to agree with the images from the printout. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051 10:28 APR. 1,1969Note that the date is the date of the printout, not the date of the program revision. |
020009,000002: ## Copyright: Public domain. 020010,000003: ## Filename: GROUND_TRACKING_DETERMINATION_PROGRAM.agc 020011,000004: ## Purpose: Part of the source code for Comanche, build 055. 020012,000005: ## It is part of the source code for the Command Module's (CM) 020013,000006: ## Apollo Guidance Computer (AGC), Apollo 11. 020014,000007: ## Assembler: yaYUL 020015,000008: ## Reference: pp. 456-459 020016,000009: ## Contact: Onno Hommes <ohommes@cmu.edu>. 020017,000010: ## Website: www.ibiblio.org/apollo. 020018,000011: ## Mod history: 2009-05-07 OH Transcription Batch 1 Assignment 020019,000012: ## 2009-05-20 RSB Corrected a couple of DIMOFLAG to DIM0FLAG. 020020,000013: ## 2016-12-10 RSB Proofed comments with octopus/ProoferComments 020021,000014: ## and fixed the errors found. 020022,000015: ## 2016-12-10 RSB All of the GOTOPOOH's should have been 020023,000016: ## GOTOPOOH, and I've changed them back. 020024,000017: ## 020025,000018: ## The contents of the "Comanche055" files, in general, are transcribed 020026,000019: ## from scanned documents. 020027,000020: ## 020028,000021: ## Assemble revision 055 of AGC program Comanche by NASA 020029,000022: ## 2021113-051. April 1, 1969. 020030,000023: ## 020031,000024: ## This AGC program shall also be referred to as Colossus 2A 020032,000025: ## 020033,000026: ## Prepared by 020034,000027: ## Massachusetts Institute of Technology 020035,000028: ## 75 Cambridge Parkway 020036,000029: ## Cambridge, Massachusetts 020037,000030: ## 020038,000031: ## under NASA contract NAS 9-4065. 020039,000032: ## 020040,000033: ## Refer directly to the online document mentioned above for further information. 020041,000034: ## Please report any errors to info@sandroid.org. 020042,000035:
Page 456 |
020044,000037: # GROUND TRACKING DETERMINATION PROGRAM P21 020045,000038: 020046,000039: # PROGRAM DESCRIPTION 020047,000040: # MOD NO - 1 020048,000041: # MOD BY - N. M. NEVILLE 020049,000042: # FUNCTIONAL DECRIPTION- 020050,000043: 020051,000044: # TO PROVIDE THE ASTRONAUT DETAILS OF THE LM OR CSM GROUND TRACK WITHOUT 020052,000045: # THE NEED FOR GROUND COMMUNICATION (REQUESTED BY DSKY). 020053,000046: # CALLING SEQUENCE- 020054,000047: 020055,000048: # ASTRONAUT REQUEST THROUGH DSKY V37E21E 020056,000049: # SUBROUTINES CALLED- 020057,000050: 020058,000051: # GOPERF4 020059,000052: # GOFLASH 020060,000053: # THISPREC 020061,000054: # OTHPREC 020062,000055: # LAT-LONG 020063,000056: # NORMAL EXIT MODES- 020064,000057: 020065,000058: # ASTRONAUT REQUEST TROUGH DSKY TO TERMINATE PROGRAM V34E 020066,000059: # ALARM OR ABORT EXIT MODES- 020067,000060: 020068,000061: # NONE 020069,000062: # OUTPUT- 020070,000063: 020071,000064: # OCTAL DISPLAY OF OPTION CODE AND VEHICLE WHOSE GROUND TRACK IS TO BE 020072,000065: # COMPUTED 020073,000066: # OPTION CODE 00002 020074,000067: # THIS 00001 020075,000068: # OTHER 00002 020076,000069: # DECIMAL DISPLAY OF TIME TO BE INTEGRATED TO HOURS , MINUTES , SECONDS 020077,000070: # DECIMAL DISPLAY OF LAT,LONG,ALT 020078,000071: # ERASABLE INITIALIZATION REQUIRED 020079,000072: 020080,000073: # AX0 2DEC 4.652459653 E-5 RADIANS %68-69 CONSTANTS" 020081,000074: 020082,000075: # -AY0 2DEC 2.147535898 E-5 RADIANS 020083,000076: 020084,000077: # AZ0 2DEC .7753206164 REVOLUTIONS 020085,000078: # FOR LUNAR ORBITS 504LM VECTOR IS NEEDED 020086,000079: 020087,000080: # 504LM 2DEC -2.700340600 E-5 RADIANS 020088,000081: 020089,000082: # 504LM _2 2DEC -7.514128400 E-4 RADIANS 020090,000083: 020091,000084: # 504LM _4 2DEC _2.553198641 E-4 RADIANS 020092,000085: 020093,000086: # NONE 020094,000087: # DEBRIS 020095,000088:
Page 457 |
020097,000090: # CENTRALS-A,Q,L 020098,000091: # OTHER-THOSE USED BY THE ABOVE LISTED SUBROUTINES 020099,000092: # SEE LEMPREC, LAT-LONG 020100,000093: 020101,000094: 33,3776 30,2000 SBANK= LOWSUPER # FOR LOW 2CADR'S. 020102,000095: 020103,000096: 33,3776 BANK 33 020104,000097: 37,2000 SETLOC P20S 020105,000098: 37,2000 BANK 020106,000099: 020107,000100: 37,2001 E4,1715 EBANK= P21TIME 020108,000101: 37,2001 COUNT 24/P21 020109,000102: 020110,000103: 37,2001 35017 PROG21 CAF ONE 020111,000104: 37,2002 55132 TS OPTION2 # ASSUMED VEHICLE IS LM, R2 = 00001 020112,000105: 37,2003 35016 CAF BIT2 # OPTION 2 020113,000106: 37,2004 04662 TC BANKCALL 020114,000107: 37,2005 21055 CADR GOPERF4 020115,000108: 37,2006 04106 TC GOTOPOOH # TERMINATE 020116,000109: 37,2007 02011 TC +2 # PROCEED VALUE OF ASSUMED VEHICLE OK 020117,000110: 37,2010 02003 TC -5 # R2 LOADED THROUGH DSKY 020118,000111: 37,2011 32152 P21PROG1 CAF V6N34 # LOAD DESIRED TIME OF LAT-LONG. 020119,000112: 37,2012 04662 TC BANKCALL 020120,000113: 37,2013 20720 CADR GOFLASH 020121,000114: 37,2014 04106 TC GOTOPOOH # TERM 020122,000115: 37,2015 02017 TC +2 # PROCEED VALUES OK 020123,000116: 37,2016 02011 TC -5 # TIME LOADED THROUGH DSKY 020124,000117: 37,2017 06006 TC INTPRET 020125,000118: 37,2020 77745 DLOAD 020126,000119: 37,2021 01046 DSPTEM1 020127,000120: 37,2022 34041 STCALL TDEC1 # INTEG TO TIME SPECIFIED IN TDEC 020128,000121: 37,2023 27442 INTSTALL 020129,000122: 37,2024 43014 BON SET 020130,000123: 37,2025 01303 P21FLAG 020131,000124: 37,2026 76044 P21CONT # ON...RECYCLE USING BASE VECTOR 020132,000125: 37,2027 01474 VINTFLAG # OFF..1ST PASS CALC BASE VECTOR 020133,000126: 37,2030 70535 SLOAD SR1 020134,000127: 37,2031 01133 OPTION2 020135,000128: 37,2032 43030 BHIZ CLEAR 020136,000129: 37,2033 76035 +2 # ZERO..THIS VEHICLE (CM) 020137,000130: 37,2034 01674 VINTFLAG # ONE...OTHER VEHICLE(LM) 020138,000131: 37,2035 43014 CLEAR CLEAR 020139,000132: 37,2036 01676 DIM0FLAG 020140,000133: 37,2037 01673 INTYPFLG # PRECISION 020141,000134: 37,2040 77624 CALL 020142,000135: 37,2041 27162 INTEGRV # CALCULATE 020143,000136: 37,2042 77650 GOTO # .AND 020144,000137: 37,2043 76065 P21VSAVE # ..SAVE BASE VECTOR 020145,000138: 37,2044 77775 P21CONT VLOAD # RECYCLE..INTEG FROM BASE VECTOR 020146,000139: 37,2045 03605 P21BASER
Page 458 |
020148,000141: 37,2046 25535 STOVL RCV # ..POS 020149,000142: 37,2047 03613 P21BASEV 020150,000143: 37,2050 15543 STODL VCV # ..VEL 020151,000144: 37,2051 02316 P21TIME 020152,000145: 37,2052 01517 STORE TET # ..TIME 020153,000146: 37,2053 43014 CLEAR CLEAR 020154,000147: 37,2054 01676 DIM0FLAG 020155,000148: 37,2055 00263 MOONFLAG 020156,000149: 37,2056 53135 SLOAD BZE 020157,000150: 37,2057 03604 P21ORIG 020158,000151: 37,2060 76063 +3 # ZERO = EARTH 020159,000152: 37,2061 77614 SET # ...2 = MOON 020160,000153: 37,2062 00063 MOONFLAG 020161,000154: 37,2063 77624 CALL 020162,000155: 37,2064 27135 INTEGRVS 020163,000156: 37,2065 77745 P21VSAVE DLOAD # SAVE CURRENT BASE VECTOR 020164,000157: 37,2066 00015 TAT 020165,000158: 37,2067 26316 STOVL P21TIME # ..TIME 020166,000159: 37,2070 00017 RATT1 020167,000160: 37,2071 27605 STOVL P21BASER # ..POS B-29 OR B-27 020168,000161: 37,2072 00025 VATT1 020169,000162: 37,2073 03613 STORE P21BASEV # ..VEL B-7 OR B-5 020170,000163: 37,2074 53646 ABVAL SL* 020171,000164: 37,2075 57576 0,2 020172,000165: 37,2076 27623 STOVL P21VEL # /VEL/ FOR N73 DSP 020173,000166: 37,2077 00001 RATT 020174,000167: 37,2100 50256 UNIT DOT 020175,000168: 37,2101 00007 VATT # U(R).(V) 020176,000169: 37,2102 67471 DDV ASIN # U(R).U(V) 020177,000170: 37,2103 03623 P21VEL 020178,000171: 37,2104 03625 STORE P21GAM # SIN-1 U(R).U(V), -90 TO +90 020179,000172: 37,2105 43134 SXA,2 SET 020180,000173: 37,2106 03603 P21ORIG # 0 = EARTH 2 = MOON 020181,000174: 37,2107 01063 P21FLAG 020182,000175: 37,2110 67214 P21DSP CLEAR SLOAD # GENERATE DISPLAY DATA 020183,000176: 37,2111 01663 LUNAFLAG 020184,000177: 37,2112 00050 X2 020185,000178: 37,2113 43054 BZE SET 020186,000179: 37,2114 76116 +2 # 0 = EARTH 020187,000180: 37,2115 01463 LUNAFLAG 020188,000181: 37,2116 77775 VLOAD 020189,000182: 37,2117 00001 RATT 020190,000183: 37,2120 16152 STODL ALPHAV 020191,000184: 37,2121 00015 TAT 020192,000185: 37,2122 45014 CLEAR CALL 020193,000186: 37,2123 00662 ERADFLAG 020194,000187: 37,2124 26370 LAT-LONG 020195,000188: 37,2125 77605 DMP # MPAC = ALT, METERS B-29 020196,000189: 37,2126 36154 K.01 020197,000190: 37,2127 03621 STORE P21ALT # ALT/100 FOR N73 DSP
Page 459 |
020199,000192: 37,2130 77776 EXIT 020200,000193: 37,2131 32151 CAF V06N43 # DISPLAY LAT,LONG,ALT 020201,000194: 37,2132 04662 TC BANKCALL # LAT,LONG = REVS B0 BOTH EARTH/MOON 020202,000195: 37,2133 20720 CADR GOFLASH # ALT = METERS B-29 BOTH EARTH/MOON 020203,000196: 37,2134 04106 TC GOTOPOOH # TERM 020204,000197: 37,2135 04106 TC GOTOPOOH 020205,000198: 37,2136 06006 TC INTPRET # V32E RECYCLE 020206,000199: 37,2137 43345 DLOAD DAD 020207,000200: 37,2140 02316 P21TIME 020208,000201: 37,2141 36146 600SEC # 600 SECONDS OR 10 MIN 020209,000202: 37,2142 01046 STORE DSPTEM1 020210,000203: 37,2143 77634 RTB 020211,000204: 37,2144 76011 P21PROG1 020212,000205: 020213,000206: 37,2145 00003 25140 600SEC 2DEC 60000 B-28 # 10 MIN 020214,000207: 020215,000208: 37,2147 00001 P21ONENN OCT 00001 # NEEDED TO DETERMINE VEHICLE 020216,000209: 37,2150 00000 OCT 00000 # TO BE INTEGRATED 020217,000210: 37,2151 01453 V06N43 VN 00643 020218,000211: 37,2152 01442 V6N34 VN 00634 020219,000212: 37,2153 00243 32703 K.01 2DEC .01 020220,000213: End of include-file GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc. Parent file is MAIN.agc