Source Code

These source-code files are part of a reconstructed copy of Skylark 048, the Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.

They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to.

The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction.

Since only binary dumps (rather than listings) of Skylark are available as source material, all comments and labels are approximate. They have been taken from the Programmed Guidance Equations or other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

040003,000002:                                                                                                  ## Copyright:   Public domain.
040004,000003:                                                                                                  ## Filename:    RCS-CSM_DIGITAL_AUTOPILOT.agc
040005,000004:                                                                                                  ## Purpose:     A section of Skylark revision 048.
040006,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer (AGC)
040007,000006:                                                                                                  ##              for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
040008,000007:                                                                                                  ##              this software are available; instead, this file was created via
040009,000008:                                                                                                  ##              disassembly of dumps of the core rope modules actually flown on
040010,000009:                                                                                                  ##              Skylab-2. Access to these modules was provided by the New Mexico
040011,000010:                                                                                                  ##              Museum of Space History.
040012,000011:                                                                                                  ## Assembler:   yaYUL
040013,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
040014,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
040015,000014:                                                                                                  ## Mod history: 2023-09-04 MAS  Created from Artemis 072.
040016,000015:                                                                                                  ##              2024-03-05 MAS  Updated for Skylark 48.
040017,000016: 
040018,000017: 
040019,000018:                                                                                                  #  T5 INTERRUPT PROGRAM FOR THE RCS-CSM AUTOPILOT
040020,000019:                                                                                                  #        START OF T5 INTERRUPT PROGRAM
040021,000020: 
040022,000021: 21,2000                                           SETLOC   DAPS3                                 
040023,000022: 21,2000                                           BANK                                           
040024,000023: 
040025,000024: 21,2043                                           COUNT*   $$/DAPRC                              
040026,000025: 21,2043  E6,1537                                  EBANK=   KMPAC                                 
040027,000026: 21,2043           22016        REDORCS            LXCH     BANKRUPT                              #  RESTART OF AUTOPILOT COMES HERE
040028,000027: 21,2044           31513                           CA       T5PHASE                               #  ON A T5 RUPT.
040029,000028: 21,2045           00006                           EXTEND                                         
040030,000029: 21,2046           62050                           BZMF     +2                                    #  IF T5PHASE +0, -0, OR -, RESET TO -
040031,000030: 21,2047           12052                           TCF      +3                                    #  IF T5PHASE +, LEAVE IT +.  DO A FRESHDAP
040032,000031: 21,2050           45001                           CS       ONE                                   
040033,000032: 21,2051           55513                           TS       T5PHASE                               
040034,000033: 21,2052           00006                           EXTEND                                         
040035,000034: 21,2053           32057                           DCA      RCSLOC                                
040036,000035: 21,2054           52113                           DXCH     T5LOC                                 #  HOOK UP T5RUPT TO AUTOPILOT
040037,000036: 21,2055           12061                           TCF      RCSATT     +1                         
040038,000037: 21,2056  E6,1537                                  EBANK=   KMPAC                                 
040039,000038: 21,2056           02060 42066  RCSLOC             2CADR    RCSATT                                
040040,000039: 
040041,000040: 
040042,000041: 21,2060           22016        RCSATT             LXCH     BANKRUPT                              #  SAVE BB
040043,000042: 21,2061           00006                 +1        EXTEND                                         #  SAVE Q
040044,000043: 21,2062           22012                           QXCH     QRUPT                                 
040045,000044: 21,2063           34763                           CAF      BIT15                                 #  BIT15 CHAN31 = 0 IF IMU POWER IS ON AND
040046,000045: 21,2064           05627                           TC       C31BTCHK                              #  S/C CONT SW IS IN CMC (I.E. IF G/C DAP
040047,000046: 21,2065           12110                           TCF      SETT5                                 #  IS FULLY ENABLED).     IF SO8
040048,000047:                                                                                                  #  GO TO SETT5
040049,000048: 
040050,000049: 21,2066           41530                           CS       RCSFLAGS                              #  IF G/C AUTOPILOT IS NOT FULLY ENABLED,
040051,000050: 21,2067           74764                           MASK     BIT14                                 
040052,000051: 21,2070           27530                           ADS      RCSFLAGS                              #  SET NORATE FLAG,
040053,000052: 21,2071           34761                           CAF      POSMAX                                
040054,000053: 21,2072           55330                           TS       HOLDFLAG                              #  SET HOLDFLAG +,
040055,000054: 21,2073           35003                           CAF      ZERO                                  #  ZERO ERRORX, ERRORY, AND ERRORZ,
040056,000055: 21,2074           55620                           TS       ERRORX                                
040057,000056: 21,2075           55621                           TS       ERRORY                                
040058,000057: 21,2076           55622                           TS       ERRORZ                                
040059,000058: 21,2077           34764                           CAF      BIT14                                 
040060,000059: 21,2100           05627                           TC       C31BTCHK                              #  AND CHECK FREE FUNCTION (BIT14 CHAN31)
040061,000060: 21,2101           12110                           TCF      SETT5                                 
040062,000061: 21,2102           55513                           TS       T5PHASE                               #  IF NOT IN FREE MODE,
040063,000062: 21,2103           37661                           CAF      OCT37766                              #  SCHEDULE REINITIALIZATION (FRESHDAP)
040064,000063: 21,2104           54030                           TS       TIME5                                 #  IN 100 MS VIA T5RUPT
040065,000064: 
040066,000065: 21,2105           02515                           TCR      ZEROJET                               #  ZERO JET CHANNELS IN 14 MS VIA ZEROJET
040067,000066: 21,2106           12275                           TCF      KMATRIX                               
040068,000067: 21,2107           37770        DELTATT            OCT      37770                                 #  80MS (TIME5)
040069,000068: 21,2110     7663               DELTATT2           =        OCT37776                              #  20 MS (TIME5)
040070,000069: 
040071,000070:                                                                                                  #  CHECK PHASE OF T5 PROGRAM
040072,000071: 
040073,000072:                                                                                                  #      BECAUSE OF THE LENGTH OF THE T5 PROGRAM, IT HAS BEEN DIVIDED INTO 
040074,000073:                                                                                                  #  THREE PARTS, T5PHASE1, T5PHASE2, AND THE JET SELECTION LOGIC,
040075,000074:                                                                                                  #  TO ALLOW FOR THE EXECUTION OF OTHER
040076,000075:                                                                                                  #  INTERRUPTS.  T5PHASE IS ALSO USED IN THE INITIALIZATION OF THE AUTOPILOT
040077,000076:                                                                                                  #  VARIABLES AT TURN ON.
040078,000077:                                                                                                  #  THE CODING OF T5PHASE IS...
040079,000078: 
040080,000079:                                                                                                  #             + = INITIALIZE T5 RCS-CSM AUTOPILOT
040081,000080:                                                                                                  #  T5PHASE = +0 = PHASE2 OF THE T5 PROGRAM
040082,000081:                                                                                                  #             - = RESTART DAP
040083,000082:                                                                                                  #            -0 = PHASE1 OF THE T5 PROGRAM
040084,000083: 
040085,000084: 21,2110           11513        SETT5              CCS      T5PHASE                               
040086,000085: 21,2111           12353                           TCF      FRESHDAP                              #  TURN ON AUTOPILOT
040087,000086: 21,2112           12553                           TCF      T5PHASE2                              #  BRANCH TO PHASE2 OF PROGRAM
040088,000087: 21,2113           12355                           TCF      REDAP                                 #  RESTART AUTOPILOT
040089,000088: 
040090,000089: 21,2114           55513                           TS       T5PHASE                               #  PHASE 1  RESET  FOR PHASE 2
040091,000090: 21,2115           30030                           CA       TIME5                                 
040092,000091: 21,2116           55665                           TS       T5TIME                                #  USED IN COMPENSATING FOR DELAYS IN T5
040093,000092: 21,2117           37663                           CAF      DELTATT2                              #  RESET FOR T5RUPT IN 20MS FOR PHASE2
040094,000093: 21,2120           54030                           TS       TIME5                                 #  OF PROGRAM
040095,000094: 
040096,000095: 
040097,000096:                                                                                                  #  IMU STATUS CHECK
040098,000097: 
040099,000098: 21,2121           41324                           CS       IMODES33                              #  CHECK IMU STATUS
040100,000099: 21,2122           74774                           MASK     NOIMUDAP                              #  BIT6 = 0 IMU OK
040101,000100: 21,2123           10000                           CCS      A                                     #  BIT6 = 1 NO IMU
040102,000101: 21,2124           12135                           TCF      RATEFILT                              
040103,000102: 21,2125           41530        FREECHK            CS       RCSFLAGS                              #  BIT14 INDICATES THAT RATES HAVE NOT BEEN
040104,000103: 21,2126           74764                           MASK     BIT14                                 #  INITIALIZED
040105,000104: 21,2127           27530                           ADS      RCSFLAGS                              
040106,000105: 21,2130           34764                           CAF      BIT14                                 #  NO ATTITUDE REFERENCE
040107,000106: 21,2131           55330                           TS       HOLDFLAG                              #  STOP ANY AUTOMATIC STEERING AND PREPARE
040108,000107:                                                                                                  #  TO PICK UP CDU ANGLES UPON RESUMPTION OF
040109,000108:                                                                                                  #  ATTITUDE HOLD
040110,000109: 21,2132           05627                           TC       C31BTCHK                              #  CHECK FOR FREE MODE
040111,000110: 21,2133           12345                           TCF      KRESUME1                              #  IN FREE, PROVIDE FREE CONTROL ONLY
040112,000111: 21,2134           12346                           TCF      REINIT                                #  .....TILT...............................
040113,000112: 21,2135     5012               BITS4,5            =        BITS4&5                               
040114,000113: 
040115,000114: 21,2135           31530        RATEFILT           CA       RCSFLAGS                              #  SEE IF RATEFILTER HAS BEEN INITIALIZED
040116,000115: 21,2136           74764                           MASK     BIT14                                 
040117,000116: 21,2137           00006                           EXTEND                                         #  IF SO, PROCEED WITH RATE DERIVATION
040118,000117: 21,2140           12142                           BZF      +2                                    
040119,000118: 21,2141           12275                           TCF      KMATRIX                               #  IF NOT, SKIP RATE DERIVATION
040120,000119: 
040121,000120:                                                                                                  #                RATE FILTER     TIMING = 7.72 MS
040122,000121: 
040123,000122:                                                                                                  #  RATE FILTER EQUATIONS
040124,000123:                                                                                                  #  DRHO = DELRHO - (.1)ADOT + (1 - GAIN1)DRHO
040125,000124:                                                                                                  #                                            -1
040126,000125:                                                                                                  #  ADOT = ADOT   + GAIN2 DRHO + KMJ DFT
040127,000126:                                                                                                  #             -1
040128,000127:                                                                                                  #        -        *     -     -
040129,000128:                                                                                                  #  WHERE DELRHO = AMGB (CDU - CDU  )
040130,000129:                                                                                                  #                                -1
040131,000130: 
040132,000131: 21,2142           35000                 +2        CAF      TWO                                   
040133,000132: 21,2143           55535        DRHOLOOP           TS       SPNDX                                 
040134,000133: 21,2144           60000                           DOUBLE                                         
040135,000134: 21,2145           55536                           TS       DPNDX                                 
040136,000135: 21,2146           51536                           INDEX    DPNDX                                 
040137,000136: 21,2147           41601                           CS       DRHO                                  #  DRHO SCALED 180 DEGS
040138,000137: 21,2150           00006                           EXTEND                                         
040139,000138: 21,2151           51650                           INDEX    ATTKALMN                              #  PICK UP DESIRED FILTER GAIN
040140,000139: 21,2152           73063                           MP       GAIN1                                 
040141,000140: 21,2153           51536                           INDEX    DPNDX                                 
040142,000141: 21,2154           21602                           DAS      DRHO                                  #  (1 -.064) DRHO
040143,000142: 21,2155           00006                           EXTEND                                         
040144,000143: 21,2156           51536                           INDEX    DPNDX                                 
040145,000144: 21,2157           41563                           DCS      ADOT                                  
040146,000145: 21,2160           53540                           DXCH     KMPAC                                 #  -(.1)ADOT
040147,000146: 21,2161           34765                           CA       QUARTER                               
040148,000147: 21,2162           02000                           TC       SMALLMP                               
040149,000148: 21,2163           53540                           DXCH     KMPAC                                 
040150,000149: 21,2164           51536                           INDEX    DPNDX                                 
040151,000150: 21,2165           21602                           DAS      DRHO                                  
040152,000151: 21,2166           11535                           CCS      SPNDX                                 
040153,000152: 21,2167           12143                           TCF      DRHOLOOP                              
040154,000153: 
040155,000154: 21,2170           30032                           CA       CDUX                                  #  MEASURED BODY RATES--
040156,000155: 21,2171           57666                           XCH      RHO                                   
040157,000156: 21,2172           00006                           EXTEND                                         
040158,000157: 21,2173           21666                           MSU      RHO                                   #  -        *     -     -
040159,000158: 21,2174           40000                           COM                                            #  DELRHO = AMGB (CDU - CDU  )
040160,000159:                                                                                                  #                          -1
040161,000160: 21,2175           22007                           ZL                                             
040162,000161: 21,2176           53545                           DXCH     DELTEMPX                              
040163,000162: 21,2177           30033                           CA       CDUY                                  
040164,000163: 21,2200           57667                           XCH      RHO1                                  
040165,000164: 21,2201           00006                           EXTEND                                         
040166,000165: 21,2202           21667                           MSU      RHO1                                  
040167,000166: 21,2203           40000                           COM                                            
040168,000167: 21,2204           55531                           TS       T5TEMP                                #  (CDUY - RHO1)    SCALED 90 DEGS
040169,000168: 21,2205           00006                           EXTEND                                         
040170,000169: 21,2206           71671                           MP       AMGB1                                 
040171,000170: 21,2207           21545                           DAS      DELTEMPX                              #  DELTEMPX = (CDUX-RHO) + AMGB1(CDUY-RHO1)
040172,000171:                                                                                                  #  MUST BE DOUBLE PRECISION OR WILL LOSE
040173,000172:                                                                                                  #  PULSES
040174,000173: 21,2210           31672                           CA       AMGB4                                 
040175,000174: 21,2211           00006                           EXTEND                                         
040176,000175: 21,2212           71531                           MP       T5TEMP                                
040177,000176: 21,2213           53547                           DXCH     DELTEMPY                              
040178,000177: 21,2214           31674                           CA       AMGB7                                 
040179,000178: 21,2215           00006                           EXTEND                                         
040180,000179: 21,2216           71531                           MP       T5TEMP                                
040181,000180: 21,2217           53551                           DXCH     DELTEMPZ                              
040182,000181: 21,2220           30034                           CA       CDUZ                                  
040183,000182: 21,2221           57670                           XCH      RHO2                                  
040184,000183: 21,2222           00006                           EXTEND                                         
040185,000184: 21,2223           21670                           MSU      RHO2                                  
040186,000185: 21,2224           40000                           COM                                            
040187,000186: 21,2225           55531                           TS       T5TEMP                                #  (CDUZ - RHO2)    SCALED 90 DEGS
040188,000187: 21,2226           00006                           EXTEND                                         
040189,000188: 21,2227           71673                           MP       AMGB5                                 
040190,000189: 21,2230           21547                           DAS      DELTEMPY                              #  DELTEMPY = AMGB4(CDUY-RHO1)
040191,000190:                                                                                                  #                   + AMGB5(CDUZ-RHO2)
040192,000191: 21,2231           31675                           CA       AMGB8                                 
040193,000192: 21,2232           00006                           EXTEND                                         
040194,000193: 21,2233           71531                           MP       T5TEMP                                
040195,000194: 21,2234           21551                           DAS      DELTEMPZ                              #  DELTEMPZ = AMGB7(CDUY-RHO1)
040196,000195:                                                                                                  #                  + AMGB8(CDUZ-RHO2)
040197,000196: 21,2235           35000                           CAF      TWO                                   
040198,000197: 21,2236           55535        ADOTLOOP           TS       SPNDX                                 
040199,000198: 21,2237           60000                           DOUBLE                                         
040200,000199: 21,2240           55536                           TS       DPNDX                                 
040201,000200: 21,2241           00006                           EXTEND                                         
040202,000201: 21,2242           51536                           INDEX    DPNDX                                 
040203,000202: 21,2243           31545                           DCA      DELTEMPX                              
040204,000203: 21,2244           51536                           INDEX    DPNDX                                 
040205,000204: 21,2245           21602                           DAS      DRHO                                  
040206,000205: 21,2246           00006                           EXTEND                                         
040207,000206: 21,2247           51536                           INDEX    DPNDX                                 
040208,000207: 21,2250           31545                           DCA      DELTEMPX                              
040209,000208: 21,2251           51536                           INDEX    DPNDX                                 
040210,000209: 21,2252           21571                           DAS      MERRORX                               
040211,000210: 21,2253           51536                           INDEX    DPNDX                                 
040212,000211: 21,2254           31601                           CA       DRHO                                  
040213,000212: 21,2255           60000                           DOUBLE                                         #  N.B.
040214,000213: 21,2256           60000                           DOUBLE                                         #  N.B.
040215,000214: 21,2257           00006                           EXTEND                                         
040216,000215: 21,2260           51650                           INDEX    ATTKALMN                              #  PICK UP DESIRED FILTER GAINS
040217,000216: 21,2261           73103                           MP       GAIN2                                 
040218,000217: 21,2262           51536                           INDEX    DPNDX                                 #  ADOT   + (.16)(.1)DRHO
040219,000218: 21,2263           21563                           DAS      ADOT                                  #      -1
040220,000219: 21,2264           51535                           INDEX    SPNDX                                 #  S/C TORQUE TO INERTIA RATIO
040221,000220: 21,2265           31651                           CA       KMJ                                   #  SCALED (450)(1600)/(57.3)(16384)=1/1.3
040222,000221: 21,2266           00006                           EXTEND                                         
040223,000222: 21,2267           51535                           INDEX    SPNDX                                 
040224,000223: 21,2270           71576                           MP       DFT                                   
040225,000224: 21,2271           51536                           INDEX    DPNDX                                 
040226,000225: 21,2272           21563                           DAS      ADOT                                  #  KMJ(DFT)
040227,000226: 21,2273           11535                           CCS      SPNDX                                 
040228,000227: 21,2274           12236                           TCF      ADOTLOOP                              #  END CALCULATION OF VEHICLE RATES
040229,000228: 21,2275           31607        KMATRIX            CA       ATTSEC                                
040230,000229: 21,2276           75010                           MASK     LOW4                                  
040231,000230: 21,2277           10000                           CCS      A                                     
040232,000231: 21,2300           12306                           TCF      TENTHSEK                              
040233,000232: 21,2301           37656                           CAF      PRIO34                                #  CALL FOR 1 SEC UPDATE OF TRANSFORMATION
040234,000233: 21,2302           05134                           TC       NOVAC                                 #  MATRIX FROM GIMBAL AXES TO BODY AXES
040235,000234: 21,2303  E6,1537                                  EBANK=   KMPAC                                 
040236,000235: 21,2303           03522 44066                     2CADR    AMBGUPDT                              
040237,000236: 
040238,000237: 21,2305           34322                           CAF      NINE                                  
040239,000238: 
040240,000239: 21,2306           55607        TENTHSEK           TS       ATTSEC                                
040241,000240: 
040242,000241:                                                                                                  #  WHEN AUTOMATIC MANEUVERS ARE BEING PERFORMED, THE FOLLOWING ANGLE ADDITION MUST BE MADE TO PROVIDE A SMOOTH
040243,000242:                                                                                                  #  SEQUENCE OF ANGULAR COMMANDS TO THE AUTOPILOT--
040244,000243: 
040245,000244:                                                                                                  #        CDUXD = CDUXD + DELCDUX         (DOUBLE PRECISION)
040246,000245:                                                                                                  #        CDUYD = CDUYD + DELCDUY         (DOUBLE PRECISION)
040247,000246:                                                                                                  #        CDUZD = CDUZD + DELCDUZ         (DOUBLE PRECISION)
040248,000247: 
040249,000248:                                                                                                  #  THE STEERING PROGRAMS-
040250,000249:                                                                                                  #        1) ATTITUDE MANEUVER ROUTINE
040251,000250:                                                                                                  #        2) LEM TRACKING
040252,000251: 
040253,000252:                                                                                                  #  SHOULD GENERATE THE DESIRED ANGLES (CDUXD, CDUYD, CDUZD) AS WELL AS THE INCREMENTAL ANGLES (DELCDUX, DELCDUY,
040254,000253:                                                                                                  #  DELCDUZ) SO THAT THE GIMBAL ANGLE COMMANDS CAN BE INTERPOLATED BETWEEN UPDATES.
040255,000254: 
040256,000255:                                                                                                  #  HOLDFLAG CODING-
040257,000256: 
040258,000257:                                                                                                  #      + = GRAB PRESENT CDU ANGLES AND STORE IN THETADX, THETADY, THETADZ
040259,000258:                                                                                                  #          AND PERFORM ATTITUDE HOLD ABOUT THESE ANGLES
040260,000259:                                                                                                  #          ALSO IGNORE AUTOMATIC STEERING
040261,000260:                                                                                                  #          SET = + BY
040262,000261:                                                                                                  #                 1) INITIALIZATION PHASE OF AUTOPILOT
040263,000262:                                                                                                  #                 2) OCCURANCE OF RHC COMMANDS
040264,000263:                                                                                                  #                 3) FREE MODE
040265,000264:                                                                                                  #                 4) SWITCH OVER TO ATTITUDE HOLD FROM AUTO
040266,000265:                                                                                                  #                    WHILE DOING AUTOMATIC STEERING (IN THIS CASE
040267,000266:                                                                                                  #                    HOLDFLAG IS NOT ACTUALLY SET TO +, BUT THE LOGIC
040268,000267:                                                                                                  #                    FUNCTIONS AS IF IT WERE.)
040269,000268:                                                                                                  #                 5) S/C CONTROL SWITCH IN SCS
040270,000269:                                                                                                  #                 6) IMU POWER OFF
040271,000270:                                                                                                  #      +0 = IN ATTITUDE HOLD ABOUT A PREVIOUSLY ESTABLISHED REFERENCE
040272,000271:                                                                                                  #       - = PERFORMING AUTOMATIC MANEUVER
040273,000272:                                                                                                  #      -0 = NOT USED AT PRESENT
040274,000273: 
040275,000274:                                                                                                  #        NOTE THAT THIS FLAG MUST BE  SET = -  BY THE STEERING PROGRAM IF IT IS TO COMMAND THE AUTOPILOT.
040276,000275:                                                                                                  #  SINCE ASTRONAUT ACTION MAY CHANGE THE HOLDFLAG SETTING, IT SHOULD BE MONITORED BY THE STEERING PROGRAM TO
040277,000276:                                                                                                  #  DETERMINE IF THE AUTOMATIC SEQUENCE HAS BEEN INTERRUPTED AND IF SO, TAKE APPROPRIATE ACTION.
040278,000277: 
040279,000278: 
040280,000279: 21,2307           41330                           CS       HOLDFLAG                              
040281,000280: 21,2310           00006                           EXTEND                                         
040282,000281: 21,2311           62336                           BZMF     DACNDLS                               #  IF HOLDFLAG +0,-0,+, BYPASS AUTOMATIC
040283,000282:                                                                                                  #  COMMANDS
040284,000283: 21,2312           35000        DCDUINCR           CAF      TWO                                   
040285,000284: 21,2313           55535        DELOOP             TS       SPNDX                                 
040286,000285: 21,2314           60000                           DOUBLE                                         
040287,000286: 21,2315           55536                           TS       DPNDX                                 
040288,000287: 21,2316           00006                           EXTEND                                         
040289,000288: 21,2317           50000                           INDEX    A                                     
040290,000289: 21,2320           31700                           DCA      CDUXD                                 
040291,000290: 21,2321           53540                           DXCH     KMPAC                                 
040292,000291: 21,2322           00006                           EXTEND                                         
040293,000292: 21,2323           51536                           INDEX    DPNDX                                 
040294,000293: 21,2324           31627                           DCA      DELCDUX                               
040295,000294: 21,2325           02012                           TC       DPADD                                 
040296,000295: 21,2326           00006                           EXTEND                                         
040297,000296: 21,2327           31540                           DCA      KMPAC                                 
040298,000297: 21,2330           51535                           INDEX    SPNDX                                 
040299,000298: 21,2331           55623                           TS       THETADX                               
040300,000299: 21,2332           51536                           INDEX    DPNDX                                 
040301,000300: 21,2333           53700                           DXCH     CDUXD                                 
040302,000301: 21,2334           11535                           CCS      SPNDX                                 
040303,000302: 21,2335           12313                           TCF      DELOOP                                
040304,000303: 
040305,000304: 
040306,000305:                                                                                                  #  RCS-CSM AUTOPILOT ATTITUDE ERROR DISPLAY
040307,000306: 
040308,000307:                                                                                                  #  THREE TYPES OF ATTITUDE ERRORS MAY BE DISPLAYED ON THE FDAI-
040309,000308: 
040310,000309:                                                                                                  #                MODE 1) AUTOPILOT FOLLOWING ERRORS              SELECTED BY V61E
040311,000310:                                                                                                  #                        GENERATED INTERNALLY BY THE AUTOPILOT
040312,000311: 
040313,000312:                                                                                                  #                MODE 2) TOTAL ATTITUDE ERRORS                   SELECTED BY V62E
040314,000313:                                                                                                  #                        WITH RESPECT TO THE CONTENTS OF N22
040315,000314: 
040316,000315:                                                                                                  #                MODE 3) TOTAL ASTRONAUT ATTITUDE ERRORS         SELECTED BY V63E
040317,000316:                                                                                                  #                        WITH RESPECT TO THE CONTENTS OF N17
040318,000317: 
040319,000318:                                                                                                  #  MODE 1 IS PROVIDED AS A MONITOR OF THE RCS DAP AND ITS ABILITY TO TRACK AUTOMATIC STEERING COMMANDS.  IN THIS
040320,000319:                                                                                                  #  MODE THE ATTITUDE ERRORS WILL BE ZEROED WHEN THE CMC MODE SWITCH IS IN FREE
040321,000320: 
040322,000321:                                                                                                  #  MODE 2 IS PROVIDED TO ASSIST THE CREW IN MANUALLY MANEUVERING THE S/C TO THE ATTITUDE (GIMBAL ANGLES) SPECIFIED
040323,000322:                                                                                                  #  IN N22.  THE ATTITUDE ERRORS WRT THESE ANGLES AND THE CURRENT CDU ANGLES ARE RESOLVED INTO S/C CONTROL AXES
040324,000323:                                                                                                  #  AS A FLY-TO INDICATOR.
040325,000324: 
040326,000325:                                                                                                  #  MODE 3 IS PROVIDED TO ASSIST THE CREW IN MANUALLY MANEUVERING THE S/C TO THE ATTITUDE (GIMBAL ANGLES) SPECIFIED
040327,000326:                                                                                                  #  IN N17.  THE ATTITUDE ERRORS WRT THESE ANGLES AND THE CURRENT CDU ANGLES ARE RESOLVED INTO S/C CONTROL AXES
040328,000327:                                                                                                  #  AS A FLY-TO INDICATOR.
040329,000328: 
040330,000329:                                                                                                  #     V60 IS PROVIDED TO LOAD N17 WITH A SNAPSHOT OF THE CURRENT CDU ANGLES, THUS SYNCHRONIZING THE MODE 3 DISPLAY
040331,000330:                                                                                                  #  WITH THE CURRENT S/C ATTITUDE.  THIS VERB MAY BE USED AT ANY TIME.
040332,000331: 
040333,000332:                                                                                                  #     THESE DISPLAYS WILL BE AVAILIABLE IN ANY MODE (AUTO, HOLD, FREE, G+N, OR SCS) ONCE THE RCS DAP HAS BEEN
040334,000333:                                                                                                  #  INITIATED VIA V46E.  MODE 1, HOWEVER, WILL BE MEANINGFUL ONLY IN G+N AUTO OR HOLD.  THE CREW MAY PRESET (VIA
040335,000334:                                                                                                  #  V25N17) AN ATTITUDE REFERENCE (DESIRED GIMBAL ANGLES) INTO N17 AT ANY TIME.
040336,000335: 
040337,000336: 21,2336           41530        DACNDLS            CS       RCSFLAGS                              #  ALTERNATE  BETWEEN FDAIDSP1 AND FDAIDSP2
040338,000337: 21,2337           74776                           MASK     BIT4                                  
040339,000338: 21,2340           00006                           EXTEND                                         
040340,000339: 21,2341           13146                           BZF      GOFDAI2                               
040341,000340: 
040342,000341: 21,2342           27530        FDAIDSP1           ADS      RCSFLAGS                              
040343,000342: 21,2343           04725                           TC       IBNKCALL                              
040344,000343: 21,2344           31660                           CADR     NEEDLER                               
040345,000344: 21,2345           15336        KRESUME1           TCF      RESUME                                #  END PHASE 1
040346,000345: 
040347,000346: 
040348,000347:                                                                                                  #  FDAI ATTITUDE ERROR DISPLAY SUBROUTINE
040349,000348: 
040350,000349:                                                                                                  #  PROGRAM DESCRIPTION:    D. KEENE   5/24/67
040351,000350: 
040352,000351:                                                                                                  #      THIS SUBROUTINE IS USED TO DISPLAY ATTITUDE ERRORS ON THE FDAI VIA THE DIGITAL TO ANALOG CONVERTERS (DACS)
040353,000352:                                                                                                  #  IN THE CDUS.  CARE IS TAKEN TO METER OUT THE APPROPRIATE NUMBER OF PULSES TO THE IMU ERROR COUNTERS AND PREVENT
040354,000353:                                                                                                  #  OVERFLOW, TO CONTROL THE RELAY SEQUENCING, AND TO AVOID INTERFERENCE WITH THE COARSE ALIGN LOOP WHICH ALSO USES
040355,000354:                                                                                                  #  THE DACS.
040356,000355: 
040357,000356: 
040358,000357:                                                                                                  #  CALLING SEQUENCE:
040359,000358: 
040360,000359:                                                                                                  #      DURING THE INITIALIZATION SECTION OF THE USER'S PROGRAM, BIT3 OF RCSFLAGS SHOULD BE SET TO INITIATE THE
040361,000360:                                                                                                  #  TURN-ON SEQUENCE WITHIN THE NEEDLES PROGRAM:
040362,000361: 
040363,000362:                                                                                                  #                CS      RCSFLAGS        IN EBANK6
040364,000363:                                                                                                  #                MASK    BIT3
040365,000364:                                                                                                  #                ADS     RCSFLAGS
040366,000365: 
040367,000366:                                                                                                  #  THEREAFTER, THE ATTITUDE ERRORS GENERATED BY THE USER SHOULD BE TRANSFERED TO THE FOLLOWING LOCATIONS IN EBANK6:
040368,000367: 
040369,000368:                                                                                                  #                AK      SCALED 180 DEGREES  NOTE: THESE LOCATIONS ARE SUBJECT
040370,000369:                                                                                                  #                AK1     SCALED 180 DEGREES        TO CHANGE
040371,000370:                                                                                                  #                AK2     SCALED 180 DEGREES
040372,000371: 
040373,000372:                                                                                                  #  FULL SCALED DEFLECTION CORRESPONDS TO 16 7/8 DEGREES OF ATTITUDE ERROR
040374,000373:                                                                                                  #                (= 384 BITS IN IMU ERROR COUNTER)
040375,000374: 
040376,000375:                                                                                                  #  A CALL TO NEEDLER WILL THEN UPDATE THE DISPLAY:
040377,000376: 
040378,000377:                                                                                                  #                INHINT
040379,000378:                                                                                                  #                TC      IBNKCALL        NOTE: EBANK SHOULD BE SET TO E6
040380,000379:                                                                                                  #                CADR    NEEDLER
040381,000380:                                                                                                  #                RELINT
040382,000381: 
040383,000382:                                                                                                  #      THIS PROCESS SHOULD BE REPEATED EACH TIME THE ERRORS ARE UPDATED.  AT LEAST 3 PASSES THRU THE PROGRAM ARE
040384,000383:                                                                                                  #  REQUIRED BEFORE ANYTHING IS ACTUALLY DISPLAYED ON THE ERROR METERS.
040385,000384:                                                                                                  #  NOTE: EACH CALL TO NEEDLER MUST BE SEPARATED BY AT LEAST 50MS TO ASSURE PROPER RELAY SEQUENCING.
040386,000385: 
040387,000386:                                                                                                  #  ERASABLE USED:
040388,000387:                                                                                                  #                        AK              CDUXCMD
040389,000388:                                                                                                  #                        AK1             CDUYCMD
040390,000389:                                                                                                  #                        AK2             CDUZCMD
040391,000390:                                                                                                  #                        EDRIVEX         A,L,Q
040392,000391:                                                                                                  #                        EDRIVEY         T5TEMP
040393,000392:                                                                                                  #                        EDRIVEZ         SPNDX
040394,000393: 
040395,000394:                                                                                                  #  SWITCHES:             RCSFLAGS        BITS 3,2
040396,000395: 
040397,000396:                                                                                                  #  I/O CHANNELS:         CHAN12          BIT 4 (COARSE ALIGN - READ ONLY)
040398,000397:                                                                                                  #                        CHAN12          BIT 6 (IMU ERROR COUNTER ENABLE)
040399,000398:                                                                                                  #                        CHAN14          BIT 13,14,15 (DAC ACTIVITY)
040400,000399: 
040401,000400:                                                                                                  #  SIGN CONVENTION<      AK = THETAC - THETA
040402,000401:                                                                                                  #            WHERE       THETAC = COMMAND ANGLE
040403,000402:                                                                                                  #                        THETA = PRESENT ANGLE
040404,000403: 14,2000                                           SETLOC   DAPS9                                 
040405,000404: 14,2000                                           BANK                                           
040406,000405: 14,3660                                           COUNT*   $$/DAPRC                              
040407,000406: 
040408,000407: 14,3660           34776        NEEDLER            CAF      BIT4                                  #  CHECK FOR COARSE ALIGN ENABLE
040409,000408: 14,3661           00006                           EXTEND                                         #  IF IN COARSE ALIGN DO NOT USE IMU
040410,000409: 14,3662           02012                           RAND     CHAN12                                #  ERROR COUNTERS. DONT USE NEEDLES
040411,000410: 14,3663           00006                           EXTEND                                         
040412,000411: 14,3664           13671                           BZF      NEEDLER1                              
040413,000412: 14,3665           41530        RCSINT             CS       RCSFLAGS                              #  SET BIT3 FOR INITIALIZATION PASS
040414,000413: 14,3666           74777                           MASK     BIT3                                  
040415,000414: 14,3667           27530                           ADS      RCSFLAGS                              
040416,000415: 14,3670           00002                           TC       Q                                     
040417,000416: 
040418,000417: 14,3671           31530        NEEDLER1           CA       RCSFLAGS                              
040419,000418: 14,3672           76211                           MASK     SIX                                   
040420,000419: 14,3673           00006                           EXTEND                                         
040421,000420: 14,3674           13731                           BZF      NEEDLES3                              
040422,000421: 14,3675           74777                           MASK     BIT3                                  
040423,000422: 14,3676           00006                           EXTEND                                         
040424,000423: 14,3677           13722                           BZF      NEEDLER2                              #  BIT3 = 0, BIT2 = 1
040425,000424: 
040426,000425: 14,3700           44774                           CS       BIT6                                  #  FIRST PASS BIT3 = 1
040427,000426: 14,3701           00006                           EXTEND                                         #  DISABLE IMU ERROR COUNTER TO ZERO DACS
040428,000427: 14,3702           03012                           WAND     CHAN12                                #  MUST WAIT AT LEAST 60 MS BEFORE
040429,000428: 14,3703           45003        NEEDLE11           CS       ZERO                                  #  ENABLING COUNTERS.
040430,000429: 14,3704           55525                           TS       AK                                    #  ZERO THE INPUTS ON FIRST PASS
040431,000430: 14,3705           55526                           TS       AK1                                   
040432,000431: 14,3706           55527                           TS       AK2                                   
040433,000432: 14,3707           55532                           TS       EDRIVEX                               #  ZERO THE DISPLAY REGISTERS
040434,000433: 14,3710           55533                           TS       EDRIVEY                               
040435,000434: 14,3711           55534                           TS       EDRIVEZ                               
040436,000435: 14,3712           54050                           TS       CDUXCMD                               #  ZERO THE OUT COUNTERS
040437,000436: 14,3713           54051                           TS       CDUYCMD                               
040438,000437: 14,3714           54052                           TS       CDUZCMD                               
040439,000438: 14,3715           46211                           CS       SIX                                   #  RESET RCSFLAGS FOR PASS2
040440,000439: 14,3716           71530                           MASK     RCSFLAGS                              
040441,000440: 14,3717           65000                           AD       BIT2                                  
040442,000441: 14,3720           55530                           TS       RCSFLAGS                              
040443,000442: 14,3721           00002                           TC       Q                                     #  END PASS1
040444,000443: 
040445,000444: 14,3722           34774        NEEDLER2           CAF      BIT6                                  #  ENABLE IMU ERROR COUNTERS
040446,000445: 14,3723           00006                           EXTEND                                         
040447,000446: 14,3724           05012                           WOR      CHAN12                                
040448,000447: 14,3725           46211                           CS       SIX                                   #  RESET RCSFLAGS TO DISPLAY ATTITUDE
040449,000448: 14,3726           71530                           MASK     RCSFLAGS                              #  ERRORS    WAIT AT LEAST 4 MS FOR
040450,000449: 14,3727           55530                           TS       RCSFLAGS                              #  RELAY CLOSURE
040451,000450: 14,3730           00002                           TC       Q                                     
040452,000451: 
040453,000452: 
040454,000453: 14,3731           34774        NEEDLES3           CAF      BIT6                                  #  CHECK TO SEE IF IMU ERROR COUNTER
040455,000454: 14,3732           00006                           EXTEND                                         #  IS ENABLED
040456,000455: 14,3733           02012                           RAND     CHAN12                                
040457,000456: 14,3734           00006                           EXTEND                                         #  IF NOT RECYCLE NEEDLES
040458,000457: 14,3735           13665                           BZF      RCSINT                                
040459,000458: 14,3736           35000        NEEDLES            CAF      TWO                                   
040460,000459: 14,3737           55535        DACLOOP            TS       SPNDX                                 
040461,000460: 14,3740           44765                           CS       QUARTER                               
040462,000461: 14,3741           00006                           EXTEND                                         
040463,000462: 14,3742           51535                           INDEX    SPNDX                                 
040464,000463: 14,3743           71525                           MP       AK                                    
040465,000464: 14,3744           54001                           TS       L                                     
040466,000465: 14,3745           10000                           CCS      A                                     
040467,000466: 14,3746           33775                           CA       DACLIMIT                              
040468,000467: 14,3747           13751                           TCF      +2                                    
040469,000468: 14,3750           43775                           CS       DACLIMIT                              
040470,000469: 14,3751           60001                           AD       L                                     
040471,000470: 14,3752           55531                           TS       T5TEMP                                #  OVFLO CHK
040472,000471: 14,3753           13757                           TCF      OVSPOT                                
040473,000472: 14,3754           50000                           INDEX    A                                     #  ON OVERFLOW LIMIT OUTPUT TO +-384
040474,000473: 14,3755           33775                           CAF      DACLIMIT                              
040475,000474: 14,3756           54001                           TS       L                                     
040476,000475: 14,3757           51535        OVSPOT             INDEX    SPNDX                                 
040477,000476: 14,3760           41532                           CS       EDRIVEX                               #  CURRENT VALUE OF DAC
040478,000477: 14,3761           60001                           AD       L                                     
040479,000478: 14,3762           51535                           INDEX    SPNDX                                 
040480,000479: 14,3763           26050                           ADS      CDUXCMD                               
040481,000480: 14,3764           51535                           INDEX    SPNDX                                 
040482,000481: 14,3765           23532                           LXCH     EDRIVEX                               
040483,000482: 14,3766           11535                           CCS      SPNDX                                 
040484,000483: 14,3767           13737                           TCF      DACLOOP                               
040485,000484: 14,3770           37673                           CAF      13,14,15                              
040486,000485: 14,3771           00006                           EXTEND                                         
040487,000486: 14,3772           05014        DRIVEDAC           WOR      CHAN14                                #  SET DAC ACTIVITY BITS
040488,000487: 14,3773           00002                           TC       Q                                     
040489,000488: 
040490,000489: 14,3774           77177                           DEC      -384       B-14                       
040491,000490: 14,3775           37200        DACLIMIT           DEC      16000      B-14                       
040492,000491: 14,3776           00600                           DEC      384        B-14                       
040493,000492: 
040494,000493: 21,2000                                           SETLOC   DAPS3                                 
040495,000494: 21,2000                                           BANK                                           
040496,000495: 21,2346                                           COUNT*   $$/DAPRC                              
040497,000496: 
040498,000497: 21,2346           32352        REINIT             CAF      DELAY200                              #  ........TILT LOGIC
040499,000498: 21,2347           54030                           TS       TIME5                                 #  REINITIALIZE DAP IN 200MS
040500,000499: 21,2350           55513                           TS       T5PHASE                               
040501,000500: 21,2351           15336                           TCF      RESUME                                
040502,000501: 21,2352           37754        DELAY200           DEC      16364      B-14                       #  200MS
040503,000502: 
040504,000503: 
040505,000504:                                                                                                  #  INITIALIZATION PROGRAM FOR RCS-CSM AUTOPILOT
040506,000505: 
040507,000506:                                                                                                  #  THE FOLLOWING QUANTITIES WILL BE ZEROED AND SHOULD APPEAR IN CONSECUTIVE LOCATIONS IN MEMORY AFTER WBODY
040508,000507: 
040509,000508:                                                                                                  #  WBODY   (+1)    DFT             TAU2
040510,000509:                                                                                                  #  WBODY1  (+1)    DFT1            BIAS
040511,000510:                                                                                                  #  WBODY2  (+1)    DFT2            BIAS1
040512,000511:                                                                                                  #  ADOT    (+1)    DRHO   (+1)     BIAS2
040513,000512:                                                                                                  #  ADOT1   (+1)    DRHO1  (+1)     ERRORX
040514,000513:                                                                                                  #  ADOT2   (+1)    DRHO2  (+1)     ERRORY
040515,000514:                                                                                                  #  MERRORX (+1)    ATTSEC          ERRORZ
040516,000515:                                                                                                  #  MERRORY (+1)    TAU
040517,000516:                                                                                                  #  MERRORZ (+1)    TAU1
040518,000517: 
040519,000518: 21,2353           35001        FRESHDAP           CAF      ONE                                   #  RESET HOLDFLAG TO STOP AUTOMATIC
040520,000519: 21,2354           55330                           TS       HOLDFLAG                              #  STEERING AND PREPARE TO PICK UP AN
040521,000520:                                                                                                  #  ATTITUDE HOLD REFERENCE
040522,000521: 
040523,000522: 21,2355           30077        REDAP              CA       FLAGWRD3                              
040524,000523: 21,2356           74774                           MASK     45/46BIT                              
040525,000524: 21,2357           00006                           EXTEND                                         
040526,000525: 21,2360           12362                           BZF      +2                                    
040527,000526: 21,2361           12434                           TCF      DKDLOAD                               
040528,000527: 21,2362           54001                           TS       L                                     
040529,000528: 21,2363           53476                           DXCH     WHICHDAP                              
040530,000529: 
040531,000530: 21,2364           04725                           TC       IBNKCALL                              #  DECODE DAPDATR1, DAPDATR2 FOR DEADBANDS
040532,000531: 21,2365           40420                           CADR     S41.2                                 #  RATES, QUADFAILS, QUAD MANAGEMENT
040533,000532: 
040534,000533: 21,2366           04725                           TC       IBNKCALL                              #  DECODE IXX, IAVG AND CONVERT
040535,000534: 21,2367           40551                           CADR     S40.14                                #  TO AUTOPILOT GAINS
040536,000535: 
040537,000536: 21,2370           32472                           CAF      NO.T5VAR                              #  NO. LOCATIONS TO BE ZEROED MINUS 2
040538,000537:                                                                                                  #  NO.T5VAR MUST BE ODD *************
040539,000538: 21,2371           10000        ZEROT5             CCS      A                                     
040540,000539: 21,2372           55535                           TS       SPNDX                                 
040541,000540: 21,2373           35003                           CAF      ZERO                                  
040542,000541: 21,2374           54001                           TS       L                                     
040543,000542: 21,2375           51535                           INDEX    SPNDX                                 
040544,000543: 21,2376           53556                           DXCH     WBODY      +1                         
040545,000544: 21,2377           11535                           CCS      SPNDX                                 
040546,000545: 21,2400           12371                           TCF      ZEROT5                                
040547,000546: 21,2401           55554                           TS       WBODY                                 #  ZERO LAST (FIRST) ONE
040548,000547: 
040549,000548: 21,2402           02515                           TC       ZEROJET                               
040550,000549: 21,2403           45003                           CS       ZERO                                  
040551,000550: 21,2404           55664                           TS       CHANTEMP                              #  INITIALIZE MINIMUM IMPULSE CONTROL
040552,000551: 
040553,000552: 21,2405           55663                           TS       CH31TEMP                              #  INITIALIZE RHC POSITION MEMORY FOR
040554,000553:                                                                                                  #  MANUAL RATE MODES
040555,000554: 
040556,000555: 21,2406           51475                           INDEX    WHICHDAP                              
040557,000556: 21,2407           32473                           CAF      =.24                                  
040558,000557: 21,2410           55705                           TS       SLOPE                                 #  INITIALIZE SWITCHING LOGIC SLOPE
040559,000558: 
040560,000559: 21,2411           34777                           CAF      FOUR                                  
040561,000560: 21,2412           55665                           TS       T5TIME                                #  PHASE 0 RESETS FOR PHASE 2 INTERRUPT IN
040562,000561:                                                                                                  #  60 MS. PHASE 2 RESETS FOR PHASE 1 RUPT
040563,000562:                                                                                                  #  IN (80MS - T5TIME(40MS)). THEREFORE
040564,000563:                                                                                                  #  PHASE 1 (RATEFILTER) BEGINS CYCLING 100
040565,000564:                                                                                                  #  MS FROM NOW AND EVERY 100MS THEREAFTER
040566,000565: 21,2413           35006                           CAF      ELEVEN                                
040567,000566: 21,2414           55650                           TS       ATTKALMN                              #  RESET TO PICK UP KALMAN FILTER GAINS
040568,000567:                                                                                                  #  TO INITIALIZE THE S/C ANGULAR RATES
040569,000568: 21,2415           30032                           CA       CDUX                                  
040570,000569: 21,2416           55666                           TS       RHO                                   
040571,000570: 21,2417           30033                           CA       CDUY                                  
040572,000571: 21,2420           55667                           TS       RHO1                                  
040573,000572: 21,2421           30034                           CA       CDUZ                                  
040574,000573: 21,2422           55670                           TS       RHO2                                  
040575,000574: 21,2423           35003                           CAF      ZERO                                  #  RESET AUTOPILOT TO BEGIN EXECUTING
040576,000575: 21,2424           55513                           TS       T5PHASE                               #  PHASE2 OF PROGRAM
040577,000576: 
040578,000577: 21,2425           41324                           CS       IMODES33                              #  CHECK IMU STATUS
040579,000578: 21,2426           74774                           MASK     NOIMUDAP                              #  IF BIT6 =0 IMU IN FINE ALIGN
040580,000579: 21,2427           10000                           CCS      A                                     #  IF BIT6 = 1 IMU NOT READY
040581,000580: 21,2430           12461                           TCF      IMUAOK                                
040582,000581: 21,2431           55650                           TS       ATTKALMN                              #  CANNOT USE IMU
040583,000582: 21,2432           32475                           CAF      RCSINITB                              #  PROVIDE FREE CONTROL ONLY
040584,000583: 21,2433           12466                           TCF      RCSSWIT                               #  DONT START UP RATE FILTER
040585,000584:                                                                                                  #  SIGNAL NO RATE FILTER
040586,000585: 
040587,000586: 21,2434           35000        DKDLOAD            CAF      TWO                                   
040588,000587: 21,2435           54001                           TS       L                                     
040589,000588: 21,2436           35001                           CAF      ONE                                   
040590,000589: 21,2437           53476                           DXCH     WHICHDAP                              
040591,000590: 
040592,000591: 21,2440           00006                           EXTEND                                         
040593,000592: 21,2441           31444                           DCA      KMJDCKD                               
040594,000593: 21,2442           53652                           DXCH     KMJ                                   
040595,000594: 
040596,000595: 21,2443           00006                           EXTEND                                         
040597,000596: 21,2444           31446                           DCA      KMJ2DCKD                              
040598,000597: 21,2445           53654                           DXCH     KMJ2                                  
040599,000598: 
040600,000599: 21,2446           00006                           EXTEND                                         
040601,000600: 21,2447           31450                           DCA      J/M1DCKD                              
040602,000601: 21,2450           53656                           DXCH     J/M1                                  
040603,000602: 
040604,000603: 21,2451           31474                           CA       DKDB                                  
040605,000604: 21,2452           55706                           TS       ADB                                   
040606,000605: 21,2453           34763                           CA       NEGMAX                                
040607,000606: 21,2454           55463                           TS       DAPZRUPT                              
040608,000607: 21,2455           32460                           CA       OCT240                                
040609,000608: 21,2456           55456                           TS       TIMEHOLD                              
040610,000609: 21,2457           12370                           TCF      ZEROT5     -1                         
040611,000610: 
040612,000611: 21,2460           00240        OCT240             OCT      240                                   
040613,000612: 
040614,000613: 21,2461           37656        IMUAOK             CAF      PRIO34                                #  START MATRIX INITIALIZATION
040615,000614: 21,2462           05134                           TC       NOVAC                                 #  BYPASS IF IMU NOT IN FINE ALIGN
040616,000615: 21,2463  E6,1537                                  EBANK=   KMPAC                                 
040617,000616: 21,2463           03522 44066                     2CADR    AMBGUPDT                              
040618,000617: 
040619,000618: 21,2465           34777                           CAF      RCSINIT                               #  CLEAR BIT14 -ASSUME WE HAVE A GOOD IMU
040620,000619: 21,2466           55530        RCSSWIT            TS       RCSFLAGS                              #  CLEAR BIT1  -INITIALIZE T6 PROGRAM
040621,000620:                                                                                                  #    SET BIT3  -INITIALIZE NEEDLES
040622,000621:                                                                                                  #  CLEAR BIT4  -RESET FOR FDAIDSP1
040623,000622: 21,2467           32476                           CAF      T5WAIT60                              #  NEXT T5RUPT 60 MS FROM NOW TO ALLOW IMU
040624,000623:                                                                                                  #  ERROR COUNTER TO ZERO.
040625,000624:                                                                                                  #  (MINIMUM DELAY = 15 MS)
040626,000625: 21,2470           54030                           TS       TIME5                                 #  SINCE ATTKALMN IS +11, PROGRAM WILL THEN
040627,000626: 21,2471           05336                           TC       RESUME                                #  PICK UP THE KALMAN FILTER GAINS. RATE
040628,000627:                                                                                                  #  FILTER WILL BEGIN OPERATING ZOOMS FROM
040629,000628:                                                                                                  #  NOW
040630,000629: 
040631,000630:                                                                                                  #  CONSTANTS USED IN INITIALIZATION PROGRAM
040632,000631: 
040633,000632: 
040634,000633: 21,2472           00045        NO.T5VAR           DEC      37         B-14                       #  NO. OF LOCATIONS TO BE ZEROED
040635,000634:                                                                                                  #  MINUS 2...MUST BE ODD
040636,000635: 
040637,000636:                                                                                                  #  FOR AN EVEN NUMBER OF VARIABLES TO BE ZEROED....
040638,000637:                                                                                                  #   * SET NO.T5VAR EQUAL TO NUMBER OF VARIABLES MINUS 1
040639,000638:                                                                                                  #   * DO DXCH WBODY INSTEAD OF WBODY + 1
040640,000639:                                                                                                  #   * DELETE TS WBODY
040641,000640: 
040642,000641: 21,2473           07534        =.24               DEC      .24                                   #  = SLOPE OF 0.6/SEC
040643,000642: 21,2474           03656                           DEC      .12                                   #  = SLOPE OF 0.3/SEC
040644,000643: 21,2475     4777               RCSINIT            =        BIT3                                  
040645,000644: 21,2475           20004        RCSINITB           OCT      20004                                 
040646,000645: 
040647,000646: 
040648,000647: 21,2476           37772        T5WAIT60           DEC      16378      B-14                       #  = 6 CS
040649,000648: 21,2477  E6,1537                                  EBANK=   KMPAC                                 
040650,000649: 21,2477           03644 36066  T6ADDR             2CADR    T6START                               
040651,000650: 
040652,000651: 21,2501           35003        DKDZERO            CAF      ZERO                                  
040653,000652: 21,2502           55661                           TS       5WORD                                 
040654,000653: 21,2503           55662                           TS       6WORD                                 
040655,000654: 21,2504           55466                           TS       5AXW                                  
040656,000655: 21,2505           55467                           TS       5BXW                                  
040657,000656: 21,2506           55465                           TS       INHIBIT                               
040658,000657: 21,2507           34771                           CAF      BIT9                                  
040659,000658: 21,2510           55660                           TS       NEXT6INT                              
040660,000659: 21,2511           12534                           TCF      ZOT                                   
040661,000660: 
040662,000661: 21,2512           62524        -75DEGS            DEC      -.41666                               #  -75 DEGS IN REVS * 2
040663,000662: 

