Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. 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:

	GAP:  ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

030607,000002:                                                                                                  ## Copyright:   Public domain.
030608,000003:                                                                                                  ## Filename:    R30.agc
030609,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
030610,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
030611,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
030612,000007:                                                                                                  ## Assembler:   yaYUL
030613,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
030614,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
030615,000010:                                                                                                  ## Pages:       712-722
030616,000011:                                                                                                  ## Mod history: 2009-05-19 RSB  Adapted from the corresponding 
030617,000012:                                                                                                  ##                              Luminary131 file, using page 
030618,000013:                                                                                                  ##                              images from Luminary 1A.
030619,000014:                                                                                                  ##              2009-06-07 RSB  Removed a space between two components of
030620,000015:                                                                                                  ##                              a 2OCT that isn't legal in yaYUL.
030621,000016:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
030622,000017:                                                                                                  ##                              and corrected the errors found.
030623,000018:                                                                                                  ##              2017-02-08 RSB  Comment-text fixes discovered while proofing Artemis 72.
030624,000019:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
030625,000020:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
030626,000021:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
030627,000022:                                                                                                  ##                              Luminary 99 vs Comanche 55.
030628,000023: 
030629,000024:                                                                                                  ## This source code has been transcribed or otherwise adapted from
030630,000025:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
030631,000026:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
030632,000027:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
030633,000028:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
030634,000029:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
030635,000030:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
030636,000031:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
030637,000032:                                                                                                  ## actually created.
030638,000033:                                                                                                  ##
030639,000034:                                                                                                  ## Notations on the hardcopy document read, in part:
030640,000035:                                                                                                  ##
030641,000036:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
030642,000037:                                                                                                  ##      16:27 JULY 14, 1969 
030643,000038: 

Page 712

030645,000040:                                                                                                  #  SUBROUTINE NAME:  V82CALL
030646,000041:                                                                                                  #  MOD NO: 0                                                             DATE: 16 FEB 67
030647,000042:                                                                                                  #  MOD BY: RR BAIRNSFATHER                                               LOG SECTION:  R30
030648,000043:                                                                                                  #  MOD NO: 1     MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67         SR30.1 CHANGED TO ALLOW MONITOR OPERN
030649,000044:                                                                                                  #  MOD NO: 2     MOD BY  ALONSO                  DATE: 11 DEC 67         VB82 PROGRAM REWRITTEN
030650,000045:                                                                                                  #  MOD NO: 3     MOD BY  ALONSO                  DATE: 26 MAR 68         PROG MOD TO HANDLE DIF EARTH/MOON SCALE
030651,000046: 
030652,000047:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:   CALLED BY VERB 82 ENTER.  PRIORITY 10
030653,000048:                                                                                                  #  USED THROUGHOUT.              CALCULATE AND DISPLAY ORBITAL PARAMETERS
030654,000049: 
030655,000050:                                                                                                  #  1.    IF AVERAGE G IS OFF:
030656,000051:                                                                                                  #                FLASH DISPLAY V04N06.  R2 INDICATES WHICH SHIP'S STATE VECTOR IS
030657,000052:                                                                                                  #                        TO BE UPDATED.  INITIAL CHOICE IS THIS SHIP (R2=1).  ASTRONAUT
030658,000053:                                                                                                  #                        CAN CHANGE TO OTHER SHIP BY V22EXE, WHERE X NOT EQ 1.
030659,000054:                                                                                                  #                SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
030660,000055:                                                                                                  #                CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
030661,000056:                                                                                                  #                        RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
030662,000057:                                                                                                  #                        HEIGHT ABOVE LAUNCH PAD OR LUNAR LANDING SITE), HAPO (APOGEE
030663,000058:                                                                                                  #                        HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
030664,000059:                                                                                                  #                        INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
030665,000060:                                                                                                  #                FLASH MONITOR V16N44 (HAPO, HPER, TFF).  TFF IS -59M59S IF IT WAS
030666,000061:                                                                                                  #                        NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
030667,000062:                                                                                                  #                        ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
030668,000063:                                                                                                  #                        DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
030669,000064:                                                                                                  #                        ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
030670,000065:                                                                                                  #        2.      IF AVERAGE G IS ON:
030671,000066:                                                                                                  #                        CALLS SR30.1 APPROX EVERY TWO SECS.  STATE VECTOR IS ALWAYS
030672,000067:                                                                                                  #                                FOR THIS VEHICLE.  V82 DOES NOT DISTURB STATE VECTOR.  RESULTS
030673,000068:                                                                                                  #                                OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
030674,000069:                                                                                                  #                        FLASH MONITOR V16N44 (HAPO, HPER, TFF).
030675,000070:                                                                                                  #        ADDENDUM:  HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
030676,000071:                                                                                                  #                ABOVE REMARKS.
030677,000072: 
030678,000073:                                                                                                  #  CALLING SEQUENCE: VERB 82 ENTER.
030679,000074: 
030680,000075:                                                                                                  #  SUBROUTINES CALLED:   SR30.1, GOXDSPF
030681,000076:                                                                                                  #                        MAYBE - THISPREC, OTHPREC, LOADTIME, DELRSPL
030682,000077: 
030683,000078:                                                                                                  #  NORMAL EXIT MODES:  TC ENDEXT
030684,000079: 
030685,000080:                                                                                                  #  ALARMS:  NONE
030686,000081: 
030687,000082:                                                                                                  #  OUTPUT:       HAPOX   (-29) M
030688,000083:                                                                                                  #                HPERX   (-29) M
030689,000084:                                                                                                  #                RAPO    (-29) M EARTH
030690,000085:                                                                                                  #                        (-27) M MOON
030691,000086:                                                                                                  #                RPER    (-29) M EARTH
030692,000087:                                                                                                  #                        (-27) M MOON
030693,000088:                                                                                                  #                TFF     (-28) CS        CONTAINS NEGATIVE QUANTITY
030694,000089:                                                                                                  #                -TPER   (-28) CS        CONTAINS NEGATIVE QUANTITY
030695,000090: 

