Source Code

These source-code files are part of a reconstructed copy of Luminary 69/2, the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation.

Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

063019,000002:                                                                                                  ## Copyright:   Public domain.
063020,000003:                                                                                                  ## Filename:    TJET_LAW.agc
063021,000004:                                                                                                  ## Purpose:     A section of LUM69 revision 2.
063022,000005:                                                                                                  ##              It is part of the reconstructed source code for the flown
063023,000006:                                                                                                  ##              version of the flight software for the Lunar Module's (LM)
063024,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 10. The code has
063025,000008:                                                                                                  ##              been recreated from a copy of Luminary revsion 069, using
063026,000009:                                                                                                  ##              changes present in Luminary 099 which were described in
063027,000010:                                                                                                  ##              Luminary memos 75 and 78. The code has been adapted such
063028,000011:                                                                                                  ##              that the resulting bugger words exactly match those specified
063029,000012:                                                                                                  ##              for LUM69 revision 2 in NASA drawing 2021152B, which gives
063030,000013:                                                                                                  ##              relatively high confidence that the reconstruction is correct.
063031,000014:                                                                                                  ## Reference:   pp. 1454-1464
063032,000015:                                                                                                  ## Assembler:   yaYUL
063033,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
063034,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
063035,000018:                                                                                                  ## Mod history: 2019-07-27 MAS  Created from Luminary 69.
063036,000019: 

Page 1454

063038,000021:                                                                                                  #  PROGRAM DESCRIPTION
063039,000022:                                                                                                  #  DESIGNED BY:  R. D. GOSS AND P. S. WEISSMAN
063040,000023:                                                                                                  #  CODED BY:  P. S. WEISSMAN 28 FEBRUARY 1968
063041,000024: 
063042,000025:                                                                                                  #  TJETLAW IS CALLED AS A SUBROUTINE WHEN THE LEM IS NOT DOCKED AND THE AUTOPILOT IS IN THE AUTOMATIC OR
063043,000026:                                                                                                  #  ATTITUDE-HOLD MODE TO CALCULATE THE JET-FIRING-TIME (TJET) REQUIRED FOR THE AXIS INDICATED BY AXISCTR:
063044,000027:                                                                                                  #        -1      INDICATES THE P-AXIS
063045,000028:                                                                                                  #        +0      INDICATES THE U-AXIS
063046,000029:                                                                                                  #        +1      INDICATES THE V-AXIS.
063047,000030:                                                                                                  #  THE REGISTERS E AND EDOT CONTAIN THE APPROPRIATE ATTITUDE ERROR AND ERROR RATE AND SENSETYP SHOWS WHETHER
063048,000031:                                                                                                  #  UNBALANCED COUPLES ARE PREFERRED.  TJETLAW ALSO USES VARIOUS FUNCTIONS OF ACCELERATION AND DEADBAND WHICH ARE
063049,000032:                                                                                                  #  COMPUTED IN THE 1/ACCONT SECTION OF 1/ACCS AND ARE STORED IN SUCH AN ORDER THAT THEY CAN BE CONVENIENTLY
063050,000033:                                                                                                  #  ACCESSED BY INDEXING.
063051,000034: 
063052,000035:                                                                                                  #  THE SIGN OF THE REQUIRED ROTATION IS CARRIED THROUGH TJETLAW AS ROTSENSE AND IS FINALLY APPLIED TO TJET JUST
063053,000036:                                                                                                  #  PREVIOUS TO ITS STORAGE IN THE LOCATION CORRESPONDING TO THE AXIS (TJP, TJU OR TJV).  THE NUMBER OF JETS THAT
063054,000037:                                                                                                  #  TJETLAW ASSUMES WILL BE USED IS INDICATED BY THE SETTING OF NUMBERT FOR THE U- OR V-AXIS.  TWO JETS ARE ALWAYS
063055,000038:                                                                                                  #  ASSUMED FOR THE P-AXIS  ALTHOUGH FOUR JETS WILL BE FIRED WHEN FIREFCT IS MORE NEGATIVE THAN -4.0 DEGREES
063056,000039:                                                                                                  #  (FIREFCT IS THE DISTANCE TO A SWITCH CURVE IN THE PHASE PLANE) AND A LONG FIRING IS CALLED FOR.
063057,000040: 
063058,000041:                                                                                                  #  IN ORDER TO AVOID SCALING DIFFICULTIES, SIMPLE ALGORITHMS TAGGED RUFLAW1, -2 AND -3 ARE RESORTED TO WHEN THE
063059,000042:                                                                                                  #  ERROR AND/OR ERROR RATE ARE LARGE.
063060,000043: 
063061,000044:                                                                                                  #  CALLING SEQUENCE:
063062,000045:                                                                                                  #                TC      TJETLAW         (MUST BE IN JASK)
063063,000046:                                                                                                  #        OR
063064,000047:                                                                                                  #                INHINT                  (MUST BE IN JASK)
063065,000048:                                                                                                  #                TC      IBNKCALL
063066,000049:                                                                                                  #                CADR    TJETLAW
063067,000050:                                                                                                  #                RELINT
063068,000051: 
063069,000052:                                                                                                  #  EXIT:         RETURN TO Q.
063070,000053: 
063071,000054:                                                                                                  #  INPUT:
063072,000055:                                                                                                  #        FROM THE CALLER:  E, EDOT, AXISCTR, SENSETYP, TJP,-U,-V.
063073,000056:                                                                                                  #        FROM 1/ACCONT:  48 ERASABLES BEGINNING AT BLOCKTOP (INCLUDING FLAT, ZONE3LIM AND ACCSWU,-V).
063074,000057: 
063075,000058:                                                                                                  #  OUTPUT:
063076,000059:                                                                                                  #        TJP,-U OR -V, NUMBERT (DAPTEMP5), FIREFCT (DAPTEMP3).
063077,000060: 
063078,000061:                                                                                                  #  DEBRIS:
063079,000062:                                                                                                  #        A, L, Q, E, EDOT, DAPTEMP1-6, DAPTREG1-4.
063080,000063: 
063081,000064:                                                                                                  #  ALARM:  NONE
063082,000065: 
063083,000066: 17,3207                                           BANK     17                                    
063084,000067: 17,2000                                           SETLOC   DAPS2                                 
063085,000068: 17,2000                                           BANK                                           
063086,000069: 17,3207  E6,1524                                  EBANK=   TJP                                   