The name of the following label is a guess.

040665,000664: 21,2513           44777        DOCKED             CS       FOUR                                  
040666,000665: 21,2514           12612                           TCF      NOHIAUTO                              
040667,000666: 
040668,000667: 
040669,000668: 21,2515           35006        ZEROJET            CAF      ELEVEN                                #  ZERO  BLAST2, BLAST1, BLAST, YWORD2,
040670,000669: 21,2516           55535                 +1        TS       SPNDX                                 #  YWORD1,PWORD2,PWORD1,RWORD2,
040671,000670: 21,2517           35003                           CAF      ZERO                                  #  AND RWORD1.
040672,000671: 21,2520           51535                           INDEX    SPNDX                                 
040673,000672: 21,2521           55477                           TS       RWORD1                                
040674,000673: 21,2522           11535                           CCS      SPNDX                                 
040675,000674: 21,2523           12516                           TCF      ZEROJET    +1                         
040676,000675: 
040677,000676: 21,2524           51475                           INDEX    WHICHDAP                              
040678,000677: 21,2525           12526                           TCF      +1                                    
040679,000678: 21,2526           12530                           TCF      +2                                    
040680,000679: 21,2527           12501                           TCF      DKDZERO                               
040681,000680: 
040682,000681: 21,2530           34777                           CAF      FOUR                                  
040683,000682: 21,2531           55510                           TS       BLAST1     +1                         
040684,000683: 21,2532           35006                           CAF      ELEVEN                                
040685,000684: 21,2533           55512                           TS       BLAST2     +1                         
040686,000685: 
040687,000686: 21,2534           45001        ZOT                CS       BIT1                                  
040688,000687: 21,2535           71530                           MASK     RCSFLAGS                              
040689,000688: 21,2536           55530                           TS       RCSFLAGS                              #  RESET BIT1 OF RCSFLAGS TO 0
040690,000689: 
040691,000690: 21,2537           00006                           EXTEND                                         
040692,000691: 21,2540           32500                           DCA      T6ADDR                                
040693,000692: 21,2541           52111                           DXCH     T6LOC                                 
040694,000693: 21,2542           34626                           CAF      =+14MS                                #  ENABLE T6RUPT TO SHUT OFF JETS IN 14 MS.
040695,000694: 21,2543           54031                           TS       TIME6                                 
040696,000695: 21,2544           00006                           EXTEND                                         
040697,000696: 21,2545           22070                           QXCH     RUPTREG1                              
040698,000697: 21,2546           04553                           TC       C13STALL                              
040699,000698: 21,2547           34763                           CAF      BIT15                                 
040700,000699: 21,2550           00006                           EXTEND                                         
040701,000700: 21,2551           05013                           WOR      CHAN13                                
040702,000701: 
040703,000702: 21,2552           00070                           TC       RUPTREG1                              
040704,000703: 
040705,000704: 21,2553           11650        T5PHASE2           CCS      ATTKALMN                              #  IF (+) INITIALIZE RATE ESTIMATE
040706,000705: 21,2554           13134                           TCF      KALUPDT                               
040707,000706: 
040708,000707: 
040709,000708: 21,2555           12557                           TCF      +2                                    #  ONLY IF ATTKALMN POSITIVE
040710,000709: 21,2556           12557                           TCF      +1                                    
040711,000710: 21,2557           37663                           CA       DELTATT2                              #  RESET FOR PHASE3 IN 20 MS
040712,000711: 21,2560           56030                           XCH      TIME5                                 #  (JET SELECTION LOGIC )
040713,000712: 21,2561           27665                           ADS      T5TIME                                #  TO COMPENSATE FOR DELAYS IN T5RUPT
040714,000713: 
040715,000714: 
040716,000715: 21,2562           10034                           CCS      CDUZ                                  
040717,000716: 21,2563           12567                           TCF      GIMBY                                 #  +(
040718,000717: 21,2564           12601                           TCF      OKGIMB                                #  +0
040719,000718: 21,2565           12567                           TCF      GIMBY                                 #  -N
040720,000719: 21,2566           12601                           TCF      OKGIMB                                #  -0
040721,000720: 21,2567           62512        GIMBY              AD       -75DEGS                               
040722,000721: 21,2570           00006                           EXTEND                                         
040723,000722: 21,2571           62601                           BZMF     OKGIMB                                
040724,000723: 
040725,000724: 21,2572           07710                           TC       UPFLAG                                #  ATTITUDE HOLD WHEN MIDDLE GIMBAL ANGLE
040726,000725: 21,2573           00020                           ADRES    STIKFLAG                              #    GREATER THAN 75 DEGREES
040727,000726: 21,2574           11330                           CCS      HOLDFLAG                              
040728,000727: 21,2575           12601                           TCF      OKGIMB                                
040729,000728: 21,2576           12601                           TCF      OKGIMB                                
040730,000729: 21,2577           35003                           CAF      ZERO                                  
040731,000730: 21,2600           55330                           TS       HOLDFLAG                              
040732,000731: 
040733,000732: 21,2601           51475        OKGIMB             INDEX    WHICHDAP                              
040734,000733: 21,2602           12603                           TCF      +1                                    
040735,000734: 21,2603           12605                           TCF      +2                                    
040736,000735: 21,2604           12513                           TCF      DOCKED                                
040737,000736: 
040738,000737: 21,2605           31530                           CA       RCSFLAGS                              #  IF A HIGH RATE AUTO MANEUVER IS IN
040739,000738: 21,2606           74763                           MASK     BIT15                                 #  PROGRESS (BIT 15 OF RCSFLAGS SET), SET
040740,000739: 21,2607           00006                           EXTEND                                         #  ATTKALMN TO -1
040741,000740: 21,2610           12612                           BZF      NOHIAUTO                              #  OTHERWISE SET ATTKALMN TO 0.
040742,000741: 21,2611           45001                           CS       ONE                                   
040743,000742: 21,2612           55650        NOHIAUTO           TS       ATTKALMN                              
040744,000743: 
040745,000744: 
040746,000745:                                                                                                  #        MANUAL ROTATION COMMANDS
040747,000746: 
040748,000747: 21,2613           43001                           CS       OCT01760                              #  RESET FORCED FIRING BITS (BITS 10 TO 5
040749,000748: 21,2614           71530                           MASK     RCSFLAGS                              #  OF RCSFLAGS) TO ZERO
040750,000749: 21,2615           55530                           TS       RCSFLAGS                              
040751,000750: 
040752,000751: 21,2616           00006                           EXTEND                                         
040753,000752: 21,2617           00031                           READ     CHAN31                                
040754,000753: 21,2620           54001                           TS       L                                     
040755,000754: 21,2621           31663                           CA       CH31TEMP                              
040756,000755: 21,2622           00006                           EXTEND                                         
040757,000756: 21,2623           06001                           RXOR     LCHAN                                 
040758,000757: 21,2624           73005                           MASK     MANROT                                #  = OCT00077
040759,000758: 21,2625           00006                           EXTEND                                         
040760,000759: 21,2626           62646                           BZMF     NOCHANGE                              
040761,000760: 
040762,000761: 21,2627           22000                           LXCH     A                                     
040763,000762: 21,2630           55663                           TS       CH31TEMP                              #  SAVE CONTENTS OF CHANNEL 31 IN CH31TEMP
040764,000763: 
040765,000764: 21,2631           30001                           CA       L                                     
040766,000765: 21,2632           00006                           EXTEND                                         
040767,000766: 21,2633           74775                           MP       BIT5                                  #  PUT BITS 6-1 OF A IN BITS 10-5 OF L
040768,000767: 21,2634           30001                           CA       L                                     
040769,000768: 21,2635           27530                           ADS      RCSFLAGS                              #  SET FORCED FIRING BITS FOR AXES WITH
040770,000769:                                                                                                  #  WITH CHANGES IN COMMAND. BITS 10,9 FOR
040771,000770:                                                                                                  #  ROLL, BITS 8,7 FOR YAW, BITS 6,5 FOR
040772,000771:                                                                                                  #  PITCH
040773,000772: 
040774,000773: 21,2636           41530                           CS       RCSFLAGS                              #  SET RATE DAMPING FLAGS (BITS 13,12,AND
040775,000774: 21,2637           75067                           MASK     OCT16000                              #  11 OF RCSFLAGS)
040776,000775: 21,2640           27530                           ADS      RCSFLAGS                              
040777,000776: 
040778,000777: 21,2641           51475                           INDEX    WHICHDAP                              
040779,000778: 21,2642           12643                           TCF      +1                                    
040780,000779: 21,2643           12646                           TCF      NOCHANGE                              
040781,000780: 
040782,000781: 21,2644           45003                           CS       ZERO                                  
040783,000782: 21,2645           55465                           TS       INHIBIT                               
040784,000783: 
040785,000784: 21,2646           41663        NOCHANGE           CS       CH31TEMP                              
040786,000785: 21,2647           73005                           MASK     MANROT                                
040787,000786: 21,2650           00006                           EXTEND                                         
040788,000787: 21,2651           63150                           BZMF     AHFNOROT                              #  IF NO MANUAL COMMANDS, GO TO AHFNOROT
040789,000788: 
040790,000789: 21,2652           55330                           TS       HOLDFLAG                              #  SET HOLDFLAG +
040791,000790: 
040792,000791: 21,2653           03116                           TC       STICKCHK                              #  WHEN THE RHC IS OUT OF DETENT, PMANNDX,
040793,000792:                                                                                                  #  YMANNDX, AND RMANNDX ARE ALL SET, BY
040794,000793:                                                                                                  #  MEANS OF STICKCHK, TO 0, 1, OR 2 FOR NO,
040795,000794:                                                                                                  #  +, OR - ROTATION RESPECTIVELY AS
040796,000795:                                                                                                  #  COMMANDED BY THE RHC.
040797,000796: 
040798,000797:                                                                                                  #  HOWEVER, IT IS WELL TO NOTE THAT AFTER
040799,000798:                                                                                                  #  THE RHC IS RETURNED TO DETENT, THE
040800,000799:                                                                                                  #  PROGRAM BRANCHES TO AHFNOROT AND AVOIDS
040801,000800:                                                                                                  #  STICKCHK SO PMANNDX, YMANNDX, AND
040802,000801:                                                                                                  #  RMANNDX ARE NOT RESET TO ZERO BUT RATHER
040803,000802:                                                                                                  #  LEFT SET TO THEIR LAST OUT OF DETENT
040804,000803:                                                                                                  #  VALUES.
040805,000804: 
040806,000805: 21,2654           40075                           CS       FLAGWRD1                              #  SET STIKFLAG TO INFORM STEERING
040807,000806: 21,2655           74764                           MASK     STIKBIT                               #  PROGRAMS (P20) THAT ASTRONAUT HAS
040808,000807: 21,2656           26075                           ADS      FLAGWRD1                              #  ASSUMED ROTATIONAL CONTROL OF SPACECRAFT
040809,000808: 
040810,000809: 21,2657           34764                           CAF      BIT14                                 
040811,000810: 21,2660           05627                           TC       C31BTCHK                              
040812,000811: 21,2661           13016                           TCF      FREEFUNC                              
040813,000812: 21,2662           31530                           CA       RCSFLAGS                              #  EXAMINE RCSFLAGS TO SEE IF RATE FILTER
040814,000813: 21,2663           74764                           MASK     BIT14                                 #  HAS BEEN INITIALIZED
040815,000814: 21,2664           10000                           CCS      A                                     #  IF SO, PROCEED WITH MANUAL RATE COMMANDS
040816,000815: 21,2665           12346                           TCF      REINIT                                #  .....TILT, RECYCLE TO INITIALIZE FILTER
040817,000816: 
040818,000817: 21,2666           45004                           CS       FIVE                                  #  IF MANUAL MANEUVER IS AT HIGH RATE, SET
040819,000818: 21,2667           60767                           AD       RATEINDX                              #  ATTKALMN TO -1.
040820,000819: 21,2670           00006                           EXTEND                                         #  OTHERWISE, LEAVE ATTKALMN ALONE.
040821,000820: 21,2671           62674                           BZMF     +3                                    
040822,000821: 21,2672           45001                           CS       ONE                                   
040823,000822: 21,2673           55650                           TS       ATTKALMN                              
040824,000823: 
040825,000824: 
040826,000825: 21,2674           35000                           CAF      TWO                                   #  AUTO-HOLD MANUAL ROTATION
040827,000826: 21,2675           55535        SETWBODY           TS       SPNDX                                 
040828,000827: 21,2676           60000                           DOUBLE                                         
040829,000828: 21,2677           55536                           TS       DPNDX                                 
040830,000829: 21,2700           51535                           INDEX    SPNDX                                 #  RMANNDX = 0 NO ROTATION
040831,000830: 21,2701           31707                           CA       RMANNDX                               #          = 1  + ROTATION
040832,000831: 21,2702           00006                           EXTEND                                         #          = 2  - ROTATION
040833,000832: 21,2703           12731                           BZF      NORATE                                #  IF NO ROTATION COMMAND ON THIS AXIS,
040834,000833:                                                                                                  #  GO TO NORATE.
040835,000834: 
040836,000835: 21,2704           51475                           INDEX    WHICHDAP                              
040837,000836: 21,2705           12706                           TCF      +1                                    
040838,000837: 21,2706           12710                           TCF      +2                                    
040839,000838: 21,2707           12762                           TCF      GETDKRAT                              
040840,000839: 
040841,000840: 21,2710           60767                           AD       RATEINDX                              #  RATEINDX = 0  0.05 DEG/SEC
040842,000841: 21,2711           54002                           TS       Q                                     #           = 2  0.2 DEG/SEC
040843,000842: 21,2712           50002                           INDEX    Q                                     #           = 4  0.5 DEG/SEC
040844,000843: 21,2713           33005                           CA       MANTABLE   -1                         #           = 6  2.0 DEG/SEC

