Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

063323,000002:                                                                                                  ## Copyright:   Public domain.
063324,000003:                                                                                                  ## Filename:    TJET_LAW.agc
063325,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
063326,000005:                                                                                                  ##              It is part of the source code for the original release
063327,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
063328,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
063329,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
063330,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
063331,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
063332,000011:                                                                                                  ##              that the code format has been changed to conform to the
063333,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
063334,000013:                                                                                                  ##              original YUL assembler.
063335,000014:                                                                                                  ## Reference:   pp. 1454-1464
063336,000015:                                                                                                  ## Assembler:   yaYUL
063337,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
063338,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
063339,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
063340,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
063341,000020:                                                                                                  ##              2016-12-23 RRB  Updated for Luminary 69.
063342,000021:                                                                                                  ##              2017-01-21 HG   Fix operand -3DEG   -> -2DEG
063343,000022:                                                                                                  ##                                          RUFRATE -> BIT12
063344,000023:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
063345,000024:                                                                                                  ##                              and fixed errors found.
063346,000025:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
063347,000026:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
063348,000027: 

Page 1454

063350,000029:                                                                                                  #  PROGRAM DESCRIPTION
063351,000030:                                                                                                  #  DESIGNED BY:  R. D. GOSS AND P. S. WEISSMAN
063352,000031:                                                                                                  #  CODED BY:  P. S. WEISSMAN 28 FEBRUARY 1968
063353,000032: 
063354,000033:                                                                                                  #  TJETLAW IS CALLED AS A SUBROUTINE WHEN THE LEM IS NOT DOCKED AND THE AUTOPILOT IS IN THE AUTOMATIC OR
063355,000034:                                                                                                  #  ATTITUDE-HOLD MODE TO CALCULATE THE JET-FIRING-TIME (TJET) REQUIRED FOR THE AXIS INDICATED BY AXISCTR:
063356,000035:                                                                                                  #        -1      INDICATES THE P-AXIS
063357,000036:                                                                                                  #        +0      INDICATES THE U-AXIS
063358,000037:                                                                                                  #        +1      INDICATES THE V-AXIS.
063359,000038:                                                                                                  #  THE REGISTERS E AND EDOT CONTAIN THE APPROPRIATE ATTITUDE ERROR AND ERROR RATE AND SENSETYP SHOWS WHETHER
063360,000039:                                                                                                  #  UNBALANCED COUPLES ARE PREFERRED.  TJETLAW ALSO USES VARIOUS FUNCTIONS OF ACCELERATION AND DEADBAND WHICH ARE
063361,000040:                                                                                                  #  COMPUTED IN THE 1/ACCONT SECTION OF 1/ACCS AND ARE STORED IN SUCH AN ORDER THAT THEY CAN BE CONVENIENTLY
063362,000041:                                                                                                  #  ACCESSED BY INDEXING.
063363,000042: 
063364,000043:                                                                                                  #  THE SIGN OF THE REQUIRED ROTATION IS CARRIED THROUGH TJETLAW AS ROTSENSE AND IS FINALLY APPLIED TO TJET JUST
063365,000044:                                                                                                  #  PREVIOUS TO ITS STORAGE IN THE LOCATION CORRESPONDING TO THE AXIS (TJP, TJU OR TJV).  THE NUMBER OF JETS THAT
063366,000045:                                                                                                  #  TJETLAW ASSUMES WILL BE USED IS INDICATED BY THE SETTING OF NUMBERT FOR THE U- OR V-AXIS.  TWO JETS ARE ALWAYS
063367,000046:                                                                                                  #  ASSUMED FOR THE P-AXIS  ALTHOUGH FOUR JETS WILL BE FIRED WHEN FIREFCT IS MORE NEGATIVE THAN -4.0 DEGREES
063368,000047:                                                                                                  #  (FIREFCT IS THE DISTANCE TO A SWITCH CURVE IN THE PHASE PLANE) AND A LONG FIRING IS CALLED FOR.
063369,000048: 
063370,000049:                                                                                                  #  IN ORDER TO AVOID SCALING DIFFICULTIES, SIMPLE ALGORITHMS TAGGED RUFLAW1, -2 AND -3 ARE RESORTED TO WHEN THE
063371,000050:                                                                                                  #  ERROR AND/OR ERROR RATE ARE LARGE.
063372,000051: 
063373,000052:                                                                                                  #  CALLING SEQUENCE:
063374,000053:                                                                                                  #                TC      TJETLAW         (MUST BE IN JASK)
063375,000054:                                                                                                  #        OR
063376,000055:                                                                                                  #                INHINT                  (MUST BE IN JASK)
063377,000056:                                                                                                  #                TC      IBNKCALL
063378,000057:                                                                                                  #                CADR    TJETLAW
063379,000058:                                                                                                  #                RELINT
063380,000059: 
063381,000060:                                                                                                  #  EXIT:         RETURN TO Q.
063382,000061: 
063383,000062:                                                                                                  #  INPUT:
063384,000063:                                                                                                  #        FROM THE CALLER:  E, EDOT, AXISCTR, SENSETYP, TJP,-U,-V.
063385,000064:                                                                                                  #        FROM 1/ACCONT:  48 ERASABLES BEGINNING AT BLOCKTOP (INCLUDING FLAT, ZONE3LIM AND ACCSWU,-V).
063386,000065: 
063387,000066:                                                                                                  #  OUTPUT:
063388,000067:                                                                                                  #        TJP,-U OR -V, NUMBERT (DAPTEMP5), FIREFCT (DAPTEMP3).
063389,000068: 
063390,000069:                                                                                                  #  DEBRIS:
063391,000070:                                                                                                  #        A, L, Q, E, EDOT, DAPTEMP1-6, DAPTREG1-4.
063392,000071: 
063393,000072:                                                                                                  #  ALARM:  NONE
063394,000073: 
063395,000074: 17,3207                                           BANK     17                                    
063396,000075: 17,2000                                           SETLOC   DAPS2                                 
063397,000076: 17,2000                                           BANK                                           
063398,000077: 17,3207  E6,1524                                  EBANK=   TJP                                   

