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. |
039338,000002: ## Copyright: Public domain. 039339,000003: ## Filename: TVCROLLDAP.agc 039340,000004: ## Purpose: A section of Skylark revision 048. 039341,000005: ## It is part of the source code for the Apollo Guidance Computer (AGC) 039342,000006: ## for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of 039343,000007: ## this software are available; instead, this file was created via 039344,000008: ## disassembly of dumps of the core rope modules actually flown on 039345,000009: ## Skylab-2. Access to these modules was provided by the New Mexico 039346,000010: ## Museum of Space History. 039347,000011: ## Assembler: yaYUL 039348,000012: ## Contact: Ron Burkey <info@sandroid.org>. 039349,000013: ## Website: www.ibiblio.org/apollo/index.html 039350,000014: ## Mod history: 2023-09-04 MAS Created from Artemis 072. 039351,000015: 039352,000016: 039353,000017: # PROGRAM NAME...TVC ROLL AUTOPILOT 039354,000018: # LOG SECTION...TVCROLLDAP SUBROUTINE...DAPCSM 039355,000019: # MODIFIED BY SCHLUNDT 21 OCTOBER 1968 039356,000020: 039357,000021: 039358,000022: # FUNCTIONAL DESCRIPTION.... 039359,000023: 039360,000024: # *AN ADAPTATION OF THE LEM P-AXIS CONTROLLER 039361,000025: # *MAINTAIN OGA WITHIN 5 DEG DEADBND OF OGAD, WHERE OGAD = OGA AS SEEN 039362,000026: # BY IGNITION (P40) 039363,000027: # *MAINTAIN OGA RATE LESS THAN 0.1 DEG/SEC LIMIT CYCLE RATE 039364,000028: # *SWITCHING LOGIC IN PHASE PLANE.... SEE GSOP CHAPTER 3 039365,000029: # *USES T6 CLOCK TO TIME JET FIRINGS 039366,000030: # *MAXIMUM JET FIRING TIME = 2.56 SECONDS, LIMITED TO 2.5 IF GREATER 039367,000031: # *MINIMUM JET FIRING TIME = 15 MS 039368,000032: # *JET PAIRS FIRE ALTERNATELY 039369,000033: # *AT LEAST 1/2 SECOND DELAY BEFORE A NEW JET PAIR IS FIRED 039370,000034: # *JET FIRINGS MAY NOT BE EXTENDED, ONLY SHORTENED, WHEN RE-EVALUATION 039371,000035: # OF A JET FIRING TIME IS MADE ON A LATER PASS 039372,000036: 039373,000037: # CALLING SEQUENCE.... 039374,000038: 039375,000039: # *ROLLDAP CALL VIA WAITLIST, IN PARTICULAR BY TVCEXEC (EVERY 1/2 SEC) 039376,000040: # WITH A 3CS DELAY TO ALLOW FREE TIME FOR OTHER RUPTS (DWNRPT, ETC.) 039377,000041: 039378,000042: # NORMAL EXIT MODES.... ENDOFJOB 039379,000043: 039380,000044: # ALARM OR ABORT EXIT MODES.... NONE 039381,000045: 039382,000046: # SUBROUTINES CALLED.....NONE 039383,000047: 039384,000048: # OTHER INTERFACES.... 039385,000049: 039386,000050: # *TVCEXEC SETS UP ROLLDAP TASK EVERY 1/2 SECOND AND UPDATES 1/CONACC 039387,000051: # EVERY 10 SECONDS (VIA MASSPROP AND S40.15) 039388,000052: # *RESTARTS SUSPEND ROLL DAP COMPUTATIONS UNTIL THE NEXT 1/2 SEC 039389,000053: # SAMPLE PERIOD. (THE PART OF TVCEXECUTIVE THAT CALLS ROLL DAP IS 039390,000054: # NOT RESTARTED.) THE OGAD FROM IGNITION IS MAINTAINED. 039391,000055: 039392,000056: # ERASABLE INITIALIZATION REQUIRED.... 039393,000057: 039394,000058: # *1/CONACC (S40.15) 039395,000059: # *OGAD (CDUX AT IGNITION) 039396,000060: # *OGANOW (CDUX AT TVCINIT4 AND TVCEXECUTIVE) 039397,000061: # *OGAPAST (OGANOW AT TVCEXECUTIVE) 039398,000062: # *ROLLFIRE = TEMREG = ROLLWORD = 0 (MRCLEAN LOOP IN TVCDAPON) 039399,000063: # OUTPUT.... 039400,000064: 039401,000065: # *ROLL JET PAIR FIRINGS 039402,000066: 039403,000067: # DEBRIS.... MISCELLANEOUS, SHAREABLE WITH RCS/ENTRY, IN EBANK6 ONLY 039404,000068: 039405,000069: # SOME NOTES ON THE ROLL AUTOPILOT, AND IN PARTICULAR, ON ITS SWITCHING 039406,000070: # LOGIC. SEE SECTION THREE OF THE GSOP (SUNDISK/COLOSSUS) FOR DETAILS. 039407,000071: 039408,000072: # SWITCHING LOGIC IN THE PHASE PLANE.... 039409,000073: 039410,000074: # OGARATE 039411,000075: # * 039412,000076: # * 039413,000077: # * * * * * * * * * * * * 039414,000078: # * (REGION 1, SEE TEXT BELOW) 039415,000079: # * * 039416,000080: # * 039417,000081: # * * * * * * * (COAST) * ...PARABOLA (SWITCHING = CONTROL) 039418,000082: # * * . 039419,000083: # * * * 039420,000084: # * * (FIRE NEG ROLL JETS) 039421,000085: # * * * 039422,000086: # (-DB,+LMCRATE)....* * 039423,000087: # * * * 039424,000088: # * * OGAERROR 039425,000089: # ************************************************************************ 039426,000090: # * * (-AK, OGAERR) 039427,000091: # * * * (REGION 6-PRIME) 039428,000092: # * * (SEE TEXT BELOW) 039429,000093: # * * * 039430,000094: # * * ...STRAIGHT LINE 039431,000095: # (FIRE POS ROLL JETS) * * * . 039432,000096: # * (COAST) * 039433,000097: # * * * * * * * * * * * 039434,000098: # * -MINLIM 039435,000099: # * * 039436,000100: # * 039437,000101: # * * * * * * * * * * * * * * * * 039438,000102: # * -MAXLIM 039439,000103: # * 039440,000104: # * 039441,000105: 039442,000106: # SWITCHING PARABOLAS ARE CONTROL PARABOLAS, THUS REQUIRING KNOWLEDGE OF 039443,000107: # CONTROL ACCELERATION CONACC, OR ITS RECIPROCAL, 1/CONACC, THE TVC 039444,000108: # ROLL DAP GAIN (SEE TVCEXECUTIVE VARIABLE GAIN PACKAGE). JET 039445,000109: # FIRING TIME IS SIMPLY THAT REQUIRED TO ACHIEVE THE DESIRED OGARATE, 039446,000110: # SUBJECT TO THE LIMITATIONS DISCUSSED UNDER FUNCTIONAL DESCRIPTION, 039447,000111: # ABOVE. 039448,000112: 039449,000113: # THE THREE CONTROL REGIONS (+, -, AND ZERO TORQUE) ARE COMPRIZED OF 039450,000114: # TWELVE SUBSET REGIONS ( 1...6, AND THE CORRESPONDING 1-PRIME... 039451,000115: # 6-PRIME ) SEE SECTION 3 OF THE GSOP (SUNDISK OR COLOSSUS) 039452,000116: 039453,000117: # GIVEN THE OPERATING POINT NOT IN THE COAST REGION, THE DESIRED OGARATE 039454,000118: # IS AT THE POINT OF PENETRATION OF THE COAST REGION BY THE CONTROL 039455,000119: # PARABOLA WHICH PASSES THROUGH THE OPERATING POINT. FOR REGION 3 039456,000120: # DESIRED OGARATE IS SIMPLY +-MAXLIM. FOR REGIONS 1 OR 6 THE SOLUTION 039457,000121: # TO A QUADRATIC IS REQUIRED (THE PENETRATION IS ALONG THE STRAIGHT 039458,000122: # LINE OR MINLIM BOUNDRY SWITCH LINES). AN APPROXIMATION IS MADE 039459,000123: # INSTEAD. TAKE AN OPERATING POINT IN REGION 6' . PASS A TANGENT TO 039460,000124: # THE CONTROL PARABOLA THROUGH THE OPERATING POINT, AND FIND ITS 039461,000125: # INTERSECTION WITH THE STRAIGHT LINE SECTION OF THE SWITCH CURVE... 039462,000126: # THE INTERSECTION DEFINES DESIRED OGARATE. IF THE OPERATING POINT IS 039463,000127: # CLOSE TO THE SWITCH LINE, THE APPROXIMATION IS QUITE GOOD (INDEED 039464,000128: # THE APPROXIMATE AND QUADRATIC SOLUTIONS CONVERGE IN THE LIMIT AS 039465,000129: # THE SWITCH LINE IS APPROACHED). IF THE OPERATING POINT IS NOT CLOSE 039466,000130: # TO THE SWITCH LINE, THE APPROXIMATE SOLUTION GIVES VALID TREND 039467,000131: # INFORMATION (DIRECTION OF DESIRED OGARATE) AT LEAST. THE 039468,000132: # RE-EVALUATION OF DESIRED OGARATE IN SUBSEQUENT ROLL DAP PASSES (1/2 039469,000133: # SECOND INTERVALS) WILL BENEFIT FROM THE CONVERGENT NATURE OF THE 039470,000134: # APPROXIMATION. 039471,000135: 039472,000136: # FOR LARGE OGAERROR THE TANGENT INTERSECTS +-MINLIM SWITCH BOUNDRY BEFORE 039473,000137: # INTERSECTING THE STRAIGHT LINE SWITCH. HOWEVER THE MINLIM IS 039474,000138: # IGNORED IN COMPUTING THE FIRING TIME, SO THAT THE EXTENSION (INTO 039475,000139: # THE COAST REGION) OF THE STRAIGHT LINE SWITCH IS WHAT IS FIRED TO. 039476,000140: # IF THE ROLL DAP FINDS ITSELF IN THE COAST REGION BEFORE REACHING 039477,000141: # THE DESIRED INTERSECTION (IE, IN THE REGION BETWEEN THE MINLIM 039478,000142: # AND THE STRAIGHT LINE SWITCH) IT WILL EXIBIT NORMAL COAST-REGION 039479,000143: # BEHAVIOR AND TURN OFF THE JETS. THE PURPOSE OF THIS FIRING POLICY 039480,000144: # IS TO MAINTAIN STATIC ROLL STABILITY IN THE EVENT OF A JET 039481,000145: # FAILED-ON. 039482,000146: 039483,000147: # WHEN THE OPERATING POINT IS IN REGION 1 THE SAME APPROXIMATION IS 039484,000148: # MADE, BUT AT AN ARTIFICIALLY-CREATED OR DUMMY OPERATING POINT, 039485,000149: # DEFINED BY.. OGAERROR = INTERSECTION OF CONTROL PARABOLA AND 039486,000150: # OGAERROR AXIS, OGARATE = +-LMCRATE WHERE SIGN IS OPPOSITE THAT OF 039487,000151: # REAL OPERATING POINT RATE. WHEN THE OPERATING POINT HAS PASSED 039488,000152: # FROM REGION 1 TO REGION 6', THE DUMMY POINT IS NO LONGER REQUIRED, 039489,000153: # AND THE SOLUTION REVERTS TO THAT OF A REGULAR REGION 6' POINT. 039490,000154: 039491,000155: 039492,000156: # EQUATION FOR SWITCHING PARABOLA (SEE FIGURE ABOVE).... 039493,000157: # 2 039494,000158: # SOGAERROR = (DB - (SOGARATE) (1/CONACC)/2) SGN(SOGARATE) 039495,000159: 039496,000160: 039497,000161: # EQUATION FOR SWITCHING STRAIGHT LINE SEGMENT.... 039498,000162: 039499,000163: # SOGARATE = -(-SLOPE)(SOGAERROR) - SGN(SOGARATE) INTERCEP 039500,000164: 039501,000165: # WHERE INTERCEP = DB(-SLOPE) - LMCRATE 039502,000166: 039503,000167: # EQUATION FOR INTERSECTION, CONTROL PARABOLA AND STRAIGHT SWITCH LINE.... 039504,000168: 039505,000169: # DOGADOT = NUM/DEN, WHERE 039506,000170: # 2 039507,000171: # NUM = (-SLOPE)(OGARATE) (1/CONACC) 039508,000172: # +SGN(DELOGA)(-SLOPE)(OGAERROR - SGN(DELOGA)(DB)) 039509,000173: # +LMCRATE 039510,000174: 039511,000175: # DEN = (-SLOPE)(LMCRATE)(1/CONACC) - SGN(DELOGA) 039512,000176: 039513,000177: # 2 039514,000178: # DELOGA = OGAERROR - (DB - OGARATE (1/CONACC)/2) SGN(OGARATE) 039515,000179: 039516,000180: 039517,000181: # FOR REGIONS 6 AND 6-PRIME USE ACTUAL OPERATING POINT (OGA, OGARATE) 039518,000182: # FOR OGAERROR AND OGARATE IN THE INTERSECTION EQUATIONS ABOVE. 039519,000183: # FOR REGIONS 1 AND 1-PRIME USE DUMMY OPERATING POINT FOR OGAERROR 039520,000184: # AND OGARATE, WHERE THE DUMMY POINT IS GIVEN BY.... 039521,000185: # OGAERROR= DELOGA + DB SGN(OGARATE) 039522,000186: # OGARATE= -LMCRATE SGN(OGARATE) 039523,000187: 039524,000188: # NOTE, OGAERROR = OGA - OGAD USES DUMMY REGISTER OGA IN ROLL DAP CODING 039525,000189: # ALSO, AT POINT WHERE DOGARATE IS COMPUTED, REGISTER DELOGA IS USED 039526,000190: # AS A DUMMY REGISTER FOR THE OGAERROR IN THE NUM EQUATION ABOVE 039527,000191: 039528,000192: # ROLLDAP CODING.... 039529,000193: 039530,000194: 16,2000 SETLOC DAPROLL 039531,000195: 16,2000 BANK 039532,000196: 16,3316 E6,1674 EBANK= OGANOW 039533,000197: 16,3316 COUNT* $$/ROLL 039534,000198: 16,3316 31674 ROLLDAP CAE OGANOW # OGA RATE ESTIMATOR...SIMPLE FIRST-ORDER 039535,000199: 16,3317 00006 EXTEND # DIFFERENCE (SAMPLE TIME = 1/2 SEC) 039536,000200: 16,3320 21675 MSU OGAPAST 039537,000201: 16,3321 00006 EXTEND 039538,000202: 16,3322 74775 MP BIT5 039539,000203: 16,3323 22000 LXCH A 039540,000204: 16,3324 55562 TS OGARATE # SC.AT B-4 REV/SEC 039541,000205: 039542,000206: # COMPUTATIONS WHICH FOLLOW USE OGA FOR OGAERR (SAME REGISTER) 039543,000207: # EXAMINE DURATION OF LAST JET FIRING IF JETS NOW ON. 039544,000208: 039545,000209: 16,3325 31620 DURATION CA ROLLFIRE # SAME SGN AS PRESENT TORQ,MAGN=POSMAX 039546,000210: 16,3326 00006 EXTEND 039547,000211: 16,3327 13331 BZF +2 # ROLL JETS ARE NOW OFF. 039548,000212: 16,3330 13337 TCF ROLLOGIC # ENTER LOGIC, JETS NOW ON. 039549,000213: 039550,000214: 16,3331 31622 CAE TEMREG # EXAMINE LAST FIRING INTERVAL 039551,000215: 16,3332 00006 EXTEND # IF POSITIVE, DONT FIRE 039552,000216: 16,3333 13337 BZF ROLLOGIC # ENTER LOGIC, JETS NOW OFF. 039553,000217: 039554,000218: 16,3334 35003 CAF ZERO # JETS HAVE NOT BEEN OFF FOR 1/2 SEC. WAIT 039555,000219: 16,3335 55622 TS TEMREG # RESET TEMREG 039556,000220: 16,3336 15327 WAIT1/2 TCF TASKOVER # EXIT ROLL DAP 039557,000221: 039558,000222: # COMPUTE DB-(1/2 CONACC) (OGARATE)SQ (1/2 IN THE SCALING) 039559,000223: 039560,000224: 16,3337 41562 ROLLOGIC CS OGARATE # SCALED AT 2(-4) REV/SEC 039561,000225: 16,3340 00006 EXTEND 039562,000226: 16,3341 71660 MP 1/CONACC # SCALED AT 2(+9) SEC SQ /REV 039563,000227: 16,3342 00006 EXTEND 039564,000228: 16,3343 71562 MP OGARATE 039565,000229: 16,3344 63732 AD DB # SCALED AT 2(+0) REV 039566,000230: 16,3345 55622 TS TEMREG # QUANTITY SCALED AT 2(+0) REV. 039567,000231: 039568,000232: # GET SIGN OF OGARATE 039569,000233: 039570,000234: 16,3346 31562 CA OGARATE 039571,000235: 16,3347 00006 EXTEND 039572,000236: 16,3350 63353 BZMF +3 # LET SGN(0) BE NEGATIVE 039573,000237: 16,3351 35001 CA BIT1 039574,000238: 16,3352 13354 TCF +2 039575,000239: 16,3353 45001 CS BIT1 039576,000240: 16,3354 55700 TS SGNRT # + OR - 2(-14) 039577,000241: 039578,000242: # CALCULATE DISTANCE FROM SWITCH PARABOLA (DELOGA) 039579,000243: 039580,000244: 16,3355 00006 EXTEND 039581,000245: 16,3356 71622 MP TEMREG # SGN(OGARATE) TEMREG NOW IN L 039582,000246: 16,3357 40001 CS L 039583,000247: 16,3360 61676 AD OGA # SCALED AT 2(+0) REV 039584,000248: 16,3361 55701 DELOGAC TS DELOGA # SCALE B+0 REV, PLUS TO RIGHT OF C-PARAB 039585,000249: 039586,000250: # EXAMINE SGN(DELOGA) AND CREATE CA OR CS INSTR. DEPENDING UPON SIGN. 039587,000251: 039588,000252: 16,3362 00006 EXTEND 039589,000253: 16,3363 63366 BZMF +3 039590,000254: 16,3364 34346 CAF PRIO30 # =CA (30000) 039591,000255: 16,3365 13367 TCF +2 039592,000256: 16,3366 34763 CAF BIT15 # =CS (40000) 039593,000257: 16,3367 55702 TS I 039594,000258: 039595,000259: 16,3370 51702 INDEX I # TEST ON I SGN(OGARATE) 039596,000260: 16,3371 01700 0 SGNRT # CA OR CS 039597,000261: 16,3372 40000 COM 039598,000262: 16,3373 00006 EXTEND 039599,000263: 16,3374 63445 REG1TST BZMF ROLLON # IF REGION 1 (DELOGA OGARATE SAME SIGN) 039600,000264: 039601,000265: # NO JET FIRE YET, TEST FOR MAX OGARATE 039602,000266: 039603,000267: 16,3375 51702 INDEX I 039604,000268: 16,3376 01562 0 OGARATE # CA OR CS...BOTH MUST BE NEG. HERE 039605,000269: 16,3377 55703 TS IOGARATE # I.E. I OGARATE 039606,000270: 16,3400 63737 AD MAXLIM # SCALED AT 2(-4) REV/SEC 039607,000271: 16,3401 00006 EXTEND 039608,000272: 16,3402 63524 REG3TST BZMF RATELIM # IF REGION 3 (RATES TOO HIGH, FIRE JETS) 039609,000273: 039610,000274: # COMPUTATION OF I((-SLOPE)OGA + OGARATE) - INTERCEPT..NOTE THAT STR. LINE 039611,000275: # SWITCH SLOPE IS (SLOPE) DEG/SEC/DEG, A NEG QUANTITY 039612,000276: 039613,000277: 16,3403 31562 CA OGARATE 039614,000278: 16,3404 00006 EXTEND 039615,000279: 16,3405 74764 MP BIT14 039616,000280: 16,3406 55622 TS TEMREG 039617,000281: 16,3407 31676 CA OGA 039618,000282: 16,3410 00006 EXTEND 039619,000283: 16,3411 73733 MP -SLOPE 039620,000284: 16,3412 20001 DDOUBL 039621,000285: 16,3413 20001 DDOUBL 039622,000286: 16,3414 20001 DDOUBL # (OGA ERROR MUST BE LESS THAN +-225 DEG) 039623,000287: 16,3415 61622 AD TEMREG 039624,000288: 039625,000289: 16,3416 51702 INDEX I 039626,000290: 16,3417 00000 0 A # I((-SLOPE)OGA+OGARATE) AT 2(-3)REV/SEC 039627,000291: 16,3420 40000 COM 039628,000292: 16,3421 63735 AD INTERCEP # SCALED AT 2(-3) REV. 039629,000293: 16,3422 40000 COM 039630,000294: 16,3423 00006 EXTEND 039631,000295: 16,3424 63635 REG2TST BZMF NOROLL # IF REGION 2 (COAST SIDE OF STRT LINE) 039632,000296: 039633,000297: # CHECK TO SEE IF OGARATE IS ABOVE MINLIM BOUNDARY 039634,000298: 039635,000299: 16,3425 31703 CA IOGARATE # ALWAYS NEGATIVE 039636,000300: 16,3426 63736 AD MINLIM # SCALED AT 2(-4) REV/SEC 039637,000301: 16,3427 00006 EXTEND 039638,000302: 16,3430 63635 REG4TST BZMF NOROLL # IF REGION 4 (COAST SIDE OF MINLIM) 039639,000303: 039640,000304: # ALL AREAS CHECKED EXCEPT LAST AREA...NO FIRE IN THIS SMALL SEGMENT 039641,000305: 039642,000306: 16,3431 51702 INDEX I 039643,000307: 16,3432 01676 0 OGA 039644,000308: 16,3433 40000 COM 039645,000309: 16,3434 63732 AD DB 039646,000310: 16,3435 40000 COM 039647,000311: 16,3436 00006 EXTEND 039648,000312: 16,3437 63635 REG5TST BZMF NOROLL # IF REGION 5 (COAST SIDE OF DB) 039649,000313: 039650,000314: # JETS MUST FIRE NOW. OGARATE IS NEG. (OR VISA VERSA). USE DIRECT STR. LINE. 039651,000315: # DELOGA AND DELOGART ARE USED AS DUMMY VARIABLES IN THE SOLUTION OF A 039652,000316: # STRAIGHT LINE APPROXIMATION TO A QUADRATIC SOLUTION OF THE INTERSECTION 039653,000317: # OF THE CONTROL PARABOLA AND THE STRAIGHT-LINE SWITCH LINE. THE STRAIGHT 039654,000318: # LINE IS THE TANGENT TO THE CONTROL PARABOLA AT THE OPERATING POINT. (FOR 039655,000319: # OPERATING POINTS IN REGIONS 6 OR 6') 039656,000320: 039657,000321: 16,3440 31676 REGION6 CAE OGA # USE ACTUAL OPERATING POINT FOR TANGENT 039658,000322: 16,3441 55701 TS DELOGA # ACTUAL STATE 039659,000323: 16,3442 31562 CA OGARATE 039660,000324: 16,3443 55677 TS DELOGART # ACTUAL STATE, I.E. DEL OGARATE 039661,000325: 16,3444 13454 TCF ONROLL 039662,000326: 039663,000327: # JETS ALSO FIRE FROM HERE EXCEPT OGARATE IS POS (VISA VERSA), USE INDIRECT 039664,000328: # STRAIGHT LINE ESTABLISHED BY TANGENT TO A CONTROL PARABOLA AT ((DELOGA 039665,000329: # + DB SGN(DELOGA) ), -LMCRATE SGN(DELOGA) ) (THIS IS THE DUMMY 039666,000330: # OPERATING POINT FOR OPERATING POINTS IN REGIONS 1 AND 1') 039667,000331: 039668,000332: 16,3445 51702 ROLLON INDEX I 039669,000333: 16,3446 03732 0 DB 039670,000334: 16,3447 27701 ADS DELOGA # DELOGA WAS DIST. FROM SWITCH PARABOLA 039671,000335: 039672,000336: 16,3450 43734 CS LMCRATE # LIMIT CYCLE RATE AT 2(-4) REV/SEC 039673,000337: 16,3451 51702 INDEX I 039674,000338: 16,3452 00000 0 A 039675,000339: 16,3453 55677 TS DELOGART # EVALUATE STATE FOR INDIRECT LINE. 039676,000340: 039677,000341: 039678,000342: # SOLVE STRAIGHT LINES SIMULTANEOUSLY TO OBTAIN DESIRED OGARATE. 039679,000343: 039680,000344: 16,3454 00006 ONROLL EXTEND # DELOGART IN ACC. ON ARRIVAL 039681,000345: 16,3455 71660 MP 1/CONACC 039682,000346: 16,3456 60000 DOUBLE 039683,000347: 16,3457 00006 EXTEND 039684,000348: 16,3460 73733 MP -SLOPE 039685,000349: 16,3461 55622 TS TEMREG # 2(-SLOPE)RATE /CONACC 039686,000350: 16,3462 00006 EXTEND 039687,000351: 16,3463 71677 MP DELOGART 039688,000352: 16,3464 55677 TS DELOGART # 2(-SLOPE)(RATESQ)/CONACC 039689,000353: 16,3465 44767 CS BIT11 039690,000354: 16,3466 51702 INDEX I 039691,000355: 16,3467 00000 0 A 039692,000356: 16,3470 27622 RATEDEN ADS TEMREG # DENOMINATOR COMPLETED 039693,000357: 039694,000358: 16,3471 51702 INDEX I 039695,000359: 16,3472 01701 0 DELOGA 039696,000360: 16,3473 40000 COM 039697,000361: 16,3474 63732 AD DB 039698,000362: 16,3475 40000 COM 039699,000363: 16,3476 00006 EXTEND 039700,000364: 16,3477 73733 MP -SLOPE 039701,000365: 16,3500 27677 ADS DELOGART 039702,000366: 16,3501 33734 CA LMCRATE 039703,000367: 16,3502 00006 EXTEND 039704,000368: 16,3503 74767 MP BIT11 039705,000369: 16,3504 61677 RATENUM AD DELOGART # NUMERATOR COMPLETED 039706,000370: 039707,000371: 16,3505 56001 XCH L # PLACE NUMERATOR IN L FOR OVERFL. CHECK 039708,000372: 16,3506 35003 CA ZERO 039709,000373: 16,3507 00006 EXTEND 039710,000374: 16,3510 11622 DV TEMREG # OVERFLOW, IF ANYTHING, NOW APPEARS IN A 039711,000375: 16,3511 00006 EXTEND 039712,000376: 16,3512 13520 BZF DVOK # NO OVERFLOW....(0,L)/TEMREG = 0,L 039713,000377: 039714,000378: 16,3513 10000 MINLIMAP CCS A 039715,000379: 16,3514 34761 CAF POSMAX # POSITIVE OVERFLOW 039716,000380: 16,3515 13527 TCF ROLLSET 039717,000381: 16,3516 44761 CS POSMAX # NEGATIVE OVERFLOW 039718,000382: 16,3517 13527 TCF ROLLSET 039719,000383: 039720,000384: 16,3520 22000 DVOK LXCH A # PUT NUMERATOR BACK INTO A, 0 IN L 039721,000385: 16,3521 00006 EXTEND 039722,000386: 16,3522 11622 DV TEMREG # RESULT OF DIVISION IS DESIRED OGARATE 039723,000387: 16,3523 13527 TCF ROLLSET # (SCALED AT B-4 REV/SEC) 039724,000388: 039725,000389: 16,3524 43737 RATELIM CS MAXLIM 039726,000390: 16,3525 51702 INDEX I 039727,000391: 16,3526 00000 0 A # IF I = CA, DESIRED RATE IS -MAXLIM 039728,000392: 039729,000393: # COMPUTE JET FIRE TIME, BASED ON DESIRED RATE MINUS PRESENT RATE 039730,000394: 039731,000395: 16,3527 55622 ROLLSET TS TEMREG # STORE DESIRED OGARATE (SCALED B-4) 039732,000396: 16,3530 00006 EXTEND 039733,000397: 16,3531 61562 SU OGARATE # RATE DIFF. SCALED AT 2(-4) REV/SEC 039734,000398: 16,3532 55622 TS TEMREG # OVERFLOW PROTECT 039735,000399: 16,3533 13536 TCF +3 # " " 039736,000400: 16,3534 50000 INDEX A # " " 039737,000401: 16,3535 44762 CS LIMITS # " " 039738,000402: 16,3536 00006 EXTEND 039739,000403: 16,3537 77652 MP T6SCALE # T6SCALE = 8/10.24 039740,000404: 16,3540 00006 EXTEND 039741,000405: 16,3541 71660 MP 1/CONACC # SCALED AT B+9 SECSQ/REV (MAX < .60) 039742,000406: 16,3542 20001 DDOUBL 039743,000407: 16,3543 20001 DDOUBL 039744,000408: 16,3544 55622 TS TEMREG # OVERFLOW PROTECT 039745,000409: 16,3545 13550 TCF +3 # " " 039746,000410: 16,3546 50000 INDEX A # " " 039747,000411: 16,3547 44762 CS LIMITS # " " 039748,000412: 16,3550 55622 TS TEMREG # JET FIRE TIME AT 625 MICROSEC/BIT 039749,000413: 16,3551 00006 EXTEND # POS MEANS POSITIVE ROLL TORQUE. 039750,000414: 16,3552 13635 BZF NOROLL 039751,000415: 039752,000416: # JET FIRE TIME IS NZ, TEST FOR JETS NOW ON. 039753,000417: 039754,000418: 16,3553 31622 CAE TEMREG # DESIRED CHANGE IN OGARATE 039755,000419: 16,3554 00006 EXTEND 039756,000420: 16,3555 71620 MP ROLLFIRE # (SGN OF TORQUE..ZERO IF JETS NOW OFF) 039757,000421: 16,3556 10000 CCS A 039758,000422: 16,3557 13563 TCF MOREROLL # CONTINUE FIRING WITH PRESENT POLARITY 039759,000423: 16,3560 13566 TCF NEWROLL # START NEW FIRING NOW, PLUS 039760,000424: 16,3561 13635 TCF NOROLL # TERMINATE OLD FIRING, NEW SIGN REQUESTED 039761,000425: 16,3562 13566 TCF NEWROLL # START NEW FIRING NOW, MINUS 039762,000426: 039763,000427: # CONTINUE PRESENT FIRING 039764,000428: 039765,000429: 16,3563 35003 MOREROLL CAF ZERO 039766,000430: 16,3564 55702 TS I # USE TEMP. AS MOREROLL SWITCH 039767,000431: 16,3565 13577 TCF MAXTFIRE 039768,000432: 039769,000433: # START NEW FIRING, BUT CHECK IF GREATER THAN MIN FIRE TIME. 039770,000434: 039771,000435: 16,3566 11622 NEWROLL CCS TEMREG # CALL THIS T6FIRE 039772,000436: 16,3567 65001 AD ONE 039773,000437: 16,3570 13572 TCF +2 039774,000438: 16,3571 65001 AD ONE 039775,000439: 16,3572 40000 COM # -MAG(T6FIRE) 039776,000440: 16,3573 65012 AD TMINFIRE # TMINFIRE-MAG(T6FIRE) 039777,000441: 16,3574 40000 COM 039778,000442: 16,3575 00006 EXTEND 039779,000443: 16,3576 63635 MINTST BZMF NOROLL # IF NOT GREATER THAN TMINFIRE (NEW FIRE) 039780,000444: 039781,000445: # PROCEED WITH NEW FIRING, BUT NOT LONGER THAN TMAXFIRE. 039782,000446: 039783,000447: 16,3577 31622 MAXTFIRE CA TEMREG 039784,000448: 16,3600 00006 EXTEND 039785,000449: 16,3601 74777 MP 1/TMXFIR # I.E. 1/TMAXFIRE 039786,000450: 16,3602 00006 EXTEND 039787,000451: 16,3603 13611 MAXTST BZF NOMXFIRE # IF LESS THAN TMAXFIRE 039788,000452: 039789,000453: 16,3604 10000 CCS A 039790,000454: 16,3605 33740 CAF TMAXFIRE # USE MAXIMUM 039791,000455: 16,3606 13610 TCF +2 039792,000456: 16,3607 43740 CS TMAXFIRE # USE MAXIMUM 039793,000457: 16,3610 55622 TS TEMREG 039794,000458: 039795,000459: # SET UP SIGN OF REQUIRED TORQUE. 039796,000460: 039797,000461: 16,3611 11622 NOMXFIRE CCS TEMREG # FOR TORQUE SIGN 039798,000462: 16,3612 34761 CA POSMAX # POSITIVE TORQUE REQUIRED 039799,000463: 16,3613 13615 TCF +2 039800,000464: 16,3614 34763 CA NEGMAX # NEGATIVE TORQUE REQUIRED 039801,000465: 16,3615 55620 TS ROLLFIRE # SET ROLLFIRE FOR + OR - TORQUE 039802,000466: 039803,000467: 16,3616 40000 COM # COMPLEMENT... POS. FOR NEG. TORQUE 039804,000468: 16,3617 00006 EXTEND 039805,000469: 16,3620 63623 BZMF +3 # POSITIVE TORQUE REQUIRED 039806,000470: 16,3621 41622 CS TEMREG 039807,000471: 16,3622 55622 TS TEMREG 039808,000472: 039809,000473: 16,3623 31702 FIRELOOK CA I # IS IT MOREROLL 039810,000474: 16,3624 00006 EXTEND 039811,000475: 16,3625 13627 BZF FIREPLUG # YES 039812,000476: 16,3626 13640 TCF JETROLL # MAG(T6FIRE) NOW IN TEMREG 039813,000477: 039814,000478: 16,3627 30031 FIREPLUG CAE TIME6 # CHECK FOR EXTENDED FIRING 039815,000479: 16,3630 00006 EXTEND 039816,000480: 16,3631 61622 SU TEMREG 039817,000481: 16,3632 00006 EXTEND 039818,000482: 16,3633 65327 EXTENTST BZMF TASKOVER # IF EXTENSION WANTED, DONT, EXIT ROLL DAP 039819,000483: 16,3634 13640 TCF JETROLL 039820,000484: 039821,000485: 16,3635 45003 NOROLL CS ZERO # COAST....(NEG ZERO FOR TIME6) 039822,000486: 16,3636 55620 TS ROLLFIRE # NOTE, JETS CAN FIRE NEXT PASS 039823,000487: 16,3637 55622 TS TEMREG 039824,000488: 039825,000489: 16,3640 00006 JETROLL EXTEND 039826,000490: 16,3641 33731 DCA NOROL1T6 039827,000491: 16,3642 52111 DXCH T6LOC 039828,000492: 16,3643 31622 CA TEMREG # ENTER JET FIRING TIME 039829,000493: 16,3644 54031 TS TIME6 039830,000494: 039831,000495: 16,3645 31702 CA I # I=0 IF MOREROLL,KEEP SAME JETS ON 039832,000496: 16,3646 00006 EXTEND 039833,000497: 16,3647 15327 SAMEJETS BZF TASKOVER # IF JETS ON KEEP SAME JETS. EXIT ROLL DAP 039834,000498: 039835,000499: 16,3650 11620 CCS ROLLFIRE 039836,000500: 16,3651 13655 TCF +TORQUE 039837,000501: 16,3652 13716 TCF T6ENABL 039838,000502: 16,3653 13676 TCF -TORQUE 039839,000503: 16,3654 13716 TCF T6ENABL 039840,000504: 039841,000505: # PROCEED WITH PLUS TORQUE. 039842,000506: 039843,000507: 16,3655 31621 +TORQUE CA ROLLWORD # WHAT WAS THE LAST +TORQUE COMBINATION 039844,000508: 16,3656 75001 MASK BIT1 # WAS IT NO.9-11 039845,000509: 16,3657 00006 EXTEND 039846,000510: 16,3660 13670 BZF NO.9-11 # NOT 9-11, SO USE IT THIS TIME 039847,000511: 039848,000512: 16,3661 45001 NO.13-15 CS BIT1 039849,000513: 16,3662 71621 MASK ROLLWORD 039850,000514: 16,3663 55621 TS ROLLWORD # CHANGE BIT 1 TO ZERO 039851,000515: 16,3664 35026 CAF +ROLL2 039852,000516: 16,3665 00006 EXTEND 039853,000517: 16,3666 01006 WRITE CHAN6 039854,000518: 16,3667 13716 TCF T6ENABL 039855,000519: 039856,000520: 16,3670 35001 NO.9-11 CAF BIT1 # 1ST + JETS TO FIRE (MRCLEAN OS ROLLWORD) 039857,000521: 16,3671 27621 ADS ROLLWORD # CHANGE BIT 1 TO ONE 039858,000522: 16,3672 35004 CAF +ROLL1 039859,000523: 16,3673 00006 EXTEND 039860,000524: 16,3674 01006 WRITE CHAN6 039861,000525: 16,3675 13716 TCF T6ENABL 039862,000526: 039863,000527: 16,3676 31621 -TORQUE CA ROLLWORD # WHAT WAS LAST -TORQUE COMBINATION 039864,000528: 16,3677 75000 MASK BIT2 # WAS IT NO.12-10 039865,000529: 16,3700 00006 EXTEND 039866,000530: 16,3701 13711 BZF NO.12-10 # NOT 12-10, SO USE IT THIS TIME 039867,000531: 039868,000532: 16,3702 45000 NO.16-14 CS BIT2 039869,000533: 16,3703 71621 MASK ROLLWORD 039870,000534: 16,3704 55621 TS ROLLWORD # CHANGE BIT 2 TO ZERO 039871,000535: 16,3705 33741 CAF -ROLL2 039872,000536: 16,3706 00006 EXTEND 039873,000537: 16,3707 01006 WRITE CHAN6 039874,000538: 16,3710 13716 TCF T6ENABL 039875,000539: 039876,000540: 16,3711 35000 NO.12-10 CAF BIT2 # 1ST -JETS TO FIRE (MRCLEAN OS ROLLWORD) 039877,000541: 16,3712 27621 ADS ROLLWORD # CHANGE BIT 2 TO ONE 039878,000542: 16,3713 34355 CAF -ROLL1 039879,000543: 16,3714 00006 EXTEND 039880,000544: 16,3715 01006 WRITE CHAN6 039881,000545: 039882,000546: 16,3716 34763 T6ENABL CAF BIT15 039883,000547: 16,3717 00006 EXTEND 039884,000548: 16,3720 05013 WOR CHAN13 039885,000549: 16,3721 15327 RDAPEND TCF TASKOVER # EXIT ROLL DAP 039886,000550: 039887,000551: 039888,000552: # THIS T6 TASK SHUTS OFF ALL ROLL JETS 039889,000553: 039890,000554: 16,3722 22016 NOROLL1 LXCH BANKRUPT # SHUT OFF ALL (ROLL) JETS, (A T6 TASK 039891,000555: 16,3723 35003 CAF ZERO # CALLED BY ..JETROLL..) 039892,000556: 16,3724 55620 TS ROLLFIRE # ZERO INDICATES JETS NOW OFF 039893,000557: 16,3725 00006 EXTEND 039894,000558: 16,3726 01006 KILLJETS WRITE CHAN6 039895,000559: 16,3727 15340 TCF NOQRSM 039896,000560: 039897,000561: 039898,000562: # CONSTANTS FOR ROLL AUTOPILOT.... 039899,000563: 039900,000564: 16,3730 E6,1453 EBANK= CNTR 039901,000565: 16,3730 03722 34066 NOROL1T6 2CADR NOROLL1 039902,000566: 039903,000567: 16,3732 00344 DB DEC .01388889 # DEAD BAND (5 DEG), SC.AT B+0 REV 039904,000568: 039905,000569: 16,3733 06315 -SLOPE DEC 0.2 # -SWITCHLINE SLOPE(0.2 PER SEC) SC.AT B+0 039906,000570: # PER SEC 039907,000571: 16,3734 00111 LMCRATE DEC .00027778 B+4 # LIMIT CYCLE RATE (0.1 DEG/SEC) SC.AT 039908,000572: # B-4 REV/SEC 039909,000573: 16,3735 00510 INTERCEP DEC .0025 B+3 # DB(-SLOPE) - LMCRATE, SC.AT B-3 REV/SC 039910,000574: 039911,000575: 16,3736 01330 MINLIM DEC .00277778 B+4 # RATELIM,MIN (1DEG/SEC), SC.AT B-4 REV/SC 039912,000576: 039913,000577: 16,3737 07071 MAXLIM DEC .01388889 B+4 # RATELIM,MAX (5DEG/SEC), SC.AT B-4 REV/SC 039914,000578: 039915,000579: # TMINFIRE DEC 1.5 B+4 15 MS (14MIN), SC.AT 16 BITS/CS 039916,000580: 16,3740 5012 TMINFIRE = BITS4&5 039917,000581: 039918,000582: 16,3740 07640 TMAXFIRE DEC 250 B+4 # 2.5 SEC, SC.AT 16 BITS/CS 039919,000583: 039920,000584: 16,3741 4777 1/TMXFIR = BIT3 # RECIPROCAL THEREOF, SHIFTED 14 RIGHT, 039921,000585: # ROUNDS TO OCT00004, SO ALLOWS 2.56 039922,000586: # SEC FIRINGS BEFORE APPLYING LIMIT 039923,000587: 16,3741 7652 T6SCALE = PRIO31 # (B+3) (16 BITS/CS) (100CS/SEC) 039924,000588: 039925,000589: 16,3741 5004 +ROLL1 = FIVE # ONBITS FOR JETS 9 AND 11 039926,000590: 16,3741 5026 +ROLL2 = OCT120 # ONBITS FOR JETS 13 AND 15 039927,000591: 16,3741 4355 -ROLL1 = TEN # ONBITS FOR JETS 12 NAD 10 039928,000592: 16,3741 00240 -ROLL2 OCT 240 # ONBITS FOR JETS 16 AND 14 End of include-file TVCROLLDAP.agc. Parent file is MAIN.agc