Page 1455

063088,000071: 17,3207                                           COUNT*   $$/DAPTJ                              
063089,000072: 
063090,000073: 17,3207           00006        TJETLAW            EXTEND                                         #  SAVE Q FOR RETURN.
063091,000074: 17,3210           23743                           QXCH     HOLDQ                                 
063092,000075: 
063093,000076:                                                                                                  #  SET INDEXERS TO CORRESPOND TO THE AXIS AND TO THE SIGN OF EDOT
063094,000077: 
063095,000078: 17,3211           51476                           INDEX    AXISCTR                               #  AXISDIFF(-1)=NO OF LOCATIONS BER P AND U
063096,000079: 17,3212           33657                           CAF      AXISDIFF                              #  AXISDIFF(0) = 0
063097,000080: 17,3213           55744                           TS       ADRSDIF1                              #  AXISDIFF(+1)=NO OF LOCATIONS BET V AND U
063098,000081: 
063099,000082: 17,3214           31425                           CAE      EDOT                                  #  IF EDOT NEGATIVE, PICK UP SET OF VALUES
063100,000083: 17,3215           00006                           EXTEND                                         #        THAT ALLOW USE OF SAME CODING AS FOR
063101,000084: 17,3216           63223                           BZMF     NEGEDOT                               #        POSITIVE EDOT.
063102,000085: 17,3217           31744                           CAE      ADRSDIF1                              #  SET A SECOND INDEXER WHICH MAY BE
063103,000086: 17,3220           55742                           TS       ADRSDIF2                              #        MODIFIED BY A DECISION FOR MAX JETS.
063104,000087: 17,3221           33661                           CAF      SENSOR                                #  FOR POSITIVE EDOT, ROTSENSE IS
063105,000088: 17,3222           13233                           TCF      SETSENSE                              #        INITIALIZED POSITIVE.
063106,000089: 
063107,000090: 17,3223           41750        NEGEDOT            CS       E                                     #  IN ORDER FOR NEG EDOT CASE TO USE CODING
063108,000091: 17,3224           55750                           TS       E                                     #        OF POS EDOT, MUST MODIFY AS FOLLOWS:
063109,000092: 17,3225           41425                           CS       EDOT                                  #        1. COMPLEMENT E AND EDOT.
063110,000093: 17,3226           55425                           TS       EDOT                                  #        2. SET SENSE OF ROTATION TO NEGATIVE
063111,000094: 17,3227           34753                           CAF      BIT1                                  #           (REVERSED LATER IF NECESSARY).
063112,000095: 17,3230           27744                           ADS      ADRSDIF1                              #        3. INCREMENT INDEXERS BY ONE SO THAT
063113,000096: 17,3231           55742                           TS       ADRSDIF2                              #           THE PROPER PARAMETERS ARE ACCESSED.
063114,000097: 17,3232           43661                           CS       SENSOR                                
063115,000098: 17,3233           55736        SETSENSE           TS       ROTSENSE                              
063116,000099: 
063117,000100:                                                                                                  #  TEST MAGNITUDE OF E (ATTITUDE ERROR, SINGLE-PRECISION, SCALED AT PI RADIANS):
063118,000101:                                                                                                  #        IF GREATER THAN (OR EQUAL TO) PI/16 RADIANS, GO TO THE SIMPLIFIED TJET ROUTINE.
063119,000102:                                                                                                  #        IF LESS THAN PI/16 RADIANS, RESCALE TO PI/4.
063120,000103: 
063121,000104: 17,3234           31750                           CAE      E                                     #  PICK UP ATTITUDE ERROR FOR THIS AXIS
063122,000105: 17,3235           00006                           EXTEND                                         
063123,000106: 17,3236           74747                           MP       BIT5                                  #  SHIFT RIGHT TEN BITS:  IF A-REGISTER IS
063124,000107: 17,3237           10000                           CCS      A                                     #        ZERO, RESCALE AND TEST EDOT.
063125,000108: 17,3240           13621                           TCF      RUFLAW2                               
063126,000109: 17,3241           13243                           TCF      SCALEE                                
063127,000110: 17,3242           13565                           TCF      RUFLAW1                               
063128,000111: 17,3243           34737        SCALEE             CAF      BIT13                                 #  ERROR IS IN L SCALED AT PI/16.  RESCALE
063129,000112: 17,3244           00006                           EXTEND                                         #        IT TO PI/4 AND SAVE IT.
063130,000113: 17,3245           70001                           MP       L                                     
063131,000114: 17,3246           55750                           TS       E                                     
063132,000115: 
063133,000116:                                                                                                  #  TEST MAGNITUDE OF EDOT (ERROR RATE SCALED AT PI/4 RADIANS/SECOND)
063134,000117:                                                                                                  #        IF GREATER THAN (OR EQUAL TO) PI/32 RADIANS/SECOND, GO TO THE SIMPLIFIED TJET ROUTINE.
063135,000118:                                                                                                  #        IF LESS THAN PI/32 RADIANS/SECOND, THEN RESCALE TO PI/32 RADIANS/SECOND.
063136,000119: 
063137,000120: 17,3247           31425                           CAE      EDOT                                  #  PICK UP SINGLE-PRECISION ERROR-RATE

Page 1456