Page 1455

063400,000079: 17,3207                                           COUNT*   $$/DAPTJ                              
063401,000080: 
063402,000081: 17,3207           00006        TJETLAW            EXTEND                                         #  SAVE Q FOR RETURN.
063403,000082: 17,3210           23743                           QXCH     HOLDQ                                 
063404,000083: 
063405,000084:                                                                                                  #  SET INDEXERS TO CORRESPOND TO THE AXIS AND TO THE SIGN OF EDOT
063406,000085: 
063407,000086: 17,3211           51476                           INDEX    AXISCTR                               #  AXISDIFF(-1)=NO OF LOCATIONS BER P AND U
063408,000087: 17,3212           33657                           CAF      AXISDIFF                              #  AXISDIFF(0) = 0
063409,000088: 17,3213           55744                           TS       ADRSDIF1                              #  AXISDIFF(+1)=NO OF LOCATIONS BET V AND U
063410,000089: 
063411,000090: 17,3214           31425                           CAE      EDOT                                  #  IF EDOT NEGATIVE, PICK UP SET OF VALUES
063412,000091: 17,3215           00006                           EXTEND                                         #        THAT ALLOW USE OF SAME CODING AS FOR
063413,000092: 17,3216           63223                           BZMF     NEGEDOT                               #        POSITIVE EDOT.
063414,000093: 17,3217           31744                           CAE      ADRSDIF1                              #  SET A SECOND INDEXER WHICH MAY BE
063415,000094: 17,3220           55742                           TS       ADRSDIF2                              #        MODIFIED BY A DECISION FOR MAX JETS.
063416,000095: 17,3221           33661                           CAF      SENSOR                                #  FOR POSITIVE EDOT, ROTSENSE IS
063417,000096: 17,3222           13233                           TCF      SETSENSE                              #        INITIALIZED POSITIVE.
063418,000097: 
063419,000098: 17,3223           41750        NEGEDOT            CS       E                                     #  IN ORDER FOR NEG EDOT CASE TO USE CODING
063420,000099: 17,3224           55750                           TS       E                                     #        OF POS EDOT, MUST MODIFY AS FOLLOWS:
063421,000100: 17,3225           41425                           CS       EDOT                                  #        1. COMPLEMENT E AND EDOT.
063422,000101: 17,3226           55425                           TS       EDOT                                  #        2. SET SENSE OF ROTATION TO NEGATIVE
063423,000102: 17,3227           34753                           CAF      BIT1                                  #           (REVERSED LATER IF NECESSARY).
063424,000103: 17,3230           27744                           ADS      ADRSDIF1                              #        3. INCREMENT INDEXERS BY ONE SO THAT
063425,000104: 17,3231           55742                           TS       ADRSDIF2                              #           THE PROPER PARAMETERS ARE ACCESSED.
063426,000105: 17,3232           43661                           CS       SENSOR                                
063427,000106: 17,3233           55736        SETSENSE           TS       ROTSENSE                              
063428,000107: 
063429,000108:                                                                                                  #  TEST MAGNITUDE OF E (ATTITUDE ERROR, SINGLE-PRECISION, SCALED AT PI RADIANS):
063430,000109:                                                                                                  #        IF GREATER THAN (OR EQUAL TO) PI/16 RADIANS, GO TO THE SIMPLIFIED TJET ROUTINE.
063431,000110:                                                                                                  #        IF LESS THAN PI/16 RADIANS, RESCALE TO PI/4.
063432,000111: 
063433,000112: 17,3234           31750                           CAE      E                                     #  PICK UP ATTITUDE ERROR FOR THIS AXIS
063434,000113: 17,3235           00006                           EXTEND                                         
063435,000114: 17,3236           74747                           MP       BIT5                                  #  SHIFT RIGHT TEN BITS:  IF A-REGISTER IS
063436,000115: 17,3237           10000                           CCS      A                                     #        ZERO, RESCALE AND TEST EDOT.
063437,000116: 17,3240           13621                           TCF      RUFLAW2                               
063438,000117: 17,3241           13243                           TCF      SCALEE                                
063439,000118: 17,3242           13565                           TCF      RUFLAW1                               
063440,000119: 17,3243           34737        SCALEE             CAF      BIT13                                 #  ERROR IS IN L SCALED AT PI/16.  RESCALE
063441,000120: 17,3244           00006                           EXTEND                                         #        IT TO PI/4 AND SAVE IT.
063442,000121: 17,3245           70001                           MP       L                                     
063443,000122: 17,3246           55750                           TS       E                                     
063444,000123: 
063445,000124:                                                                                                  #  TEST MAGNITUDE OF EDOT (ERROR RATE SCALED AT PI/4 RADIANS/SECOND)
063446,000125:                                                                                                  #        IF GREATER THAN (OR EQUAL TO) PI/32 RADIANS/SECOND, GO TO THE SIMPLIFIED TJET ROUTINE.
063447,000126:                                                                                                  #        IF LESS THAN PI/32 RADIANS/SECOND, THEN RESCALE TO PI/32 RADIANS/SECOND.
063448,000127: 
063449,000128: 17,3247           31425                           CAE      EDOT                                  #  PICK UP SINGLE-PRECISION ERROR-RATE

Page 1456

