Source Code
This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release
of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97.
A bug (which had been around since at least Apollo 10, Luminary 69) was
discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute
revision into Rev 1,
which is what actually flew rather than
the Rev 0 presented here. A hardcopy of Rev 0 is known to
exist — it belonged to AGC developer Allan Klumpp for many years — but
unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus
the code you see here had been reconstructed (we believe accurately) rather than
transcribed. The first step of the reconstruction of the Rev 0 source code was
the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection.
The process of reverting the active portion of the source code (i.e., other than
program comments) from Rev 1 to Rev 0 was very minor, consisting
only of moving the position of the STARTSB1 label in
FRESH START AND RESTART. Allan had previously given
us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums
identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read,
in part:GAP: ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051 A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here. |
061797,000002: ## Copyright: Public domain.
061798,000003: ## Filename: DAPIDLER_PROGRAM.agc
061799,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
061800,000005: ## otherwise known as Luminary Rev 99, the third release
061801,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
061802,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
061803,000008: ## placement of a single label. The corrections shown here have
061804,000009: ## been verified to have the same bank checksums as AGC developer
061805,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
061806,000011: ## to be accurate. This file is intended to be a faithful
061807,000012: ## recreation, except that the code format has been changed to
061808,000013: ## conform to the requirements of the yaYUL assembler rather than
061809,000014: ## the original YUL assembler.
061810,000015: ##
061811,000016: ## Assembler: yaYUL
061812,000017: ## Contact: Ron Burkey <info@sandroid.org>.
061813,000018: ## Website: www.ibiblio.org/apollo.
061814,000019: ## Pages: 1410-1420
061815,000020: ## Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
061816,000021: ## from the Luminary131/ file of the same
061817,000022: ## name, using Luminary099 page images.
061818,000023: ## 2016-12-18 RSB Proofed text comments with octopus/ProoferComments
061819,000024: ## and corrected the errors found.
061820,000025: ## 2017-01-28 RSB Comment-text fixes identified for Luminary 69.
061821,000026: ## 2017-08-01 MAS Created from LMY99 Rev 1.
061822,000027:
061823,000028: ## This source code has been transcribed or otherwise adapted from
061824,000029: ## digitized images of a hardcopy from the MIT Museum. The digitization
061825,000030: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
061826,000031: ## the Museum. Many thanks to both. The images (with suitable reduction
061827,000032: ## in storage size and consequent reduction in image quality as well) are
061828,000033: ## available online at www.ibiblio.org/apollo. If for some reason you
061829,000034: ## find that the images are illegible, contact me at info@sandroid.org
061830,000035: ## about getting access to the (much) higher-quality images which Paul
061831,000036: ## actually created.
061832,000037: ##
061833,000038: ## The code has been modified to match LMY99 Revision 0, otherwise
061834,000039: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
061835,000040: ## the listing from which it was transcribed. It has been verified to
061836,000041: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
061837,000042: ## of Luminary Revision 99 (for which we do not have scans).
061838,000043: ##
061839,000044: ## Notations on Allan Klumpp's listing read, in part:
061840,000045: ##
061841,000046: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
061842,000047:
Page 1410 |
061844,000049: # THE DAPIDLER PROGRAM IS STARTED BY FRESH START AND RESTART. THE DAPIDLER PROGRAM IS DONE 10 TIMES
061845,000050: # PER SECOND UNTIL THE ASTRONAUT DESIRES THE DAP TO WAKE UP, AND THE IMU AND CDUS ARE READY FOR USE BY THE DAP.
061846,000051: # THE NECESSARY INITIALIZATION OF THE DAP IS DONE BY THE DAPIDLER PROGRAM.
061847,000052:
061848,000053: 16,2000 BANK 16
061849,000054: 16,2000 SETLOC DAPS1
061850,000055: 16,2000 BANK
061851,000056:
061852,000057: 16,2000 E6,1537 EBANK= AOSQ
061853,000058:
061854,000059: 16,2000 COUNT* $$/DAPID
061855,000060:
061856,000061: 16,2000 00006 CHEKBITS EXTEND
061857,000062: 16,2001 00031 READ CHAN31 # IF BOTH BIT13 AND BIT14 ARE ONE, THEN
061858,000063: 16,2002 40000 COM # THE MODE SELECT SWITCH IS IN THE OFF
061859,000064: 16,2003 74355 MASK BIT13-14 # POSITION, AND SO THE DAP SHOULD BE OFF,
061860,000065: 16,2004 00006 EXTEND # WITH NO ATTITUDE ERROR DISPLAY.
061861,000066: 16,2005 12157 BZF MOREIDLE
061862,000067:
061863,000068: 16,2006 41303 CS IMODES33
061864,000069: 16,2007 74746 MASK BIT6
061865,000070: 16,2010 10000 CCS A
061866,000071: 16,2011 12206 TCF JUMPDSP
061867,000072: 16,2012 41273 CS RCSFLAGS # IMU NOT USABLE. SET UP INITIALIZATION
061868,000073: 16,2013 74751 MASK BIT3 # FLAG FOR ATT ERROR DISPLAY ROUTINE.
061869,000074: 16,2014 27273 ADS RCSFLAGS
061870,000075: 16,2015 12163 TCF SHUTDOWN
061871,000076:
061872,000077: 16,2016 34742 CHEKMORE CAF BIT10 # BIT 10 OF 30 IS PGNCS CONTROL OF S/C
061873,000078: 16,2017 00006 EXTEND
061874,000079: 16,2020 02030 RAND CHAN30 # BITS IN 30 ARE INVERTED
061875,000080: 16,2021 10000 CCS A
061876,000081: 16,2022 12157 TCF MOREIDLE
061877,000082:
061878,000083: 16,2023 00002 RETURN
061879,000084:
Page 1411 |
061881,000086: # DAPIDLER ENTRY.
061882,000087:
061883,000088: 16,2024 22016 DAPIDLER LXCH BANKRUPT # INTERRUPT LEAD INS (CONTINUED)
061884,000089: 16,2025 00006 EXTEND
061885,000090: 16,2026 22012 QXCH QRUPT
061886,000091:
061887,000092: 16,2027 31273 CA RCSFLAGS
061888,000093: 16,2030 74737 MASK BIT13
061889,000094: 16,2031 10000 CCS A # CHECK IF 1/ACCJOB HAS BEEN SET UP SINCE
061890,000095: 16,2032 12041 TCF CHECKUP # THE LAST FRESH START OR RESTART.
061891,000096: 16,2033 34737 CA BIT13
061892,000097: 16,2034 27273 ADS RCSFLAGS # BIT 13 IS 1.
061893,000098: 16,2035 37715 CAF PRIO27
061894,000099: 16,2036 05072 TC NOVAC # SET UP JOB TO DO A LITTLE INITIALIZATION
061895,000100: 16,2037 E6,1537 EBANK= AOSQ # AND EXECUTE 1/ACCS.
061896,000101: 16,2037 02447 40106 2CADR 1/ACCSET # (WILL BRANCH TO MOREIDLE ON ACCSOKAY)
061897,000102:
061898,000103: 16,2041 02000 CHECKUP TC CHEKBITS # CHECK TO SEE IF LM DAP IS TO GO ON AND
061899,000104: # DO ERROR DISPLAY.
061900,000105:
061901,000106: 16,2042 30111 CAE DAPBOOLS # IF 1/ACCS HAS NOT BEEN COMPLETED, IDLE.
061902,000107: 16,2043 74751 MASK ACCSOKAY # NOTE: ONLY FRESH START AND RESTART
061903,000108: 16,2044 00006 EXTEND # KNOCK THIS BIT DOWN.
061904,000109: 16,2045 12157 BZF MOREIDLE
061905,000110:
061906,000111: 16,2046 04674 STARTDAP TC IBNKCALL # ZERO ATTITUDE ERROR AND DESIRED RATES.
061907,000112: 16,2047 40153 FCADR ZATTEROR
061908,000113: 16,2050 34755 CAF ZERO # ********** INITIALIZE: **********
061909,000114: 16,2051 55524 TS TJP
061910,000115: 16,2052 55525 TS TJU
061911,000116: 16,2053 55526 TS TJV
061912,000117: 16,2054 55421 TS OMEGAP # RATES IN BODY (PILOT) COORDINATES.
061913,000118: 16,2055 55422 TS OMEGAQ
061914,000119: 16,2056 55423 TS OMEGAR
061915,000120: 16,2057 55430 TS TRAPEDP
061916,000121: 16,2060 55431 TS TRAPEDQ
061917,000122: 16,2061 55432 TS TRAPEDR
061918,000123: 16,2062 55537 TS AOSQ # OFFSET ACCELERATION ESTIMATES.
061919,000124: 16,2063 55540 TS AOSQ +1
061920,000125: 16,2064 55541 TS AOSR
061921,000126: 16,2065 55542 TS AOSR +1
061922,000127: 16,2066 55424 TS ALPHAQ # COPIES OF OFFSET ESTIMATES FOR DOWNLIST.
061923,000128: 16,2067 55425 TS ALPHAR
061924,000129: 16,2070 55501 TS NEGUQ
061925,000130: 16,2071 55503 TS NEGUR
061926,000131: 16,2072 55545 TS AOSQTERM # QRAXIS RATE DERIVATION TERMS AND KALMAN
061927,000132: 16,2073 55546 TS AOSRTERM # FILTER INITIALIZATION TERMS.
061928,000133: 16,2074 55510 TS QACCDOT # DESCENT ACCELERATION DERIVATIVE EST.
061929,000134: 16,2075 55512 TS RACCDOT
Page 1412 |
061931,000136: 16,2076 55502 TS ALLOWGTS # AOSTASK FLAG FOR QRAXIS RCS CONTROL USE.
061932,000137: 16,2077 55631 TS COTROLER # DO TRYGTS ON FIRST PASS (WILL GO TO RCS)
061933,000138: 16,2100 55633 TS INGTS # RECOGNIZE FIRST GTS PASS AS SUCH.
061934,000139: 16,2101 55632 TS QGIMTIMR # STOP GIMBAL DRIVES. (PROBABLY WOULD BE
061935,000140: 16,2102 55634 TS RGIMTIMR # GOOD ENOUGH JUST TO INACTIVATE TIMERS)
061936,000141: 16,2103 55460 TS OLDPMIN # MINIMUM IMPULSE MODE ERASABLES
061937,000142: 16,2104 55461 TS OLDQRMIN
061938,000143: 16,2105 55767 TS PJETCTR # INITIALIZE DOCKED JET INHIBITION
061939,000144: 16,2106 55770 TS UJETCTR # COUNTERS
061940,000145: 16,2107 55771 TS VJETCTR
061941,000146: 16,2110 4747 CALLGMBL EQUALS BIT5 # RCSFLAGS INITIALIZATION.
061942,000147: 16,2110 42202 CS MANFLAG
061943,000148: 16,2111 71273 MASK RCSFLAGS # NEGUQ(R) HAVE BEEN GENERATED.
061944,000149: 16,2112 55273 TS RCSFLAGS
061945,000150:
061946,000151: # SET UP "OLD" MEASURED CDU ANGLES:
061947,000152:
061948,000153: 16,2113 00006 EXTEND
061949,000154: 16,2114 30033 DCA CDUX # OLDXFORP AND OLDYFORP
061950,000155: 16,2115 53441 DXCH OLDXFORP
061951,000156: 16,2116 30034 CA CDUZ
061952,000157: 16,2117 55442 TS OLDZFORQ
061953,000158: 16,2120 41273 CS RCSFLAGS
061954,000159: 16,2121 74740 MASK BIT12
061955,000160: 16,2122 27273 ADS RCSFLAGS # BIT 12 SET TO 1.
061956,000161: 16,2123 34751 CA FOUR
061957,000162: 16,2124 55535 TS SKIPU
061958,000163: 16,2125 55536 TS SKIPV
061959,000164: 16,2126 34733 CA POSMAX
061960,000165: 16,2127 54031 TS TIME6
061961,000166: 16,2130 55466 TS T6NEXT
061962,000167: 16,2131 55470 TS T6FURTHA
061963,000168: 16,2132 34755 CA ZERO
061964,000169: 16,2133 55467 TS T6NEXT +1
061965,000170: 16,2134 55471 TS T6FURTHA +1
061966,000171: 16,2135 55465 TS NXT6ADR
061967,000172: 16,2136 55472 TS NEXTP
061968,000173: 16,2137 55473 TS NEXTU
061969,000174: 16,2140 55474 TS NEXTV
061970,000175: 16,2141 44363 CS TEN
061971,000176: 16,2142 55757 TS DAPZRUPT # JASK NOT IN PROGRESS, INITIALIZE NEG.
061972,000177: 16,2143 34752 CA TWO
061973,000178: 16,2144 55433 TS NPTRAPS
061974,000179: 16,2145 55434 TS NQTRAPS
061975,000180: 16,2146 55435 TS NRTRAPS
061976,000181: 16,2147 00006 EXTEND
061977,000182: 16,2150 32205 DCA PAXADIDL
061978,000183: 16,2151 53275 DXCH T5ADR
061979,000184: 16,2152 37727 SETTIME5 CAF MS100
061980,000185: 16,2153 54030 TS TIME5
Page 1413 |
061982,000187: 16,2154 15270 TCF RESUME
061983,000188: 16,2155 E6,1537 EBANK= AOSQ
061984,000189: 16,2155 02024 34106 IDLERADR 2CADR DAPIDLER
061985,000190:
061986,000191: 16,2157 04674 MOREIDLE TC IBNKCALL # CALCULATE Q,R-AXES ATTITUDE ERRORS.
061987,000192: 16,2160 36626 CADR QERRCALC
061988,000193:
061989,000194: 16,2161 04674 TC IBNKCALL
061990,000195: 16,2162 35446 CADR CALCPERR # CALCULATE P AXIS ATTITUDE ERRORS.
061991,000196:
061992,000197: 16,2163 00006 SHUTDOWN EXTEND
061993,000198: 16,2164 32156 DCA IDLERADR
061994,000199: 16,2165 53275 DXCH T5ADR
061995,000200:
061996,000201: 16,2166 34755 CAF ZERO # KILL ANY POSSIBLE JET REQUESTS
061997,000202: 16,2167 55472 TS NEXTP
061998,000203: 16,2170 55473 TS NEXTU
061999,000204: 16,2171 55474 TS NEXTV
062000,000205: 16,2172 00006 EXTEND # COMMAND JETS OFF.
062001,000206: 16,2173 01005 WRITE CHAN5
062002,000207: 16,2174 00006 EXTEND
062003,000208: 16,2175 01006 WRITE CHAN6
062004,000209: 16,2176 42203 CS BGIM23 # TURN TRIM GIMBAL OFF
062005,000210: 16,2177 00006 EXTEND
062006,000211: 16,2200 03012 WAND CHAN12
062007,000212: 16,2201 12152 TCF SETTIME5 # RETURN IN 100 MSEC.
062008,000213:
062009,000214: 16,2202 03021 MANFLAG OCT 03021
062010,000215: 16,2203 07400 BGIM23 OCTAL 07400
062011,000216: 16,2204 E6,1421 EBANK= OMEGAP
062012,000217: 16,2204 02213 34106 PAXADIDL 2CADR PAXIS
062013,000218:
062014,000219: 16,2206 7727 MS100 = OCT37766
062015,000220: 16,2206 0061 COSMG = ITEMP1
062016,000221: 16,2206 00006 JUMPDSP EXTEND # TRANSFER TO BANK 20
062017,000222: 16,2207 32212 DCA DSPCADR # FOR ATTITUDE ERROR DISPLAYS
062018,000223: 16,2210 52006 DTCB
062019,000224:
062020,000225: 16,2211 E6,1761 EBANK= AK
062021,000226: 16,2211 02226 40106 DSPCADR 2CADR ALTDSPLY
062022,000227:
Page 1414 |
062024,000229: 20,2226 BANK 20
062025,000230: 20,2000 SETLOC DAPS3
062026,000231: 20,2000 BANK
062027,000232: 20,2226 COUNT* $$/NEEDL
062028,000233:
062029,000234: # PROGRAM: ALTDSPLY
062030,000235: # MOD 0. 6 DEC 1967
062031,000236: # AUTHOR: CRAIG WORK, DON KEENE, MIT IL
062032,000237: # MOD 3 BY DON KEENE AUG 1, 1968 MOVED PROGRAM TO BANK 20
062033,000238:
062034,000239: # PROGRAM DESCRIPTION:
062035,000240: # ALTDSPLY REVERSES THE DSPLYALT BIT OF RCSFLAGS EACH TIME IT IS CALLED, WHICH IS PRESUMABLY EVERY 100 MS.
062036,000241: # IF THE REVERSED BIT IS ONE, NEEDLER IS CALLED TO DISPLAY ATTITUDE ERRORS. IF THE BIT IS ZERO, THE ATTITUDE ERR-
062037,000242: # ORS ARE CALCULATED AS 1) DAP FOLLOWING ERRORS, IF NEEDLFLG = 0, AND 2) TOTAL ATTITUDE ERRORS FOR NEEDLFLG = 1.
062038,000243:
062039,000244:
062040,000245: # WARNING: ALTDSPLY MAY ONLY BE CALLED WITH INTERRUPT INHIBITED.
062041,000246:
062042,000247: # WARNING: EBANK MUST BE SET TO 6 WHEN USING THIS ROUTINE.
062043,000248:
062044,000249: # INPUT: RCSFLAGS AND 1) IF NEEDLFLG = 0, INPUT PERROR, QERROR, RERROR.
062045,000250: # 2) IF NEEDLFLG = 1, INPUT CPHI,CTHETA,CPSI,CDUX,CDUY,CDUZ,M11,M21,M32,M22,M32. (GPMATRIX)
062046,000251:
062047,000252:
062048,000253: # OUTPUTS: RCSFLAGS WITH DSPLYALT REVERSED, AK, AK1, AK2, + NEEDLER OUTPUTS.
062049,000254:
062050,000255: # ENTRY: TCF ALTDSPLY
062051,000256:
062052,000257: # EXIT: TCF CHEKMORE
062053,000258:
062054,000259: # ALARM OR ABORT EXITS: NONE
062055,000260:
062056,000261: # SUBPROGRAMS CALLED: NEEDLER, OVERSUB2
062057,000262:
062058,000263: # DEBRIS: A, L, AND NEEDLER DEBRIS.
062059,000264:
062060,000265: 20,2226 31273 ALTDSPLY CA RCSFLAGS # INVERT THE DISPLAY ALTERNATION BIT.
062061,000266: 20,2227 54001 TS L
062062,000267: 20,2230 34750 CA DSPLYALT
062063,000268: 20,2231 00006 EXTEND
062064,000269: 20,2232 06001 RXOR LCHAN
062065,000270: 20,2233 55273 TS RCSFLAGS
062066,000271:
062067,000272: 20,2234 74750 MASK DSPLYALT
062068,000273: 20,2235 10000 CCS A # IS ALTERNATION FLAG ZERO?
062069,000274: 20,2236 12322 TCF NEEDLER
062070,000275:
062071,000276: 20,2237 30074 CAE FLAGWRD0 # NEEDLFLG WILL INDICATE TOTAL OR DAP AT-
Page 1415 |
062073,000278: 20,2240 74750 MASK NEEDLBIT # TITUDE ERROR DISPLAY REQUEST.
062074,000279: 20,2241 10000 CCS A
062075,000280: 20,2242 12252 TCF DSPLYTOT # TOTAL ERROR IS NEEDED IN AK, AK +1, AK +2
062076,000281:
062077,000282: 20,2243 41450 CS QERROR # YES. DISPLAY ATT ERRORS ON THE ,-BALL.
062078,000283: 20,2244 55762 TS AK +1 # ERROR COMPLEMENTS ARE INPUT TO NEEDLER.
062079,000284: 20,2245 41452 CS RERROR
062080,000285: 20,2246 55763 TS AK +2
062081,000286: 20,2247 41464 CS PERROR
062082,000287: 20,2250 57761 XCH AK
062083,000288:
062084,000289: 20,2251 12442 TCF RETNMORE # DISPLAY THESE THE NEXT TIME THROUGH
062085,000290:
062086,000291: # CALCULATE GIMBAL ANGLE TOTAL ERRORS, RESOLVE INTO PILOT AXES, STORE TOTAL ERRORS FOR NEEDLER. Q-AXIS FIRST.
062087,000292:
062088,000293: 20,2252 00006 DSPLYTOT EXTEND
062089,000294: 20,2253 22061 QXCH ITEMP1 # SAVE Q FOR CHEKBITS RETURN.
062090,000295:
062091,000296: 20,2254 30322 CA CTHETA # DESIRED ATTITUDE, Y-AXIS, 2'S COMP.
062092,000297: 20,2255 00006 EXTEND # SUBTRACT CURRENT ATTITUDE.
062093,000298: 20,2256 20033 MSU CDUY # DIFFERENCE SCALED AT PI, 1'S COMP.
062094,000299: 20,2257 55761 TS AK # SAVE FOR R-ERROR CALCULATION.
062095,000300: 20,2260 00006 EXTEND
062096,000301: 20,2261 71415 MP M21 # (CHTETA-CDUY)*M21 SCALED AT PI RADIANS.
062097,000302: 20,2262 57762 XCH AK +1 # STORE FIRST TERM OF Q ERROR.
062098,000303: 20,2263 30323 CA CPSI # DESIRED ATTITUDE, Z-AXIS, 2'S COMP.
062099,000304: 20,2264 00006 EXTEND # SUBTRACT CURRENT ATTITUDE.
062100,000305: 20,2265 20034 MSU CDUZ # DIFFERENCE SCALED AT PI, 1'S COMP.
062101,000306: 20,2266 55763 TS AK +2 # SAVE Z-AXIS TERM FOR R ERROR CALCULATION
062102,000307: 20,2267 00006 EXTEND
062103,000308: 20,2270 71417 MP M22 # (CPSI-CDUZ)*M22, SCALED AT PI RADIANS.
062104,000309: 20,2271 61762 AD AK +1 # Q ERROR COMPLETE , AT PI RAD.
062105,000310: 20,2272 02435 TC OVERSUB2 # PIN NEEDLES IN CASE OF OVERFLOW.
062106,000311: 20,2273 55762 TS AK +1
062107,000312:
062108,000313: # R ERROR CALCULATION NEXT.
062109,000314:
062110,000315: 20,2274 31761 CA AK # Y-AXIS DIFFERENCE STORED BY Q-AXIS CALC.
062111,000316: 20,2275 00006 EXTEND
062112,000317: 20,2276 71416 MP M31 # (CTHETA-CDUY)*M31, SCALED AT PI RADIANS.
062113,000318: 20,2277 57763 XCH AK +2 # FIRST TERM OF R ERROR.
062114,000319: # Z-AXIS DIFFERENCE, STORED BY A CALC. IS
062115,000320: 20,2300 00006 EXTEND # RECOVERED BY THE EXCHANGE.
062116,000321: 20,2301 71420 MP M32 # (CPSI-CDUZ)*M32, SCALED AT PI RADIANS.
062117,000322: 20,2302 61763 AD AK +2 # R ERROR COMPLETE , AT PI RAD.
062118,000323: 20,2303 02435 TC OVERSUB2 # PIN NEEDLES IN CASE OF OVERFLOW.
062119,000324: 20,2304 55763 TS AK +2
062120,000325:
062121,000326: # NOW CALCULATE P ERROR. (NOTE THAT M13 = 1, SCALED AT 1, SO THE MULTIPLICATION IS BY-PASSED.)
Page 1416 |
062123,000328: 20,2305 31761 CA AK # Y-AXIS DIFFERENCE STORED BY Q AXIS CALC.
062124,000329: 20,2306 00006 EXTEND
062125,000330: 20,2307 71414 MP M11 # (CTHETA-CDUY)*M11 SCALED AT PI RADIANS.
062126,000331: 20,2310 57761 XCH AK # FIRST TERM OF P ERROR IN AK, AT PI RAD.
062127,000332: 20,2311 30321 CAE CPHI # DESIRED ATTITUDE, X-AXIS, 2'S COMP.
062128,000333: 20,2312 00006 EXTEND # SUBTRACT CURRENT X ATTITUDE.
062129,000334: 20,2313 20032 MSU CDUX # X-AXIS DIFFERENCE, 1'S COMP, AT PI RAD.
062130,000335:
062131,000336: # M13 = 1, SO BYPASS THE MULTIPLICATION.
062132,000337: # EXTEND
062133,000338: # MP M13 (CPHI-CDUX)*M13 SCALED AT PI RADIANS.
062134,000339:
062135,000340: 20,2314 61761 AD AK # P ERROR COMPLETE , SCALED AT PI RAD
062136,000341: 20,2315 02435 TC OVERSUB2 # PIN NEEDLES IN CASE OF OVERFLOW.
062137,000342: 20,2316 55761 TS AK
062138,000343:
062139,000344: 20,2317 00006 EXTEND
062140,000345: 20,2320 22061 QXCH ITEMP1 # RESTORE Q FOR CHEKBITS RETURN.
062141,000346:
062142,000347: 20,2321 12442 TCF RETNMORE # DISPLAY THESE THE NEXT TIME THROUGH
062143,000348:
Page 1417 |
062145,000350: # FDAI ATTITUDE ERROR DISPLAY SUBROUTINE
062146,000351:
062147,000352: # PROGRAM DESCRIPTION: D. KEENE 5/24/67
062148,000353: # MOD 1 BY CRAIG WORK, 12 DEC 67
062149,000354: # MOD 2 BY CRAIG WORK, 6 APRIL 68 CONVERTS ATTITUDE ERROR DISPLAY SCALING FROM 16 7/8 DEG. TO 42 3/16 DEGREES.
062150,000355:
062151,000356: # THIS SUBROUTINE IS USED TO DISPLAY ATTITUDE ERRORS ON THE FDAI VIA THE DIGITAL TO ANALOG CONVERTERS (DACS)
062152,000357: # IN THE CDUS. CARE IS TAKEN TO METER OUT THE APPROPRIATE NUMBER OF PULSES TO THE IMU ERROR COUNTERS AND PREVENT
062153,000358: # OVERFLOW, TO CONTROL THE RELAY SEQUENCING, AND TO AVOID INTERFERENCE WITH THE COARSE ALIGN LOOP WHICH ALSO USES
062154,000359: # THE DACS.
062155,000360:
062156,000361: # CALLING SEQUENCE:
062157,000362: # DURING THE INITIALIZATION SECTION OF THE USER'S PROGRAM, BIT3 OF RCSFLAGS SHOULD BE SET TO INITIATE THE
062158,000363: # TURN-ON SEQUENCE WITHIN THE NEEDLES PROGRAM:
062159,000364: # CS RCSFLAGS IN EBANK6
062160,000365: # MASK BIT3
062161,000366: # ADS RCSFLAGS
062162,000367: # THEREAFTER, THE ATTITUDE ERRORS GENERATED BY THE USER SHOULD BE TRANSFERED TO THE FOLLOWING LOCATIONS IN EBANK6:
062163,000368: # AK SCALED 180 DEGREES NOTE: THESE LOCATIONS ARE SUBJECT
062164,000369: # AK1 SCALED 180 DEGREES TO CHANGE
062165,000370: # AK2 SCALED 180 DEGREES
062166,000371: # FULL SCALED DEFLECTION OF THE NEEDLES CORRESPONDS TO 5 1/16 DEGREES, WHILE 384 BITS IN THE IMU ERROR COUNTER
062167,000372: # CORRESPONDS TO 42 3/16 DEGREES. (DAC MAXIMUM CAPACITY IS 384 BITS.) 46 BITS EFFECTIVELY PIN THE NEEDLES.
062168,000373:
062169,000374: # A CALL TO NEEDLER WILL THEN UPDATE THE DISPLAY:
062170,000375: # INHINT
062171,000376: # TC IBNKCALL NOTE: EBANK SHOULD BE SET TO E6
062172,000377: # CADR NEEDLER
062173,000378: # RELINT
062174,000379: # THIS PROCESS SHOULD BE REPEATED EACH TIME THE ERRORS ARE UPDATED. AT LEAST 3 PASSES THRU THE PROGRAM ARE
062175,000380: # REQUIRED BEFORE ANYTHING IS ACTUALLY DISPLAYED ON THE ERROR METERS.
062176,000381: # NOTE: EACH CALL TO NEEDLER MUST BE SEPARATED BY AT LEAST 50 MS TO ASSURE PROPER RELAY SEQUENCING.
062177,000382:
062178,000383: # ERASABLE USED:
062179,000384: # AK CDUXCMD
062180,000385: # AK1 CDUYCMD
062181,000386: # AK2 CDUZCMD
062182,000387: # EDRIVEX A,L,Q
062183,000388: # EDRIVEY T5TEMP
062184,000389: # EDRIVEZ DINDX
Page 1418 |
062186,000391:
062187,000392: # SWITCHES: RCSFLAGS BITS 3,2
062188,000393:
062189,000394: # I/O CHANNELS: CHAN12 BIT 4 (COARSE ALIGN - READ ONLY)
062190,000395: # CHAN12 BIT 6 (IMU ERROR COUNTER ENABLE)
062191,000396: # CHAN14 BIT 13,14,15 (DAC ACTIVITY)
062192,000397:
062193,000398: # SIGN CONVENTION< AK = THETAC - THETA
062194,000399: # WHERE THETAC = COMMAND ANGLE
062195,000400: # THETA = PRESENT ANGLE
062196,000401:
062197,000402: 20,2322 31273 NEEDLER CA RCSFLAGS
062198,000403: 20,2323 76242 MASK SIX
062199,000404: 20,2324 00006 EXTEND
062200,000405: 20,2325 12362 BZF NEEDLES3
062201,000406: 20,2326 74751 MASK BIT3
062202,000407: 20,2327 00006 EXTEND
062203,000408: 20,2330 12353 BZF NEEDLER2 # BIT3 = 0, BIT2 = 1
062204,000409:
062205,000410: 20,2331 44746 CS BIT6 # FIRST PASS BIT3 = 1
062206,000411: 20,2332 00006 EXTEND # DISABLE IMU ERROR COUNTER TO ZERO DACS
062207,000412: 20,2333 03012 WAND CHAN12 # MUST WAIT AT LEAST 60 MS BEFORE
062208,000413: 20,2334 44755 NEEDLE11 CS ZERO # ENABLING COUNTERS.
062209,000414: 20,2335 55761 TS AK # ZERO THE INPUTS ON FIRST PASS
062210,000415: 20,2336 55762 TS AK1
062211,000416: 20,2337 55763 TS AK2
062212,000417: 20,2340 55764 TS EDRIVEX # ZERO THE DISPLAY REGISTERS
062213,000418: 20,2341 55765 TS EDRIVEY
062214,000419: 20,2342 55766 TS EDRIVEZ
062215,000420: 20,2343 54050 TS CDUXCMD # ZERO THE OUT COUNTERS
062216,000421: 20,2344 54051 TS CDUYCMD
062217,000422: 20,2345 54052 TS CDUZCMD
062218,000423: 20,2346 46242 CS SIX # RESET RCSFLAGS FOR PASS2
062219,000424: 20,2347 71273 MASK RCSFLAGS
062220,000425: 20,2350 64752 AD BIT2
062221,000426: 20,2351 55273 TS RCSFLAGS
062222,000427: 20,2352 12442 TCF RETNMORE
062223,000428:
062224,000429: 20,2353 34746 NEEDLER2 CAF BIT6 # ENABLE IMU ERROR COUNTERS
062225,000430: 20,2354 00006 EXTEND
062226,000431: 20,2355 05012 WOR CHAN12
062227,000432: 20,2356 46242 CS SIX # RESET RCSFLAGS TO DISPLAY ATTITUDE
062228,000433: 20,2357 71273 MASK RCSFLAGS # ERRORS WAIT AT LEAST 4 MS FOR
062229,000434: 20,2360 55273 TS RCSFLAGS # RELAY CLOSURE
062230,000435: 20,2361 12442 TCF RETNMORE
062231,000436:
062232,000437: 20,2362 34746 NEEDLES3 CAF BIT6 # CHECK TO SEE IF IMU ERROR COUNTER
062233,000438: 20,2363 00006 EXTEND # IS ENABLED
062234,000439: 20,2364 02012 RAND CHAN12
Page 1419 |
062236,000441: 20,2365 10000 CCS A # IF NOT, RE-INITIALIZE NEEDLER.
062237,000442: 20,2366 12373 TCF NEEDLES
062238,000443:
062239,000444: 20,2367 41273 CS RCSFLAGS # SET UP INITIALIZATION FLAG IN RCSFLAGS.
062240,000445: 20,2370 74751 MASK BIT3
062241,000446: 20,2371 27273 ADS RCSFLAGS
062242,000447: 20,2372 12442 TCF RETNMORE
062243,000448:
062244,000449: 20,2373 34752 NEEDLES CAF TWO
062245,000450: 20,2374 54063 DACLOOP TS DINDX
062246,000451: 20,2375 42434 CS ONETENTH # RESCALE INPUTS TO + OR - 1800 DEGREES.
062247,000452: 20,2376 00006 EXTEND
062248,000453: 20,2377 50063 INDEX DINDX
062249,000454: 20,2400 71761 MP AK
062250,000455: 20,2401 54001 TS L
062251,000456: 20,2402 10000 CCS A
062252,000457: 20,2403 32432 CA DACLIMIT
062253,000458: 20,2404 12406 TCF +2
062254,000459: 20,2405 42432 CS DACLIMIT
062255,000460: 20,2406 60001 AD L
062256,000461: 20,2407 54061 TS T5TEMP # OVFLO CHK
062257,000462: 20,2410 12414 TCF +4
062258,000463: 20,2411 50000 INDEX A # ON OVERFLOW LIMIT OUTPUT TO +-384
062259,000464: 20,2412 32432 CAF DACLIMIT
062260,000465: 20,2413 54001 TS L
062261,000466: 20,2414 50063 INDEX DINDX
062262,000467: 20,2415 41764 CS EDRIVEX # CURRENT VALUE OF DAC
062263,000468: 20,2416 60001 AD L
062264,000469: 20,2417 50063 INDEX DINDX
062265,000470: 20,2420 26050 ADS CDUXCMD
062266,000471: 20,2421 50063 INDEX DINDX
062267,000472: 20,2422 23764 LXCH EDRIVEX
062268,000473: 20,2423 10063 CCS DINDX
062269,000474: 20,2424 12374 TCF DACLOOP
062270,000475: 20,2425 37740 CAF 13,14,15
062271,000476: 20,2426 00006 EXTEND
062272,000477: 20,2427 05014 WOR CHAN14 # SET DAC ACTIVITY BITS
062273,000478: 20,2430 12442 TCF RETNMORE
062274,000479:
062275,000480: 20,2431 77177 DEC -384 B-14
062276,000481: 20,2432 37200 DACLIMIT DEC 16000 B-14
062277,000482: 20,2433 00600 DEC 384 B-14
062278,000483:
062279,000484: 20,2434 03146 ONETENTH OCT 03146 # DECIMAL +0.1, SCALED AT 1.
062280,000485: 20,2435 4750 DSPLYALT EQUALS BIT4 # 100 MS ALTERNATION BIT IN RCSFLAGS
062281,000486:
062282,000487: 20,2435 54007 OVERSUB2 TS 7 # RETURNS A UNCHANGED OR LIMITED TO
062283,000488: 20,2436 00002 TC Q # POSMAX OR NEGMAX IF A HAS OVERFLOW
062284,000489: 20,2437 50000 INDEX A
Page 1420 |
062286,000491: 20,2440 44734 CS LIMITS # DUPLICATE CODING IN BANK 16
062287,000492: 20,2441 00002 TC Q
062288,000493:
062289,000494: 20,2442 00006 RETNMORE EXTEND # RETURN TO CHEKMORE
062290,000495: 20,2443 32446 DCA MORECADR
062291,000496: 20,2444 52006 DTCB
062292,000497:
062293,000498: 20,2445 E6,1537 EBANK= AOSQ
062294,000499: 20,2445 02016 34106 MORECADR 2CADR CHEKMORE
062295,000500:
End of include-file DAPIDLER_PROGRAM.agc. Parent file is MAIN.agc