Source Code
These source-code files are part of a reconstructed copy of Comanche 45, the
second release, though not the final mission release, of the Apollo 10
Command Module (CM) Apollo Guidance Computer (AGC) software. Comanche 45 was
preceded by Comanche 44 and followed by Comanche 45/2 (the flown release). The reconstruction
is believed to be exactly accurate, but in the absence of an actual Apollo-era
listing of Comanche 45, some explanation of the reconstruction process is needed
to insure confidence in that accuracy.
The starting point was the source code of Comanche 44 (itself previously accurately reconstructed). Comanche 44 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 44 and 45. The now-reconstructed Comanche 45 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 listing. Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository. |
043051,000002: ## Copyright: Public domain.
043052,000003: ## Filename: TVCROLLDAP.agc
043053,000004: ## Purpose: A section of Comanche revision 045.
043054,000005: ## It is part of the reconstructed source code for the
043055,000006: ## second release of the flight software for the Command
043056,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
043057,000008: ## The code has been recreated from a copy of Comanche 055. It
043058,000009: ## has been adapted such that the resulting bugger words
043059,000010: ## exactly match those specified for Comanche 45 in NASA drawing
043060,000011: ## 2021153D, which gives relatively high confidence that the
043061,000012: ## reconstruction is correct.
043062,000013: ## Assembler: yaYUL
043063,000014: ## Contact: Ron Burkey <info@sandroid.org>.
043064,000015: ## Website: www.ibiblio.org/apollo/index.html
043065,000016: ## Mod history: 2020-12-06 MAS Created from Comanche 44.
043066,000017:
Page 984 |
043068,000019: # PROGRAM NAME...TVC ROLL AUTOPILOT
043069,000020: # LOG SECTION...TVCROLLDAP SUBROUTINE...DAPCSM
043070,000021: # MODIFIED BY SCHLUNDT 21 OCTOBER 1968
043071,000022:
043072,000023: # FUNCTIONAL DESCRIPTION....
043073,000024:
043074,000025: # *AN ADAPTATION OF THE LEM P-AXIS CONTROLLER
043075,000026: # *MAINTAIN OGA WITHIN 5 DEG DEADBND OF OGAD, WHERE OGAD = OGA AS SEEN
043076,000027: # BY IGNITION (P40)
043077,000028: # *MAINTAIN OGA RATE LESS THAN 0.1 DEG/SEC LIMIT CYCLE RATE
043078,000029: # *SWITCHING LOGIC IN PHASE PLANE.... SEE GSOP CHAPTER 3
043079,000030: # *USES T6 CLOCK TO TIME JET FIRINGS
043080,000031: # *MAXIMUM JET FIRING TIME = 2.56 SECONDS, LIMITED TO 2.5 IF GREATER
043081,000032: # *MINIMUM JET FIRING TIME = 15 MS
043082,000033: # *JET PAIRS FIRE ALTERNATELY
043083,000034: # *AT LEAST 1/2 SECOND DELAY BEFORE A NEW JET PAIR IS FIRED
043084,000035: # *JET FIRINGS MAY NOT BE EXTENDED, ONLY SHORTENED, WHEN RE-EVALUATION
043085,000036: # OF A JET FIRING TIME IS MADE ON A LATER PASS
043086,000037:
043087,000038: # CALLING SEQUENCE....
043088,000039:
043089,000040: # *ROLLDAP CALL VIA WAITLIST, IN PARTICULAR BY TVCEXEC (EVERY 1/2 SEC)
043090,000041: # WITH A 3CS DELAY TO ALLOW FREE TIME FOR OTHER RUPTS (DWNRPT, ETC.)
043091,000042:
043092,000043: # NORMAL EXIT MODES.... ENDOFJOB
043093,000044:
043094,000045: # ALARM OR ABORT EXIT MODES.... NONE
043095,000046:
043096,000047: # SUBROUTINES CALLED.....NONE
043097,000048:
043098,000049: # OTHER INTERFACES....
043099,000050:
043100,000051: # *TVCEXEC SETS UP ROLLDAP TASK EVERY 1/2 SECOND AND UPDATES 1/CONACC
043101,000052: # EVERY 10 SECONDS (VIA MASSPROP AND S40.15)
043102,000053: # *RESTARTS SUSPEND ROLL DAP COMPUTATIONS UNTIL THE NEXT 1/2 SEC
043103,000054: # SAMPLE PERIOD. (THE PART OF TVCEXECUTIVE THAT CALLS ROLL DAP IS
043104,000055: # NOT RESTARTED.) THE OGAD FROM IGNITION IS MAINTAINED.
043105,000056:
043106,000057: # ERASABLE INITIALIZATION REQUIRED....
043107,000058:
043108,000059: # *1/CONACC (S40.15)
043109,000060: # *OGAD (CDUX AT IGNITION)
043110,000061: # *OGANOW (CDUX AT TVCINIT4 AND TVCEXECUTIVE)
043111,000062: # *OGAPAST (OGANOW AT TVCEXECUTIVE)
043112,000063: # *ROLLFIRE = TEMREG = ROLLWORD = 0 (MRCLEAN LOOP IN TVCDAPON)
043113,000064:
043114,000065: # OUTPUT....
043115,000066:
043116,000067: # *ROLL JET PAIR FIRINGS
043117,000068:
Page 985 |
043119,000070: # DEBRIS.... MISCELLANEOUS, SHAREABLE WITH RCS/ENTRY, IN EBANK6 ONLY
043120,000071:
Page 986 |
043122,000073: # SOME NOTES ON THE ROLL AUTOPILOT, AND IN PARTICULAR, ON ITS SWITCHING
043123,000074: # LOGIC. SEE SECTION THREE OF THE GSOP (SUNDISK/COLOSSUS) FOR DETAILS.
043124,000075:
043125,000076: # SWITCHING LOGIC IN THE PHASE PLANE....
043126,000077:
043127,000078: # OGARATE
043128,000079: # *
043129,000080: # *
043130,000081: # * * * * * * * * * * * *
043131,000082: # * (REGION 1, SEE TEXT BELOW)
043132,000083: # * *
043133,000084: # *
043134,000085: # * * * * * * * (COAST) * ...PARABOLA (SWITCHING = CONTROL)
043135,000086: # * * .
043136,000087: # * * *
043137,000088: # * * (FIRE NEG ROLL JETS)
043138,000089: # * * *
043139,000090: # (-DB,+LMCRATE)....* *
043140,000091: # * * *
043141,000092: # * * OGAERROR
043142,000093: # ************************************************************************
043143,000094: # * * (-AK, OGAERR)
043144,000095: # * * * (REGION 6-PRIME)
043145,000096: # * * (SEE TEXT BELOW)
043146,000097: # * * *
043147,000098: # * * ...STRAIGHT LINE
043148,000099: # (FIRE POS ROLL JETS) * * * .
043149,000100: # * (COAST) *
043150,000101: # * * * * * * * * * * *
043151,000102: # * -MINLIM
043152,000103: # * *
043153,000104: # *
043154,000105: # * * * * * * * * * * * * * * * *
043155,000106: # * -MAXLIM
043156,000107: # *
043157,000108: # *
043158,000109:
043159,000110: # SWITCHING PARABOLAS ARE CONTROL PARABOLAS, THUS REQUIRING KNOWLEDGE OF
043160,000111: # CONTROL ACCELERATION CONACC, OR ITS RECIPROCAL, 1/CONACC, THE TVC
043161,000112: # ROLL DAP GAIN (SEE TVCEXECUTIVE VARIABLE GAIN PACKAGE). JET
043162,000113: # FIRING TIME IS SIMPLY THAT REQUIRED TO ACHIEVE THE DESIRED OGARATE,
043163,000114: # SUBJECT TO THE LIMITATIONS DISCUSSED UNDER FUNCTIONAL DESCRIPTION,
043164,000115: # ABOVE.
043165,000116:
043166,000117: # THE THREE CONTROL REGIONS (+, -, AND ZERO TORQUE) ARE COMPRIZED OF
043167,000118: # TWELVE SUBSET REGIONS ( 1...6, AND THE CORRESPONDING 1-PRIME...
043168,000119: # 6-PRIME ) SEE SECTION 3 OF THE GSOP (SUNDISK OR COLOSSUS)
Page 987 |
043170,000121:
043171,000122: # GIVEN THE OPERATING POINT NOT IN THE COAST REGION, THE DESIRED OGARATE
043172,000123: # IS AT THE POINT OF PENETRATION OF THE COAST REGION BY THE CONTROL
043173,000124: # PARABOLA WHICH PASSES THROUGH THE OPERATING POINT. FOR REGION 3
043174,000125: # DESIRED OGARATE IS SIMPLY +-MAXLIM. FOR REGIONS 1 OR 6 THE SOLUTION
043175,000126: # TO A QUADRATIC IS REQUIRED (THE PENETRATION IS ALONG THE STRAIGHT
043176,000127: # LINE OR MINLIM BOUNDRY SWITCH LINES). AN APPROXIMATION IS MADE
043177,000128: # INSTEAD. TAKE AN OPERATING POINT IN REGION 6'. PASS A TANGENT TO
043178,000129: # THE CONTROL PARABOLA THROUGH THE OPERATING POINT, AND FIND ITS
043179,000130: # INTERSECTION WITH THE STRAIGHT LINE SECTION OF THE SWITCH CURVE...
043180,000131: # THE INTERSECTION DEFINES DESIRED OGARATE. IF THE OPERATING POINT IS
043181,000132: # CLOSE TO THE SWITCH LINE, THE APPROXIMATION IS QUITE GOOD (INDEED
043182,000133: # THE APPROXIMATE AND QUADRATIC SOLUTIONS CONVERGE IN THE LIMIT AS
043183,000134: # THE SWITCH LINE IS APPROACHED). IF THE OPERATING POINT IS NOT CLOSE
043184,000135: # TO THE SWITCH LINE, THE APPROXIMATE SOLUTION GIVES VALID TREND
043185,000136: # INFORMATION (DIRECTION OF DESIRED OGARATE) AT LEAST. THE
043186,000137: # RE-EVALUATION OF DESIRED OGARATE IN SUBSEQUENT ROLL DAP PASSES (1/2
043187,000138: # SECOND INTERVALS) WILL BENEFIT FROM THE CONVERGENT NATURE OF THE
043188,000139: # APPROXIMATION.
043189,000140:
043190,000141: # FOR LARGE OGAERROR THE TANGENT INTERSECTS +-MINLIM SWITCH BOUNDRY BEFORE
043191,000142: # INTERSECTING THE STRAIGHT LINE SWITCH. HOWEVER THE MINLIM IS
043192,000143: # IGNORED IN COMPUTING THE FIRING TIME, SO THAT THE EXTENSION (INTO
043193,000144: # THE COAST REGION) OF THE STRAIGHT LINE SWITCH IS WHAT IS FIRED TO.
043194,000145: # IF THE ROLL DAP FINDS ITSELF IN THE COAST REGION BEFORE REACHING
043195,000146: # THE DESIRED INTERSECTION (IE, IN THE REGION BETWEEN THE MINLIM
043196,000147: # AND THE STRAIGHT LINE SWITCH) IT WILL EXIBIT NORMAL COAST-REGION
043197,000148: # BEHAVIOR AND TURN OFF THE JETS. THE PURPOSE OF THIS FIRING POLICY
043198,000149: # IS TO MAINTAIN STATIC ROLL STABILITY IN THE EVENT OF A JET
043199,000150: # FAILED-ON.
043200,000151:
043201,000152: # WHEN THE OPERATING POINT IS IN REGION 1 THE SAME APPROXIMATION IS
043202,000153: # MADE, BUT AT AN ARTIFICIALLY-CREATED OR DUMMY OPERATING POINT,
043203,000154: # DEFINED BY.. OGAERROR = INTERSECTION OF CONTROL PARABOLA AND
043204,000155: # OGAERROR AXIS, OGARATE = +-LMCRATE WHERE SIGN IS OPPOSITE THAT OF
043205,000156: # REAL OPERATING POINT RATE. WHEN THE OPERATING POINT HAS PASSED
043206,000157: # FROM REGION 1 TO REGION 6', THE DUMMY POINT IS NO LONGER REQUIRED,
043207,000158: # AND THE SOLUTION REVERTS TO THAT OF A REGULAR REGION 6' POINT.
043208,000159:
043209,000160: # EQUATION FOR SWITCHING PARABOLA (SEE FIGURE ABOVE)....
043210,000161: # 2
043211,000162: # SOGAERROR = (DB - (SOGARATE) (1/CONACC)/2) SGN(SOGARATE)
043212,000163:
043213,000164: # EQUATION FOR SWITCHING STRAIGHT LINE SEGMENT....
043214,000165:
043215,000166: # SOGARATE = -(-SLOPE)(SOGAERROR) - SGN(SOGARATE) INTERCEP
043216,000167:
043217,000168: # WHERE INTERCEP = DB(-SLOPE) - LMCRATE
Page 988 |
043219,000170:
043220,000171: # EQUATION FOR INTERSECTION, CONTROL PARABOLA AND STRAIGHT SWITCH LINE....
043221,000172:
043222,000173: # DOGADOT = NUM/DEN, WHERE
043223,000174: # 2
043224,000175: # NUM = (-SLOPE)(OGARATE) (1/CONACC)
043225,000176: # +SGN(DELOGA)(-SLOPE)(OGAERROR - SGN(DELOGA)(DB))
043226,000177: # +LMCRATE
043227,000178:
043228,000179: # DEN = (-SLOPE)(LMCRATE)(1/CONACC) - SGN(DELOGA)
043229,000180: # 2
043230,000181: # DELOGA = OGAERROR - (DB - OGARATE (1/CONACC)/2)SGN(OGARATE)
043231,000182:
043232,000183: # FOR REGIONS 6 AND 6-PRIME USE ACTUAL OPERATING POINT (OGA, OGARATE)
043233,000184: # FOR OGAERROR AND OGARATE IN THE INTERSECTION EQUATIONS ABOVE.
043234,000185: # FOR REGIONS 1 AND 1-PRIME USE DUMMY OPERATING POINT FOR OGAERROR
043235,000186: # AND OGARATE, WHERE THE DUMMY POINT IS GIVEN BY....
043236,000187:
043237,000188: # OGAERROR = DELOGA + DB SGN(OGARATE)
043238,000189:
043239,000190: # OGARATE = -LMCRATE SGN(OGARATE)
043240,000191:
043241,000192: # NOTE, OGAERROR = OGA - OGAD USES DUMMY REGISTER OGA IN ROLL DAP CODING
043242,000193: # ALSO, AT POINT WHERE DOGARATE IS COMPUTED, REGISTER DELOGA IS USED
043243,000194: # AS A DUMMY REGISTER FOR THE OGAERROR IN THE NUM EQUATION ABOVE
Page 989 |
043245,000196:
043246,000197: # ROLLDAP CODING....
043247,000198:
043248,000199: 16,2000 SETLOC DAPROLL
043249,000200: 16,2000 BANK
043250,000201: 16,3267 E6,1662 EBANK= OGANOW
043251,000202: 16,3267 COUNT* $$/ROLL
043252,000203: 16,3267 31662 ROLLDAP CAE OGANOW # OGA RATE ESTIMATOR...SIMPLE FIRST-ORDER
043253,000204: 16,3270 00006 EXTEND # DIFFERENCE (SAMPLE TIME = 1/2 SEC)
043254,000205: 16,3271 21663 MSU OGAPAST
043255,000206: 16,3272 00006 EXTEND
043256,000207: 16,3273 75013 MP BIT5
043257,000208: 16,3274 22000 LXCH A
043258,000209: 16,3275 55533 TS OGARATE # SC.AT B-4 REV/SEC
043259,000210:
043260,000211: # COMPUTATIONS WHICH FOLLOW USE OGA FOR OGAERR (SAME REGISTER)
043261,000212: # EXAMINE DURATION OF LAST JET FIRING IF JETS NOW ON.
043262,000213:
043263,000214: 16,3276 31571 DURATION CA ROLLFIRE # SAME SGN AS PRESENT TORQ,MAGN=POSMAX
043264,000215: 16,3277 00006 EXTEND
043265,000216: 16,3300 13302 BZF +2 # ROLL JETS ARE NOW OFF.
043266,000217: 16,3301 13310 TCF ROLLOGIC # ENTER LOGIC, JETS NOW ON.
043267,000218:
043268,000219: 16,3302 31573 CAE TEMREG # EXAMINE LAST FIRING INTERVAL
043269,000220: 16,3303 00006 EXTEND # IF POSITIVE, DONT FIRE
043270,000221: 16,3304 13310 BZF ROLLOGIC # ENTER LOGIC, JETS NOW OFF.
043271,000222:
043272,000223: 16,3305 35021 CAF ZERO # JETS HAVE NOT BEEN OFF FOR 1/2 SEC. WAIT
043273,000224: 16,3306 55573 TS TEMREG # RESET TEMREG
043274,000225: 16,3307 15324 WAIT1/2 TCF TASKOVER # EXIT ROLL DAP
043275,000226:
043276,000227: # COMPUTE DB-(1/2 CONACC) (OGARATE)SQ (1/2 IN THE SCALING)
043277,000228:
043278,000229: 16,3310 41533 ROLLOGIC CS OGARATE # SCALED AT 2(-4) REV/SEC
043279,000230: 16,3311 00006 EXTEND
043280,000231: 16,3312 71640 MP 1/CONACC # SCALED AT 2(+9) SEC SQ /REV
043281,000232: 16,3313 00006 EXTEND
043282,000233: 16,3314 71533 MP OGARATE
043283,000234: 16,3315 63703 AD DB # SCALED AT 2(+0) REV
043284,000235: 16,3316 55573 TS TEMREG # QUANTITY SCALED AT 2(+0) REV.
043285,000236:
043286,000237: # GET SIGN OF OGARATE
043287,000238:
043288,000239: 16,3317 31533 CA OGARATE
043289,000240: 16,3320 00006 EXTEND
043290,000241: 16,3321 63324 BZMF +3 # LET SGN(0) BE NEGATIVE
043291,000242: 16,3322 35017 CA BIT1
043292,000243: 16,3323 13325 TCF +2
043293,000244: 16,3324 45017 CS BIT1
043294,000245: 16,3325 55666 TS SGNRT # + OR - 2(-14)
043295,000246:
Page 990 |
043297,000248: # CALCULATE DISTANCE FROM SWITCH PARABOLA (DELOGA)
043298,000249: 16,3326 00006 EXTEND
043299,000250: 16,3327 71573 MP TEMREG # SGN(OGARATE) TEMREG NOW IN L
043300,000251: 16,3330 40001 CS L
043301,000252: 16,3331 61664 AD OGA # SCALED AT 2(+0) REV
043302,000253: 16,3332 55667 DELOGAC TS DELOGA # SCALE B+0 REV, PLUS TO RIGHT OF C-PARAB
043303,000254:
043304,000255: # EXAMINE SGN(DELOGA) AND CREATE CA OR CS INSTR. DEPENDING UPON SIGN.
043305,000256:
043306,000257: 16,3333 00006 EXTEND
043307,000258: 16,3334 63337 BZMF +3
043308,000259: 16,3335 34371 CAF PRIO30 # = CA (30000)
043309,000260: 16,3336 13340 TCF +2
043310,000261: 16,3337 35001 CAF BIT15 # = CS (40000)
043311,000262: 16,3340 55670 TS I
043312,000263:
043313,000264: 16,3341 51670 INDEX I # TSET ON I SGN(OGARATE)
043314,000265: 16,3342 01666 0 SGNRT # CA OR CS
043315,000266: 16,3343 40000 COM
043316,000267: 16,3344 00006 EXTEND
043317,000268: 16,3345 63416 REG1TST BZMF ROLLON # IF REGION 1 (DELOGA OGARATE SAME SIGN)
043318,000269:
043319,000270: # NO JET FIRE YET, TEST FOR MAX OGARATE
043320,000271:
043321,000272: 16,3346 51670 INDEX I
043322,000273: 16,3347 01533 0 OGARATE # CA OR CS...BOTH MUST BE NEG. HERE
043323,000274: 16,3350 55671 TS IOGARATE # I.E. I OGARATE
043324,000275: 16,3351 63711 AD MAXLIM # SCALED AT 2(-4) REV/SEC
043325,000276: 16,3352 00006 EXTEND
043326,000277: 16,3353 63475 REG3TST BZMF RATELIM # IF REGION 3 (RATES TOO HIGH, FIRE JETS)
043327,000278:
043328,000279: # COMPUTATION OF I((-SLOPE)OGA + OGARATE) - INTERCEPT..NOTE THAT STR. LINE
043329,000280: # SWITCH SLOPE IS (SLOPE) DEG/SEC/DEG, A NEG QUANTITY
043330,000281:
043331,000282: 16,3354 31533 CA OGARATE
043332,000283: 16,3355 00006 EXTEND
043333,000284: 16,3356 75002 MP BIT14
043334,000285: 16,3357 55573 TS TEMREG
043335,000286: 16,3360 31664 CA OGA
043336,000287: 16,3361 00006 EXTEND
043337,000288: 16,3362 73704 MP -SLOPE
043338,000289: 16,3363 20001 DDOUBL
043339,000290: 16,3364 20001 DDOUBL
043340,000291: 16,3365 20001 DDOUBL # (OGA ERROR MUST BE LESS THAN +-225 DEG)
043341,000292: 16,3366 61573 AD TEMREG
043342,000293:
043343,000294: 16,3367 51670 INDEX I
043344,000295: 16,3370 00000 0 A # I((-SLOPE)OGA+OGARATE) AT 2(-3)REV/SEC
043345,000296: 16,3371 40000 COM
Page 991 |
043347,000298: 16,3372 63706 AD INTERCEP # SCALED AT 2(-3) REV.
043348,000299: 16,3373 40000 COM
043349,000300: 16,3374 00006 EXTEND
043350,000301: 16,3375 63606 REG2TST BZMF NOROLL # IF REGION 2 (COAST SIDE OF STRT LINE)
043351,000302:
043352,000303: # CHECK TO SEE IF OGARATE IS ABOVE MINLIM BOUNDARY
043353,000304:
043354,000305: 16,3376 31671 CA IOGARATE # ALWAYS NEGATIVE
043355,000306: 16,3377 63707 AD MINLIM # SCALED AT 2(-4) REV/SEC
043356,000307: 16,3400 00006 EXTEND
043357,000308: 16,3401 63606 REG4TST BZMF NOROLL # IF REGION 4 (COAST SIDE OF MINLIM)
043358,000309:
043359,000310: # ALL AREAS CHECKED EXCEPT LAST AREA...NO FIRE IN THIS SMALL SEGMENT
043360,000311:
043361,000312: 16,3402 51670 INDEX I
043362,000313: 16,3403 01664 0 OGA
043363,000314: 16,3404 40000 COM
043364,000315: 16,3405 63703 AD DB
043365,000316: 16,3406 40000 COM
043366,000317: 16,3407 00006 EXTEND
043367,000318: 16,3410 63606 REG5TST BZMF NOROLL # IF REGION 5 (COAST SIDE OF DB)
043368,000319:
043369,000320: # JETS MUST FIRE NOW. OGARATE IS NEG. (OR VISA VERSA). USE DIRECT STR. LINE.
043370,000321: # DELOGA AND DELOGART ARE USED AS DUMMY VARIABLES IN THE SOLUTION OF A
043371,000322: # STRAIGHT LINE APPROXIMATION TO A QUADRATIC SOLUTION OF THE INTERSECTION
043372,000323: # OF THE CONTROL PARABOLA AND THE STRAIGHT-LINE SWITCH LINE. THE STRAIGHT
043373,000324: # LINE IS THE TANGENT TO THE CONTROL PARABOLA AT THE OPERATING POINT. (FOR
043374,000325: # OPERATING POINTS IN REGIONS 6 OR 6')
043375,000326:
043376,000327: 16,3411 31664 REGION6 CAE OGA # USE ACTUAL OPERATING POINT FOR TANGENT
043377,000328: 16,3412 55667 TS DELOGA # ACTUAL STATE
043378,000329: 16,3413 31533 CA OGARATE
043379,000330: 16,3414 55665 TS DELOGART # ACTUAL STATE, I.E. DEL OGARATE
043380,000331: 16,3415 13425 TCF ONROLL
043381,000332:
043382,000333: # JETS ALSO FIRE FROM HERE EXCEPT OGARATE IS POS (VISA VERSA), USE INDIRECT
043383,000334: # STRAIGHT LINE ESTABLISHED BY TANGENT TO A CONTROL PARABOLA AT ((DELOGA
043384,000335: # + DB SGN(DELOGA) ), -LMCRATE SGN(DELOGA) ) (THIS IS THE DUMMY
043385,000336: # OPERATING POINT FOR OPERATING POINTS IN REGIONS 1 AND 1')
043386,000337:
043387,000338: 16,3416 51670 ROLLON INDEX I
043388,000339: 16,3417 03703 0 DB
043389,000340: 16,3420 27667 ADS DELOGA # DELOGA WAS DIST. FROM SWITCH PARABOLA
043390,000341:
043391,000342: 16,3421 43705 CS LMCRATE # LIMIT CYCLE RATE AT 2(-4) REV/SEC
043392,000343: 16,3422 51670 INDEX I
043393,000344: 16,3423 00000 0 A
043394,000345: 16,3424 55665 TS DELOGART # EVALUATE STATE FOR INDIRECT LINE.
043395,000346:
Page 992 |
043397,000348: # SOLVE STRAIGHT LINES SIMULTANEOUSLY TO OBTAIN DESIRED OGARATE.
043398,000349:
043399,000350: 16,3425 00006 ONROLL EXTEND # DELOGART IN ACC. ON ARRIVAL
043400,000351: 16,3426 71640 MP 1/CONACC
043401,000352: 16,3427 60000 DOUBLE
043402,000353: 16,3430 00006 EXTEND
043403,000354: 16,3431 73704 MP -SLOPE
043404,000355: 16,3432 55573 TS TEMREG # 2(-SLOPE)RATE /CONACC
043405,000356: 16,3433 00006 EXTEND
043406,000357: 16,3434 71665 MP DELOGART
043407,000358: 16,3435 55665 TS DELOGART # 2(-SLOPE)(RATESQ)/CONACC
043408,000359: 16,3436 45005 CS BIT11
043409,000360: 16,3437 51670 INDEX I
043410,000361: 16,3440 00000 0 A
043411,000362: 16,3441 27573 RATEDEN ADS TEMREG # DENOMINATOR COMPLETED
043412,000363:
043413,000364: 16,3442 51670 INDEX I
043414,000365: 16,3443 01667 0 DELOGA
043415,000366: 16,3444 40000 COM
043416,000367: 16,3445 63703 AD DB
043417,000368: 16,3446 40000 COM
043418,000369: 16,3447 00006 EXTEND
043419,000370: 16,3450 73704 MP -SLOPE
043420,000371: 16,3451 27665 ADS DELOGART
043421,000372: 16,3452 33705 CA LMCRATE
043422,000373: 16,3453 00006 EXTEND
043423,000374: 16,3454 75005 MP BIT11
043424,000375: 16,3455 61665 RATENUM AD DELOGART # NUMERATOR COMPLETED
043425,000376:
043426,000377: 16,3456 56001 XCH L # PLACE NUMERATOR IN L FOR OVERFL. CHECK
043427,000378: 16,3457 35021 CA ZERO
043428,000379: 16,3460 00006 EXTEND
043429,000380: 16,3461 11573 DV TEMREG # OVERFLOW, IF ANYTHING, NOW APPEARS IN A
043430,000381: 16,3462 00006 EXTEND
043431,000382: 16,3463 13471 BZF DVOK # NO OVERFLOW....(0,L)/TEMREG = 0,L
043432,000383:
043433,000384: 16,3464 10000 MINLIMAP CCS A
043434,000385: 16,3465 34777 CAF POSMAX # POSITIVE OVERFLOW
043435,000386: 16,3466 13500 TCF ROLLSET
043436,000387: 16,3467 44777 CS POSMAX # NEGATIVE OVERFLOW
043437,000388: 16,3470 13500 TCF ROLLSET
043438,000389:
043439,000390: 16,3471 22000 DVOK LXCH A # PUT NUMERATOR BACK INTO A, 0 IN L
043440,000391: 16,3472 00006 EXTEND
043441,000392: 16,3473 11573 DV TEMREG # RESULT OF DIVISION IS DESIRED OGARATE
043442,000393: 16,3474 13500 TCF ROLLSET # (SCALED AT B-4 REV/SEC)
043443,000394:
043444,000395: 16,3475 43711 RATELIM CS MAXLIM
043445,000396: 16,3476 51670 INDEX I
Page 993 |
043447,000398: 16,3477 00000 0 A # IF I = CA, DESIRED RATE IS -MAXLIM
043448,000399:
043449,000400: # COMPUTE JET FIRE TIME, BASED ON DESIRED RATE MINUS PRESENT RATE
043450,000401:
043451,000402: 16,3500 55573 ROLLSET TS TEMREG # STORE DESIRED OGARATE (SCALED B-4)
043452,000403: 16,3501 00006 EXTEND
043453,000404: 16,3502 61533 SU OGARATE # RATE DIFF. SCALED AT 2(-4) REV/SEC
043454,000405: 16,3503 55573 TS TEMREG # OVERFLOW PROTECT
043455,000406: 16,3504 13507 TCF +3 # " "
043456,000407: 16,3505 50000 INDEX A # " "
043457,000408: 16,3506 45000 CS LIMITS # " "
043458,000409: 16,3507 00006 EXTEND
043459,000410: 16,3510 77665 MP T6SCALE # T6SCALE = 8/10.24
043460,000411: 16,3511 00006 EXTEND
043461,000412: 16,3512 71640 MP 1/CONACC # SCALED AT B+9 SECSQ/REV (MAX < .60)
043462,000413: 16,3513 20001 DDOUBL
043463,000414: 16,3514 20001 DDOUBL
043464,000415: 16,3515 55573 TS TEMREG # OVERFLOW PROTECT
043465,000416: 16,3516 13521 TCF +3 # " "
043466,000417: 16,3517 50000 INDEX A # " "
043467,000418: 16,3520 45000 CS LIMITS # " "
043468,000419: 16,3521 55573 TS TEMREG # JET FIRE TIME AT 625 MICROSEC/BIT
043469,000420: 16,3522 00006 EXTEND # POS MEANS POSITIVE ROLL TORQUE.
043470,000421: 16,3523 13606 BZF NOROLL
043471,000422:
043472,000423: # JET FIRE TIME IS NZ, TEST FOR JETS NOW ON.
043473,000424:
043474,000425: 16,3524 31573 CAE TEMREG # DESIRED CHANGE IN OGARATE
043475,000426: 16,3525 00006 EXTEND
043476,000427: 16,3526 71571 MP ROLLFIRE # (SGN OF TORQUE..ZERO IF JETS NOW OFF)
043477,000428: 16,3527 10000 CCS A
043478,000429: 16,3530 13534 TCF MOREROLL # CONTINUE FIRING WITH PRESENT POLARITY
043479,000430: 16,3531 13537 TCF NEWROLL # START NEW FIRING NOW, PLUS
043480,000431: 16,3532 13606 TCF NOROLL # TERMINATE OLD FIRING, NEW SIGN REQUESTED
043481,000432: 16,3533 13537 TCF NEWROLL # START NEW FIRING NOW, MINUS
043482,000433:
043483,000434: # CONTINUE PRESENT FIRING
043484,000435:
043485,000436: 16,3534 35021 MOREROLL CAF ZERO
043486,000437: 16,3535 55670 TS I # USE TEMP. AS MOREROLL SWITCH
043487,000438: 16,3536 13550 TCF MAXTFIRE
043488,000439:
043489,000440: # START NEW FIRING, BUT CHECK IF GREATER THAN MIN FIRE TIME.
043490,000441:
043491,000442: 16,3537 11573 NEWROLL CCS TEMREG # CALL THIS T6FIRE
043492,000443: 16,3540 65017 AD ONE
043493,000444: 16,3541 13543 TCF +2
043494,000445: 16,3542 65017 AD ONE
043495,000446: 16,3543 40000 COM # -MAG(T6FIRE)
043496,000447: 16,3544 63712 AD TMINFIRE # TMINFIRE-MAG(T6FIRE)
Page 994 |
043498,000449: 16,3545 40000 COM
043499,000450: 16,3546 00006 EXTEND
043500,000451: 16,3547 63606 MINTST BZMF NOROLL # IF NOT GREATER THAN TMINFIRE (NEW FIRE)
043501,000452:
043502,000453: # PROCEED WITH NEW FIRING, BUT NOT LONGER THAN TMAXFIRE.
043503,000454:
043504,000455: 16,3550 31573 MAXTFIRE CA TEMREG
043505,000456: 16,3551 00006 EXTEND
043506,000457: 16,3552 75015 MP 1/TMXFIR # I.E. 1/TMAXFIRE
043507,000458: 16,3553 00006 EXTEND
043508,000459: 16,3554 13562 MAXTST BZF NOMXFIRE # IF LESS THAN TMAXFIRE
043509,000460:
043510,000461: 16,3555 10000 CCS A
043511,000462: 16,3556 33713 CAF TMAXFIRE # USE MAXIMUM
043512,000463: 16,3557 13561 TCF +2
043513,000464: 16,3560 43713 CS TMAXFIRE # USE MAXIMUM
043514,000465: 16,3561 55573 TS TEMREG
043515,000466:
043516,000467: # SET UP SIGN OF REQUIRED TORQUE.
043517,000468:
043518,000469: 16,3562 11573 NOMXFIRE CCS TEMREG # FOR TORQUE SIGN
043519,000470: 16,3563 34777 CA POSMAX # POSITIVE TORQUE REQUIRED
043520,000471: 16,3564 13566 TCF +2
043521,000472: 16,3565 35001 CA NEGMAX # NEGATIVE TORQUE REQUIRED
043522,000473: 16,3566 55571 TS ROLLFIRE # SET ROLLFIRE FOR + OR - TORQUE
043523,000474:
043524,000475: 16,3567 40000 COM # COMPLEMENT... POS. FOR NEG. TORQUE
043525,000476: 16,3570 00006 EXTEND
043526,000477: 16,3571 63574 BZMF +3 # POSITIVE TORQUE REQUIRED
043527,000478: 16,3572 41573 CS TEMREG
043528,000479: 16,3573 55573 TS TEMREG
043529,000480:
043530,000481: 16,3574 31670 FIRELOOK CA I # IS IT MOREROLL
043531,000482: 16,3575 00006 EXTEND
043532,000483: 16,3576 13600 BZF FIREPLUG # YES
043533,000484: 16,3577 13611 TCF JETROLL # MAG(T6FIRE) NOW IN TEMREG
043534,000485:
043535,000486: 16,3600 30031 FIREPLUG CAE TIME6 # CHECK FOR EXTENDED FIRING
043536,000487: 16,3601 00006 EXTEND
043537,000488: 16,3602 61573 SU TEMREG
043538,000489: 16,3603 00006 EXTEND
043539,000490: 16,3604 65324 EXTENTST BZMF TASKOVER # IF EXTENSION WANTED, DONT, EXIT ROLL DAP
043540,000491: 16,3605 13611 TCF JETROLL
043541,000492:
043542,000493: 16,3606 45021 NOROLL CS ZERO # COAST....(NEG ZERO FOR TIME6)
043543,000494: 16,3607 55571 TS ROLLFIRE # NOTE, JETS CAN FIRE NEXT PASS
043544,000495: 16,3610 55573 TS TEMREG
043545,000496:
043546,000497: 16,3611 00006 JETROLL EXTEND
043547,000498: 16,3612 33702 DCA NOROL1T6
Page 995 |
043549,000500: 16,3613 53311 DXCH T6LOC
043550,000501: 16,3614 31573 CA TEMREG # ENTER JET FIRING TIME
043551,000502: 16,3615 54031 TS TIME6
043552,000503:
043553,000504: 16,3616 31670 CA I # I=0 IF MOREROLL, KEEP SAME JETS ON
043554,000505: 16,3617 00006 EXTEND
043555,000506: 16,3620 15324 SAMEJETS BZF TASKOVER # IF JETS ON KEEP SAME JETS. EXIT ROLL DAP
043556,000507:
043557,000508: 16,3621 11571 CCS ROLLFIRE
043558,000509: 16,3622 13626 TCF +TORQUE
043559,000510: 16,3623 13667 TCF T6ENABL
043560,000511: 16,3624 13647 TCF -TORQUE
043561,000512: 16,3625 13667 TCF T6ENABL
043562,000513:
043563,000514: # PROCEED WITH PLUS TORQUE.
043564,000515:
043565,000516: 16,3626 31572 +TORQUE CA ROLLWORD # WHAT WAS THE LAST +TORQUE COMBINATION
043566,000517: 16,3627 75017 MASK BIT1 # WAS IT NO.9-11
043567,000518: 16,3630 00006 EXTEND
043568,000519: 16,3631 13641 BZF NO.9-11 # NOT 9-11, SO USE IT THIS TIME
043569,000520:
043570,000521: 16,3632 45017 NO.13-15 CS BIT1
043571,000522: 16,3633 71572 MASK ROLLWORD
043572,000523: 16,3634 55572 TS ROLLWORD # CHANGE BIT 1 TO ZERO
043573,000524: 16,3635 35037 CAF +ROLL2
043574,000525: 16,3636 00006 EXTEND
043575,000526: 16,3637 01006 WRITE CHAN6
043576,000527: 16,3640 13667 TCF T6ENABL
043577,000528:
043578,000529: 16,3641 35017 NO.9-11 CAF BIT1 # 1ST + JETS TO FIRE (MRCLEAN OS ROLLWORD)
043579,000530: 16,3642 27572 ADS ROLLWORD # CHANGE BIT 1 TO ONE
043580,000531: 16,3643 35022 CAF +ROLL1
043581,000532: 16,3644 00006 EXTEND
043582,000533: 16,3645 01006 WRITE CHAN6
043583,000534: 16,3646 13667 TCF T6ENABL
043584,000535:
043585,000536: 16,3647 31572 -TORQUE CA ROLLWORD # WHAT WAS LAST -TORQUE COMBINATION
043586,000537: 16,3650 75016 MASK BIT2 # WAS IT NO.12-10
043587,000538: 16,3651 00006 EXTEND
043588,000539: 16,3652 13662 BZF NO.12-10 # NOT 12-10, SO USE IT THIS TIME
043589,000540:
043590,000541: 16,3653 45016 NO.16-14 CS BIT2
043591,000542: 16,3654 71572 MASK ROLLWORD
043592,000543: 16,3655 55572 TS ROLLWORD # CHANGE BIT 2 TO ZERO
043593,000544: 16,3656 33714 CAF -ROLL2
043594,000545: 16,3657 00006 EXTEND
043595,000546: 16,3660 01006 WRITE CHAN6
043596,000547: 16,3661 13667 TCF T6ENABL
043597,000548:
043598,000549: 16,3662 35016 NO.12-10 CAF BIT2 # 1ST -JETS TO FIRE (MRCLEAN OS ROLLWORD)
Page 996 |
043600,000551: 16,3663 27572 ADS ROLLWORD # CHANGE BIT 2 TO ONE
043601,000552: 16,3664 34377 CAF -ROLL1
043602,000553: 16,3665 00006 EXTEND
043603,000554: 16,3666 01006 WRITE CHAN6
043604,000555:
043605,000556: 16,3667 35001 T6ENABL CAF BIT15
043606,000557: 16,3670 00006 EXTEND
043607,000558: 16,3671 05013 WOR CHAN13
043608,000559: 16,3672 15324 RDAPEND TCF TASKOVER # EXIT ROLL DAP
043609,000560:
Page 997 |
043611,000562: # THIS T6 TASK SHUTS OFF ALL ROLL JETS
043612,000563:
043613,000564: 16,3673 22016 NOROLL1 LXCH BANKRUPT # SHUT OFF ALL (ROLL) JETS, (A T6 TASK
043614,000565: 16,3674 35021 CAF ZERO # CALLED BY ..JETROLL..)
043615,000566: 16,3675 55571 TS ROLLFIRE # ZERO INDICATES JETS NOW OFF
043616,000567: 16,3676 00006 EXTEND
043617,000568: 16,3677 01006 KILLJETS WRITE CHAN6
043618,000569: 16,3700 15335 TCF NOQRSM
043619,000570:
Page 998 |
043621,000572: # CONSTANTS FOR ROLL AUTOPILOT....
043622,000573:
043623,000574: 16,3701 E6,1702 EBANK= BZERO
043624,000575: 16,3701 03673 34066 NOROL1T6 2CADR NOROLL1
043625,000576:
043626,000577: 16,3703 00344 DB DEC .01388889 # DEAD BAND (5 DEG), SC.AT B+0 REV
043627,000578:
043628,000579: 16,3704 06315 -SLOPE DEC 0.2 # -SWITCHLINE SLOPE(0.2 PER SEC) SC.AT B+0
043629,000580: # PER SEC
043630,000581: 16,3705 00111 LMCRATE DEC .00027778 B+4 # LIMIT CYCLE RATE (0.1 DEG/SEC) SC.AT
043631,000582: # B-4 REV/SEC
043632,000583: 16,3706 00510 INTERCEP DEC .0025 B+3 # DB(-SLOPE) - LMCRATE, SC.AT B-3 REV/SC
043633,000584:
043634,000585: 16,3707 01330 MINLIM DEC .00277778 B+4 # RATELIM,MIN (1DEG/SEC), SC.AT B-4 REV/SC
043635,000586:
043636,000587: 16,3710 00027 1/MINLIM DEC 360 B-18 # RECIPROCAL THEREOF, SHIFTED 14 RIGHT
043637,000588:
043638,000589: 16,3711 07071 MAXLIM DEC .01388889 B+4 # RATELIM,MAX (5DEG/SEC), SC.AT B-4 REV/SC
043639,000590:
043640,000591: 16,3712 00030 TMINFIRE DEC 1.5 B+4 # 15 MS (14MIN), SC.AT 16 BITS/CS
043641,000592:
043642,000593: 16,3713 07640 TMAXFIRE DEC 250 B+4 # 2.5 SEC, SC.AT 16 BITS/CS
043643,000594:
043644,000595: 16,3714 5015 1/TMXFIR = BIT3 # RECIPROCAL THEREOF, SHIFTED 14 RIGHT,
043645,000596: # ROUNDS TO OCT00004, SO ALLOWS 2.56
043646,000597: # SEC FIRINGS BEFORE APPLYING LIMIT
043647,000598: 16,3714 7665 T6SCALE = PRIO31 # (B+3) (16 BITS/CS) (100CS/SEC)
043648,000599:
043649,000600: 16,3714 5022 +ROLL1 = FIVE # ONBITS FOR JETS 9 AND 11
043650,000601: 16,3714 5037 +ROLL2 = OCT120 # ONBITS FOR JETS 13 AND 15
043651,000602: 16,3714 4377 -ROLL1 = TEN # ONBITS FOR JETS 12 NAD 10
043652,000603: 16,3714 00240 -ROLL2 OCT 240 # ONBITS FOR JETS 16 AND 14
043653,000604:
End of include-file TVCROLLDAP.agc. Parent file is MAIN.agc