063451,000130: 17,3250           00006                           EXTEND                                         #  FOR THIS AXIS=
063452,000131: 17,3251           74750                           MP       BIT4                                  #  SHIFT RIGHT ELEVEN BITS, IF THE A-REG IS
063453,000132: 17,3252           00006                           EXTEND                                         #  ZERO, THEN RESCALE AND USE FINELAW.
063454,000133: 17,3253           13255                           BZF      SCALEDOT                              
063455,000134: 17,3254           13627                           TCF      RUFLAW3                               
063456,000135: 
063457,000136:                                                                                                  #  *** FINELAW STARTS HERE ***
063458,000137: 
063459,000138: 17,3255           23425        SCALEDOT           LXCH     EDOT                                  #  EDOT IS SCALED AT PI/32 RADIANS/SECOND.
063460,000139: 
063461,000140: 17,3256           31425                           CAE      EDOT                                  #  COMPUTE (EDOT)(EDOT)
063462,000141: 17,3257           00006                           EXTEND                                         
063463,000142: 17,3260           70000                           SQUARE                                         #  PRODUCT SCALED AT PI(2)/2(10) RAD/SEC.
063464,000143: 17,3261           00006                           EXTEND                                         
063465,000144: 17,3262           74737                           MP       BIT13                                 #  SHIFT RIGHT TWO BITS TO RESCALE EDOTSQ
063466,000145: 17,3263           55735                           TS       EDOTSQ                                #        TO PI(2)/2(8) RAD(2)/SEC(2).
063467,000146: 
063468,000147: 17,3264           11750        ERRTEST            CCS      E                                     #  DOES BIG ERROR (TWO DEGREES BEYOND THE
063469,000148: 17,3265           63662                           AD       -2DEG                                 #  DEADBAND) REQUIRE MAXIMUM JETS?
063470,000149: 17,3266           13270                           TCF      +2                                    
063471,000150: 17,3267           63662                           AD       -2DEG                                 
063472,000151: 17,3270           00006                           EXTEND                                         
063473,000152: 17,3271           51744                           INDEX    ADRSDIF1                              
063474,000153: 17,3272           61601                           SU       FIREDB                                
063475,000154: 17,3273           00006                           EXTEND                                         
063476,000155: 17,3274           63301                           BZMF     SENSTEST                              #  IF NOT:  ARE UNBALANCED JETS PREFERRED|
063477,000156: 17,3275           34752        MAXJETS            CAF      TWO                                   #  IF YES:  INCREMENT ADDRESS LOCATOR AND
063478,000157: 17,3276           27742                           ADS      ADRSDIF2                              #           SET SWITCH FOR JET SELECT LOGIC TO 4.
063479,000158: 17,3277           34751                           CAF      FOUR                                  #           (ALWAYS DO THIS FOR P-AXIS)
063480,000159: 17,3300           13304                           TCF      TJCALC                                
063481,000160: 17,3301           11477        SENSTEST           CCS      SENSETYP                              #  DOES TRANSLATION PREFER MIN JETS.
063482,000161: 17,3302           13304                           TCF      TJCALC                                #  YES.  USE MIN-JET PARAMETERS.
063483,000162: 17,3303           13275                           TCF      MAXJETS                               #  NO.  GET MAX-JET PARAMETERS.
063484,000163: 17,3304           55741        TJCALC             TS       NUMBERT                               #  SET TO +0,1,4 FOR (U,V-AXES) JET SELECT.
063485,000164: 
063486,000165:                                                                                                  #  BEGINNING OF TJET CALCULATIONS:
063487,000166: 
063488,000167: 17,3305           41735                           CS       EDOTSQ                                #  SCALED AT PI(2)/2(8).
063489,000168: 17,3306           00006                           EXTEND                                         
063490,000169: 17,3307           51742                           INDEX    ADRSDIF2                              
063491,000170: 17,3310           71567                           MP       1/ANET1                               #  .5/ACC SCALED AT 2(6)/PI SEC(2)/RADIAN.
063492,000171: 17,3311           51744                           INDEX    ADRSDIF1                              
063493,000172: 17,3312           61601                           AD       FIREDB                                #  DEADBAND SCALED AT PI/4 RADIAN.
063494,000173: 17,3313           00006                           EXTEND                                         
063495,000174: 17,3314           61750                           SU       E                                     #  ATTITUDE ERROR SCALED AT PI/4 RADIAN.
063496,000175: 17,3315           55737                           TS       FIREFCT                               #  -E-.5(EDOTSQ)/ACC-DB AT PI/4 RADIAN.
063497,000176: 17,3316           00006                           EXTEND                                         
063498,000177: 17,3317           63477                           BZMF     ZON1,2,3                              
063499,000178: 
063500,000179: 17,3320           51744        ZONE4,5            INDEX    ADRSDIF1                              
063501,000180: 17,3321           31573                           CAE      1/ACOAST                              #  .5/ACC SCALED AT 2(6)/PI WHERE

Page 1457

