Source Code
This is the source-code for the Apollo 9 Command Module's Guidance Computer.
These files were derived originally from the scan from MIT's Dibner Institute's
now-discontinued website titled "History of Recent Science and Technology", which
in turn was originally created by Gary Neff, though his high-quality scans were
unfortunately reduced in legibility when presented online.
The markings on the front of the
printout imply that it was the original AGC developer Norm Brodeur's copy.
A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original
AGC developer Fred Martin. The source code was transcribed from
those images by Ron Burkey. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041 20'35 OCT. 28,1968Note that the date is the date of the printout, not the date of the program revision. |
022081,000002: ## Copyright: Public domain.
022082,000003: ## Filename: R30.agc
022083,000004: ## Purpose: Part of the source code for Colossus, build 249.
022084,000005: ## It is part of the source code for the Command Module's (CM)
022085,000006: ## Apollo Guidance Computer (AGC), for Apollo 9.
022086,000007: ## Assembler: yaYUL
022087,000008: ## Reference: pp. 505-515.
022088,000009: ## Contact: Ron Burkey <info@sandroid.org>.
022089,000010: ## Website: www.ibiblio.org/apollo.
022090,000011: ## Mod history: 08/02/04 RSB. Adapted from corresponding Luminary131 file.
022091,000012: ## 2017-01-06 RSB Page numbers now agree with those on the
022092,000013: ## original harcopy, as opposed to the PDF page
022093,000014: ## numbers in 1701.pdf.
022094,000015: ## 2017-01-18 RSB Cross-diff'd comment text (not whitespace)
022095,000016: ## vs the already-proofed corresponding Colossus
022096,000017: ## 237 and Comanche 55 source-code files
022097,000018: ## and corrected errors found.
022098,000019: ## 2017-02-08 RSB Comment-text fixes discovered while proofing Artemis 72.
022099,000020: ##
022100,000021: ## The contents of the "Colossus249" files, in general, are transcribed
022101,000022: ## from a scanned copy of the program listing. Notations on this
022102,000023: ## document read, in part:
022103,000024: ##
022104,000025: ## Assemble revision 249 of AGC program Colossus by NASA
022105,000026: ## 2021111-041. October 28, 1968.
022106,000027: ##
022107,000028: ## This AGC program shall also be referred to as
022108,000029: ## Colossus 1A
022109,000030: ##
022110,000031: ## Prepared by
022111,000032: ## Massachusetts Institute of Technology
022112,000033: ## 75 Cambridge Parkway
022113,000034: ## Cambridge, Massachusetts
022114,000035: ## under NASA contract NAS 9-4065.
022115,000036: ##
022116,000037: ## Refer directly to the online document mentioned above for further information.
022117,000038: ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
022118,000039: ##
022119,000040: ## In some cases, where the source code for Luminary 131 overlaps that of
022120,000041: ## Colossus 249, this code is instead copied from the corresponding Luminary 131
022121,000042: ## source file, and then is proofed to incorporate any changes.
022122,000043:
Page 505 |
022124,000045: # SUBROUTINE NAME: V82CALL
022125,000046: # MOD NO: 0 DATE: 16 FEB 67
022126,000047: # MOD BY: RR BAIRNSFATHER LOG SECTION: R30
022127,000048: # MOD NO: 1 MOD BY: RR BAIRNSFATHER DATE: 11 APR 67 SR30.1 CHANGED TO ALLOW MONITOR OPERN
022128,000049: # MOD NO: 2 MOD BY ALONSO DATE: 11 DEC 67 VB82 PROGRAM REWRITTEN
022129,000050: # MOD NO: 3 MOD BY ALONSO DATE: 26 MAR 68 PROG MOD TO HANDLE DIF EARTH/MOON SCALE
022130,000051:
022131,000052: # NEW FUNCTIONAL DESCRIPTION: CALLED BY VERB 82 ENTER. PRIORITY 10
022132,000053: # USED THROUGHOUT. CALCULATE AND DISPLAY ORBITAL PARAMETERS
022133,000054:
022134,000055: # 1. IF AVERAGE G IS OFF:
022135,000056: # FLASH DISPLAY V04N06. R2 INDICATES WHICH SHIP'S STATE VECTOR IS
022136,000057: # TO BE UPDATED. INITIAL CHOICE IS THIS SHIP (R2=1). ASTRONAUT
022137,000058: # CAN CHANGE TO OTHER SHIP BY V22EXE, WHERE X NOT EQ 1.
022138,000059: # SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
022139,000060: # CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
022140,000061: # RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
022141,000062: # HEIGHT ABOVE LAUNCH PAD OR LUNAR LANDING SITE), HAPO (APOGEE
022142,000063: # HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
022143,000064: # INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
022144,000065: # FLASH MONITOR V16N44 (HAPO, HPER, TFF). TFF IS -59M59S IF IT WAS
022145,000066: # NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
022146,000067: # ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
022147,000068: # DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
022148,000069: # ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
022149,000070: # 2. IF AVERAGE G IS ON:
022150,000071: # CALLS SR30.1 APPROX EVERY TWO SECS. STATE VECTOR IS ALWAYS
022151,000072: # FOR THIS VEHICLE. V82 DOES NOT DISTURB STATE VECTOR. RESULTS
022152,000073: # OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
022153,000074: # FLASH MONITOR V16N44 (HAPO, HPER, TFF).
022154,000075: # IF MODE IS P11, THEN CALL DELRSPL SO ASTRONAUT CAN MONITOR
022155,000076: # RESULTS BY N50E. SPLASH COMPUTATION DONE ONCE PER TWO SECS.
022156,000077: # ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
022157,000078: # ABOVE REMARKS.
022158,000079:
022159,000080: # CALLING SEQUENCE: VERB 82 ENTER.
022160,000081:
022161,000082: # SUBROUTINES CALLED: SR30.1, GOXDSPF
022162,000083: # MAYBE - THISPREC, OTHPREC, LOADTIME, DELRSPL
022163,000084:
022164,000085: # NORMAL EXIT MODES: TC ENDEXT
022165,000086:
022166,000087: # ALARMS: NONE
022167,000088:
022168,000089: # OUTPUT: HAPOX (-29) M
022169,000090: # HPERX (-29) M
022170,000091: # RAPO (-29) M EARTH
022171,000092: # (-27) M MOON
Page 506 |
022173,000094: # RPER (-29) M EARTH
022174,000095: # (-27) M MOON
022175,000096: # TFF (-28) CS CONTAINS NEGATIVE QUANTITY
022176,000097: # -TPER (-28) CS CONTAINS NEGATIVE QUANTITY
022177,000098: # RSP-RREC(-29) M IF DELRSPL CALLED
022178,000099:
022179,000100: # ERASABLE INITIALIZATION REQUIRED: STATE VECTOR.
022180,000101:
022181,000102: # DEBRIS: QPRET, RONE, VONE, TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
022182,000103: # MAYBE: TSTART82, V82FLAGS, TDEC1.
022183,000104:
022184,000105: 13,2176 E4,1751 EBANK= HAPOX
022185,000106: 31,2021 BANK 31
022186,000107: 23,2000 SETLOC R30LOC
022187,000108: 23,2000 BANK
022188,000109: 23,2332 COUNT* $$/R30
022189,000110:
022190,000111: 23,2332 06006 V82CALL TC INTPRET
022191,000112: 23,2333 52014 BON GOTO
022192,000113: 23,2334 00716 AVEGFLAG
022193,000114: 23,2335 46566 V82GON # IF AVERAGE G ON
022194,000115: 23,2336 46337 V82GOFF # IF AVERAGE G OFF
022195,000116:
022196,000117: 23,2337 77776 V82GOFF EXIT # ALLOW ASTRONAUT TO SELECT VEHICLE
022197,000118: 23,2340 34711 CAF TWO # DESIRED FOR ORBITAL PARAMETERS
022198,000119: 23,2341 55051 TS OPTIONX
022199,000120: 23,2342 34712 CAF ONE
022200,000121: 23,2343 55052 TS OPTIONX +1
022201,000122: 23,2344 32406 CAF OPTIONVN # V 04 N 06
022202,000123: 23,2345 04555 TC BANKCALL
022203,000124: 23,2346 20465 CADR GOXDSPF
022204,000125: 23,2347 05423 TC ENDEXT # TERMINATE
022205,000126: 23,2350 02352 TC +2 # PROCEED
022206,000127: 23,2351 02344 TC -5 # DATA IN. OPTIONX+1 = 1 FOR THIS VEHIC.
022207,000128: # UNEQ 1 FOR OTHER VEHICLE.
022208,000129: 23,2352 34707 CAF BIT4 # 80 MS
022209,000130: 23,2353 05140 TC WAITLIST
022210,000131: 23,2354 E4,1743 EBANK= TFF
022211,000132: 23,2354 02531 46064 2CADR TICKTEST
022212,000133:
022213,000134: 23,2356 00003 RELINT
022214,000135: 23,2357 32410 V82GOFLP CAF TFFBANK # MAJOR RECYCLE LOOP ENTRY
022215,000136: 23,2360 54003 TS EBANK
022216,000137: 23,2361 34714 CAF ZERO
022217,000138: 23,2362 55742 TS V82FLAGS # ZERO FLAGS FOR TICKTEST. INHIBITS
022218,000139: # DECREMENTING OF TFF AND -TPER.
022219,000140: 23,2363 34756 CAF PRIO7
022220,000141: 23,2364 05042 TC FINDVAC # V82GOFF1 WILL EXECUTE STATE VECTOR
Page 507 |
022222,000143: 23,2365 E4,1743 EBANK= TFF # UPDATE AND ORBIT CALCULATIONS FOR
022223,000144: 23,2365 02411 46064 2CADR V82GOFF1 # SELECTED VEHICLE ABOUT PROPER BODY.
022224,000145:
022225,000146: 23,2367 00003 RELINT
022226,000147: 23,2370 36214 V82STALL CAF THREE # STALL IN THIS LOOP AND WITHOLD V 16 N 44
022227,000148: 23,2371 71742 MASK V82FLAGS # UNTIL STATE VECTOR UPDATE SETS ONE OF
022228,000149: 23,2372 10000 CCS A # OUR FLAG BITS.
022229,000150: 23,2373 02400 TC FLAGGON # EXIT FROM STALL LOOP.
022230,000151: 23,2374 34734 CAF 1SEC
022231,000152: 23,2375 04555 TC BANKCALL
022232,000153: 23,2376 01732 CADR DELAYJOB
022233,000154: 23,2377 02370 TC V82STALL
022234,000155:
022235,000156: 23,2400 32407 FLAGGON CAF V16N44 # MONITOR HAPO,HPER,TFF.
022236,000157: 23,2401 04555 TC BANKCALL
022237,000158: 23,2402 20465 CADR GOXDSPF
022238,000159: 23,2403 05514 TC B5OFF # TERM THIS TELLS TICKTEST TO KILL ITSELF
022239,000160: 23,2404 05514 TC B5OFF # PROCEED DITTO
022240,000161: 23,2405 02357 TC V82GOFLP # RECYCLE RECOMPUTE STATE VECT + DISPLAY
022241,000162:
022242,000163: 23,2406 01014 OPTIONVN VN 0412
022243,000164: 23,2407 04054 V16N44 VN 1644
022244,000165: 23,2410 02343 TFFBANK ECADR TFF
022245,000166:
022246,000167: 23,2411 06006 V82GOFF1 TC INTPRET
022247,000168: 23,2412 77634 RTB
022248,000169: 23,2413 45505 LOADTIME
022249,000170: 23,2414 00041 STORE TDEC1 # TIME FOR STATE VECTOR UPDATE.
022250,000171: 23,2415 02325 STORE TSTART82 # TIME FOR INTERNAL USE.
022251,000172: 23,2416 77776 EXIT
022252,000173: 23,2417 41052 CS OPTIONX +1 # 1 FOR THIS VEHICLE, NOT 1 FOR OTHER
022253,000174: 23,2420 64712 AD ONE
022254,000175: 23,2421 00006 EXTEND
022255,000176: 23,2422 12446 BZF THISSHIP
022256,000177: 23,2423 06006 OTHSHIP TC INTPRET
022257,000178: 23,2424 77624 CALL # CALL STATE VECTOR UPDATE FOR OTHER SHIP.
022258,000179: 23,2425 27036 OTHPREC
022259,000180: 23,2426 77775 BOTHSHIP VLOAD # MOVE RESULTS INTO TFFCONIC STORAGE AREAS
022260,000181: 23,2427 00001 RATT # TO BE CALLED BY SR30.1.
022261,000182: 23,2430 26327 STOVL RONE # RATT AT (-29)M FOR EARTH OR MOON
022262,000183: 23,2431 00007 VATT
022263,000184: 23,2432 02335 STORE VONE # VATT AT (-7)M/CS FOR EARTH OR MOON
022264,000185: 23,2433 77743 DLOAD*
022265,000186: 23,2434 71321 1/RTMUE,2 # X2 IS 0 FOR EARTH CENTERED STATE VEC
022266,000187: 23,2435 00037 STORE TFF/RTMU # X2 IS 2 FOR MOON
022267,000188: 23,2436 77743 DLOAD* # AS LEFT BY THISPREC OR OTHPREC.
022268,000189: 23,2437 71315 MINPERE,2
022269,000190: 23,2440 02321 STORE HPERMIN # TFFRTMU, HPERMIN AND RPADTEM ARE ALL
022270,000191: 23,2441 46135 SLOAD BHIZ # EARTH/MOON PARAMETERS AS SET HERE.
Page 508 |
022272,000193: 23,2442 00050 X2
022273,000194: 23,2443 46463 EARTHPAD
022274,000195: 23,2444 77650 GOTO
022275,000196: 23,2445 46467 MOONPAD
022276,000197: 23,2446 06006 THISSHIP TC INTPRET
022277,000198: 23,2447 77624 CALL # CALL STATE VECTOR UPDATE FOR THIS SHIP.
022278,000199: 23,2450 27022 THISPREC
022279,000200: 23,2451 77650 GOTO
022280,000201: 23,2452 46426 BOTHSHIP
022281,000202:
022282,000203: # THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED. DO NOT SEPARATE PAIRS.
022283,000204:
022284,000205: 23,2453 27533 07571 1/RTMUM 2DEC* .45162595 E-4 B14*
022285,000206: 23,2455 25004 06702 1/RTMUE 2DEC* .50087529 E-5 B17*
022286,000207:
022287,000208: 23,2457 00001 11530 MINPERM 2DEC 10668 B-27 # 35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
022288,000209: 23,2461 00002 31230 MINPERE 2DEC 91440 B-29 # 300 KFT (-29)M FOR EARTH
022289,000210:
022290,000211: 23,2463 43145 EARTHPAD DLOAD CLRGO # PAD 37-B RADIUS. SCALED AT (-29)M.
022291,000212: 23,2464 05311 RPAD
022292,000213: 23,2465 04622 V82EMFLG # INDICATE EARTH SCALING FOR SR30.1
022293,000214: 23,2466 46473 BOTHPAD
022294,000215:
022295,000216: 23,2467 51575 MOONPAD VLOAD ABVAL # COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
022296,000217: 23,2470 02026 RLS # SCALED AT (-27)M.
022297,000218: 23,2471 77614 SET
022298,000219: 23,2472 04462 V82EMFLG # INDICATE MOON SCALING FOR SR30.1
022299,000220: 23,2473 36323 BOTHPAD STCALL RPADTEM
022300,000221: 23,2474 46667 SR30.1 # CALCULATE ORBITAL PARAMETERS
022301,000222: 23,2475 77776 EXIT
022302,000223: 23,2476 31011 CA MODREG # ARE WE IN POO
022303,000224: 23,2477 00006 EXTEND
022304,000225: 23,2500 12645 BZF CANDEL # YES, DO DELRSPL
022305,000226: 23,2501 06006 SPLRET1 TC INTPRET
022306,000227: 23,2502 45234 RTB DSU
022307,000228: 23,2503 45505 LOADTIME
022308,000229: 23,2504 02325 TSTART82 # PRESENT TIME - TIME V82GOFF1 BEGAN
022309,000230: 23,2505 02325 STORE TSTART82 # SAVE IT
022310,000231: 23,2506 53145 DLOAD BZE # SR30.1 SETS -TPER=0 IF HPER L/
022311,000232: 23,2507 02346 -TPER # HPERMIN (300 OR 35) KFT.
022312,000233: 23,2510 46521 TICKTFF # (-TPER = 0)
022313,000234: 23,2511 43345 TICKTPER DLOAD DAD # (-TPER NON ZERO) TFF WAS NOT COMPUTED,
022314,000235: 23,2512 02346 -TPER # BUT WAS SET TO 59M59S. DONT TICK TFF, DO
022315,000236: 23,2513 02325 TSTART82 # TICK -TPER. DISPLAY BOTH.
022316,000237: 23,2514 02346 STORE -TPER # -TPER CORRECTED FOR TIME SINCE V82GOFF1
022317,000238: 23,2515 77776 EXIT # BEGAN.
022318,000239:
Page 509 |
022320,000241: 23,2516 34712 CAF BIT1
022321,000242: 23,2517 55742 TS V82FLAGS # INFORMS TICKTEST TO INCREMENT ONLY -TPER
022322,000243: 23,2520 05112 TC ENDOFJOB
022323,000244:
022324,000245: 23,2521 43345 TICKTFF DLOAD DAD # (-TPER=0) TFF WAS COMPUTED. TICK TFF.
022325,000246: 23,2522 02344 TFF # DO NOT TICK -TPER. DISPLAY TFF, BUT NOT
022326,000247: 23,2523 02325 TSTART82 # -TPER.
022327,000248: 23,2524 02344 STORE TFF # TFF CORRECTED FOR TIME SINCE V82GOFF1
022328,000249: 23,2525 77776 EXIT # BEGAN.
022329,000250: 23,2526 34711 CAF BIT2
022330,000251: 23,2527 55742 TS V82FLAGS # INFORMS TICKTEST TO INCREMENT ONLY TFF.
022331,000252: 23,2530 05112 TC ENDOFJOB
022332,000253:
022333,000254: 23,2531 34706 TICKTEST CAF BIT5 # THIS WAITLIST PROGRAM PERPETUATES ITSELF
022334,000255: 23,2532 71044 MASK EXTVBACT # ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
022335,000256: 23,2533 10000 CCS A
022336,000257: 23,2534 02542 TC DOTICK
022337,000258: 23,2535 37662 CAF PRIO25
022338,000259: 23,2536 05027 TC NOVAC # TERMINATE V 82. CANT CALL ENDEXT IN RUPT.
022339,000260: 23,2537 1044 EBANK= EXTVBACT
022340,000261: 23,2537 05423 04062 2CADR ENDEXT
022341,000262:
022342,000263: 23,2541 05213 TC TASKOVER
022343,000264: 23,2542 34734 DOTICK CAF 1SEC # RE-REQUEST TICKTEST.
022344,000265: 23,2543 05140 TC WAITLIST
022345,000266: 23,2544 E4,1743 EBANK= TFF
022346,000267: 23,2544 02531 46064 2CADR TICKTEST
022347,000268:
022348,000269: 23,2546 36214 CAF THREE
022349,000270: 23,2547 71742 MASK V82FLAGS
022350,000271: 23,2550 50000 INDEX A
022351,000272: 23,2551 02552 TC +1
022352,000273: 23,2552 05213 TC TASKOVER # IF NO FLAGBITS SET DONT CHANGE TFF OR
022353,000274: # -TPER, BUT CONTINUE LOOP.
022354,000275: 23,2553 02561 TC TPERTICK # ONLY BIT 1 SET. INCR -TPER BY 1 SEC.
022355,000276: 23,2554 34734 TFFTICK CAF 1SEC # ONLY BIT 2 SET. INCR TFF BY 1 SEC.
022356,000277: 23,2555 54001 TS L
022357,000278: 23,2556 34714 CAF ZERO
022358,000279: 23,2557 21744 DAS TFF
022359,000280: 23,2560 05213 TC TASKOVER
022360,000281: 23,2561 34734 TPERTICK CAF 1SEC
022361,000282: 23,2562 54001 TS L
022362,000283: 23,2563 34714 CAF ZERO
022363,000284: 23,2564 21746 DAS -TPER
022364,000285: 23,2565 05213 TC TASKOVER
022365,000286:
Page 510 |
022367,000288: 23,2566 77776 V82GON EXIT # AVERAGE G ON. USE CURRENT STATE VECTOR
022368,000289: # FOR ORBITAL PARAMETER CALCULATIONS.
022369,000290: 23,2567 34756 CAF PRIO7 # LESS THAN LAMBERT
022370,000291: 23,2570 05042 TC FINDVAC # V82GON1 WILL PERFORM ORBIT CALCULATIONS
022371,000292: 23,2571 E4,1743 EBANK= TFF # ABOUT PROPER BODY APPROX ONCE PER SEC.
022372,000293: 23,2571 02604 46064 2CADR V82GON1
022373,000294:
022374,000295: 23,2573 00003 RELINT
022375,000296: 23,2574 10067 CCS NEWJOB # WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
022376,000297: 23,2575 05057 TC CHANG1 # IS DONE. NOTE: V82GON1 (PRIO7, FINDVAC
022377,000298: # JOB) IS COMPLETED BEFORE V82GON (PRIO7,
022378,000299: # NOVAC JOB).
022379,000300: 23,2576 32407 V82REDSP CAF V16N44 # MONITOR HAPO, HPER, TFF
022380,000301: 23,2577 04555 TC BANKCALL
022381,000302: 23,2600 20465 CADR GOXDSPF
022382,000303: 23,2601 05514 TC B5OFF # TERM THIS TELLS V82GON1 TO KILL ITSELF.
022383,000304: 23,2602 05514 TC B5OFF # PROC DITTO.
022384,000305: 23,2603 02576 TC V82REDSP # RECYCLE
022385,000306:
022386,000307: 23,2604 06006 V82GON1 TC INTPRET # THIS EXEC PROGRAM PERPETUATES ITSELF
022387,000308: # ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
022388,000309: 23,2605 52175 VLOAD GOTO # HOLDS OFF CCS NEWJOB BETWEEN RN AND
022389,000310: 23,2606 01171 RN # VN FETCH SO RN, VN ARE FROM SAME
022390,000311: 23,2607 46610 NEXTLINE # STATE VECTOR UPDATE.
022391,000312: 23,2610 26327 NEXTLINE STOVL RONE # RN AT (-29)M FOR EARTH OR MOON
022392,000313: 23,2611 01177 VN
022393,000314: 23,2612 02335 STORE VONE # VN AT (-7)M/CS FOR EARTH OR MOON
022394,000315: 23,2613 52014 BON GOTO
022395,000316: 23,2614 04303 MOONTHIS # FLAG INDICATES BODY ABOUT WHICH ORBITAL
022396,000317: 23,2615 46617 MOONGON # CALCULATIONS ARE TO BE PERFORMED.
022397,000318: 23,2616 46630 EARTHGON # IF SET - MOON, IF RESET - EARTH.
022398,000319:
022399,000320: 23,2617 71214 MOONGON SET DLOAD
022400,000321: 23,2620 04462 V82EMFLG # INDICATE MOON SCALING FOR SR30.1
022401,000322: 23,2621 06454 1/RTMUM # LUNAR PARAMETERS LOADED HERE FOR SR30.1
022402,000323: 23,2622 14037 STODL TFF/RTMU
022403,000324: 23,2623 06460 MINPERM
022404,000325: 23,2624 26321 STOVL HPERMIN
022405,000326: 23,2625 02026 RLS # SCALED AT (-27)M.
022406,000327: 23,2626 52046 ABVAL GOTO
022407,000328: 23,2627 46637 V82GON2
022408,000329: 23,2630 71214 EARTHGON CLEAR DLOAD
022409,000330: 23,2631 04662 V82EMFLG # INDICATE EARTH SCALING FOR SR30.1
022410,000331: 23,2632 06456 1/RTMUE # EARTH PARAMETERS LOADED HERE FOR SR30.1
022411,000332: 23,2633 14037 STODL TFF/RTMU
022412,000333: 23,2634 06462 MINPERE
022413,000334: 23,2635 16321 STODL HPERMIN
022414,000335: 23,2636 05311 RPAD
022415,000336: 23,2637 36323 V82GON2 STCALL RPADTEM # COMMON CODE FOR EARTH & MOON.
022416,000337: 23,2640 46667 SR30.1
Page 511 |
022418,000339: 23,2641 77776 EXIT
022419,000340: 23,2642 05253 TC CHECKMM
022420,000341: 23,2643 00013 DEC 11 B-14
022421,000342: 23,2644 02657 TC V82GON3 # NOT IN MODE 11.
022422,000343: 23,2645 06006 CANDEL TC INTPRET # IN MODE 11 OR 00
022423,000344: 23,2646 77624 CALL
022424,000345: 23,2647 27371 INTSTALL # DELRSPL DOES INTWAKE
022425,000346: 23,2650 45145 DLOAD CALL
022426,000347: 23,2651 02344 TFF
022427,000348: 23,2652 64017 DELRSPL # RETURN IS TO NEXT LINE (SPLRET).
022428,000349: 23,2653 77776 SPLRET EXIT
022429,000350:
022430,000351: 23,2654 31011 CA MODREG
022431,000352: 23,2655 00006 EXTEND
022432,000353: 23,2656 12501 BZF SPLRET1
022433,000354: 23,2657 34706 V82GON3 CAF BIT5
022434,000355: 23,2660 71044 MASK EXTVBACT # SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
022435,000356: 23,2661 00006 EXTEND
022436,000357: 23,2662 15423 BZF ENDEXT # YES, TERMINATE VB 82 LOOP
022437,000358: 23,2663 34734 CAF 1SEC
022438,000359: 23,2664 04555 TC BANKCALL # WAIT ONE SECOND BEFORE REPEATING
022439,000360: 23,2665 01732 CADR DELAYJOB # ORBITAL PARAMETER COMPUTATION.
022440,000361: 23,2666 02604 TC V82GON1
022441,000362:
Page 512 |
022443,000364: # SUBROUTINE NAME: SR30.1
022444,000365: # MOD NO: 0 DATE: 16 FEB 67
022445,000366: # MOD BY: RR BAIRNSFATHER LOG SECTION: R32
022446,000367: # MOD NO: 1 MOD BY: RR BAIRNSFATHER DATE: 11 APR 67 SR30.1 CHANGED TO ALLOW MONITOR OPERN
022447,000368: # MOD NO: 2 MOD BY: RR BAIRNSFATHER DATE: 14 APR 67 ADD OVFL CK FOR RAPO
022448,000369: # MOD NO: 3 MOD BY ALONSO DATE: 11 DEC 67 SUBROUTINE REWRITTEN
022449,000370: # MOD NO: 4 MOD BY ALONSO DATE: 26 MAR 68 PROG MOD TO HANDLE DIF EARTH/MOON SCALE
022450,000371: # MOD NO: 5 MOD BY: RR BAIRNSFATHER DATE: 6 AUG 68 OVFL CK FOR HAPO & HPER. VOIDS MOD #2.
022451,000372:
022452,000373: # NEW FUNCTIONAL DESCRIPTION: ORBITAL PARAMETERS DISPLAY FOR NOUNS 32 AND 44.
022453,000374: # SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
022454,000375: # RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
022455,000376: # LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
022456,000377: # TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
022457,000378: # IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
022458,000379: # NEGATIVE IN -TPER. OTHERWISE STORES +0 IN -TPER. WHENEVER TPER IS
022459,000380: # CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC. IF HAPO
022460,000381: # WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
022461,000382:
022462,000383: # ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
022463,000384: # ABOVE REMARKS.
022464,000385:
022465,000386: # CALLING SEQUENCE: CALL
022466,000387: # SR30.1
022467,000388:
022468,000389: # SUBROUTINES CALLED: TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
022469,000390:
022470,000391: # NORMAL EXIT MODE: CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
022471,000392:
022472,000393: # ALARMS: NONE
022473,000394:
022474,000395: # OUTPUT: RAPO (-29) M EARTH APOGEE RADIUS EARTH CENTERED COORD.
022475,000396: # (-27) M MOON MOON CENTERED COORD.
022476,000397: # RPER (-29) M EARTH PERIGEE RADIUS EARTH CENTERED COORD.
022477,000398: # (-27) M MOON MOON CENTERED COORD.
022478,000399: # HAPOX (-29) M APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
022479,000400: # HPERX (-29) M PERIGEE ALT. ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
022480,000401: # TFF (-28) CS TIME TO 300KFT OR 35KFT ALTITUDE
022481,000402: # -TPER (-28) CS TIME TO PERIGEE
022482,000403:
022483,000404: # ERASABLE INITIALIZATION REQUIRED -
022484,000405: # TFF/RTMU (+17) EARTH RECIPROCAL OF PROPER GRAV CONSTANT FOR
022485,000406: # (+14) MOON EARTH OR MOON = 1/SQRT(MU).
022486,000407: # RONE (-29) M STATE VECTOR
022487,000408: # VONE (-7) M/CS STATE VECTOR
022488,000409: # RPADTEM (-29) M EARTH RADIUS OF LAUNCH PAD OR LUNAR LANDING
022489,000410: # (-27) M MOON SITE.
022490,000411: # HPERMIN (-29) M EARTH (300 OR 35) KFT MINIMUM PERIGEE ALTITUDE
022491,000412: # (-27) M MOON ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
022492,000413: # V82EMFLG (INT SW BIT) RESET FOR EARTH, SET FOR MOON.
022493,000414:
022494,000415: # DEBRIS: QPRET, PDL, S2
022495,000416:
Page 513 |
022497,000418: 23,2667 COUNT* $$/SR30S
022498,000419:
022499,000420: 23,2667 44001 SR30.1 SETPD STQ # INITIALIZE PUSHDOWN LIST.
022500,000421: 23,2670 00001 0
022501,000422: 23,2671 00051 S2
022502,000423: # SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
022503,000424: # VONE AT (-7)M/CS
022504,000425: # TFFCONMU, TFFRP/RA, CALCTPER AND CALCTFF
022505,000426: # CALLS REQUIRE:
022506,000427: # EARTH CENTERED (NO RESCALING REQUIRED)
022507,000428: # RONE SCALED TO B-29 M
022508,000429: # VONE SCALED TO B-7 M/CS
022509,000430: # MOON CENTERED (RESCALING REQUIRED)
022510,000431: # RONE SCALED TO B-27 M
022511,000432: # VONE SCALED TO B-5 M/CS
022512,000433: 23,2672 77214 BOFF VLOAD
022513,000434: 23,2673 04742 V82EMFLG # OFF FOR EARTH, ON FOR MOON.
022514,000435: 23,2674 46703 TFFCALLS
022515,000436: 23,2675 02327 RONE
022516,000437: 23,2676 77752 VSL2
022517,000438: 23,2677 26327 STOVL RONE
022518,000439: 23,2700 02335 VONE
022519,000440: 23,2701 77752 VSL2
022520,000441: 23,2702 02335 STORE VONE
022521,000442: 23,2703 77624 TFFCALLS CALL
022522,000443: 23,2704 56751 TFFCONMU
022523,000444: 23,2705 77624 CALL # TFFRP/RA COMPUTES RAPO,RPER.
022524,000445: 23,2706 57017 TFFRP/RA
022525,000446: # RETURNS WITH RAPO IN D(MPAC).
022526,000447: 23,2707 77625 DSU
022527,000448: 23,2710 02323 RPADTEM
022528,000449: 23,2711 64414 BOFF SR2R # NEED HAPO AT (-29)M FOR DISPLAY.
022529,000450: # IF MOON CENTERED, RESCALE FROM (-27)M.
022530,000451: # IF EARTH CENTERED ALREADY AT (-29)M.
022531,000452: 23,2712 04742 V82EMFLG # OFF FOR EARTH , ON FOR MOON.
022532,000453: 23,2713 46714 +1
022533,000454: 23,2714 77624 CALL # IF HAPO > MAXNM, SET HAPO =9999.9 NM.
022534,000455: 23,2715 46754 MAXCHK # OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
022535,000456: 23,2716 16352 STORHAPO STODL HAPOX
022536,000457: 23,2717 00017 RPER
022537,000458: 23,2720 77625 DSU
022538,000459: 23,2721 02323 RPADTEM # GIVES HPER AT (-29)M EARTH, (-27)M MOON.
022539,000460: 23,2722 00161 STORE MPAC +4 # SAVE THIS FOR COMPARISON TO HPERMIN.
022540,000461: 23,2723 64414 BOFF SR2R # NEED HPER AT (-29)M FOR DISPLAY.
022541,000462: # IF MOON CENTERED, RESCALE FROM (-27)M.
022542,000463: # IF EARTH CENTERED ALREADY AT (-29)M.
022543,000464: 23,2724 04742 V82EMFLG # OFF FOR EARTH, ON FOR MOON.
022544,000465: 23,2725 46726 +1
022545,000466: 23,2726 77624 CALL # IF HPER > MAXNM, SET HPER = 9999.9 NM.
022546,000467: 23,2727 46754 MAXCHK
Page 514 |
022548,000469: 23,2730 16354 STORHPER STODL HPERX # STORE (RPER - RPADTEM) INTO HPERX.
022549,000470: 23,2731 00161 MPAC +4
022550,000471: 23,2732 51025 DSU BPL # HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
022551,000472: 23,2733 02321 HPERMIN # IF HPER L/ HPERMIN (300 OR 35) KFT,
022552,000473: 23,2734 46740 DOTPER # THEN ZERO INTO -TPER.
022553,000474: 23,2735 52145 DLOAD GOTO # OTHERWISE CALCULATE TPER.
022554,000475: 23,2736 15332 HI6ZEROS
022555,000476: 23,2737 46744 SKIPTPER
022556,000477: 23,2740 45145 DOTPER DLOAD CALL
022557,000478: 23,2741 00017 RPER
022558,000479: 23,2742 57055 CALCTPER
022559,000480: 23,2743 77676 DCOMP # TPER IS PUT NEG INTO -TPER.
022560,000481: 23,2744 16346 SKIPTPER STODL -TPER
022561,000482: 23,2745 02321 HPERMIN # HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
022562,000483: 23,2746 45015 DAD CALL
022563,000484: 23,2747 02323 RPADTEM # RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
022564,000485: 23,2750 57060 CALCTFF # GIVES 59M59S FOR TFF IF RPER G/
022565,000486: 23,2751 77676 DCOMP # HPERMIN + RPADTEM. (TPER WAS NON ZERO)
022566,000487: 23,2752 36344 STCALL TFF # OTHERWISE COMPUTES TFF. (GOTO)
022567,000488: 23,2753 00051 S2
022568,000489:
022569,000490: 23,2754 51025 MAXCHK DSU BPL # IF C(MPAC) > 9999.9 NM, MPAC = 9999.9 NM
022570,000491: 23,2755 06764 MAXNM
022571,000492: 23,2756 46761 +3 # OTHERWISE C(MPAC) = B(MPAC).
022572,000493: 23,2757 43415 DAD RVQ
022573,000494: 23,2760 06764 MAXNM
022574,000495: 23,2761 43545 +3 DLOAD RVQ # (USED BY P30 - P37 ALSO)
022575,000496: 23,2762 06764 MAXNM
022576,000497:
022577,000498: 23,2763 01065 05603 MAXNM 2OCT 0106505603
022578,000499:
Page 515 |
022580,000501:
There is no source code on this page — RSB 2004 |
022582,000503:
022583,000504:
022584,000505:
022585,000506:
End of include-file R30.agc. Parent file is MAIN.agc