The name of the following label is a guess.

040846,000845: 21,2714           00006        WBODYSET           EXTEND                                         
040847,000846: 21,2715           74771                           MP       BIT9                                  #  MULTIPLY MANTABLE BY 2 TO THE -6
040848,000847: 21,2716           51536                           INDEX    DPNDX                                 #  TO GET COMMANDED RATE.
040849,000848: 21,2717           53555                           DXCH     WBODY                                 #  SET WBODY TO COMMANDED RATE.
040850,000849: 
040851,000850: 21,2720           31530                           CA       RCSFLAGS                              
040852,000851: 21,2721           75067                           MASK     OCT16000                              #  IS RATE DAMPING COMPLETED (BITS 13,12 AND
040853,000852: 21,2722           00006                           EXTEND                                         #  11 OF RCSFLAGS ALL ZERO.)  IF SO, GO TO
040854,000853: 21,2723           12741                           BZF      MERUPDAT                              #  MERUPDAT TO UPDATE CUMULATIVE ATTITUDE
040855,000854:                                                                                                  #  ERROR.
040856,000855: 
040857,000856: 21,2724           35003        ZEROER             CA       ZERO                                  #  ZEROER ZEROS MERRORS
040858,000857: 21,2725           22007                           ZL                                             
040859,000858: 21,2726           51536                           INDEX    DPNDX                                 
040860,000859: 21,2727           53571                           DXCH     MERRORX                               
040861,000860: 21,2730           12753                           TCF      SPNDXCHK                              
040862,000861: 
040863,000862: 21,2731           22007        NORATE             ZL                                             
040864,000863: 21,2732           51536                           INDEX    DPNDX                                 
040865,000864: 21,2733           53555                           DXCH     WBODY                                 #  ZERO WBODY FOR THIS AXIS
040866,000865: 21,2734           31530                           CA       RCSFLAGS                              
040867,000866: 21,2735           75067                           MASK     OCT16000                              
040868,000867: 21,2736           00006                           EXTEND                                         #  IS RATE DAMPING COMPLETED
040869,000868: 21,2737           12753                           BZF      SPNDXCHK                              #  YES, KEEP CURRENT MERRORX GO TO SPNDXCHK
040870,000869: 21,2740           12724                           TCF      ZEROER                                #  NO, GO TO ZEROER
040871,000870: 
040872,000871: 21,2741           51475        MERUPDAT           INDEX    WHICHDAP                              
040873,000872: 21,2742           12743                           TCF      +1                                    
040874,000873: 21,2743           12745                           TCF      +2                                    
040875,000874: 21,2744           12771                           TCF      GETDKCMD                              
040876,000875: 
040877,000876: 21,2745           50002                           INDEX    Q                                     #  MERRORX=MERRORX+MEASURED CHANGE IN ANGLE
040878,000877: 21,2746           43005                           CS       MANTABLE   -1                         #  -COMMANDED CHANGE IN ANGLE