063503,000182: 17,3322           00006                           EXTEND                                         #  ACC = MAX(AMIN, AOS-).
063504,000183: 17,3323           71735                           MP       EDOTSQ                                #  SCALED AT PI/2(8).
063505,000184: 17,3324           61750                           AD       E                                     #  SCALED AT PI/4
063506,000185: 17,3325           51744                           INDEX    ADRSDIF1                              
063507,000186: 17,3326           61603                           AD       COASTDB                               #  SCALED AT PI/4 POS. FOR NEG. INTERCEPT.
063508,000187: 17,3327           00006                           EXTEND                                         #  TEST E+.5(EDOTSQ)/ACC+DB AT PI/4 RADIAN.
063509,000188: 17,3330           63363                           BZMF     ZONE5                                 #  IF FUNCTION NEGATIVE, FIND TJET.
063510,000189:                                                                                                  #  IF FUNCTION POSITIVE, IN ZONE 4.
063511,000190: 
063512,000191:                                                                                                  #  ZONE 4 IS THE COAST REGION.  HOWEVER, IF THE JETS ARE ON AND DRIVING TOWARD
063513,000192:                                                                                                  #        A. THE AXIS WITHIN + OR - (DB + FLAT) FOR DRIFTING FLIGHT, OR
063514,000193:                                                                                                  #        B. THE USUAL TARGET PARABOLA FOR POWERED FLIGHT
063515,000194:                                                                                                  #  THEN THE THRUSTERS ARE KEPT ON.
063516,000195: 
063517,000196: 17,3331           51476        ZONE4              INDEX    AXISCTR                               #  IS THE CURRENT VALUE IN TJET NON-ZERO
063518,000197: 17,3332           41525                           CS       TJETU                                 #        WITH SENSE OPPOSITE TO EDOT,
063519,000198: 17,3333           00006                           EXTEND                                         #        (I.E., ARE JETS ON AND FIRING TOWARD
063520,000199: 17,3334           71736                           MP       ROTSENSE                              #        THE DESIRABLE STATE).
063521,000200: 17,3335           00006                           EXTEND                                         
063522,000201: 17,3336           63357                           BZMF     COASTTJ                               #  NO.  COAST.
063523,000202: 
063524,000203: 17,3337           11555        JETSON             CCS      FLAT                                  #  YES.  IS THIS DRIFTING OR POWERED FLIGHT|
063525,000204: 17,3340           13351                           TCF      DRIFT/ON                              #  DRIFTING.  GO MAKE FURTHER TEST.
063526,000205: 
063527,000206: 17,3341           41737                           CS       FIREFCT                               #  POWERED (OR ULLAGE).  CAN TARGET PARABOLA
063528,000207: 17,3342           51744                           INDEX    ADRSDIF1                              #        BE REACHED FROM THIS POINT IN THE
063529,000208: 17,3343           61605                           AD       AXISDIST                              #        PHASE PLANE|
063530,000209: 17,3344           00006                           EXTEND                                         
063531,000210: 17,3345           63357                           BZMF     COASTTJ                               #  NO. SET TJET = 0.
063532,000211: 17,3346           03463                           TC       Z123COMP                              #  YES.  CALCULATE TJET AS THOUGH IN ZONE 1
063533,000212: 17,3347           31737                           CAE      FIREFCT                               #        AFTER COMPUTING THE REQUIRED
063534,000213: 17,3350           13517                           TCF      ZONE1                                 #        PARAMETERS.
063535,000214: 
063536,000215: 17,3351           51744        DRIFT/ON           INDEX    ADRSDIF1                              #  CAN TARGET STRIP OF AXIS BE REACHED FROM
063537,000216: 17,3352           41601                           CS       FIREDB                                #        THIS POINT IN THE PHASE PLANE|
063538,000217: 17,3353           60000                           DOUBLE                                         
063539,000218: 17,3354           61737                           AD       FIREFCT                               
063540,000219: 17,3355           00006                           EXTEND                                         
063541,000220: 17,3356           63361                           BZMF     +3                                    
063542,000221: 17,3357           34755        COASTTJ            CAF      ZERO                                  #  NO.  SET TJET = 0.
063543,000222: 17,3360           13423                           TCF      RETURNTJ                              
063544,000223: 
063545,000224: 17,3361           03463                           TC       Z123COMP                              #  YES. CALCULATE TJET AS THOUGH IN ZONE 2
063546,000225: 17,3362           13504                           TCF      ZONE2,3                               #        OR 3 AFTER COMPUTING REQUIRED VALUES.
063547,000226: 
063548,000227: 17,3363           54001        ZONE5              TS       L                                     #  TEMPORARILY STORE FUNCTION IN L.
063549,000228: 17,3364           11736                           CCS      ROTSENSE                              #  MODIFY ADRSDIF2 FOR ACCESSING 1/ANET2
063550,000229: 17,3365           13371                           TCF      +4                                    #  AND ACCFCTZ5, WHICH MUST BE PICKED UP
063551,000230: 17,3366           05677                           TC       CCSHOLE                               #  FROM THE NEXT LOWER REGISTER IF THE
063552,000231: 17,3367           44752                           CS       TWO                                   #  (ACTUAL) ERROR RATE IS NEGATIVE.

Page 1458

063554,000233: 17,3370           27742                           ADS      ADRSDIF2                              
063555,000234: 
063556,000235: 17,3371           30001                 +4        CAE      L                                     
063557,000236: 17,3372           00006                           EXTEND                                         
063558,000237: 17,3373           51742                           INDEX    ADRSDIF2                              #  TTOAXIS AND HH ARE THE PARAMETERS UPON
063559,000238: 17,3374           71576                           MP       ACCFCTZ5                              #        WHICH THE APPROXIMATIONS TO TJET ARE
063560,000239: 17,3375           20001                           DDOUBL                                         #        BASED.
063561,000240: 17,3376           20001                           DDOUBL                                         
063562,000241: 17,3377           53746                           DXCH     HH                                    #  DOUBLE PRECISION H SCALED AT 8 SEC(2).
063563,000242: 17,3400           51742                           INDEX    ADRSDIF2                              
063564,000243: 17,3401           31570                           CAE      1/ANET2                               #  SCALED AT 2(7)/PI SEC(2)/RAD.
063565,000244: 17,3402           00006                           EXTEND                                         
063566,000245: 17,3403           71425                           MP       EDOT                                  #  SCALED AT PI/2(5)
063567,000246: 17,3404           55740                           TS       TTOAXIS                               #  SCALED AT 4 SEC.
063568,000247: 
063569,000248:                                                                                                  #  TEST WHETHER TJET GREATER THAN 50 MSEC.
063570,000249: 
063571,000250: 17,3405           00006                           EXTEND                                         
063572,000251: 17,3406           73671                           MP       -.05AT2                               #  H - .05 TTOAXIS - .00125 G.T. ZERO
063573,000252: 17,3407           61745                           AD       HH                                    #        (SCALED AT 8 SEC(2) ).
063574,000253: 17,3410           67745                           AD       NEG2                                  
063575,000254: 17,3411           00006                           EXTEND                                         
063576,000255: 17,3412           63440                           BZMF     FORMULA1                              
063577,000256: 
063578,000257:                                                                                                  #  TEST WHETHER TJET GREATER THAN 150 MSEC.
063579,000258: 
063580,000259: 17,3413           31740                           CAE      TTOAXIS                               
063581,000260: 17,3414           00006                           EXTEND                                         
063582,000261: 17,3415           73672                           MP       -.15AT2                               #  H - .15 TTOAXIS - .01125 G.T. ZERO
063583,000262: 17,3416           61745                           AD       HH                                    #        (SCALED AT 8 SEC(2) )
063584,000263: 17,3417           63663                           AD       -.0112A8                              
063585,000264: 17,3420           00006                           EXTEND                                         
063586,000265: 17,3421           63450                           BZMF     FORMULA2                              
063587,000266: 
063588,000267:                                                                                                  #  IF TJET GREATER THAN 150 MSEC, ASSIGN IT VALUE OF 250 MSEC, SINCE THIS
063589,000268:                                                                                                  #  IS ENOUGH TO ASSURE NO SKIP NEXT CSP (100 MSEC).
063590,000269: 
063591,000270: 17,3422           34741        FULLTIME           CAF      BIT11                                 #  250 MSEC SCALED AT 4 SEC.
063592,000271: 
063593,000272:                                                                                                  #  RETURN TO CALLING PROGRAM WITH JET TIME SCALED AS TIME6 AND SIGNED.
063594,000273: 
063595,000274: 17,3423           00006        RETURNTJ           EXTEND                                         #  ALL BRANCHES TERMINATE HERE WITH TJET
063596,000275: 17,3424           71736                           MP       ROTSENSE                              #        (SCALED AT 4 SEC) IN THE ACCUMULATOR.
063597,000276: 17,3425           51476                           INDEX    AXISCTR                               #  ROTSENSE APPLIES SIGN AND CHANGES SCALE.
063598,000277: 17,3426           55525                           TS       TJETU                                 
063599,000278: 17,3427           00006                           EXTEND                                         
063600,000279: 17,3430           51476                           INDEX    AXISCTR                               
063601,000280: 17,3431           71547                           MP       ACCSWU                                #  SET SWITCH FOR JET SELECT IF ROTATION IS
063602,000281: 17,3432           30001                           CAE      L                                     
063603,000282: 17,3433           00006                           EXTEND                                         #        IN A SENSE FOR WHICH 1/ACCS HAS FORCED
063604,000283: 17,3434           63437                           BZMF     +3                                    #        A MAX-JET CALCULATION.
063605,000284: 17,3435           34751                           CAF      FOUR                                  