Page 713

030697,000092:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:  STATE VECTOR.
030698,000093: 
030699,000094:                                                                                                  #  DEBRIS:       QPRET, RONE, VONE, TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
030700,000095:                                                                                                  #                MAYBE:  TSTART82, V82FLAGS, TDEC1.
030701,000096: 
030702,000097: 13,2351  E4,1517                                  EBANK=   HAPOX                                 
030703,000098: 31,2144                                           BANK     31                                    
030704,000099: 22,2000                                           SETLOC   R30LOC                                
030705,000100: 22,2000                                           BANK                                           
030706,000101: 22,3242                                           COUNT*   $$/R30                                
030707,000102: 
030708,000103: 22,3242           06037        V82CALL            TC       INTPRET                               
030709,000104: 22,3243           52014                           BON      GOTO                                  
030710,000105: 22,3244           03712                                    AVEGFLAG                              
030711,000106: 22,3245           45465                                    V82GON                                #  IF AVERAGE G ON
030712,000107: 22,3246           45247                                    V82GOFF                               #  IF AVERAGE G OFF
030713,000108: 
030714,000109: 22,3247           77776        V82GOFF            EXIT                                           #  ALLOW ASTRONAUT TO SELECT VEHICLE
030715,000110: 22,3250           34752                           CAF      TWO                                   #  DESIRED FOR ORBITAL PARAMETERS
030716,000111: 22,3251           55051                           TS       OPTIONX                               #  CALCULATION AND DISPLAY.
030717,000112: 22,3252           34753                           CAF      ONE                                   
030718,000113: 22,3253           55052                           TS       OPTIONX    +1                         
030719,000114: 22,3254           33316                           CAF      OPTIONVN                              #  V 04 N 06
030720,000115: 22,3255           04616                           TC       BANKCALL                              
030721,000116: 22,3256           20334                           CADR     GOXDSPF                               
030722,000117: 22,3257           05472                           TC       ENDEXT                                #  TERMINATE
030723,000118: 22,3260           03262                           TC       +2                                    #  PROCEED
030724,000119: 22,3261           03254                           TC       -5                                    #  DATA IN.  OPTION1+1 = 1 FOR THIS VEHICLE.
030725,000120:                                                                                                  #                UNEQ 1 FOR OTHER VEHICLE.
030726,000121: 22,3262           34750                           CAF      BIT4                                  #  80 MS
030727,000122: 22,3263           05203                           TC       WAITLIST                              
030728,000123: 22,3264  E4,1540                                  EBANK=   TFF                                   
030729,000124: 22,3264           03430 44064                     2CADR    TICKTEST                              
030730,000125: 
030731,000126: 22,3266           00003                           RELINT                                         
030732,000127: 22,3267           33320        V82GOFLP           CAF      TFFBANK                               #  MAJOR RECYCLE LOOP ENTRY
030733,000128: 22,3270           54003                           TS       EBANK                                 
030734,000129: 22,3271           34755                           CAF      ZERO                                  
030735,000130: 22,3272           55537                           TS       V82FLAGS                              #  ZERO FLAGS FOR TICKTEST. INHIBITS
030736,000131:                                                                                                  #  DECREMENTING OF TFF AND -TPER.
030737,000132: 22,3273           35021                           CAF      PRIO7                                 
030738,000133: 22,3274           05105                           TC       FINDVAC                               #  V82GOFF1 WILL EXECUTE STATE VECTOR
030739,000134: 22,3275  E4,1540                                  EBANK=   TFF                                   #  UPDATE AND ORBIT CALCULATIONS FOR
030740,000135: 22,3275           03321 44064                     2CADR    V82GOFF1                              #  SELECTED VEHICLE ABOUT PROPER BODY.
030741,000136: 
030742,000137: 22,3277           00003                           RELINT                                         
030743,000138: 22,3300           36245        V82STALL           CAF      THREE                                 #  STALL IN THIS LOOP AND WITHOLD V 16 N 44