063139,000122: 17,3250           00006                           EXTEND                                         #  FOR THIS AXIS=
063140,000123: 17,3251           74750                           MP       BIT4                                  #  SHIFT RIGHT ELEVEN BITS, IF THE A-REG IS
063141,000124: 17,3252           00006                           EXTEND                                         #  ZERO, THEN RESCALE AND USE FINELAW.
063142,000125: 17,3253           13255                           BZF      SCALEDOT                              
063143,000126: 17,3254           13627                           TCF      RUFLAW3                               
063144,000127: 
063145,000128:                                                                                                  #  *** FINELAW STARTS HERE ***
063146,000129: 
063147,000130: 17,3255           23425        SCALEDOT           LXCH     EDOT                                  #  EDOT IS SCALED AT PI/32 RADIANS/SECOND.
063148,000131: 
063149,000132: 17,3256           31425                           CAE      EDOT                                  #  COMPUTE (EDOT)(EDOT)
063150,000133: 17,3257           00006                           EXTEND                                         
063151,000134: 17,3260           70000                           SQUARE                                         #  PRODUCT SCALED AT PI(2)/2(10) RAD/SEC.
063152,000135: 17,3261           00006                           EXTEND                                         
063153,000136: 17,3262           74737                           MP       BIT13                                 #  SHIFT RIGHT TWO BITS TO RESCALE EDOTSQ
063154,000137: 17,3263           55735                           TS       EDOTSQ                                #        TO PI(2)/2(8) RAD(2)/SEC(2).
063155,000138: 
063156,000139: 17,3264           11750        ERRTEST            CCS      E                                     #  DOES BIG ERROR (TWO DEGREES BEYOND THE
063157,000140: 17,3265           63662                           AD       -2DEG                                 #  DEADBAND) REQUIRE MAXIMUM JETS?
063158,000141: 17,3266           13270                           TCF      +2                                    
063159,000142: 17,3267           63662                           AD       -2DEG                                 
063160,000143: 17,3270           00006                           EXTEND                                         
063161,000144: 17,3271           51744                           INDEX    ADRSDIF1                              
063162,000145: 17,3272           61601                           SU       FIREDB                                
063163,000146: 17,3273           00006                           EXTEND                                         
063164,000147: 17,3274           63301                           BZMF     SENSTEST                              #  IF NOT:  ARE UNBALANCED JETS PREFERRED|
063165,000148: 17,3275           34752        MAXJETS            CAF      TWO                                   #  IF YES:  INCREMENT ADDRESS LOCATOR AND
063166,000149: 17,3276           27742                           ADS      ADRSDIF2                              #           SET SWITCH FOR JET SELECT LOGIC TO 4.
063167,000150: 17,3277           34751                           CAF      FOUR                                  #           (ALWAYS DO THIS FOR P-AXIS)
063168,000151: 17,3300           13304                           TCF      TJCALC                                
063169,000152: 17,3301           11477        SENSTEST           CCS      SENSETYP                              #  DOES TRANSLATION PREFER MIN JETS.
063170,000153: 17,3302           13304                           TCF      TJCALC                                #  YES.  USE MIN-JET PARAMETERS.
063171,000154: 17,3303           13275                           TCF      MAXJETS                               #  NO.  GET MAX-JET PARAMETERS.
063172,000155: 17,3304           55741        TJCALC             TS       NUMBERT                               #  SET TO +0,1,4 FOR (U,V-AXES) JET SELECT.
063173,000156: 
063174,000157:                                                                                                  #  BEGINNING OF TJET CALCULATIONS:
063175,000158: 
063176,000159: 17,3305           41735                           CS       EDOTSQ                                #  SCALED AT PI(2)/2(8).
063177,000160: 17,3306           00006                           EXTEND                                         
063178,000161: 17,3307           51742                           INDEX    ADRSDIF2                              
063179,000162: 17,3310           71567                           MP       1/ANET1                               #  .5/ACC SCALED AT 2(6)/PI SEC(2)/RADIAN.
063180,000163: 17,3311           51744                           INDEX    ADRSDIF1                              
063181,000164: 17,3312           61601                           AD       FIREDB                                #  DEADBAND SCALED AT PI/4 RADIAN.
063182,000165: 17,3313           00006                           EXTEND                                         
063183,000166: 17,3314           61750                           SU       E                                     #  ATTITUDE ERROR SCALED AT PI/4 RADIAN.
063184,000167: 17,3315           55737                           TS       FIREFCT                               #  -E-.5(EDOTSQ)/ACC-DB AT PI/4 RADIAN.
063185,000168: 17,3316           00006                           EXTEND                                         
063186,000169: 17,3317           63477                           BZMF     ZON1,2,3                              
063187,000170: 
063188,000171: 17,3320           51744        ZONE4,5            INDEX    ADRSDIF1                              
063189,000172: 17,3321           31573                           CAE      1/ACOAST                              #  .5/ACC SCALED AT 2(6)/PI WHERE

Page 1457

