Source Code
This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release
of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97.
A bug (which had been around since at least Apollo 10, Luminary 69) was
discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute
revision into Rev 1,
which is what actually flew rather than
the Rev 0 presented here. A hardcopy of Rev 0 is known to
exist — it belonged to AGC developer Allan Klumpp for many years — but
unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus
the code you see here had been reconstructed (we believe accurately) rather than
transcribed. The first step of the reconstruction of the Rev 0 source code was
the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection.
The process of reverting the active portion of the source code (i.e., other than
program comments) from Rev 1 to Rev 0 was very minor, consisting
only of moving the position of the STARTSB1 label in
FRESH START AND RESTART. Allan had previously given
us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums
identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read,
in part:GAP: ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051 A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here. |
064262,000002: ## Copyright: Public domain.
064263,000003: ## Filename: TJET_LAW.agc
064264,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
064265,000005: ## otherwise known as Luminary Rev 99, the third release
064266,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
064267,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
064268,000008: ## placement of a single label. The corrections shown here have
064269,000009: ## been verified to have the same bank checksums as AGC developer
064270,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
064271,000011: ## to be accurate. This file is intended to be a faithful
064272,000012: ## recreation, except that the code format has been changed to
064273,000013: ## conform to the requirements of the yaYUL assembler rather than
064274,000014: ## the original YUL assembler.
064275,000015: ##
064276,000016: ## Assembler: yaYUL
064277,000017: ## Contact: Ron Burkey <info@sandroid.org>.
064278,000018: ## Website: www.ibiblio.org/apollo.
064279,000019: ## Pages: 1460-1469
064280,000020: ## Mod history: 2009-05-27 RSB Adapted from the corresponding
064281,000021: ## Luminary131 file, using page
064282,000022: ## images from Luminary 1A.
064283,000023: ## 2009-06-06 RSB Eliminated a stray instruction that had crept
064284,000024: ## in somehow.
064285,000025: ## 2011-01-06 JL Fixed pseudo-label indentation.
064286,000026: ## 2016-12-18 RSB Proofed text comments with octopus/ProoferComments
064287,000027: ## and corrected the errors found.
064288,000028: ## 2017-03-14 RSB Comment-text fixes noted in proofing Luminary 116.
064289,000029: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
064290,000030: ## side-by-side diff of Luminary 69/99/116/131/210.
064291,000031: ## 2017-08-01 MAS Created from LMY99 Rev 1.
064292,000032:
064293,000033: ## This source code has been transcribed or otherwise adapted from
064294,000034: ## digitized images of a hardcopy from the MIT Museum. The digitization
064295,000035: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
064296,000036: ## the Museum. Many thanks to both. The images (with suitable reduction
064297,000037: ## in storage size and consequent reduction in image quality as well) are
064298,000038: ## available online at www.ibiblio.org/apollo. If for some reason you
064299,000039: ## find that the images are illegible, contact me at info@sandroid.org
064300,000040: ## about getting access to the (much) higher-quality images which Paul
064301,000041: ## actually created.
064302,000042: ##
064303,000043: ## The code has been modified to match LMY99 Revision 0, otherwise
064304,000044: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
064305,000045: ## the listing from which it was transcribed. It has been verified to
064306,000046: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
064307,000047: ## of Luminary Revision 99 (for which we do not have scans).
064308,000048: ##
064309,000049: ## Notations on Allan Klumpp's listing read, in part:
064310,000050: ##
064311,000051: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
064312,000052:
Page 1460 |
064314,000054: # PROGRAM DESCRIPTION
064315,000055: # DESIGNED BY: R. D. GOSS AND P. S. WEISSMAN
064316,000056: # CODED BY: P. S. WEISSMAN 28 FEBRUARY 1968
064317,000057:
064318,000058: # TJETLAW IS CALLED AS A SUBROUTINE WHEN THE LEM IS NOT DOCKED AND THE AUTOPILOT IS IN THE AUTOMATIC OR
064319,000059: # ATTITUDE-HOLD MODE TO CALCULATE THE JET-FIRING-TIME (TJET) REQUIRED FOR THE AXIS INDICATED BY AXISCTR:
064320,000060: # -1 INDICATES THE P-AXIS
064321,000061: # +0 INDICATES THE U-AXIS
064322,000062: # +1 INDICATES THE V-AXIS.
064323,000063: # THE REGISTERS E AND EDOT CONTAIN THE APPROPRIATE ATTITUDE ERROR AND ERROR RATE AND SENSETYP SHOWS WHETHER
064324,000064: # UNBALANCED COUPLES ARE PREFERRED. TJETLAW ALSO USES VARIOUS FUNCTIONS OF ACCELERATION AND DEADBAND WHICH ARE
064325,000065: # COMPUTED IN THE 1/ACCONT SECTION OF 1/ACCS AND ARE STORED IN SUCH AN ORDER THAT THEY CAN BE CONVENIENTLY
064326,000066: # ACCESSED BY INDEXING.
064327,000067:
064328,000068: # THE SIGN OF THE REQUIRED ROTATION IS CARRIED THROUGH TJETLAW AS ROTSENSE AND IS FINALLY APPLIED TO TJET JUST
064329,000069: # PREVIOUS TO ITS STORAGE IN THE LOCATION CORRESPONDING TO THE AXIS (TJP, TJU OR TJV). THE NUMBER OF JETS THAT
064330,000070: # TJETLAW ASSUMES WILL BE USED IS INDICATED BY THE SETTING OF NUMBERT FOR THE U- OR V-AXIS. TWO JETS ARE ALWAYS
064331,000071: # ASSUMED FOR THE P-AXIS ALTHOUGH FOUR JETS WILL BE FIRED WHEN FIREFCT IS MORE NEGATIVE THAN -4.0 DEGREES
064332,000072: # (FIREFCT IS THE DISTANCE TO A SWITCH CURVE IN THE PHASE PLANE) AND A LONG FIRING IS CALLED FOR.
064333,000073:
064334,000074: # IN ORDER TO AVOID SCALING DIFFICULTIES, SIMPLE ALGORITHMS TAGGED RUFLAW1, -2 AND -3 ARE RESORTED TO WHEN THE
064335,000075: # ERROR AND/OR ERROR RATE ARE LARGE.
064336,000076:
064337,000077: # CALLING SEQUENCE:
064338,000078: # TC TJETLAW (MUST BE IN JASK)
064339,000079: # OR
064340,000080: # INHINT (MUST BE IN JASK)
064341,000081: # TC IBNKCALL
064342,000082: # CADR TJETLAW
064343,000083: # RELINT
064344,000084:
064345,000085: # EXIT: RETURN TO Q.
064346,000086:
064347,000087: # INPUT:
064348,000088: # FROM THE CALLER: E, EDOT, AXISCTR, SENSETYP, TJP, -U, -V.
064349,000089: # FROM 1/ACCONT: 48 ERASABLES BEGINNING AT BLOCKTOP (INCLUDING FLAT, ZONE3LIM AND ACCSWU, -V).
064350,000090:
064351,000091: # OUTPUT:
064352,000092: # TJP, -U OR -V, NUMBERT (DAPTEMP5), FIREFCT (DAPTEMP3).
064353,000093:
064354,000094: # DEBRIS:
064355,000095: # A, L, Q, E, EDOT, DAPTEMP1-6, DAPTREG1-4.
064356,000096:
064357,000097: # ALARM: NONE
064358,000098:
064359,000099: 17,3252 BANK 17
064360,000100: 17,2000 SETLOC DAPS2
064361,000101: 17,2000 BANK
064362,000102: 17,3252 E6,1524 EBANK= TJP
Page 1461 |
064364,000104: 17,3252 COUNT* $$/DAPTJ
064365,000105:
064366,000106: 17,3252 00006 TJETLAW EXTEND # SAVE Q FOR RETURN.
064367,000107: 17,3253 23745 QXCH HOLDQ
064368,000108:
064369,000109: # SET INDEXERS TO CORRESPOND TO THE AXIS AND TO THE SIGN OF EDOT
064370,000110:
064371,000111: 17,3254 51505 INDEX AXISCTR # AXISDIFF(-1)=NO OF LOCATIONS BER P AND U
064372,000112: 17,3255 33722 CAF AXISDIFF # AXISDIFF(0)=0
064373,000113: 17,3256 55746 TS ADRSDIF1 # AXISDIFF(+1)=NO OF LOCATIONS BET V AND U
064374,000114:
064375,000115: 17,3257 31427 CAE EDOT # IF EDOT NEGATIVE, PICK UP SET OF VALUES
064376,000116: 17,3260 00006 EXTEND # THAT ALLOW USE OF SAME CODING AS FOR
064377,000117: 17,3261 63266 BZMF NEGEDOT # POSITIVE EDOT.
064378,000118: 17,3262 31746 CAE ADRSDIF1 # SET A SECOND INDEXER WHICH MAY BE
064379,000119: 17,3263 55744 TS ADRSDIF2 # MODIFIED BY A DECISION FOR MAX JETS.
064380,000120: 17,3264 33724 CAF SENSOR # FOR POSITIVE EDOT, ROTSENSE IS
064381,000121: 17,3265 13276 TCF SETSENSE # INITIALIZED POSITIVE.
064382,000122:
064383,000123: 17,3266 41752 NEGEDOT CS E # IN ORDER FOR NEG EDOT CASE TO USE CODING
064384,000124: 17,3267 55752 TS E # OF POS EDOT, MUST MODIFY AS FOLLOWS:
064385,000125: 17,3270 41427 CS EDOT # 1. COMPLEMENT E AND EDOT.
064386,000126: 17,3271 55427 TS EDOT # 2. SET SENSE OF ROTATION TO NEGATIVE
064387,000127: 17,3272 34753 CAF BIT1 # (REVERSED LATER IF NECESSARY).
064388,000128: 17,3273 27746 ADS ADRSDIF1 # 3. INCREMENT INDEXERS BY ONE SO THAT
064389,000129: 17,3274 55744 TS ADRSDIF2 # THE PROPER PARAMETERS ARE ACCESSED.
064390,000130: 17,3275 43724 CS SENSOR
064391,000131: 17,3276 55740 SETSENSE TS ROTSENSE
064392,000132:
064393,000133: # TEST MAGNITUDE OF E (ATTITUDE ERROR, SINGLE-PRECISION, SCALED AT PI RADIANS):
064394,000134: # IF GREATER THAN (OR EQUAL TO) PI/16 RADIANS, GO TO THE SIMPLIFIED TJET ROUTINE.
064395,000135: # IF LESS THAN PI/16 RADIANS, RESCALE TO PI/4.
064396,000136:
064397,000137: 17,3277 31752 CAE E # PICK UP ATTITUDE ERROR FOR THIS AXIS
064398,000138: 17,3300 00006 EXTEND
064399,000139: 17,3301 74747 MP BIT5 # SHIFT RIGHT TEN BITS: IF A-REGISTER IS
064400,000140: 17,3302 10000 CCS A # ZERO, RESCALE AND TEST EDOT.
064401,000141: 17,3303 13664 TCF RUFLAW2
064402,000142: 17,3304 13306 TCF SCALEE
064403,000143: 17,3305 13630 TCF RUFLAW1
064404,000144: 17,3306 34737 SCALEE CAF BIT13 # ERROR IS IN L SCALED AT PI/16. RESCALE
064405,000145: 17,3307 00006 EXTEND # IT TO PI/4 AND SAVE IT.
064406,000146: 17,3310 70001 MP L
064407,000147: 17,3311 55752 TS E
064408,000148:
064409,000149: # TEST MAGNITUDE OF EDOT (ERROR RATE SCALED AT PI/4 RADIANS/SECOND)
064410,000150: # IF GREATER THAN (OR EQUAL TO) PI/32 RADIANS/SECOND, GO TO THE SIMPLIFIED TJET ROUTINE.
064411,000151: # IF LESS THAN PI/32 RADIANS/SECOND, THEN RESCALE TO PI/32 RADIANS/SECOND.
064412,000152:
064413,000153: 17,3312 31427 CAE EDOT # PICK UP SINGLE-PRECISION ERROR-RATE
Page 1462 |
064415,000155: 17,3313 00006 EXTEND # FOR THIS AXIS=
064416,000156: 17,3314 74750 MP BIT4 # SHIFT RIGHT ELEVEN BITS, IF THE A-REG IS
064417,000157: 17,3315 00006 EXTEND # ZERO, THEN RESCALE AND USE FINELAW.
064418,000158: 17,3316 13320 BZF SCALEDOT
064419,000159: 17,3317 13672 TCF RUFLAW3
064420,000160:
064421,000161: # *** FINELAW STARTS HERE ***
064422,000162:
064423,000163: 17,3320 23427 SCALEDOT LXCH EDOT # EDOT IS SCALED AT PI/32 RADIANS/SECOND.
064424,000164:
064425,000165: 17,3321 31427 CAE EDOT # COMPUTE (EDOT)(EDOT)
064426,000166: 17,3322 00006 EXTEND
064427,000167: 17,3323 70000 SQUARE # PRODUCT SCALED AT PI(2)/2(10) RAD/SEC.
064428,000168: 17,3324 00006 EXTEND
064429,000169: 17,3325 74737 MP BIT13 # SHIFT RIGHT TWO BITS TO RESCALE EDOTSQ
064430,000170: 17,3326 55737 TS EDOTSQ # TO PI(2)/2(8) RAD(2)/SEC(2).
064431,000171:
064432,000172: 17,3327 11752 ERRTEST CCS E # DOES BIG ERROR (THREE DEG BEYOND THE
064433,000173: 17,3330 63725 AD -3DEG # DEADBAND) REQUIRE MAXIMUM JETS?
064434,000174: 17,3331 13333 TCF +2
064435,000175: 17,3332 63725 AD -3DEG
064436,000176: 17,3333 00006 EXTEND
064437,000177: 17,3334 51746 INDEX ADRSDIF1
064438,000178: 17,3335 61601 SU FIREDB
064439,000179: 17,3336 00006 EXTEND
064440,000180: 17,3337 63344 BZMF SENSTEST # IF NOT: ARE UNBALANCED JETS PREFERRED|
064441,000181: 17,3340 34752 MAXJETS CAF TWO # IF YES: INCREMENT ADDRESS LOCATOR AND
064442,000182: 17,3341 27744 ADS ADRSDIF2 # SET SWITCH FOR JET SELECT LOGIC TO 4.
064443,000183: 17,3342 34751 CAF FOUR # (ALWAYS DO THIS FOR P-AXIS)
064444,000184: 17,3343 13347 TCF TJCALC
064445,000185: 17,3344 11500 SENSTEST CCS SENSETYP # DOES TRANSLATION PREFER MIN JETS.
064446,000186: 17,3345 13347 TCF TJCALC # YES. USE MIN-JET PARAMETERS.
064447,000187: 17,3346 13340 TCF MAXJETS # NO. GET MAX-JET PARAMETERS.
064448,000188: 17,3347 55743 TJCALC TS NUMBERT # SET TO +0,1,4 FOR (U,V-AXES) JET SELECT.
064449,000189:
064450,000190: # BEGINNING OF TJET CALCULATIONS:
064451,000191:
064452,000192: 17,3350 41737 CS EDOTSQ # SCALED AT PI(2)/2(8).
064453,000193: 17,3351 00006 EXTEND
064454,000194: 17,3352 51744 INDEX ADRSDIF2
064455,000195: 17,3353 71567 MP 1/ANET1 # .5/ACC SCALED AT 2(6)/PI SEC(2)/RADIAN.
064456,000196: 17,3354 51746 INDEX ADRSDIF1
064457,000197: 17,3355 61601 AD FIREDB # DEADBAND SCALED AT PI/4 RADIAN.
064458,000198: 17,3356 00006 EXTEND
064459,000199: 17,3357 61752 SU E # ATTITUDE ERROR SCALED AT PI/4 RADIAN.
064460,000200: 17,3360 55741 TS FIREFCT # -E-.5(EDOTSQ)/ACC-DB AT PI/4 RADIAN.
064461,000201: 17,3361 00006 EXTEND
064462,000202: 17,3362 63542 BZMF ZON1,2,3
064463,000203:
064464,000204: 17,3363 51746 ZONE4,5 INDEX ADRSDIF1
064465,000205: 17,3364 31573 CAE 1/ACOAST # .5/ACC SCALED AT 2(6)/PI WHERE
Page 1463 |
064467,000207: 17,3365 00006 EXTEND # ACC = MAX(AMIN, AOS-).
064468,000208: 17,3366 71737 MP EDOTSQ # SCALED AT PI/2(8).
064469,000209: 17,3367 61752 AD E # SCALED AT PI/4
064470,000210: 17,3370 51746 INDEX ADRSDIF1
064471,000211: 17,3371 61603 AD COASTDB # SCALED AT PI/4 POS. FOR NEG. INTERCEPT.
064472,000212: 17,3372 00006 EXTEND # TEST E+.5(EDOTSQ)/ACC+DB AT PI/4 RADIAN.
064473,000213: 17,3373 63426 BZMF ZONE5 # IF FUNCTION NEGATIVE, FIND TJET.
064474,000214: # IF FUNCTION POSITIVE, IN ZONE 4.
064475,000215:
064476,000216: # ZONE 4 IS THE COAST REGION. HOWEVER, IF THE JETS ARE ON AND DRIVING TOWARD
064477,000217: # A. THE AXIS WITHIN + OR - (DB + FLAT) FOR DRIFTING FLIGHT, OR
064478,000218: # B. THE USUAL TARGET PARABOLA FOR POWERED FLIGHT
064479,000219: # THEN THE THRUSTERS ARE KEPT ON.
064480,000220:
064481,000221: 17,3374 51505 ZONE4 INDEX AXISCTR # IS THE CURRENT VALUE IN TJET NON-ZERO
064482,000222: 17,3375 41525 CS TJETU # WITH SENSE OPPOSITE TO EDOT,
064483,000223: 17,3376 00006 EXTEND # (I.E., ARE JETS ON AND FIRING TOWARD
064484,000224: 17,3377 71740 MP ROTSENSE # THE DESIRABLE STATE).
064485,000225: 17,3400 00006 EXTEND
064486,000226: 17,3401 63422 BZMF COASTTJ # NO. COAST.
064487,000227:
064488,000228: 17,3402 11555 JETSON CCS FLAT # YES. IS THIS DRIFTING OR POWERED FLIGHT|
064489,000229: 17,3403 13414 TCF DRIFT/ON # DRIFTING. GO MAKE FURTHER TEST.
064490,000230:
064491,000231: 17,3404 41741 CS FIREFCT # POWERED (OR ULLAGE). CAN TARGET PARABOLA
064492,000232: 17,3405 51746 INDEX ADRSDIF1 # BE REACHED FROM THIS POINT IN THE
064493,000233: 17,3406 61605 AD AXISDIST # PHASE PLANE|
064494,000234: 17,3407 00006 EXTEND
064495,000235: 17,3410 63422 BZMF COASTTJ # NO. SET TJET = 0.
064496,000236: 17,3411 03526 TC Z123COMP # YES. CALCULATE TJET AS THOUGH IN ZONE 1
064497,000237: 17,3412 31741 CAE FIREFCT # AFTER COMPUTING THE REQUIRED
064498,000238: 17,3413 13562 TCF ZONE1 # PARAMETERS.
064499,000239:
064500,000240: 17,3414 51746 DRIFT/ON INDEX ADRSDIF1 # CAN TARGET STRIP OF AXIS BE REACHED FROM
064501,000241: 17,3415 41601 CS FIREDB # THIS POINT IN THE PHASE PLANE|
064502,000242: 17,3416 60000 DOUBLE
064503,000243: 17,3417 61741 AD FIREFCT
064504,000244: 17,3420 00006 EXTEND
064505,000245: 17,3421 63424 BZMF +3
064506,000246: 17,3422 34755 COASTTJ CAF ZERO # NO. SET TJET = 0.
064507,000247: 17,3423 13466 TCF RETURNTJ
064508,000248:
064509,000249: 17,3424 03526 TC Z123COMP # YES. CALCULATE TJET AS THOUGH IN ZONE 2
064510,000250: 17,3425 13547 TCF ZONE2,3 # OR 3 AFTER COMPUTING REQUIRED VALUES.
064511,000251:
064512,000252: 17,3426 54001 ZONE5 TS L # TEMPORARILY STORE FUNCTION IN L.
064513,000253: 17,3427 11740 CCS ROTSENSE # MODIFY ADRSDIF2 FOR ACCESSING 1/ANET2
064514,000254: 17,3430 13434 TCF +4 # AND ACCFCTZ5, WHICH MUST BE PICKED UP
064515,000255: 17,3431 05705 TC CCSHOLE # FROM THE NEXT LOWER REGISTER IF THE
064516,000256: 17,3432 44752 CS TWO # (ACTUAL) ERROR RATE IS NEGATIVE.
Page 1464 |
064518,000258: 17,3433 27744 ADS ADRSDIF2
064519,000259:
064520,000260: 17,3434 30001 +4 CAE L
064521,000261: 17,3435 00006 EXTEND
064522,000262: 17,3436 51744 INDEX ADRSDIF2 # TTOAXIS AND HH ARE THE PARAMETERS UPON
064523,000263: 17,3437 71576 MP ACCFCTZ5 # WHICH THE APPROXIMATIONS TO TJET ARE
064524,000264: 17,3440 20001 DDOUBL # BASED.
064525,000265: 17,3441 20001 DDOUBL
064526,000266: 17,3442 53750 DXCH HH # DOUBLE PRECISION H SCALED AT 8 SEC(2).
064527,000267: 17,3443 51744 INDEX ADRSDIF2
064528,000268: 17,3444 31570 CAE 1/ANET2 # SCALED AT 2(7)/PI SEC(2)/RAD.
064529,000269: 17,3445 00006 EXTEND
064530,000270: 17,3446 71427 MP EDOT # SCALED AT PI/2(5)
064531,000271: 17,3447 55742 TS TTOAXIS # SCALED AT 4 SEC.
064532,000272:
064533,000273: # TEST WHETHER TJET GREATER THAN 50 MSEC.
064534,000274:
064535,000275: 17,3450 00006 EXTEND
064536,000276: 17,3451 73734 MP -.05AT2 # H - .05 TTOAXIS - .00125 G.T. ZERO
064537,000277: 17,3452 61747 AD HH # (SCALED AT 8 SEC(2) ).
064538,000278: 17,3453 67746 AD NEG2
064539,000279: 17,3454 00006 EXTEND
064540,000280: 17,3455 63503 BZMF FORMULA1
064541,000281:
064542,000282: # TEST WHETHER TJET GREATER THAN 150 MSEC.
064543,000283:
064544,000284: 17,3456 31742 CAE TTOAXIS
064545,000285: 17,3457 00006 EXTEND
064546,000286: 17,3460 73735 MP -.15AT2 # H - .15 TTOAXIS - .01125 G.T. ZERO
064547,000287: 17,3461 61747 AD HH # (SCALED AT 8 SEC(2) )
064548,000288: 17,3462 63726 AD -.0112A8
064549,000289: 17,3463 00006 EXTEND
064550,000290: 17,3464 63513 BZMF FORMULA2
064551,000291:
064552,000292: # IF TJET GREATER THAN 150 MSEC, ASSIGN IT VALUE OF 250 MSEC, SINCE THIS
064553,000293: # IS ENOUGH TO ASSURE NO SKIP NEXT CSP (100 MSEC).
064554,000294:
064555,000295: 17,3465 34741 FULLTIME CAF BIT11 # 250 MSEC SCALED AT 4 SEC.
064556,000296:
064557,000297: # RETURN TO CALLING PROGRAM WITH JET TIME SCALED AS TIME6 AND SIGNED.
064558,000298:
064559,000299: 17,3466 00006 RETURNTJ EXTEND # ALL BRANCHES TERMINATE HERE WITH TJET
064560,000300: 17,3467 71740 MP ROTSENSE # (SCALED AT 4 SEC) IN THE ACCUMULATOR.
064561,000301: 17,3470 51505 INDEX AXISCTR # ROTSENSE APPLIES SIGN AND CHANGES SCALE.
064562,000302: 17,3471 55525 TS TJETU
064563,000303: 17,3472 00006 EXTEND
064564,000304: 17,3473 51505 INDEX AXISCTR
064565,000305: 17,3474 71547 MP ACCSWU # SET SWITCH FOR JET SELECT IF ROTATION IS
064566,000306: 17,3475 30001 CAE L
064567,000307: 17,3476 00006 EXTEND # IN A SENSE FOR WHICH 1/ACCS HAS FORCED
064568,000308: 17,3477 63502 BZMF +3 # A MAX-JET CALCULATION.
064569,000309: 17,3500 34751 CAF FOUR
Page 1465 |
064571,000311: 17,3501 55743 TS NUMBERT
064572,000312: 17,3502 01745 TC HOLDQ # RETURN VIA SAVED Q.
064573,000313:
064574,000314: # TJET = H/(.025 + TTOAXIS) FOR TJET LESS THAN 50 MSEC.
064575,000315:
064576,000316: 17,3503 43733 FORMULA1 CS -.025AT4 # .025 SEC SCALED AT 4.
064577,000317: 17,3504 61742 AD TTOAXIS # SCALED AT 4 SECONDS.
064578,000318: 17,3505 53750 DXCH HH # STORE DENOMINATOR IN FIRST WORD OF H,
064579,000319: 17,3506 00006 EXTEND # WHICH NEED NOT BE PRESERVED. PICK UP
064580,000320: 17,3507 11747 DV HH # DP H AND DIVIDE BY DENOMINATOR.
064581,000321: 17,3510 00006 EXTEND
064582,000322: 17,3511 74736 MP BIT14 # RESCALE TJET FROM 2 TO USUAL 4 SEC.
064583,000323: 17,3512 13623 TCF CHKMINTJ # CHECK THAT TJET IS NOT LESS THAN MINIMUM
064584,000324:
064585,000325: # TJET = (H + .00375)/(0.1 + TTOAXIS) FOR TJET GREATER THAN 50 MSEC.
064586,000326:
064587,000327: 17,3513 00006 FORMULA2 EXTEND
064588,000328: 17,3514 33737 DCA .00375A8 # .00375 SEC(2) SCALED AT 8.
064589,000329: 17,3515 21750 DAS HH # STORE NUMERATOR IN DP H, WHICH NEED NOT
064590,000330: # BE PRESERVED.
064591,000331: 17,3516 31742 CAE TTOAXIS # SCALED AT 4 SEC.
064592,000332: 17,3517 63727 AD .1AT4 # 0.1 SEC SCALED AT 4.
064593,000333: 17,3520 53750 DXCH HH # STORE DENOMINATOR IN FIRST WORD OF H,
064594,000334: 17,3521 00006 EXTEND # WHICH NEED NOT BE PRESERVED. PICK UP
064595,000335: 17,3522 11747 DV HH # DP NUMERATOR AND DIVIDE BY DENOMINATOR
064596,000336: 17,3523 00006 EXTEND
064597,000337: 17,3524 74736 MP BIT14 # RESCALE TJET FROM 2 TO USUAL 4 SEC.
064598,000338: 17,3525 13466 TCF RETURNTJ # END SUBROUTINE.
064599,000339:
064600,000340: # SUBROUTINIZED COMPUTATIONS REQUIRED FOR ALL ENTRIES INTO CODING FOR ZONES 1, 2, AND 3.
064601,000341: # REACHED BY TC FROM 3 POINTS IN TJETLAW.
064602,000342:
064603,000343: 17,3526 41740 Z123COMP CS ROTSENSE # USED IN RETURNTJ SECTION TO RESCALE TJET
064604,000344: 17,3527 55740 TS ROTSENSE # AS TIME6 AND GIVE IT PROPER SIGN.
064605,000345: 17,3530 31427 CAE EDOT # SCALED AT PI/2(5) RAD/SEC.
064606,000346: 17,3531 00006 EXTEND
064607,000347: 17,3532 51744 INDEX ADRSDIF2
064608,000348: 17,3533 71567 MP 1/ANET1 # SCALED AT 2(7)/PI SEC(2)/RAD.
064609,000349: 17,3534 55742 TS TTOAXIS # STORE TIME-TO-AXIS SCALED AT 4 SECONDS.
064610,000350: 17,3535 63740 AD -TJMAX
064611,000351: 17,3536 00006 EXTEND # IS TIME TO AXIS LESS THAN 150 MSEC.
064612,000352: 17,3537 63541 BZMF +2
064613,000353: 17,3540 13465 TCF FULLTIME # NO. FIRE JETS, DO NOT CALCULATE TJET.
064614,000354: 17,3541 00002 RETURN # YES. GO ON TO FIND TJET
064615,000355:
064616,000356: 17,3542 03526 ZON1,2,3 TC Z123COMP # SUBROUTINIZED PREPARATION FOR ZONE1,2,3.
064617,000357:
064618,000358: # IF THE (NEG) DISTANCE BEYOND PARABOLA IS LESS THAN FLAT, USE SPECIAL
064619,000359: # LOGIC TO ACQUIRE MINIMUM IMPULSE LIMIT CYCLE. DURING POWERED FLIGHT
Page 1466 |
064621,000361: # OR ULLAGE, FLAT = 0
064622,000362:
064623,000363: 17,3543 31741 CAE FIREFCT # SCALED AT PI/4 RAD.
064624,000364: 17,3544 61555 AD FLAT
064625,000365: 17,3545 00006 EXTEND
064626,000366: 17,3546 63562 BZMF ZONE1 # NOT IN SPECIAL ZONES.
064627,000367:
064628,000368: # FIRE FOR AXIS OR, IF CLOSE, FIRE MINIMUM IMPULSE. IF ON AXIS, COAST.
064629,000369:
064630,000370: 17,3547 41556 ZONE2,3 CS ZONE3LIM # HEIGHT OF MIN-IMPULSE ZONE SET BY 1/ACCS
064631,000371: 17,3550 61742 AD TTOAXIS # 35 MSEC IN DRIFTING FLIGHT
064632,000372: 17,3551 00006 EXTEND # ZERO WHEN TRYING TO ENTER GTS CONTROL.
064633,000373: 17,3552 63555 BZMF ZONE3
064634,000374: 17,3553 31742 ZONE2 CAE TTOAXIS # FIRE TO AXIS.
064635,000375: 17,3554 13466 TCF RETURNTJ
064636,000376: 17,3555 11427 ZONE3 CCS EDOT # CHECK IF EDOT IS ZERO.
064637,000377: 17,3556 34746 CAF BIT6 # FIRE A ONE-JET MINIMUM IMPULSE.
064638,000378: 17,3557 13466 TCF RETURNTJ # TJET = +0.
064639,000379: 17,3560 05705 TC CCSHOLE # CANNOT BE BECAUSE NEG EDOT COMPLEMENTED.
064640,000380: 17,3561 13466 TCF RETURNTJ # TJET = +0.
064641,000381:
064642,000382: 17,3562 00006 ZONE1 EXTEND
064643,000383: 17,3563 51746 INDEX ADRSDIF1
064644,000384: 17,3564 61605 SU AXISDIST # SCALED AT PI/4 RAD.
064645,000385: 17,3565 00006 EXTEND
064646,000386: 17,3566 51744 INDEX ADRSDIF2
064647,000387: 17,3567 71575 MP ACCFCTZ1 # SCALED AT 2(7)/PI SEC(2)/RAD.
064648,000388: 17,3570 20001 DDOUBL
064649,000389: 17,3571 20001 DDOUBL
064650,000390: 17,3572 53750 DXCH HH # DOUBLE PRECISION H SCALED AT 8 SEC(2).
064651,000391:
064652,000392: # TEST WHETHER TOTAL TIME REQUIRED GREATER THAN 150 MSEC:
064653,000393: # 2 2
064654,000394: # IS .5(.150 - TTOAXIS) - H NEGATIVE (SCALED AT 8 SECONDS )
064655,000395:
064656,000396: 17,3573 31742 CAE TTOAXIS # TTOAXIS SCALED AT 4 SECONDS.
064657,000397: 17,3574 63740 AD -TJMAX # -.150 SECOND SCALED AT 4.
064658,000398: 17,3575 00006 EXTEND
064659,000399: 17,3576 70000 SQUARE
064660,000400: 17,3577 00006 EXTEND
064661,000401: 17,3600 61747 SU HH # HIGH WORD OF H SCALED AT 8 SEC(2).
064662,000402: 17,3601 00006 EXTEND
064663,000403: 17,3602 63465 BZMF FULLTIME # YES. NEED NOT CALCULATE TJET.
064664,000404:
064665,000405: # TEST WHETHER TIME BEYOND AXIS GREATER THAN 50 MSEC TO DETERMINE WHICH APPROXIMATION TO USE.
064666,000406:
064667,000407: 17,3603 31747 CAE HH
064668,000408: 17,3604 67746 AD NEG2
064669,000409: 17,3605 00006 EXTEND
064670,000410: 17,3606 63616 BZMF FORMULA3
064671,000411:
Page 1467 |
064673,000413: # TJET = H/0.1 + TTOAXIS + .0375 FOR APPROXIMATION OVER MORE THAN 50 MSEC.
064674,000414:
064675,000415: 17,3607 33730 CAF .1AT2 # STORE .1 SEC SCALED AT 2 FOR DIVISION.
064676,000416: 17,3610 53750 DXCH HH # DP H SCALED AT 8 SEC(2) NEED NOT BE
064677,000417: 17,3611 00006 EXTEND # PRESERVED.
064678,000418: 17,3612 11747 DV HH # QUOTIENT SCALED AT 4 SECONDS.
064679,000419: 17,3613 61742 AD TTOAXIS # SCALED AT 4 SEC.
064680,000420: 17,3614 63731 AD .0375AT4 # .0375 SEC SCALED AT 4.
064681,000421: 17,3615 13466 TCF RETURNTJ # END COMPUTATION.
064682,000422:
064683,000423: # TJET = H/.O25 + TTOAXIS FOR APPROXIMATION OVER LESS THAN 50 MSEC.
064684,000424:
064685,000425: 17,3616 43732 FORMULA3 CS -.025AT2 # STORE +.025 SEC SCALED AT 2 FOR DIVISION
064686,000426: 17,3617 53750 DXCH HH # PICK UP DP H AT 8, WHICH NEED NOT BE
064687,000427: 17,3620 00006 EXTEND # PRESERVED.
064688,000428: 17,3621 11747 DV HH # QUOTIENT SCALED AT 4 SECONDS.
064689,000429: 17,3622 61742 AD TTOAXIS # SCALED AT 4 SEC.
064690,000430:
064691,000431: # IF COMPUTED JET TIME IS LESS THAN TJMIN, TJET IS SET TO ZERO.
064692,000432: # MINIMUM IMPULSES REQUIRED IN ZONE 3 ARE NOT SUBJECT TO THIS CONSTRAINT, NATURALLY.
064693,000433:
064694,000434: 17,3623 63742 CHKMINTJ AD -TJMIN # IS COMPUTED TIME LESS THAN THE MINIMUM.
064695,000435: 17,3624 00006 EXTEND
064696,000436: 17,3625 63422 BZMF COASTTJ # YES, SET TIME TO ZERO.
064697,000437: 17,3626 63741 AD TJMIN # NO, RESTORE COMPUTED TIME.
064698,000438: 17,3627 13466 TCF RETURNTJ # END COMPUTATION.
064699,000439:
Page 1468 |
064701,000441: # *** ROUGHLAW ***
064702,000442:
064703,000443: # BEFORE ENTRY TO RUFLAW:
064704,000444: # 1. INDEXERS ADRSDIF1 AND ADRSDIF2 ARE SET ON BASIS OF AXIS, AND SIGN OF EDOT.
064705,000445: # 2. IF EDOT WAS NEGATIVE, E AND EDOT ARE ROTATED INTO UPPER HALF-PLANE AND ROTSENSE IS MADE NEGATIVE.
064706,000446: # 3. E IS SCALED AT PI RADIANS AND EDOT AT PI/4 RAD/SEC.
064707,000447: # (EXCEPT THE RUFLAW3 ENTRY WHEN E IS AT PI/4)
064708,000448:
064709,000449: # RUFLAW1: ERROR MORE NEGATIVE THAN PI/16 RAD. FIRE TO A RATE OF 6.5 DEG/SEC (IF JET TIME EXCEEDS 20 MSEC.).
064710,000450: # RUFLAW2: ERROR MORE POSITIVE THAN PI/16 RAD. FIRE TO AN OPPOSING RATE OF 6.5 DEG/SEC.
064711,000451: # RUFLAW3: ERROR RATE GREATER THAN PI/32 RAD/SEC AND ERROR WITHIN BOUNDS. COAST IF BELOW FIREFCT, FIRE IF ABOVE
064712,000452:
064713,000453: 17,3630 43743 RUFLAW1 CS RUFRATE # DECREMENT EDOT BY .1444 RAD/SEC AT PI/4
064714,000454: 17,3631 27427 ADS EDOT # WHICH IS THE TARGET RATE
064715,000455: 17,3632 00006 EXTEND
064716,000456: 17,3633 63654 BZMF SMALRATE # BRANCH IF RATE LESS THAN TARGET.
064717,000457: 17,3634 03712 TC RUFSETUP # REVERSE ROTSENSE AND INDICATE MAX JETS.
064718,000458: 17,3635 31427 CAE EDOT # PICK UP DESIRED RATE CHANGE.
064719,000459:
064720,000460: 17,3636 00006 RUFLAW12 EXTEND # COMPUTE TJET
064721,000461: 17,3637 51744 INDEX ADRSDIF2 # = (DESIRED RATE CHANGE)/(2-JET ACCEL.)
064722,000462: 17,3640 71571 MP 1/ANET1 +2
064723,000463: 17,3641 67741 AD -1/8 # IF TJET, SCALED AT 32 SEC, EXCEEDS
064724,000464: 17,3642 00006 EXTEND # 4 SECONDS, SET TJET TO TJMAX.
064725,000465: 17,3643 63645 BZMF +2
064726,000466: 17,3644 13465 TCF FULLTIME
064727,000467: 17,3645 00006 EXTEND
064728,000468: 17,3646 13465 BZF FULLTIME
064729,000469: 17,3647 64740 AD BIT12 # RESTORE COMPUTED TJET TO ACCUMULATOR.
064730,000470: 17,3650 20001 DAS A
064731,000471: 17,3651 20001 DAS A
064732,000472: 17,3652 20001 DAS A # RESCALED TJET AT 4 SECONDS.
064733,000473: 17,3653 13623 TCF CHKMINTJ # RETURN AS FROM FINELAW.
064734,000474:
064735,000475: 17,3654 03714 SMALRATE TC RUFSETUP +2 # SET NUMBERT AND FIREFCT FOR MAXIMUM JETS
064736,000476: 17,3655 11740 CCS ROTSENSE
064737,000477: 17,3656 34753 CAF ONE # MODIFY INDEXER TO POINT TO 1/ANET
064738,000478: 17,3657 13661 TCF +2 # CORRESPONDING TO THE PROPER SENSE.
064739,000479: 17,3660 37747 CAF NEGONE
064740,000480: 17,3661 27744 ADS ADRSDIF2
064741,000481:
064742,000482: 17,3662 41427 CS EDOT # (.144 AT PI/4 - EDOT) = DESIRED RATE CHNG.
064743,000483: 17,3663 13636 TCF RUFLAW12
064744,000484:
064745,000485: 17,3664 03712 RUFLAW2 TC RUFSETUP # REVERSE ROTSENSE AND INDICATE MAX JETS.
064746,000486: 17,3665 33743 CAF RUFRATE
064747,000487: 17,3666 61427 AD EDOT # (.144 AT PI/4 + EDOT) = DESIRED RATE CHNG.
064748,000488: 17,3667 54000 TS A # IF OVERFLOW SKIP, FIRE FOR FULL TIME.
064749,000489: 17,3670 13636 TCF RUFLAW12 # OTHERWISE, COMPUTE JET TIME.
064750,000490: 17,3671 13465 TCF FULLTIME
064751,000491:
Page 1469 |
064753,000493: 17,3672 03712 RUFLAW3 TC RUFSETUP # EXECUTE COMMON RUFLAW SUBROUTINE.
064754,000494: 17,3673 51746 INDEX ADRSDIF1
064755,000495: 17,3674 41601 CS FIREDB # CALCULATE DISTANCE FROM SWITCH CURVE
064756,000496: 17,3675 61752 AD E # 1/ANET1*EDOT*EDOT +E - FIREDB = 0
064757,000497: 17,3676 00006 EXTEND # SCALED AT 4 PI RADIANS
064758,000498: 17,3677 74741 MP BIT11
064759,000499: 17,3700 57427 XCH EDOT
064760,000500: 17,3701 00006 EXTEND
064761,000501: 17,3702 70000 SQUARE
064762,000502: 17,3703 00006 EXTEND
064763,000503: 17,3704 51746 INDEX ADRSDIF1
064764,000504: 17,3705 71571 MP 1/ANET1 +2
064765,000505: 17,3706 61427 AD EDOT
064766,000506: 17,3707 00006 EXTEND
064767,000507: 17,3710 63422 BZMF COASTTJ # COAST IF BELOW IT.
064768,000508: 17,3711 13465 TCF FULLTIME # FIRE FOR FULL PERIOD IF ABOVE IT.
064769,000509:
064770,000510: # SUBROUTINE USED IN ALL ENTRIES TO ROUGHLAW.
064771,000511:
064772,000512: 17,3712 41740 RUFSETUP CS ROTSENSE # REVERSE ROTSENSE WHEN ENTER HERE.
064773,000513: 17,3713 55740 TS ROTSENSE
064774,000514: 17,3714 34751 +2 CAF FOUR # REQUIRE MAXIMUM (2) JETS IN U,V-AXES.
064775,000515: 17,3715 55743 TS NUMBERT
064776,000516: 17,3716 34735 CAF NEGMAX # SUGGEST MAXIMUM (4) JETS IN P-AXIS.
064777,000517: 17,3717 55741 TS FIREFCT
064778,000518: 17,3720 00002 TC Q
064779,000519:
064780,000520: # CONSTANTS FOR TJETLAW
064781,000521:
064782,000522: 17,3721 77757 DEC -16 B-14 # AXISDIFF(INDEX) = NUMBER OF REGISTERS
064783,000523: 17,3722 00000 AXISDIFF DEC +0 B-14 # BETWEEN STORED 1/ACCS PARAMETERS FOR
064784,000524: 17,3723 00020 DEC 16 B-14 # THE INDEXED AXIS AND THE U-AXIS.
064785,000525: 17,3724 14400 SENSOR OCT 14400 # RATIO OF TJET SCALING WITHIN TJETLAW
064786,000526: # (4 SEC) TO SCALING FOR T6 (10.24 SEC).
064787,000527: 17,3725 75673 -3DEG DEC -.06667 # -3.0 DEGREES SCALED AT 45.
064788,000528: 17,3726 77750 -.0112A8 DEC -.00141 # -.01125 SEC(2) SCALED AT 8.
064789,000529: 17,3727 00632 .1AT4 DEC .025 # 0.1 SECOND SCALED AT 4.
064790,000530: 17,3730 01463 .1AT2 DEC .05 # 0.1 SEC SCALED AT 2.
064791,000531: 17,3731 00232 .0375AT4 DEC .00938 # .0375 SEC SCALED AT 4.
064792,000532: 17,3732 77462 -.025AT2 DEC -.0125 # -.025 SEC SCALED AT 2.
064793,000533: 17,3733 77631 -.025AT4 DEC -.00625
064794,000534: 17,3734 77145 -.05AT2 DEC -.025
064795,000535: 17,3735 75462 -.15AT2 DEC -.075
064796,000536: 17,3736 00007 25605 .00375A8 2DEC .00375 B-3
064797,000537:
064798,000538: 17,3740 76631 -TJMAX DEC -.0375 # LARGEST CALCULATED TIME. .150 SEC AT 4.
064799,000539: 17,3741 00122 TJMIN DEC .005 # SMALLEST ALLOWABLE TIME. .020 SEC AT 4.
064800,000540: 17,3742 77655 -TJMIN DEC -.005
064801,000541: 17,3743 04476 RUFRATE DEC .1444 # CORRESPONDS TO TARGET RATE OF 6.5 DEG/S.
End of include-file TJET_LAW.agc. Parent file is MAIN.agc