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