Source Code
These source-code files are part of a reconstructed copy of Comanche 45, the
second release, though not the final mission release, of the Apollo 10
Command Module (CM) Apollo Guidance Computer (AGC) software. Comanche 45 was
preceded by Comanche 44 and followed by Comanche 45/2 (the flown release). The reconstruction
is believed to be exactly accurate, but in the absence of an actual Apollo-era
listing of Comanche 45, some explanation of the reconstruction process is needed
to insure confidence in that accuracy.
The starting point was the source code of Comanche 44 (itself previously accurately reconstructed). Comanche 44 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 44 and 45. The now-reconstructed Comanche 45 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 listing. Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository. |
021877,000002: ## Copyright: Public domain.
021878,000003: ## Filename: R30.agc
021879,000004: ## Purpose: A section of Comanche revision 045.
021880,000005: ## It is part of the reconstructed source code for the
021881,000006: ## second release of the flight software for the Command
021882,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
021883,000008: ## The code has been recreated from a copy of Comanche 055. It
021884,000009: ## has been adapted such that the resulting bugger words
021885,000010: ## exactly match those specified for Comanche 45 in NASA drawing
021886,000011: ## 2021153D, which gives relatively high confidence that the
021887,000012: ## reconstruction is correct.
021888,000013: ## Assembler: yaYUL
021889,000014: ## Contact: Ron Burkey <info@sandroid.org>.
021890,000015: ## Website: www.ibiblio.org/apollo/index.html
021891,000016: ## Mod history: 2020-12-06 MAS Created from Comanche 44.
021892,000017:
Page 514 |
021894,000019: # SUBROUTINE NAME: V82CALL
021895,000020: # MOD NO: 0 DATE: 16 FEB 67
021896,000021: # MOD BY: RR BAIRNSFATHER LOG SECTION: R30
021897,000022: # MOD NO: 1 MOD BY: RR BAIRNSFATHER DATE: 11 APR 67 SR30.1 CHANGED TO ALLOW MONITOR OPERN
021898,000023: # MOD NO: 2 MOD BY ALONSO DATE: 11 DEC 67 VB82 PROGRAM REWRITTEN
021899,000024: # MOD NO: 3 MOD BY ALONSO DATE: 26 MAR 68 PROG MOD TO HANDLE DIF EARTH/MOON SCALE
021900,000025:
021901,000026: # NEW FUNCTIONAL DESCRIPTION: CALLED BY VERB 82 ENTER. PRIORITY 10
021902,000027: # USED THROUGHOUT. CALCULATE AND DISPLAY ORBITAL PARAMETERS
021903,000028:
021904,000029: # 1. IF AVERAGE G IS OFF:
021905,000030: # FLASH DISPLAY V04N06. R2 INDICATES WHICH SHIP'S STATE VECTOR IS
021906,000031: # TO BE UPDATED. INITIAL CHOICE IS THIS SHIP (R2=1). ASTRONAUT
021907,000032: # CAN CHANGE TO OTHER SHIP BY V22EXE, WHERE X NOT EQ 1.
021908,000033: # SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
021909,000034: # CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
021910,000035: # RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
021911,000036: # HEIGHT ABOVE LAUNCH PAD OR LUNAR LANDING SITE), HAPO (APOGEE
021912,000037: # HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
021913,000038: # INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
021914,000039: # FLASH MONITOR V16N44 (HAPO, HPER, TFF). TFF IS -59M59S IF IT WAS
021915,000040: # NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
021916,000041: # ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
021917,000042: # DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
021918,000043: # ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
021919,000044: # 2. IF AVERAGE G IS ON:
021920,000045: # CALLS SR30.1 APPROX EVERY TWO SECS. STATE VECTOR IS ALWAYS
021921,000046: # FOR THIS VEHICLE. V82 DOES NOT DISTURB STATE VECTOR. RESULTS
021922,000047: # OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
021923,000048: # FLASH MONITOR V16N44 (HAPO, HPER, TFF).
021924,000049: # IF MODE IS P11, THEN CALL DELRSPL SO ASTRONAUT CAN MONITOR
021925,000050: # RESULTS BY N50E. SPLASH COMPUTATION DONE ONCE PER TWO SECS.
021926,000051: # ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
021927,000052: # ABOVE REMARKS.
021928,000053:
021929,000054: # CALLING SEQUENCE: VERB 82 ENTER.
021930,000055:
021931,000056: # SUBROUTINES CALLED: SR30.1, GOXDSPF
021932,000057: # MAYBE - THISPREC, OTHPREC, LOADTIME, DELRSPL
021933,000058:
021934,000059: # NORMAL EXIT MODES: TC ENDEXT
021935,000060:
021936,000061: # ALARMS: NONE
021937,000062:
021938,000063: # OUTPUT: HAPOX (-29) M
021939,000064: # HPERX (-29) M
021940,000065: # RAPO (-29) M EARTH
021941,000066: # (-27) M MOON
Page 515 |
021943,000068: # RPER (-29) M EARTH
021944,000069: # (-27) M MOON
021945,000070: # TFF (-28) CS CONTAINS NEGATIVE QUANTITY
021946,000071: # -TPER (-28) CS CONTAINS NEGATIVE QUANTITY
021947,000072: # RSP-RREC(-29) M IF DELRSPL CALLED
021948,000073:
021949,000074: # ERASABLE INITIALIZATION REQUIRED: STATE VECTOR.
021950,000075:
021951,000076: # DEBRIS: QPRET, RONE, VONE, TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
021952,000077: # MAYBE: TSTART82, V82FLAGS, TDEC1.
021953,000078:
021954,000079: 13,2231 E4,1751 EBANK= HAPOX
021955,000080: 31,2332 BANK 31
021956,000081: 23,2000 SETLOC R30LOC
021957,000082: 23,2000 BANK
021958,000083: 23,2332 COUNT* $$/R30
021959,000084:
021960,000085: 23,2332 06006 V82CALL TC INTPRET
021961,000086: 23,2333 52014 BON GOTO
021962,000087: 23,2334 00716 AVEGFLAG
021963,000088: 23,2335 46566 V82GON # IF AVERAGE G ON
021964,000089: 23,2336 46337 V82GOFF # IF AVERAGE G OFF
021965,000090:
021966,000091: 23,2337 77776 V82GOFF EXIT # ALLOW ASTRONAUT TO SELECT VEHICLE
021967,000092: 23,2340 35016 CAF TWO # DESIRED FOR ORBITAL PARAMETERS
021968,000093: 23,2341 55051 TS OPTIONX
021969,000094: 23,2342 35017 CAF ONE
021970,000095: 23,2343 55052 TS OPTIONX +1
021971,000096: 23,2344 32406 CAF OPTIONVN # V 04 N 06
021972,000097: 23,2345 04662 TC BANKCALL
021973,000098: 23,2346 20561 CADR GOXDSPF
021974,000099: 23,2347 05534 TC ENDEXT # TERMINATE
021975,000100: 23,2350 02352 TC +2 # PROCEED
021976,000101: 23,2351 02344 TC -5 # DATA IN. OPTIONX +1 = 1 FOR THIS VEHIC.
021977,000102: # UNEQ 1 FOR OTHER VEHICLE.
021978,000103: 23,2352 35014 CAF BIT4 # 80 MS
021979,000104: 23,2353 05245 TC WAITLIST
021980,000105: 23,2354 E4,1743 EBANK= TFF
021981,000106: 23,2354 02531 46064 2CADR TICKTEST
021982,000107:
021983,000108: 23,2356 00003 RELINT
021984,000109: 23,2357 32410 V82GOFLP CAF TFFBANK # MAJOR RECYCLE LOOP ENTRY
021985,000110: 23,2360 54003 TS EBANK
021986,000111: 23,2361 35021 CAF ZERO
021987,000112: 23,2362 55742 TS V82FLAGS # ZERO FLAGS FOR TICKTEST. INHIBITS
021988,000113: # DECREMENTING OF TFF AND -TPER.
021989,000114: 23,2363 35063 CAF PRIO7
021990,000115: 23,2364 05147 TC FINDVAC # V82GOFF1 WILL EXECUTE STATE VECTOR
Page 516 |
021992,000117: 23,2365 E4,1743 EBANK= TFF # UPDATE AND ORBIT CALCULATIONS FOR
021993,000118: 23,2365 02411 46064 2CADR V82GOFF1 # SELECTED VEHICLE ABOUT PROPER BODY.
021994,000119:
021995,000120: 23,2367 00003 RELINT
021996,000121: 23,2370 36214 V82STALL CAF THREE # STALL IN THIS LOOP AND WITHOLD V 16 N 44
021997,000122: 23,2371 71742 MASK V82FLAGS # UNTIL STATE VECTOR UPDATE SETS ONE OF
021998,000123: 23,2372 10000 CCS A # OUR FLAG BITS.
021999,000124: 23,2373 02400 TC FLAGGON # EXIT FROM STALL LOOP.
022000,000125: 23,2374 35041 CAF 1SEC
022001,000126: 23,2375 04662 TC BANKCALL
022002,000127: 23,2376 01732 CADR DELAYJOB
022003,000128: 23,2377 02370 TC V82STALL
022004,000129:
022005,000130: 23,2400 32407 FLAGGON CAF V16N44 # MONITOR HAPO,HPER,TFF.
022006,000131: 23,2401 04662 TC BANKCALL
022007,000132: 23,2402 20561 CADR GOXDSPF
022008,000133: 23,2403 05625 TC B5OFF # TERM THIS TELLS TICKTEST TO KILL ITSELF
022009,000134: 23,2404 05625 TC B5OFF # PROCEED DITTO
022010,000135: 23,2405 02357 TC V82GOFLP # RECYCLE RECOMPUTE STATE VECT + DISPLAY
022011,000136:
022012,000137: 23,2406 01014 OPTIONVN VN 0412
022013,000138: 23,2407 04054 V16N44 VN 1644
022014,000139: 23,2410 02343 TFFBANK ECADR TFF
022015,000140:
022016,000141: 23,2411 06006 V82GOFF1 TC INTPRET
022017,000142: 23,2412 77634 RTB
022018,000143: 23,2413 45510 LOADTIME
022019,000144: 23,2414 00041 STORE TDEC1 # TIME FOR STATE VECTOR UPDATE.
022020,000145: 23,2415 02325 STORE TSTART82 # TIME FOR INTERNAL USE.
022021,000146: 23,2416 77776 EXIT
022022,000147: 23,2417 41052 CS OPTIONX +1 # 1 FOR THIS VEHICLE, NOT 1 FOR OTHER
022023,000148: 23,2420 65017 AD ONE
022024,000149: 23,2421 00006 EXTEND
022025,000150: 23,2422 12446 BZF THISSHIP
022026,000151: 23,2423 06006 OTHSHIP TC INTPRET
022027,000152: 23,2424 77624 CALL # CALL STATE VECTOR UPDATE FOR OTHER SHIP.
022028,000153: 23,2425 27105 OTHPREC
022029,000154: 23,2426 77775 BOTHSHIP VLOAD # MOVE RESULTS INTO TFFCONIC STORAGE AREAS
022030,000155: 23,2427 00001 RATT # TO BE CALLED BY SR30.1.
022031,000156: 23,2430 26327 STOVL RONE # RATT AT (-29)M FOR EARTH OR MOON
022032,000157: 23,2431 00007 VATT
022033,000158: 23,2432 02335 STORE VONE # VATT AT (-7)M/CS FOR EARTH OR MOON
022034,000159: 23,2433 77743 DLOAD*
022035,000160: 23,2434 71321 1/RTMUE,2 # X2 IS 0 FOR EARTH CENTERED STATE VEC
HG remark: In Comanche055 scan this line (5324) looks pretty much like 1/RTMUF.2 can not decide, leave it as it is in start source. |
022038,000163: 23,2435 00037 STORE TFF/RTMU # X2 IS 2 FOR MOON
022039,000164: 23,2436 77743 DLOAD* # AS LEFT BY THISPREC OR OTHPREC.
022040,000165: 23,2437 71315 MINPERE,2
022041,000166: 23,2440 02321 STORE HPERMIN # TFFRTMU, HPERMIN AND RPADTEM ARE ALL
022042,000167: 23,2441 46135 SLOAD BHIZ # EARTH/MOON PARAMETERS AS SET HERE.
Page 517 |
022044,000169: 23,2442 00050 X2
022045,000170: 23,2443 46463 EARTHPAD
022046,000171: 23,2444 77650 GOTO
022047,000172: 23,2445 46467 MOONPAD
022048,000173: 23,2446 06006 THISSHIP TC INTPRET
022049,000174: 23,2447 77624 CALL # CALL STATE VECTOR UPDATE FOR THIS SHIP.
022050,000175: 23,2450 27071 THISPREC
022051,000176: 23,2451 77650 GOTO
022052,000177: 23,2452 46426 BOTHSHIP
022053,000178:
022054,000179: # THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED. DO NOT SEPARATE PAIRS.
022055,000180:
022056,000181: 23,2453 27533 07571 1/RTMUM 2DEC* .45162595 E-4 B14*
022057,000182: 23,2455 25004 06702 1/RTMUE 2DEC* .50087529 E-5 B17*
022058,000183:
022059,000184: 23,2457 00001 11530 MINPERM 2DEC 10668 B-27 # 35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
022060,000185: 23,2461 00002 31230 MINPERE 2DEC 91440 B-29 # 300 KFT (-29)M FOR EARTH
022061,000186:
022062,000187: 23,2463 43145 EARTHPAD DLOAD CLRGO # PAD 37-B RADIUS. SCALED AT (-29)M.
022063,000188: 23,2464 05152 RPAD
022064,000189: 23,2465 04622 V82EMFLG # INDICATE EARTH SCALING FOR SR30.1
022065,000190: 23,2466 46473 BOTHPAD
022066,000191:
022067,000192: 23,2467 51575 MOONPAD VLOAD ABVAL # COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
022068,000193: 23,2470 02026 RLS # SCALED AT (-27)M.
022069,000194: 23,2471 77614 SET
022070,000195: 23,2472 04462 V82EMFLG # INDICATE MOON SCALING FOR SR30.1
022071,000196: 23,2473 36323 BOTHPAD STCALL RPADTEM
022072,000197: 23,2474 46667 SR30.1 # CALCULATE ORBITAL PARAMETERS
022073,000198: 23,2475 77776 EXIT
022074,000199: 23,2476 31011 CA MODREG # ARE WE IN POO
022075,000200: 23,2477 00006 EXTEND
022076,000201: 23,2500 12645 BZF CANDEL # YES, DO DELRSPL
022077,000202: 23,2501 06006 SPLRET1 TC INTPRET
022078,000203: 23,2502 45234 RTB DSU
022079,000204: 23,2503 45510 LOADTIME
022080,000205: 23,2504 02325 TSTART82 # PRESENT TIME - TIME V82GOFF1 BEGAN
022081,000206: 23,2505 02325 STORE TSTART82 # SAVE IT
022082,000207: 23,2506 53145 DLOAD BZE # SR30.1 SETS -TPER=0 IF HPER L/
022083,000208: 23,2507 02346 -TPER # HPERMIN (300 OR 35) KFT.
022084,000209: 23,2510 46521 TICKTFF # (-TPER = 0)
022085,000210: 23,2511 43345 TICKTPER DLOAD DAD # (-TPER NON ZERO) TFF WAS NOT COMPUTED,
022086,000211: 23,2512 02346 -TPER # BUT WAS SET TO 59M59S. DONT TICK TFF, DO
022087,000212: 23,2513 02325 TSTART82 # TICK -TPER. DISPLAY BOTH.
022088,000213: 23,2514 02346 STORE -TPER # -TPER CORRECTED FOR TIME SINCE V82GOFF1
022089,000214: 23,2515 77776 EXIT # BEGAN.
022090,000215:
Page 518 |
022092,000217: 23,2516 35017 CAF BIT1
022093,000218: 23,2517 55742 TS V82FLAGS # INFORMS TICKTEST TO INCREMENT ONLY -TPER
022094,000219: 23,2520 05217 TC ENDOFJOB
022095,000220:
022096,000221: 23,2521 43345 TICKTFF DLOAD DAD # (-TPER=0) TFF WAS COMPUTED. TICK TFF.
022097,000222: 23,2522 02344 TFF # DO NOT TICK -TPER. DISPLAY TFF, BUT NOT
022098,000223: 23,2523 02325 TSTART82 # -TPER.
022099,000224: 23,2524 02344 STORE TFF # TFF CORRECTED FOR TIME SINCE V82GOFF1
022100,000225: 23,2525 77776 EXIT # BEGAN.
022101,000226: 23,2526 35016 CAF BIT2
022102,000227: 23,2527 55742 TS V82FLAGS # INFORMS TICKTEST TO INCREMENT ONLY TFF.
022103,000228: 23,2530 05217 TC ENDOFJOB
022104,000229:
022105,000230: 23,2531 35013 TICKTEST CAF BIT5 # THIS WAITLIST PROGRAM PERPETUATES ITSELF
022106,000231: 23,2532 71044 MASK EXTVBACT # ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
022107,000232: 23,2533 10000 CCS A
022108,000233: 23,2534 02542 TC DOTICK
022109,000234: 23,2535 37662 CAF PRIO25
022110,000235: 23,2536 05134 TC NOVAC # TERMINATE V 82. CANT CALL ENDEXT IN RUPT.
022111,000236: 23,2537 1044 EBANK= EXTVBACT
022112,000237: 23,2537 05534 04062 2CADR ENDEXT
022113,000238:
022114,000239: 23,2541 05324 TC TASKOVER
022115,000240: 23,2542 35041 DOTICK CAF 1SEC # RE-REQUEST TICKTEST.
022116,000241: 23,2543 05245 TC WAITLIST
022117,000242: 23,2544 E4,1743 EBANK= TFF
022118,000243: 23,2544 02531 46064 2CADR TICKTEST
022119,000244:
022120,000245: 23,2546 36214 CAF THREE
022121,000246: 23,2547 71742 MASK V82FLAGS
022122,000247: 23,2550 50000 INDEX A
022123,000248: 23,2551 02552 TC +1
022124,000249: 23,2552 05324 TC TASKOVER # IF NO FLAGBITS SET DONT CHANGE TFF OR
022125,000250: # -TPER, BUT CONTINUE LOOP.
022126,000251: 23,2553 02561 TC TPERTICK # ONLY BIT 1 SET. INCR -TPER BY 1 SEC.
022127,000252: 23,2554 35041 TFFTICK CAF 1SEC # ONLY BIT 2 SET. INCR TFF BY 1 SEC.
022128,000253: 23,2555 54001 TS L
022129,000254: 23,2556 35021 CAF ZERO
022130,000255: 23,2557 21744 DAS TFF
022131,000256: 23,2560 05324 TC TASKOVER
022132,000257: 23,2561 35041 TPERTICK CAF 1SEC
022133,000258: 23,2562 54001 TS L
022134,000259: 23,2563 35021 CAF ZERO
022135,000260: 23,2564 21746 DAS -TPER
022136,000261: 23,2565 05324 TC TASKOVER
Page 519 |
022138,000263: 23,2566 77776 V82GON EXIT # AVERAGE G ON. USE CURRENT STATE VECTOR
022139,000264: # FOR ORBITAL PARAMETER CALCULATIONS.
022140,000265: 23,2567 35063 CAF PRIO7 # LESS THAN LAMBERT
022141,000266: 23,2570 05147 TC FINDVAC # V82GON1 WILL PERFORM ORBIT CALCULATIONS
022142,000267: 23,2571 E4,1743 EBANK= TFF # ABOUT PROPER BODY APPROX ONCE PER SEC.
022143,000268: 23,2571 02604 46064 2CADR V82GON1
022144,000269:
022145,000270: 23,2573 00003 RELINT
022146,000271: 23,2574 10067 CCS NEWJOB # WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
022147,000272: 23,2575 05164 TC CHANG1 # IS DONE. NOTE: V82GON1 (PRIO7, FINDVAC
022148,000273: # JOB) IS COMPLETED BEFORE V82GON (PRIO7,
022149,000274: # NOVAC JOB).
022150,000275: 23,2576 32407 V82REDSP CAF V16N44 # MONITOR HAPO, HPER, TFF
022151,000276: 23,2577 04662 TC BANKCALL
022152,000277: 23,2600 20561 CADR GOXDSPF
022153,000278: 23,2601 05625 TC B5OFF # TERM THIS TELLS V82GON1 TO KILL ITSELF.
022154,000279: 23,2602 05625 TC B5OFF # PROC DITTO.
022155,000280: 23,2603 02576 TC V82REDSP # RECYCLE
022156,000281:
022157,000282: 23,2604 06006 V82GON1 TC INTPRET # THIS EXEC PROGRAM PERPETUATES ITSELF
022158,000283: # ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
022159,000284: 23,2605 52175 VLOAD GOTO # HOLDS OFF CCS NEWJOB BETWEEN RN AND
022160,000285: 23,2606 01171 RN # VN FETCH SO RN, VN ARE FROM SAME
022161,000286: 23,2607 46610 NEXTLINE # STATE VECTOR UPDATE.
022162,000287: 23,2610 26327 NEXTLINE STOVL RONE # RN AT (-29)M FOR EARTH OR MOON
022163,000288: 23,2611 01177 VN
022164,000289: 23,2612 02335 STORE VONE # VN AT (-7)M/CS FOR EARTH OR MOON
022165,000290: 23,2613 52014 BON GOTO
022166,000291: 23,2614 00315 AMOONFLG # FLAG INDICATES BODY ABOUT WHICH ORBITAL
022167,000292: 23,2615 46617 MOONGON # CALCULATIONS ARE TO BE PERFORMED.
022168,000293: 23,2616 46630 EARTHGON # IF SET - MOON, IF RESET - EARTH.
022169,000294:
022170,000295: 23,2617 71214 MOONGON SET DLOAD
022171,000296: 23,2620 04462 V82EMFLG # INDICATE MOON SCALING FOR SR30.1
022172,000297: 23,2621 06454 1/RTMUM # LUNAR PARAMETERS LOADED HERE FOR SR30.1
022173,000298: 23,2622 14037 STODL TFF/RTMU
022174,000299: 23,2623 06460 MINPERM
022175,000300: 23,2624 26321 STOVL HPERMIN
022176,000301: 23,2625 02026 RLS # SCALED AT (-27)M.
022177,000302: 23,2626 52046 ABVAL GOTO
022178,000303: 23,2627 46637 V82GON2
022179,000304: 23,2630 71214 EARTHGON CLEAR DLOAD
022180,000305: 23,2631 04662 V82EMFLG # INDICATE EARTH SCALING FOR SR30.1
022181,000306: 23,2632 06456 1/RTMUE # EARTH PARAMETERS LOADED HERE FOR SR30.1
022182,000307: 23,2633 14037 STODL TFF/RTMU
022183,000308: 23,2634 06462 MINPERE
022184,000309: 23,2635 16321 STODL HPERMIN
022185,000310: 23,2636 05152 RPAD
022186,000311: 23,2637 36323 V82GON2 STCALL RPADTEM # COMMON CODE FOR EARTH & MOON.
022187,000312: 23,2640 46667 SR30.1
Page 520 |
022189,000314: 23,2641 77776 EXIT
022190,000315: 23,2642 05364 TC CHECKMM
022191,000316: 23,2643 00013 DEC 11 B-14
022192,000317: 23,2644 02657 TC V82GON3 # NOT IN MODE 11.
022193,000318: 23,2645 06006 CANDEL TC INTPRET # IN MODE 11 OR 00
022194,000319: 23,2646 77624 CALL
022195,000320: 23,2647 27442 INTSTALL # DELRSPL DOES INTWAKE
022196,000321: 23,2650 45145 DLOAD CALL
022197,000322: 23,2651 02344 TFF
022198,000323: 23,2652 64017 DELRSPL # RETURN IS TO NEXT LINE (SPLRET).
022199,000324: 23,2653 77776 SPLRET EXIT
022200,000325:
022201,000326: 23,2654 31011 CA MODREG
022202,000327: 23,2655 00006 EXTEND
022203,000328: 23,2656 12501 BZF SPLRET1
022204,000329: 23,2657 35013 V82GON3 CAF BIT5
022205,000330: 23,2660 71044 MASK EXTVBACT # SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
022206,000331: 23,2661 00006 EXTEND
022207,000332: 23,2662 15534 BZF ENDEXT # YES, TERMINATE VB 82 LOOP
022208,000333: 23,2663 35041 CAF 1SEC
022209,000334: 23,2664 04662 TC BANKCALL # WAIT ONE SECOND BEFORE REPEATING
022210,000335: 23,2665 01732 CADR DELAYJOB # ORBITAL PARAMETER COMPUTATION.
022211,000336: 23,2666 02604 TC V82GON1
022212,000337:
Page 521 |
022214,000339: # SUBROUTINE NAME: SR30.1
022215,000340: # MOD NO: 0 DATE: 16 FEB 67
022216,000341: # MOD BY: RR BAIRNSFATHER LOG SECTION: R32
022217,000342: # MOD NO: 1 MOD BY: RR BAIRNSFATHER DATE: 11 APR 67 SR30.1 CHANGED TO ALLOW MONITOR OPERN
022218,000343: # MOD NO: 2 MOD BY: RR BAIRNSFATHER DATE: 14 APR 67 ADD OVFL CK FOR RAPO
022219,000344: # MOD NO: 3 MOD BY ALONSO DATE: 11 DEC 67 SUBROUTINE REWRITTEN
022220,000345: # MOD NO: 4 MOD BY ALONSO DATE: 26 MAR 68 PROG MOD TO HANDLE DIF EARTH/MOON SCALE
022221,000346: # MOD NO: 5 MOD BY: RR BAIRNSFATHER DATE: 6 AUG 68 OVFL CK FOR HAPO & HPER. VOIDS MOD #2.
022222,000347:
022223,000348: # NEW FUNCTIONAL DESCRIPTION: ORBITAL PARAMETERS DISPLAY FOR NOUNS 32 AND 44.
022224,000349: # SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
022225,000350: # RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
022226,000351: # LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
022227,000352: # TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
022228,000353: # IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
022229,000354: # NEGATIVE IN -TPER. OTHERWISE STORES +0 IN -TPER. WHENEVER TPER IS
022230,000355: # CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC. IF HAPO
022231,000356: # WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
022232,000357:
022233,000358: # ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
022234,000359: # ABOVE REMARKS.
022235,000360:
022236,000361: # CALLING SEQUENCE: CALL
022237,000362: # SR30.1
022238,000363:
022239,000364: # SUBROUTINES CALLED: TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
022240,000365:
022241,000366: # NORMAL EXIT MODE: CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
022242,000367:
022243,000368: # ALARMS: NONE
022244,000369:
022245,000370: # OUTPUT: RAPO (-29) M EARTH APOGEE RADIUS EARTH CENTERED COORD.
022246,000371: # (-27) M MOON MOON CENTERED COORD.
022247,000372: # RPER (-29) M EARTH PERIGEE RADIUS EARTH CENTERED COORD.
022248,000373: # (-27) M MOON MOON CENTERED COORD.
022249,000374: # HAPOX (-29) M APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
022250,000375: # HPERX (-29) M PERIGEE ALT. ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
022251,000376: # TFF (-28) CS TIME TO 300KFT OR 35KFT ALTITUDE
022252,000377: # -TPER (-28) CS TIME TO PERIGEE
022253,000378:
022254,000379: # ERASABLE INITIALIZATION REQUIRED -
022255,000380: # TFF/RTMU (+17) EARTH RECIPROCAL OF PROPER GRAV CONSTANT FOR
022256,000381: # (+14) MOON EARTH OR MOON = 1/SQRT(MU).
022257,000382: # RONE (-29) M STATE VECTOR
022258,000383: # VONE (-7) M/CS STATE VECTOR
022259,000384: # RPADTEM (-29) M EARTH RADIUS OF LAUNCH PAD OR LUNAR LANDING
022260,000385: # (-27) M MOON SITE.
022261,000386: # HPERMIN (-29) M EARTH (300 OR 35) KFT MINIMUM PERIGEE ALTITUDE
022262,000387: # (-27) M MOON ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
022263,000388: # V82EMFLG (INT SW BIT) RESET FOR EARTH, SET FOR MOON.
022264,000389:
022265,000390: # DEBRIS: QPRET, PDL, S2
022266,000391:
Page 522 |
022268,000393: 23,2667 COUNT* $$/SR30S
022269,000394:
022270,000395: 23,2667 44001 SR30.1 SETPD STQ # INITIALIZE PUSHDOWN LIST.
022271,000396: 23,2670 00001 0
022272,000397: 23,2671 00051 S2
022273,000398: # SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
022274,000399: # VONE AT (-7)M/CS
022275,000400: # TFFCONMU, TFFRP/RA, CALCTPER AND CALCTFF
022276,000401: # CALLS REQUIRE:
022277,000402: # EARTH CENTERED (NO RESCALING REQUIRED)
022278,000403: # RONE SCALED TO B-29 M
022279,000404: # VONE SCALED TO B-7 M/CS
022280,000405: # MOON CENTERED (RESCALING REQUIRED)
022281,000406: # RONE SCALED TO B-27 M
022282,000407: # VONE SCALED TO B-5 M/CS
022283,000408: 23,2672 77214 BOFF VLOAD
022284,000409: 23,2673 04742 V82EMFLG # OFF FOR EARTH, ON FOR MOON.
022285,000410: 23,2674 46703 TFFCALLS
022286,000411: 23,2675 02327 RONE
022287,000412: 23,2676 77752 VSL2
022288,000413: 23,2677 26327 STOVL RONE
022289,000414: 23,2700 02335 VONE
022290,000415: 23,2701 77752 VSL2
022291,000416: 23,2702 02335 STORE VONE
022292,000417: 23,2703 77624 TFFCALLS CALL
022293,000418: 23,2704 56760 TFFCONMU
022294,000419: 23,2705 77624 CALL # TFFRP/RA COMPUTES RAPO,RPER.
022295,000420: 23,2706 57026 TFFRP/RA
022296,000421: # RETURNS WITH RAPO IN D(MPAC).
022297,000422: 23,2707 77625 DSU
022298,000423: 23,2710 02323 RPADTEM
022299,000424: 23,2711 64414 BOFF SR2R # NEED HAPO AT (-29)M FOR DISPLAY.
022300,000425: # IF MOON CENTERED, RESCALE FROM (-27)M.
022301,000426: # IF EARTH CENTERED ALREADY AT (-29)M.
022302,000427: 23,2712 04742 V82EMFLG # OFF FOR EARTH, ON FOR MOON.
022303,000428: 23,2713 46714 +1
022304,000429: 23,2714 77624 CALL # IF HAPO > MAXNM, SET HAPO =9999.9 NM.
022305,000430: 23,2715 46754 MAXCHK # OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
022306,000431: 23,2716 16352 STORHAPO STODL HAPOX
022307,000432: 23,2717 00017 RPER
022308,000433: 23,2720 77625 DSU
022309,000434: 23,2721 02323 RPADTEM # GIVES HPER AT (-29)M EARTH, (-27)M MOON.
022310,000435: 23,2722 00161 STORE MPAC +4 # SAVE THIS FOR COMPARISON TO HPERMIN.
022311,000436: 23,2723 64414 BOFF SR2R # NEED HPER AT (-29)M FOR DISPLAY.
022312,000437: # IF MOON CENTERED, RESCALE FROM (-27)M.
022313,000438: # IF EARTH CENTERED ALREADY AT (-29)M.
022314,000439: 23,2724 04742 V82EMFLG # OFF FOR EARTH, ON FOR MOON.
022315,000440: 23,2725 46726 +1
022316,000441: 23,2726 77624 CALL # IF HPER > MAXNM, SET HPER = 9999.9 NM.
022317,000442: 23,2727 46754 MAXCHK
Page 523 |
022319,000444: 23,2730 16354 STORHPER STODL HPERX # STORE (RPER - RPADTEM) INTO HPERX.
022320,000445: 23,2731 00161 MPAC +4
022321,000446: 23,2732 51025 DSU BPL # HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
022322,000447: 23,2733 02321 HPERMIN # IF HPER L/ HPERMIN (300 OR 35) KFT,
022323,000448: 23,2734 46740 DOTPER # THEN ZERO INTO -TPER.
022324,000449: 23,2735 52145 DLOAD GOTO # OTHERWISE CALCULATE TPER.
022325,000450: 23,2736 15335 HI6ZEROS
022326,000451: 23,2737 46744 SKIPTPER
022327,000452: 23,2740 45145 DOTPER DLOAD CALL
022328,000453: 23,2741 00017 RPER
022329,000454: 23,2742 57064 CALCTPER
022330,000455: 23,2743 77676 DCOMP # TPER IS PUT NEG INTO -TPER.
022331,000456: 23,2744 16346 SKIPTPER STODL -TPER
022332,000457: 23,2745 02321 HPERMIN # HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
022333,000458: 23,2746 45015 DAD CALL
022334,000459: 23,2747 02323 RPADTEM # RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
022335,000460: 23,2750 57067 CALCTFF # GIVES 59M59S FOR TFF IF RPER G/
022336,000461: 23,2751 77676 DCOMP # HPERMIN + RPADTEM. (TPER WAS NON ZERO)
022337,000462: 23,2752 36344 STCALL TFF # OTHERWISE COMPUTES TFF. (GOTO)
022338,000463: 23,2753 00051 S2
022339,000464:
022340,000465: 23,2754 51025 MAXCHK DSU BPL # IF C(MPAC) > 9999.9 NM, MPAC = 9999.9 NM
022341,000466: 23,2755 06764 MAXNM
022342,000467: 23,2756 46761 +3 # OTHERWISE C(MPAC) = B(MPAC).
022343,000468: 23,2757 43415 DAD RVQ
022344,000469: 23,2760 06764 MAXNM
022345,000470: 23,2761 43545 +3 DLOAD RVQ # (USED BY P30 - P37 ALSO)
022346,000471: 23,2762 06764 MAXNM
022347,000472:
022348,000473: 23,2763 01065 05603 MAXNM 2OCT 0106505603
022349,000474:
Page 524 |
022351,000476:
There is no source code on this page — HG 2009 |
End of include-file R30.agc. Parent file is MAIN.agc