063191,000174: 17,3322           00006                           EXTEND                                         #  ACC = MAX(AMIN, AOS-).
063192,000175: 17,3323           71735                           MP       EDOTSQ                                #  SCALED AT PI/2(8).
063193,000176: 17,3324           61750                           AD       E                                     #  SCALED AT PI/4
063194,000177: 17,3325           51744                           INDEX    ADRSDIF1                              
063195,000178: 17,3326           61603                           AD       COASTDB                               #  SCALED AT PI/4 POS. FOR NEG. INTERCEPT.
063196,000179: 17,3327           00006                           EXTEND                                         #  TEST E+.5(EDOTSQ)/ACC+DB AT PI/4 RADIAN.
063197,000180: 17,3330           63363                           BZMF     ZONE5                                 #  IF FUNCTION NEGATIVE, FIND TJET.
063198,000181:                                                                                                  #  IF FUNCTION POSITIVE, IN ZONE 4.
063199,000182: 
063200,000183:                                                                                                  #  ZONE 4 IS THE COAST REGION.  HOWEVER, IF THE JETS ARE ON AND DRIVING TOWARD
063201,000184:                                                                                                  #        A. THE AXIS WITHIN + OR - (DB + FLAT) FOR DRIFTING FLIGHT, OR
063202,000185:                                                                                                  #        B. THE USUAL TARGET PARABOLA FOR POWERED FLIGHT
063203,000186:                                                                                                  #  THEN THE THRUSTERS ARE KEPT ON.
063204,000187: 
063205,000188: 17,3331           51476        ZONE4              INDEX    AXISCTR                               #  IS THE CURRENT VALUE IN TJET NON-ZERO
063206,000189: 17,3332           41525                           CS       TJETU                                 #        WITH SENSE OPPOSITE TO EDOT,
063207,000190: 17,3333           00006                           EXTEND                                         #        (I.E., ARE JETS ON AND FIRING TOWARD
063208,000191: 17,3334           71736                           MP       ROTSENSE                              #        THE DESIRABLE STATE).
063209,000192: 17,3335           00006                           EXTEND                                         
063210,000193: 17,3336           63357                           BZMF     COASTTJ                               #  NO.  COAST.
063211,000194: 
063212,000195: 17,3337           11555        JETSON             CCS      FLAT                                  #  YES.  IS THIS DRIFTING OR POWERED FLIGHT|
063213,000196: 17,3340           13351                           TCF      DRIFT/ON                              #  DRIFTING.  GO MAKE FURTHER TEST.
063214,000197: 
063215,000198: 17,3341           41737                           CS       FIREFCT                               #  POWERED (OR ULLAGE).  CAN TARGET PARABOLA
063216,000199: 17,3342           51744                           INDEX    ADRSDIF1                              #        BE REACHED FROM THIS POINT IN THE
063217,000200: 17,3343           61605                           AD       AXISDIST                              #        PHASE PLANE|
063218,000201: 17,3344           00006                           EXTEND                                         
063219,000202: 17,3345           63357                           BZMF     COASTTJ                               #  NO. SET TJET = 0.
063220,000203: 17,3346           03463                           TC       Z123COMP                              #  YES.  CALCULATE TJET AS THOUGH IN ZONE 1
063221,000204: 17,3347           31737                           CAE      FIREFCT                               #        AFTER COMPUTING THE REQUIRED
063222,000205: 17,3350           13517                           TCF      ZONE1                                 #        PARAMETERS.
063223,000206: 
063224,000207: 17,3351           51744        DRIFT/ON           INDEX    ADRSDIF1                              #  CAN TARGET STRIP OF AXIS BE REACHED FROM
063225,000208: 17,3352           41601                           CS       FIREDB                                #        THIS POINT IN THE PHASE PLANE|
063226,000209: 17,3353           60000                           DOUBLE                                         
063227,000210: 17,3354           61737                           AD       FIREFCT                               
063228,000211: 17,3355           00006                           EXTEND                                         
063229,000212: 17,3356           63361                           BZMF     +3                                    
063230,000213: 17,3357           34755        COASTTJ            CAF      ZERO                                  #  NO.  SET TJET = 0.
063231,000214: 17,3360           13423                           TCF      RETURNTJ                              
063232,000215: 
063233,000216: 17,3361           03463                           TC       Z123COMP                              #  YES. CALCULATE TJET AS THOUGH IN ZONE 2
063234,000217: 17,3362           13504                           TCF      ZONE2,3                               #        OR 3 AFTER COMPUTING REQUIRED VALUES.
063235,000218: 
063236,000219: 17,3363           54001        ZONE5              TS       L                                     #  TEMPORARILY STORE FUNCTION IN L.
063237,000220: 17,3364           11736                           CCS      ROTSENSE                              #  MODIFY ADRSDIF2 FOR ACCESSING 1/ANET2
063238,000221: 17,3365           13371                           TCF      +4                                    #  AND ACCFCTZ5, WHICH MUST BE PICKED UP
063239,000222: 17,3366           05677                           TC       CCSHOLE                               #  FROM THE NEXT LOWER REGISTER IF THE
063240,000223: 17,3367           44752                           CS       TWO                                   #  (ACTUAL) ERROR RATE IS NEGATIVE.

Page 1458

063242,000225: 17,3370           27742                           ADS      ADRSDIF2                              
063243,000226: 
063244,000227: 17,3371           30001                 +4        CAE      L                                     
063245,000228: 17,3372           00006                           EXTEND                                         
063246,000229: 17,3373           51742                           INDEX    ADRSDIF2                              #  TTOAXIS AND HH ARE THE PARAMETERS UPON
063247,000230: 17,3374           71576                           MP       ACCFCTZ5                              #        WHICH THE APPROXIMATIONS TO TJET ARE
063248,000231: 17,3375           20001                           DDOUBL                                         #        BASED.
063249,000232: 17,3376           20001                           DDOUBL                                         
063250,000233: 17,3377           53746                           DXCH     HH                                    #  DOUBLE PRECISION H SCALED AT 8 SEC(2).
063251,000234: 17,3400           51742                           INDEX    ADRSDIF2                              
063252,000235: 17,3401           31570                           CAE      1/ANET2                               #  SCALED AT 2(7)/PI SEC(2)/RAD.
063253,000236: 17,3402           00006                           EXTEND                                         
063254,000237: 17,3403           71425                           MP       EDOT                                  #  SCALED AT PI/2(5)
063255,000238: 17,3404           55740                           TS       TTOAXIS                               #  SCALED AT 4 SEC.
063256,000239: 
063257,000240:                                                                                                  #  TEST WHETHER TJET GREATER THAN 50 MSEC.
063258,000241: 
063259,000242: 17,3405           00006                           EXTEND                                         
063260,000243: 17,3406           73671                           MP       -.05AT2                               #  H - .05 TTOAXIS - .00125 G.T. ZERO
063261,000244: 17,3407           61745                           AD       HH                                    #        (SCALED AT 8 SEC(2) ).
063262,000245: 17,3410           67745                           AD       NEG2                                  
063263,000246: 17,3411           00006                           EXTEND                                         
063264,000247: 17,3412           63440                           BZMF     FORMULA1                              
063265,000248: 
063266,000249:                                                                                                  #  TEST WHETHER TJET GREATER THAN 150 MSEC.
063267,000250: 
063268,000251: 17,3413           31740                           CAE      TTOAXIS                               
063269,000252: 17,3414           00006                           EXTEND                                         
063270,000253: 17,3415           73672                           MP       -.15AT2                               #  H - .15 TTOAXIS - .01125 G.T. ZERO
063271,000254: 17,3416           61745                           AD       HH                                    #        (SCALED AT 8 SEC(2) )
063272,000255: 17,3417           63663                           AD       -.0112A8                              
063273,000256: 17,3420           00006                           EXTEND                                         
063274,000257: 17,3421           63450                           BZMF     FORMULA2                              
063275,000258: 
063276,000259:                                                                                                  #  IF TJET GREATER THAN 150 MSEC, ASSIGN IT VALUE OF 250 MSEC, SINCE THIS
063277,000260:                                                                                                  #  IS ENOUGH TO ASSURE NO SKIP NEXT CSP (100 MSEC).
063278,000261: 
063279,000262: 17,3422           34741        FULLTIME           CAF      BIT11                                 #  250 MSEC SCALED AT 4 SEC.
063280,000263: 
063281,000264:                                                                                                  #  RETURN TO CALLING PROGRAM WITH JET TIME SCALED AS TIME6 AND SIGNED.
063282,000265: 
063283,000266: 17,3423           00006        RETURNTJ           EXTEND                                         #  ALL BRANCHES TERMINATE HERE WITH TJET
063284,000267: 17,3424           71736                           MP       ROTSENSE                              #        (SCALED AT 4 SEC) IN THE ACCUMULATOR.
063285,000268: 17,3425           51476                           INDEX    AXISCTR                               #  ROTSENSE APPLIES SIGN AND CHANGES SCALE.
063286,000269: 17,3426           55525                           TS       TJETU                                 
063287,000270: 17,3427           00006                           EXTEND                                         
063288,000271: 17,3430           51476                           INDEX    AXISCTR                               
063289,000272: 17,3431           71547                           MP       ACCSWU                                #  SET SWITCH FOR JET SELECT IF ROTATION IS
063290,000273: 17,3432           30001                           CAE      L                                     
063291,000274: 17,3433           00006                           EXTEND                                         #        IN A SENSE FOR WHICH 1/ACCS HAS FORCED
063292,000275: 17,3434           63437                           BZMF     +3                                    #        A MAX-JET CALCULATION.
063293,000276: 17,3435           34751                           CAF      FOUR                                  