Page 714

030745,000140: 22,3301           71537                           MASK     V82FLAGS                              #  UNTIL STATE VECTOR UPDATE SETS ONE OF
030746,000141: 22,3302           10000                           CCS      A                                     #  OUR FLAG BITS.
030747,000142: 22,3303           03310                           TC       FLAGGON                               #  EXIT FROM STALL LOOP.
030748,000143: 22,3304           34777                           CAF      1SEC                                  
030749,000144: 22,3305           04616                           TC       BANKCALL                              
030750,000145: 22,3306           01735                           CADR     DELAYJOB                              
030751,000146: 22,3307           03300                           TC       V82STALL                              
030752,000147: 
030753,000148: 22,3310           33317        FLAGGON            CAF      V16N44                                #  MONITOR HAPO,HPER,TFF.
030754,000149: 22,3311           04616                           TC       BANKCALL                              
030755,000150: 22,3312           20334                           CADR     GOXDSPF                               
030756,000151: 22,3313           05563                           TC       B5OFF                                 #  TERM  THIS TELLS TICKTEST TO KILL ITSELF
030757,000152: 22,3314           05563                           TC       B5OFF                                 #  PROCEED   DITTO
030758,000153: 22,3315           03267                           TC       V82GOFLP                              #  RECYCLE   RECOMPUTE STATE VECT + DISPLAY
030759,000154: 
030760,000155: 22,3316           01014        OPTIONVN           VN       412                                   
030761,000156: 22,3317           04054        V16N44             VN       1644                                  
030762,000157: 22,3320           02140        TFFBANK            ECADR    TFF                                   
030763,000158: 
030764,000159: 22,3321           06037        V82GOFF1           TC       INTPRET                               
030765,000160: 22,3322           77634                           RTB                                            
030766,000161: 22,3323           21573                                    LOADTIME                              
030767,000162: 22,3324           00041                           STORE    TDEC1                                 #  TIME FOR STATE VECTOR UPDATE.
030768,000163: 22,3325           02205                           STORE    TSTART82                              #  TIME FOR INTERNAL USE.
030769,000164: 22,3326           77776                           EXIT                                           
030770,000165: 22,3327           41052                           CS       OPTIONX    +1                         #  1 FOR THIS VEHICLE, NOT 1 FOR OTHER.
030771,000166: 22,3330           64753                           AD       ONE                                   
030772,000167: 22,3331           00006                           EXTEND                                         
030773,000168: 22,3332           13356                           BZF      THISSHIP                              
030774,000169: 22,3333           06037        OTHSHIP            TC       INTPRET                               
030775,000170: 22,3334           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR OTHER SHIP.
030776,000171: 22,3335           27043                                    OTHPREC                               
030777,000172: 22,3336           77775        BOTHSHIP           VLOAD                                          #  MOVE RESULTS INTO TFFCONIC STORAGE AREAS
030778,000173: 22,3337           00001                                    RATT                                  #  TO BE CALLED BY SR30.1.
030779,000174: 22,3340           26207                           STOVL    RONE                                  #  RATT AT (-29)M FOR EARTH OR MOON
030780,000175: 22,3341           00007                                    VATT                                  
030781,000176: 22,3342           02215                           STORE    VONE                                  #  VATT AT (-7)M/CS FOR EARTH OR MOON
030782,000177: 22,3343           77743                           DLOAD*                                         
030783,000178: 22,3344           73774                                    1/RTMUE,2                             #  X2 IS 0 FOR EARTH CENTERED STATE VEC
030784,000179: 22,3345           00037                           STORE    TFF/RTMU                              #  X2 IS 2 FOR MOON
030785,000180: 22,3346           77743                           DLOAD*                                         #  AS LEFT BY THISPREC OR OTHPREC.
030786,000181: 22,3347           72411                                    MINPERE,2                             
030787,000182: 22,3350           02201                           STORE    HPERMIN                               #  TFFRTMU, HPERMIN AND RPADTEM ARE ALL
030788,000183: 22,3351           46135                           SLOAD    BHIZ                                  #  EARTH/MOON PARAMETERS AS SET HERE.
030789,000184: 22,3352           00050                                    X2                                    
030790,000185: 22,3353           45367                                    EARTHPAD                              
030791,000186: 22,3354           77650                           GOTO                                           
030792,000187: 22,3355           45373                                    MOONPAD                               

