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.

063352,000002:                                                                                                  ## Copyright:   Public domain.
063353,000003:                                                                                                  ## Filename:    TJET_LAW.agc
063354,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
063355,000005:                                                                                                  ##              It is part of the source code for the original release
063356,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
063357,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
063358,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
063359,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
063360,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
063361,000011:                                                                                                  ##              that the code format has been changed to conform to the
063362,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
063363,000013:                                                                                                  ##              original YUL assembler.
063364,000014:                                                                                                  ## Reference:   pp. 1454-1464
063365,000015:                                                                                                  ## Assembler:   yaYUL
063366,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
063367,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
063368,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
063369,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
063370,000020:                                                                                                  ##              2016-12-23 RRB  Updated for Luminary 69.
063371,000021:                                                                                                  ##              2017-01-21 HG   Fix operand -3DEG   -> -2DEG
063372,000022:                                                                                                  ##                                          RUFRATE -> BIT12
063373,000023:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
063374,000024:                                                                                                  ##                              and fixed errors found.
063375,000025:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
063376,000026:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
063377,000027: 

Page 1454

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

Page 1455

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

Page 1456

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

Page 1457

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

Page 1458

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

Page 1459

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

Page 1460

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

Page 1461

063738,000388:                                                                                                  #  TJET = H/0.1 + TTOAXIS + .0375        FOR APPROXIMATION OVER MORE THAN 50 MSEC.
063739,000389: 
063740,000390: 17,3544           33665                           CAF      .1AT2                                 #  STORE .1 SEC SCALED AT 2 FOR DIVISION.
063741,000391: 17,3545           53746                           DXCH     HH                                    #  DP H SCALED AT 8 SEC(2) NEED NOT BE
063742,000392: 17,3546           00006                           EXTEND                                         #        PRESERVED.
063743,000393: 17,3547           11745                           DV       HH                                    #  QUOTIENT SCALED AT 4 SECONDS.
063744,000394: 17,3550           61740                           AD       TTOAXIS                               #  SCALED AT 4 SEC.
063745,000395: 17,3551           63666                           AD       .0375AT4                              #  .0375 SEC SCALED AT 4.
063746,000396: 17,3552           13423                           TCF      RETURNTJ                              #  END COMPUTATION.
063747,000397: 
063748,000398:                                                                                                  #  TJET = H/.O25 + TTOAXIS       FOR APPROXIMATION OVER LESS THAN 50 MSEC.
063749,000399: 
063750,000400: 17,3553           43667        FORMULA3           CS       -.025AT2                              #  STORE +.025 SEC SCALED AT 2 FOR DIVISION
063751,000401: 17,3554           53746                           DXCH     HH                                    #  PICK UP DP H AT 8, WHICH NEED NOT BE
063752,000402: 17,3555           00006                           EXTEND                                         #        PRESERVED.
063753,000403: 17,3556           11745                           DV       HH                                    #  QUOTIENT SCALED AT 4 SECONDS.
063754,000404: 17,3557           61740                           AD       TTOAXIS                               #  SCALED AT 4 SEC.
063755,000405: 
063756,000406:                                                                                                  #  IF COMPUTED JET TIME IS LESS THAN TJMIN, TJET IS SET TO ZERO.
063757,000407:                                                                                                  #  MINIMUM IMPULSES REQUIRED IN ZONE 3 ARE NOT SUBJECT TO THIS CONSTRAINT, NATURALLY.
063758,000408: 
063759,000409: 17,3560           63677        CHKMINTJ           AD       -TJMIN                                #  IS COMPUTED TIME LESS THAN THE MINIMUM.
063760,000410: 17,3561           00006                           EXTEND                                         
063761,000411: 17,3562           63357                           BZMF     COASTTJ                               #  YES, SET TIME TO ZERO.
063762,000412: 17,3563           63676                           AD       TJMIN                                 #  NO, RESTORE COMPUTED TIME.
063763,000413: 17,3564           13423                           TCF      RETURNTJ                              #  END COMPUTATION.
063764,000414: 

Page 1462

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

Page 1463

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

Page 1464

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

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