Page 1459

063295,000278: 17,3436           55741                           TS       NUMBERT                               
063296,000279: 17,3437           01743                           TC       HOLDQ                                 #  RETURN VIA SAVED Q.
063297,000280: 
063298,000281:                                                                                                  #  TJET = H/(.025 + TTOAXIS)     FOR TJET LESS THAN 50 MSEC.
063299,000282: 
063300,000283: 17,3440           43670        FORMULA1           CS       -.025AT4                              #  .025 SEC SCALED AT 4.
063301,000284: 17,3441           61740                           AD       TTOAXIS                               #  SCALED AT 4 SECONDS.
063302,000285: 17,3442           53746                           DXCH     HH                                    #  STORE DENOMINATOR IN FIRST WORD OF H,
063303,000286: 17,3443           00006                           EXTEND                                         #        WHICH NEED NOT BE PRESERVED.  PICK UP
063304,000287: 17,3444           11745                           DV       HH                                    #        DP H AND DIVIDE BY DENOMINATOR.
063305,000288: 17,3445           00006                           EXTEND                                         
063306,000289: 17,3446           74736                           MP       BIT14                                 #  RESCALE TJET FROM 2 TO USUAL 4 SEC.
063307,000290: 17,3447           13560                           TCF      CHKMINTJ                              #  CHECK THAT TJET IS NOT LESS THAN MINIMUM
063308,000291: 
063309,000292:                                                                                                  #  TJET = (H + .00375)/(0.1 + TTOAXIS)   FOR TJET GREATER THAN 50 MSEC.
063310,000293: 
063311,000294: 17,3450           00006        FORMULA2           EXTEND                                         
063312,000295: 17,3451           33674                           DCA      .00375A8                              #  .00375 SEC(2) SCALED AT 8.
063313,000296: 17,3452           21746                           DAS      HH                                    #  STORE NUMERATOR IN DP H, WHICH NEED NOT
063314,000297:                                                                                                  #        BE PRESERVED.
063315,000298: 17,3453           31740                           CAE      TTOAXIS                               #  SCALED AT 4 SEC.
063316,000299: 17,3454           63664                           AD       .1AT4                                 #  0.1 SEC SCALED AT 4.
063317,000300: 17,3455           53746                           DXCH     HH                                    #  STORE DENOMINATOR IN FIRST WORD OF H,
063318,000301: 17,3456           00006                           EXTEND                                         #        WHICH NEED NOT BE PRESERVED.  PICK UP
063319,000302: 17,3457           11745                           DV       HH                                    #        DP NUMERATOR AND DIVIDE BY DENOMINATOR
063320,000303: 17,3460           00006                           EXTEND                                         
063321,000304: 17,3461           74736                           MP       BIT14                                 #  RESCALE TJET FROM 2 TO USUAL 4 SEC.
063322,000305: 17,3462           13423                           TCF      RETURNTJ                              #  END SUBROUTINE.
063323,000306: 
063324,000307:                                                                                                  #  SUBROUTINIZED COMPUTATIONS REQUIRED FOR ALL ENTRIES INTO CODING FOR ZONES 1, 2, AND 3.
063325,000308:                                                                                                  #  REACHED BY TC FROM 3 POINTS IN TJETLAW.
063326,000309: 
063327,000310: 17,3463           41736        Z123COMP           CS       ROTSENSE                              #  USED IN RETURNTJ SECTION TO RESCALE TJET
063328,000311: 17,3464           55736                           TS       ROTSENSE                              #        AS TIME6 AND GIVE IT PROPER SIGN.
063329,000312: 17,3465           31425                           CAE      EDOT                                  #  SCALED AT PI/2(5) RAD/SEC.
063330,000313: 17,3466           00006                           EXTEND                                         
063331,000314: 17,3467           51742                           INDEX    ADRSDIF2                              
063332,000315: 17,3470           71567                           MP       1/ANET1                               #  SCALED AT 2(7)/PI SEC(2)/RAD.
063333,000316: 17,3471           55740                           TS       TTOAXIS                               #  STORE TIME-TO-AXIS SCALED AT 4 SECONDS.
063334,000317: 17,3472           63675                           AD       -TJMAX                                
063335,000318: 17,3473           00006                           EXTEND                                         #  IS TIME TO AXIS LESS THAN 150 MSEC.
063336,000319: 17,3474           63476                           BZMF     +2                                    
063337,000320: 17,3475           13422                           TCF      FULLTIME                              #  NO. FIRE JETS, DO NOT CALCULATE TJET.
063338,000321: 17,3476           00002                           RETURN                                         #  YES.  GO ON TO FIND TJET
063339,000322: 
063340,000323: 17,3477           03463        ZON1,2,3           TC       Z123COMP                              #  SUBROUTINIZED PREPARATION FOR ZONE1,2,3.
063341,000324: 
063342,000325:                                                                                                  #  IF THE (NEG) DISTANCE BEYOND PARABOLA IS LESS THAN FLAT, USE SPECIAL
063343,000326:                                                                                                  #  LOGIC TO ACQUIRE MINIMUM IMPULSE LIMIT CYCLE.  DURING POWERED FLIGHT

