Source Code
These source-code files were transcribed from a printout in Don Eyles's personal
collection, scanned by archive.org, and financially sponsored by Peter McDermott.
A team of volunteers performed the transcription and proof-reading. The scanned
page images are available at
the Virtual AGC Project website, as well as higher-quality (but much larger)
images at
the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating
"issues" at
the Virtual AGC Project's GitHub Repository. Notations on the program listing read, in part: YUL SYSTEM FOR AGC: NEW PROGRAM SHEPATIN BY EYLES DEC 13, 1966 THIS PROGRAM WAS ASSEMBLED AS A VERSION OF REVISION 37 OF PROGRAM SUNBURST BY LEM GROUPNote that the date is the date of the printout, not the date of the program revision. |
035545,000002: ## Copyright: Public domain.
035546,000003: ## Filename: AVERAGE_G_INTEGRATOR.agc
035547,000004: ## Purpose: A section of Sunburst revision 37, or Shepatin revision 0.
035548,000005: ## It is part of an early development version of the software
035549,000006: ## for Apollo Guidance Computer (AGC) on the unmanned Lunar
035550,000007: ## Module (LM) flight Apollo 5. Sunburst 37 was the program
035551,000008: ## upon which Don Eyles's offline development program Shepatin
035552,000009: ## was based; the listing herein transcribed was actually for
035553,000010: ## the equivalent revision 0 of Shepatin.
035554,000011: ## This file is intended to be a faithful transcription, except
035555,000012: ## that the code format has been changed to conform to the
035556,000013: ## requirements of the yaYUL assembler rather than the
035557,000014: ## original YUL assembler.
035558,000015: ## Reference: pp. 788-794
035559,000016: ## Assembler: yaYUL
035560,000017: ## Contact: Ron Burkey <info@sandroid.org>.
035561,000018: ## Website: www.ibiblio.org/apollo/index.html
035562,000019: ## Mod history: 2017-05-24 MAS Created from Sunburst 120.
035563,000020: ## 2017-06-13 MAS Updated for Sunburst 37 (this includes
035564,000021: ## Sunburst 120's MASS CALCULATOR too).
035565,000022: ## 2017-06-23 RSB Proofed comment text with
035566,000023: ## octopus/ProoferComments.
035567,000024:
Page 788 |
035569,000026: # *************************************************************************************************************
035570,000027:
035571,000028:
035572,000029: # ROUTINE CALCRVG INTEGRATES THE EQUATIONS OF MOTION BY AVERAGING THE THRUST AND GRAVITATIONAL
035573,000030: # ACCELERATIONS OVER A TIME INTERVAL OF 2 SECONDS.
035574,000031:
035575,000032: # FOR THE EARTH-CENTERED GRAVITATIONAL FIELD, THE PERTURBATION DUE TO OBLATENESS IS COMPUTED TO THE FIRST
035576,000033: # HARMONIC COEFFICIENT J.
035577,000034:
035578,000035: # ROUTINE CALCRVG REQUIRES...
035579,000036: # 1) THRUST ACCELERATION INCREMENTS IN DELV SCALED SAME AS PIPAX,Y,Z
035580,000037: # 2) VN SCALED 2(+7)M/CS.
035581,000038: # 3) PUSHDOWN COUNTER SET TO ZERO.
035582,000039:
035583,000040: # IT LEAVES RN1 UPDATED (SCALED AT 2(+24)M, VN1 (SCALED AT 2(+7)M/CS), ANDGDT1/2 (SCALED AT 2(+7)M/CS).
035584,000041:
035585,000042:
035586,000043: 30,3043 BANK 30
035587,000044: 30,3043 E5,1544 EBANK= EVEX
035588,000045:
035589,000046: 30,3043 77656 CALCGRAV UNIT # ENTER WITH RN AT 2(+24)M IN VAC
035590,000047: 30,3044 01033 STORE UNITR
035591,000048: 30,3045 41441 DOT PUSH
035592,000049: 30,3046 01041 UNITW
035593,000050: 30,3047 56316 DSQ DDV
035594,000051: 30,3050 21131 DP1/10
035595,000052:
035596,000053: 30,3051 65221 BDSU PDDL
035597,000054: 30,3052 21127 DP1/8TH
035598,000055: 30,3053 00045 36D
035599,000056: 30,3054 15047 STODL RMAG
035600,000057: 30,3055 21133 J(RE)SQ
035601,000058: 30,3056 77671 DDV
035602,000059: 30,3057 00043 34D
035603,000060: 30,3060 00041 STORE 32D
035604,000061: 30,3061 77605 DMP
035605,000062: 30,3062 65361 VXSC PDDL
035606,000063:
035607,000064: 30,3063 01033 UNITR
035608,000065: 30,3064 74205 DMP VXSC
035609,000066: 30,3065 00041 32D
035610,000067: 30,3066 01041 UNITW
035611,000068: 30,3067 53255 VAD VAD
035612,000069: 30,3070 01033 UNITR
035613,000070: 30,3071 56325 PDDL DDV
035614,000071: 30,3072 21135 -MUDT
035615,000072: 30,3073 00043 34D
035616,000073: 30,3074 45561 VXSC STADR
035617,000074: 30,3075 76712 STORE GDT1/2
035618,000075:
035619,000076:
035620,000077: 30,3076 77616 RVQ
035621,000078:
035622,000079: 30,3077 74375 CALCRVG VLOAD VXSC
035623,000080: 30,3100 00404 DELV
Page 789 |
035625,000082: 30,3101 21125 KPIP1
035626,000083: 30,3102 44006 PUSH STQ # DV/2 TO PD SCALED AT 2(+7)M/CS
035627,000084: 30,3103 00037 31D
035628,000085: 30,3104 41455 VAD PUSH # (DV-OLDGDT)/2 TO PD SCALED AT 2(+7)M/CS
035629,000086: 30,3105 01025 GDT/2
035630,000087: 30,3106 74255 VAD VXSC
035631,000088: 30,3107 01017 VN
035632,000089: 30,3110 21137 2SEC(17)
035633,000090:
035634,000091: 30,3111 77655 VAD
035635,000092: 30,3112 01011 RN
035636,000093: 30,3113 35051 STCALL RN1 # TEMP STORAGE OF RN SCALED 2(+24)M
035637,000094: 30,3114 61043 CALCGRAV
035638,000095:
035639,000096: 30,3115 53255 VAD VAD
035640,000097: 30,3116 77655 VAD
035641,000098: 30,3117 01017 VN
035642,000099: 30,3120 35057 STCALL VN1 # TEMP STORAGE OF VN SCALED 2(+7)M/CS
035643,000100: 30,3121 00037 31D
035644,000101:
035645,000102: 30,3122 03215 27057 KPIP 2DEC .1024 # SCALES DELV TO 2(+4)
035646,000103:
035647,000104: 30,3124 00150 33343 KPIP1 2DEC 0.0064
035648,000105:
035649,000106: 30,3126 04000 00000 DP1/8TH 2DEC 0.125
035650,000107:
035651,000108: 30,3130 03146 14632 DP1/10 2DEC 0.1
035652,000109:
035653,000110: 30,3132 00036 30103 J(RE)SQ 2DEC 0.060066630 B-5 # SCALED AT 2(+45)
035654,000111:
035655,000112: 30,3134 77774 53772 -MUDT 2DEC* -7.9720645 E+12 B-55*
035656,000113:
035657,000114: 30,3136 00031 00000 2SEC(17) 2DEC 200 B-17
035658,000115:
035659,000116: 30,3140 04000 00000 DP2(-3) 2DEC 0.125
035660,000117:
035661,000118: 30,3142 00224 17561 MUEARTH 2DEC 0.009063188 # 3.98603223 E14 SCALED AT 2(42)M(3)/CS(2)
035662,000119:
035663,000120: 30,3144 00164 34414 MUMOON 2DEC 0.007134481 # 4.90277800 E12 SCALED AT 2(36)M(3)/CS(2)
035664,000121:
Page 790 |
035666,000123:
035667,000124:
035668,000125: # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
035669,000126:
035670,000127: # THE MASS UPDATE ROUTINE EXTENDS FROM APPROXIMATELY HERE TO THE NEXT
035671,000128: # ROW OF ASTERISKS. COMPUTATIONS ARE AS FOLLOWS:-
035672,000129: # (1) /AF/ = MAGNITUDE DV/DT, SCALED IN UNITS OF 2(-5) M/CS/CS.
035673,000130: # (2) PREFORCE = /AF/ MASS, APPROXIMATE PRESENT THRUST, SCALED AT
035674,000131: # SOME 3.3 POUNDS PER BIT; PREFORCE LATER BECOMES PREFORCE/2FMAX.
035675,000132: # (3) NOMINAL EXHAUST VELOCITY, VEXNOM = VEXSTEP + (PREFORCE-FSTEP)
035676,000133: # SLOPE, WHERE VEXSTEP, FSTEP, AND SLOPE ARE SELECTED FROM THE
035677,000134: # 'VEXTABLE' BY THE ROUTINE BEGINNING AT VEXFINDD; THE FSTEPS
035678,000135: # AND VXSTEPS DEFINE CERTAIN DISCRETE POINTS ON THE CURVE OF
035679,000136: # EXHAUST VELOCITY VERSUS THRUST; THE ASSOCIATED SLOPE IS ALWAYS
035680,000137:
035681,000138: # THAT FOR THE SEGMENT JUST PRECEEDING THOSE POINTS. (UNITS
035682,000139: # FOR VEXNOM, AS FOR NEGVEX, ARE 2(6) M/CS.)
035683,000140: # (4) AREARATE, A MODERATELY ABSTRUSE (NOT TO SAY ABSURD) FUNCTION
035684,000141: # OF DELAREA (EROSION) AND PREFORCE. (THE AREA IN QUESTION IS
035685,000142: # THAT OF THE THROAT OF THE ENGINE.)
035686,000143: # (5) DELAREA = DELAREA + AREARATE DELTAT.
035687,000144: # (6) NEGVEX = -(VEXNOM - CVEX5 DELAREA).
035688,000145: # (7) MASS = MASS + (/DELV//NEGVEX) MASS, SCALED IN UNITS OF 2(15)
035689,000146: # KILOGRAMS.
035690,000147:
035691,000148: # THE FOLLOWING INITIALIZATIONS MUST BE MADE BEFORE LAUNCH:
035692,000149: # C(MASS) = 0, C(LEMMASS1) = SCALED MASS OF LEM CUM DPS, C(LEMMASS2) =
035693,000150: # SCALED MASS OF LEM WITHOUT DPS. UPON LEM-SIVB SEPARATION MASS MUST
035694,000151: # BE REINITIALIZED USING LEMMASS1 AND DELAREA MUST BE SET TO DP ZERO.
035695,000152: # LATER, WHEN THE DPS PARTS COMPANY, MASS MUST BE INITIALIZED STILL
035696,000153: # AGAIN USING LEMMASS2.
035697,000154: # THE FOLLOWING IS AN INELEGANT SUPERFLUITY:- INPUTS: MASS, DELAREA,
035698,000155: # DELV, DELTAT, EMANATIONS FROM THE VEXTABLE, A TABLESPOON OF SALT AND
035699,000156: # SEVEN BYZANTINE DODO EGGS. OUTPUTS: /AF/ AND MASS. DEBRIS: PREFORCE,
035700,000157: # NEGVEX, AND AREARATE (TO LEARN MORE ABOUT THESE GEMS, SEE ABOVE).
035701,000158: # SUBROUTINES CALLED: MASSMULT (A PART OF THROTTLE CONTROL) AND THE
035702,000159: # INTERPRETER. ERASABLES: BANK 5 AT PRESENT. EYLES WROTE THIS STUFF;
035703,000160: # HIS LAST MODIFICATION THEREOF (NUMBER N+2) WENT INTO AGC REVISION 20.
035704,000161:
035705,000162: 30,3146 46145 MASSMON DLOAD BHIZ
035706,000163: 30,3147 01333 MASS
035707,000164: 30,3150 61312 NOMASS
035708,000165: 30,3151 74375 VLOAD VXSC
035709,000166: 30,3152 00404 DELV # DV = DELV*KPIP SCALED AT 2(+4) M/CS
035710,000167: 30,3153 21123 KPIP
035711,000168: 30,3154 51406 PUSH ABVAL # DV IN PDL
035712,000169: 30,3155 02165 STORE ABDVCONV
035713,000170: 30,3156 56206 PUSH DDV
035714,000171: 30,3157 21315 2SEC(9)
035715,000172:
035716,000173: 30,3160 01337 STORE /AF/ # /AF/ = MAGNITUDE DV/DT
035717,000174: 30,3161 77776 EXIT
035718,000175:
035719,000176: 30,3162 33355 CA ETHROTL
Page 791 |
035721,000178: 30,3163 54003 TS EBANK # JUST TO INSURE HAVING THE PROPER EBANK
035722,000179: 30,3164 E5,1557 EBANK= ETHROT
035723,000180:
035724,000181: 30,3164 00006 EXTEND
035725,000182: 30,3165 31337 DCA /AF/
035726,000183: 30,3166 03356 TC MASSMULT # WHICH PRODUCES DP FORCE IN A AND L
035727,000184:
035728,000185: 30,3167 53546 DXCH PREFORCE
035729,000186:
035730,000187: 30,3170 41545 CHOICE1 CS PREFORCE # TEST PREFORCE TO SEE IF
035731,000188: 30,3171 63316 AD LOWFCRIT # EITHER BIG ENGINE IS ON
035732,000189: 30,3172 00006 EXTEND
035733,000190: 30,3173 63200 BZMF CHOICE2 # BRANCH IF PREFORCE > LOWFCRIT = 720 LBS.
035734,000191:
035735,000192: 30,3174 00006 VEXFINDR EXTEND # OTHERWISE, USE RCSVEX
035736,000193: 30,3175 43321 DCS RCSVEX
035737,000194: 30,3176 53556 DXCH NEGVEX
035738,000195: 30,3177 13301 TCF ENDVEX
035739,000196:
035740,000197:
035741,000198: 30,3200 41332 CHOICE2 CS MASS # TEST MASS TO SEE IF THE
035742,000199: 30,3201 63317 AD MASSCRIT # DPS HAS PARTED COMPANY
035743,000200: 30,3202 00006 EXTEND
035744,000201: 30,3203 63210 BZMF VEXFINDD # BRANCH IF MASS > MASSCRIT = 5682 KGS.
035745,000202:
035746,000203: 30,3204 00006 VEXFINDA EXTEND # OTHERWISE, USE APSVEX
035747,000204: 30,3205 43323 DCS APSVEX
035748,000205: 30,3206 53556 DXCH NEGVEX
035749,000206: 30,3207 13301 TCF ENDVEX
035750,000207:
035751,000208: 30,3210 37761 VEXFINDD CA ZERO
035752,000209: 30,3211 55544 TS VEXDEX
035753,000210: 30,3212 37753 VEXLOOP CA FOUR
035754,000211: 30,3213 27544 ADS VEXDEX # INCREMENTING VEXDEX BY FOUR
035755,000212: 30,3214 41545 CS PREFORCE
035756,000213: 30,3215 51544 INDEX VEXDEX
035757,000214: 30,3216 63325 AD FSTEP # FSTEP - PREFORCE IN A AND L
035758,000215: 30,3217 00006 EXTEND
035759,000216: 30,3220 63212 BZMF VEXLOOP # BRANCH IF PREFORCE > OR = FSTEP. EMERGE
035760,000217: # FROM LOOP WITH INDEX PROPERLY SET AS
035761,000218: # SOON AS FSTEP > PREFORCE.
035762,000219: 30,3221 40000 COM # PREFORCE-FSTEP (ALWAYS MINUS) IN A AND L
035763,000220: 30,3222 00006 EXTEND
035764,000221:
035765,000222: 30,3223 51544 INDEX VEXDEX
035766,000223: 30,3224 73326 MP SLOPE
035767,000224: 30,3225 53550 DXCH VEXNOM
035768,000225: 30,3226 00006 EXTEND
035769,000226: 30,3227 51544 INDEX VEXDEX
035770,000227: 30,3230 33330 DCA VEXSTEP
035771,000228: 30,3231 21550 DAS VEXNOM # VEXNOM = VEXSTEP + (PREFORCE-FSTEP)SLOPE
035772,000229:
035773,000230: 30,3232 43520 CS -FMAX
Page 792 |
035775,000232: 30,3233 60000 DOUBLE
035776,000233: 30,3234 56002 XCH Q
035777,000234:
035778,000235: 30,3235 00006 EXTEND
035779,000236: 30,3236 31546 DCA PREFORCE
035780,000237: 30,3237 00006 EXTEND
035781,000238: 30,3240 10002 DV Q
035782,000239: 30,3241 55545 TS PREFORCE # PREFORCE = PREFORCE/2FMAX
035783,000240:
035784,000241: 30,3242 33327 CA CVEX4
035785,000242: 30,3243 00006 EXTEND
035786,000243: 30,3244 71551 MP DELAREA
035787,000244: 30,3245 63326 AD CVEX3
035788,000245:
035789,000246: 30,3246 00006 EXTEND
035790,000247: 30,3247 71545 MP PREFORCE
035791,000248: 30,3250 00006 EXTEND # MUMBO
035792,000249: 30,3251 71545 MP PREFORCE # JUMBO
035793,000250: 30,3252 53554 DXCH AREARATE
035794,000251: 30,3253 33325 CA CVEX2
035795,000252: 30,3254 00006 EXTEND
035796,000253: 30,3255 71551 MP DELAREA
035797,000254: 30,3256 63324 AD CVEX1
035798,000255: 30,3257 00006 EXTEND
035799,000256: 30,3260 71545 MP PREFORCE
035800,000257: 30,3261 21554 DAS AREARATE # SCALED IN UNITS OF 2(-4) PERCENT/CS
035801,000258:
035802,000259:
035803,000260: 30,3262 31553 CA AREARATE
035804,000261: 30,3263 00006 EXTEND
035805,000262: 30,3264 73314 MP 2SEC(9)
035806,000263: 30,3265 53560 DXCH DAREATMP
035807,000264: 30,3266 00006 EXTEND
035808,000265: 30,3267 31552 DCA DELAREA
035809,000266: 30,3270 21560 DAS DAREATMP # DAREATMP NOW CONTAINS NEW DELAREA
035810,000267: 30,3271 31557 CA DAREATMP
035811,000268: 30,3272 00006 EXTEND
035812,000269:
035813,000270: 30,3273 73330 MP CVEX5
035814,000271: 30,3274 53556 DXCH NEGVEX
035815,000272: 30,3275 00006 EXTEND
035816,000273: 30,3276 41550 DCS VEXNOM
035817,000274: 30,3277 21556 DAS NEGVEX # NEGVEX NOW HOLDS THE GENUINE ARTICLE
035818,000275:
035819,000276: 30,3300 54153 TS MODE
035820,000277: 30,3301 37761 ENDVEX CA ZERO # PRECAUTIONARY
035821,000278: 30,3302 54111 TS OVFIND
035822,000279:
035823,000280: 30,3303 06103 TC INTPRET
035824,000281: 30,3304 60545 DLOAD SR2 # RESCALING /DELV/ TO 2(6) M/CS
035825,000282:
035826,000283: 30,3305 41271 DDV DMP
035827,000284: 30,3306 02556 NEGVEX
035828,000285: 30,3307 01333 MASS
035829,000286: 30,3310 77615 DAD
Page 793 |
035831,000288: 30,3311 01333 MASS
035832,000289: 30,3312 02562 NOMASS STORE MASSTEMP
035833,000290: 30,3313 77616 RVQ
035834,000291:
035835,000292: # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
035836,000293: # * * * * * * * * * * * * * * * * * * * *
035837,000294:
035838,000295: # CONSTANTS FOR VEXFIND1
035839,000296:
035840,000297: 30,3314 14400 00000 2SEC(9) 2DEC 200 B-9 # CONSTANT GUIDANCE PERIOD, SUP70S5DLY
035841,000298:
035842,000299:
035843,000300:
035844,000301: 30,3316 00333 LOWFCRIT DEC .01336 # MAXIMUM THRUST OF THE RCS JETS
035845,000302:
035846,000303: 30,3317 05423 MASSCRIT DEC .173031964 # MASS OF LEM WITH DPS > MASSCRIT > MASS
035847,000304: # OF LEM WITHOUT DPS
035848,000305:
035849,000306: 30,3320 15165 30244 RCSVEX 2DEC .4134375 # EXHAUST VELOCITY FOR RCS JETS
035850,000307:
035851,000308: 30,3322 17114 33562 APSVEX 2DEC .473441550 # EXHAUST VELOCITY FOR ASCENT ENGINE
035852,000309:
035853,000310: 30,3324 73301 CVEX1 DEC -.14438400
035854,000311: 30,3325 00121 CVEX2 DEC +.00493568
035855,000312: 30,3326 36633 CVEX3 DEC +.96256000
035856,000313: 30,3327 76743 CVEX4 DEC -.03297280
035857,000314: 30,3330 00321 CVEX5 DEC +.01274865
035858,000315:
035859,000316: # ADDRESSES FOR ACCESSING VEXTABLE
035860,000317:
035861,000318: 30,3331 30,3325 FSTEP = FSTEP1 -4
035862,000319:
035863,000320: 30,3331 30,3326 SLOPE = SLOPE1 -4
035864,000321: 30,3331 30,3327 VEXSTEP = VXSTEP1 -4
035865,000322:
035866,000323: # THE VEXTABLE
035867,000324:
035868,000325: 30,3331 01400 FSTEP1 DEC .046875
035869,000326: 30,3332 23243 SLOPE1 DEC .603681848
035870,000327: 30,3333 16461 26707 VXSTEP1 2DEC .45615938
035871,000328:
035872,000329: 30,3335 03040 FSTEP2 DEC .095703125
035873,000330:
035874,000331: 30,3336 73704 SLOPE2 DEC -.128576102
035875,000332: 30,3337 16312 33256 VXSTEP2 2DEC .44988125
035876,000333:
035877,000334: 30,3341 05200 FSTEP3 DEC .164062500
035878,000335: 30,3342 11354 SLOPE3 DEC .29568000
035879,000336: 30,3343 17026 00406 VXSTEP3 2DEC .470093750
035880,000337:
035881,000338: 30,3345 06200 FSTEP4 DEC .19531250
035882,000339: 30,3346 72405 SLOPE4 DEC -.171499840
Page 794 |
035884,000341: 30,3347 16676 06521 VXSTEP4 2DEC .46473438
035885,000342:
035886,000343:
035887,000344: 30,3351 14400 HIFSTEP DEC .390625000 # JUST IN CASE, ANOMALOUSLY,
035888,000345: 30,3352 00000 HISLOPE DEC 0 B-14 # PREFORCE APPEARS TO EXCEED
035889,000346: 30,3353 16676 06521 HIVXSTEP 2DEC .464734380 # 100 PERCENT FMAX.
035890,000347: # * * * * * * * * * * * * * * * * * * * * *
035891,000348:
035892,000349: 30,3355 02557 ETHROTL ECADR ETHROT
End of include-file AVERAGE_G_INTEGRATOR.agc. Parent file is MAIN.agc