Source Code
These source-code files derive from a printout of Luminary 210 (Apollo 15-17
Lunar Module guidance computer program), from the personal library of
original AGC developer Don Eyles, digitally photographed at archive.org,
financially sponsored by Jim Lawton, and transcribed to source code by a
team of volunteers. This colorized, syntax-highlighted form was created
by assembling that transcribed source code. Note that the full page images
are available on the
Virtual AGC project page at archive.org, while reduced-size images
are presented at the VirtualAGC project website. Report or fix any
transcription errors at
the Virtual AGC project code repository. Notations on the program listing read, in part: GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY BY NASA 2021112-161 17:11 MAR. 19,1971Note that the date is the date of the printout, not the date of the program revision. |
063261,000002: ## Copyright: Public domain.
063262,000003: ## Filename: TJET_LAW.agc
063263,000004: ## Purpose: A section of Luminary revision 210.
063264,000005: ## It is part of the source code for the Lunar Module's (LM)
063265,000006: ## Apollo Guidance Computer (AGC) for Apollo 15-17.
063266,000007: ## This file is intended to be a faithful transcription, except
063267,000008: ## that the code format has been changed to conform to the
063268,000009: ## requirements of the yaYUL assembler rather than the
063269,000010: ## original YUL assembler.
063270,000011: ## Reference: pp. 1458-1467
063271,000012: ## Assembler: yaYUL
063272,000013: ## Contact: Ron Burkey <info@sandroid.org>.
063273,000014: ## Website: www.ibiblio.org/apollo/index.html
063274,000015: ## Mod history: 2016-11-17 JL Created from Luminary131 version.
063275,000016: ## 2016-12-09 RRB Updated for Luminary210.
063276,000017: ## 2016-12-26 RSB Comment-text proofed using ProoferComments
063277,000018: ## and corrected errors found.
063278,000019:
Page 1458 |
063280,000021: # PROGRAM DESCRIPTION
063281,000022: # DESIGNED BY: R. D. GOSS AND P. S. WEISSMAN
063282,000023: # CODED BY: P. S. WEISSMAN 28 FEBRUARY 1968
063283,000024:
063284,000025: # TJETLAW IS CALLED AS A SUBROUTINE WHEN THE LEM IS NOT DOCKED AND THE AUTOPILOT IS IN THE AUTOMATIC OR
063285,000026: # ATTITUDE-HOLD MODE TO CALCULATE THE JET-FIRING-TIME (TJET) REQUIRED FOR THE AXIS INDICATED BY AXISCTR:
063286,000027: # -1 INDICATES THE P-AXIS
063287,000028: # +0 INDICATES THE U-AXIS
063288,000029: # +1 INDICATES THE V-AXIS.
063289,000030: # THE REGISTERS E AND EDOT CONTAIN THE APPROPRIATE ATTITUDE ERROR AND ERROR RATE AND SENSETYP SHOWS WHETHER
063290,000031: # UNBALANCED COUPLES ARE PREFERRED. TJETLAW ALSO USES VARIOUS FUNCTIONS OF ACCELERATION AND DEADBAND WHICH ARE
063291,000032: # COMPUTED IN THE 1/ACCONT SECTION OF 1/ACCS AND ARE STORED IN SUCH AN ORDER THAT THEY CAN BE CONVENIENTLY
063292,000033: # ACCESSED BY INDEXING.
063293,000034:
063294,000035: # THE SIGN OF THE REQUIRED ROTATION IS CARRIED THROUGH TJETLAW AS ROTSENSE AND IS FINALLY APPLIED TO TJET JUST
063295,000036: # PREVIOUS TO ITS STORAGE IN THE LOCATION CORRESPONDING TO THE AXIS (TJP, TJU OR TJV). THE NUMBER OF JETS THAT
063296,000037: # TJETLAW ASSUMES WILL BE USED IS INDICATED BY THE SETTING OF NUMBERT FOR THE U- OR V-AXIS. TWO JETS ARE ALWAYS
063297,000038: # ASSUMED FOR THE P-AXIS ALTHOUGH FOUR JETS WILL BE FIRED WHEN FIREFCT IS MORE NEGATIVE THAN -4.0 DEGREES
063298,000039: # (FIREFCT IS THE DISTANCE TO A SWITCH CURVE IN THE PHASE PLANE) AND A LONG FIRING IS CALLED FOR.
063299,000040: # IN ORDER TO AVOID SCALING DIFFICULTIES, SIMPLE ALGORITHMS TAGGED RUFLAW1, -2 AND -3 ARE RESORTED TO WHEN THE
063300,000041: # ERROR AND/OR ERROR RATE ARE LARGE.
063301,000042:
063302,000043: # CALLING SEQUENCE:
063303,000044: # TC TJETLAW (MUST BE IN JASK)
063304,000045: # OR
063305,000046: # INHINT (MUST BE IN JASK)
063306,000047: # TC IBNKCALL
063307,000048: # CADR TJETLAW
063308,000049: # RELINT
063309,000050:
063310,000051: # EXIT: RETURN TO Q.
063311,000052:
063312,000053: # INPUT:
063313,000054: # FROM THE CALLER: E, EDOT, AXISCTR, SENSETYP, TJP, -U, -V.
063314,000055: # FROM 1/ACCONT: 48 ERASABLES BEGINNING AT BLOCKTOP (INCLUDING FLAT, ZONE3LIM AND ACCSWU,-V).
063315,000056:
063316,000057: # OUTPUT:
063317,000058: # TJP,-U OR -V, NUMBERT (DAPTEMP5), FIREFCT (DAPTEMP3).
063318,000059:
063319,000060: # DEBRIS:
063320,000061: # A, L, Q, E, EDOT, DAPTEMP1-6, DAPTREG1-4.
063321,000062:
063322,000063: # ALARM: NONE
063323,000064:
063324,000065: 17,3304 BANK 17
063325,000066: 17,2000 SETLOC DAPS2
063326,000067: 17,2000 BANK
063327,000068: 17,3304 E6,1524 EBANK= TJP
Page 1459 |
063329,000070: 17,3304 COUNT* $$/DAPTJ
063330,000071:
063331,000072: 17,3304 00006 TJETLAW EXTEND # SAVE Q FOR RETURN.
063332,000073: 17,3305 23744 QXCH HOLDQ
063333,000074:
063334,000075: # SET INDEXERS TO CORRESPOND TO THE AXIS AND TO THE SIGN OF EDOT
063335,000076:
063336,000077: 17,3306 51505 INDEX AXISCTR # AXISDIFF(-1)=NO OF LOCATIONS BER P AND U
063337,000078: 17,3307 33755 CAF AXISDIFF # AXISDIFF(0) = 0
063338,000079: 17,3310 55745 TS ADRSDIF1 # AXISDIFF(+1)=NO OF LOCATIONS BET V AND U
063339,000080:
063340,000081: 17,3311 31427 CAE EDOT # IF EDOT NEGATIVE, PICK UP SET OF VALUES
063341,000082: 17,3312 00006 EXTEND # THAT ALLOW USE OF SAME CODING AS FOR
063342,000083: 17,3313 63320 BZMF NEGEDOT # POSITIVE EDOT.
063343,000084: 17,3314 31745 CAE ADRSDIF1 # SET A SECOND INDEXER WHICH MAY BE
063344,000085: 17,3315 55743 TS ADRSDIF2 # MODIFIED BY A DECISION FOR MAX JETS.
063345,000086: 17,3316 33757 CAF SENSOR # FOR POSITIVE EDOT, ROTSENSE IS
063346,000087: 17,3317 13330 TCF SETSENSE # INITIALIZED POSITIVE.
063347,000088:
063348,000089: 17,3320 41751 NEGEDOT CS E # IN ORDER FOR NEG EDOT CASE TO USE CODING
063349,000090: 17,3321 55751 TS E # OF POS EDOT, MUST MODIFY AS FOLLOWS:
063350,000091: 17,3322 41427 CS EDOT # 1. COMPLEMENT E AND EDOT.
063351,000092: 17,3323 55427 TS EDOT # 2. SET SENSE OF ROTATION TO NEGATIVE
063352,000093: 17,3324 34744 CAF BIT1 # (REVERSED LATER IF NECESSARY).
063353,000094: 17,3325 27745 ADS ADRSDIF1 # 3. INCREMENT INDEXERS BY ONE SO THAT
063354,000095: 17,3326 55743 TS ADRSDIF2 # THE PROPER PARAMETERS ARE ACCESSED.
063355,000096: 17,3327 43757 CS SENSOR
063356,000097: 17,3330 55737 SETSENSE TS ROTSENSE
063357,000098:
063358,000099: # TEST MAGNITUDE OF E (ATTITUDE ERROR, SINGLE-PRECISION, SCALED AT PI RADIANS):
063359,000100: # IF GREATER THAN (OR EQUAL TO) PI/16 RADIANS, GO TO THE SIMPLIFIED TJET ROUTINE.
063360,000101: # IF LESS THAN PI/16 RADIANS, RESCALE TO PI/4.
063361,000102:
063362,000103: 17,3331 31751 CAE E # PICK UP ATTITUDE ERROR FOR THIS AXIS
063363,000104: 17,3332 00006 EXTEND
063364,000105: 17,3333 74740 MP BIT5 # SHIFT RIGHT TEN BITS: IF A-REGISTER IS
063365,000106: 17,3334 10000 CCS A # ZERO, RESCALE AND TEST EDOT.
063366,000107: 17,3335 13717 TCF RUFLAW2
063367,000108: 17,3336 13340 TCF SCALEE
063368,000109: 17,3337 13663 TCF RUFLAW1
063369,000110: 17,3340 34730 SCALEE CAF BIT13 # ERROR IS IN L SCALED AT PI/16. RESCALE
063370,000111: 17,3341 00006 EXTEND # IT TO PI/4 AND SAVE IT.
063371,000112: 17,3342 70001 MP L
063372,000113: 17,3343 55751 TS E
063373,000114:
063374,000115: # TEST MAGNITUDE OF EDOT (ERROR RATE SCALED AT PI/4 RADIANS/SECOND)
063375,000116: # IF GREATER THAN (OR EQUAL TO) PI/32 RADIANS/SECOND, GO TO THE SIMPLIFIED TJET ROUTINE.
063376,000117: # IF LESS THAN PI/32 RADIANS/SECOND, THEN RESCALE TO PI/32 RADIANS/SECOND.
063377,000118:
063378,000119: 17,3344 31427 CAE EDOT # PICK UP SINGLE-PRECISION ERROR-RATE
Page 1460 |
063380,000121: 17,3345 00006 EXTEND # FOR THIS AXIS=
063381,000122: 17,3346 74741 MP BIT4 # SHIFT RIGHT ELEVEN BITS, IF THE A-REG IS
063382,000123: 17,3347 00006 EXTEND # ZERO, THEN RESCALE AND USE FINELAW.
063383,000124: 17,3350 13352 BZF SCALEDOT
063384,000125: 17,3351 13725 TCF RUFLAW3
063385,000126: # *** FINELAW STARTS HERE ***
063386,000127:
063387,000128: 17,3352 23427 SCALEDOT LXCH EDOT # EDOT IS SCALED AT PI/32 RADIANS/SECOND.
063388,000129:
063389,000130: 17,3353 31427 CAE EDOT # COMPUTE (EDOT)(EDOT)
063390,000131: 17,3354 00006 EXTEND
063391,000132: 17,3355 70000 SQUARE # PRODUCT SCALED AT PI(2)/2(10) RAD/SEC.
063392,000133: 17,3356 00006 EXTEND
063393,000134: 17,3357 74730 MP BIT13 # SHIFT RIGHT TWO BITS TO RESCALE EDOTSQ
063394,000135: 17,3360 55736 TS EDOTSQ # TO PI(2)/2(8) RAD(2)/SEC(2).
063395,000136:
063396,000137: 17,3361 11751 ERRTEST CCS E # DOES BIG ERROR (THREE DEG BEYOND THE
063397,000138: 17,3362 13365 TCF +3 # DEADBAND) REQUIRE MAXIMUM JETS?
063398,000139: 17,3363 13365 TCF +2
063399,000140: 17,3364 13365 TCF +1
063400,000141: 17,3365 63760 AD -3DEG
063401,000142: 17,3366 00006 EXTEND
063402,000143: 17,3367 51745 INDEX ADRSDIF1
063403,000144: 17,3370 61600 SU FIREDB
063404,000145: 17,3371 00006 EXTEND
063405,000146: 17,3372 63377 BZMF SENSTEST # IF NOT: ARE UNBALANCED JETS PREFERRED|
063406,000147: 17,3373 34743 MAXJETS CAF TWO # IF YES: INCREMENT ADDRESS LOCATOR AND
063407,000148: 17,3374 27743 ADS ADRSDIF2 # SET SWITCH FOR JET SELECT LOGIC TO 4.
063408,000149: 17,3375 34742 CAF FOUR # (ALWAYS DO THIS FOR P-AXIS)
063409,000150: 17,3376 13402 TCF TJCALC
063410,000151: 17,3377 11500 SENSTEST CCS SENSETYP # DOES TRANSLATION PREFER MIN JETS.
063411,000152: 17,3400 13402 TCF TJCALC # YES. USE MIN-JET PARAMETERS.
063412,000153: 17,3401 13373 TCF MAXJETS # NO. GET MAX-JET PARAMETERS.
063413,000154: 17,3402 55742 TJCALC TS NUMBERT # SET TO +0,1,4 FOR (U,V-AXES) JET SELECT.
063414,000155:
063415,000156: # BEGINNING OF TJET CALCULATIONS:
063416,000157:
063417,000158: 17,3403 41736 CS EDOTSQ # SCALED AT PI(2)/2(8).
063418,000159: 17,3404 00006 EXTEND
063419,000160: 17,3405 51743 INDEX ADRSDIF2
063420,000161: 17,3406 71566 MP 1/ANET1 # .5/ACC SCALED AT 2(6)/PI SEC(2)/RADIAN.
063421,000162: 17,3407 51745 INDEX ADRSDIF1
063422,000163: 17,3410 61600 AD FIREDB # DEADBAND SCALED AT PI/4 RADIAN.
063423,000164: 17,3411 00006 EXTEND
063424,000165: 17,3412 61751 SU E # ATTITUDE ERROR SCALED AT PI/4 RADIAN.
063425,000166: 17,3413 55740 TS FIREFCT # -E-.5(EDOTSQ)/ACC-DB AT PI/4 RADIAN.
063426,000167: 17,3414 00006 EXTEND
063427,000168: 17,3415 63575 BZMF ZON1,2,3
063428,000169:
063429,000170: 17,3416 51745 ZONE4,5 INDEX ADRSDIF1
Page 1461 |
063431,000172: 17,3417 31572 CAE 1/ACOAST # .5/ACC SCALED AT 2(6)/PI WHERE
063432,000173: 17,3420 00006 EXTEND # ACC = MAX(AMIN, AOS-).
063433,000174: 17,3421 71736 MP EDOTSQ # SCALED AT PI/2(8).
063434,000175: 17,3422 61751 AD E # SCALED AT PI/4
063435,000176: 17,3423 51745 INDEX ADRSDIF1
063436,000177: 17,3424 61602 AD COASTDB # SCALED AT PI/4 POS. FOR NEG. INTERCEPT.
063437,000178: 17,3425 00006 EXTEND # TEST E+.5(EDOTSQ)/ACC+DB AT PI/4 RADIAN.
063438,000179: 17,3426 63461 BZMF ZONE5 # IF FUNCTION NEGATIVE, FIND TJET.
063439,000180: # IF FUNCTION POSITIVE, IN ZONE 4.
063440,000181:
063441,000182: # ZONE 4 IS THE COAST REGION. HOWEVER, IF THE JETS ARE ON AND DRIVING TOWARD
063442,000183: # A. THE AXIS WITHIN + OR - (DB + FLAT) FOR DRIFTING FLIGHT, OR
063443,000184: # B. THE USUAL TARGET PARABOLA FOR POWERED FLIGHT
063444,000185: # THEN THE THRUSTERS ARE KEPT ON.
063445,000186:
063446,000187: 17,3427 51505 ZONE4 INDEX AXISCTR # IS THE CURRENT VALUE IN TJET NON-ZERO
063447,000188: 17,3430 41525 CS TJETU # WITH SENSE OPPOSITE TO EDOT,
063448,000189: 17,3431 00006 EXTEND # (I.E., ARE JETS ON AND FIRING TOWARD
063449,000190: 17,3432 71737 MP ROTSENSE # THE DESIRABLE STATE).
063450,000191: 17,3433 00006 EXTEND
063451,000192: 17,3434 63455 BZMF COASTTJ # NO. COAST.
063452,000193:
063453,000194: 17,3435 11554 JETSON CCS FLAT # YES. IS THIS DRIFTING OR POWERED FLIGHT|
063454,000195: 17,3436 13447 TCF DRIFT/ON # DRIFTING. GO MAKE FURTHER TEST.
063455,000196:
063456,000197: 17,3437 41740 CS FIREFCT # POWERED (OR ULLAGE). CAN TARGET PARABOLA
063457,000198: 17,3440 51745 INDEX ADRSDIF1 # BE REACHED FROM THIS POINT IN THE
063458,000199: 17,3441 61604 AD AXISDIST # PHASE PLANE|
063459,000200: 17,3442 00006 EXTEND
063460,000201: 17,3443 63455 BZMF COASTTJ # NO. SET TJET = 0.
063461,000202: 17,3444 03561 TC Z123COMP # YES. CALCULATE TJET AS THOUGH IN ZONE 1
063462,000203: 17,3445 31740 CAE FIREFCT # AFTER COMPUTING THE REQUIRED
063463,000204: 17,3446 13615 TCF ZONE1 # PARAMETERS.
063464,000205:
063465,000206: 17,3447 51745 DRIFT/ON INDEX ADRSDIF1 # CAN TARGET STRIP OF AXIS BE REACHED FROM
063466,000207: 17,3450 41600 CS FIREDB # THIS POINT IN THE PHASE PLANE|
063467,000208: 17,3451 60000 DOUBLE
063468,000209: 17,3452 61740 AD FIREFCT
063469,000210: 17,3453 00006 EXTEND
063470,000211: 17,3454 63457 BZMF +3
063471,000212: 17,3455 34746 COASTTJ CAF ZERO # NO. SET TJET = 0.
063472,000213: 17,3456 13521 TCF RETURNTJ
063473,000214:
063474,000215: 17,3457 03561 TC Z123COMP # YES. CALCULATE TJET AS THOUGH IN ZONE 2
063475,000216: 17,3460 13602 TCF ZONE2,3 # OR 3 AFTER COMPUTING REQUIRED VALUES.
063476,000217:
063477,000218: 17,3461 54001 ZONE5 TS L # TEMPORARILY STORE FUNCTION IN L.
063478,000219: 17,3462 11737 CCS ROTSENSE # MODIFY ADRSDIF2 FOR ACCESSING 1/ANET2
063479,000220: 17,3463 13467 TCF +4 # AND ACCFCTZ5, WHICH MUST BE PICKED UP
063480,000221: 17,3464 05701 TC CCSHOLE # FROM THE NEXT LOWER REGISTER IF THE
Page 1462 |
063482,000223: 17,3465 44743 CS TWO # (ACTUAL) ERROR RATE IS NEGATIVE.
063483,000224: 17,3466 27743 ADS ADRSDIF2
063484,000225:
063485,000226: 17,3467 30001 +4 CAE L
063486,000227: 17,3470 00006 EXTEND
063487,000228: 17,3471 51743 INDEX ADRSDIF2 # TTOAXIS AND HH ARE THE PARAMETERS UPON
063488,000229: 17,3472 71575 MP ACCFCTZ5 # WHICH THE APPROXIMATIONS TO TJET ARE
063489,000230: 17,3473 20001 DDOUBL # BASED.
063490,000231: 17,3474 20001 DDOUBL
063491,000232: 17,3475 53747 DXCH HH # DOUBLE PRECISION H SCALED AT 8 SEC(2).
063492,000233: 17,3476 51743 INDEX ADRSDIF2
063493,000234: 17,3477 31567 CAE 1/ANET2 # SCALED AT 2(7)/PI SEC(2)/RAD.
063494,000235: 17,3500 00006 EXTEND
063495,000236: 17,3501 71427 MP EDOT # SCALED AT PI/2(5)
063496,000237: 17,3502 55741 TS TTOAXIS # SCALED AT 4 SEC.
063497,000238:
063498,000239: # TEST WHETHER TJET GREATER THAN 50 MSEC.
063499,000240:
063500,000241: 17,3503 00006 EXTEND
063501,000242: 17,3504 73767 MP -.05AT2 # H - .05 TTOAXIS - .00125 G.T. ZERO
063502,000243: 17,3505 61746 AD HH # (SCALED AT 8 SEC(2) ).
063503,000244: 17,3506 67767 AD NEG2
063504,000245: 17,3507 00006 EXTEND
063505,000246: 17,3510 63536 BZMF FORMULA1
063506,000247:
063507,000248: # TEST WHETHER TJET GREATER THAN 150 MSEC.
063508,000249:
063509,000250: 17,3511 31741 CAE TTOAXIS
063510,000251: 17,3512 00006 EXTEND
063511,000252: 17,3513 73770 MP -.15AT2 # H - .15 TTOAXIS - .01125 G.T. ZERO
063512,000253: 17,3514 61746 AD HH # (SCALED AT 8 SEC(2) )
063513,000254: 17,3515 63761 AD -.0112A8
063514,000255: 17,3516 00006 EXTEND
063515,000256: 17,3517 63546 BZMF FORMULA2
063516,000257:
063517,000258: # IF TJET GREATER THAN 150 MSEC, ASSIGN IT VALUE OF 250 MSEC, SINCE THIS
063518,000259: # IS ENOUGH TO ASSURE NO SKIP NEXT CSP (100 MSEC).
063519,000260:
063520,000261: 17,3520 34732 FULLTIME CAF BIT11 # 250 MSEC SCALED AT 4 SEC.
063521,000262:
063522,000263: # RETURN TO CALLING PROGRAM WITH JET TIME SCALED AS TIME6 AND SIGNED.
063523,000264:
063524,000265: 17,3521 00006 RETURNTJ EXTEND # ALL BRANCHES TERMINATE HERE WITH TJET
063525,000266: 17,3522 71737 MP ROTSENSE # (SCALED AT 4 SEC) IN THE ACCUMULATOR.
063526,000267: 17,3523 51505 INDEX AXISCTR # ROTSENSE APPLIES SIGN AND CHANGES SCALE.
063527,000268: 17,3524 55525 TS TJETU
063528,000269: 17,3525 00006 EXTEND
063529,000270: 17,3526 51505 INDEX AXISCTR
063530,000271: 17,3527 71546 MP ACCSWU # SET SWITCH FOR JET SELECT IF ROTATION IS
063531,000272: 17,3530 30001 CAE L
063532,000273: 17,3531 00006 EXTEND # IN A SENSE FOR WHICH 1/ACCS HAS FORCED
063533,000274: 17,3532 63535 BZMF +3 # A MAX-JET CALCULATION.
Page 1463 |
063535,000276: 17,3533 34742 CAF FOUR
063536,000277: 17,3534 55742 TS NUMBERT
063537,000278: 17,3535 01744 TC HOLDQ # RETURN VIA SAVED Q.
063538,000279:
063539,000280: # TJET = H/(.025 + TTOAXIS) FOR TJET LESS THAN 50 MSEC.
063540,000281:
063541,000282: 17,3536 43766 FORMULA1 CS -.025AT4 # .025 SEC SCALED AT 4.
063542,000283: 17,3537 61741 AD TTOAXIS # SCALED AT 4 SECONDS.
063543,000284: 17,3540 53747 DXCH HH # STORE DENOMINATOR IN FIRST WORD OF H,
063544,000285: 17,3541 00006 EXTEND # WHICH NEED NOT BE PRESERVED. PICK UP
063545,000286: 17,3542 11746 DV HH # DP H AND DIVIDE BY DENOMINATOR.
063546,000287: 17,3543 00006 EXTEND
063547,000288: 17,3544 74727 MP BIT14 # RESCALE TJET FROM 2 TO USUAL 4 SEC.
063548,000289: 17,3545 13656 TCF CHKMINTJ # CHECK THAT TJET IS NOT LESS THAN MINIMUM
063549,000290:
063550,000291: # TJET = (H + .00375)/(0.1 + TTOAXIS) FOR TJET GREATER THAN 50 MSEC.
063551,000292:
063552,000293: 17,3546 00006 FORMULA2 EXTEND
063553,000294: 17,3547 33772 DCA .00375A8 # .00375 SEC(2) SCALED AT 8.
063554,000295: 17,3550 21747 DAS HH # STORE NUMERATOR IN DP H, WHICH NEED NOT
063555,000296: # BE PRESERVED.
063556,000297: 17,3551 31741 CAE TTOAXIS # SCALED AT 4 SEC.
063557,000298: 17,3552 63762 AD .1AT4 # 0.1 SEC SCALED AT 4.
063558,000299: 17,3553 53747 DXCH HH # STORE DENOMINATOR IN FIRST WORD OF H,
063559,000300: 17,3554 00006 EXTEND # WHICH NEED NOT BE PRESERVED. PICK UP
063560,000301: 17,3555 11746 DV HH # DP NUMERATOR AND DIVIDE BY DENOMINATOR
063561,000302: 17,3556 00006 EXTEND
063562,000303: 17,3557 74727 MP BIT14 # RESCALE TJET FROM 2 TO USUAL 4 SEC.
063563,000304: 17,3560 13521 TCF RETURNTJ # END SUBROUTINE.
063564,000305:
063565,000306: # SUBROUTINIZED COMPUTATIONS REQUIRED FOR ALL ENTRIES INTO CODING FOR ZONES 1, 2, AND 3.
063566,000307:
063567,000308: # REACHED BY TC FROM 3 POINTS IN TJETLAW.
063568,000309:
063569,000310: 17,3561 41737 Z123COMP CS ROTSENSE # USED IN RETURNTJ SECTION TO RESCALE TJET
063570,000311: 17,3562 55737 TS ROTSENSE # AS TIME6 AND GIVE IT PROPER SIGN.
063571,000312: 17,3563 31427 CAE EDOT # SCALED AT PI/2(5) RAD/SEC.
063572,000313: 17,3564 00006 EXTEND
063573,000314: 17,3565 51743 INDEX ADRSDIF2
063574,000315: 17,3566 71566 MP 1/ANET1 # SCALED AT 2(7)/PI SEC(2)/RAD.
063575,000316: 17,3567 55741 TS TTOAXIS # STORE TIME-TO-AXIS SCALED AT 4 SECONDS.
063576,000317: 17,3570 63773 AD -TJMAX
063577,000318: 17,3571 00006 EXTEND # IS TIME TO AXIS LESS THAN 150 MSEC.
063578,000319: 17,3572 63574 BZMF +2
063579,000320: 17,3573 13520 TCF FULLTIME # NO. FIRE JETS, DO NOT CALCULATE TJET.
063580,000321: 17,3574 00002 RETURN # YES. GO ON TO FIND TJET
063581,000322:
063582,000323: 17,3575 03561 ZON1,2,3 TC Z123COMP # SUBROUTINIZED PREPARATION FOR ZONE1,2,3.
063583,000324:
063584,000325: # IF THE (NEG) DISTANCE BEYOND PARABOLA IS LESS THAN FLAT, USE SPECIAL
Page 1464 |
063586,000327: # LOGIC TO ACQUIRE MINIMUM IMPULSE LIMIT CYCLE. DURING POWERED FLIGHT
063587,000328: # OR ULLAGE, FLAT = 0
063588,000329:
063589,000330: 17,3576 31740 CAE FIREFCT # SCALED AT PI/4 RAD.
063590,000331: 17,3577 61554 AD FLAT
063591,000332: 17,3600 00006 EXTEND
063592,000333: 17,3601 63615 BZMF ZONE1 # NOT IN SPECIAL ZONES.
063593,000334:
063594,000335: # FIRE FOR AXIS OR, IF CLOSE, FIRE MINIMUM IMPULSE. IF ON AXIS, COAST.
063595,000336:
063596,000337: 17,3602 41555 ZONE2,3 CS ZONE3LIM # HEIGHT OF MIN-IMPULSE ZONE SET BY 1/ACCS
063597,000338: 17,3603 61741 AD TTOAXIS # 35 MSEC IN DRIFTING FLIGHT
063598,000339: 17,3604 00006 EXTEND # ZERO WHEN TRYING TO ENTER GTS CONTROL.
063599,000340: 17,3605 63610 BZMF ZONE3
063600,000341: 17,3606 31741 ZONE2 CAE TTOAXIS # FIRE TO AXIS.
063601,000342: 17,3607 13521 TCF RETURNTJ
063602,000343: 17,3610 11427 ZONE3 CCS EDOT # CHECK IF EDOT IS ZERO.
063603,000344: 17,3611 34737 CAF BIT6 # FIRE A ONE-JET MINIMUM IMPULSE.
063604,000345: 17,3612 13521 TCF RETURNTJ # TJET = +0.
063605,000346: 17,3613 05701 TC CCSHOLE # CANNOT BE BECAUSE NEG EDOT COMPLEMENTED.
063606,000347: 17,3614 13521 TCF RETURNTJ # TJET = +0.
063607,000348:
063608,000349: 17,3615 00006 ZONE1 EXTEND
063609,000350: 17,3616 51745 INDEX ADRSDIF1
063610,000351: 17,3617 61604 SU AXISDIST # SCALED AT PI/4 RAD.
063611,000352: 17,3620 00006 EXTEND
063612,000353: 17,3621 51743 INDEX ADRSDIF2
063613,000354: 17,3622 71574 MP ACCFCTZ1 # SCALED AT 2(7)/PI SEC(2)/RAD.
063614,000355: 17,3623 20001 DDOUBL
063615,000356: 17,3624 20001 DDOUBL
063616,000357: 17,3625 53747 DXCH HH # DOUBLE PRECISION H SCALED AT 8 SEC(2).
063617,000358:
063618,000359: # TEST WHETHER TOTAL TIME REQUIRED GREATER THAN 150 MSEC:
063619,000360: # 2 2
063620,000361: # IS .5(.150 - TTOAXIS) - H NEGATIVE (SCALED AT 8 SECONDS )
063621,000362:
063622,000363: 17,3626 31741 CAE TTOAXIS # TTOAXIS SCALED AT 4 SECONDS.
063623,000364: 17,3627 63773 AD -TJMAX # -.150 SECOND SCALED AT 4.
063624,000365: 17,3630 00006 EXTEND
063625,000366: 17,3631 70000 SQUARE
063626,000367: 17,3632 00006 EXTEND
063627,000368: 17,3633 61746 SU HH # HIGH WORD OF H SCALED AT 8 SEC(2).
063628,000369: 17,3634 00006 EXTEND
063629,000370: 17,3635 63520 BZMF FULLTIME # YES. NEED NOT CALCULATE TJET.
063630,000371:
063631,000372: # TEST WHETHER TIME BEYOND AXIS GREATER THAN 50 MSEC TO DETERMINE WHICH APPROXIMATION TO USE.
063632,000373:
063633,000374: 17,3636 31746 CAE HH
063634,000375: 17,3637 67767 AD NEG2
063635,000376: 17,3640 00006 EXTEND
Page 1465 |
063637,000378: 17,3641 63651 BZMF FORMULA3
063638,000379:
063639,000380: # TJET = H/0.1 + TTOAXIS + .0375 FOR APPROXIMATION OVER MORE THAN 50 MSEC.
063640,000381:
063641,000382: 17,3642 33763 CAF .1AT2 # STORE .1 SEC SCALED AT 2 FOR DIVISION.
063642,000383: 17,3643 53747 DXCH HH # DP H SCALED AT 8 SEC(2) NEED NOT BE
063643,000384: 17,3644 00006 EXTEND # PRESERVED.
063644,000385: 17,3645 11746 DV HH # QUOTIENT SCALED AT 4 SECONDS.
063645,000386: 17,3646 61741 AD TTOAXIS # SCALED AT 4 SEC.
063646,000387: 17,3647 63764 AD .0375AT4 # .0375 SEC SCALED AT 4.
063647,000388: 17,3650 13521 TCF RETURNTJ # END COMPUTATION.
063648,000389:
063649,000390: # TJET = H/.O25 + TTOAXIS FOR APPROXIMATION OVER LESS THAN 50 MSEC.
063650,000391:
063651,000392: 17,3651 43765 FORMULA3 CS -.025AT2 # STORE +.025 SEC SCALED AT 2 FOR DIVISION
063652,000393: 17,3652 53747 DXCH HH # PICK UP DP H AT 8, WHICH NEED NOT BE
063653,000394: 17,3653 00006 EXTEND # PRESERVED.
063654,000395: 17,3654 11746 DV HH # QUOTIENT SCALED AT 4 SECONDS.
063655,000396: 17,3655 61741 AD TTOAXIS # SCALED AT 4 SEC.
063656,000397:
063657,000398: # IF COMPUTED JET TIME IS LESS THAN TJMIN, TJET IS SET TO ZERO.
063658,000399: # MINIMUM IMPULSES REQUIRED IN ZONE 3 ARE NOT SUBJECT TO THIS CONSTRAINT, NATURALLY.
063659,000400:
063660,000401: 17,3656 63775 CHKMINTJ AD -TJMIN # IS COMPUTED TIME LESS THAN THE MINIMUM.
063661,000402: 17,3657 00006 EXTEND
063662,000403: 17,3660 63455 BZMF COASTTJ # YES, SET TIME TO ZERO.
063663,000404: 17,3661 63774 AD TJMIN # NO, RESTORE COMPUTED TIME.
063664,000405: 17,3662 13521 TCF RETURNTJ # END COMPUTATION.
063665,000406:
Page 1466 |
063667,000408: # *** ROUGHLAW ***
063668,000409:
063669,000410: # BEFORE ENTRY TO RUFLAW:
063670,000411: # 1. INDEXERS ADRSDIF1 AND ADRSDIF2 ARE SET ON BASIS OF AXIS, AND SIGN OF EDOT.
063671,000412: # 2. IF EDOT WAS NEGATIVE, E AND EDOT ARE ROTATED INTO UPPER HALF-PLANE AND ROTSENSE IS MADE NEGATIVE.
063672,000413: # 3. E IS SCALED AT PI RADIANS AND EDOT AT PI/4 RAD/SEC.
063673,000414: # (EXCEPT THE RUFLAW3 ENTRY WHEN E IS AT PI/4)
063674,000415:
063675,000416: # RUFLAW1: ERROR MORE NEGATIVE THAN PI/16 RAD. FIRE TO A RATE OF 6.5 DEG/SEC (IF JET TIME EXCEEDS 20 MSEC.).
063676,000417: # RUFLAW2: ERROR MORE POSITIVE THAN PI/16 RAD. FIRE TO AN OPPOSING RATE OF 6.5 DEG/SEC.
063677,000418: # RUFLAW3: ERROR RATE GREATER THAN PI/32 RAD/SEC AND ERROR WITHIN BOUNDS. COAST IF BELOW FIREFCT, FIRE IF ABOVE
063678,000419:
063679,000420: 17,3663 43776 RUFLAW1 CS RUFRATE # DECREMENT EDOT BY .1444 RAD/SEC AT PI/4
063680,000421: 17,3664 27427 ADS EDOT # WHICH IS THE TARGET RATE
063681,000422: 17,3665 00006 EXTEND
063682,000423: 17,3666 63707 BZMF SMALRATE # BRANCH IF RATE LESS THAN TARGET.
063683,000424: 17,3667 03745 TC RUFSETUP # REVERSE ROTSENSE AND INDICATE MAX JETS.
063684,000425: 17,3670 31427 CAE EDOT # PICK UP DESIRED RATE CHANGE.
063685,000426:
063686,000427: 17,3671 00006 RUFLAW12 EXTEND # COMPUTE TJET
063687,000428: 17,3672 51743 INDEX ADRSDIF2 # = (DESIRED RATE CHANGE)/(2-JET ACCEL.)
063688,000429: 17,3673 71570 MP 1/ANET1 +2
063689,000430: 17,3674 67762 AD -1/8 # IF TJET, SCALED AT 32 SEC, EXCEEDS
063690,000431: 17,3675 00006 EXTEND # 4 SECONDS, SET TJET TO TJMAX.
063691,000432: 17,3676 63700 BZMF +2
063692,000433: 17,3677 13520 TCF FULLTIME
063693,000434: 17,3700 00006 EXTEND
063694,000435: 17,3701 13520 BZF FULLTIME
063695,000436: 17,3702 64731 AD BIT12 # RESTORE COMPUTED TJET TO ACCUMULATOR.
063696,000437: 17,3703 20001 DAS A
063697,000438: 17,3704 20001 DAS A
063698,000439: 17,3705 20001 DAS A # RESCALED TJET AT 4 SECONDS.
063699,000440: 17,3706 13656 TCF CHKMINTJ # RETURN AS FROM FINELAW.
063700,000441:
063701,000442: 17,3707 03747 SMALRATE TC RUFSETUP +2 # SET NUMBERT AND FIREFCT FOR MAXIMUM JETS
063702,000443: 17,3710 11737 CCS ROTSENSE
063703,000444: 17,3711 34744 CAF ONE # MODIFY INDEXER TO POINT TO 1/ANET
063704,000445: 17,3712 13714 TCF +2 # CORRESPONDING TO THE PROPER SENSE.
063705,000446: 17,3713 37770 CAF NEGONE
063706,000447: 17,3714 27743 ADS ADRSDIF2
063707,000448:
063708,000449: 17,3715 41427 CS EDOT # (.144 AT PI/4 - EDOT) = DESIRED RATE CHNG.
063709,000450: 17,3716 13671 TCF RUFLAW12
063710,000451:
063711,000452: 17,3717 03745 RUFLAW2 TC RUFSETUP # REVERSE ROTSENSE AND INDICATE MAX JETS.
063712,000453: 17,3720 33776 CAF RUFRATE
063713,000454: 17,3721 61427 AD EDOT # (.144 AT PI/4 + EDOT) = DESIRED RATE CHNG.
063714,000455: 17,3722 54000 TS A # IF OVERFLOW SKIP, FIRE FOR FULL TIME.
063715,000456: 17,3723 13671 TCF RUFLAW12 # OTHERWISE, COMPUTE JET TIME.
063716,000457: 17,3724 13520 TCF FULLTIME
063717,000458:
Page 1467 |
063719,000460: 17,3725 03745 RUFLAW3 TC RUFSETUP # EXECUTE COMMON RUFLAW SUBROUTINE.
063720,000461: 17,3726 51745 INDEX ADRSDIF1
063721,000462: 17,3727 41600 CS FIREDB # CALCULATE DISTANCE FROM SWITCH CURVE
063722,000463: 17,3730 61751 AD E # 1/ANET1*EDOT*EDOT +E - FIREDB = 0
063723,000464: 17,3731 00006 EXTEND # SCALED AT 4 PI RADIANS
063724,000465: 17,3732 74732 MP BIT11
063725,000466: 17,3733 57427 XCH EDOT
063726,000467: 17,3734 00006 EXTEND
063727,000468: 17,3735 70000 SQUARE
063728,000469: 17,3736 00006 EXTEND
063729,000470: 17,3737 51745 INDEX ADRSDIF1
063730,000471: 17,3740 71570 MP 1/ANET1 +2
063731,000472: 17,3741 61427 AD EDOT
063732,000473: 17,3742 00006 EXTEND
063733,000474: 17,3743 63455 BZMF COASTTJ # COAST IF BELOW IT.
063734,000475: 17,3744 13520 TCF FULLTIME # FIRE FOR FULL PERIOD IF ABOVE IT.
063735,000476:
063736,000477: # SUBROUTINE USED IN ALL ENTRIES TO ROUGHLAW.
063737,000478:
063738,000479: 17,3745 41737 RUFSETUP CS ROTSENSE # REVERSE ROTSENSE WHEN ENTER HERE.
063739,000480: 17,3746 55737 TS ROTSENSE
063740,000481: 17,3747 34742 +2 CAF FOUR # REQUIRE MAXIMUM (2) JETS IN U,V-AXES.
063741,000482: 17,3750 55742 TS NUMBERT
063742,000483: 17,3751 34726 CAF NEGMAX # SUGGEST MAXIMUM (4) JETS IN P-AXIS.
063743,000484: 17,3752 55740 TS FIREFCT
063744,000485: 17,3753 00002 TC Q
063745,000486:
063746,000487: # CONSTANTS FOR TJETLAW
063747,000488:
063748,000489: 17,3754 77757 DEC -16 B-14 # AXISDIFF(INDEX) = NUMBER OF REGISTERS
063749,000490: 17,3755 00000 AXISDIFF DEC +0 B-14 # BETWEEN STORED 1/ACCS PARAMETERS FOR
063750,000491: 17,3756 00020 DEC 16 B-14 # THE INDEXED AXIS AND THE U-AXIS.
063751,000492: 17,3757 14400 SENSOR OCT 14400 # RATIO OF TJET SCALING WITHIN TJETLAW
063752,000493: # (4 SEC) TO SCALING FOR T6 (10.24 SEC).
063753,000494: 17,3760 75673 -3DEG DEC -.06667 # -3.0 DEGREES SCALED AT 45.
063754,000495: 17,3761 77750 -.0112A8 DEC -.00141 # -.01125 SEC(2) SCALED AT 8.
063755,000496: 17,3762 00632 .1AT4 DEC .025 # 0.1 SECOND SCALED AT 4.
063756,000497: 17,3763 01463 .1AT2 DEC .05 # 0.1 SEC SCALED AT 2.
063757,000498: 17,3764 00232 .0375AT4 DEC .00938 # .0375 SEC SCALED AT 4.
063758,000499: 17,3765 77462 -.025AT2 DEC -.0125 # -.025 SEC SCALED AT 2.
063759,000500: 17,3766 77631 -.025AT4 DEC -.00625
063760,000501: 17,3767 77145 -.05AT2 DEC -.025
063761,000502: 17,3770 75462 -.15AT2 DEC -.075
063762,000503: 17,3771 00007 25605 .00375A8 2DEC .00375 B-3
063763,000504:
063764,000505: 17,3773 76631 -TJMAX DEC -.0375 # LARGEST CALCULATED TIME. .150 SEC AT 4.
063765,000506: 17,3774 00122 TJMIN DEC .005 # SMALLEST ALLOWABLE TIME. .020 SEC AT 4.
063766,000507: 17,3775 77655 -TJMIN DEC -.005
063767,000508: 17,3776 04476 RUFRATE DEC .1444 # CORRESPONDS TO TARGET RATE OF 6.5 DEG/S.
End of include-file TJET_LAW.agc. Parent file is MAIN.agc