The name of the following label is a guess.

040880,000879: 21,2747           00006        UPDATMER           EXTEND                                         #  THE ADDITION OF MEASURED CHANGE IN ANGLE
040881,000880: 21,2750           74773                           MP       BIT7                                  #  HAS ALREADY BEEN DONE IN THE RATE FILTER
040882,000881: 21,2751           51536                           INDEX    DPNDX                                 #  COMMANDED CHANGE IN ANGLE = WBODY TIMES
040883,000882: 21,2752           21571                           DAS      MERRORX                               #  .1SEC = MANTABLE ENTRY TIMES 2 TO THE -8
040884,000883: 
040885,000884: 21,2753           51536        SPNDXCHK           INDEX    DPNDX                                 
040886,000885: 21,2754           31570                           CA       MERRORX                               
040887,000886: 21,2755           51535                           INDEX    SPNDX                                 
040888,000887: 21,2756           55620                           TS       ERRORX                                #  ERRORX = HIGH ORDER WORD OF MERRORX
040889,000888: 21,2757           11535                           CCS      SPNDX                                 
040890,000889: 21,2760           12675                           TCF      SETWBODY                              
040891,000890: 21,2761           13366                           TCF      JETS                                  
040892,000891: 
040893,000892: 21,2762           50000        GETDKRAT           INDEX    A                                     
040894,000893: 21,2763           12763                           TCF      +0                                    
040895,000894: 21,2764           12767                           TCF      +3                                    
040896,000895: 
040897,000896: 21,2765           41473                           CS       DKRATE                                
040898,000897: 21,2766           12714                           TCF      WBODYSET                              
040899,000898: 
040900,000899: 21,2767           31473                           CA       DKRATE                                
040901,000900: 21,2770           12714                           TCF      WBODYSET                              
040902,000901: 