Page 1460

063345,000328:                                                                                                  #  OR ULLAGE, FLAT = 0
063346,000329: 
063347,000330: 17,3500           31737                           CAE      FIREFCT                               #  SCALED AT PI/4 RAD.
063348,000331: 17,3501           61555                           AD       FLAT                                  
063349,000332: 17,3502           00006                           EXTEND                                         
063350,000333: 17,3503           63517                           BZMF     ZONE1                                 #  NOT IN SPECIAL ZONES.
063351,000334: 
063352,000335:                                                                                                  #  FIRE FOR AXIS OR, IF CLOSE, FIRE MINIMUM IMPULSE.  IF ON AXIS, COAST.
063353,000336: 
063354,000337: 17,3504           41556        ZONE2,3            CS       ZONE3LIM                              #  HEIGHT OF MIN-IMPULSE ZONE SET BY 1/ACCS
063355,000338: 17,3505           61740                           AD       TTOAXIS                               #        35 MSEC IN DRIFTING FLIGHT
063356,000339: 17,3506           00006                           EXTEND                                         #        ZERO WHEN TRYING TO ENTER GTS CONTROL.
063357,000340: 17,3507           63512                           BZMF     ZONE3                                 
063358,000341: 17,3510           31740        ZONE2              CAE      TTOAXIS                               #  FIRE TO AXIS.
063359,000342: 17,3511           13423                           TCF      RETURNTJ                              
063360,000343: 17,3512           11425        ZONE3              CCS      EDOT                                  #  CHECK IF EDOT IS ZERO.
063361,000344: 17,3513           34746                           CAF      BIT6                                  #  FIRE A ONE-JET MINIMUM IMPULSE.
063362,000345: 17,3514           13423                           TCF      RETURNTJ                              #  TJET = +0.
063363,000346: 17,3515           05677                           TC       CCSHOLE                               #  CANNOT BE BECAUSE NEG EDOT COMPLEMENTED.
063364,000347: 17,3516           13423                           TCF      RETURNTJ                              #  TJET = +0.
063365,000348: 
063366,000349: 17,3517           00006        ZONE1              EXTEND                                         
063367,000350: 17,3520           51744                           INDEX    ADRSDIF1                              
063368,000351: 17,3521           61605                           SU       AXISDIST                              #  SCALED AT PI/4 RAD.
063369,000352: 17,3522           00006                           EXTEND                                         
063370,000353: 17,3523           51742                           INDEX    ADRSDIF2                              
063371,000354: 17,3524           71575                           MP       ACCFCTZ1                              #  SCALED AT 2(7)/PI SEC(2)/RAD.
063372,000355: 17,3525           20001                           DDOUBL                                         
063373,000356: 17,3526           20001                           DDOUBL                                         
063374,000357: 17,3527           53746                           DXCH     HH                                    #  DOUBLE PRECISION H SCALED AT 8 SEC(2).
063375,000358: 
063376,000359:                                                                                                  #  TEST WHETHER TOTAL TIME REQUIRED GREATER THAN 150 MSEC:
063377,000360:                                                                                                  #                             2                                   2
063378,000361:                                                                                                  #        IS .5(.150 - TTOAXIS)  - H  NEGATIVE (SCALED AT 8 SECONDS )
063379,000362: 
063380,000363: 17,3530           31740                           CAE      TTOAXIS                               #  TTOAXIS SCALED AT 4 SECONDS.
063381,000364: 17,3531           63675                           AD       -TJMAX                                #  -.150 SECOND SCALED AT 4.
063382,000365: 17,3532           00006                           EXTEND                                         
063383,000366: 17,3533           70000                           SQUARE                                         
063384,000367: 17,3534           00006                           EXTEND                                         
063385,000368: 17,3535           61745                           SU       HH                                    #  HIGH WORD OF H SCALED AT 8 SEC(2).
063386,000369: 17,3536           00006                           EXTEND                                         
063387,000370: 17,3537           63422                           BZMF     FULLTIME                              #  YES.  NEED NOT CALCULATE TJET.
063388,000371: 
063389,000372:                                                                                                  #  TEST WHETHER TIME BEYOND AXIS GREATER THAN 50 MSEC TO DETERMINE WHICH APPROXIMATION TO USE.
063390,000373: 
063391,000374: 17,3540           31745                           CAE      HH                                    
063392,000375: 17,3541           67745                           AD       NEG2                                  
063393,000376: 17,3542           00006                           EXTEND                                         
063394,000377: 17,3543           63553                           BZMF     FORMULA3                              
063395,000378: 

Page 1461

