Source Code
This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure! |
061767,000002: ## Copyright: Public domain.
061768,000003: ## Filename: TJET_LAW.agc
061769,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
061770,000005: ## It is part of the source code for the Lunar Module's (LM)
061771,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
061772,000007: ## Assembler: yaYUL
061773,000008: ## Contact: Ron Burkey <info@sandroid.org>.
061774,000009: ## Website: www.ibiblio.org/apollo.
061775,000010: ## Pages: 1460-1469
061776,000011: ## Mod history: 2009-05-27 RSB Adapted from the corresponding
061777,000012: ## Luminary131 file, using page
061778,000013: ## images from Luminary 1A.
061779,000014: ## 2009-06-06 RSB Eliminated a stray instruction that had crept
061780,000015: ## in somehow.
061781,000016: ## 2011-01-06 JL Fixed pseudo-label indentation.
061782,000017: ## 2016-12-18 RSB Proofed text comments with octopus/ProoferComments
061783,000018: ## and corrected the errors found.
061784,000019: ## 2017-03-03 RSB Snapshot of Luminary 99 Rev 1.
061785,000020: ## 2017-03-14 RSB Comment-text fixes noted in proofing Luminary 116.
061786,000021: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
061787,000022: ## side-by-side diff of Luminary 69/99/116/131/210.
061788,000023:
Page 1460 |
061790,000025: # PROGRAM DESCRIPTION
061791,000026: # DESIGNED BY: R. D. GOSS AND P. S. WEISSMAN
061792,000027: # CODED BY: P. S. WEISSMAN 28 FEBRUARY 1968
061793,000028:
061794,000029: # TJETLAW IS CALLED AS A SUBROUTINE WHEN THE LEM IS NOT DOCKED AND THE AUTOPILOT IS IN THE AUTOMATIC OR
061795,000030: # ATTITUDE-HOLD MODE TO CALCULATE THE JET-FIRING-TIME (TJET) REQUIRED FOR THE AXIS INDICATED BY AXISCTR:
061796,000031: # -1 INDICATES THE P-AXIS
061797,000032: # +0 INDICATES THE U-AXIS
061798,000033: # +1 INDICATES THE V-AXIS.
061799,000034: # THE REGISTERS E AND EDOT CONTAIN THE APPROPRIATE ATTITUDE ERROR AND ERROR RATE AND SENSETYP SHOWS WHETHER
061800,000035: # UNBALANCED COUPLES ARE PREFERRED. TJETLAW ALSO USES VARIOUS FUNCTIONS OF ACCELERATION AND DEADBAND WHICH ARE
061801,000036: # COMPUTED IN THE 1/ACCONT SECTION OF 1/ACCS AND ARE STORED IN SUCH AN ORDER THAT THEY CAN BE CONVENIENTLY
061802,000037: # ACCESSED BY INDEXING.
061803,000038:
061804,000039: # THE SIGN OF THE REQUIRED ROTATION IS CARRIED THROUGH TJETLAW AS ROTSENSE AND IS FINALLY APPLIED TO TJET JUST
061805,000040: # PREVIOUS TO ITS STORAGE IN THE LOCATION CORRESPONDING TO THE AXIS (TJP, TJU OR TJV). THE NUMBER OF JETS THAT
061806,000041: # TJETLAW ASSUMES WILL BE USED IS INDICATED BY THE SETTING OF NUMBERT FOR THE U- OR V-AXIS. TWO JETS ARE ALWAYS
061807,000042: # ASSUMED FOR THE P-AXIS ALTHOUGH FOUR JETS WILL BE FIRED WHEN FIREFCT IS MORE NEGATIVE THAN -4.0 DEGREES
061808,000043: # (FIREFCT IS THE DISTANCE TO A SWITCH CURVE IN THE PHASE PLANE) AND A LONG FIRING IS CALLED FOR.
061809,000044:
061810,000045: # IN ORDER TO AVOID SCALING DIFFICULTIES, SIMPLE ALGORITHMS TAGGED RUFLAW1, -2 AND -3 ARE RESORTED TO WHEN THE
061811,000046: # ERROR AND/OR ERROR RATE ARE LARGE.
061812,000047:
061813,000048: # CALLING SEQUENCE:
061814,000049: # TC TJETLAW (MUST BE IN JASK)
061815,000050: # OR
061816,000051: # INHINT (MUST BE IN JASK)
061817,000052: # TC IBNKCALL
061818,000053: # CADR TJETLAW
061819,000054: # RELINT
061820,000055:
061821,000056: # EXIT: RETURN TO Q.
061822,000057:
061823,000058: # INPUT:
061824,000059: # FROM THE CALLER: E, EDOT, AXISCTR, SENSETYP, TJP, -U, -V.
061825,000060: # FROM 1/ACCONT: 48 ERASABLES BEGINNING AT BLOCKTOP (INCLUDING FLAT, ZONE3LIM AND ACCSWU, -V).
061826,000061:
061827,000062: # OUTPUT:
061828,000063: # TJP, -U OR -V, NUMBERT (DAPTEMP5), FIREFCT (DAPTEMP3).
061829,000064:
061830,000065: # DEBRIS:
061831,000066: # A, L, Q, E, EDOT, DAPTEMP1-6, DAPTREG1-4.
061832,000067:
061833,000068: # ALARM: NONE
061834,000069:
061835,000070: 17,3252 BANK 17
061836,000071: 17,2000 SETLOC DAPS2
061837,000072: 17,2000 BANK
061838,000073: 17,3252 E6,1524 EBANK= TJP
Page 1461 |
061840,000075: 17,3252 COUNT* $$/DAPTJ
061841,000076:
061842,000077: 17,3252 00006 TJETLAW EXTEND # SAVE Q FOR RETURN.
061843,000078: 17,3253 23745 QXCH HOLDQ
061844,000079:
061845,000080: # SET INDEXERS TO CORRESPOND TO THE AXIS AND TO THE SIGN OF EDOT
061846,000081:
061847,000082: 17,3254 51505 INDEX AXISCTR # AXISDIFF(-1)=NO OF LOCATIONS BER P AND U
061848,000083: 17,3255 33722 CAF AXISDIFF # AXISDIFF(0)=0
061849,000084: 17,3256 55746 TS ADRSDIF1 # AXISDIFF(+1)=NO OF LOCATIONS BET V AND U
061850,000085:
061851,000086: 17,3257 31427 CAE EDOT # IF EDOT NEGATIVE, PICK UP SET OF VALUES
061852,000087: 17,3260 00006 EXTEND # THAT ALLOW USE OF SAME CODING AS FOR
061853,000088: 17,3261 63266 BZMF NEGEDOT # POSITIVE EDOT.
061854,000089: 17,3262 31746 CAE ADRSDIF1 # SET A SECOND INDEXER WHICH MAY BE
061855,000090: 17,3263 55744 TS ADRSDIF2 # MODIFIED BY A DECISION FOR MAX JETS.
061856,000091: 17,3264 33724 CAF SENSOR # FOR POSITIVE EDOT, ROTSENSE IS
061857,000092: 17,3265 13276 TCF SETSENSE # INITIALIZED POSITIVE.
061858,000093:
061859,000094: 17,3266 41752 NEGEDOT CS E # IN ORDER FOR NEG EDOT CASE TO USE CODING
061860,000095: 17,3267 55752 TS E # OF POS EDOT, MUST MODIFY AS FOLLOWS:
061861,000096: 17,3270 41427 CS EDOT # 1. COMPLEMENT E AND EDOT.
061862,000097: 17,3271 55427 TS EDOT # 2. SET SENSE OF ROTATION TO NEGATIVE
061863,000098: 17,3272 34753 CAF BIT1 # (REVERSED LATER IF NECESSARY).
061864,000099: 17,3273 27746 ADS ADRSDIF1 # 3. INCREMENT INDEXERS BY ONE SO THAT
061865,000100: 17,3274 55744 TS ADRSDIF2 # THE PROPER PARAMETERS ARE ACCESSED.
061866,000101: 17,3275 43724 CS SENSOR
061867,000102: 17,3276 55740 SETSENSE TS ROTSENSE
061868,000103:
061869,000104: # TEST MAGNITUDE OF E (ATTITUDE ERROR, SINGLE-PRECISION, SCALED AT PI RADIANS):
061870,000105: # IF GREATER THAN (OR EQUAL TO) PI/16 RADIANS, GO TO THE SIMPLIFIED TJET ROUTINE.
061871,000106: # IF LESS THAN PI/16 RADIANS, RESCALE TO PI/4.
061872,000107:
061873,000108: 17,3277 31752 CAE E # PICK UP ATTITUDE ERROR FOR THIS AXIS
061874,000109: 17,3300 00006 EXTEND
061875,000110: 17,3301 74747 MP BIT5 # SHIFT RIGHT TEN BITS: IF A-REGISTER IS
061876,000111: 17,3302 10000 CCS A # ZERO, RESCALE AND TEST EDOT.
061877,000112: 17,3303 13664 TCF RUFLAW2
061878,000113: 17,3304 13306 TCF SCALEE
061879,000114: 17,3305 13630 TCF RUFLAW1
061880,000115: 17,3306 34737 SCALEE CAF BIT13 # ERROR IS IN L SCALED AT PI/16. RESCALE
061881,000116: 17,3307 00006 EXTEND # IT TO PI/4 AND SAVE IT.
061882,000117: 17,3310 70001 MP L
061883,000118: 17,3311 55752 TS E
061884,000119:
061885,000120: # TEST MAGNITUDE OF EDOT (ERROR RATE SCALED AT PI/4 RADIANS/SECOND)
061886,000121: # IF GREATER THAN (OR EQUAL TO) PI/32 RADIANS/SECOND, GO TO THE SIMPLIFIED TJET ROUTINE.
061887,000122: # IF LESS THAN PI/32 RADIANS/SECOND, THEN RESCALE TO PI/32 RADIANS/SECOND.
061888,000123:
061889,000124: 17,3312 31427 CAE EDOT # PICK UP SINGLE-PRECISION ERROR-RATE
Page 1462 |
061891,000126: 17,3313 00006 EXTEND # FOR THIS AXIS=
061892,000127: 17,3314 74750 MP BIT4 # SHIFT RIGHT ELEVEN BITS, IF THE A-REG IS
061893,000128: 17,3315 00006 EXTEND # ZERO, THEN RESCALE AND USE FINELAW.
061894,000129: 17,3316 13320 BZF SCALEDOT
061895,000130: 17,3317 13672 TCF RUFLAW3
061896,000131:
061897,000132: # *** FINELAW STARTS HERE ***
061898,000133:
061899,000134: 17,3320 23427 SCALEDOT LXCH EDOT # EDOT IS SCALED AT PI/32 RADIANS/SECOND.
061900,000135:
061901,000136: 17,3321 31427 CAE EDOT # COMPUTE (EDOT)(EDOT)
061902,000137: 17,3322 00006 EXTEND
061903,000138: 17,3323 70000 SQUARE # PRODUCT SCALED AT PI(2)/2(10) RAD/SEC.
061904,000139: 17,3324 00006 EXTEND
061905,000140: 17,3325 74737 MP BIT13 # SHIFT RIGHT TWO BITS TO RESCALE EDOTSQ
061906,000141: 17,3326 55737 TS EDOTSQ # TO PI(2)/2(8) RAD(2)/SEC(2).
061907,000142:
061908,000143: 17,3327 11752 ERRTEST CCS E # DOES BIG ERROR (THREE DEG BEYOND THE
061909,000144: 17,3330 63725 AD -3DEG # DEADBAND) REQUIRE MAXIMUM JETS?
061910,000145: 17,3331 13333 TCF +2
061911,000146: 17,3332 63725 AD -3DEG
061912,000147: 17,3333 00006 EXTEND
061913,000148: 17,3334 51746 INDEX ADRSDIF1
061914,000149: 17,3335 61601 SU FIREDB
061915,000150: 17,3336 00006 EXTEND
061916,000151: 17,3337 63344 BZMF SENSTEST # IF NOT: ARE UNBALANCED JETS PREFERRED|
061917,000152: 17,3340 34752 MAXJETS CAF TWO # IF YES: INCREMENT ADDRESS LOCATOR AND
061918,000153: 17,3341 27744 ADS ADRSDIF2 # SET SWITCH FOR JET SELECT LOGIC TO 4.
061919,000154: 17,3342 34751 CAF FOUR # (ALWAYS DO THIS FOR P-AXIS)
061920,000155: 17,3343 13347 TCF TJCALC
061921,000156: 17,3344 11500 SENSTEST CCS SENSETYP # DOES TRANSLATION PREFER MIN JETS.
061922,000157: 17,3345 13347 TCF TJCALC # YES. USE MIN-JET PARAMETERS.
061923,000158: 17,3346 13340 TCF MAXJETS # NO. GET MAX-JET PARAMETERS.
061924,000159: 17,3347 55743 TJCALC TS NUMBERT # SET TO +0,1,4 FOR (U,V-AXES) JET SELECT.
061925,000160:
061926,000161: # BEGINNING OF TJET CALCULATIONS:
061927,000162:
061928,000163: 17,3350 41737 CS EDOTSQ # SCALED AT PI(2)/2(8).
061929,000164: 17,3351 00006 EXTEND
061930,000165: 17,3352 51744 INDEX ADRSDIF2
061931,000166: 17,3353 71567 MP 1/ANET1 # .5/ACC SCALED AT 2(6)/PI SEC(2)/RADIAN.
061932,000167: 17,3354 51746 INDEX ADRSDIF1
061933,000168: 17,3355 61601 AD FIREDB # DEADBAND SCALED AT PI/4 RADIAN.
061934,000169: 17,3356 00006 EXTEND
061935,000170: 17,3357 61752 SU E # ATTITUDE ERROR SCALED AT PI/4 RADIAN.
061936,000171: 17,3360 55741 TS FIREFCT # -E-.5(EDOTSQ)/ACC-DB AT PI/4 RADIAN.
061937,000172: 17,3361 00006 EXTEND
061938,000173: 17,3362 63542 BZMF ZON1,2,3
061939,000174:
061940,000175: 17,3363 51746 ZONE4,5 INDEX ADRSDIF1
061941,000176: 17,3364 31573 CAE 1/ACOAST # .5/ACC SCALED AT 2(6)/PI WHERE
Page 1463 |
061943,000178: 17,3365 00006 EXTEND # ACC = MAX(AMIN, AOS-).
061944,000179: 17,3366 71737 MP EDOTSQ # SCALED AT PI/2(8).
061945,000180: 17,3367 61752 AD E # SCALED AT PI/4
061946,000181: 17,3370 51746 INDEX ADRSDIF1
061947,000182: 17,3371 61603 AD COASTDB # SCALED AT PI/4 POS. FOR NEG. INTERCEPT.
061948,000183: 17,3372 00006 EXTEND # TEST E+.5(EDOTSQ)/ACC+DB AT PI/4 RADIAN.
061949,000184: 17,3373 63426 BZMF ZONE5 # IF FUNCTION NEGATIVE, FIND TJET.
061950,000185: # IF FUNCTION POSITIVE, IN ZONE 4.
061951,000186:
061952,000187: # ZONE 4 IS THE COAST REGION. HOWEVER, IF THE JETS ARE ON AND DRIVING TOWARD
061953,000188: # A. THE AXIS WITHIN + OR - (DB + FLAT) FOR DRIFTING FLIGHT, OR
061954,000189: # B. THE USUAL TARGET PARABOLA FOR POWERED FLIGHT
061955,000190: # THEN THE THRUSTERS ARE KEPT ON.
061956,000191:
061957,000192: 17,3374 51505 ZONE4 INDEX AXISCTR # IS THE CURRENT VALUE IN TJET NON-ZERO
061958,000193: 17,3375 41525 CS TJETU # WITH SENSE OPPOSITE TO EDOT,
061959,000194: 17,3376 00006 EXTEND # (I.E., ARE JETS ON AND FIRING TOWARD
061960,000195: 17,3377 71740 MP ROTSENSE # THE DESIRABLE STATE).
061961,000196: 17,3400 00006 EXTEND
061962,000197: 17,3401 63422 BZMF COASTTJ # NO. COAST.
061963,000198:
061964,000199: 17,3402 11555 JETSON CCS FLAT # YES. IS THIS DRIFTING OR POWERED FLIGHT|
061965,000200: 17,3403 13414 TCF DRIFT/ON # DRIFTING. GO MAKE FURTHER TEST.
061966,000201:
061967,000202: 17,3404 41741 CS FIREFCT # POWERED (OR ULLAGE). CAN TARGET PARABOLA
061968,000203: 17,3405 51746 INDEX ADRSDIF1 # BE REACHED FROM THIS POINT IN THE
061969,000204: 17,3406 61605 AD AXISDIST # PHASE PLANE|
061970,000205: 17,3407 00006 EXTEND
061971,000206: 17,3410 63422 BZMF COASTTJ # NO. SET TJET = 0.
061972,000207: 17,3411 03526 TC Z123COMP # YES. CALCULATE TJET AS THOUGH IN ZONE 1
061973,000208: 17,3412 31741 CAE FIREFCT # AFTER COMPUTING THE REQUIRED
061974,000209: 17,3413 13562 TCF ZONE1 # PARAMETERS.
061975,000210:
061976,000211: 17,3414 51746 DRIFT/ON INDEX ADRSDIF1 # CAN TARGET STRIP OF AXIS BE REACHED FROM
061977,000212: 17,3415 41601 CS FIREDB # THIS POINT IN THE PHASE PLANE|
061978,000213: 17,3416 60000 DOUBLE
061979,000214: 17,3417 61741 AD FIREFCT
061980,000215: 17,3420 00006 EXTEND
061981,000216: 17,3421 63424 BZMF +3
061982,000217: 17,3422 34755 COASTTJ CAF ZERO # NO. SET TJET = 0.
061983,000218: 17,3423 13466 TCF RETURNTJ
061984,000219:
061985,000220: 17,3424 03526 TC Z123COMP # YES. CALCULATE TJET AS THOUGH IN ZONE 2
061986,000221: 17,3425 13547 TCF ZONE2,3 # OR 3 AFTER COMPUTING REQUIRED VALUES.
061987,000222:
061988,000223: 17,3426 54001 ZONE5 TS L # TEMPORARILY STORE FUNCTION IN L.
061989,000224: 17,3427 11740 CCS ROTSENSE # MODIFY ADRSDIF2 FOR ACCESSING 1/ANET2
061990,000225: 17,3430 13434 TCF +4 # AND ACCFCTZ5, WHICH MUST BE PICKED UP
061991,000226: 17,3431 05705 TC CCSHOLE # FROM THE NEXT LOWER REGISTER IF THE
061992,000227: 17,3432 44752 CS TWO # (ACTUAL) ERROR RATE IS NEGATIVE.
Page 1464 |
061994,000229: 17,3433 27744 ADS ADRSDIF2
061995,000230:
061996,000231: 17,3434 30001 +4 CAE L
061997,000232: 17,3435 00006 EXTEND
061998,000233: 17,3436 51744 INDEX ADRSDIF2 # TTOAXIS AND HH ARE THE PARAMETERS UPON
061999,000234: 17,3437 71576 MP ACCFCTZ5 # WHICH THE APPROXIMATIONS TO TJET ARE
062000,000235: 17,3440 20001 DDOUBL # BASED.
062001,000236: 17,3441 20001 DDOUBL
062002,000237: 17,3442 53750 DXCH HH # DOUBLE PRECISION H SCALED AT 8 SEC(2).
062003,000238: 17,3443 51744 INDEX ADRSDIF2
062004,000239: 17,3444 31570 CAE 1/ANET2 # SCALED AT 2(7)/PI SEC(2)/RAD.
062005,000240: 17,3445 00006 EXTEND
062006,000241: 17,3446 71427 MP EDOT # SCALED AT PI/2(5)
062007,000242: 17,3447 55742 TS TTOAXIS # SCALED AT 4 SEC.
062008,000243:
062009,000244: # TEST WHETHER TJET GREATER THAN 50 MSEC.
062010,000245:
062011,000246: 17,3450 00006 EXTEND
062012,000247: 17,3451 73734 MP -.05AT2 # H - .05 TTOAXIS - .00125 G.T. ZERO
062013,000248: 17,3452 61747 AD HH # (SCALED AT 8 SEC(2) ).
062014,000249: 17,3453 67746 AD NEG2
062015,000250: 17,3454 00006 EXTEND
062016,000251: 17,3455 63503 BZMF FORMULA1
062017,000252:
062018,000253: # TEST WHETHER TJET GREATER THAN 150 MSEC.
062019,000254:
062020,000255: 17,3456 31742 CAE TTOAXIS
062021,000256: 17,3457 00006 EXTEND
062022,000257: 17,3460 73735 MP -.15AT2 # H - .15 TTOAXIS - .01125 G.T. ZERO
062023,000258: 17,3461 61747 AD HH # (SCALED AT 8 SEC(2) )
062024,000259: 17,3462 63726 AD -.0112A8
062025,000260: 17,3463 00006 EXTEND
062026,000261: 17,3464 63513 BZMF FORMULA2
062027,000262:
062028,000263: # IF TJET GREATER THAN 150 MSEC, ASSIGN IT VALUE OF 250 MSEC, SINCE THIS
062029,000264: # IS ENOUGH TO ASSURE NO SKIP NEXT CSP (100 MSEC).
062030,000265:
062031,000266: 17,3465 34741 FULLTIME CAF BIT11 # 250 MSEC SCALED AT 4 SEC.
062032,000267:
062033,000268: # RETURN TO CALLING PROGRAM WITH JET TIME SCALED AS TIME6 AND SIGNED.
062034,000269:
062035,000270: 17,3466 00006 RETURNTJ EXTEND # ALL BRANCHES TERMINATE HERE WITH TJET
062036,000271: 17,3467 71740 MP ROTSENSE # (SCALED AT 4 SEC) IN THE ACCUMULATOR.
062037,000272: 17,3470 51505 INDEX AXISCTR # ROTSENSE APPLIES SIGN AND CHANGES SCALE.
062038,000273: 17,3471 55525 TS TJETU
062039,000274: 17,3472 00006 EXTEND
062040,000275: 17,3473 51505 INDEX AXISCTR
062041,000276: 17,3474 71547 MP ACCSWU # SET SWITCH FOR JET SELECT IF ROTATION IS
062042,000277: 17,3475 30001 CAE L
062043,000278: 17,3476 00006 EXTEND # IN A SENSE FOR WHICH 1/ACCS HAS FORCED
062044,000279: 17,3477 63502 BZMF +3 # A MAX-JET CALCULATION.
062045,000280: 17,3500 34751 CAF FOUR
Page 1465 |
062047,000282: 17,3501 55743 TS NUMBERT
062048,000283: 17,3502 01745 TC HOLDQ # RETURN VIA SAVED Q.
062049,000284:
062050,000285: # TJET = H/(.025 + TTOAXIS) FOR TJET LESS THAN 50 MSEC.
062051,000286:
062052,000287: 17,3503 43733 FORMULA1 CS -.025AT4 # .025 SEC SCALED AT 4.
062053,000288: 17,3504 61742 AD TTOAXIS # SCALED AT 4 SECONDS.
062054,000289: 17,3505 53750 DXCH HH # STORE DENOMINATOR IN FIRST WORD OF H,
062055,000290: 17,3506 00006 EXTEND # WHICH NEED NOT BE PRESERVED. PICK UP
062056,000291: 17,3507 11747 DV HH # DP H AND DIVIDE BY DENOMINATOR.
062057,000292: 17,3510 00006 EXTEND
062058,000293: 17,3511 74736 MP BIT14 # RESCALE TJET FROM 2 TO USUAL 4 SEC.
062059,000294: 17,3512 13623 TCF CHKMINTJ # CHECK THAT TJET IS NOT LESS THAN MINIMUM
062060,000295:
062061,000296: # TJET = (H + .00375)/(0.1 + TTOAXIS) FOR TJET GREATER THAN 50 MSEC.
062062,000297:
062063,000298: 17,3513 00006 FORMULA2 EXTEND
062064,000299: 17,3514 33737 DCA .00375A8 # .00375 SEC(2) SCALED AT 8.
062065,000300: 17,3515 21750 DAS HH # STORE NUMERATOR IN DP H, WHICH NEED NOT
062066,000301: # BE PRESERVED.
062067,000302: 17,3516 31742 CAE TTOAXIS # SCALED AT 4 SEC.
062068,000303: 17,3517 63727 AD .1AT4 # 0.1 SEC SCALED AT 4.
062069,000304: 17,3520 53750 DXCH HH # STORE DENOMINATOR IN FIRST WORD OF H,
062070,000305: 17,3521 00006 EXTEND # WHICH NEED NOT BE PRESERVED. PICK UP
062071,000306: 17,3522 11747 DV HH # DP NUMERATOR AND DIVIDE BY DENOMINATOR
062072,000307: 17,3523 00006 EXTEND
062073,000308: 17,3524 74736 MP BIT14 # RESCALE TJET FROM 2 TO USUAL 4 SEC.
062074,000309: 17,3525 13466 TCF RETURNTJ # END SUBROUTINE.
062075,000310:
062076,000311: # SUBROUTINIZED COMPUTATIONS REQUIRED FOR ALL ENTRIES INTO CODING FOR ZONES 1, 2, AND 3.
062077,000312: # REACHED BY TC FROM 3 POINTS IN TJETLAW.
062078,000313:
062079,000314: 17,3526 41740 Z123COMP CS ROTSENSE # USED IN RETURNTJ SECTION TO RESCALE TJET
062080,000315: 17,3527 55740 TS ROTSENSE # AS TIME6 AND GIVE IT PROPER SIGN.
062081,000316: 17,3530 31427 CAE EDOT # SCALED AT PI/2(5) RAD/SEC.
062082,000317: 17,3531 00006 EXTEND
062083,000318: 17,3532 51744 INDEX ADRSDIF2
062084,000319: 17,3533 71567 MP 1/ANET1 # SCALED AT 2(7)/PI SEC(2)/RAD.
062085,000320: 17,3534 55742 TS TTOAXIS # STORE TIME-TO-AXIS SCALED AT 4 SECONDS.
062086,000321: 17,3535 63740 AD -TJMAX
062087,000322: 17,3536 00006 EXTEND # IS TIME TO AXIS LESS THAN 150 MSEC.
062088,000323: 17,3537 63541 BZMF +2
062089,000324: 17,3540 13465 TCF FULLTIME # NO. FIRE JETS, DO NOT CALCULATE TJET.
062090,000325: 17,3541 00002 RETURN # YES. GO ON TO FIND TJET
062091,000326:
062092,000327: 17,3542 03526 ZON1,2,3 TC Z123COMP # SUBROUTINIZED PREPARATION FOR ZONE1,2,3.
062093,000328:
062094,000329: # IF THE (NEG) DISTANCE BEYOND PARABOLA IS LESS THAN FLAT, USE SPECIAL
062095,000330: # LOGIC TO ACQUIRE MINIMUM IMPULSE LIMIT CYCLE. DURING POWERED FLIGHT
Page 1466 |
062097,000332: # OR ULLAGE, FLAT = 0
062098,000333:
062099,000334: 17,3543 31741 CAE FIREFCT # SCALED AT PI/4 RAD.
062100,000335: 17,3544 61555 AD FLAT
062101,000336: 17,3545 00006 EXTEND
062102,000337: 17,3546 63562 BZMF ZONE1 # NOT IN SPECIAL ZONES.
062103,000338:
062104,000339: # FIRE FOR AXIS OR, IF CLOSE, FIRE MINIMUM IMPULSE. IF ON AXIS, COAST.
062105,000340:
062106,000341: 17,3547 41556 ZONE2,3 CS ZONE3LIM # HEIGHT OF MIN-IMPULSE ZONE SET BY 1/ACCS
062107,000342: 17,3550 61742 AD TTOAXIS # 35 MSEC IN DRIFTING FLIGHT
062108,000343: 17,3551 00006 EXTEND # ZERO WHEN TRYING TO ENTER GTS CONTROL.
062109,000344: 17,3552 63555 BZMF ZONE3
062110,000345: 17,3553 31742 ZONE2 CAE TTOAXIS # FIRE TO AXIS.
062111,000346: 17,3554 13466 TCF RETURNTJ
062112,000347: 17,3555 11427 ZONE3 CCS EDOT # CHECK IF EDOT IS ZERO.
062113,000348: 17,3556 34746 CAF BIT6 # FIRE A ONE-JET MINIMUM IMPULSE.
062114,000349: 17,3557 13466 TCF RETURNTJ # TJET = +0.
062115,000350: 17,3560 05705 TC CCSHOLE # CANNOT BE BECAUSE NEG EDOT COMPLEMENTED.
062116,000351: 17,3561 13466 TCF RETURNTJ # TJET = +0.
062117,000352:
062118,000353: 17,3562 00006 ZONE1 EXTEND
062119,000354: 17,3563 51746 INDEX ADRSDIF1
062120,000355: 17,3564 61605 SU AXISDIST # SCALED AT PI/4 RAD.
062121,000356: 17,3565 00006 EXTEND
062122,000357: 17,3566 51744 INDEX ADRSDIF2
062123,000358: 17,3567 71575 MP ACCFCTZ1 # SCALED AT 2(7)/PI SEC(2)/RAD.
062124,000359: 17,3570 20001 DDOUBL
062125,000360: 17,3571 20001 DDOUBL
062126,000361: 17,3572 53750 DXCH HH # DOUBLE PRECISION H SCALED AT 8 SEC(2).
062127,000362:
062128,000363: # TEST WHETHER TOTAL TIME REQUIRED GREATER THAN 150 MSEC:
062129,000364: # 2 2
062130,000365: # IS .5(.150 - TTOAXIS) - H NEGATIVE (SCALED AT 8 SECONDS )
062131,000366:
062132,000367: 17,3573 31742 CAE TTOAXIS # TTOAXIS SCALED AT 4 SECONDS.
062133,000368: 17,3574 63740 AD -TJMAX # -.150 SECOND SCALED AT 4.
062134,000369: 17,3575 00006 EXTEND
062135,000370: 17,3576 70000 SQUARE
062136,000371: 17,3577 00006 EXTEND
062137,000372: 17,3600 61747 SU HH # HIGH WORD OF H SCALED AT 8 SEC(2).
062138,000373: 17,3601 00006 EXTEND
062139,000374: 17,3602 63465 BZMF FULLTIME # YES. NEED NOT CALCULATE TJET.
062140,000375:
062141,000376: # TEST WHETHER TIME BEYOND AXIS GREATER THAN 50 MSEC TO DETERMINE WHICH APPROXIMATION TO USE.
062142,000377:
062143,000378: 17,3603 31747 CAE HH
062144,000379: 17,3604 67746 AD NEG2
062145,000380: 17,3605 00006 EXTEND
062146,000381: 17,3606 63616 BZMF FORMULA3
062147,000382:
Page 1467 |
062149,000384: # TJET = H/0.1 + TTOAXIS + .0375 FOR APPROXIMATION OVER MORE THAN 50 MSEC.
062150,000385:
062151,000386: 17,3607 33730 CAF .1AT2 # STORE .1 SEC SCALED AT 2 FOR DIVISION.
062152,000387: 17,3610 53750 DXCH HH # DP H SCALED AT 8 SEC(2) NEED NOT BE
062153,000388: 17,3611 00006 EXTEND # PRESERVED.
062154,000389: 17,3612 11747 DV HH # QUOTIENT SCALED AT 4 SECONDS.
062155,000390: 17,3613 61742 AD TTOAXIS # SCALED AT 4 SEC.
062156,000391: 17,3614 63731 AD .0375AT4 # .0375 SEC SCALED AT 4.
062157,000392: 17,3615 13466 TCF RETURNTJ # END COMPUTATION.
062158,000393:
062159,000394: # TJET = H/.O25 + TTOAXIS FOR APPROXIMATION OVER LESS THAN 50 MSEC.
062160,000395:
062161,000396: 17,3616 43732 FORMULA3 CS -.025AT2 # STORE +.025 SEC SCALED AT 2 FOR DIVISION
062162,000397: 17,3617 53750 DXCH HH # PICK UP DP H AT 8, WHICH NEED NOT BE
062163,000398: 17,3620 00006 EXTEND # PRESERVED.
062164,000399: 17,3621 11747 DV HH # QUOTIENT SCALED AT 4 SECONDS.
062165,000400: 17,3622 61742 AD TTOAXIS # SCALED AT 4 SEC.
062166,000401:
062167,000402: # IF COMPUTED JET TIME IS LESS THAN TJMIN, TJET IS SET TO ZERO.
062168,000403: # MINIMUM IMPULSES REQUIRED IN ZONE 3 ARE NOT SUBJECT TO THIS CONSTRAINT, NATURALLY.
062169,000404:
062170,000405: 17,3623 63742 CHKMINTJ AD -TJMIN # IS COMPUTED TIME LESS THAN THE MINIMUM.
062171,000406: 17,3624 00006 EXTEND
062172,000407: 17,3625 63422 BZMF COASTTJ # YES, SET TIME TO ZERO.
062173,000408: 17,3626 63741 AD TJMIN # NO, RESTORE COMPUTED TIME.
062174,000409: 17,3627 13466 TCF RETURNTJ # END COMPUTATION.
062175,000410:
Page 1468 |
062177,000412: # *** ROUGHLAW ***
062178,000413:
062179,000414: # BEFORE ENTRY TO RUFLAW:
062180,000415: # 1. INDEXERS ADRSDIF1 AND ADRSDIF2 ARE SET ON BASIS OF AXIS, AND SIGN OF EDOT.
062181,000416: # 2. IF EDOT WAS NEGATIVE, E AND EDOT ARE ROTATED INTO UPPER HALF-PLANE AND ROTSENSE IS MADE NEGATIVE.
062182,000417: # 3. E IS SCALED AT PI RADIANS AND EDOT AT PI/4 RAD/SEC.
062183,000418: # (EXCEPT THE RUFLAW3 ENTRY WHEN E IS AT PI/4)
062184,000419:
062185,000420: # RUFLAW1: ERROR MORE NEGATIVE THAN PI/16 RAD. FIRE TO A RATE OF 6.5 DEG/SEC (IF JET TIME EXCEEDS 20 MSEC.).
062186,000421: # RUFLAW2: ERROR MORE POSITIVE THAN PI/16 RAD. FIRE TO AN OPPOSING RATE OF 6.5 DEG/SEC.
062187,000422: # RUFLAW3: ERROR RATE GREATER THAN PI/32 RAD/SEC AND ERROR WITHIN BOUNDS. COAST IF BELOW FIREFCT, FIRE IF ABOVE
062188,000423:
062189,000424: 17,3630 43743 RUFLAW1 CS RUFRATE # DECREMENT EDOT BY .1444 RAD/SEC AT PI/4
062190,000425: 17,3631 27427 ADS EDOT # WHICH IS THE TARGET RATE
062191,000426: 17,3632 00006 EXTEND
062192,000427: 17,3633 63654 BZMF SMALRATE # BRANCH IF RATE LESS THAN TARGET.
062193,000428: 17,3634 03712 TC RUFSETUP # REVERSE ROTSENSE AND INDICATE MAX JETS.
062194,000429: 17,3635 31427 CAE EDOT # PICK UP DESIRED RATE CHANGE.
062195,000430:
062196,000431: 17,3636 00006 RUFLAW12 EXTEND # COMPUTE TJET
062197,000432: 17,3637 51744 INDEX ADRSDIF2 # = (DESIRED RATE CHANGE)/(2-JET ACCEL.)
062198,000433: 17,3640 71571 MP 1/ANET1 +2
062199,000434: 17,3641 67741 AD -1/8 # IF TJET, SCALED AT 32 SEC, EXCEEDS
062200,000435: 17,3642 00006 EXTEND # 4 SECONDS, SET TJET TO TJMAX.
062201,000436: 17,3643 63645 BZMF +2
062202,000437: 17,3644 13465 TCF FULLTIME
062203,000438: 17,3645 00006 EXTEND
062204,000439: 17,3646 13465 BZF FULLTIME
062205,000440: 17,3647 64740 AD BIT12 # RESTORE COMPUTED TJET TO ACCUMULATOR.
062206,000441: 17,3650 20001 DAS A
062207,000442: 17,3651 20001 DAS A
062208,000443: 17,3652 20001 DAS A # RESCALED TJET AT 4 SECONDS.
062209,000444: 17,3653 13623 TCF CHKMINTJ # RETURN AS FROM FINELAW.
062210,000445:
062211,000446: 17,3654 03714 SMALRATE TC RUFSETUP +2 # SET NUMBERT AND FIREFCT FOR MAXIMUM JETS
062212,000447: 17,3655 11740 CCS ROTSENSE
062213,000448: 17,3656 34753 CAF ONE # MODIFY INDEXER TO POINT TO 1/ANET
062214,000449: 17,3657 13661 TCF +2 # CORRESPONDING TO THE PROPER SENSE.
062215,000450: 17,3660 37747 CAF NEGONE
062216,000451: 17,3661 27744 ADS ADRSDIF2
062217,000452:
062218,000453: 17,3662 41427 CS EDOT # (.144 AT PI/4 - EDOT) = DESIRED RATE CHNG.
062219,000454: 17,3663 13636 TCF RUFLAW12
062220,000455:
062221,000456: 17,3664 03712 RUFLAW2 TC RUFSETUP # REVERSE ROTSENSE AND INDICATE MAX JETS.
062222,000457: 17,3665 33743 CAF RUFRATE
062223,000458: 17,3666 61427 AD EDOT # (.144 AT PI/4 + EDOT) = DESIRED RATE CHNG.
062224,000459: 17,3667 54000 TS A # IF OVERFLOW SKIP, FIRE FOR FULL TIME.
062225,000460: 17,3670 13636 TCF RUFLAW12 # OTHERWISE, COMPUTE JET TIME.
062226,000461: 17,3671 13465 TCF FULLTIME
062227,000462:
Page 1469 |
062229,000464: 17,3672 03712 RUFLAW3 TC RUFSETUP # EXECUTE COMMON RUFLAW SUBROUTINE.
062230,000465: 17,3673 51746 INDEX ADRSDIF1
062231,000466: 17,3674 41601 CS FIREDB # CALCULATE DISTANCE FROM SWITCH CURVE
062232,000467: 17,3675 61752 AD E # 1/ANET1*EDOT*EDOT +E - FIREDB = 0
062233,000468: 17,3676 00006 EXTEND # SCALED AT 4 PI RADIANS
062234,000469: 17,3677 74741 MP BIT11
062235,000470: 17,3700 57427 XCH EDOT
062236,000471: 17,3701 00006 EXTEND
062237,000472: 17,3702 70000 SQUARE
062238,000473: 17,3703 00006 EXTEND
062239,000474: 17,3704 51746 INDEX ADRSDIF1
062240,000475: 17,3705 71571 MP 1/ANET1 +2
062241,000476: 17,3706 61427 AD EDOT
062242,000477: 17,3707 00006 EXTEND
062243,000478: 17,3710 63422 BZMF COASTTJ # COAST IF BELOW IT.
062244,000479: 17,3711 13465 TCF FULLTIME # FIRE FOR FULL PERIOD IF ABOVE IT.
062245,000480:
062246,000481: # SUBROUTINE USED IN ALL ENTRIES TO ROUGHLAW.
062247,000482:
062248,000483: 17,3712 41740 RUFSETUP CS ROTSENSE # REVERSE ROTSENSE WHEN ENTER HERE.
062249,000484: 17,3713 55740 TS ROTSENSE
062250,000485: 17,3714 34751 +2 CAF FOUR # REQUIRE MAXIMUM (2) JETS IN U,V-AXES.
062251,000486: 17,3715 55743 TS NUMBERT
062252,000487: 17,3716 34735 CAF NEGMAX # SUGGEST MAXIMUM (4) JETS IN P-AXIS.
062253,000488: 17,3717 55741 TS FIREFCT
062254,000489: 17,3720 00002 TC Q
062255,000490:
062256,000491: # CONSTANTS FOR TJETLAW
062257,000492:
062258,000493: 17,3721 77757 DEC -16 B-14 # AXISDIFF(INDEX) = NUMBER OF REGISTERS
062259,000494: 17,3722 00000 AXISDIFF DEC +0 B-14 # BETWEEN STORED 1/ACCS PARAMETERS FOR
062260,000495: 17,3723 00020 DEC 16 B-14 # THE INDEXED AXIS AND THE U-AXIS.
062261,000496: 17,3724 14400 SENSOR OCT 14400 # RATIO OF TJET SCALING WITHIN TJETLAW
062262,000497: # (4 SEC) TO SCALING FOR T6 (10.24 SEC).
062263,000498: 17,3725 75673 -3DEG DEC -.06667 # -3.0 DEGREES SCALED AT 45.
062264,000499: 17,3726 77750 -.0112A8 DEC -.00141 # -.01125 SEC(2) SCALED AT 8.
062265,000500: 17,3727 00632 .1AT4 DEC .025 # 0.1 SECOND SCALED AT 4.
062266,000501: 17,3730 01463 .1AT2 DEC .05 # 0.1 SEC SCALED AT 2.
062267,000502: 17,3731 00232 .0375AT4 DEC .00938 # .0375 SEC SCALED AT 4.
062268,000503: 17,3732 77462 -.025AT2 DEC -.0125 # -.025 SEC SCALED AT 2.
062269,000504: 17,3733 77631 -.025AT4 DEC -.00625
062270,000505: 17,3734 77145 -.05AT2 DEC -.025
062271,000506: 17,3735 75462 -.15AT2 DEC -.075
062272,000507: 17,3736 00007 25605 .00375A8 2DEC .00375 B-3
062273,000508:
062274,000509: 17,3740 76631 -TJMAX DEC -.0375 # LARGEST CALCULATED TIME. .150 SEC AT 4.
062275,000510: 17,3741 00122 TJMIN DEC .005 # SMALLEST ALLOWABLE TIME. .020 SEC AT 4.
062276,000511: 17,3742 77655 -TJMIN DEC -.005
062277,000512: 17,3743 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