Page 1459

063607,000286: 17,3436           55741                           TS       NUMBERT                               
063608,000287: 17,3437           01743                           TC       HOLDQ                                 #  RETURN VIA SAVED Q.
063609,000288: 
063610,000289:                                                                                                  #  TJET = H/(.025 + TTOAXIS)     FOR TJET LESS THAN 50 MSEC.
063611,000290: 
063612,000291: 17,3440           43670        FORMULA1           CS       -.025AT4                              #  .025 SEC SCALED AT 4.
063613,000292: 17,3441           61740                           AD       TTOAXIS                               #  SCALED AT 4 SECONDS.
063614,000293: 17,3442           53746                           DXCH     HH                                    #  STORE DENOMINATOR IN FIRST WORD OF H,
063615,000294: 17,3443           00006                           EXTEND                                         #        WHICH NEED NOT BE PRESERVED.  PICK UP
063616,000295: 17,3444           11745                           DV       HH                                    #        DP H AND DIVIDE BY DENOMINATOR.
063617,000296: 17,3445           00006                           EXTEND                                         
063618,000297: 17,3446           74736                           MP       BIT14                                 #  RESCALE TJET FROM 2 TO USUAL 4 SEC.
063619,000298: 17,3447           13560                           TCF      CHKMINTJ                              #  CHECK THAT TJET IS NOT LESS THAN MINIMUM
063620,000299: 
063621,000300:                                                                                                  #  TJET = (H + .00375)/(0.1 + TTOAXIS)   FOR TJET GREATER THAN 50 MSEC.
063622,000301: 
063623,000302: 17,3450           00006        FORMULA2           EXTEND                                         
063624,000303: 17,3451           33674                           DCA      .00375A8                              #  .00375 SEC(2) SCALED AT 8.
063625,000304: 17,3452           21746                           DAS      HH                                    #  STORE NUMERATOR IN DP H, WHICH NEED NOT
063626,000305:                                                                                                  #        BE PRESERVED.
063627,000306: 17,3453           31740                           CAE      TTOAXIS                               #  SCALED AT 4 SEC.
063628,000307: 17,3454           63664                           AD       .1AT4                                 #  0.1 SEC SCALED AT 4.
063629,000308: 17,3455           53746                           DXCH     HH                                    #  STORE DENOMINATOR IN FIRST WORD OF H,
063630,000309: 17,3456           00006                           EXTEND                                         #        WHICH NEED NOT BE PRESERVED.  PICK UP
063631,000310: 17,3457           11745                           DV       HH                                    #        DP NUMERATOR AND DIVIDE BY DENOMINATOR
063632,000311: 17,3460           00006                           EXTEND                                         
063633,000312: 17,3461           74736                           MP       BIT14                                 #  RESCALE TJET FROM 2 TO USUAL 4 SEC.
063634,000313: 17,3462           13423                           TCF      RETURNTJ                              #  END SUBROUTINE.
063635,000314: 
063636,000315:                                                                                                  #  SUBROUTINIZED COMPUTATIONS REQUIRED FOR ALL ENTRIES INTO CODING FOR ZONES 1, 2, AND 3.
063637,000316:                                                                                                  #  REACHED BY TC FROM 3 POINTS IN TJETLAW.
063638,000317: 
063639,000318: 17,3463           41736        Z123COMP           CS       ROTSENSE                              #  USED IN RETURNTJ SECTION TO RESCALE TJET
063640,000319: 17,3464           55736                           TS       ROTSENSE                              #        AS TIME6 AND GIVE IT PROPER SIGN.
063641,000320: 17,3465           31425                           CAE      EDOT                                  #  SCALED AT PI/2(5) RAD/SEC.
063642,000321: 17,3466           00006                           EXTEND                                         
063643,000322: 17,3467           51742                           INDEX    ADRSDIF2                              
063644,000323: 17,3470           71567                           MP       1/ANET1                               #  SCALED AT 2(7)/PI SEC(2)/RAD.
063645,000324: 17,3471           55740                           TS       TTOAXIS                               #  STORE TIME-TO-AXIS SCALED AT 4 SECONDS.
063646,000325: 17,3472           63675                           AD       -TJMAX                                
063647,000326: 17,3473           00006                           EXTEND                                         #  IS TIME TO AXIS LESS THAN 150 MSEC.
063648,000327: 17,3474           63476                           BZMF     +2                                    
063649,000328: 17,3475           13422                           TCF      FULLTIME                              #  NO. FIRE JETS, DO NOT CALCULATE TJET.
063650,000329: 17,3476           00002                           RETURN                                         #  YES.  GO ON TO FIND TJET
063651,000330: 
063652,000331: 17,3477           03463        ZON1,2,3           TC       Z123COMP                              #  SUBROUTINIZED PREPARATION FOR ZONE1,2,3.
063653,000332: 
063654,000333:                                                                                                  #  IF THE (NEG) DISTANCE BEYOND PARABOLA IS LESS THAN FLAT, USE SPECIAL
063655,000334:                                                                                                  #  LOGIC TO ACQUIRE MINIMUM IMPULSE LIMIT CYCLE.  DURING POWERED FLIGHT