063397,000380:                                                                                                  #  TJET = H/0.1 + TTOAXIS + .0375        FOR APPROXIMATION OVER MORE THAN 50 MSEC.
063398,000381: 
063399,000382: 17,3544           33665                           CAF      .1AT2                                 #  STORE .1 SEC SCALED AT 2 FOR DIVISION.
063400,000383: 17,3545           53746                           DXCH     HH                                    #  DP H SCALED AT 8 SEC(2) NEED NOT BE
063401,000384: 17,3546           00006                           EXTEND                                         #        PRESERVED.
063402,000385: 17,3547           11745                           DV       HH                                    #  QUOTIENT SCALED AT 4 SECONDS.
063403,000386: 17,3550           61740                           AD       TTOAXIS                               #  SCALED AT 4 SEC.
063404,000387: 17,3551           63666                           AD       .0375AT4                              #  .0375 SEC SCALED AT 4.
063405,000388: 17,3552           13423                           TCF      RETURNTJ                              #  END COMPUTATION.
063406,000389: 
063407,000390:                                                                                                  #  TJET = H/.O25 + TTOAXIS       FOR APPROXIMATION OVER LESS THAN 50 MSEC.
063408,000391: 
063409,000392: 17,3553           43667        FORMULA3           CS       -.025AT2                              #  STORE +.025 SEC SCALED AT 2 FOR DIVISION
063410,000393: 17,3554           53746                           DXCH     HH                                    #  PICK UP DP H AT 8, WHICH NEED NOT BE
063411,000394: 17,3555           00006                           EXTEND                                         #        PRESERVED.
063412,000395: 17,3556           11745                           DV       HH                                    #  QUOTIENT SCALED AT 4 SECONDS.
063413,000396: 17,3557           61740                           AD       TTOAXIS                               #  SCALED AT 4 SEC.
063414,000397: 
063415,000398:                                                                                                  #  IF COMPUTED JET TIME IS LESS THAN TJMIN, TJET IS SET TO ZERO.
063416,000399:                                                                                                  #  MINIMUM IMPULSES REQUIRED IN ZONE 3 ARE NOT SUBJECT TO THIS CONSTRAINT, NATURALLY.
063417,000400: 
063418,000401: 17,3560           63677        CHKMINTJ           AD       -TJMIN                                #  IS COMPUTED TIME LESS THAN THE MINIMUM.
063419,000402: 17,3561           00006                           EXTEND                                         
063420,000403: 17,3562           63357                           BZMF     COASTTJ                               #  YES, SET TIME TO ZERO.
063421,000404: 17,3563           63676                           AD       TJMIN                                 #  NO, RESTORE COMPUTED TIME.
063422,000405: 17,3564           13423                           TCF      RETURNTJ                              #  END COMPUTATION.
063423,000406: 

Page 1462

063425,000408:                                                                                                  #  *** ROUGHLAW ***
063426,000409: 
063427,000410:                                                                                                  #  BEFORE ENTRY TO RUFLAW:
063428,000411:                                                                                                  #        1. INDEXERS ADRSDIF1 AND ADRSDIF2 ARE SET ON BASIS OF AXIS, AND SIGN OF EDOT.
063429,000412:                                                                                                  #        2. IF EDOT WAS NEGATIVE, E AND EDOT ARE ROTATED INTO UPPER HALF-PLANE AND ROTSENSE IS MADE NEGATIVE.
063430,000413:                                                                                                  #        3. E IS SCALED AT PI RADIANS AND EDOT AT PI/4 RAD/SEC.
063431,000414:                                                                                                  #           (EXCEPT THE RUFLAW3 ENTRY WHEN E IS AT PI/4)
063432,000415: 
063433,000416:                                                                                                  #  RUFLAW1:      ERROR MORE NEGATIVE THAN PI/16 RAD.  FIRE TO A RATE OF PI/32 RAD/SEC (IF JET TIME EXCEEDS 20 MSEC.).
063434,000417:                                                                                                  #  RUFLAW2:      ERROR MORE POSITIVE THAN PI/16 RAD.  FIRE TO OPPOSING RATE OF PI/32 RAD/SEC.
063435,000418:                                                                                                  #  RUFLAW3:      ERROR RATE GREATER THAN PI/32 RAD/SEC AND ERROR WITHIN BOUNDS.  COAST IF BELOW FIREFCT, FIRE IF ABOVE
063436,000419: 
063437,000420: 17,3565           44740        RUFLAW1            CS       BIT12                                 #  DECREMENT EDOT BY PI/32 RAD/SEC, WHICH
063438,000421: 17,3566           27425                           ADS      EDOT                                  #        IS THE TARGET RATE.
063439,000422: 17,3567           00006                           EXTEND                                         
063440,000423: 17,3570           63611                           BZMF     SMALRATE                              #  BRANCH IF RATE LESS THAN TARGET.
063441,000424: 17,3571           03647                           TC       RUFSETUP                              #  REVERSE ROTSENSE AND INDICATE MAX JETS.
063442,000425: 17,3572           31425                           CAE      EDOT                                  #  PICK UP DESIRED RATE CHANGE.
063443,000426: 
063444,000427: 17,3573           00006        RUFLAW12           EXTEND                                         #  COMPUTE TJET
063445,000428: 17,3574           51742                           INDEX    ADRSDIF2                              #        = (DESIRED RATE CHANGE)/(2-JET ACCEL.)
063446,000429: 17,3575           71571                           MP       1/ANET1    +2                         
063447,000430: 17,3576           67740                           AD       -1/8                                  #  IF TJET, SCALED AT 32 SEC, EXCEEDS
063448,000431: 17,3577           00006                           EXTEND                                         #        4 SECONDS, SET TJET TO TJMAX.
063449,000432: 17,3600           63602                           BZMF     +2                                    
063450,000433: 17,3601           13422                           TCF      FULLTIME                              
063451,000434: 17,3602           00006                           EXTEND                                         
063452,000435: 17,3603           13422                           BZF      FULLTIME                              
063453,000436: 17,3604           64740                           AD       BIT12                                 #  RESTORE COMPUTED TJET TO ACCUMULATOR.
063454,000437: 17,3605           20001                           DAS      A                                     
063455,000438: 17,3606           20001                           DAS      A                                     
063456,000439: 17,3607           20001                           DAS      A                                     #  RESCALED TJET AT 4 SECONDS.
063457,000440: 17,3610           13560                           TCF      CHKMINTJ                              #  RETURN AS FROM FINELAW.
063458,000441: 
063459,000442: 17,3611           03651        SMALRATE           TC       RUFSETUP   +2                         #  SET NUMBERT AND FIREFCT FOR MAXIMUM JETS
063460,000443: 17,3612           11736                           CCS      ROTSENSE                              
063461,000444: 17,3613           34753                           CAF      ONE                                   #  MODIFY INDEXER TO POINT TO 1/ANET
063462,000445: 17,3614           13616                           TCF      +2                                    #        CORRESPONDING TO THE PROPER SENSE.
063463,000446: 17,3615           37746                           CAF      NEGONE                                
063464,000447: 17,3616           27742                           ADS      ADRSDIF2                              
063465,000448: 
063466,000449: 17,3617           41425                           CS       EDOT                                  #  PICK UP (PI/32-EDOT)=DESIRED CHANGE.
063467,000450: 17,3620           13573                           TCF      RUFLAW12                              
063468,000451: 
063469,000452: 17,3621           03647        RUFLAW2            TC       RUFSETUP                              #  REVERSE ROTSENSE AND INDICATE MAX JETS.
063470,000453: 17,3622           34740                           CAF      BIT12                                 
063471,000454: 17,3623           61425                           AD       EDOT                                  #  PICK UP(PI/32+EDOT) = DESIRED RATE CHANGE
063472,000455: 17,3624           54000                           TS       A                                     #  IF OVERFLOW SKIP, FIRE FOR FULL TIME.
063473,000456: 

