Source Code
These source-code files were transcribed from scans made from Don Eyles's personal
copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston
facility, and the scanning was sponsored by Mike Stewart. The code was transcribed
from these scans by a team of volunteers who are referenced in the program
comments. Comments from the original source code are in ALL-CAPS, whereas
comments added later in transcription are in Mixed-Case. In some cases, where
similar code blocks exist in previously-transcribed AGC programs (primarily
Luminary 99, from Apollo 11) those code blocks were used as a starting point and
then corrected to agree with the BURST120 scans. The full scans are available
at the Virtual AGC
project's collection at archive.org, while more-convenient reduced-size (but reduced-quality)
images are available at
the main Virtual AGC website. Report any errors noted by creating an
issue report at the Virtual AGC
project's GitHub repository. Notations on the program listing read, in part:YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 BY NASA 2021106-031 DEC 7, 1967 THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.Note that the date is the date of the printout, not the date of the program revision. |
039820,000002: ## Copyright: Public domain.
039821,000003: ## Filename: LAMB.agc
039822,000004: ## Purpose: A module for revision 0 of BURST120 (Sunburst). It
039823,000005: ## is part of the source code for the Lunar Module's
039824,000006: ## (LM) Apollo Guidance Computer (AGC) for Apollo 5.
039825,000007: ## Assembler: yaYUL
039826,000008: ## Contact: Ron Burkey <info@sandroid.org>.
039827,000009: ## Website: www.ibiblio.org/apollo/index.html
039828,000010: ## Mod history: 2016-09-30 RSB Created draft version.
039829,000011: ## 2016-10-19 RSB Transcribed from scratch. Ouch!
039830,000012: ## 2016-10-31 RSB Typos.
039831,000013: ## 2016-11-01 RSB A line reading "OCT B0", which is not supported by yaYUL,
039832,000014: ## has been replaced by "OCT 1", in lieu of modifying
039833,000015: ## yaYUL at this time. An appropriate program comment was
039834,000016: ## also added at this point in the code. Plus, more typos.
039835,000017: ## 2016-12-06 RSB Comments proofed using octopus/ProoferComments,
039836,000018: ## changes made.
039837,000019: ## 2017-06-10 MAS Corrected typos and a missing comment found while
039838,000020: ## updating for Sunburst 37.
039839,000021:
039840,000022:
039841,000023:
Page 926 |
039843,000025: 36,2625 BANK 36
039844,000026: 36,2625 E3,1663 EBANK= SCAXIS
039845,000027:
039846,000028: # PROGRAM NAME ... LAMBERT ROUTINE DATE ... 11/29/66
039847,000029:
039848,000030: # MOD NO ... 3 LOG SECTION ...LAMB
039849,000031: # ASSEMBLY ... SUNBURST REVISION 03
039850,000032:
039851,000033: # MODIFICATION BY ... J.J. BESTER AND L.G. HULL
039852,000034: # FUNCTIONAL DESCRIPTION ...
039853,000035:
039854,000036: # THIS SUBROUTINE SOLVES FOR THE CONIC TRAJECTORY BETWEEN R0VEC AND R1VEC WHICH SATISFIES A SPECIFIED TIME
039855,000037: # OF FLIGHT, TFL. A SLOPE ITERATOR IS USED TO FORCE THE TIME OF FLIGHT TO CONVERGE.
039856,000038:
039857,000039:
039858,000040:
039859,000041: # CALLING SEQUENCE:
039860,000042:
039861,000043: # THIS ROUTINE IS CALLED IN THE INTERPRETIVE MODE BY
039862,000044: # CALL
039863,000045: # LAMBERT
039864,000046:
039865,000047:
039866,000048:
039867,000049: # NORMAL EXIT MODE:
039868,000050:
039869,000051: # EXIT FROM THIS ROUTINE IS IN BASIC BY
039870,000052: # TCF ENDOFJOB
039871,000053:
039872,000054:
039873,000055:
039874,000056: # OUTPUT:
039875,000057:
039876,000058: # THE OUTPUT OF THIS ROUTINE (WITH SCALING INDICATED IN PARENTHESES) CONSISTS OF ...
039877,000059:
039878,000060: # V0VEC (+7) -THE REQUIRED VELOCITY VECTOR IN METERS/CENTISECONDS
039879,000061:
039880,000062: # DONESW -THE DONE SWITCH INDICATING WHETHER THE JOB HAS BEEN COMPLETED. WHEN THE JOB IS DONE IT
039881,000063: # IS TURNED ON.
039882,000064:
039883,000065: # CONVSW - THE CONVERGENCE SWITCH INDICATING WHETHER THE ITERATION PROCESS HAS CONVERGED. IT IS TURNED
039884,000066: # ON IF CONVERGENCE HAS NOT OCCURRED, BUT AN ESTIMATE OF V0VEC IS NEVERTHELESS GIVEN.
039885,000067:
039886,000068:
039887,000069:
039888,000070: # INPUT:
039889,000071:
039890,000072: # THE QUANTITIES INPUTED AND THEIR SCALE FACTORS ARE ...
Page 927 |
039892,000074: # RCOV (+25) -INITIAL POSITION IN METERS.
039893,000075: # R1VEC (+25) -THE TARGET POSITION IN METERS.
039894,000076:
039895,000077: # TFL (+28) -TIME OF FLIGHT IN CENTISECONDS.
039896,000078:
039897,000079: # UNNORM (+1) -A UNIT VECTOR IN THE DIRECTION OF THE ANGULAR MOMENTUM VECTOR.
039898,000080:
039899,000081: # TAG5 -A PARAMETER SET TO -0.5 IF THE TRUE ANOMALY DIFFERENCE BETWEEN R0VEC AND R1VEC IS MORE THAN
039900,000082: # 180 DEGREES. OTHERWISE IT SHOULD BE SET TO +0.5.
039901,000083:
039902,000084: # GUESSW -THE GUESS SWITCH, IF A FIRST GUESS TO THE COTANGENT OF THE FLIGHT PATH ANGLE IS AVAILABLE THE
039903,000085: # SWITCH SHOULD BE SET , CLEAR IF NO GUESS IS FORTHCOMING.
039904,000086:
039905,000087: # COGAVAIL (+5) -THE AVAILABLE COTANGENT OF THE FLIGHT PATH ANGLE. IF A GUESS IS AVAILABLE THE GUESSW SHOULD BE
039906,000088: # SET AND THE GUESS PLACED HERE BEFORE THE LAMBERT ROUTINE IS ENTERED. AFTER ONE PASS THROUGH
039907,000089: # LAMBERT, THE LAST ITERATED VALUE OF THE COTANGENT IS PLACED IN COGAVAIL AND MAY BE USED AS THE
039908,000090: # GUESS FOR THE NEXT PASS.
039909,000091:
039910,000092:
039911,000093:
039912,000094: # THE FOLLOWING SWITCHES ARE IN THIS ROUTINE , THOUGH THEY ARE NOT USED FOR THIS PARTICULAR MISSION AND ARE
039913,000095: # ALWAYS CLEAR IN 206.
039914,000096:
039915,000097: # MOONSW - THE MOON SWITCH: 1-INSIDE THE SPHERE OF INFLUENCE OF THE MOON (35,000 N.MI.)
039916,000098: # 0-OUTSIDE
039917,000099:
039918,000100: # ESCPSW -THE ESCAPE SWITCH: 1-HYPERBOLIC ORBIT
039919,000101: # 0-ELLIPTIC ORBIT
039920,000102:
039921,000103: # SMANGLSW -SMALL ANGLE SWITCH: 1-SMALL TRANSFER ANGLES
039922,000104: # 0-LARGE ANGLES (THE USUAL CASE)
039923,000105:
039924,000106: # TWO SWITCHES ARE USED INTERNALLY. THEY ARE ...
039925,000107:
039926,000108: # ITERSW -THE ITERATION SWITCH: 1-FIRST ITERATION IS TO TAKE PLACE
039927,000109: # 0-SUBSEQUENT ITERATIONS
039928,000110:
039929,000111: # PIESW -THE 180 DEGREES SWITCH: 1-ANGLES GREATER THAN 180 DEGREES WITH TAG5=-0.5
039930,000112: # 0-ANGLES LESS THAN 180, TAG5=0.5
039931,000113:
039932,000114:
039933,000115:
039934,000116: # DEBRIS ...
039935,000117:
039936,000118: # THE LAMBERT ROUTINE INTERNALLY USES SCALING WHICH IS DIFFERENT FROM THAT USED BY THE MAIN PROGRAM.
039937,000119: # INTERNAL TO LAMBERT,
039938,000120: # 7
039939,000121: # LENGTH IS SCALED BY RNORM = 2 RE
039940,000122:
039941,000123: # VELOCITY IS SCALED BY VNORM = 2 SQRT(MU/RE)
Page 928 |
039943,000125: # 10 3
039944,000126: # TIME IS SCALED BY TNORM = 2 SQRT(RE /MU)
039945,000127: # WHERE MU IS THE GRAVITATIONAL CONSTANT TIMES THE MASS OF THE EARTH AND RE IS THE RADIUS OF THE EARTH.
039946,000128: # 22
039947,000129: # FOR RE, 2 METERS IS USED. HOWEVER, INPUT AND OUTPUT QUANTITIES HAVE SCALING COMPATIBLE WITH THE REST OF THE
039948,000130: # PROGRAM. RESCALING WILL BE DONE BY THE LAMBERT ROUTINE BEFORE COMPUTATIONS BEGIN.
039949,000131:
Page 929 |
039951,000133: 36,2625 40214 LAMBERT SET SETPD
039952,000134: 36,2626 02062 ITERSW
039953,000135: 36,2627 00001 0D
039954,000136: 36,2630 43014 CLEAR CLEAR
039955,000137: 36,2631 02265 MOONSW
039956,000138: 36,2632 02261 DONESW
039957,000139: 36,2633 43014 CLEAR CLEAR
039958,000140: 36,2634 02265 SMANGLSW
039959,000141: 36,2635 02264 PIESW
039960,000142: 36,2636 51145 DLOAD BPL
039961,000143: 36,2637 03622 TAG5
039962,000144: 36,2640 74643 +3
039963,000145: 36,2641 77614 SET
039964,000146: 36,2642 02064 PIESW
039965,000147: 36,2643 77614 BON
039966,000148: 36,2644 02303 GUESSW
039967,000149: 36,2645 74653 +6
039968,000150: 36,2646 77745 DLOAD
039969,000151: 36,2647 35644 D1/4
039970,000152: 36,2650 01725 STORE TWEEKIT
039971,000153: 36,2651 77650 GOTO
039972,000154: 36,2652 74656 PROG
039973,000155: 36,2653 77745 DLOAD
039974,000156: 36,2654 35640 D1/64
039975,000157: 36,2655 01725 STORE TWEEKIT
039976,000158: 36,2656 41345 PROG DLOAD DMP
039977,000159: 36,2657 02143 TFL
039978,000160: 36,2660 35670 TFACT
039979,000161: 36,2661 77652 SL3 # RESCALE TIME OF FLIGHT
039980,000162: 36,2662 25672 STOVL TF
039981,000163: 36,2663 03614 RCOTEMPV
039982,000164: 36,2664 77702 VSR4
039983,000165: 36,2665 35707 STCALL R0VEC
039984,000166: 36,2666 75112 DTPRD
039985,000167: 36,2667 77624 CALL
039986,000168: 36,2670 75133 CGTH
039987,000169: 36,2671 60345 DLOAD NORM
039988,000170: 36,2672 00045 36D
039989,000171: 36,2673 00047 X1
039990,000172: 36,2674 53665 BDDV SL*
039991,000173: 36,2675 00041 32D
039992,000174: 36,2676 20172 0 -7,1
039993,000175: 36,2677 14037 STODL 30D # 30D=R (+7)
039994,000176:
039995,000177: 36,2700 35646 D1/2
039996,000178: 36,2701 70425 DSU SR1
039997,000179: 36,2702 00035 28D
039998,000180: 36,2703 00025 STORE 20D # 20D=1-CSTH (+2) (FOR PCALC IN LOOP)
039999,000181:
040000,000182: 36,2704 65301 NORM PDDL # 1-CSTH (+2-N1) PL AT 2D
Page 930 |
040002,000184: 36,2705 00047 X1
040003,000185: 36,2706 00037 30D
040004,000186: 36,2707 77671 DDV # PL AT 0D
040005,000187: 36,2710 75457 SL* SQRT
040006,000188: 36,2711 20175 0 -4,1
040007,000189: 36,2712 44214 BOFF BDSU
040008,000190: 36,2713 02345 ESCPSW
040009,000191: 36,2714 75061 ELIPLMTS
040010,000192: 36,2715 00021 16D
040011,000193: 36,2716 51406 PUSH ABS # PL AT 2D
040012,000194: 36,2717 44205 DMP BDSU # PL AT 0D
040013,000195: 36,2720 35656 PERCENT
040014,000196: 36,2721 77626 STADR
040015,000197: 36,2722 63744 STODL 26D # 26D=COGAMX
040016,000198:
040017,000199: 36,2723 00031 24D
040018,000200: 36,2724 77742 SR1
040019,000201: 36,2725 00023 STORE 18D # 18D=SIN(TH) (+2) (FOR PCALC IN LOOP)
040020,000202: 36,2726 65301 NORM PDDL # SIN(TH) (+1-N1) PL AT 2D
040021,000203: 36,2727 00047 X1
040022,000204: 36,2730 00035 28D
040023,000205: 36,2731 45261 SR DSU
040024,000206: 36,2732 20607 6
040025,000207: 36,2733 00037 30D
040026,000208: 36,2734 00037 STORE 30D # 30D=COS(TH)-R (+7) (FOR PCALC IN LOOP)
040027,000209:
040028,000210: 36,2735 56214 BON DDV # PL AT 0D
040029,000211: 36,2736 02304 PIESW
040030,000212: 36,2737 74750 ABSMIN
040031,000213: 36,2740 40057 SL* BOV
040032,000214: 36,2741 20201 0,1
040033,000215: 36,2742 74750 ABSMIN
040034,000216: 36,2743 51406 PUSH ABS # (CSTH-R)/SNTH (+5) PL AT 2D
040035,000217: 36,2744 43205 DMP DAD # PL AT 0D
040036,000218: 36,2745 35656 PERCENT
040037,000219: 36,2746 77650 GOTO
040038,000220: 36,2747 74753 +4
040039,000221: 36,2750 71201 ABSMIN SETPD DLOAD # PL AT 0D
040040,000222: 36,2751 00001 0D
040041,000223: 36,2752 35666 ABSOLMIN
040042,000224: 36,2753 00027 STORE 22D # 22D=COGAMN (+5)
040043,000225: 36,2754 71214 BOFF DLOAD # PL AT 2D
040044,000226: 36,2755 02343 GUESSW
040045,000227: 36,2756 75041 FIRSTCOG
040046,000228: 36,2757 01674 COGAVAIL
040047,000229: 36,2760 45214 BON DSU # IF ESCPSW IS OFF, CHECK IF COGAVAIL
040048,000230: 36,2761 02305 ESCPSW # IS LESS THAN COGAMN
040049,000231: 36,2762 74774 LOOP
040050,000232: 36,2763 00027 22D
040051,000233: 36,2764 71244 BPL DLOAD
Page 931 |
040053,000235: 36,2765 74772 +5
040054,000236: 36,2766 00027 22D # COGAVAIL IS A BAD GUESS, SO PUT
040055,000237: 36,2767 01674 STORE COGAVAIL # COGAMN IN COGAVAIL
040056,000238: 36,2770 77650 GOTO
040057,000239: 36,2771 74774 LOOP
040058,000240: 36,2772 77745 DLOAD
040059,000241: 36,2773 01674 COGAVAIL
040060,000242: 36,2774 01723 LOOP STORE INDEP
040061,000243: 36,2775 45205 DMP DSU
040062,000244: 36,2776 00023 18D
040063,000245: 36,2777 00037 30D
040064,000246: 36,3000 55301 NORM BDDV
040065,000247: 36,3001 00047 X1
040066,000248: 36,3002 00025 20D
040067,000249: 36,3003 40057 SL* BOV
040068,000250: 36,3004 20172 0 -7,1
040069,000251: 36,3005 75107 SPEEDY
040070,000252: 36,3006 34043 PSTORE STCALL 34D # 34D=P (+2)
040071,000253: 36,3007 75146 SMAR
040072,000254: 36,3010 77624 CALL
040073,000255: 36,3011 75163 TRIGFNS
040074,000256: 36,3012 77624 CALL
040075,000257: 36,3013 75346 SMA
040076,000258: 36,3014 77624 CALL
040077,000259: 36,3015 75414 DELTIME
040078,000260: 36,3016 01727 ZOOM STORE DEPVAR
040079,000261: 36,3017 77621 BDSU
040080,000262: 36,3020 01672 TF
040081,000263: 36,3021 01733 STORE DELDEP
040082,000264: 36,3022 45246 ABS DSU
040083,000265: 36,3023 35672 DEPCRIT
040084,000266: 36,3024 45040 BMN CALL
040085,000267: 36,3025 75046 TIMECONV
040086,000268: 36,3026 75513 ITERATOR
040087,000269: 36,3027 45246 ABS DSU
040088,000270: 36,3030 35650 NEARZERO
040089,000271: 36,3031 71240 BMN DLOAD
040090,000272: 36,3032 75056 NOSOL
040091,000273: 36,3033 01727 DEPVAR
040092,000274: 36,3034 15731 STODL PREVDEP
040093,000275: 36,3035 01735 DELINDEP
040094,000276: 36,3036 52015 DAD GOTO
040095,000277: 36,3037 01723 INDEP
040096,000278: 36,3040 74774 LOOP
040097,000279: 36,3041 65342 FIRSTCOG SR1 PDDL # PL AT 2D
040098,000280: 36,3042 00033 26D
040099,000281: 36,3043 43342 SR1 DAD # PL AT 0D
040100,000282: 36,3044 77650 GOTO
040101,000283: 36,3045 74774 LOOP
Page 932 |
040103,000285: 36,3046 77745 TIMECONV DLOAD
040104,000286: 36,3047 01723 INDEP
040105,000287: 36,3050 01674 STORE COGAVAIL
040106,000288: 36,3051 34023 STCALL 18D # 18D=COGA (+5)
040107,000289: 36,3052 75602 INITV
040108,000290: 36,3053 77414 SET EXIT
040109,000291: 36,3054 02061 DONESW
040110,000292: 36,3055 15567 TCF ENDOFJOB
040111,000293: 36,3056 52014 NOSOL SET GOTO
040112,000294: 36,3057 02060 CONVSW
040113,000295: 36,3060 75046 TIMECONV
040114,000296: 36,3061 43206 ELIPLMTS PUSH DAD # PL AT 2D
040115,000297: 36,3062 00021 16D
040116,000298: 36,3063 51406 PUSH ABS # PL AT 4D
040117,000299: 36,3064 44205 DMP BDSU # PL AT 2D
040118,000300: 36,3065 35656 PERCENT
040119,000301: 36,3066 77626 STADR
040120,000302: 36,3067 63744 STODL 26D # 26D=COGAMX (+5)
040121,000303: 36,3070 00035 28D
040122,000304: 36,3071 45261 SR DSU
040123,000305: 36,3072 20607 6
040124,000306: 36,3073 00037 30D
040125,000307: 36,3074 14037 STODL 30D # 30D=CSTH-R (+7)
040126,000308: 36,3075 00031 24D
040127,000309: 36,3076 77742 SR1
040128,000310: 36,3077 14023 STODL 18D
040129,000311: 36,3100 00021 16D
040130,000312: 36,3101 41425 DSU PUSH # PL AT 0D,2D
040131,000313: 36,3102 41246 ABS DMP
040132,000314: 36,3103 35656 PERCENT
040133,000315: 36,3104 77615 DAD # PL AT 0D
040134,000316: 36,3105 77650 GOTO
040135,000317: 36,3106 74753 ABSMIN +3
040136,000318: 36,3107 52145 SPEEDY DLOAD GOTO
040137,000319: 36,3110 35273 DZERO
040138,000320: 36,3111 75016 ZOOM
040139,000321: # V0VEC (+1) IN MPAC.
040140,000322:
Page 933 |
040142,000324: # THIS SECTION CALCULATES THE SINE AND COSINE OF THE ANGLE BETWEEN R0VEC
040143,000325: # AND R1VEC. THE SIGN OF SIN(TH) IS DETERMINED BY TAG5. THE COSINE OF THE
040144,000326: # ANGLE IS STORED IN 28D WHILE THE SINE IS IN MPAC AS WELL AS IN 24D, BOTH
040145,000327: # ARE SCALED BY (+2).
040146,000328:
040147,000329:
040148,000330: # ASSUMES R0VEC (+7) , R1VEC (+7) , TAG5 (+/- ACCORDING TO ANGLE GREATER
040149,000331: # OR LESS THAN 180 DEG) AVAILABLE.
040150,000332: 36,3112 53575 DTPRD VLOAD UNIT
040151,000333: 36,3113 01707 R0VEC
040152,000334: 36,3114 15701 STODL UNR1
040153,000335: 36,3115 00045 36D
040154,000336: 36,3116 24041 STOVL 32D # 32D=R1 (+7)
040155,000337: 36,3117 02365 R1VEC
040156,000338: 36,3120 77702 VSR4
040157,000339: 36,3121 41456 UNIT PUSH # 32D=R1 (+7) PL AT 6D
040158,000340: 36,3122 72441 DOT SL1
040159,000341: 36,3123 01701 UNR1
040160,000342: 36,3124 24035 STOVL 28D # 28D=COS(TH) (+1)
040161,000343: 36,3125 01701 UNR1
040162,000344: 36,3126 76435 VXV VSL1 # PL AT 0D
040163,000345: 36,3127 75246 ABVAL SIGN
040164,000346: 36,3130 03622 TAG5
040165,000347: 36,3131 00031 STORE 24D # 24D=SIN(TH) (+1)
040166,000348: 36,3132 77616 RVQ
040167,000349:
040168,000350: # 28D=COS(TH) (+1), 24D=SIN(TH) (+1)=MPAC.
040169,000351:
Page 934 |
040171,000353: # THIS SECTION COMPUTES COT(TH/2) = (1+COS(TH))/SIN(TH) SCALED BY (+5),
040172,000354: # AND STORES IT IN 16D. NOTE THAT COT(TH/2) WILL OVERFLOW IF THE ANGLE
040173,000355: # TH IS LESS THAN 3 DEG 35 MINUTES OR GREATER THAN 356 DEG 25 MINUTES.
040174,000356:
040175,000357:
040176,000358: # ASSUMES SNTH(+1) IN MPAC, 28D=CSTH (+1).
040177,000359: 36,3133 60254 CGTH BZE NORM # SNTH (+1-N1)
040178,000360: 36,3134 75144 THISPI
040179,000361: 36,3135 00047 X1
040180,000362: 36,3136 70525 PDDL SR1
040181,000363: 36,3137 00035 28D
040182,000364: 36,3140 56215 DAD DDV # PL AT 0D
040183,000365: 36,3141 35644 D1/4
040184,000366: 36,3142 77657 SL*
040185,000367: 36,3143 20175 0 -4,1
040186,000368: 36,3144 00021 THISPI STORE 16D
040187,000369: 36,3145 77616 RVQ
040188,000370:
040189,000371: # COGTH (+5)=16D.
040190,000372:
Page 935 |
040192,000374: # THIS SECTION USES COT(GAMMA),I.E. COGA (+5) AND P (+2) TO CALCULATE R1A
040193,000375: # SCALED BY (+6) AND STORES THE RESULT IN 14D.
040194,000376:
040195,000377:
040196,000378: # ASSUMES COGA=INDEP (+5), P (+2)=34D.
040197,000379: 36,3146 63545 SMAR DLOAD DSQ
040198,000380: 36,3147 01723 INDEP
040199,000381: 36,3150 60215 DAD NORM
040200,000382: 36,3151 35636 D1/1024
040201,000383: 36,3152 00047 X1
040202,000384: 36,3153 53605 DMP SR*
040203,000385: 36,3154 00043 34D
040204,000386: 36,3155 20573 0 -6,1
040205,000387: 36,3156 40021 BDSU BOV
040206,000388: 36,3157 35642 D1/32
040207,000389: 36,3160 75107 SPEEDY
040208,000390: 36,3161 00017 SMARSTOR STORE 14D # 14D=R1A (+6)
040209,000391: 36,3162 77616 RVQ
040210,000392:
040211,000393:
040212,000394: # R1A (+6)=2-P(1+COGA*COGA) IN 14D.
040213,000395:
Page 936 |
040215,000397: # ASSUMES 16D=COGTH (+5), INDEP=COGA(+5), 34D=P (+2), 14D= R1A (+6).
040216,000398: 36,3163 45345 TRIGFNS DLOAD DSU
040217,000399: 36,3164 00021 16D
040218,000400: 36,3165 01723 INDEP
040219,000401: 36,3166 00045 STORE 36D # 36D=DCOT=COT(TH/2)-COGA (+5)
040220,000402:
040221,000403: 36,3167 60316 DSQ NORM
040222,000404: 36,3170 00047 X1
040223,000405: 36,3171 70405 DMP SR1
040224,000406: 36,3172 00043 34D
040225,000407: 36,3173 51525 PDDL ABS # DCOT*DCOT (+13-N1) PL AT 2D
040226,000408: 36,3174 00017 14D
040227,000409: 36,3175 55301 NORM BDDV # COGDS (+7-N1+N2) PL AT 0D
040228,000410: 36,3176 00051 S1
040229,000411: 36,3177 53660 XSU,1 SR*
040230,000412: 36,3200 00050 S1
040231,000413: 36,3201 20604 3,1
040232,000414: 36,3202 77600 BOV
040233,000415: 36,3203 75343 COGDSOVF
040234,000416: 36,3204 75206 COGDSTOR PUSH SIGN # COGDS (+10)
040235,000417: 36,3205 00017 14D
040236,000418: 36,3206 60215 DAD NORM
040237,000419: 36,3207 35636 D1/1024
040238,000420: 36,3210 00047 X1
040239,000421: 36,3211 65265 BDDV PDDL # 2D=1-CSD (-7+N1) PL AT 4D
040240,000422: 36,3212 35644 D1/4
040241,000423: 36,3213 00001 0D
040242,000424: 36,3214 60366 SQRT NORM
040243,000425: 36,3215 00050 X2
040244,000426: 36,3216 75205 DMP SIGN
040245,000427: 36,3217 00003 2D
040246,000428: 36,3220 00045 36D # SND=+-(1-CSD)SQRT(COGDS) (-2+N1-N2)
040247,000429: 36,3221 43064 XSU,2 BON
040248,000430: 36,3222 00046 X1
040249,000431: 36,3223 02305 ESCPSW
040250,000432: 36,3224 75250 HYPTRIG # DUE TO DIFFERENT SCALING
040251,000433: 36,3225 65257 SR* PDDL # DXNGE WITH PD,2D=SND (+1) PL AT 4D
040252,000434: 36,3226 57173 3,2
040253,000435: 36,3227 40057 SL* BOV
040254,000436: 36,3230 20171 0 -8D,1
040255,000437: 36,3231 75245 HALFCIRC
040256,000438: 36,3232 57406 COSFN PUSH DCOMP # 4D=(1-CSD)(+1) PL AT 6D
040257,000439: 36,3233 65415 DAD ACOS
040258,000440: 36,3234 35646 D1/2
040259,000441: 36,3235 41365 SIGN DMP
040260,000442: 36,3236 00045 36D
040261,000443: 36,3237 05740 PI/4 # CONVERT FROM CIRCLES TO RADIANS/8
040262,000444: 36,3240 43244 BPL DAD
040263,000445: 36,3241 75243 +2
040264,000446: 36,3242 05740 PI/4
Page 937 |
040266,000448: 36,3243 00001 STORE 0D # 0D=DELTAE (+3)
040267,000449: 36,3244 77616 RVQ
040268,000450:
040269,000451:
040270,000452: 36,3245 52145 HALFCIRC DLOAD GOTO
040271,000453: 36,3246 35652 NEARI
040272,000454: 36,3247 75232 COSFN
040273,000455: 36,3250 57457 HYPTRIG SR* DCOMP
040274,000456: 36,3251 57162 12D,2
040275,000457: 36,3252 77725 PDDL # DXNGE WITH PD,2D=SND (+10) PL AT 4D
040276,000458: 36,3253 41457 SL* PUSH
040277,000459: 36,3254 20160 0 -17D,1 # 4D=(1-CSD) (+10) PL AT 6D
040278,000460: 36,3255 43276 DCOMP DAD
040279,000461: 36,3256 35636 D1/1024
040280,000462: 36,3257 65342 SR1 PDDL # PL AT 8D
040281,000463: 36,3260 00003 2D
040282,000464: 36,3261 43342 SR1 DAD # ARG=COSH(DELG)+SINH(DELG) (+11) PL AT 6D
040283,000465:
040284,000466: 36,3262 44301 NORM BDSU # THIS IS AN ARCSINH ROUTINE
040285,000467: 36,3263 01676 SPLOC # ARG=.5-ARG (+11-N1)
040286,000468: 36,3264 35646 D1/2
040287,000469: 36,3265 77776 EXIT
040288,000470: 36,3266 34570 ARCSINH CA TEN
040289,000471: 36,3267 27675 ADS SPLOC # C(SPLOC)=10-N1
040290,000472: 36,3270 07274 TC POLY
040291,000473: 36,3271 00011 DEC 9 B-14
040292,000474: 36,3272 00000 00000 DZERO 2DEC .0
040293,000475:
040294,000476: 36,3274 00400 00000 2DEC .015625
040295,000477:
040296,000478: 36,3276 00400 00000 2DEC .015625
040297,000479:
040298,000480: 36,3300 00525 12525 2DEC .020833333
040299,000481:
040300,000482: 36,3302 01000 00000 2DEC .03125
040301,000483:
040302,000484: 36,3304 01463 06315 2DEC .05
040303,000485:
040304,000486: 36,3306 02525 12525 2DEC .083333333
040305,000487:
040306,000488: 36,3310 04444 22222 2DEC .14285714
040307,000489:
040308,000490: 36,3312 10000 00000 2DEC .25
040309,000491:
040310,000492: 36,3314 16161 30706 2DEC .44444444
040311,000493:
040312,000494: 36,3316 31463 06315 2DEC .8
040313,000495:
040314,000496: 36,3320 37767 CAF ZERO
040315,000497:
Page 938 |
040317,000499: 36,3321 54146 TS MPAC +2
040318,000500: 36,3322 00006 EXTEND
040319,000501: 36,3323 33660 DCA LN2/128
040320,000502: 36,3324 52145 DXCH MPAC # MPAC,+1 CONTAINS LN2/128
040321,000503: 36,3325 53677 DXCH SPLOC +1 # SPLOC+1,+2 CONTAINS LN(1/2-ARGS)/128
040322,000504: 36,3326 31675 CA SPLOC
040323,000505: 36,3327 07357 TC SHORTMP
040324,000506: 36,3330 52146 DXCH MPAC +1
040325,000507: 36,3331 52145 DXCH MPAC # MPAC CONTAINS (10-N1)LN2/128
040326,000508: 36,3332 53677 DXCH SPLOC +1 # A,L CONTAIN LN(1/2-ARGS)/128
040327,000509: 36,3333 00006 EXTEND
040328,000510: 36,3334 40001 DCOM
040329,000511: 36,3335 20145 DAS MPAC
040330,000512: 36,3336 06112 TC INTPRET
040331,000513: 36,3337 77661 SR
040332,000514: 36,3340 20606 5
040333,000515: 36,3341 00001 STORE 0D # 0D=DELG (+12) PL AT 6D
040334,000516: 36,3342 77616 RVQ
040335,000517:
040336,000518:
040337,000519: 36,3343 52145 COGDSOVF DLOAD GOTO
040338,000520: 36,3344 35654 BIGNO # BIGNO=NEARONE-DP1/1024
040339,000521: 36,3345 75204 COGDSTOR
040340,000522: # RETURNS WITH 0D=DELE (+3) OR DELG(+12),,2D=SND (+1 OR +10),4D=1-CSD (+1
040341,000523: # OR +10), AND PUSHLOC AT 6D
040342,000524:
Page 939 |
040344,000526: # ASSUMES 14D=R1A (+6), 32D= R1 (+7)
040345,000527: 36,3346 60345 SMA DLOAD NORM # THIS IS ESSENTIALLY A FLOATING POINT SUB
040346,000528: 36,3347 00017 14D # C(SPLOC+1)=-N1
040347,000529: 36,3350 01677 SPLOC +1 # SPLOC LATER WILL BE STORED IN X1 FOR SHF
040348,000530: 36,3351 60325 PDDL NORM
040349,000531: 36,3352 00041 32D
040350,000532: 36,3353 01676 SPLOC # C(SPLOC)=-N2
040351,000533: 36,3354 56342 SR1 DDV
040352,000534: 36,3355 77446 ABS EXIT # ABS(R1/R1A) (+2+N1-N2)
040353,000535: 36,3356 41676 CS SPLOC +1
040354,000536: 36,3357 61675 AD SPLOC
040355,000537: 36,3360 55675 TS SPLOC
040356,000538: 36,3361 54020 TS CYR
040357,000539: 36,3362 30020 CA CYR
040358,000540: 36,3363 60000 DOUBLE
040359,000541: 36,3364 54000 OVSK
040360,000542: 36,3365 13370 TCF EVEN
040361,000543: 36,3366 37763 ODD CA ONE
040362,000544: 36,3367 13371 TCF STORETAG
040363,000545: 36,3370 37767 EVEN CA ZERO
040364,000546: 36,3371 55676 STORETAG TS SPLOC +1 # A TAG TO DESIGNATE ADDITIONAL SHIFTRIGHT
040365,000547: 36,3372 27675 ADS SPLOC # C(SPLOC)=N1-N2+0 OR 1
040366,000548: 36,3373 31675 CA SPLOC
040367,000549: 36,3374 54021 TS SR
040368,000550: 36,3375 60021 AD SR
040369,000551: 36,3376 55675 TS SPLOC # C(SPLOC)=3(N1-N2+0 OR 1)/2
040370,000552: 36,3377 06112 TC INTPRET
040371,000553: 36,3400 53740 LXC,1 SR*
040372,000554: 36,3401 01676 SPLOC +1
040373,000555: 36,3402 20601 0,1
040374,000556: 36,3403 73006 PUSH LXA,2 # ABS(R1/R1A) (+2+N1-N2+0 OR 1) PL DOWN 2
040375,000557: 36,3404 01675 SPLOC # C(X2)=+3(N1-N2+0 OR 1)/2
040376,000558: 36,3405 41366 SQRT DMP # ARG TO THE 3/2 POWER,SCALED +3+(3/2)(N1
040377,000559: # -N2 +0 OR 1) PL UP 2
040378,000560: 36,3406 41214 BOFF DMP
040379,000561: 36,3407 02345 MOONSW
040380,000562: 36,3410 75412 +2
040381,000563: 36,3411 35662 ROOTMU
040382,000564: 36,3412 00015 STORE 12D # 12D=SQRT(ABS(R1/R1A))ABS(R1/R1A)
040383,000565: 36,3413 77616 RVQ # SCALED (+3 OR +7)+(3/2)(N1-N2+0 OR 1)
040384,000566: # SMA TO THE 3/2 POWER * ROOTMU IN 12D.
040385,000567: # IF LSW1 SET, INSIDE SPHERE AND 12D SCALED +7+C(X2)
040386,000568: # IF LSW1 OFF, OUTSIDE SPHERE AND 12D SCALED +3+C(X2)
040387,000569:
040388,000570:
Page 940 |
040390,000572: # THIS IS KEPLERS EQUATION FOR TIME-OF-FLIGHT BETWEEN TWO POINTS ON A
040391,000573: # CONIC TRAJECTORY. IT ASSUMES R1A (+6)=14D, P (+2)=34D, 1-CSD (+1,+10,-2
040392,000574: # =4D, SND (+1,+10,-2)=2D, D (+3,+12,0)=0D.
040393,000575:
040394,000576: 36,3414 41345 DELTIME DLOAD DMP # PL AT 6D
040395,000577: 36,3415 00043 34D
040396,000578: 36,3416 00017 14D
040397,000579: 36,3417 40061 SL BOV
040398,000580: 36,3420 20207 6
040399,000581: 36,3421 75107 SPEEDY
040400,000582: 36,3422 75446 ABS SQRT
040401,000583: 36,3423 77605 DMP # PL AT 4D
040402,000584: 36,3424 72205 DMP TLOAD
040403,000585: 36,3425 01723 INDEP
040404,000586: 36,3426 00145 MPAC # CHANGES MODE TO TP (00001).
040405,000587: 36,3427 45325 PDDL DSU # SQRT(P ABS(R1A))(1-CSD)COGA (+7 OR 16)
040406,000588: 36,3430 00017 14D # PL AT 7D
040407,000589: 36,3431 35640 D1/64
040408,000590: 36,3432 77605 DMP
040409,000591: 36,3433 00003 2D
040410,000592: 36,3434 65351 TLOAD PDDL # (R1A-1)SND (+7 OR16)
040411,000593: 36,3435 00145 MPAC # CHANGES MODE TO TP PL AT 10D
040412,000594: 36,3436 00001 0D
040413,000595: 36,3437 76202 SR4 TAD # PL PUSHES UP 3 SINCE TAD GOVERNS INSTEAD
040414,000596: 36,3440 77771 TAD # OF MODE. MODE REMAINS DP. PL AT 7D,4D
040415,000597: 36,3441 75301 NORM SIGN
040416,000598: 36,3442 00047 X1
040417,000599: 36,3443 00017 14D
040418,000600: 36,3444 56005 DMP XAD,1 # T (+(3 OR 7)+C(X2)+(7 OR 16)+C(X1))
040419,000601: 36,3445 00015 12D
040420,000602: 36,3446 00047 X2
040421,000603: 36,3447 77614 BON
040422,000604: 36,3450 02305 SMANGLSW
040423,000605: 36,3451 75502 THETASM
040424,000606: 36,3452 43014 BOFF BOFF
040425,000607: 36,3453 02345 MOONSW
040426,000608: 36,3454 75465 NEARERTH
040427,000609: 36,3455 02345 ESCPSW
040428,000610: 36,3456 75462 +4
040429,000611: 36,3457 52057 SR* GOTO
040430,000612: 36,3460 20564 0 -13D,1
040431,000613: 36,3461 75475 TMESTORE
040432,000614: 36,3462 52057 SR* GOTO
040433,000615: 36,3463 20575 0 -4,1
040434,000616: 36,3464 75475 TMESTORE
040435,000617: 36,3465 53614 NEARERTH BOFF SR*
040436,000618: 36,3466 02345 ESCPSW
040437,000619: 36,3467 75473 +4
040438,000620: 36,3470 20570 0 -9D,1
040439,000621: 36,3471 77650 GOTO
Page 941 |
040441,000623: 36,3472 75475 TMESTORE
040442,000624: 36,3473 77657 SR*
040443,000625: 36,3474 20601 0,1
040444,000626: 36,3475 77600 TMESTORE BOV
040445,000627: 36,3476 75510 TIMELONG
040446,000628: 36,3477 00015 STORE 12D # 12D=T (+10)
040447,000629: 36,3500 43401 SETPD RVQ
040448,000630: 36,3501 00001 0D
040449,000631:
040450,000632:
040451,000633: 36,3502 42414 THETASM BOFF SL4 # T (+7 +C(X1))
040452,000634: 36,3503 02342 ITERSW
040453,000635: 36,3504 75505 ERTHSFER
040454,000636: 36,3505 52057 ERTHSFER SR* GOTO
040455,000637: 36,3506 20604 3,1
040456,000638: 36,3507 75475 TMESTORE
040457,000639:
040458,000640: 36,3510 52145 TIMELONG DLOAD GOTO
040459,000641: 36,3511 35652 NEARI
040460,000642: 36,3512 75477 TMESTORE +2
040461,000643:
040462,000644:
040463,000645: # T (+10) IN 12D AND IN MPAC.
040464,000646:
040465,000647:
Page 942 |
040467,000649: # THIS IS A GENERAL NEWTON ITERATOR WHEREIN A STARTING INDEPENDENT VARIABL
040468,000650: # IS INPUT AND THE CHANGE IN THE INDEPENDENT VARIABLE IS OUTPUT. THE
040469,000651: # BOUNDS OF THE INDEPENDENT VARIABLE,MAXINDEP AND MININDEP, MUST BE AVAILA
040470,000652: # BLE AND SWITCH 7 MUST BE SET. IF A GOOD GUESS TO INDEP IS KNOWN,
040471,000653: # TWEEKIT SHOULD BE SET TO A SMALL FRACTION,DEPENDING ON HOW WELL INDEP IS
040472,000654: # KNOWN. OTHERWISE THE FIRST GUESS TO INDEP SHOULD BE .5(MAXINDEP+MININ-
040473,000655: # DEP) AND TWEEKIT SHOULD BE SET TO .25. IT IS ASSUMED THAT THE CRITERIA
040474,000656: # FOR EXITING FROM THE CALLING PROGRAMS LOOP IS IN THE CALLING PROGRAM.
040475,000657: # THE DEPENDENT VARIABLE MUST BE IN DEPVAR AND THE PREVIOUS ONE MUST BE IN
040476,000658: # PREVDEP. THE SIGN OF TWEEKIT SOULD BE +/- ACCORDING TO WHETHER THE
040477,000659: # SINGLE-VALUED FUNCTION IS MONOTONICLY INCREASING OR DECREASING.
040478,000660:
040479,000661:
040480,000662: 36,3513 71214 ITERATOR BONCLR DLOAD
040481,000663: 36,3514 02202 ITERSW
040482,000664: 36,3515 75544 FRSTTIME
040483,000665: 36,3516 01727 DEPVAR
040484,000666: 36,3517 60225 DSU NORM
040485,000667: 36,3520 01731 PREVDEP
040486,000668: 36,3521 00047 X1
040487,000669: 36,3522 70525 PDDL SR1 # PL DOWN 2
040488,000670: 36,3523 01733 DELDEP
040489,000671: 36,3524 77671 DDV # PL UP 2
040490,000672: 36,3525 53605 DMP SL*
040491,000673: 36,3526 01735 DELINDEP
040492,000674: 36,3527 20202 1,1
040493,000675: 36,3530 01735 NEWDELTA STORE DELINDEP
040494,000676: 36,3531 71240 BMN DLOAD # NOW MUST CHECK TO SEE IF THIS DELTA CAN
040495,000677: 36,3532 75556 MINCHECK # CAUSE THE INDEPENDENT VARIABLE TO EXCEED
040496,000678: 36,3533 00033 MAXINDEP # ITS LIMITS.
040497,000679: 36,3534 45225 DSU DSU
040498,000680: 36,3535 01723 INDEP
040499,000681: 36,3536 01735 DELINDEP
040500,000682: 36,3537 50000 BOV BMN
040501,000683: 36,3540 75570 XEEDULMT
040502,000684: 36,3541 75570 XEEDULMT
040503,000685: 36,3542 43545 DLOAD RVQ
040504,000686: 36,3543 01735 DELINDEP
040505,000687:
040506,000688:
040507,000689: 36,3544 41345 FRSTTIME DLOAD DMP
040508,000690: 36,3545 00027 MININDEP
040509,000691: 36,3546 01725 TWEEKIT # TWEEKIT SHOULD BE SET .25 IF THE FIRST
040510,000692: # GUESS OF INDEP WAS .5(MAXINDEP+MININDEP)
040511,000693: 36,3547 41325 PDDL DMP # DOWN 2D
040512,000694: 36,3550 00033 MAXINDEP
040513,000695: 36,3551 01725 TWEEKIT
040514,000696: 36,3552 77625 DSU # UP 2D
Page 943 |
040516,000698: 36,3553 52165 SIGN GOTO
040517,000699: 36,3554 01733 DELDEP
040518,000700: 36,3555 75530 NEWDELTA
040519,000701: 36,3556 45345 MINCHECK DLOAD DSU
040520,000702: 36,3557 00027 MININDEP
040521,000703: 36,3560 01723 INDEP
040522,000704: 36,3561 40025 DSU BOV
040523,000705: 36,3562 01735 DELINDEP
040524,000706: 36,3563 75575 XEEDLLMT
040525,000707: 36,3564 71244 BPL DLOAD
040526,000708: 36,3565 75575 XEEDLLMT
040527,000709: 36,3566 01735 DELINDEP
040528,000710: 36,3567 77616 RVQ
040529,000711:
040530,000712:
040531,000713: 36,3570 45345 XEEDULMT DLOAD DSU
040532,000714: 36,3571 00033 MAXINDEP
040533,000715: 36,3572 01723 INDEP
040534,000716: 36,3573 01735 STORE DELINDEP
040535,000717: 36,3574 77616 RVQ
040536,000718:
040537,000719:
040538,000720: 36,3575 45345 XEEDLLMT DLOAD DSU
040539,000721: 36,3576 00027 MININDEP
040540,000722: 36,3577 01723 INDEP
040541,000723: 36,3600 01735 STORE DELINDEP
040542,000724: 36,3601 77616 RVQ
040543,000725:
040544,000726:
Page 944 |
040546,000728: # ASSUMES 32D=R (+7), 34D=P (+2), TAG5 (+/-), 18D=COGA (+5), UNR1 (+1), R2
040547,000729: # VEC (+7) AVAILABLE.
040548,000730: 36,3602 60345 INITV DLOAD NORM
040549,000731: 36,3603 00041 32D
040550,000732: 36,3604 00047 X1
040551,000733: 36,3605 70525 PDDL SR1 # R1 (+7-N1) PL AT 2D
040552,000734: 36,3606 00043 34D
040553,000735: 36,3607 77671 DDV # P/R1 (-4+N1) PL AT 0D
040554,000736: 36,3610 41214 BOFF DMP
040555,000737: 36,3611 02345 MOONSW
040556,000738: 36,3612 75617 OUTSIDE
040557,000739: 36,3613 35664 MU
040558,000740: 36,3614 52057 SL* GOTO
040559,000741: 36,3615 20165 0 -12D,1
040560,000742: 36,3616 75621 MAGVTAN
040561,000743: 36,3617 77657 OUTSIDE SL*
040562,000744: 36,3620 20173 0 -6,1
040563,000745: 36,3621 63366 MAGVTAN SQRT PDVL # V SIN(GAMMA) (+1) PL AT 2D
040564,000746:
040565,000747: 36,3622 01701 UNR1
040566,000748: 36,3623 63361 VXSC PDVL # 2D=COGA UNR1 (+6) PL AT 8D
040567,000749: 36,3624 00023 18D
040568,000750: 36,3625 01715 UNNORM
040569,000751: 36,3626 60435 VXV VSR4 # UNVTAN (+6)
040570,000752: 36,3627 01701 UNR1
040571,000753: 36,3630 74255 VAD VXSC # PL AT 2D,0D
040572,000754: 36,3631 46561 VXSC VSL7
040573,000755: 36,3632 35670 VFACT # SCALE FOR ASCENT STEERING AT +7
040574,000756: 36,3633 02324 STORE V0VEC
040575,000757: 36,3634 77616 RVQ
040576,000758:
040577,000759: # RETURNS WITH VELOCITY IN MPAC AND IN V0VEC SCALED (+1)
040578,000760:
040579,000761:
Page 945 |
040581,000763: 36,3635 00020 00000 D1/1024 2DEC .5 B-9
040582,000764:
040583,000765: 36,3637 00400 00000 D1/64 2DEC .5 B-5
040584,000766:
040585,000767: 36,3641 01000 00000 D1/32 2DEC .5 B-4
040586,000768:
040587,000769: 36,3643 10000 00000 D1/4 2DEC .5 B-1
040588,000770:
040589,000771: 36,3645 20000 00000 D1/2 2DEC .5
040590,000772:
The following line is "NEARZERO 2OCT B0" in the original program listing, but the yaYUL assembler does not syntactically support a bare exponent like "B0" in the operand, so it has been replaced by a numerical equivalent that the assembler does support. |
040594,000776: 36,3647 00000 00001 NEARZERO 2OCT 1
040595,000777:
040596,000778: 36,3651 37777 37777 NEARI 2OCT 3777737777
040597,000779:
040598,000780: 36,3653 37757 37777 BIGNO 2OCT 3775737777
040599,000781:
040600,000782: 36,3655 00020 14223 PERCENT 2DEC E-3 B-28
040601,000783:
040602,000784: 36,3657 00130 27103 LN2/128 2DEC .693147181 B-7
040603,000785:
040604,000786: 36,3661 22031 22343 ROOTMU 2DEC 9.0249769 B-4
040605,000787:
040606,000788: 36,3663 31111 32405 MU 2DEC .0122774395 B+6
040607,000789:
040608,000790: 36,3665 40010 40042 ABSOLMIN 2DEC -.999511590
040609,000791:
040610,000792: 36,3667 30276 05000 VFACT 2DEC .761606218
040611,000793:
040612,000794: 36,3671 36,3667 TFACT EQUALS VFACT
040613,000795: 36,3671 00000 00036 DEPCRIT 2DEC 1.135 E-7 # 50 MS. SCALED BY TNORM
End of include-file LAMB.agc. Parent file is MAIN.agc