Page 1460

063657,000336:                                                                                                  #  OR ULLAGE, FLAT = 0
063658,000337: 
063659,000338: 17,3500           31737                           CAE      FIREFCT                               #  SCALED AT PI/4 RAD.
063660,000339: 17,3501           61555                           AD       FLAT                                  
063661,000340: 17,3502           00006                           EXTEND                                         
063662,000341: 17,3503           63517                           BZMF     ZONE1                                 #  NOT IN SPECIAL ZONES.
063663,000342: 
063664,000343:                                                                                                  #  FIRE FOR AXIS OR, IF CLOSE, FIRE MINIMUM IMPULSE.  IF ON AXIS, COAST.
063665,000344: 
063666,000345: 17,3504           41556        ZONE2,3            CS       ZONE3LIM                              #  HEIGHT OF MIN-IMPULSE ZONE SET BY 1/ACCS
063667,000346: 17,3505           61740                           AD       TTOAXIS                               #        35 MSEC IN DRIFTING FLIGHT
063668,000347: 17,3506           00006                           EXTEND                                         #        ZERO WHEN TRYING TO ENTER GTS CONTROL.
063669,000348: 17,3507           63512                           BZMF     ZONE3                                 
063670,000349: 17,3510           31740        ZONE2              CAE      TTOAXIS                               #  FIRE TO AXIS.
063671,000350: 17,3511           13423                           TCF      RETURNTJ                              
063672,000351: 17,3512           11425        ZONE3              CCS      EDOT                                  #  CHECK IF EDOT IS ZERO.
063673,000352: 17,3513           34746                           CAF      BIT6                                  #  FIRE A ONE-JET MINIMUM IMPULSE.
063674,000353: 17,3514           13423                           TCF      RETURNTJ                              #  TJET = +0.
063675,000354: 17,3515           05677                           TC       CCSHOLE                               #  CANNOT BE BECAUSE NEG EDOT COMPLEMENTED.
063676,000355: 17,3516           13423                           TCF      RETURNTJ                              #  TJET = +0.
063677,000356: 
063678,000357: 17,3517           00006        ZONE1              EXTEND                                         
063679,000358: 17,3520           51744                           INDEX    ADRSDIF1                              
063680,000359: 17,3521           61605                           SU       AXISDIST                              #  SCALED AT PI/4 RAD.
063681,000360: 17,3522           00006                           EXTEND                                         
063682,000361: 17,3523           51742                           INDEX    ADRSDIF2                              
063683,000362: 17,3524           71575                           MP       ACCFCTZ1                              #  SCALED AT 2(7)/PI SEC(2)/RAD.
063684,000363: 17,3525           20001                           DDOUBL                                         
063685,000364: 17,3526           20001                           DDOUBL                                         
063686,000365: 17,3527           53746                           DXCH     HH                                    #  DOUBLE PRECISION H SCALED AT 8 SEC(2).
063687,000366: 
063688,000367:                                                                                                  #  TEST WHETHER TOTAL TIME REQUIRED GREATER THAN 150 MSEC:
063689,000368:                                                                                                  #                             2                                   2
063690,000369:                                                                                                  #        IS .5(.150 - TTOAXIS)  - H  NEGATIVE (SCALED AT 8 SECONDS )
063691,000370: 
063692,000371: 17,3530           31740                           CAE      TTOAXIS                               #  TTOAXIS SCALED AT 4 SECONDS.
063693,000372: 17,3531           63675                           AD       -TJMAX                                #  -.150 SECOND SCALED AT 4.
063694,000373: 17,3532           00006                           EXTEND                                         
063695,000374: 17,3533           70000                           SQUARE                                         
063696,000375: 17,3534           00006                           EXTEND                                         
063697,000376: 17,3535           61745                           SU       HH                                    #  HIGH WORD OF H SCALED AT 8 SEC(2).
063698,000377: 17,3536           00006                           EXTEND                                         
063699,000378: 17,3537           63422                           BZMF     FULLTIME                              #  YES.  NEED NOT CALCULATE TJET.
063700,000379: 
063701,000380:                                                                                                  #  TEST WHETHER TIME BEYOND AXIS GREATER THAN 50 MSEC TO DETERMINE WHICH APPROXIMATION TO USE.
063702,000381: 
063703,000382: 17,3540           31745                           CAE      HH                                    
063704,000383: 17,3541           67745                           AD       NEG2                                  
063705,000384: 17,3542           00006                           EXTEND                                         
063706,000385: 17,3543           63553                           BZMF     FORMULA3                              
063707,000386: 

Page 1461