The name of the following function is a guess.

040904,000903: 21,2771           51535        GETDKCMD           INDEX    SPNDX                                 
040905,000904: 21,2772           51707                           INDEX    RMANNDX                               
040906,000905: 21,2773           12773                           TCF      +0                                    
040907,000906: 21,2774           12777                           TCF      +3                                    
040908,000907: 
040909,000908: 21,2775           31473                           CA       DKRATE                                
040910,000909: 21,2776           12747                           TCF      UPDATMER                              
040911,000910: 
040912,000911: 21,2777           41473                           CS       DKRATE                                
040913,000912: 21,3000           12747                           TCF      UPDATMER                              
040914,000913: 
040915,000914: 21,3001           01760        OCT01760           OCT      01760                                 #  FORCED FIRING BITS MASK
040916,000915: 
040917,000916: 21,3002           01400        OCT01400           OCT      01400                                 #  ROLL FORCED FIRING MASK       ORDER OF
040918,000917: 21,3003           00060        OCT00060           OCT      00060                                 #  PITCH FORCED FIRING MASK      DEFINITION
040919,000918: 21,3004           00300        OCT00300           OCT      00300                                 #  YAW FORCED FIRING MASK        MUST BE
040920,000919:                                                                                                  #                                PRESERVED
040921,000920:                                                                                                  #                              FOR INDEXING
040922,000921: 21,3005           00077        MANROT             OCT      77                                    
040923,000922: 21,3006     5067               OCT16000           =        PRIO16                                #  RATE DAMPING FLAGS MASK
040924,000923: 21,3006           00165        MANTABLE           DEC      .0071111                              
040925,000924: 21,3007           77612                           DEC      -.0071111                             
040926,000925: 21,3010           00722                           DEC      .028444                               
040927,000926: 21,3011           77055                           DEC      -0.028444                             
040928,000927: 21,3012           02215                           DEC      .071111                               
040929,000928: 21,3013           75562                           DEC      -.071111                              
040930,000929: 21,3014           11064                           DEC      .284444                               
040931,000930: 21,3015           66713                           DEC      -.284444                              
040932,000931: 21,3016     4626               =+14MS             =        DEC23                                 
040933,000932: 21,3016           31530        FREEFUNC           CA       RCSFLAGS                              
040934,000933: 21,3017           00006                           EXTEND                                         
040935,000934: 21,3020           74767                           MP       BIT11                                 #  SHIFT RIGHT 4 BITS
040936,000935: 21,3021           55531                           TS       T5TEMP                                
040937,000936: 21,3022           41663                           CS       CH31TEMP                              
040938,000937: 21,3023           71531                           MASK     T5TEMP                                #  A= COMPLEMENT OF NEW CH 31 COMMANDS
040939,000938: 21,3024           51475                           INDEX    WHICHDAP                              
040940,000939: 21,3025           13026                           TCF      +1                                    
040941,000940: 21,3026           13176                           TCF      RHCMINP                               
040942,000941: 
040943,000942: 21,3027           73005        DKRHCIMP           MASK     MANROT                                
040944,000943: 21,3030           03116                           TC       STICKCHK                              
040945,000944: 21,3031           51707                           INDEX    RMANNDX                               
040946,000945: 21,3032           34616                           CAF      200MST6    -1                         
040947,000946: 21,3033           55610                           TS       TAU                                   
040948,000947: 21,3034           51710                           INDEX    PMANNDX                               
040949,000948: 21,3035           34616                           CAF      200MST6    -1                         
040950,000949: 21,3036           55611                           TS       TAU1                                  
040951,000950: 21,3037           55707                           TS       TAUZ                                  
040952,000951: 21,3040           51711                           INDEX    YMANNDX                               
040953,000952: 21,3041           34616                           CAF      200MST6    -1                         
040954,000953: 21,3042           55612                           TS       TAU2                                  
040955,000954: 21,3043           40000                           COM                                            
040956,000955: 21,3044           55710                           TS       TAUY                                  
040957,000956: 
040958,000957: 21,3045           35003        T6PROGM            CAF      ZERO                                  #  FOR MANUAL ROTATIONS
040959,000958: 21,3046           55620                           TS       ERRORX                                
040960,000959: 21,3047           55621                           TS       ERRORY                                
040961,000960: 21,3050           55622                           TS       ERRORZ                                
040962,000961: 21,3051           13740                           TCF      T6PROG                                
040963,000962: 
040964,000963: 
040965,000964: 21,3052           00000        FREETAU            DEC      0          B-14                       
040966,000965: 21,3053           00740                           DEC      480        B-14                       
040967,000966: 21,3054           77037                           DEC      -480       B-14                       
040968,000967: 21,3055           00000                           DEC      0          B-14                       
040969,000968: 
040970,000969: 
040971,000970: 21,3056           02031                           DEC      .0640                                 
040972,000971: 21,3057           02031                           DEC      .0640                                 
040973,000972: 21,3060           06604                           DEC      .2112                                 #  FILTER GAIN FOR TRANSLATION, LEM ON
040974,000973: 21,3061           32703                           DEC      .8400                                 #  FILTER GAIN FOR TRANSLATION 2(ZETA)WN DT
040975,000974: 21,3062           06604                           DEC      .2112                                 #  FILTER GAIN FOR 2 DEGREES/SEC MANEUVERS
040976,000975: 21,3063           02031        GAIN1              DEC      .0640                                 #  KALMAN FILTER GAINS FOR INITIALIZATION
040977,000976: 21,3064           12132                           DEC      .3180                                 #  OF ATTITUDE RATES
040978,000977: 21,3065           13030                           DEC      .3452                                 
040979,000978: 21,3066           14047                           DEC      .3774                                 
040980,000979: 21,3067           15241                           DEC      .4161                                 
040981,000980: 21,3070           16650                           DEC      .4634                                 
040982,000981: 21,3071           20555                           DEC      .5223                                 
040983,000982: 21,3072           23065                           DEC      .5970                                 
040984,000983: 21,3073           26137                           DEC      .6933                                 
040985,000984: 21,3074           32053                           DEC      .8151                                 
040986,000985: 21,3075           35712                           DEC      .9342                                 
040987,000986: 
040988,000987: 21,3076           00032                           DEC      .0016                                 
040989,000988: 21,3077           00032                           DEC      .0016                                 
040990,000989: 21,3100           00435                           DEC      .0174                                 #  FILTER GAIN FOR TRANSLATION, LEM ON
040991,000990: 21,3101           13412                           DEC      .3600                                 #  FILTER GAIN FOR TRANSLATION (WN)(WN)DT
040992,000991: 21,3102           00435                           DEC      .0174                                 #  FILTER GAIN FOR 2 DEGREES/SEC MANEUVERS
040993,000992: 21,3103           00032        GAIN2              DEC      .0016                                 #  SCALED 10
040994,000993: 21,3104           01350                           DEC      .0454                                 
040995,000994: 21,3105           01575                           DEC      .0545                                 
040996,000995: 21,3106           02103                           DEC      .0666                                 
040997,000996: 21,3107           02523                           DEC      .0832                                 
040998,000997: 21,3110           03327                           DEC      .1069                                 
040999,000998: 21,3111           04432                           DEC      .1422                                 
041000,000999: 21,3112           06264                           DEC      .1985                                 
041001,001000: 21,3113           11351                           DEC      .2955                                 
041002,001001: 21,3114           17324                           DEC      .4817                                 
041003,001002: 21,3115           33622                           DEC      .8683                                 
041004,001003: 21,3116           55531        STICKCHK           TS       T5TEMP                                
041005,001004: 21,3117           76214                           MASK     THREE                                 #  INDECES FOR MANUAL ROTATION
041006,001005: 21,3120           55710                           TS       PMANNDX                               
041007,001006: 21,3121           31531                           CA       T5TEMP                                
041008,001007: 21,3122           00006                           EXTEND                                         #  MAN RATE 0   0 RATE (DP)
041009,001008: 21,3123           74765                           MP       QUARTER                               #           +1   +RATE (DP)
041010,001009: 21,3124           55531                           TS       T5TEMP                                #           +2   -RATE (DP)
041011,001010: 21,3125           76214                           MASK     THREE                                 #          (+3)  0 RATE (DP)
041012,001011: 21,3126           55711                           TS       YMANNDX                               
041013,001012: 21,3127           31531                           CA       T5TEMP                                
041014,001013: 21,3130           00006                           EXTEND                                         
041015,001014: 21,3131           74765                           MP       QUARTER                               
041016,001015: 21,3132           55707                           TS       RMANNDX                               
041017,001016: 21,3133           00002                           TC       Q                                     
041018,001017: 
041019,001018: 21,3134           55650        KALUPDT            TS       ATTKALMN                              #  INITIALIZATION OF ATTITUDE RATES USING
041020,001019:                                                                                                  #  KALMAN FILTER TAKES 1.1 SEC
041021,001020: 
041022,001021: 21,3135           32107                           CA       DELTATT                               #  =1SEC - 80MS
041023,001022: 21,3136           61665                           AD       T5TIME                                #  + DELAYS
041024,001023: 21,3137           54030                           TS       TIME5                                 
041025,001024: 21,3140           13143                           TCF      +3                                    
041026,001025: 21,3141           37663                           CAF      DELTATT2                              #  SAFETY PLAY TO ASSURE
041027,001026: 21,3142           54030                           TS       TIME5                                 #  A T5RUPT
041028,001027: 
041029,001028: 
041030,001029: 21,3143           45003        KRESUME2           CS       ZERO                                  #  RESET FOR PHASE1
041031,001030: 21,3144           55513                           TS       T5PHASE                               #  RESUME INTERRUPTED PROGRAM
041032,001031: 21,3145           15336                           TCF      RESUME                                
041033,001032: 