Page 715

030794,000189: 22,3356           06037        THISSHIP           TC       INTPRET                               
030795,000190: 22,3357           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR THIS SHIP.
030796,000191: 22,3360           27057                                    THISPREC                              
030797,000192: 22,3361           77650                           GOTO                                           
030798,000193: 22,3362           45336                                    BOTHSHIP                              
030799,000194: 
030800,000195:                                                                                                  #  THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED.  DO NOT SEPARATE PAIRS.
030801,000196: 
030802,000197: 22,3363           00001 11530  MINPERM            2DEC     10668      B-27                       #  35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
030803,000198: 
030804,000199: 22,3365           00002 31230  MINPERE            2DEC     91440      B-29                       #  300 KFT (-29)M FOR EARTH
030805,000200: 
030806,000201: 22,3367           43145        EARTHPAD           DLOAD    CLRGO                                 #  PAD 37-B RADIUS.  SCALED AT (-29)M.
030807,000202: 22,3370           06315                                    RPAD                                  
030808,000203: 22,3371           03635                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
030809,000204: 22,3372           45377                                    BOTHPAD                               
030810,000205: 
030811,000206: 22,3373           51575        MOONPAD            VLOAD    ABVAL                                 #  COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
030812,000207: 22,3374           02023                                    RLS                                   #  SCALED AT (-27)M.
030813,000208: 22,3375           77614                           SET                                            
030814,000209: 22,3376           03475                                    V82EMFLG                              #  INDICATE MOON  SCALING FOR SR30.1
030815,000210: 22,3377           36203        BOTHPAD            STCALL   RPADTEM                               
030816,000211: 22,3400           45551                                    SR30.1                                #  CALCULATE ORBITAL PARAMETERS
030817,000212: 22,3401           45234                           RTB      DSU                                   
030818,000213: 22,3402           21573                                    LOADTIME                              
030819,000214: 22,3403           02205                                    TSTART82                              #  PRESENT TIME - TIME V82GOFF1 BEGAN
030820,000215: 22,3404           02205                           STORE    TSTART82                              #                  SAVE IT
030821,000216: 22,3405           53145                           DLOAD    BZE                                   #  SR30.1 SETS -TPER=0 IF HPER L/
030822,000217: 22,3406           02143                                    -TPER                                 #  HPERMIN (300 OR 35) KFT.
030823,000218: 22,3407           45420                                    TICKTIFF                              #  (-TPER = 0)
030824,000219: 22,3410           43345        TICKTPER           DLOAD    DAD                                   #  (-TPER NON ZERO) TFF WAS NOT COMPUTED,
030825,000220: 22,3411           02143                                    -TPER                                 #  BUT WAS SET TO 59M59S.  DONT TICK TFF, DO
030826,000221: 22,3412           02205                                    TSTART82                              #  TICK -TPER.  DISPLAY BOTH.
030827,000222: 22,3413           02143                           STORE    -TPER                                 #  -TPER CORRECTED FOR TIME SINCE V82GOFF1
030828,000223: 22,3414           77776                           EXIT                                           #  BEGAN.
030829,000224: 22,3415           34753                           CAF      BIT1                                  
030830,000225: 22,3416           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY -TPER
030831,000226: 22,3417           05155                           TC       ENDOFJOB                              
030832,000227: 
030833,000228: 22,3420           43345        TICKTIFF           DLOAD    DAD                                   #  (-TPER=0) TFF WAS COMPUTED.  TICK TFF.
030834,000229: 22,3421           02141                                    TFF                                   #  DO NOT TICK -TPER.  DISPLAY TFF, BUT NOT
030835,000230: 22,3422           02205                                    TSTART82                              #  -TPER.
030836,000231: 22,3423           02141                           STORE    TFF                                   #  TFF CORRECTED FOR TIME SINCE V82GOFF1
030837,000232: 22,3424           77776                           EXIT                                           #  BEGAN.
030838,000233: 22,3425           34752                           CAF      BIT2                                  
030839,000234: 22,3426           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY TFF.
030840,000235: 22,3427           05155                           TC       ENDOFJOB                              
030841,000236: 

Page 716