063709,000388:                                                                                                  #  TJET = H/0.1 + TTOAXIS + .0375        FOR APPROXIMATION OVER MORE THAN 50 MSEC.
063710,000389: 
063711,000390: 17,3544           33665                           CAF      .1AT2                                 #  STORE .1 SEC SCALED AT 2 FOR DIVISION.
063712,000391: 17,3545           53746                           DXCH     HH                                    #  DP H SCALED AT 8 SEC(2) NEED NOT BE
063713,000392: 17,3546           00006                           EXTEND                                         #        PRESERVED.
063714,000393: 17,3547           11745                           DV       HH                                    #  QUOTIENT SCALED AT 4 SECONDS.
063715,000394: 17,3550           61740                           AD       TTOAXIS                               #  SCALED AT 4 SEC.
063716,000395: 17,3551           63666                           AD       .0375AT4                              #  .0375 SEC SCALED AT 4.
063717,000396: 17,3552           13423                           TCF      RETURNTJ                              #  END COMPUTATION.
063718,000397: 
063719,000398:                                                                                                  #  TJET = H/.O25 + TTOAXIS       FOR APPROXIMATION OVER LESS THAN 50 MSEC.
063720,000399: 
063721,000400: 17,3553           43667        FORMULA3           CS       -.025AT2                              #  STORE +.025 SEC SCALED AT 2 FOR DIVISION
063722,000401: 17,3554           53746                           DXCH     HH                                    #  PICK UP DP H AT 8, WHICH NEED NOT BE
063723,000402: 17,3555           00006                           EXTEND                                         #        PRESERVED.
063724,000403: 17,3556           11745                           DV       HH                                    #  QUOTIENT SCALED AT 4 SECONDS.
063725,000404: 17,3557           61740                           AD       TTOAXIS                               #  SCALED AT 4 SEC.
063726,000405: 
063727,000406:                                                                                                  #  IF COMPUTED JET TIME IS LESS THAN TJMIN, TJET IS SET TO ZERO.
063728,000407:                                                                                                  #  MINIMUM IMPULSES REQUIRED IN ZONE 3 ARE NOT SUBJECT TO THIS CONSTRAINT, NATURALLY.
063729,000408: 
063730,000409: 17,3560           63677        CHKMINTJ           AD       -TJMIN                                #  IS COMPUTED TIME LESS THAN THE MINIMUM.
063731,000410: 17,3561           00006                           EXTEND                                         
063732,000411: 17,3562           63357                           BZMF     COASTTJ                               #  YES, SET TIME TO ZERO.
063733,000412: 17,3563           63676                           AD       TJMIN                                 #  NO, RESTORE COMPUTED TIME.
063734,000413: 17,3564           13423                           TCF      RETURNTJ                              #  END COMPUTATION.
063735,000414: 

Page 1462

063737,000416:                                                                                                  #  *** ROUGHLAW ***
063738,000417: 
063739,000418:                                                                                                  #  BEFORE ENTRY TO RUFLAW:
063740,000419:                                                                                                  #        1. INDEXERS ADRSDIF1 AND ADRSDIF2 ARE SET ON BASIS OF AXIS, AND SIGN OF EDOT.
063741,000420:                                                                                                  #        2. IF EDOT WAS NEGATIVE, E AND EDOT ARE ROTATED INTO UPPER HALF-PLANE AND ROTSENSE IS MADE NEGATIVE.
063742,000421:                                                                                                  #        3. E IS SCALED AT PI RADIANS AND EDOT AT PI/4 RAD/SEC.
063743,000422:                                                                                                  #           (EXCEPT THE RUFLAW3 ENTRY WHEN E IS AT PI/4)
063744,000423: 
063745,000424:                                                                                                  #  RUFLAW1:      ERROR MORE NEGATIVE THAN PI/16 RAD.  FIRE TO A RATE OF PI/32 RAD/SEC (IF JET TIME EXCEEDS 20 MSEC.).
063746,000425:                                                                                                  #  RUFLAW2:      ERROR MORE POSITIVE THAN PI/16 RAD.  FIRE TO OPPOSING RATE OF PI/32 RAD/SEC.
063747,000426:                                                                                                  #  RUFLAW3:      ERROR RATE GREATER THAN PI/32 RAD/SEC AND ERROR WITHIN BOUNDS.  COAST IF BELOW FIREFCT, FIRE IF ABOVE
063748,000427: 
063749,000428: 17,3565           44740        RUFLAW1            CS       BIT12                                 #  DECREMENT EDOT BY PI/32 RAD/SEC, WHICH
063750,000429: 17,3566           27425                           ADS      EDOT                                  #        IS THE TARGET RATE.
063751,000430: 17,3567           00006                           EXTEND                                         
063752,000431: 17,3570           63611                           BZMF     SMALRATE                              #  BRANCH IF RATE LESS THAN TARGET.
063753,000432: 17,3571           03647                           TC       RUFSETUP                              #  REVERSE ROTSENSE AND INDICATE MAX JETS.
063754,000433: 17,3572           31425                           CAE      EDOT                                  #  PICK UP DESIRED RATE CHANGE.
063755,000434: 
063756,000435: 17,3573           00006        RUFLAW12           EXTEND                                         #  COMPUTE TJET
063757,000436: 17,3574           51742                           INDEX    ADRSDIF2                              #        = (DESIRED RATE CHANGE)/(2-JET ACCEL.)
063758,000437: 17,3575           71571                           MP       1/ANET1    +2                         
063759,000438: 17,3576           67740                           AD       -1/8                                  #  IF TJET, SCALED AT 32 SEC, EXCEEDS
063760,000439: 17,3577           00006                           EXTEND                                         #        4 SECONDS, SET TJET TO TJMAX.
063761,000440: 17,3600           63602                           BZMF     +2                                    
063762,000441: 17,3601           13422                           TCF      FULLTIME                              
063763,000442: 17,3602           00006                           EXTEND                                         
063764,000443: 17,3603           13422                           BZF      FULLTIME                              
063765,000444: 17,3604           64740                           AD       BIT12                                 #  RESTORE COMPUTED TJET TO ACCUMULATOR.
063766,000445: 17,3605           20001                           DAS      A                                     
063767,000446: 17,3606           20001                           DAS      A                                     
063768,000447: 17,3607           20001                           DAS      A                                     #  RESCALED TJET AT 4 SECONDS.
063769,000448: 17,3610           13560                           TCF      CHKMINTJ                              #  RETURN AS FROM FINELAW.
063770,000449: 
063771,000450: 17,3611           03651        SMALRATE           TC       RUFSETUP   +2                         #  SET NUMBERT AND FIREFCT FOR MAXIMUM JETS
063772,000451: 17,3612           11736                           CCS      ROTSENSE                              
063773,000452: 17,3613           34753                           CAF      ONE                                   #  MODIFY INDEXER TO POINT TO 1/ANET
063774,000453: 17,3614           13616                           TCF      +2                                    #        CORRESPONDING TO THE PROPER SENSE.
063775,000454: 17,3615           37746                           CAF      NEGONE                                
063776,000455: 17,3616           27742                           ADS      ADRSDIF2                              
063777,000456: 
063778,000457: 17,3617           41425                           CS       EDOT                                  #  PICK UP (PI/32-EDOT)=DESIRED CHANGE.
063779,000458: 17,3620           13573                           TCF      RUFLAW12                              
063780,000459: 
063781,000460: 17,3621           03647        RUFLAW2            TC       RUFSETUP                              #  REVERSE ROTSENSE AND INDICATE MAX JETS.
063782,000461: 17,3622           34740                           CAF      BIT12                                 
063783,000462: 17,3623           61425                           AD       EDOT                                  #  PICK UP(PI/32+EDOT) = DESIRED RATE CHANGE
063784,000463: 17,3624           54000                           TS       A                                     #  IF OVERFLOW SKIP, FIRE FOR FULL TIME.
063785,000464: 

