Source Code
These source-code files are part of a reconstructed copy of Comanche 72/3 (AKA Manche72 revision 3),
the final, flown mission release of the Apollo Guidance Computer (AGC) Command Module (CM) software
for Apollo 13.
The starting point was the source code of Comanche 72 (itself previously reconstructed). Comanche 72 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 72 and 72/3. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments. Since no contemporary listings of Comanche 72/3 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
042975,000002: ## Copyright: Public domain.
042976,000003: ## Filename: RCS-CSM_DIGITAL_AUTOPILOT.agc
042977,000004: ## Purpose: A section of Manche72 revision 3.
042978,000005: ## It is part of the reconstructed source code for the final, flown
042979,000006: ## release of the software for the Command Module's (CM) Apollo
042980,000007: ## Guidance Computer (AGC) for Apollo 13. No original listings
042981,000008: ## of this program are available; instead, this file was recreated
042982,000009: ## from a reconstructed copy of Comanche 072. It has been adapted
042983,000010: ## such that the resulting bugger words exactly match those
042984,000011: ## specified for Manche72 revision 3 in NASA drawing 2021153G,
042985,000012: ## which gives relatively high confidence that the reconstruction
042986,000013: ## is correct.
042987,000014: ## Assembler: yaYUL
042988,000015: ## Contact: Ron Burkey <info@sandroid.org>.
042989,000016: ## Website: www.ibiblio.org/apollo/index.html
042990,000017: ## Mod history: 2024-05-19 MAS Created from Comanche 072.
042991,000018:
042992,000019: # T5 INTERRUPT PROGRAM FOR THE RCS-CSM AUTOPILOT
042993,000020:
042994,000021: # START OF T5 INTERRUPT PROGRAM
042995,000022:
042996,000023: 20,3650 BANK 20
042997,000024: 21,2000 SETLOC DAPS3
042998,000025: 21,2000 BANK
042999,000026:
043000,000027: 21,2117 COUNT 21/DAPRC
043001,000028:
043002,000029: 21,2117 E6,1510 EBANK= KMPAC
043003,000030: 21,2117 22016 REDORCS LXCH BANKRUPT # RESTART OF AUTOPILOT COMES HERE
043004,000031: 21,2120 31465 CA T5PHASE # ON A T5 RUPT.
043005,000032: 21,2121 00006 EXTEND
043006,000033: 21,2122 62124 BZMF +2 # IF T5PHASE +0, -0, OR -, RESET TO -
043007,000034: 21,2123 12126 TCF +3 # IF T5PHASE +, LEAVE IT +. DO A FRESHDAP
043008,000035: 21,2124 45033 CS ONE
043009,000036: 21,2125 55465 TS T5PHASE
043010,000037: 21,2126 00006 EXTEND
043011,000038: 21,2127 32133 DCA RCSLOC
043012,000039: 21,2130 53313 DXCH T5LOC # HOOK UP T5RUPT TO AUTOPILOT
043013,000040: 21,2131 12135 TCF RCSATT +1
043014,000041: 21,2132 E6,1510 EBANK= KMPAC
043015,000042: 21,2132 02134 42066 RCSLOC 2CADR RCSATT
043016,000043:
043017,000044: 21,2134 22016 RCSATT LXCH BANKRUPT # SAVE BB
043018,000045: 21,2135 00006 EXTEND # SAVE Q
043019,000046: 21,2136 22012 QXCH QRUPT
043020,000047: 21,2137 35015 CAF BIT15 # BIT15 CHAN31 = 0 IF IMU POWER IS ON AND
043021,000048: 21,2140 00006 EXTEND # S/C CONT SW IS IN CMC (I.E. IF G/C AUTO
043022,000049: 21,2141 02031 RAND CHAN31 # PILOT IS FULLY ENABLED)
043023,000050: 21,2142 00006 EXTEND
043024,000051: 21,2143 12172 BZF SETT5 # IF G/C AUTOPILOT IS FULLY ENABLED,
043025,000052: # GO TO SETT5
043026,000053:
043027,000054: 21,2144 41501 CS RCSFLAGS # IF G/C AUTOPILOT IS NOT FULLY ENABLED,
043028,000055: 21,2145 75016 MASK BIT14
043029,000056: 21,2146 27501 ADS RCSFLAGS # SET NORATE FLAG,
043030,000057: 21,2147 35013 CAF POSMAX
043031,000058: 21,2150 55332 TS HOLDFLAG # SET HOLDFLAG +,
043032,000059: 21,2151 35035 CAF ZERO # ZERO ERRORX, ERRORY, AND ERRORZ,
043033,000060: 21,2152 55567 TS ERRORX
043034,000061: 21,2153 55570 TS ERRORY
043035,000062: 21,2154 55571 TS ERRORZ
043036,000063: 21,2155 35016 CAF BIT14
043037,000064: 21,2156 00006 EXTEND
043038,000065: 21,2157 02031 RAND CHAN31 # AND CHECK FREE FUNCTION (BIT14 CHAN31).
043039,000066: 21,2160 00006 EXTEND
043040,000067: 21,2161 12172 BZF SETT5 # IF IN FREE MODE, GO TO SETT5.
043041,000068:
043042,000069: 21,2162 55465 TS T5PHASE # IF NOT IN FREE MODE,
043043,000070: 21,2163 37676 CAF OCT37766 # SCHEDULE REINITIALIZATION (FRESHDAP)
043044,000071: 21,2164 54030 TS TIME5 # IN 100 MS VIA T5RUPT
043045,000072:
043046,000073: 21,2165 02644 TCR ZEROJET # ZERO JET CHANNELS IN 14 MS VIA ZEROJET
043047,000074:
043048,000075: 21,2166 12362 TCF KMATRIX
043049,000076: 21,2167 37770 DELTATT OCT 37770 # 80MS (TIME5)
043050,000077: 21,2170 37776 DELTATT2 OCT 37776 # 20MS (TIME5)
043051,000078: 21,2171 37634 ONESEK DEC 16284 B-14 # 1 SEC(TIME5)
043052,000079: 21,2172 CHAN5 EQUALS 5
043053,000080: 21,2172 CHAN6 EQUALS 6
043054,000081: 21,2172 7671 PRIO34A = PRIO34
043055,000082:
043056,000083: # CHECK PHASE OF T5 PROGRAM
043057,000084:
043058,000085: # BECAUSE OF THE LENGTH OF THE T5 PROGRAM,IT HAS BEEN DIVIDED INTO
043059,000086: # THREE PARTS, T5PHASE1, T5PHASE2, AND THE JET SELECTION LOGIC,
043060,000087: # TO ALLOW FOR THE EXECUTION OF OTHER
043061,000088: # INTERRUPTS. T5PHASE IS ALSO USED IN THE INITIALIZATION OF THE AUTOPILOT
043062,000089: # VARIABLES AT TURN ON.
043063,000090:
043064,000091: # THE CODING OF T5PHASE IS...
043065,000092:
043066,000093: # + = INITIALIZE T5 RCS-CSM AUTOPILOT
043067,000094: # T5PHASE = +0 = PHASE2 OF THE T5 PROGRAM
043068,000095: # - = RESTART DAP
043069,000096: # -0 = PHASE1 OF THE T5 PROGRAM
043070,000097:
043071,000098: 21,2172 11465 SETT5 CCS T5PHASE
043072,000099: 21,2173 12556 TCF FRESHDAP # TURN ON AUTOPILOT
043073,000100: 21,2174 12673 TCF T5PHASE2 # BRANCH TO PHASE2 OF PROGRAM
043074,000101: 21,2175 12560 TCF REDAP # RESTART AUTOPILOT
043075,000102:
043076,000103: 21,2176 55465 TS T5PHASE # PHASE 1 RESET FOR PHASE 2
043077,000104: 21,2177 30030 CA TIME5
043078,000105: 21,2200 55634 TS T5TIME # USED IN COMPENSATING FOR DELAYS IN T5
043079,000106: 21,2201 32170 CAF DELTATT2 # RESET FOR T5RUPT IN 20MS FOR PHASE2
043080,000107: 21,2202 54030 TS TIME5 # OF PROGRAM
043081,000108:
043082,000109: # IMU STATUS CHECK
043083,000110:
043084,000111: 21,2203 41321 CS IMODES33 # CHECK IMU STATUS
043085,000112: 21,2204 75026 MASK BIT6 # BIT6 = 0 IMU OK
043086,000113: 21,2205 10000 CCS A # BIT6 = 1 NO IMU
043087,000114: 21,2206 12222 TCF RATEFILT
043088,000115: 21,2207 41501 FREECHK CS RCSFLAGS # BIT14 INDICATES THAT RATES HAVE NOT BEEN
043089,000116: 21,2210 75016 MASK BIT14 # INITIALIZED
043090,000117: 21,2211 27501 ADS RCSFLAGS
043091,000118: 21,2212 35016 CAF BIT14 # NO ATTITUDE REFERENCE
043092,000119: 21,2213 55332 TS HOLDFLAG # STOP ANY AUTOMATIC STEERING AND PREPARE
043093,000120: # TO PICK UP CDU ANGLES UPON RESUMPTION OF
043094,000121: # ATTITUDE HOLD
043095,000122: 21,2214 00006 EXTEND
043096,000123: 21,2215 02031 RAND CHAN31 # CHECK FOR FREE MODE
043097,000124: 21,2216 00006 EXTEND
043098,000125: 21,2217 12431 BZF KRESUME1 # IN FREE MODE PROVIDE FREE CONTROL ONLY
043099,000126: 21,2220 12546 TCF REINIT # .....TILT...............................
043100,000127: 21,2221 00030 BITS4,5 OCT 30
043101,000128:
043102,000129: 21,2222 31501 RATEFILT CA RCSFLAGS # SEE IF RATEFILTER HAS BEEN INITIALIZED
043103,000130: 21,2223 75016 MASK BIT14
043104,000131: 21,2224 00006 EXTEND # IF SO, PROCEED WITH RATE DERIVATION
043105,000132: 21,2225 12227 BZF +2
043106,000133: 21,2226 12362 TCF KMATRIX # IF NOT, SKIP RATE DERIVATION
043107,000134:
043108,000135: # RATE FILTER TIMING = 7.72 MS
043109,000136:
043110,000137: # RATE FILTER EQUATIONS
043111,000138:
043112,000139:
043113,000140: # DRHO = DELRHO - (.1)ADOT + (1 - GAIN1)DRHO
043114,000141: # -1
043115,000142:
043116,000143: # ADOT = ADOT + GAIN2 DRHO + KMJ DFT
043117,000144: # -1
043118,000145: # - * - -
043119,000146: # WHERE DELRHO = AMGB (CDU - CDU )
043120,000147: # -1
043121,000148:
043122,000149: 21,2227 35032 CAF TWO
043123,000150: 21,2230 55506 DRHOLOOP TS SPNDX
043124,000151: 21,2231 60000 DOUBLE
043125,000152: 21,2232 55507 TS DPNDX
043126,000153: 21,2233 51507 INDEX DPNDX
043127,000154: 21,2234 41552 CS DRHO # DRHO SCALED 180 DEGS
043128,000155: 21,2235 00006 EXTEND
043129,000156: 21,2236 51617 INDEX ATTKALMN # PICK UP DESIRED FILTER GAIN
043130,000157: 21,2237 73111 MP GAIN1
043131,000158: 21,2240 51507 INDEX DPNDX
043132,000159: 21,2241 21553 DAS DRHO # (1 -.064) DRHO
043133,000160: 21,2242 00006 EXTEND
043134,000161: 21,2243 51507 INDEX DPNDX
043135,000162: 21,2244 41534 DCS ADOT
043136,000163: 21,2245 53511 DXCH KMPAC # -(.1)ADOT
043137,000164: 21,2246 35017 CA QUARTER
043138,000165: 21,2247 02054 TC SMALLMP
043139,000166: 21,2250 53511 DXCH KMPAC
043140,000167: 21,2251 51507 INDEX DPNDX
043141,000168: 21,2252 21553 DAS DRHO
043142,000169: 21,2253 11506 CCS SPNDX
043143,000170: 21,2254 12230 TCF DRHOLOOP
043144,000171:
043145,000172: 21,2255 30032 CA CDUX # MEASURED BODY RATES--
043146,000173: 21,2256 57635 XCH RHO
043147,000174: 21,2257 00006 EXTEND
043148,000175: 21,2260 21635 MSU RHO # - * - -
043149,000176: 21,2261 40000 COM # DELRHO = AMGB (CDU - CDU )
043150,000177: # -1
043151,000178: 21,2262 22007 ZL
043152,000179: 21,2263 53516 DXCH DELTEMPX
043153,000180: 21,2264 30033 CA CDUY
043154,000181: 21,2265 57636 XCH RHO1
043155,000182: 21,2266 00006 EXTEND
043156,000183: 21,2267 21636 MSU RHO1
043157,000184: 21,2270 40000 COM
043158,000185: 21,2271 55502 TS T5TEMP # (CDUY - RHO1) SCALED 90 DEGS
043159,000186: 21,2272 00006 EXTEND
043160,000187: 21,2273 71640 MP AMGB1
043161,000188: 21,2274 21516 DAS DELTEMPX # DELTEMPX = (CDUX-RHO) + AMGB1(CDUY-RHO1)
043162,000189: # MUST BE DOUBLE PRECISION OR WILL LOSE
043163,000190: # PULSES
043164,000191: 21,2275 31641 CA AMGB4
043165,000192: 21,2276 00006 EXTEND
043166,000193: 21,2277 71502 MP T5TEMP
043167,000194: 21,2300 53520 DXCH DELTEMPY
043168,000195: 21,2301 31643 CA AMGB7
043169,000196: 21,2302 00006 EXTEND
043170,000197: 21,2303 71502 MP T5TEMP
043171,000198: 21,2304 53522 DXCH DELTEMPZ
043172,000199: 21,2305 30034 CA CDUZ
043173,000200: 21,2306 57637 XCH RHO2
043174,000201: 21,2307 00006 EXTEND
043175,000202: 21,2310 21637 MSU RHO2
043176,000203: 21,2311 40000 COM
043177,000204: 21,2312 55502 TS T5TEMP # (CDUZ - RHO2) SCALED 90 DEGS
043178,000205: 21,2313 00006 EXTEND
043179,000206: 21,2314 71642 MP AMGB5
043180,000207: 21,2315 21520 DAS DELTEMPY # DELTEMPY = AMGB4(CDUY-RHO1)
043181,000208: # + AMGB5(CDUZ-RHO2)
043182,000209: 21,2316 31644 CA AMGB8
043183,000210: 21,2317 00006 EXTEND
043184,000211:
043185,000212: 21,2320 71502 MP T5TEMP
043186,000213: 21,2321 21522 DAS DELTEMPZ # DELTEMPZ = AMGB7(CDUY-RHO1)
043187,000214: # + AMGB8(CDUZ-RHO2)
043188,000215: 21,2322 35032 CAF TWO
043189,000216: 21,2323 55506 ADOTLOOP TS SPNDX
043190,000217: 21,2324 60000 DOUBLE
043191,000218: 21,2325 55507 TS DPNDX
043192,000219: 21,2326 00006 EXTEND
043193,000220: 21,2327 51507 INDEX DPNDX
043194,000221: 21,2330 31516 DCA DELTEMPX
043195,000222: 21,2331 51507 INDEX DPNDX
043196,000223: 21,2332 21553 DAS DRHO
043197,000224: 21,2333 00006 EXTEND
043198,000225: 21,2334 51507 INDEX DPNDX
043199,000226: 21,2335 31516 DCA DELTEMPX
043200,000227: 21,2336 51507 INDEX DPNDX
043201,000228: 21,2337 21542 DAS MERRORX
043202,000229: 21,2340 51507 INDEX DPNDX
043203,000230: 21,2341 31552 CA DRHO
043204,000231: 21,2342 60000 DOUBLE # N.B.
043205,000232: 21,2343 60000 DOUBLE # N.B.
043206,000233: 21,2344 00006 EXTEND
043207,000234: 21,2345 51617 INDEX ATTKALMN # PICK UP DESIRED FILTER GAINS
043208,000235: 21,2346 73127 MP GAIN2
043209,000236: 21,2347 51507 INDEX DPNDX # ADOT + (.16)(.1)DRHO
043210,000237: 21,2350 21534 DAS ADOT # -1
043211,000238: 21,2351 51506 INDEX SPNDX # S/C TORQUE TO INERTIA RATIO
043212,000239: 21,2352 31620 CA KMJ # SCALED (450)(1600)/(57.3)(16384)=1/1.3
043213,000240: 21,2353 00006 EXTEND
043214,000241: 21,2354 51506 INDEX SPNDX
043215,000242: 21,2355 71547 MP DFT
043216,000243: 21,2356 51507 INDEX DPNDX
043217,000244: 21,2357 21534 DAS ADOT # KMJ(DFT)
043218,000245: 21,2360 11506 CCS SPNDX
043219,000246: 21,2361 12323 TCF ADOTLOOP # END CALCULATION OF VEHICLE RATES
043220,000247: 21,2362 31560 KMATRIX CA ATTSEC
043221,000248: 21,2363 75042 MASK LOW4
043222,000249: 21,2364 10000 CCS A
043223,000250: 21,2365 12373 TCF TENTHSEK
043224,000251: 21,2366 37671 CAF PRIO34 # CALL FOR 1 SEC UPDATE OF TRANSFORMATION
043225,000252: 21,2367 05150 TC NOVAC # MATRIX FROM GIMBAL AXES TO BODY AXES
043226,000253: 21,2370 E6,1510 EBANK= KMPAC
043227,000254: 21,2370 03447 44066 2CADR AMBGUPDT
043228,000255:
043229,000256: 21,2372 34334 CAF NINE
043230,000257:
043231,000258: 21,2373 55560 TENTHSEK TS ATTSEC
043232,000259:
043233,000260: # WHEN AUTOMATIC MANEUVERS ARE BEING PERFORMED, THE FOLLOWING ANGLE ADDITION MUST BE MADE TO PROVIDE A SMOOTH
043234,000261: # SEQUENCE OF ANGULAR COMMANDS TO THE AUTOPILOT--
043235,000262:
043236,000263: # CDUXD = CDUXD + DELCDUX (DOUBLE PRECISION)
043237,000264: # CDUYD = CDUYD + DELCDUY (DOUBLE PRECISION)
043238,000265: # CDUZD = CDUZD + DELCDUZ (DOUBLE PRECISION)
043239,000266:
043240,000267: # THE STEERING PROGRAMS-
043241,000268: # 1) ATTITUDE MANEUVER ROUTINE
043242,000269: # 2) LEM TRACKING
043243,000270:
043244,000271: # SHOULD GENERATE THE DESIRED ANGLES (CDUXD, CDUYD, CDUZD) AS WELL AS THE INCREMENTAL ANGLES (DELCDUX, DELCDUY,
043245,000272: # DELCDUZ) SO THAT THE GIMBAL ANGLE COMMANDS CAN BE INTERPOLATED BETWEEN UPDATES.
043246,000273:
043247,000274: # HOLDFLAG CODING-
043248,000275:
043249,000276: # + = GRAB PRESENT CDU ANGLES AND STORE IN THETADX, THETADY, THETADZ
043250,000277: # AND PERFORM ATTITUDE HOLD ABOUT THESE ANGLES
043251,000278: # ALSO IGNORE AUTOMATIC STEERING
043252,000279: # SET = + BY
043253,000280: # 1) INITIALIZATION PHASE OF AUTOPILOT
043254,000281: # 2) OCCURANCE OF RHC COMMANDS
043255,000282: # 3) FREE MODE
043256,000283: # 4) SWITCH OVER TO ATTITUDE HOLD FROM AUTO
043257,000284: # WHILE DOING AUTOMATIC STEERING (IN THIS CASE
043258,000285: # HOLDFLAG IS NOT ACTUALLY SET TO +, BUT THE LOGIC
043259,000286: # FUNCTIONS AS IF IT WERE.)
043260,000287: # 5) S/C CONTROL SWITCH IN SCS
043261,000288: # 6) IMU POWER OFF
043262,000289: # +0 = IN ATTITUDE HOLD ABOUT A PREVIOUSLY ESTABLISHED REFERENCE
043263,000290: # - = PERFORMING AUTOMATIC MANEUVER
043264,000291: # -0 = NOT USED AT PRESENT
043265,000292:
043266,000293: # NOTE THAT THIS FLAG MUST BE SET = - BY THE STEERING PROGRAM IF IT IS TO COMMAND THE AUTOPILOT.
043267,000294: # SINCE ASTRONAUT ACTION MAY CHANGE THE HOLDFLAG SETTING, IT SHOULD BE MONITORED BY THE STEERING PROGRAM TO
043268,000295: # DETERMINE IF THE AUTOMATIC SEQUENCE HAS BEEN INTERRUPTED AND IF SO, TAKE APPROPRIATE ACTION.
043269,000296:
043270,000297: 21,2374 41332 CS HOLDFLAG
043271,000298: 21,2375 00006 EXTEND
043272,000299: 21,2376 62423 BZMF DACNDLS # IF HOLDFLAG +0,-0,+, BYPASS AUTOMATIC
043273,000300: # COMMANDS
043274,000301: 21,2377 35032 DCDUINCR CAF TWO
043275,000302: 21,2400 55506 DELOOP TS SPNDX
043276,000303: 21,2401 60000 DOUBLE
043277,000304: 21,2402 55507 TS DPNDX
043278,000305: 21,2403 00006 EXTEND
043279,000306: 21,2404 50000 INDEX A
043280,000307: 21,2405 31647 DCA CDUXD
043281,000308: 21,2406 53511 DXCH KMPAC
043282,000309: 21,2407 00006 EXTEND
043283,000310: 21,2410 51507 INDEX DPNDX
043284,000311: 21,2411 31576 DCA DELCDUX
043285,000312: 21,2412 02066 TC DPADD
043286,000313: 21,2413 00006 EXTEND
043287,000314: 21,2414 31511 DCA KMPAC
043288,000315: 21,2415 51506 INDEX SPNDX
043289,000316: 21,2416 55572 TS THETADX
043290,000317: 21,2417 51507 INDEX DPNDX
043291,000318: 21,2420 53647 DXCH CDUXD
043292,000319: 21,2421 11506 CCS SPNDX
043293,000320: 21,2422 12400 TCF DELOOP
043294,000321:
043295,000322: # RCS-CSM AUTOPILOT ATTITUDE ERROR DISPLAY
043296,000323:
043297,000324: # THREE TYPES OF ATTITUDE ERRORS MAY BE DISPLAYED ON THE FDAI-
043298,000325:
043299,000326: # MODE 1) AUTOPILOT FOLLOWING ERRORS SELECTED BY V61E
043300,000327: # GENERATED INTERNALLY BY THE AUTOPILOT
043301,000328:
043302,000329: # MODE 2) TOTAL ATTITUDE ERRORS SELECTED BY V62E
043303,000330: # WITH RESPECT TO THE CONTENTS OF N22
043304,000331:
043305,000332: # MODE 3) TOTAL ASTRONAUT ATTITUDE ERRORS SELECTED BY V63E
043306,000333: # WITH RESPECT TO THE CONTENTS OF N17
043307,000334:
043308,000335: # MODE 1 IS PROVIDED AS A MONITOR OF THE RCS DAP AND ITS ABILITY TO TRACK AUTOMATIC STEERING COMMANDS. IN THIS
043309,000336: # MODE THE ATTITUDE ERRORS WILL BE ZEROED WHEN THE CMC MODE SWITCH IS IN FREE
043310,000337:
043311,000338: # MODE 2 IS PROVIDED TO ASSIST THE CREW IN MANUALLY MANEUVERING THE S/C TO THE ATTITUDE (GIMBAL ANGLES) SPECIFIED
043312,000339: # IN N22. THE ATTITUDE ERRORS WRT THESE ANGLES AND THE CURRENT CDU ANGLES ARE RESOLVED INTO S/C CONTROL AXES
043313,000340: # AS A FLY-TO INDICATOR.
043314,000341:
043315,000342: # MODE 3 IS PROVIDED TO ASSIST THE CREW IN MANUALLY MANEUVERING THE S/C TO THE ATTITUDE (GIMBAL ANGLES) SPECIFIED
043316,000343: # IN N17. THE ATTITUDE ERRORS WRT THESE ANGLES AND THE CURRENT CDU ANGLES ARE RESOLVED INTO S/C CONTROL AXES
043317,000344: # AS A FLY-TO INDICATOR.
043318,000345:
043319,000346: # V60 IS PROVIDED TO LOAD N17 WITH A SNAPSHOT OF THE CURRENT CDU ANGLES, THUS SYNCHRONIZING THE MODE 3 DISPLAY
043320,000347: # WITH THE CURRENT S/C ATTITUDE. THIS VERB MAY BE USED AT ANY TIME.
043321,000348:
043322,000349: # THESE DISPLAYS WILL BE AVAILIABLE IN ANY MODE (AUTO, HOLD, FREE, G+N, OR SCS) ONCE THE RCS DAP HAS BEEN
043323,000350: # INITIATED VIA V46E. MODE 1, HOWEVER, WILL BE MEANINGFUL ONLY IN G+N AUTO OR HOLD. THE CREW MAY PRESET (VIA
043324,000351: # V25N17) AN ATTITUDE REFERENCE (DESIRED GIMBAL ANGLES) INTO N17 AT ANY TIME.
043325,000352:
043326,000353: 21,2423 41501 DACNDLS CS RCSFLAGS # ALTERNATE BETWEEN FDAIDSP1 AND FDAIDSP2
043327,000354: 21,2424 75030 MASK BIT4
043328,000355: 21,2425 00006 EXTEND
043329,000356: 21,2426 13172 BZF FDAIDSP2
043330,000357:
043331,000358: 21,2427 27501 FDAIDSP1 ADS RCSFLAGS
043332,000359: 21,2430 02432 TC NEEDLER
043333,000360: 21,2431 15347 KRESUME1 TCF RESUME # END PHASE 1
043334,000361:
043335,000362: # FDAI ATTITUDE ERROR DISPLAY SUBROUTINE
043336,000363:
043337,000364: # PROGRAM DESCRIPTION: D. KEENE 5/24/67
043338,000365:
043339,000366: # THIS SUBROUTINE IS USED TO DISPLAY ATTITUDE ERRORS ON THE FDAI VIA THE DIGITAL TO ANALOG CONVERTERS (DACS)
043340,000367: # IN THE CDUS. CARE IS TAKEN TO METER OUT THE APPROPRIATE NUMBER OF PULSES TO THE IMU ERROR COUNTERS AND PREVENT
043341,000368: # OVERFLOW, TO CONTROL THE RELAY SEQUENCING, AND TO AVOID INTERFERENCE WITH THE COARSE ALIGN LOOP WHICH ALSO USES
043342,000369: # THE DACS.
043343,000370:
043344,000371: # CALLING SEQUENCE:
043345,000372:
043346,000373: # DURING THE INITIALIZATION SECTION OF THE USER'S PROGRAM, BIT3 OF RCSFLAGS SHOULD BE SET TO INITIATE THE
043347,000374: # TURN-ON SEQUENCE WITHIN THE NEEDLES PROGRAM:
043348,000375:
043349,000376: # CS RCSFLAGS IN EBANK6
043350,000377: # MASK BIT3
043351,000378: # ADS RCSFLAGS
043352,000379:
043353,000380: # THEREAFTER, THE ATTITUDE ERRORS GENERATED BY THE USER SHOULD BE TRANSFERED TO THE FOLLOWING LOCATIONS IN EBANK6:
043354,000381:
043355,000382: # AK SCALED 180 DEGREES NOTE: THESE LOCATIONS ARE SUBJECT
043356,000383: # AK1 SCALED 180 DEGREES TO CHANGE
043357,000384: # AK2 SCALED 180 DEGREES
043358,000385:
043359,000386: # FULL SCALED DEFLECTION CORRESPONDS TO 16 7/8 DEGREES OF ATTITUDE ERROR
043360,000387: # (= 384 BITS IN IMU ERROR COUNTER)
043361,000388:
043362,000389: # A CALL TO NEEDLER WILL THEN UPDATE THE DISPLAY:
043363,000390:
043364,000391: # INHINT
043365,000392: # TC IBNKCALL NOTE: EBANK SHOULD BE SET TO E6
043366,000393: # CADR NEEDLER
043367,000394: # RELINT
043368,000395:
043369,000396: # THIS PROCESS SHOULD BE REPEATED EACH TIME THE ERRORS ARE UPDATED. AT LEAST 3 PASSES THRU THE PROGRAM ARE
043370,000397: # REQUIRED BEFORE ANYTHING IS ACTUALLY DISPLAYED ON THE ERROR METERS.
043371,000398: # NOTE: EACH CALL TO NEEDLER MUST BE SEPARATED BY AT LEAST 50MS TO ASSURE PROPER RELAY SEQUENCING.
043372,000399:
043373,000400: # ERASABLE USED:
043374,000401: # AK CDUXCMD
043375,000402: # AK1 CDUYCMD
043376,000403: # AK2 CDUZCMD
043377,000404: # EDRIVEX A,L,Q
043378,000405: # EDRIVEY T5TEMP
043379,000406: # EDRIVEZ SPNDX
043380,000407:
043381,000408: # SWITCHES: RCSFLAGS BITS 3,2
043382,000409:
043383,000410: # I/O CHANNELS: CHAN12 BIT 4 (COARSE ALIGN - READ ONLY)
043384,000411: # CHAN12 BIT 6 (IMU ERROR COUNTER ENABLE)
043385,000412: # CHAN14 BIT 13,14,15 (DAC ACTIVITY)
043386,000413:
043387,000414: # SIGN CONVENTION< AK = THETAC - THETA
043388,000415: # WHERE THETAC = COMMAND ANGLE
043389,000416: # THETA = PRESENT ANGLE
043390,000417:
043391,000418: 21,2432 35030 NEEDLER CAF BIT4 # CHECK FOR COARSE ALIGN ENABLE
043392,000419: 21,2433 00006 EXTEND # IF IN COARSE ALIGN DO NOT USE IMU
043393,000420: 21,2434 02012 RAND CHAN12 # ERROR COUNTERS. DONT USE NEEDLES
043394,000421: 21,2435 00006 EXTEND
043395,000422: 21,2436 12443 BZF NEEDLER1
043396,000423: 21,2437 41501 CS RCSFLAGS # SET BIT3 FOR INITIALIZATION PASS
043397,000424: 21,2440 75031 MASK BIT3
043398,000425: 21,2441 27501 ADS RCSFLAGS
043399,000426: 21,2442 00002 TC Q
043400,000427:
043401,000428: 21,2443 31501 NEEDLER1 CA RCSFLAGS
043402,000429: 21,2444 76211 MASK SIX
043403,000430: 21,2445 00006 EXTEND
043404,000431: 21,2446 12503 BZF NEEDLES3
043405,000432: 21,2447 75031 MASK BIT3
043406,000433: 21,2450 00006 EXTEND
043407,000434: 21,2451 12474 BZF NEEDLER2 # BIT3 = 0, BIT2 = 1
043408,000435:
043409,000436: 21,2452 45026 CS BIT6 # FIRST PASS BIT3 = 1
043410,000437: 21,2453 00006 EXTEND # DISABLE IMU ERROR COUNTER TO ZERO DACS
043411,000438: 21,2454 03012 WAND CHAN12 # MUST WAIT AT LEAST 60 MS BEFORE
043412,000439: 21,2455 45035 NEEDLE11 CS ZERO # ENABLING COUNTERS.
043413,000440: 21,2456 55476 TS AK # ZERO THE INPUTS ON FIRST PASS
043414,000441: 21,2457 55477 TS AK1
043415,000442: 21,2460 55500 TS AK2
043416,000443: 21,2461 55503 TS EDRIVEX # ZERO THE DISPLAY REGISTERS
043417,000444: 21,2462 55504 TS EDRIVEY
043418,000445: 21,2463 55505 TS EDRIVEZ
043419,000446: 21,2464 54050 TS CDUXCMD # ZERO THE OUT COUNTERS
043420,000447: 21,2465 54051 TS CDUYCMD
043421,000448: 21,2466 54052 TS CDUZCMD
043422,000449: 21,2467 46211 CS SIX # RESET RCSFLAGS FOR PASS2
043423,000450: 21,2470 71501 MASK RCSFLAGS
043424,000451: 21,2471 65032 AD BIT2
043425,000452: 21,2472 55501 TS RCSFLAGS
043426,000453: 21,2473 00002 TC Q # END PASS1
043427,000454:
043428,000455: 21,2474 35026 NEEDLER2 CAF BIT6 # ENABLE IMU ERROR COUNTERS
043429,000456: 21,2475 00006 EXTEND
043430,000457: 21,2476 05012 WOR CHAN12
043431,000458: 21,2477 46211 CS SIX # RESET RCSFLAGS TO DISPLAY ATTITUDE
043432,000459: 21,2500 71501 MASK RCSFLAGS # ERRORS WAIT AT LEAST 4 MS FOR
043433,000460: 21,2501 55501 TS RCSFLAGS # RELAY CLOSURE
043434,000461: 21,2502 00002 TC Q
043435,000462:
043436,000463: 21,2503 35026 NEEDLES3 CAF BIT6 # CHECK TO SEE IF IMU ERROR COUNTER
043437,000464: 21,2504 00006 EXTEND # IS ENABLED
043438,000465: 21,2505 02012 RAND CHAN12
043439,000466: 21,2506 00006 EXTEND # IF NOT RECYCLE NEEDLES
043440,000467: 21,2507 12437 BZF NEEDLER +5
043441,000468:
043442,000469: 21,2510 35032 NEEDLES CAF TWO
043443,000470: 21,2511 55506 DACLOOP TS SPNDX
043444,000471: 21,2512 45017 CS QUARTER
043445,000472: 21,2513 00006 EXTEND
043446,000473: 21,2514 51506 INDEX SPNDX
043447,000474: 21,2515 71476 MP AK
043448,000475: 21,2516 54001 TS L
043449,000476: 21,2517 10000 CCS A
043450,000477: 21,2520 32554 CA DACLIMIT
043451,000478: 21,2521 12523 TCF +2
043452,000479: 21,2522 42554 CS DACLIMIT
043453,000480: 21,2523 60001 AD L
043454,000481: 21,2524 55502 TS T5TEMP # OVFLO CHK
043455,000482: 21,2525 12531 TCF +4
043456,000483: 21,2526 50000 INDEX A # ON OVERFLOW LIMIT OUTPUT TO +-384
043457,000484: 21,2527 32554 CAF DACLIMIT
043458,000485: 21,2530 54001 TS L
043459,000486: 21,2531 51506 INDEX SPNDX
043460,000487: 21,2532 41503 CS EDRIVEX # CURRENT VALUE OF DAC
043461,000488: 21,2533 60001 AD L
043462,000489: 21,2534 51506 INDEX SPNDX
043463,000490: 21,2535 26050 ADS CDUXCMD
043464,000491: 21,2536 51506 INDEX SPNDX
043465,000492: 21,2537 23503 LXCH EDRIVEX
043466,000493: 21,2540 11506 CCS SPNDX
043467,000494: 21,2541 12511 TCF DACLOOP
043468,000495: 21,2542 37707 CAF 13,14,15
043469,000496: 21,2543 00006 EXTEND
043470,000497: 21,2544 05014 WOR CHAN14 # SET DAC ACTIVITY BITS
043471,000498: 21,2545 00002 TC Q
043472,000499:
043473,000500: 21,2546 32552 REINIT CAF DELAY200 # ........TILT LOGIC
043474,000501: 21,2547 54030 TS TIME5 # REINITIALIZE DAP IN 200MS
043475,000502: 21,2550 55465 TS T5PHASE
043476,000503: 21,2551 15347 TCF RESUME
043477,000504: 21,2552 37754 DELAY200 DEC 16364 B-14 # 200MS
043478,000505:
043479,000506: 21,2553 77177 DEC -384 B-14
043480,000507:
043481,000508: 21,2554 37200 DACLIMIT DEC 16000 B-14
043482,000509: 21,2555 00600 DEC 384 B-14
043483,000510:
043484,000511: # INITIALIZATION PROGRAM FOR RCS-CSM AUTOPILOT
043485,000512:
043486,000513: # THE FOLLOWING QUANTITIES WILL BE ZEROED AND SHOULD APPEAR IN CONSECUTIVE LOCATIONS IN MEMORY AFTER WBODY
043487,000514:
043488,000515: # WBODY (+1) DFT TAU2
043489,000516: # WBODY1 (+1) DFT1 BIAS
043490,000517: # WBODY2 (+1) DFT2 BIAS1
043491,000518: # ADOT (+1) DRHO (+1) BIAS2
043492,000519: # ADOT1 (+1) DRHO1 (+1) ERRORX
043493,000520: # ADOT2 (+1) DRHO2 (+1) ERRORY
043494,000521: # MERRORX (+1) ATTSEC ERRORZ
043495,000522: # MERRORY (+1) TAU
043496,000523: # MERRORZ (+1) TAU1
043497,000524:
043498,000525: 21,2556 35033 FRESHDAP CAF ONE # RESET HOLDFLAG TO STOP AUTOMATIC
043499,000526: 21,2557 55332 TS HOLDFLAG # STEERING AND PREPARE TO PICK UP AN
043500,000527: # ATTITUDE HOLD REFERENCE
043501,000528:
043502,000529: 21,2560 04754 REDAP TC IBNKCALL # DECODE DAPDATR1, DAPDATR2 FOR DEADBANDS
043503,000530: 21,2561 40366 CADR S41.2 # RATES, QUADFAILS, QUAD MANAGEMENT
043504,000531:
043505,000532: 21,2562 04754 TC IBNKCALL # DECODE IXX, IAVG AND CONVERT
043506,000533: 21,2563 40517 CADR S40.14 # TO AUTOPILOT GAINS
043507,000534:
043508,000535: 21,2564 32635 CAF NO.T5VAR # NO. LOCATIONS TO BE ZEROED MINUS ONE
043509,000536: 21,2565 55506 ZEROT5 TS SPNDX # ZERO ALL NECESSARY ERASABLE REGISTERS
043510,000537: 21,2566 35035 CAF ZERO
043511,000538: 21,2567 51506 INDEX SPNDX
043512,000539: 21,2570 55525 TS WBODY
043513,000540: 21,2571 11506 CCS SPNDX
043514,000541: 21,2572 12565 TCF ZEROT5
043515,000542: 21,2573 02644 TCR ZEROJET
043516,000543:
043517,000544: 21,2574 45035 CS ZERO
043518,000545: 21,2575 55633 TS CHANTEMP # INITIALIZE MINIMUM IMPULSE CONTROL
043519,000546:
043520,000547: 21,2576 55632 TS CH31TEMP # INITIALIZE RHC POSITION MEMORY FOR
043521,000548: # MANUAL RATE MODES
043522,000549:
043523,000550: 21,2577 32636 CAF =.24
043524,000551: 21,2600 55654 TS SLOPE # INITIALIZE SWITCHING LOGIC SLOPE
043525,000552:
043526,000553: 21,2601 35031 CAF FOUR
043527,000554: 21,2602 55634 TS T5TIME # PHASE 0 RESETS FOR PHASE 2 INTERRUPT IN
043528,000555: # 60 MS. PHASE 2 RESETS FOR PHASE 1 RUPT
043529,000556: # IN (80MS - T5TIME(40MS)). THEREFORE
043530,000557: # PHASE 1 (RATEFILTER) BEGINS CYCLING 100
043531,000558: # MS FROM NOW AND EVERY 100MS THEREAFTER
043532,000559:
043533,000560: 21,2603 35040 CAF ELEVEN
043534,000561: 21,2604 55617 TS ATTKALMN # RESET TO PICK UP KALMAN FILTER GAINS
043535,000562: # TO INITIALIZE THE S/C ANGULAR RATES
043536,000563: 21,2605 30032 CA CDUX
043537,000564: 21,2606 55635 TS RHO
043538,000565: 21,2607 30033 CA CDUY
043539,000566: 21,2610 55636 TS RHO1
043540,000567: 21,2611 30034 CA CDUZ
043541,000568: 21,2612 55637 TS RHO2
043542,000569: 21,2613 35035 CAF ZERO # RESET AUTOPILOT TO BEGIN EXECUTING
043543,000570: 21,2614 55465 TS T5PHASE # PHASE2 OF PROGRAM
043544,000571:
043545,000572: 21,2615 41321 CS IMODES33 # CHECK IMU STATUS
043546,000573: 21,2616 75026 MASK BIT6 # IF BIT6 = 0 IMU IN FINE ALIGN
043547,000574: 21,2617 10000 CCS A # IF BIT6 = 1 IMU NOT READY
043548,000575: 21,2620 12624 TCF IMUAOK
043549,000576: 21,2621 55617 TS ATTKALMN # CANNOT USE IMU
043550,000577: 21,2622 32640 CAF RCSINITB # PROVIDE FREE CONTROL ONLY
043551,000578: 21,2623 12631 TCF RCSSWIT # DONT START UP RATE FILTER
043552,000579: # SIGNAL NO RATE FILTER
043553,000580:
043554,000581: 21,2624 37671 IMUAOK CAF PRIO34 # START MATRIX INITIALIZATION
043555,000582: 21,2625 05150 TC NOVAC # BYPASS IF IMU NOT IN FINE ALIGN
043556,000583: 21,2626 E6,1510 EBANK= KMPAC
043557,000584: 21,2626 03447 44066 2CADR AMBGUPDT
043558,000585:
043559,000586: 21,2630 32637 CAF RCSINIT # CLEAR BIT14 -ASSUME WE HAVE A GOOD IMU
043560,000587: 21,2631 55501 RCSSWIT TS RCSFLAGS # CLEAR BIT1 -INITIALIZE T6 PROGRAM
043561,000588: # SET BIT3 -INITIALIZE NEEDLES
043562,000589: # CLEAR BIT4 -RESET FOR FDAIDSP1
043563,000590: 21,2632 32641 CAF T5WAIT60 # NEXT T5RUPT 60 MS FROM NOW TO ALLOW IMU
043564,000591: # ERROR COUNTER TO ZERO.
043565,000592: # (MINIMUM DELAY = 15 MS)
043566,000593: 21,2633 54030 TS TIME5 # SINCE ATTKALMN IS +11, PROGRAM WILL THEN
043567,000594: 21,2634 05347 TC RESUME # PICK UP THE KALMAN FILTER GAINS. RATE
043568,000595: # FILTER WILL BEGIN OPERATING ZOOMS FROM
043569,000596: # NOW
043570,000597:
043571,000598: # CONSTANTS USED IN INITIALIZATION PROGRAM
043572,000599:
043573,000600: 21,2635 00044 NO.T5VAR DEC 36 B-14
043574,000601: 21,2636 07534 =.24 DEC .24 # = SLOPE OF 0.6/SEC
043575,000602: 21,2637 00004 RCSINIT OCT 00004
043576,000603: 21,2640 20004 RCSINITB OCT 20004
043577,000604: 21,2641 37772 T5WAIT60 DEC 16378 B-14 # = 6 CS
043578,000605: 21,2642 E6,1510 EBANK= KMPAC
043579,000606: 21,2642 03655 36066 T6ADDR 2CADR T6START
043580,000607:
043581,000608: 21,2644 35040 ZEROJET CAF ELEVEN # ZERO BLAST2, BLAST1, BLAST, YWORD2,
043582,000609: 21,2645 55506 TS SPNDX # YWORD1, PWORD2, PWORD1, RWORD2,
043583,000610: 21,2646 35035 CAF ZERO # AND RWORD1.
043584,000611:
043585,000612: 21,2647 51506 INDEX SPNDX
043586,000613: 21,2650 55451 TS RWORD1
043587,000614: 21,2651 11506 CCS SPNDX
043588,000615: 21,2652 12645 TCF ZEROJET +1
043589,000616:
043590,000617: 21,2653 35031 CAF FOUR
043591,000618: 21,2654 55462 TS BLAST1 +1
043592,000619: 21,2655 35040 CAF ELEVEN
043593,000620: 21,2656 55464 TS BLAST2 +1
043594,000621:
043595,000622: 21,2657 45033 CS BIT1
043596,000623: 21,2660 71501 MASK RCSFLAGS
043597,000624: 21,2661 55501 TS RCSFLAGS # RESET BIT1 OF RCSFLAGS TO 0
043598,000625:
043599,000626: 21,2662 00006 EXTEND
043600,000627: 21,2663 32643 DCA T6ADDR
043601,000628: 21,2664 53311 DXCH T6LOC
043602,000629: 21,2665 33062 CAF =+14MS # ENABLE T6RUPT TO SHUT OFF JETS IN 14 MS.
043603,000630: 21,2666 54031 TS TIME6
043604,000631: 21,2667 35015 CAF BIT15
043605,000632: 21,2670 00006 EXTEND
043606,000633: 21,2671 05013 WOR CHAN13
043607,000634:
043608,000635: 21,2672 00002 TC Q
043609,000636:
043610,000637: 21,2673 11617 T5PHASE2 CCS ATTKALMN # IF (+) INITIALIZE RATE ESTIMATE
043611,000638: 21,2674 13160 TCF KALUPDT
043612,000639:
043613,000640: 21,2675 12677 TCF +2 # ONLY IF ATTKALMN POSITIVE
043614,000641: 21,2676 12677 TCF +1
043615,000642: 21,2677 32170 CA DELTATT2 # RESET FOR PHASE3 IN 20 MS
043616,000643: 21,2700 56030 XCH TIME5 # (JET SELECTION LOGIC)
043617,000644: 21,2701 27634 ADS T5TIME # TO COMPENSATE FOR DELAYS IN T5RUPT
043618,000645:
043619,000646: 21,2702 31501 CA RCSFLAGS # IF A HIGH RATE AUTO MANEUVER IS IN
043620,000647: 21,2703 75015 MASK BIT15 # PROGRESS (BIT 15 OF RCSFLAGS SET), SET
043621,000648: 21,2704 00006 EXTEND # ATTKALMN TO -1
043622,000649: 21,2705 12707 BZF NOHIAUTO # OTHERWISE SET ATTKALMN TO 0.
043623,000650: 21,2706 45033 CS ONE
043624,000651: 21,2707 55617 NOHIAUTO TS ATTKALMN
043625,000652:
043626,000653: # MANUAL ROTATION COMMANDS
043627,000654:
043628,000655: 21,2710 43044 CS OCT01760 # RESET FORCED FIRING BITS (BITS 10 TO 5
043629,000656: 21,2711 71501 MASK RCSFLAGS # OF RCSFLAGS) TO ZERO
043630,000657: 21,2712 55501 TS RCSFLAGS
043631,000658:
043632,000659: 21,2713 00006 EXTEND
043633,000660: 21,2714 00031 READ CHAN31
043634,000661: 21,2715 54001 TS L
043635,000662: 21,2716 31632 CA CH31TEMP
043636,000663: 21,2717 00006 EXTEND
043637,000664: 21,2720 06001 RXOR LCHAN
043638,000665: 21,2721 73050 MASK MANROT # = OCT00077
043639,000666: 21,2722 00006 EXTEND
043640,000667: 21,2723 62736 BZMF NOCHANGE
043641,000668:
043642,000669: 21,2724 22000 LXCH A
043643,000670: 21,2725 55632 TS CH31TEMP # SAVE CONTENTS OF CHANNEL 31 IN CH31TEMP
043644,000671:
043645,000672: 21,2726 30001 CA L
043646,000673: 21,2727 00006 EXTEND
043647,000674: 21,2730 75027 MP BIT5 # PUT BITS 6-1 OF A IN BITS 10-5 OF L
043648,000675: 21,2731 30001 CA L
043649,000676: 21,2732 27501 ADS RCSFLAGS # SET FORCED FIRING BITS FOR AXES WITH
043650,000677: # WITH CHANGES IN COMMAND. BITS 10,9 FOR
043651,000678: # ROLL, BITS 8,7 FOR YAW, BITS 6,5 FOR
043652,000679: # PITCH
043653,000680:
043654,000681: 21,2733 41501 CS RCSFLAGS # SET RATE DAMPING FLAGS (BITS 13,12, AND
043655,000682: 21,2734 73051 MASK OCT16000 # 11 OF RCSFLAGS)
043656,000683: 21,2735 27501 ADS RCSFLAGS
043657,000684:
043658,000685: 21,2736 41632 NOCHANGE CS CH31TEMP
043659,000686: 21,2737 73050 MASK MANROT
043660,000687: 21,2740 00006 EXTEND
043661,000688: 21,2741 63262 BZMF AHFNOROT # IF NO MANUAL COMMANDS, GO TO AHFNOROT
043662,000689:
043663,000690: 21,2742 55332 TS HOLDFLAG # SET HOLDFLAG +
043664,000691:
043665,000692: 21,2743 03142 TC STICKCHK # WHEN THE RHC IS OUT OF DETENT, PMANNDX,
043666,000693: # YMANNDX, AND RMANNDX ARE ALL SET, BY
043667,000694: # MEANS OF STICKCHK, TO 0, 1, OR 2 FOR NO,
043668,000695: # +, OR - ROTATION RESPECTIVELY AS
043669,000696: # COMMANDED BY THE RHC.
043670,000697:
043671,000698: # HOWEVER, IT IS WELL TO NOTE THAT AFTER
043672,000699: # THE RHC IS RETURNED TO DETENT, THE
043673,000700: # PROGRAM BRANCHES TO AHFNOROT AND AVOIDS
043674,000701: # STICKCHK SO PMANNDX, YMANNDX, AND
043675,000702: # RMANNDX ARE NOT RESET TO ZERO BUT RATHER
043676,000703: # LEFT SET TO THEIR LAST OUT OF DETENT
043677,000704: # VALUES.
043678,000705:
043679,000706: 21,2744 40075 CS FLAGWRD1 # SET STIKFLAG TO INFORM STEERING
043680,000707: 21,2745 75016 MASK BIT14 # PROGRAMS (P20) THAT ASTRONAUT HAS
043681,000708: 21,2746 26075 ADS FLAGWRD1 # ASSUMED ROTATIONAL CONTROL OF SPACECRAFT
043682,000709:
043683,000710: 21,2747 35016 CAF BIT14
043684,000711: 21,2750 00006 EXTEND
043685,000712: 21,2751 02031 RAND CHAN31
043686,000713: 21,2752 00006 EXTEND
043687,000714: 21,2753 63063 BZMF FREEFUNC
043688,000715:
043689,000716: 21,2754 31501 CA RCSFLAGS # EXAMINE RCSFLAGS TO SEE IF RATE FILTER
043690,000717: 21,2755 75016 MASK BIT14 # HAS BEEN INITIALIZED
043691,000718: 21,2756 10000 CCS A # IF SO, PROCEED WITH MANUAL RATE COMMANDS
043692,000719: 21,2757 12546 TCF REINIT # .....TILT, RECYCLE TO INITIALIZE FILTER
043693,000720:
043694,000721: 21,2760 45036 CS FIVE # IF MANUAL MANEUVER IS AT HIGH RATE, SET
043695,000722: 21,2761 61130 AD RATEINDX # ATTKALMN TO -1.
043696,000723: 21,2762 00006 EXTEND # OTHERWISE, LEAVE ATTKALMN ALONE.
043697,000724: 21,2763 62766 BZMF +3
043698,000725: 21,2764 45033 CS ONE
043699,000726: 21,2765 55617 TS ATTKALMN
043700,000727:
043701,000728: 21,2766 35032 CAF TWO # AUTO-HOLD MANUAL ROTATION
043702,000729: 21,2767 55506 SETWBODY TS SPNDX
043703,000730: 21,2770 60000 DOUBLE
043704,000731: 21,2771 55507 TS DPNDX
043705,000732: 21,2772 51506 INDEX SPNDX # RMANNDX = 0 NO ROTATION
043706,000733: 21,2773 31656 CA RMANNDX # = 1 + ROTATION
043707,000734: 21,2774 00006 EXTEND # = 2 - ROTATION
043708,000735: 21,2775 13017 BZF NORATE # IF NO ROTATION COMMAND ON THIS AXIS,
043709,000736: # GO TO NORATE.
043710,000737:
043711,000738: 21,2776 61130 AD RATEINDX # RATEINDX = 0 0.05 DEG/SEC
043712,000739: 21,2777 54002 TS Q # = 2 0.2 DEG/SEC
043713,000740: 21,3000 50002 INDEX Q # = 4 0.5 DEG/SEC
043714,000741: 21,3001 33051 CA MANTABLE -1 # = 6 2.0 DEG/SEC
043715,000742: 21,3002 00006 EXTEND
043716,000743: 21,3003 75023 MP BIT9 # MULTIPLY MANTABLE BY 2 TO THE -6
043717,000744: 21,3004 51507 INDEX DPNDX # TO GET COMMANDED RATE.
043718,000745: 21,3005 53526 DXCH WBODY # SET WBODY TO COMMANDED RATE.
043719,000746:
043720,000747: 21,3006 31501 CA RCSFLAGS
043721,000748: 21,3007 73051 MASK OCT16000 # IS RATE DAMPING COMPLETED (BITS 13,12 AND
043722,000749: 21,3010 00006 EXTEND # 11 OF RCSFLAGS ALL ZERO.) IF SO, GO TO
043723,000750: 21,3011 13027 BZF MERUPDAT # MERUPDAT TO UPDATE CUMULATIVE ATTITUDE
043724,000751: # ERROR.
043725,000752:
043726,000753: 21,3012 35035 ZEROER CA ZERO # ZEROER ZEROS MERRORS
043727,000754: 21,3013 22007 ZL
043728,000755: 21,3014 51507 INDEX DPNDX
043729,000756: 21,3015 53542 DXCH MERRORX
043730,000757: 21,3016 13035 TCF SPNDXCHK
043731,000758:
043732,000759: 21,3017 22007 NORATE ZL
043733,000760: 21,3020 51507 INDEX DPNDX
043734,000761: 21,3021 53526 DXCH WBODY # ZERO WBODY FOR THIS AXIS
043735,000762: 21,3022 31501 CA RCSFLAGS
043736,000763: 21,3023 73051 MASK OCT16000
043737,000764: 21,3024 00006 EXTEND # IS RATE DAMPING COMPLETED
043738,000765: 21,3025 13035 BZF SPNDXCHK # YES, KEEP CURRENT MERRORX GO TO SPNDXCHK
043739,000766: 21,3026 13012 TCF ZEROER # NO, GO TO ZEROER
043740,000767:
043741,000768: 21,3027 50002 MERUPDAT INDEX Q # MERRORX=MERRORX+MEASURED CHANGE IN ANGLE
043742,000769: 21,3030 43051 CS MANTABLE -1 # -COMMANDED CHANGE IN ANGLE
043743,000770: 21,3031 00006 EXTEND # THE ADDITION OF MEASURED CHANGE IN ANGLE
043744,000771: 21,3032 75025 MP BIT7 # HAS ALREADY BEEN DONE IN THE RATE FILTER
043745,000772: 21,3033 51507 INDEX DPNDX # COMMANDED CHANGE IN ANGLE = WBODY TIMES
043746,000773: 21,3034 21542 DAS MERRORX # .1SEC = MANTABLE ENTRY TIMES 2 TO THE -8
043747,000774:
043748,000775: 21,3035 51507 SPNDXCHK INDEX DPNDX
043749,000776: 21,3036 31541 CA MERRORX
043750,000777: 21,3037 51506 INDEX SPNDX
043751,000778: 21,3040 55567 TS ERRORX # ERRORX = HIGH ORDER WORD OF MERRORX
043752,000779: 21,3041 11506 CCS SPNDX
043753,000780: 21,3042 12767 TCF SETWBODY
043754,000781: 21,3043 13453 TCF JETS
043755,000782:
043756,000783: 21,3044 01760 OCT01760 OCT 01760 # FORCED FIRING BITS MASK
043757,000784:
043758,000785: 21,3045 01400 OCT01400 OCT 01400 # ROLL FORCED FIRING MASK ORDER OF
043759,000786: 21,3046 00060 OCT00060 OCT 00060 # PITCH FORCED FIRING MASK DEFINITION
043760,000787: 21,3047 00300 OCT00300 OCT 00300 # YAW FORCED FIRING MASK MUST BE
043761,000788: # PRESERVED
043762,000789: # FOR INDEXING
043763,000790: 21,3050 00077 MANROT OCT 77
043764,000791: 21,3051 16000 OCT16000 OCT 16000 # RATE DAMPING FLAGS MASK
043765,000792: 21,3052 00165 MANTABLE DEC .0071111
043766,000793: 21,3053 77612 DEC -.0071111
043767,000794: 21,3054 00722 DEC .028444
043768,000795: 21,3055 77055 DEC -0.028444
043769,000796: 21,3056 02215 DEC .071111
043770,000797: 21,3057 75562 DEC -.071111
043771,000798: 21,3060 11064 DEC .284444
043772,000799: 21,3061 66713 DEC -.284444
043773,000800: 21,3062 00027 =+14MS DEC 23 B-14
043774,000801: 21,3063 51656 FREEFUNC INDEX RMANNDX # ACCELERATION
043775,000802: 21,3064 33075 CA FREETAU # COMMANDS
043776,000803: 21,3065 55561 TS TAU
043777,000804: 21,3066 51657 INDEX PMANNDX
043778,000805: 21,3067 33075 CA FREETAU # FREETAU 0 SEC
043779,000806: 21,3070 55562 TS TAU1 # +1 +0.10 SEC
043780,000807: 21,3071 51660 INDEX YMANNDX # +2 -0.10 SEC
043781,000808: 21,3072 33075 CA FREETAU # (+3) 0 SEC
043782,000809: 21,3073 55563 TS TAU2
043783,000810: 21,3074 13101 TCF T6PROGM
043784,000811:
043785,000812: 21,3075 00000 FREETAU DEC 0 B-14
043786,000813: 21,3076 00740 DEC 480 B-14
043787,000814: 21,3077 77037 DEC -480 B-14
043788,000815: 21,3100 00000 DEC 0 B-14
043789,000816:
043790,000817: 21,3101 35035 T6PROGM CAF ZERO # FOR MANUAL ROTATIONS
043791,000818: 21,3102 55567 TS ERRORX
043792,000819: 21,3103 55570 TS ERRORY
043793,000820: 21,3104 55571 TS ERRORZ
043794,000821: 21,3105 13771 TCF T6PROG
043795,000822:
043796,000823: 21,3106 06604 DEC .2112 # FILTER GAIN FOR TRANSLATION, LEM ON
043797,000824: 21,3107 32703 DEC .8400 # FILTER GAIN FOR TRANSLATION 2(ZETA)WN DT
043798,000825: 21,3110 06604 DEC .2112 # FILTER GAIN FOR 2 DEGREES/SEC MANEUVERS
043799,000826: 21,3111 02031 GAIN1 DEC .0640 # KALMAN FILTER GAINS FOR INITIALIZATION
043800,000827: 21,3112 12132 DEC .3180 # OF ATTITUDE RATES
043801,000828: 21,3113 13030 DEC .3452
043802,000829: 21,3114 14047 DEC .3774
043803,000830: 21,3115 15241 DEC .4161
043804,000831: 21,3116 16650 DEC .4634
043805,000832: 21,3117 20555 DEC .5223
043806,000833: 21,3120 23065 DEC .5970
043807,000834: 21,3121 26137 DEC .6933
043808,000835: 21,3122 32053 DEC .8151
043809,000836: 21,3123 35712 DEC .9342
043810,000837:
043811,000838: 21,3124 00435 DEC .0174 # FILTER GAIN FOR TRANSLATION, LEM ON
043812,000839: 21,3125 13412 DEC .3600 # FILTER GAIN FOR TRANSLATION (WN)(WN)DT
043813,000840: 21,3126 00435 DEC .0174 # FILTER GAIN FOR 2 DEGREES/SEC MANEUVERS
043814,000841: 21,3127 00032 GAIN2 DEC .0016 # SCALED 10
043815,000842: 21,3130 01350 DEC .0454
043816,000843: 21,3131 01575 DEC .0545
043817,000844: 21,3132 02103 DEC .0666
043818,000845: 21,3133 02523 DEC .0832
043819,000846: 21,3134 03327 DEC .1069
043820,000847: 21,3135 04432 DEC .1422
043821,000848: 21,3136 06264 DEC .1985
043822,000849: 21,3137 11351 DEC .2955
043823,000850: 21,3140 17324 DEC .4817
043824,000851: 21,3141 33622 DEC .8683
043825,000852: 21,3142 55502 STICKCHK TS T5TEMP
043826,000853: 21,3143 76214 MASK THREE # INDECES FOR MANUAL ROTATION
043827,000854: 21,3144 55657 TS PMANNDX
043828,000855: 21,3145 31502 CA T5TEMP
043829,000856: 21,3146 00006 EXTEND # MAN RATE 0 0 RATE (DP)
043830,000857: 21,3147 75017 MP QUARTER # +1 + RATE (DP)
043831,000858: 21,3150 55502 TS T5TEMP # +2 - RATE (DP)
043832,000859: 21,3151 76214 MASK THREE # (+3) 0 RATE (DP)
043833,000860: 21,3152 55660 TS YMANNDX
043834,000861: 21,3153 31502 CA T5TEMP
043835,000862: 21,3154 00006 EXTEND
043836,000863: 21,3155 75017 MP QUARTER
043837,000864: 21,3156 55656 TS RMANNDX
043838,000865: 21,3157 00002 TC Q
043839,000866: 21,3160 55617 KALUPDT TS ATTKALMN # INITIALIZATION OF ATTITUDE RATES USING
043840,000867: # KALMAN FILTER TAKES 1.1 SEC
043841,000868:
043842,000869: 21,3161 32167 CA DELTATT # =1SEC - 80MS
043843,000870: 21,3162 61634 AD T5TIME # + DELAYS
043844,000871: 21,3163 54030 TS TIME5
043845,000872: 21,3164 13167 TCF +3
043846,000873: 21,3165 32170 CAF DELTATT2 # SAFETY PLAY TO ASSURE
043847,000874: 21,3166 54030 TS TIME5 # A T5RUPT
043848,000875:
043849,000876: 21,3167 45035 KRESUME2 CS ZERO # RESET FOR PHASE1
043850,000877: 21,3170 55465 TS T5PHASE # RESUME INTERRUPTED PROGRAM
043851,000878: 21,3171 15347 TCF RESUME
043852,000879:
043853,000880: 21,3172 45030 FDAIDSP2 CS BIT4 # RESET FOR FDAIDSP1
043854,000881: 21,3173 71501 MASK RCSFLAGS
043855,000882: 21,3174 55501 TS RCSFLAGS
043856,000883:
043857,000884: 21,3175 40074 CS FLAGWRD0 # ON - DISPLAY ONE OF THE TOTAL ATTITUDE
043858,000885: 21,3176 75023 MASK BIT9 # ERRORS
043859,000886: 21,3177 00006 EXTEND
043860,000887: 21,3200 13207 BZF FDAITOTL
043861,000888: 21,3201 00006 EXTEND
043862,000889: 21,3202 41570 DCS ERRORX # OFF - DISPLAY AUTOPILOT FOLLOWING ERROR
043863,000890: 21,3203 53477 DXCH AK
043864,000891: 21,3204 41571 CS ERRORZ
043865,000892: 21,3205 55500 TS AK2
043866,000893: 21,3206 15347 TCF RESUME # END PHASE 1
043867,000894:
043868,000895: 21,3207 30105 FDAITOTL CA FLAGWRD9
043869,000896: 21,3210 75026 MASK BIT6
043870,000897: 21,3211 00006 EXTEND
043871,000898: 21,3212 13255 BZF WRTN17 # IS N22ORN17 (BIT6 OF FLAGWRD9) = 0
043872,000899: # IF SO, GO TO WRTN17
043873,000900: 21,3213 00006 WRTN22 EXTEND # OTHERWISE, CONTINUE ON TO WRTN22 AND
043874,000901: 21,3214 31157 DCA CTHETA # GET SET TO COMPUTE TOTAL ATTITUDE
043875,000902: 21,3215 53514 DXCH WTEMP # ERROR WRT N22 BY PICKING UP THE THREE
043876,000903: 21,3216 31155 CA CPHI # COMPONENTS OF N22
043877,000904:
043878,000905: 21,3217 00006 GETAKS EXTEND # COMPUTE TOTAL ATTITUDE ERROR FOR
043879,000906: 21,3220 20032 MSU CDUX # DISPLAY ON FDAI ERROR NEEDLES
043880,000907: 21,3221 55476 TS AK
043881,000908: 21,3222 31513 CA WTEMP
043882,000909: 21,3223 00006 EXTEND
043883,000910: 21,3224 20033 MSU CDUY
043884,000911: 21,3225 55502 TS T5TEMP
043885,000912: 21,3226 00006 EXTEND
043886,000913: 21,3227 71640 MP AMGB1
043887,000914: 21,3230 27476 ADS AK
043888,000915: 21,3231 31502 CA T5TEMP
043889,000916: 21,3232 00006 EXTEND
043890,000917: 21,3233 71641 MP AMGB4
043891,000918: 21,3234 55477 TS AK1
043892,000919: 21,3235 31502 CA T5TEMP
043893,000920: 21,3236 00006 EXTEND
043894,000921: 21,3237 71643 MP AMGB7
043895,000922: 21,3240 55500 TS AK2
043896,000923: 21,3241 31514 CA WTEMP +1
043897,000924: 21,3242 00006 EXTEND
043898,000925: 21,3243 20034 MSU CDUZ
043899,000926: 21,3244 55502 TS T5TEMP
043900,000927: 21,3245 00006 EXTEND
043901,000928: 21,3246 71642 MP AMGB5
043902,000929: 21,3247 27477 ADS AK1
043903,000930: 21,3250 31502 CA T5TEMP
043904,000931: 21,3251 00006 EXTEND
043905,000932: 21,3252 71644 MP AMGB8
043906,000933: 21,3253 27500 ADS AK2
043907,000934: 21,3254 15347 TCF RESUME # END PHASE1 OF RCS DAP
043908,000935:
043909,000936: 21,3255 00006 WRTN17 EXTEND # GET SET TO COMPUTE TOTAL ASTRONAUT
043910,000937: 21,3256 31335 DCA CPHIX +1 # ATTITUDE ERROR WRT N17 BY PICKING UP
043911,000938: 21,3257 53514 DXCH WTEMP # THE THREE COMPONENTS OF N17
043912,000939: 21,3260 31333 CA CPHIX
043913,000940: 21,3261 13217 TCF GETAKS
End of include-file RCS-CSM_DIGITAL_AUTOPILOT.agc. Parent file is MAIN.agc