030843,000238: 22,3430           34747        TICKTEST           CAF      BIT5                                  #  THIS WAITLIST PROGRAM PERPETUATES ITSELF
030844,000239: 22,3431           71044                           MASK     EXTVBACT                              #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
030845,000240: 22,3432           10000                           CCS      A                                     
030846,000241: 22,3433           03441                           TC       DOTICK                                
030847,000242: 22,3434           37713                           CAF      PRIO25                                
030848,000243: 22,3435           05072                           TC       NOVAC                                 #  TERMINATE V 82.  CANT CALL ENDEXT IN RUPT.
030849,000244: 22,3436     1044                                  EBANK=   EXTVBACT                              
030850,000245: 22,3436           05472 04062                     2CADR    ENDEXT                                
030851,000246: 
030852,000247: 22,3440           05261                           TC       TASKOVER                              
030853,000248: 22,3441           34777        DOTICK             CAF      1SEC                                  #  RE-REQUEST TICKTEST.
030854,000249: 22,3442           05203                           TC       WAITLIST                              
030855,000250: 22,3443  E4,1540                                  EBANK=   TFF                                   
030856,000251: 22,3443           03430 44064                     2CADR    TICKTEST                              
030857,000252: 
030858,000253: 22,3445           36245                           CAF      THREE                                 
030859,000254: 22,3446           71537                           MASK     V82FLAGS                              
030860,000255: 22,3447           50000                           INDEX    A                                     
030861,000256: 22,3450           03451                           TC       +1                                    
030862,000257: 22,3451           05261                           TC       TASKOVER                              #  IF NO FLAGBITS SET DONT CHANGE TFF OR
030863,000258:                                                                                                  #  -TPER, BUT CONTINUE LOOP.
030864,000259: 22,3452           03460                           TC       TPERTICK                              #  ONLY BIT 1 SET.  INCR -TPER BY 1 SEC.
030865,000260: 22,3453           34777        TFFTICK            CAF      1SEC                                  #  ONLY BIT 2 SET.  INCR TFF BY 1 SEC.
030866,000261: 22,3454           54001                           TS       L                                     
030867,000262: 22,3455           34755                           CAF      ZERO                                  
030868,000263: 22,3456           21541                           DAS      TFF                                   
030869,000264: 22,3457           05261                           TC       TASKOVER                              
030870,000265: 22,3460           34777        TPERTICK           CAF      1SEC                                  
030871,000266: 22,3461           54001                           TS       L                                     
030872,000267: 22,3462           34755                           CAF      ZERO                                  
030873,000268: 22,3463           21543                           DAS      -TPER                                 
030874,000269: 22,3464           05261                           TC       TASKOVER                              
030875,000270: 

Page 717

030877,000272: 22,3465           77776        V82GON             EXIT                                           #  AVERAGE G ON.  USE CURRENT STATE VECTOR
030878,000273:                                                                                                  #  FOR ORBITAL PARAMETER CALCULATIONS.
030879,000274: 22,3466           35021                           CAF      PRIO7                                 #  LESS THAN LAMBERT
030880,000275: 22,3467           05105                           TC       FINDVAC                               #  V82GON1 WILL PERFORM ORBIT CALCULATIONS
030881,000276: 22,3470  E4,1540                                  EBANK=   TFF                                   #  ABOUT PROPER BODY APPROX ONCE PER SEC.
030882,000277: 22,3470           03503 44064                     2CADR    V82GON1                               
030883,000278: 
030884,000279: 22,3472           00003                           RELINT                                         
030885,000280: 22,3473           10067                           CCS      NEWJOB                                #  WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
030886,000281: 22,3474           05122                           TC       CHANG1                                #  IS DONE.  NOTE:  V82GON1 (PRIO7, FINDVAC
030887,000282:                                                                                                  #  JOB) IS COMPLETED BEFORE V82GON (PRIO7,
030888,000283:                                                                                                  #  NOVAC JOB).
030889,000284: 22,3475           33317        V82REDSP           CAF      V16N44                                #  MONITOR HAPO, HPER, TFF
030890,000285: 22,3476           04616                           TC       BANKCALL                              
030891,000286: 22,3477           20334                           CADR     GOXDSPF                               
030892,000287: 22,3500           05563                           TC       B5OFF                                 #  TERM THIS TELLS V82GON1 TO KILL ITSELF.
030893,000288: 22,3501           05563                           TC       B5OFF                                 #  PROC DITTO.
030894,000289: 22,3502           03475                           TC       V82REDSP                              #  RECYCLE
030895,000290: 
030896,000291: 22,3503           06037        V82GON1            TC       INTPRET                               #  THIS EXEC PROGRAM PERPETUATES ITSELF
030897,000292:                                                                                                  #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
030898,000293: 22,3504           52175                           VLOAD    GOTO                                  #  HOLDS OFF CCS NEWJOB BETWEEN RN AND
030899,000294: 22,3505           01221                                    RN                                    #  VN FETCH SO RN, VN ARE FROM SAME
030900,000295: 22,3506           45507                                    NEXTLINE                              #  STATE VECTOR UPDATE.
030901,000296: 22,3507           26207        NEXTLINE           STOVL    RONE                                  #  RN AT (-29)M FOR EARTH OR MOON
030902,000297: 22,3510           01227                                    VN                                    
030903,000298: 22,3511           02215                           STORE    VONE                                  #  VN AT (-7)M/CS FOR EARTH OR MOON
030904,000299: 22,3512           52014                           BON      GOTO                                  
030905,000300: 22,3513           04304                                    MOONTHIS                              #  FLAG INDICATES BODY ABOUT WHICH ORBITAL
030906,000301: 22,3514           45516                                    MOONGON                               #  CALCULATIONS ARE TO BE PERFORMED.
030907,000302: 22,3515           45527                                    EARTHGON                              #  IF SET - MOON, IF RESET - EARTH.
030908,000303: 
030909,000304: 22,3516           71214        MOONGON            SET      DLOAD                                 
030910,000305: 22,3517           03475                                    V82EMFLG                              #  INDICATE MOON SCALING FOR SR30.1
030911,000306: 22,3520           04001                                    1/RTMUM                               #  LUNAR PARAMETERS LOADED HERE FOR SR30.1
030912,000307: 22,3521           14037                           STODL    TFF/RTMU                              
030913,000308: 22,3522           05364                                    MINPERM                               
030914,000309: 22,3523           26201                           STOVL    HPERMIN                               
030915,000310: 22,3524           02023                                    RLS                                   #  SCALED AT (-27)M.
030916,000311: 22,3525           52046                           ABVAL    GOTO                                  
030917,000312: 22,3526           45536                                    V82GON2                               
030918,000313: 22,3527           71214        EARTHGON           CLEAR    DLOAD                                 
030919,000314: 22,3530           03675                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
030920,000315: 22,3531           04003                                    1/RTMUE                               #  EARTH PARAMETERS LOADED HERE FOR SR30.1
030921,000316: 22,3532           14037                           STODL    TFF/RTMU                              
030922,000317: 22,3533           05366                                    MINPERE                               
030923,000318: 22,3534           16201                           STODL    HPERMIN                               
030924,000319: 22,3535           06315                                    RPAD                                  
030925,000320: 22,3536           36203        V82GON2            STCALL   RPADTEM                               #  COMMON CODE FOR EARTH & MOON.
030926,000321: 22,3537           45551                                    SR30.1                                