Page 1463

063787,000466: 17,3625           13573                           TCF      RUFLAW12                              #  OTHERWISE, COMPUTE JET TIME.
063788,000467: 17,3626           13422                           TCF      FULLTIME                              
063789,000468: 
063790,000469: 17,3627           03647        RUFLAW3            TC       RUFSETUP                              #  EXECUTE COMMON RUFLAW SUBROUTINE.
063791,000470: 17,3630           51744                           INDEX    ADRSDIF1                              
063792,000471: 17,3631           41601                           CS       FIREDB                                #  CALCULATE DISTANCE FROM SWITCH CURVE
063793,000472: 17,3632           61750                           AD       E                                     #        1/ANET1*EDOT*EDOT +E - FIREDB = 0
063794,000473: 17,3633           00006                           EXTEND                                         #                SCALED AT 4 PI RADIANS
063795,000474: 17,3634           74741                           MP       BIT11                                 
063796,000475: 17,3635           57425                           XCH      EDOT                                  
063797,000476: 17,3636           00006                           EXTEND                                         
063798,000477: 17,3637           70000                           SQUARE                                         
063799,000478: 17,3640           00006                           EXTEND                                         
063800,000479: 17,3641           51744                           INDEX    ADRSDIF1                              
063801,000480: 17,3642           71571                           MP       1/ANET1    +2                         
063802,000481: 17,3643           61425                           AD       EDOT                                  
063803,000482: 17,3644           00006                           EXTEND                                         
063804,000483: 17,3645           63357                           BZMF     COASTTJ                               #  COAST IF BELOW IT.
063805,000484: 17,3646           13422                           TCF      FULLTIME                              #  FIRE FOR FULL PERIOD IF ABOVE IT.
063806,000485: 
063807,000486:                                                                                                  #  SUBROUTINE USED IN ALL ENTRIES TO ROUGHLAW.
063808,000487: 
063809,000488: 17,3647           41736        RUFSETUP           CS       ROTSENSE                              #  REVERSE ROTSENSE WHEN ENTER HERE.
063810,000489: 17,3650           55736                           TS       ROTSENSE                              
063811,000490: 17,3651           34751                 +2        CAF      FOUR                                  #  REQUIRE MAXIMUM (2) JETS IN U,V-AXES.
063812,000491: 17,3652           55741                           TS       NUMBERT                               
063813,000492: 17,3653           34735                           CAF      NEGMAX                                #  SUGGEST MAXIMUM (4) JETS IN P-AXIS.
063814,000493: 17,3654           55737                           TS       FIREFCT                               
063815,000494: 17,3655           00002                           TC       Q                                     
063816,000495: 
063817,000496:                                                                                                  #  CONSTANTS FOR TJETLAW
063818,000497: 
063819,000498: 17,3656           77757                           DEC      -16        B-14                       #  AXISDIFF(INDEX) = NUMBER OF REGISTERS
063820,000499: 17,3657           00000        AXISDIFF           DEC      +0         B-14                       #        BETWEEN STORED 1/ACCS PARAMETERS FOR
063821,000500: 17,3660           00020                           DEC      16         B-14                       #        THE INDEXED AXIS AND THE U-AXIS.
063822,000501: 17,3661           14400        SENSOR             OCT      14400                                 #  RATIO OF TJET SCALING WITHIN TJETLAW
063823,000502:                                                                                                  #        (4 SEC) TO SCALING FOR T6 (10.24 SEC).
063824,000503: 17,3662           76447        -2DEG              DEC      -.04444                               #  -2.0 DEGREES SCALED AT 45.
063825,000504: 17,3663           77750        -.0112A8           DEC      -.00141                               #  -.01125 SEC(2) SCALED AT 8.
063826,000505: 17,3664           00632        .1AT4              DEC      .025                                  #  0.1 SECOND SCALED AT 4.
063827,000506: 17,3665           01463        .1AT2              DEC      .05                                   #  0.1 SEC SCALED AT 2.
063828,000507: 17,3666           00232        .0375AT4           DEC      .00938                                #  .0375 SEC SCALED AT 4.
063829,000508: 17,3667           77462        -.025AT2           DEC      -.0125                                #  -.025 SEC SCALED AT 2.
063830,000509: 17,3670           77631        -.025AT4           DEC      -.00625                               
063831,000510: 17,3671           77145        -.05AT2            DEC      -.025                                 
063832,000511: 17,3672           75462        -.15AT2            DEC      -.075                                 
063833,000512: 17,3673           00007 25605  .00375A8           2DEC     .00375     B-3                        
063834,000513: 
063835,000514: 17,3675           76631        -TJMAX             DEC      -.0375                                #  LARGEST CALCULATED TIME.  .150 SEC AT 4.
063836,000515: 17,3676           00122        TJMIN              DEC      .005                                  #  SMALLEST ALLOWABLE TIME.  .020 SEC AT 4.

Page 1464

063838,000517: 17,3677           77655        -TJMIN             DEC      -.005                                 

End of include-file TJET_LAW.agc.  Parent file is MAIN.agc