The name of the following function is a guess.

041035,001034: 21,3146           04725        GOFDAI2            TC       IBNKCALL                              
041036,001035: 21,3147           41561                           CADR     FDAIDSP2                              
041037,001036: 
041038,001037: 20,2000                                           SETLOC   DAPS2                                 
041039,001038: 20,2000                                           BANK                                           
041040,001039: 20,3561                                           COUNT*   $$/DAPRC                              
041041,001040: 
041042,001041: 20,3561           44776        FDAIDSP2           CS       BIT4                                  #  RESET FOR FDAIDSP1
041043,001042: 20,3562           71530                           MASK     RCSFLAGS                              
041044,001043: 20,3563           55530                           TS       RCSFLAGS                              
041045,001044: 
041046,001045: 20,3564           40074                           CS       FLAGWRD0                              #  ON - DISPLAY ONE OF THE TOTAL ATTITUDE
041047,001046: 20,3565           74771                           MASK     NEEDLBIT                              #  ERRORS
041048,001047: 20,3566           00006                           EXTEND                                         
041049,001048: 20,3567           13576                           BZF      FDAITOTL                              
041050,001049: 20,3570           00006                           EXTEND                                         
041051,001050: 20,3571           41621                           DCS      ERRORX                                #  OFF - DISPLAY AUTOPILOT FOLLOWING ERROR
041052,001051: 20,3572           53526                           DXCH     AK                                    
041053,001052: 20,3573           41622                           CS       ERRORZ                                
041054,001053: 20,3574           55527                           TS       AK2                                   
041055,001054: 20,3575           15336                           TCF      RESUME                                #  END PHASE 1
041056,001055: 
041057,001056: 
041058,001057: 20,3576           30105        FDAITOTL           CA       FLAGWRD9                              
041059,001058: 20,3577           74774                           MASK     N2217BIT                              
041060,001059: 20,3600           00006                           EXTEND                                         
041061,001060: 20,3601           13644                           BZF      WRTN17                                #  IS N22ORN17 (BIT6 OF FLAGWRD9) = 0
041062,001061:                                                                                                  #  IF SO, GO TO WRTN17
041063,001062: 20,3602           00006        WRTN22             EXTEND                                         #  OTHERWISE, CONTINUE ON TO WRTN22 AND
041064,001063: 20,3603           31301                           DCA      CTHETA                                #  GET SET TO COMPUTE TOTAL ATTITUDE
041065,001064: 20,3604           53543                           DXCH     WTEMP                                 #  ERROR WRT N22 BY PICKING UP THE THREE
041066,001065: 20,3605           31277                           CA       CPHI                                  #  COMPONENTS OF N22
041067,001066: 
041068,001067: 20,3606           00006        GETAKS             EXTEND                                         #  COMPUTE TOTAL ATTITUDE ERROR FOR
041069,001068: 20,3607           20032                           MSU      CDUX                                  #  DISPLAY ON FDAI ERROR NEEDLES
041070,001069: 20,3610           55525                           TS       AK                                    
041071,001070: 20,3611           31542                           CA       WTEMP                                 
041072,001071: 20,3612           00006                           EXTEND                                         
041073,001072: 20,3613           20033                           MSU      CDUY                                  
041074,001073: 20,3614           55531                           TS       T5TEMP                                
041075,001074: 20,3615           00006                           EXTEND                                         
041076,001075: 20,3616           71671                           MP       AMGB1                                 
041077,001076: 20,3617           27525                           ADS      AK                                    
041078,001077: 20,3620           31531                           CA       T5TEMP                                
041079,001078: 20,3621           00006                           EXTEND                                         
041080,001079: 20,3622           71672                           MP       AMGB4                                 
041081,001080: 20,3623           55526                           TS       AK1                                   
041082,001081: 20,3624           31531                           CA       T5TEMP                                
041083,001082: 20,3625           00006                           EXTEND                                         
041084,001083: 20,3626           71674                           MP       AMGB7                                 
041085,001084: 20,3627           55527                           TS       AK2                                   
041086,001085: 20,3630           31543                           CA       WTEMP      +1                         
041087,001086: 20,3631           00006                           EXTEND                                         
041088,001087: 20,3632           20034                           MSU      CDUZ                                  
041089,001088: 20,3633           55531                           TS       T5TEMP                                
041090,001089: 20,3634           00006                           EXTEND                                         
041091,001090: 20,3635           71673                           MP       AMGB5                                 
041092,001091: 20,3636           27526                           ADS      AK1                                   
041093,001092: 20,3637           31531                           CA       T5TEMP                                
041094,001093: 20,3640           00006                           EXTEND                                         
041095,001094: 20,3641           71675                           MP       AMGB8                                 
041096,001095: 20,3642           27527                           ADS      AK2                                   
041097,001096: 20,3643           15336                           TCF      RESUME                                #  END PHASE1 OF RCS DAP
041098,001097: 
041099,001098: 20,3644           00006        WRTN17             EXTEND                                         #  GET SET TO COMPUTE TOTAL ASTRONAUT
041100,001099: 20,3645           31010                           DCA      CPHIX      +1                         #  ATTITUDE ERROR WRT N17 BY PICKING UP
041101,001100: 20,3646           53543                           DXCH     WTEMP                                 #  THE THREE COMPONENTS OF N17
041102,001101: 20,3647           31006                           CA       CPHIX                                 
041103,001102: 20,3650           13606                           TCF      GETAKS                                

End of include-file RCS-CSM_DIGITAL_AUTOPILOT.agc.  Parent file is MAIN.agc