Page 718

030928,000323: 22,3540           77776                           EXIT                                           
030929,000324: 22,3541           34747        V82GON3            CAF      BIT5                                  
030930,000325: 22,3542           71044                           MASK     EXTVBACT                              #  SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
030931,000326: 22,3543           00006                           EXTEND                                         
030932,000327: 22,3544           15472                           BZF      ENDEXT                                #  YES, TERMINATE VB 82 LOOP
030933,000328: 22,3545           34777                           CAF      1SEC                                  
030934,000329: 22,3546           04616                           TC       BANKCALL                              #  WAIT ONE SECOND BEFORE REPEATING
030935,000330: 22,3547           01735                           CADR     DELAYJOB                              #  ORBITAL PARAMETER COMPUTATION.
030936,000331: 22,3550           03503                           TC       V82GON1                               
030937,000332: 
030938,000333: 22,3551  22,3541               SPLRET             =        V82GON3                               
030939,000334: 

Page 719

030941,000336:                                                                                                  #  SUBROUTINE NAME: SR30.1
030942,000337:                                                                                                  #  MOD NO: 0                                                             DATE: 16 FEB 67
030943,000338:                                                                                                  #  MOD BY: RR BAIRNSFATHER                                               LOG SECTION: R32
030944,000339:                                                                                                  #  MOD NO: 1     MOD BY: RR BAIRNSFATHER         DATE: 11 APR 67         SR30.1 CHANGED TO ALLOW MONITOR OPERN
030945,000340:                                                                                                  #  MOD NO: 2     MOD BY: RR BAIRNSFATHER         DATE: 14 APR 67         ADD OVFL CK FOR RAPO
030946,000341:                                                                                                  #  MOD NO: 3     MOD BY ALONSO                   DATE: 11 DEC 67         SUBROUTINE REWRITTEN
030947,000342:                                                                                                  #  MOD NO: 4     MOD BY ALONSO                   DATE: 26 MAR 68         PROG MOD TO HANDLE DIF EARTH/MOON SCALE
030948,000343:                                                                                                  #  MOD NO: 5     MOD BY: RR BAIRNSFATHER         DATE: 6 AUG 68          OVFL CK FOR HAPO & HPER. VOIDS MOD #2.
030949,000344: 
030950,000345:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:  ORBITAL PARAMETERS DISPLAY FOR NOUNS 32 AND 44.
030951,000346:                                                                                                  #  SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
030952,000347:                                                                                                  #  RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
030953,000348:                                                                                                  #  LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
030954,000349:                                                                                                  #  TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
030955,000350:                                                                                                  #  IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
030956,000351:                                                                                                  #  NEGATIVE IN -TPER.  OTHERWISE STORES +0 IN -TPER.  WHENEVER TPER IS
030957,000352:                                                                                                  #  CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC.  IF HAPO
030958,000353:                                                                                                  #  WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
030959,000354: 
030960,000355:                                                                                                  #  ADDENDUM:     HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
030961,000356:                                                                                                  #                ABOVE REMARKS.
030962,000357: 
030963,000358:                                                                                                  #  CALLING SEQUENCE:     CALL
030964,000359:                                                                                                  #                                SR30.1
030965,000360: 
030966,000361:                                                                                                  #  SUBROUTINES CALLED:   TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
030967,000362: 
030968,000363:                                                                                                  #  NORMAL EXIT MODE:     CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
030969,000364: 
030970,000365:                                                                                                  #  ALARMS:       NONE
030971,000366: 
030972,000367:                                                                                                  #  OUTPUT:       RAPO    (-29) M EARTH   APOGEE RADIUS   EARTH CENTERED COORD.
030973,000368:                                                                                                  #                        (-27) M MOON                    MOON CENTERED COORD.
030974,000369:                                                                                                  #                RPER    (-29) M EARTH   PERIGEE RADIUS  EARTH CENTERED COORD.
030975,000370:                                                                                                  #                        (-27) M MOON                    MOON CENTERED COORD.
030976,000371:                                                                                                  #                HAPOX   (-29) M         APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
030977,000372:                                                                                                  #                HPERX   (-29) M         PERIGEE ALT. ABOVE PAD OR LAND. SITE    MAX VALUE LIMITED TO 9999.9 NM.
030978,000373:                                                                                                  #                TFF     (-28) CS        TIME TO 300KFT OR 35KFT ALTITUDE
030979,000374:                                                                                                  #                -TPER   (-28) CS        TIME TO PERIGEE
030980,000375: 
030981,000376:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
030982,000377:                                                                                                  #        TFF/RTMU        (+17) EARTH     RECIPROCAL OF PROPER GRAV CONSTANT FOR
030983,000378:                                                                                                  #                        (+14) MOON      EARTH OR MOON = 1/SQRT(MU).
030984,000379:                                                                                                  #        RONE            (-29) M         STATE VECTOR
030985,000380:                                                                                                  #        VONE            (-7)  M/CS      STATE VECTOR
030986,000381:                                                                                                  #        RPADTEM         (-29) M EARTH   RADIUS OF LAUNCH PAD OR LUNAR LANDING
030987,000382:                                                                                                  #                        (-27) M MOON    SITE.
030988,000383:                                                                                                  #        HPERMIN         (-29) M EARTH   (300 OR 35) KFT MINIMUM PERIGEE ALTITUDE
030989,000384:                                                                                                  #                        (-27) M MOON    ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
030990,000385:                                                                                                  #        V82EMFLG        (INT SW BIT)    RESET FOR EARTH, SET FOR MOON.
030991,000386: 
030992,000387:                                                                                                  #  DEBRIS:       QPRET, PDL, S2
030993,000388: 