Page 1463

063475,000458: 17,3625           13573                           TCF      RUFLAW12                              #  OTHERWISE, COMPUTE JET TIME.
063476,000459: 17,3626           13422                           TCF      FULLTIME                              
063477,000460: 
063478,000461: 17,3627           03647        RUFLAW3            TC       RUFSETUP                              #  EXECUTE COMMON RUFLAW SUBROUTINE.
063479,000462: 17,3630           51744                           INDEX    ADRSDIF1                              
063480,000463: 17,3631           41601                           CS       FIREDB                                #  CALCULATE DISTANCE FROM SWITCH CURVE
063481,000464: 17,3632           61750                           AD       E                                     #        1/ANET1*EDOT*EDOT +E - FIREDB = 0
063482,000465: 17,3633           00006                           EXTEND                                         #                SCALED AT 4 PI RADIANS
063483,000466: 17,3634           74741                           MP       BIT11                                 
063484,000467: 17,3635           57425                           XCH      EDOT                                  
063485,000468: 17,3636           00006                           EXTEND                                         
063486,000469: 17,3637           70000                           SQUARE                                         
063487,000470: 17,3640           00006                           EXTEND                                         
063488,000471: 17,3641           51744                           INDEX    ADRSDIF1                              
063489,000472: 17,3642           71571                           MP       1/ANET1    +2                         
063490,000473: 17,3643           61425                           AD       EDOT                                  
063491,000474: 17,3644           00006                           EXTEND                                         
063492,000475: 17,3645           63357                           BZMF     COASTTJ                               #  COAST IF BELOW IT.
063493,000476: 17,3646           13422                           TCF      FULLTIME                              #  FIRE FOR FULL PERIOD IF ABOVE IT.
063494,000477: 
063495,000478:                                                                                                  #  SUBROUTINE USED IN ALL ENTRIES TO ROUGHLAW.
063496,000479: 
063497,000480: 17,3647           41736        RUFSETUP           CS       ROTSENSE                              #  REVERSE ROTSENSE WHEN ENTER HERE.
063498,000481: 17,3650           55736                           TS       ROTSENSE                              
063499,000482: 17,3651           34751                 +2        CAF      FOUR                                  #  REQUIRE MAXIMUM (2) JETS IN U,V-AXES.
063500,000483: 17,3652           55741                           TS       NUMBERT                               
063501,000484: 17,3653           34735                           CAF      NEGMAX                                #  SUGGEST MAXIMUM (4) JETS IN P-AXIS.
063502,000485: 17,3654           55737                           TS       FIREFCT                               
063503,000486: 17,3655           00002                           TC       Q                                     
063504,000487: 
063505,000488:                                                                                                  #  CONSTANTS FOR TJETLAW
063506,000489: 
063507,000490: 17,3656           77757                           DEC      -16        B-14                       #  AXISDIFF(INDEX) = NUMBER OF REGISTERS
063508,000491: 17,3657           00000        AXISDIFF           DEC      +0         B-14                       #        BETWEEN STORED 1/ACCS PARAMETERS FOR
063509,000492: 17,3660           00020                           DEC      16         B-14                       #        THE INDEXED AXIS AND THE U-AXIS.
063510,000493: 17,3661           14400        SENSOR             OCT      14400                                 #  RATIO OF TJET SCALING WITHIN TJETLAW
063511,000494:                                                                                                  #        (4 SEC) TO SCALING FOR T6 (10.24 SEC).
063512,000495: 17,3662           76447        -2DEG              DEC      -.04444                               #  -2.0 DEGREES SCALED AT 45.
063513,000496: 17,3663           77750        -.0112A8           DEC      -.00141                               #  -.01125 SEC(2) SCALED AT 8.
063514,000497: 17,3664           00632        .1AT4              DEC      .025                                  #  0.1 SECOND SCALED AT 4.
063515,000498: 17,3665           01463        .1AT2              DEC      .05                                   #  0.1 SEC SCALED AT 2.
063516,000499: 17,3666           00232        .0375AT4           DEC      .00938                                #  .0375 SEC SCALED AT 4.
063517,000500: 17,3667           77462        -.025AT2           DEC      -.0125                                #  -.025 SEC SCALED AT 2.
063518,000501: 17,3670           77631        -.025AT4           DEC      -.00625                               
063519,000502: 17,3671           77145        -.05AT2            DEC      -.025                                 
063520,000503: 17,3672           75462        -.15AT2            DEC      -.075                                 
063521,000504: 17,3673           00007 25605  .00375A8           2DEC     .00375     B-3                        
063522,000505: 
063523,000506: 17,3675           76631        -TJMAX             DEC      -.0375                                #  LARGEST CALCULATED TIME.  .150 SEC AT 4.
063524,000507: 17,3676           00122        TJMIN              DEC      .005                                  #  SMALLEST ALLOWABLE TIME.  .020 SEC AT 4.

Page 1464

063526,000509: 17,3677           77655        -TJMIN             DEC      -.005                                 

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