Source Code
These source-code files are part of a reconstructed copy of Comanche 72/3 (AKA Manche72 revision 3),
the final, flown mission release of the Apollo Guidance Computer (AGC) Command Module (CM) software
for Apollo 13.
The starting point was the source code of Comanche 72 (itself previously reconstructed). Comanche 72 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 72 and 72/3. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments. Since no contemporary listings of Comanche 72/3 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
021559,000002: ## Copyright: Public domain.
021560,000003: ## Filename: R30.agc
021561,000004: ## Purpose: A section of Manche72 revision 3.
021562,000005: ## It is part of the reconstructed source code for the final, flown
021563,000006: ## release of the software for the Command Module's (CM) Apollo
021564,000007: ## Guidance Computer (AGC) for Apollo 13. No original listings
021565,000008: ## of this program are available; instead, this file was recreated
021566,000009: ## from a reconstructed copy of Comanche 072. It has been adapted
021567,000010: ## such that the resulting bugger words exactly match those
021568,000011: ## specified for Manche72 revision 3 in NASA drawing 2021153G,
021569,000012: ## which gives relatively high confidence that the reconstruction
021570,000013: ## is correct.
021571,000014: ## Assembler: yaYUL
021572,000015: ## Contact: Ron Burkey <info@sandroid.org>.
021573,000016: ## Website: www.ibiblio.org/apollo/index.html
021574,000017: ## Mod history: 2024-05-19 MAS Created from Comanche 072.
021575,000018:
021576,000019: # SUBROUTINE NAME: V82CALL
021577,000020: # MOD NO: 0 DATE: 16 FEB 67
021578,000021: # MOD BY: RR BAIRNSFATHER LOG SECTION: R30
021579,000022: # MOD NO: 1 MOD BY: RR BAIRNSFATHER DATE: 11 APR 67 SR30.1 CHANGED TO ALLOW MONITOR OPERN
021580,000023: # MOD NO: 2 MOD BY ALONSO DATE: 11 DEC 67 VB82 PROGRAM REWRITTEN
021581,000024: # MOD NO: 3 MOD BY ALONSO DATE: 26 MAR 68 PROG MOD TO HANDLE DIF EARTH/MOON SCALE
021582,000025:
021583,000026: # NEW FUNCTIONAL DESCRIPTION: CALLED BY VERB 82 ENTER. PRIORITY 10
021584,000027: # USED THROUGHOUT. CALCULATE AND DISPLAY ORBITAL PARAMETERS
021585,000028:
021586,000029: # 1. IF AVERAGE G IS OFF:
021587,000030: # FLASH DISPLAY V04N06. R2 INDICATES WHICH SHIP'S STATE VECTOR IS
021588,000031: # TO BE UPDATED. INITIAL CHOICE IS THIS SHIP (R2=1). ASTRONAUT
021589,000032: # CAN CHANGE TO OTHER SHIP BY V22EXE, WHERE X NOT EQ 1.
021590,000033: # SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
021591,000034: # CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
021592,000035: # RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
021593,000036: # HEIGHT ABOVE LAUNCH PAD OR LUNAR LANDING SITE), HAPO (APOGEE
021594,000037: # HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
021595,000038: # INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
021596,000039: # FLASH MONITOR V16N44 (HAPO, HPER, TFF). TFF IS -59M59S IF IT WAS
021597,000040: # NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
021598,000041: # ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
021599,000042: # DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
021600,000043: # ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
021601,000044: # 2. IF AVERAGE G IS ON:
021602,000045: # CALLS SR30.1 APPROX EVERY TWO SECS. STATE VECTOR IS ALWAYS
021603,000046: # FOR THIS VEHICLE. V82 DOES NOT DISTURB STATE VECTOR. RESULTS
021604,000047: # OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
021605,000048: # FLASH MONITOR V16N44 (HAPO, HPER, TFF).
021606,000049: # IF MODE IS P11, THEN CALL DELRSPL SO ASTRONAUT CAN MONITOR
021607,000050: # RESULTS BY N50E. SPLASH COMPUTATION DONE ONCE PER TWO SECS.
021608,000051: # ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
021609,000052: # ABOVE REMARKS.
021610,000053:
021611,000054: # CALLING SEQUENCE: VERB 82 ENTER.
021612,000055:
021613,000056: # SUBROUTINES CALLED: SR30.1, GOXDSPF
021614,000057: # MAYBE - THISPREC, OTHPREC, LOADTIME, DELRSPL
021615,000058:
021616,000059: # NORMAL EXIT MODES: TC ENDEXT
021617,000060:
021618,000061: # ALARMS: NONE
021619,000062:
021620,000063: # OUTPUT: HAPOX (-29) M
021621,000064: # HPERX (-29) M
021622,000065: # RAPO (-29) M EARTH
021623,000066: # (-27) M MOON
021624,000067: # RPER (-29) M EARTH
021625,000068: # (-27) M MOON
021626,000069: # TFF (-28) CS CONTAINS NEGATIVE QUANTITY
021627,000070: # -TPER (-28) CS CONTAINS NEGATIVE QUANTITY
021628,000071: # RSP-RREC(-29) M IF DELRSPL CALLED
021629,000072:
021630,000073: # ERASABLE INITIALIZATION REQUIRED: STATE VECTOR.
021631,000074:
021632,000075: # DEBRIS: QPRET, RONE, VONE, TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
021633,000076: # MAYBE: TSTART82, V82FLAGS, TDEC1.
021634,000077:
021635,000078: 13,2227 E4,1751 EBANK= HAPOX
021636,000079: 31,2332 BANK 31
021637,000080: 23,2000 SETLOC R30LOC
021638,000081: 23,2000 BANK
021639,000082: 23,2332 COUNT* $$/R30
021640,000083:
021641,000084: 23,2332 06006 V82CALL TC INTPRET
021642,000085: 23,2333 52014 BON GOTO
021643,000086: 23,2334 00716 AVEGFLAG
021644,000087: 23,2335 40201 V82GON # IF AVERAGE G ON
021645,000088: 23,2336 46337 V82GOFF # IF AVERAGE G OFF
021646,000089:
021647,000090: 23,2337 77776 V82GOFF EXIT # ALLOW ASTRONAUT TO SELECT VEHICLE
021648,000091: 23,2340 35032 CAF TWO # DESIRED FOR ORBITAL PARAMETERS
021649,000092: 23,2341 55051 TS OPTIONX
021650,000093: 23,2342 35033 CAF ONE
021651,000094: 23,2343 55052 TS OPTIONX +1
021652,000095: 23,2344 32410 CAF OPTIONVN # V 04 N 06
021653,000096: 23,2345 04676 TC BANKCALL
021654,000097: 23,2346 20561 CADR GOXDSPF
021655,000098: 23,2347 05550 TC ENDEXT # TERMINATE
021656,000099: 23,2350 02352 TC +2 # PROCEED
021657,000100: 23,2351 02344 TC -5 # DATA IN. OPTIONX +1 = 1 FOR THIS VEHIC.
021658,000101: # UNEQ 1 FOR OTHER VEHICLE.
021659,000102: 23,2352 32412 CAF TFFBANK
021660,000103: 23,2353 54003 TS EBANK
021661,000104: 23,2354 31052 CA OPTIONX +1
021662,000105: 23,2355 54111 TS OPTION82
021663,000106:
021664,000107: 23,2356 35030 CAF BIT4 # 80 MS
021665,000108: 23,2357 05261 TC WAITLIST
021666,000109: 23,2360 E4,1743 EBANK= TFF
021667,000110: 23,2360 02551 46064 2CADR TICKTEST
021668,000111:
021669,000112: 23,2362 00003 RELINT
021670,000113: 23,2363 35035 V82GOFLP CAF ZERO # MAJOR RECYCLE LOOP ENTRY
021671,000114: 23,2364 55742 TS V82FLAGS # ZERO FLAGS FOR TICKTEST. INHIBITS
021672,000115: # DECREMENTING OF TFF AND -TPER.
021673,000116: 23,2365 35077 CAF PRIO7
021674,000117: 23,2366 05163 TC FINDVAC # V82GOFF1 WILL EXECUTE STATE VECTOR
021675,000118: 23,2367 E4,1743 EBANK= TFF # UPDATE AND ORBIT CALCULATIONS FOR
021676,000119: 23,2367 02413 46064 2CADR V82GOFF1 # SELECTED VEHICLE ABOUT PROPER BODY.
021677,000120:
021678,000121: 23,2371 00003 RELINT
021679,000122: 23,2372 36214 V82STALL CAF THREE # STALL IN THIS LOOP AND WITHOLD V 16 N 44
021680,000123: 23,2373 71742 MASK V82FLAGS # UNTIL STATE VECTOR UPDATE SETS ONE OF
021681,000124: 23,2374 10000 CCS A # OUR FLAG BITS.
021682,000125: 23,2375 02402 TC FLAGGON # EXIT FROM STALL LOOP.
021683,000126: 23,2376 35055 CAF 1SEC
021684,000127: 23,2377 04676 TC BANKCALL
021685,000128: 23,2400 01732 CADR DELAYJOB
021686,000129: 23,2401 02372 TC V82STALL
021687,000130:
021688,000131: 23,2402 32411 FLAGGON CAF V16N44 # MONITOR HAPO,HPER,TFF.
021689,000132: 23,2403 04676 TC BANKCALL
021690,000133: 23,2404 20561 CADR GOXDSPF
021691,000134: 23,2405 05641 TC B5OFF # TERM THIS TELLS TICKTEST TO KILL ITSELF
021692,000135: 23,2406 05641 TC B5OFF # PROCEED DITTO
021693,000136: 23,2407 02363 TC V82GOFLP # RECYCLE RECOMPUTE STATE VECT + DISPLAY
021694,000137:
021695,000138: 23,2410 01014 OPTIONVN VN 0412
021696,000139: 23,2411 04054 V16N44 VN 1644
021697,000140: 23,2412 02343 TFFBANK ECADR TFF
021698,000141:
021699,000142: 23,2413 22007 V82GOFF1 ZL
021700,000143: 23,2414 35035 CAF ZERO
021701,000144: 23,2415 53052 DXCH DSPTEMX
021702,000145: 23,2416 32472 CAF V06N16X
021703,000146: 23,2417 04676 TC BANKCALL
021704,000147: 23,2420 20561 CADR GOXDSPF
021705,000148: 23,2421 05550 TC ENDEXT
021706,000149: 23,2422 02424 TC +2
021707,000150: 23,2423 02416 TC -5
021708,000151: 23,2424 06006 ISTIMEOK TC INTPRET
021709,000152: 23,2425 53145 DLOAD BZE
021710,000153: 23,2426 01052 DSPTEMX
021711,000154: 23,2427 46467 GETNOW
021712,000155: 23,2430 00041 STRTDEC1 STORE TDEC1 # TIME FOR STATE VECTOR UPDATE.
021713,000156: 23,2431 02325 STORE TSTART82 # TIME FOR INTERNAL USE.
021714,000157: 23,2432 77776 EXIT
021715,000158: 23,2433 40111 CS OPTION82 # 1 FOR THIS VEHICLE, NOT 1 FOR OTHER
021716,000159: 23,2434 65033 AD ONE
021717,000160: 23,2435 00006 EXTEND
021718,000161: 23,2436 12462 BZF THISSHIP
021719,000162: 23,2437 06006 OTHSHIP TC INTPRET
021720,000163: 23,2440 77624 CALL # CALL STATE VECTOR UPDATE FOR OTHER SHIP.
021721,000164: 23,2441 27114 OTHPREC
021722,000165: 23,2442 77775 BOTHSHIP VLOAD # MOVE RESULTS INTO TFFCONIC STORAGE AREAS
021723,000166: 23,2443 00001 RATT # TO BE CALLED BY SR30.1.
021724,000167: 23,2444 26327 STOVL RONE # RATT AT (-29)M FOR EARTH OR MOON
021725,000168: 23,2445 00007 VATT
021726,000169: 23,2446 02335 STORE VONE # VATT AT (-7)M/CS FOR EARTH OR MOON
021727,000170: 23,2447 77743 DLOAD*
021728,000171: 23,2450 71301 1/RTMUE,2 # X2 IS 0 FOR EARTH CENTERED STATE VEC
021729,000172: 23,2451 00037 STORE TFF/RTMU # X2 IS 2 FOR MOON
021730,000173: 23,2452 77743 DLOAD* # AS LEFT BY THISPREC OR OTHPREC.
021731,000174: 23,2453 71275 MINPERE,2
021732,000175: 23,2454 02321 STORE HPERMIN # TFFRTMU, HPERMIN AND RPADTEM ARE ALL
021733,000176: 23,2455 46135 SLOAD BHIZ # EARTH/MOON PARAMETERS AS SET HERE.
021734,000177: 23,2456 00050 X2
021735,000178: 23,2457 46503 EARTHPAD
021736,000179: 23,2460 77650 GOTO
021737,000180: 23,2461 46507 MOONPAD
021738,000181: 23,2462 06006 THISSHIP TC INTPRET
021739,000182: 23,2463 77624 CALL # CALL STATE VECTOR UPDATE FOR THIS SHIP.
021740,000183: 23,2464 27100 THISPREC
021741,000184: 23,2465 77650 GOTO
021742,000185: 23,2466 46442 BOTHSHIP
021743,000186: 23,2467 52034 GETNOW RTB GOTO
021744,000187: 23,2470 45510 LOADTIME
021745,000188: 23,2471 46430 STRTDEC1
021746,000189: 23,2472 01420 V06N16X VN 0616
021747,000190: # THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED. DO NOT SEPARATE PAIRS.
021748,000191:
021749,000192: 23,2473 27533 07571 1/RTMUM 2DEC* .45162595 E-4 B14*
021750,000193: 23,2475 25004 06702 1/RTMUE 2DEC* .50087529 E-5 B17*
021751,000194:
021752,000195: 23,2477 00001 11530 MINPERM 2DEC 10668 B-27 # 35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
021753,000196: 23,2501 00002 31230 MINPERE 2DEC 91440 B-29 # 300 KFT (-29)M FOR EARTH
021754,000197:
021755,000198: 23,2503 43145 EARTHPAD DLOAD CLRGO # PAD 37-B RADIUS. SCALED AT (-29)M.
021756,000199: 23,2504 05152 RPAD
021757,000200: 23,2505 04622 V82EMFLG # INDICATE EARTH SCALING FOR SR30.1
021758,000201: 23,2506 46513 BOTHPAD
021759,000202:
021760,000203: 23,2507 51575 MOONPAD VLOAD ABVAL # COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
021761,000204: 23,2510 02026 RLS # SCALED AT (-27)M.
021762,000205: 23,2511 77614 SET
021763,000206: 23,2512 04462 V82EMFLG # INDICATE MOON SCALING FOR SR30.1
021764,000207: 23,2513 36323 BOTHPAD STCALL RPADTEM
021765,000208: 23,2514 46671 SR30.1 # CALCULATE ORBITAL PARAMETERS
021766,000209: 23,2515 77776 EXIT
021767,000210: 23,2516 31011 CA MODREG # ARE WE IN POO
021768,000211: 23,2517 00006 EXTEND
021769,000212: 23,2520 12647 BZF CANDEL # YES, DO DELRSPL
021770,000213: 23,2521 06006 SPLRET1 TC INTPRET
021771,000214: 23,2522 45234 RTB DSU
021772,000215: 23,2523 45510 LOADTIME
021773,000216: 23,2524 02325 TSTART82 # PRESENT TIME - TIME V82GOFF1 BEGAN
021774,000217: 23,2525 02325 STORE TSTART82 # SAVE IT
021775,000218: 23,2526 53145 DLOAD BZE # SR30.1 SETS -TPER=0 IF HPER L/
021776,000219: 23,2527 02346 -TPER # HPERMIN (300 OR 35) KFT.
021777,000220: 23,2530 46541 TICKTFF # (-TPER = 0)
021778,000221: 23,2531 43345 TICKTPER DLOAD DAD # (-TPER NON ZERO) TFF WAS NOT COMPUTED,
021779,000222: 23,2532 02346 -TPER # BUT WAS SET TO 59M59S. DONT TICK TFF, DO
021780,000223: 23,2533 02325 TSTART82 # TICK -TPER. DISPLAY BOTH.
021781,000224: 23,2534 02346 STORE -TPER # -TPER CORRECTED FOR TIME SINCE V82GOFF1
021782,000225: 23,2535 77776 EXIT # BEGAN.
021783,000226:
021784,000227: 23,2536 35033 CAF BIT1
021785,000228: 23,2537 55742 TS V82FLAGS # INFORMS TICKTEST TO INCREMENT ONLY -TPER
021786,000229: 23,2540 05233 TC ENDOFJOB
021787,000230:
021788,000231: 23,2541 43345 TICKTFF DLOAD DAD # (-TPER=0) TFF WAS COMPUTED. TICK TFF.
021789,000232: 23,2542 02344 TFF # DO NOT TICK -TPER. DISPLAY TFF, BUT NOT
021790,000233: 23,2543 02325 TSTART82 # -TPER.
021791,000234: 23,2544 02344 STORE TFF # TFF CORRECTED FOR TIME SINCE V82GOFF1
021792,000235: 23,2545 77776 EXIT # BEGAN.
021793,000236: 23,2546 35032 CAF BIT2
021794,000237: 23,2547 55742 TS V82FLAGS # INFORMS TICKTEST TO INCREMENT ONLY TFF.
021795,000238: 23,2550 05233 TC ENDOFJOB
021796,000239:
021797,000240: 23,2551 35027 TICKTEST CAF BIT5 # THIS WAITLIST PROGRAM PERPETUATES ITSELF
021798,000241: 23,2552 71044 MASK EXTVBACT # ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
021799,000242: 23,2553 10000 CCS A
021800,000243: 23,2554 02562 TC DOTICK
021801,000244: 23,2555 37662 CAF PRIO25
021802,000245: 23,2556 05150 TC NOVAC # TERMINATE V 82. CANT CALL ENDEXT IN RUPT.
021803,000246: 23,2557 1044 EBANK= EXTVBACT
021804,000247: 23,2557 05550 04062 2CADR ENDEXT
021805,000248:
021806,000249: 23,2561 05340 TC TASKOVER
021807,000250: 23,2562 35055 DOTICK CAF 1SEC # RE-REQUEST TICKTEST.
021808,000251: 23,2563 05261 TC WAITLIST
021809,000252: 23,2564 E4,1743 EBANK= TFF
021810,000253: 23,2564 02551 46064 2CADR TICKTEST
021811,000254:
021812,000255: 23,2566 36214 CAF THREE
021813,000256: 23,2567 71742 MASK V82FLAGS
021814,000257: 23,2570 50000 INDEX A
021815,000258: 23,2571 02572 TC +1
021816,000259: 23,2572 05340 TC TASKOVER # IF NO FLAGBITS SET DONT CHANGE TFF OR
021817,000260: # -TPER, BUT CONTINUE LOOP.
021818,000261: 23,2573 02601 TC TPERTICK # ONLY BIT 1 SET. INCR -TPER BY 1 SEC.
021819,000262: 23,2574 35055 TFFTICK CAF 1SEC # ONLY BIT 2 SET. INCR TFF BY 1 SEC.
021820,000263: 23,2575 54001 TS L
021821,000264: 23,2576 35035 CAF ZERO
021822,000265: 23,2577 21744 DAS TFF
021823,000266: 23,2600 05340 TC TASKOVER
021824,000267: 23,2601 35055 TPERTICK CAF 1SEC
021825,000268: 23,2602 54001 TS L
021826,000269: 23,2603 35035 CAF ZERO
021827,000270: 23,2604 21746 DAS -TPER
021828,000271: 23,2605 05340 TC TASKOVER
021829,000272:
021830,000273: 20,2000 SETLOC R30LOC1
021831,000274: 20,2000 BANK
021832,000275: 20,2201 COUNT* $$/R30
021833,000276: 20,2201 77776 V82GON EXIT # AVERAGE G ON. USE CURRENT STATE VECTOR
021834,000277: # FOR ORBITAL PARAMETER CALCULATIONS.
021835,000278: 20,2202 35077 CAF PRIO7 # LESS THAN LAMBERT
021836,000279: 20,2203 05163 TC FINDVAC # V82GON1 WILL PERFORM ORBIT CALCULATIONS
021837,000280: 20,2204 E4,1743 EBANK= TFF # ABOUT PROPER BODY APPROX ONCE PER SEC.
021838,000281: 20,2204 02606 46064 2CADR V82GON1
021839,000282:
021840,000283: 20,2206 00003 RELINT
021841,000284: 20,2207 10067 CCS NEWJOB # WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
021842,000285: 20,2210 05200 TC CHANG1 # IS DONE. NOTE: V82GON1 (PRIO7, FINDVAC
021843,000286: # JOB) IS COMPLETED BEFORE V82GON (PRIO7,
021844,000287: # NOVAC JOB).
021845,000288: 20,2211 32217 V82REDSP CAF V16N44X # MONITOR HAPO, HPER, TFF
021846,000289: 20,2212 04676 TC BANKCALL
021847,000290: 20,2213 20561 CADR GOXDSPF
021848,000291: 20,2214 05641 TC B5OFF # TERM THIS TELLS V82GON1 TO KILL ITSELF.
021849,000292: 20,2215 05641 TC B5OFF # PROC DITTO.
021850,000293: 20,2216 02211 TC V82REDSP # RECYCLE
021851,000294:
021852,000295: 20,2217 04054 V16N44X VN 1644
021853,000296:
021854,000297: 23,2000 SETLOC R30LOC
021855,000298: 23,2000 BANK
021856,000299: 23,2606 COUNT* $$/R30
021857,000300: 23,2606 06006 V82GON1 TC INTPRET # THIS EXEC PROGRAM PERPETUATES ITSELF
021858,000301: # ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
021859,000302: 23,2607 52175 VLOAD GOTO # HOLDS OFF CCS NEWJOB BETWEEN RN AND
021860,000303: 23,2610 01171 RN # VN FETCH SO RN, VN ARE FROM SAME
021861,000304: 23,2611 46612 NEXTLINE # STATE VECTOR UPDATE.
021862,000305: 23,2612 26327 NEXTLINE STOVL RONE # RN AT (-29)M FOR EARTH OR MOON
021863,000306: 23,2613 01177 VN
021864,000307: 23,2614 02335 STORE VONE # VN AT (-7)M/CS FOR EARTH OR MOON
021865,000308: 23,2615 52014 BON GOTO
021866,000309: 23,2616 00315 AMOONFLG # FLAG INDICATES BODY ABOUT WHICH ORBITAL
021867,000310: 23,2617 46621 MOONGON # CALCULATIONS ARE TO BE PERFORMED.
021868,000311: 23,2620 46632 EARTHGON # IF SET - MOON, IF RESET - EARTH.
021869,000312:
021870,000313: 23,2621 71214 MOONGON SET DLOAD
021871,000314: 23,2622 04462 V82EMFLG # INDICATE MOON SCALING FOR SR30.1
021872,000315: 23,2623 06474 1/RTMUM # LUNAR PARAMETERS LOADED HERE FOR SR30.1
021873,000316: 23,2624 14037 STODL TFF/RTMU
021874,000317: 23,2625 06500 MINPERM
021875,000318: 23,2626 26321 STOVL HPERMIN
021876,000319: 23,2627 02026 RLS # SCALED AT (-27)M.
021877,000320: 23,2630 52046 ABVAL GOTO
021878,000321: 23,2631 46641 V82GON2
021879,000322: 23,2632 71214 EARTHGON CLEAR DLOAD
021880,000323: 23,2633 04662 V82EMFLG # INDICATE EARTH SCALING FOR SR30.1
021881,000324: 23,2634 06476 1/RTMUE # EARTH PARAMETERS LOADED HERE FOR SR30.1
021882,000325: 23,2635 14037 STODL TFF/RTMU
021883,000326: 23,2636 06502 MINPERE
021884,000327: 23,2637 16321 STODL HPERMIN
021885,000328: 23,2640 05152 RPAD
021886,000329: 23,2641 36323 V82GON2 STCALL RPADTEM # COMMON CODE FOR EARTH & MOON.
021887,000330: 23,2642 46671 SR30.1
021888,000331: 23,2643 77776 EXIT
021889,000332: 23,2644 05400 TC CHECKMM
021890,000333: 23,2645 00013 DEC 11 B-14
021891,000334: 23,2646 02661 TC V82GON3 # NOT IN MODE 11.
021892,000335: 23,2647 06006 CANDEL TC INTPRET # IN MODE 11 OR 00
021893,000336: 23,2650 77624 CALL
021894,000337: 23,2651 27446 INTSTALL # DELRSPL DOES INTWAKE
021895,000338: 23,2652 45145 DLOAD CALL
021896,000339: 23,2653 02344 TFF
021897,000340: 23,2654 64017 DELRSPL # RETURN IS TO NEXT LINE (SPLRET).
021898,000341: 23,2655 77776 SPLRET EXIT
021899,000342:
021900,000343: 23,2656 31011 CA MODREG
021901,000344: 23,2657 00006 EXTEND
021902,000345: 23,2660 12521 BZF SPLRET1
021903,000346: 23,2661 35027 V82GON3 CAF BIT5
021904,000347: 23,2662 71044 MASK EXTVBACT # SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
021905,000348: 23,2663 00006 EXTEND
021906,000349: 23,2664 15550 BZF ENDEXT # YES, TERMINATE VB 82 LOOP
021907,000350: 23,2665 35055 CAF 1SEC
021908,000351: 23,2666 04676 TC BANKCALL # WAIT ONE SECOND BEFORE REPEATING
021909,000352: 23,2667 01732 CADR DELAYJOB # ORBITAL PARAMETER COMPUTATION.
021910,000353: 23,2670 02606 TC V82GON1
021911,000354:
021912,000355: # SUBROUTINE NAME: SR30.1
021913,000356: # MOD NO: 0 DATE: 16 FEB 67
021914,000357: # MOD BY: RR BAIRNSFATHER LOG SECTION: R32
021915,000358: # MOD NO: 1 MOD BY: RR BAIRNSFATHER DATE: 11 APR 67 SR30.1 CHANGED TO ALLOW MONITOR OPERN
021916,000359: # MOD NO: 2 MOD BY: RR BAIRNSFATHER DATE: 14 APR 67 ADD OVFL CK FOR RAPO
021917,000360: # MOD NO: 3 MOD BY ALONSO DATE: 11 DEC 67 SUBROUTINE REWRITTEN
021918,000361: # MOD NO: 4 MOD BY ALONSO DATE: 26 MAR 68 PROG MOD TO HANDLE DIF EARTH/MOON SCALE
021919,000362: # MOD NO: 5 MOD BY: RR BAIRNSFATHER DATE: 6 AUG 68 OVFL CK FOR HAPO & HPER. VOIDS MOD #2.
021920,000363:
021921,000364: # NEW FUNCTIONAL DESCRIPTION: ORBITAL PARAMETERS DISPLAY FOR NOUNS 32 AND 44.
021922,000365: # SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
021923,000366: # RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
021924,000367: # LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
021925,000368: # TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
021926,000369: # IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
021927,000370: # NEGATIVE IN -TPER. OTHERWISE STORES +0 IN -TPER. WHENEVER TPER IS
021928,000371: # CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC. IF HAPO
021929,000372: # WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
021930,000373:
021931,000374: # ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
021932,000375: # ABOVE REMARKS.
021933,000376:
021934,000377: # CALLING SEQUENCE: CALL
021935,000378: # SR30.1
021936,000379:
021937,000380: # SUBROUTINES CALLED: TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
021938,000381:
021939,000382: # NORMAL EXIT MODE: CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
021940,000383:
021941,000384: # ALARMS: NONE
021942,000385:
021943,000386: # OUTPUT: RAPO (-29) M EARTH APOGEE RADIUS EARTH CENTERED COORD.
021944,000387: # (-27) M MOON MOON CENTERED COORD.
021945,000388: # RPER (-29) M EARTH PERIGEE RADIUS EARTH CENTERED COORD.
021946,000389: # (-27) M MOON MOON CENTERED COORD.
021947,000390: # HAPOX (-29) M APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
021948,000391: # HPERX (-29) M PERIGEE ALT. ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
021949,000392: # TFF (-28) CS TIME TO 300KFT OR 35KFT ALTITUDE
021950,000393: # -TPER (-28) CS TIME TO PERIGEE
021951,000394:
021952,000395: # ERASABLE INITIALIZATION REQUIRED -
021953,000396: # TFF/RTMU (+17) EARTH RECIPROCAL OF PROPER GRAV CONSTANT FOR
021954,000397: # (+14) MOON EARTH OR MOON = 1/SQRT(MU).
021955,000398: # RONE (-29) M STATE VECTOR
021956,000399: # VONE (-7) M/CS STATE VECTOR
021957,000400: # RPADTEM (-29) M EARTH RADIUS OF LAUNCH PAD OR LUNAR LANDING
021958,000401: # (-27) M MOON SITE.
021959,000402: # HPERMIN (-29) M EARTH (300 OR 35) KFT MINIMUM PERIGEE ALTITUDE
021960,000403: # (-27) M MOON ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
021961,000404: # V82EMFLG (INT SW BIT) RESET FOR EARTH, SET FOR MOON.
021962,000405:
021963,000406: # DEBRIS: QPRET, PDL, S2
021964,000407:
021965,000408: 23,2671 COUNT* $$/SR30S
021966,000409:
021967,000410: 23,2671 44001 SR30.1 SETPD STQ # INITIALIZE PUSHDOWN LIST.
021968,000411: 23,2672 00001 0
021969,000412: 23,2673 00051 S2
021970,000413: # SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
021971,000414: # VONE AT (-7)M/CS
021972,000415: # TFFCONMU, TFFRP/RA, CALCTPER AND CALCTFF
021973,000416: # CALLS REQUIRE:
021974,000417: # EARTH CENTERED (NO RESCALING REQUIRED)
021975,000418: # RONE SCALED TO B-29 M
021976,000419: # VONE SCALED TO B-7 M/CS
021977,000420: # MOON CENTERED (RESCALING REQUIRED)
021978,000421: # RONE SCALED TO B-27 M
021979,000422: # VONE SCALED TO B-5 M/CS
021980,000423: 23,2674 77214 BOFF VLOAD
021981,000424: 23,2675 04742 V82EMFLG # OFF FOR EARTH, ON FOR MOON.
021982,000425: 23,2676 46705 TFFCALLS
021983,000426: 23,2677 02327 RONE
021984,000427: 23,2700 77752 VSL2
021985,000428: 23,2701 26327 STOVL RONE
021986,000429: 23,2702 02335 VONE
021987,000430: 23,2703 77752 VSL2
021988,000431: 23,2704 02335 STORE VONE
021989,000432: 23,2705 77624 TFFCALLS CALL
021990,000433: 23,2706 56761 TFFCONMU
021991,000434: 23,2707 77624 CALL # TFFRP/RA COMPUTES RAPO,RPER.
021992,000435: 23,2710 57027 TFFRP/RA
021993,000436: # RETURNS WITH RAPO IN D(MPAC).
021994,000437: 23,2711 77625 DSU
021995,000438: 23,2712 02323 RPADTEM
021996,000439: 23,2713 64414 BOFF SR2R # NEED HAPO AT (-29)M FOR DISPLAY.
021997,000440: # IF MOON CENTERED, RESCALE FROM (-27)M.
021998,000441: # IF EARTH CENTERED ALREADY AT (-29)M.
021999,000442: 23,2714 04742 V82EMFLG # OFF FOR EARTH, ON FOR MOON.
022000,000443: 23,2715 46716 +1
022001,000444: 23,2716 77624 CALL # IF HAPO > MAXNM, SET HAPO =9999.9 NM.
022002,000445: 23,2717 46756 MAXCHK # OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
022003,000446: 23,2720 16352 STORHAPO STODL HAPOX
022004,000447: 23,2721 00017 RPER
022005,000448: 23,2722 77625 DSU
022006,000449: 23,2723 02323 RPADTEM # GIVES HPER AT (-29)M EARTH, (-27)M MOON.
022007,000450: 23,2724 00161 STORE MPAC +4 # SAVE THIS FOR COMPARISON TO HPERMIN.
022008,000451: 23,2725 64414 BOFF SR2R # NEED HPER AT (-29)M FOR DISPLAY.
022009,000452: # IF MOON CENTERED, RESCALE FROM (-27)M.
022010,000453: # IF EARTH CENTERED ALREADY AT (-29)M.
022011,000454: 23,2726 04742 V82EMFLG # OFF FOR EARTH, ON FOR MOON.
022012,000455: 23,2727 46730 +1
022013,000456: 23,2730 77624 CALL # IF HPER > MAXNM, SET HPER = 9999.9 NM.
022014,000457: 23,2731 46756 MAXCHK
022015,000458: 23,2732 16354 STORHPER STODL HPERX # STORE (RPER - RPADTEM) INTO HPERX.
022016,000459: 23,2733 00161 MPAC +4
022017,000460: 23,2734 51025 DSU BPL # HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
022018,000461: 23,2735 02321 HPERMIN # IF HPER L/ HPERMIN (300 OR 35) KFT,
022019,000462: 23,2736 46742 DOTPER # THEN ZERO INTO -TPER.
022020,000463: 23,2737 52145 DLOAD GOTO # OTHERWISE CALCULATE TPER.
022021,000464: 23,2740 15334 HI6ZEROS
022022,000465: 23,2741 46746 SKIPTPER
022023,000466: 23,2742 45145 DOTPER DLOAD CALL
022024,000467: 23,2743 00017 RPER
022025,000468: 23,2744 57065 CALCTPER
022026,000469: 23,2745 77676 DCOMP # TPER IS PUT NEG INTO -TPER.
022027,000470: 23,2746 16346 SKIPTPER STODL -TPER
022028,000471: 23,2747 02321 HPERMIN # HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
022029,000472: 23,2750 45015 DAD CALL
022030,000473: 23,2751 02323 RPADTEM # RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
022031,000474: 23,2752 57070 CALCTFF # GIVES 59M59S FOR TFF IF RPER G/
022032,000475: 23,2753 77676 DCOMP # HPERMIN + RPADTEM. (TPER WAS NON ZERO)
022033,000476: 23,2754 36344 STCALL TFF # OTHERWISE COMPUTES TFF. (GOTO)
022034,000477: 23,2755 00051 S2
022035,000478:
022036,000479: 23,2756 51025 MAXCHK DSU BPL # IF C(MPAC) > 9999.9 NM, MPAC = 9999.9 NM
022037,000480: 23,2757 06766 MAXNM
022038,000481: 23,2760 46763 +3 # OTHERWISE C(MPAC) = B(MPAC).
022039,000482: 23,2761 43415 DAD RVQ
022040,000483: 23,2762 06766 MAXNM
022041,000484: 23,2763 43545 +3 DLOAD RVQ # (USED BY P30 - P37 ALSO)
022042,000485: 23,2764 06766 MAXNM
022043,000486:
022044,000487: 23,2765 01065 05603 MAXNM 2OCT 0106505603
End of include-file R30.agc. Parent file is MAIN.agc