Page 720

030995,000390: 22,3551                                           COUNT*   $$/SR30S                              
030996,000391: 
030997,000392: 22,3551           44001        SR30.1             SETPD    STQ                                   #  INITIALIZE PUSHDOWN LIST.
030998,000393: 22,3552           00001                                    0                                     
030999,000394: 22,3553           00051                                    S2                                    
031000,000395:                                                                                                  #  SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
031001,000396:                                                                                                  #                VONE AT (-7)M/CS
031002,000397:                                                                                                  #  TFFCONMU, TFFRP/RA, CALCTPER AND CALCTFF
031003,000398:                                                                                                  #  CALLS REQUIRE:
031004,000399:                                                                                                  #  EARTH CENTERED (NO RESCALING REQUIRED)
031005,000400:                                                                                                  #        RONE SCALED TO B-29 M
031006,000401:                                                                                                  #        VONE SCALED TO B-7  M/CS
031007,000402:                                                                                                  #  MOON CENTERED (RESCALING REQUIRED)
031008,000403:                                                                                                  #        RONE SCALED TO B-27 M
031009,000404:                                                                                                  #        VONE SCALED TO B-5  M/CS
031010,000405: 22,3554           77214                           BOFF     VLOAD                                 
031011,000406: 22,3555           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031012,000407: 22,3556           45565                                    TFFCALLS                              
031013,000408: 22,3557           02207                                    RONE                                  
031014,000409: 22,3560           77752                           VSL2                                           
031015,000410: 22,3561           26207                           STOVL    RONE                                  
031016,000411: 22,3562           02215                                    VONE                                  
031017,000412: 22,3563           77752                           VSL2                                           
031018,000413: 22,3564           02215                           STORE    VONE                                  
031019,000414: 22,3565           77624        TFFCALLS           CALL                                           
031020,000415: 22,3566           57361                                    TFFCONMU                              
031021,000416: 22,3567           77624                           CALL                                           #  TFFRP/RA COMPUTES RAPO,RPER.
031022,000417: 22,3570           57427                                    TFFRP/RA                              
031023,000418:                                                                                                  #  RETURNS WITH RAPO IN D(MPAC).
031024,000419: 22,3571           77625                           DSU                                            
031025,000420: 22,3572           02203                                    RPADTEM                               
031026,000421: 22,3573           64414                           BOFF     SR2R                                  #  NEED HAPO AT (-29)M FOR DISPLAY.
031027,000422:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
031028,000423:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
031029,000424: 22,3574           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031030,000425: 22,3575           45576                                    +1                                    
031031,000426: 22,3576           77624                           CALL                                           #  IF HAPO > MAXNM, SET HAPO =9999.9 NM.
031032,000427: 22,3577           45636                                    MAXCHK                                #  OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
031033,000428: 22,3600           16120        STORHAPO           STODL    HAPOX                                 
031034,000429: 22,3601           00017                                    RPER                                  
031035,000430: 22,3602           77625                           DSU                                            
031036,000431: 22,3603           02203                                    RPADTEM                               #  GIVES HPER AT (-29)M EARTH, (-27)M MOON.
031037,000432: 22,3604           00161                           STORE    MPAC       +4                         #  SAVE THIS FOR COMPARISON TO HPERMIN.
031038,000433: 22,3605           64414                           BOFF     SR2R                                  #  NEED HPER AT (-29)M FOR DISPLAY.
031039,000434:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
031040,000435:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
031041,000436: 22,3606           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031042,000437: 22,3607           45610                                    +1                                    
031043,000438: 22,3610           77624                           CALL                                           #  IF HPER > MAXNM, SET HPER = 9999.9 NM.
031044,000439: 22,3611           45636                                    MAXCHK                                

Page 721

031046,000441: 22,3612           16122        STORHPER           STODL    HPERX                                 #  STORE (RPER - RPADTEM) INTO HPERX.
031047,000442: 22,3613           00161                                    MPAC       +4                         
031048,000443: 22,3614           51025                           DSU      BPL                                   #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
031049,000444: 22,3615           02201                                    HPERMIN                               #  IF HPER L/ HPERMIN (300 OR 35) KFT,
031050,000445: 22,3616           45622                                    DOTPER                                #  THEN ZERO INTO -TPER.
031051,000446: 22,3617           52145                           DLOAD    GOTO                                  #  OTHERWISE CALCULATE TPER.
031052,000447: 22,3620           06522                                    HI6ZEROS                              
031053,000448: 22,3621           45626                                    SKIPTPER                              
031054,000449: 22,3622           45145        DOTPER             DLOAD    CALL                                  
031055,000450: 22,3623           00017                                    RPER                                  
031056,000451: 22,3624           57465                                    CALCTPER                              
031057,000452: 22,3625           77676                           DCOMP                                          #  TPER IS PUT NEG INTO -TPER.
031058,000453: 22,3626           16143        SKIPTPER           STODL    -TPER                                 
031059,000454: 22,3627           02201                                    HPERMIN                               #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
031060,000455: 22,3630           45015                           DAD      CALL                                  
031061,000456: 22,3631           02203                                    RPADTEM                               #  RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
031062,000457: 22,3632           57470                                    CALCTFF                               #  GIVES 59M59S FOR TFF IF RPER G/
031063,000458: 22,3633           77676                           DCOMP                                          #  HPERMIN + RPADTEM.  (TPER WAS NON ZERO)
031064,000459: 22,3634           36141                           STCALL   TFF                                   #  OTHERWISE COMPUTES TFF.       (GOTO)
031065,000460: 22,3635           00051                                    S2                                    
031066,000461: 
031067,000462: 22,3636           51025        MAXCHK             DSU      BPL                                   #  IF C(MPAC) > 9999.9 NM, MPAC = 9999.9 NM
031068,000463: 22,3637           05646                                    MAXNM                                 
031069,000464: 22,3640           45643                                    +3                                    #  OTHERWISE C(MPAC) = B(MPAC).
031070,000465: 22,3641           43415                           DAD      RVQ                                   
031071,000466: 22,3642           05646                                    MAXNM                                 
031072,000467: 22,3643           43545                 +3        DLOAD    RVQ                                   #  (USED BY P30 - P37 ALSO)
031073,000468: 22,3644           05646                                    MAXNM                                 
031074,000469: 
031075,000470: 22,3645           01065 05603  MAXNM              2OCT     0106505603                            
031076,000471: 

Page 722 Empty page.

031079,000474: 

End of include-file R30.agc.  Parent file is MAIN.agc