Source Code

These source-code files are part of a reconstructed copy of Luminary 98, a development version of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memo 85, using asterisks indicating changed lines in the listing as a guide. While no listing of this version is known to exist, nor are the memory-bank checksums available, the reconstruction is believed to be correct because it was an an intermediate step in reconstructing Luminary 97 whose reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152G. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 98 listing.

Comments from 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.

029904,000002:                                                                                                  ## Copyright:   Public domain.
029905,000003:                                                                                                  ## Filename:    R30.agc
029906,000004:                                                                                                  ## Purpose:     A section of Luminary revision 98.
029907,000005:                                                                                                  ##              It is part of the reconstructed source code for the a
029908,000006:                                                                                                  ##              development version of the flight software for the Lunar 
029909,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
029910,000008:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
029911,000009:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
029912,000010:                                                                                                  ##              the listing and Luminary Memo #85, which lists changes between
029913,000011:                                                                                                  ##              Luminary 98 and 99.
029914,000012:                                                                                                  ## Reference:   pp. 712-722
029915,000013:                                                                                                  ## Assembler:   yaYUL
029916,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
029917,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
029918,000016:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
029919,000017:                                                                                                  ##              2021-05-30 ABS  TICKTIFF -> TICKTFF
029920,000018: 

Page 712

029922,000020:                                                                                                  #  SUBROUTINE NAME:  V82CALL
029923,000021:                                                                                                  #  MOD NO: 0                                                             DATE: 16 FEB 67
029924,000022:                                                                                                  #  MOD BY: RR BAIRNSFATHER                                               LOG SECTION:  R30
029925,000023:                                                                                                  #  MOD NO: 1     MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67         SR30.1 CHANGED TO ALLOW MONITOR OPERN
029926,000024:                                                                                                  #  MOD NO: 2     MOD BY  ALONSO                  DATE: 11 DEC 67         VB82 PROGRAM REWRITTEN
029927,000025:                                                                                                  #  MOD NO: 3     MOD BY  ALONSO                  DATE: 26 MAR 68         PROG MOD TO HANDLE DIF EARTH/MOON SCALE
029928,000026: 
029929,000027:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:   CALLED BY VERB 82 ENTER.  PRIORITY 10
029930,000028:                                                                                                  #  USED THROUGHOUT.              CALCULATE AND DISPLAY ORBITAL PARAMETERS
029931,000029: 
029932,000030:                                                                                                  #  1.    IF AVERAGE G IS OFF:
029933,000031:                                                                                                  #                FLASH DISPLAY V04N06.  R2 INDICATES WHICH SHIP'S STATE VECTOR IS
029934,000032:                                                                                                  #                        TO BE UPDATED.  INITIAL CHOICE IS THIS SHIP (R2=1).  ASTRONAUT
029935,000033:                                                                                                  #                        CAN CHANGE TO OTHER SHIP BY V22EXE, WHERE X NOT EQ 1.
029936,000034:                                                                                                  #                SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
029937,000035:                                                                                                  #                CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
029938,000036:                                                                                                  #                        RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
029939,000037:                                                                                                  #                        HEIGHT ABOVE LAUNCH PAD OR LUNAR LANDING SITE), HAPO (APOGEE
029940,000038:                                                                                                  #                        HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
029941,000039:                                                                                                  #                        INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
029942,000040:                                                                                                  #                FLASH MONITOR V16N44 (HAPO, HPER, TFF).  TFF IS -59M59S IF IT WAS
029943,000041:                                                                                                  #                        NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
029944,000042:                                                                                                  #                        ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
029945,000043:                                                                                                  #                        DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
029946,000044:                                                                                                  #                        ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
029947,000045:                                                                                                  #        2.      IF AVERAGE G IS ON:
029948,000046:                                                                                                  #                        CALLS SR30.1 APPROX EVERY TWO SECS.  STATE VECTOR IS ALWAYS
029949,000047:                                                                                                  #                                FOR THIS VEHICLE.  V82 DOES NOT DISTURB STATE VECTOR.  RESULTS
029950,000048:                                                                                                  #                                OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
029951,000049:                                                                                                  #                        FLASH MONITOR V16N44 (HAPO, HPER, TFF).
029952,000050:                                                                                                  #        ADDENDUM:  HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
029953,000051:                                                                                                  #                ABOVE REMARKS.
029954,000052: 
029955,000053:                                                                                                  #  CALLING SEQUENCE: VERB 82 ENTER.
029956,000054: 
029957,000055:                                                                                                  #  SUBROUTINES CALLED:   SR30.1, GOXDSPF
029958,000056:                                                                                                  #                        MAYBE - THISPREC, OTHPREC, LOADTIME, DELRSPL
029959,000057: 
029960,000058:                                                                                                  #  NORMAL EXIT MODES:  TC ENDEXT
029961,000059: 
029962,000060:                                                                                                  #  ALARMS:  NONE
029963,000061: 
029964,000062:                                                                                                  #  OUTPUT:       HAPOX   (-29) M
029965,000063:                                                                                                  #                HPERX   (-29) M
029966,000064:                                                                                                  #                RAPO    (-29) M EARTH
029967,000065:                                                                                                  #                        (-27) M MOON
029968,000066:                                                                                                  #                RPER    (-29) M EARTH
029969,000067:                                                                                                  #                        (-27) M MOON
029970,000068:                                                                                                  #                TFF     (-28) CS        CONTAINS NEGATIVE QUANTITY
029971,000069:                                                                                                  #                -TPER   (-28) CS        CONTAINS NEGATIVE QUANTITY
029972,000070: 

Page 713

029974,000072:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:  STATE VECTOR.
029975,000073: 
029976,000074:                                                                                                  #  DEBRIS:       QPRET, RONE, VONE, TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
029977,000075:                                                                                                  #                MAYBE:  TSTART82, V82FLAGS, TDEC1.
029978,000076: 
029979,000077: 13,2351  E4,1517                                  EBANK=   HAPOX                                 
029980,000078: 31,2144                                           BANK     31                                    
029981,000079: 22,2000                                           SETLOC   R30LOC                                
029982,000080: 22,2000                                           BANK                                           
029983,000081: 22,3242                                           COUNT*   $$/R30                                
029984,000082: 
029985,000083: 22,3242           06037        V82CALL            TC       INTPRET                               
029986,000084: 22,3243           52014                           BON      GOTO                                  
029987,000085: 22,3244           03712                                    AVEGFLAG                              
029988,000086: 22,3245           45465                                    V82GON                                #  IF AVERAGE G ON
029989,000087: 22,3246           45247                                    V82GOFF                               #  IF AVERAGE G OFF
029990,000088: 
029991,000089: 22,3247           77776        V82GOFF            EXIT                                           #  ALLOW ASTRONAUT TO SELECT VEHICLE
029992,000090: 22,3250           34752                           CAF      TWO                                   #  DESIRED FOR ORBITAL PARAMETERS
029993,000091: 22,3251           55051                           TS       OPTIONX                               #  CALCULATION AND DISPLAY.
029994,000092: 22,3252           34753                           CAF      ONE                                   
029995,000093: 22,3253           55052                           TS       OPTIONX    +1                         
029996,000094: 22,3254           33316                           CAF      OPTIONVN                              #  V 04 N 06
029997,000095: 22,3255           04616                           TC       BANKCALL                              
029998,000096: 22,3256           20334                           CADR     GOXDSPF                               
029999,000097: 22,3257           05472                           TC       ENDEXT                                #  TERMINATE
030000,000098: 22,3260           03262                           TC       +2                                    #  PROCEED
030001,000099: 22,3261           03254                           TC       -5                                    #  DATA IN.  OPTION1+1 = 1 FOR THIS VEHICLE.
030002,000100:                                                                                                  #                UNEQ 1 FOR OTHER VEHICLE.
030003,000101: 22,3262           34750                           CAF      BIT4                                  #  80 MS
030004,000102: 22,3263           05203                           TC       WAITLIST                              
030005,000103: 22,3264  E4,1540                                  EBANK=   TFF                                   
030006,000104: 22,3264           03430 44064                     2CADR    TICKTEST                              
030007,000105: 
030008,000106: 22,3266           00003                           RELINT                                         
030009,000107: 22,3267           33320        V82GOFLP           CAF      TFFBANK                               #  MAJOR RECYCLE LOOP ENTRY
030010,000108: 22,3270           54003                           TS       EBANK                                 
030011,000109: 22,3271           34755                           CAF      ZERO                                  
030012,000110: 22,3272           55537                           TS       V82FLAGS                              #  ZERO FLAGS FOR TICKTEST. INHIBITS
030013,000111:                                                                                                  #  DECREMENTING OF TFF AND -TPER.
030014,000112: 22,3273           35021                           CAF      PRIO7                                 
030015,000113: 22,3274           05105                           TC       FINDVAC                               #  V82GOFF1 WILL EXECUTE STATE VECTOR
030016,000114: 22,3275  E4,1540                                  EBANK=   TFF                                   #  UPDATE AND ORBIT CALCULATIONS FOR
030017,000115: 22,3275           03321 44064                     2CADR    V82GOFF1                              #  SELECTED VEHICLE ABOUT PROPER BODY.
030018,000116: 
030019,000117: 22,3277           00003                           RELINT                                         
030020,000118: 22,3300           36245        V82STALL           CAF      THREE                                 #  STALL IN THIS LOOP AND WITHOLD V 16 N 44

Page 714

030022,000120: 22,3301           71537                           MASK     V82FLAGS                              #  UNTIL STATE VECTOR UPDATE SETS ONE OF
030023,000121: 22,3302           10000                           CCS      A                                     #  OUR FLAG BITS.
030024,000122: 22,3303           03310                           TC       FLAGGON                               #  EXIT FROM STALL LOOP.
030025,000123: 22,3304           34777                           CAF      1SEC                                  
030026,000124: 22,3305           04616                           TC       BANKCALL                              
030027,000125: 22,3306           01735                           CADR     DELAYJOB                              
030028,000126: 22,3307           03300                           TC       V82STALL                              
030029,000127: 
030030,000128: 22,3310           33317        FLAGGON            CAF      V16N44                                #  MONITOR HAPO,HPER,TFF.
030031,000129: 22,3311           04616                           TC       BANKCALL                              
030032,000130: 22,3312           20334                           CADR     GOXDSPF                               
030033,000131: 22,3313           05563                           TC       B5OFF                                 #  TERM  THIS TELLS TICKTEST TO KILL ITSELF
030034,000132: 22,3314           05563                           TC       B5OFF                                 #  PROCEED   DITTO
030035,000133: 22,3315           03267                           TC       V82GOFLP                              #  RECYCLE   RECOMPUTE STATE VECT + DISPLAY
030036,000134: 
030037,000135: 22,3316           01014        OPTIONVN           VN       412                                   
030038,000136: 22,3317           04054        V16N44             VN       1644                                  
030039,000137: 22,3320           02140        TFFBANK            ECADR    TFF                                   
030040,000138: 
030041,000139: 22,3321           06037        V82GOFF1           TC       INTPRET                               
030042,000140: 22,3322           77634                           RTB                                            
030043,000141: 22,3323           21573                                    LOADTIME                              
030044,000142: 22,3324           00041                           STORE    TDEC1                                 #  TIME FOR STATE VECTOR UPDATE.
030045,000143: 22,3325           02205                           STORE    TSTART82                              #  TIME FOR INTERNAL USE.
030046,000144: 22,3326           77776                           EXIT                                           
030047,000145: 22,3327           41052                           CS       OPTIONX    +1                         #  1 FOR THIS VEHICLE, NOT 1 FOR OTHER.
030048,000146: 22,3330           64753                           AD       ONE                                   
030049,000147: 22,3331           00006                           EXTEND                                         
030050,000148: 22,3332           13356                           BZF      THISSHIP                              
030051,000149: 22,3333           06037        OTHSHIP            TC       INTPRET                               
030052,000150: 22,3334           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR OTHER SHIP.
030053,000151: 22,3335           27043                                    OTHPREC                               
030054,000152: 22,3336           77775        BOTHSHIP           VLOAD                                          #  MOVE RESULTS INTO TFFCONIC STORAGE AREAS
030055,000153: 22,3337           00001                                    RATT                                  #  TO BE CALLED BY SR30.1.
030056,000154: 22,3340           26207                           STOVL    RONE                                  #  RATT AT (-29)M FOR EARTH OR MOON
030057,000155: 22,3341           00007                                    VATT                                  
030058,000156: 22,3342           02215                           STORE    VONE                                  #  VATT AT (-7)M/CS FOR EARTH OR MOON
030059,000157: 22,3343           77743                           DLOAD*                                         
030060,000158: 22,3344           73774                                    1/RTMUE,2                             #  X2 IS 0 FOR EARTH CENTERED STATE VEC
030061,000159: 22,3345           00037                           STORE    TFF/RTMU                              #  X2 IS 2 FOR MOON
030062,000160: 22,3346           77743                           DLOAD*                                         #  AS LEFT BY THISPREC OR OTHPREC.
030063,000161: 22,3347           72411                                    MINPERE,2                             
030064,000162: 22,3350           02201                           STORE    HPERMIN                               #  TFFRTMU, HPERMIN AND RPADTEM ARE ALL
030065,000163: 22,3351           46135                           SLOAD    BHIZ                                  #  EARTH/MOON PARAMETERS AS SET HERE.
030066,000164: 22,3352           00050                                    X2                                    
030067,000165: 22,3353           45367                                    EARTHPAD                              
030068,000166: 22,3354           77650                           GOTO                                           
030069,000167: 22,3355           45373                                    MOONPAD                               

Page 715

030071,000169: 22,3356           06037        THISSHIP           TC       INTPRET                               
030072,000170: 22,3357           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR THIS SHIP.
030073,000171: 22,3360           27057                                    THISPREC                              
030074,000172: 22,3361           77650                           GOTO                                           
030075,000173: 22,3362           45336                                    BOTHSHIP                              
030076,000174: 
030077,000175:                                                                                                  #  THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED.  DO NOT SEPARATE PAIRS.
030078,000176: 
030079,000177: 22,3363           00001 11530  MINPERM            2DEC     10668      B-27                       #  35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
030080,000178: 
030081,000179: 22,3365           00002 31230  MINPERE            2DEC     91440      B-29                       #  300 KFT (-29)M FOR EARTH
030082,000180: 
030083,000181: 22,3367           43145        EARTHPAD           DLOAD    CLRGO                                 #  PAD 37-B RADIUS.  SCALED AT (-29)M.
030084,000182: 22,3370           06315                                    RPAD                                  
030085,000183: 22,3371           03635                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
030086,000184: 22,3372           45377                                    BOTHPAD                               
030087,000185: 
030088,000186: 22,3373           51575        MOONPAD            VLOAD    ABVAL                                 #  COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
030089,000187: 22,3374           02023                                    RLS                                   #  SCALED AT (-27)M.
030090,000188: 22,3375           77614                           SET                                            
030091,000189: 22,3376           03475                                    V82EMFLG                              #  INDICATE MOON  SCALING FOR SR30.1
030092,000190: 22,3377           36203        BOTHPAD            STCALL   RPADTEM                               
030093,000191: 22,3400           45551                                    SR30.1                                #  CALCULATE ORBITAL PARAMETERS
030094,000192: 22,3401           45234                           RTB      DSU                                   
030095,000193: 22,3402           21573                                    LOADTIME                              
030096,000194: 22,3403           02205                                    TSTART82                              #  PRESENT TIME - TIME V82GOFF1 BEGAN
030097,000195: 22,3404           02205                           STORE    TSTART82                              #                  SAVE IT
030098,000196: 22,3405           53145                           DLOAD    BZE                                   #  SR30.1 SETS -TPER=0 IF HPER L/
030099,000197: 22,3406           02143                                    -TPER                                 #  HPERMIN (300 OR 35) KFT.
030100,000198: 22,3407           45420                                    TICKTFF                               #  (-TPER = 0)
030101,000199: 22,3410           43345        TICKTPER           DLOAD    DAD                                   #  (-TPER NON ZERO) TFF WAS NOT COMPUTED,
030102,000200: 22,3411           02143                                    -TPER                                 #  BUT WAS SET TO 59M59S.  DONT TICK TFF, DO
030103,000201: 22,3412           02205                                    TSTART82                              #  TICK -TPER.  DISPLAY BOTH.
030104,000202: 22,3413           02143                           STORE    -TPER                                 #  -TPER CORRECTED FOR TIME SINCE V82GOFF1
030105,000203: 22,3414           77776                           EXIT                                           #  BEGAN.
030106,000204: 22,3415           34753                           CAF      BIT1                                  
030107,000205: 22,3416           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY -TPER
030108,000206: 22,3417           05155                           TC       ENDOFJOB                              
030109,000207: 
030110,000208: 22,3420           43345        TICKTFF            DLOAD    DAD                                   #  (-TPER=0) TFF WAS COMPUTED.  TICK TFF.
030111,000209: 22,3421           02141                                    TFF                                   #  DO NOT TICK -TPER.  DISPLAY TFF, BUT NOT
030112,000210: 22,3422           02205                                    TSTART82                              #  -TPER.
030113,000211: 22,3423           02141                           STORE    TFF                                   #  TFF CORRECTED FOR TIME SINCE V82GOFF1
030114,000212: 22,3424           77776                           EXIT                                           #  BEGAN.
030115,000213: 22,3425           34752                           CAF      BIT2                                  
030116,000214: 22,3426           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY TFF.
030117,000215: 22,3427           05155                           TC       ENDOFJOB                              
030118,000216: 

Page 716

030120,000218: 22,3430           34747        TICKTEST           CAF      BIT5                                  #  THIS WAITLIST PROGRAM PERPETUATES ITSELF
030121,000219: 22,3431           71044                           MASK     EXTVBACT                              #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
030122,000220: 22,3432           10000                           CCS      A                                     
030123,000221: 22,3433           03441                           TC       DOTICK                                
030124,000222: 22,3434           37713                           CAF      PRIO25                                
030125,000223: 22,3435           05072                           TC       NOVAC                                 #  TERMINATE V 82.  CANT CALL ENDEXT IN RUPT.
030126,000224: 22,3436     1044                                  EBANK=   EXTVBACT                              
030127,000225: 22,3436           05472 04062                     2CADR    ENDEXT                                
030128,000226: 
030129,000227: 22,3440           05261                           TC       TASKOVER                              
030130,000228: 22,3441           34777        DOTICK             CAF      1SEC                                  #  RE-REQUEST TICKTEST.
030131,000229: 22,3442           05203                           TC       WAITLIST                              
030132,000230: 22,3443  E4,1540                                  EBANK=   TFF                                   
030133,000231: 22,3443           03430 44064                     2CADR    TICKTEST                              
030134,000232: 
030135,000233: 22,3445           36245                           CAF      THREE                                 
030136,000234: 22,3446           71537                           MASK     V82FLAGS                              
030137,000235: 22,3447           50000                           INDEX    A                                     
030138,000236: 22,3450           03451                           TC       +1                                    
030139,000237: 22,3451           05261                           TC       TASKOVER                              #  IF NO FLAGBITS SET DONT CHANGE TFF OR
030140,000238:                                                                                                  #  -TPER, BUT CONTINUE LOOP.
030141,000239: 22,3452           03460                           TC       TPERTICK                              #  ONLY BIT 1 SET.  INCR -TPER BY 1 SEC.
030142,000240: 22,3453           34777        TFFTICK            CAF      1SEC                                  #  ONLY BIT 2 SET.  INCR TFF BY 1 SEC.
030143,000241: 22,3454           54001                           TS       L                                     
030144,000242: 22,3455           34755                           CAF      ZERO                                  
030145,000243: 22,3456           21541                           DAS      TFF                                   
030146,000244: 22,3457           05261                           TC       TASKOVER                              
030147,000245: 22,3460           34777        TPERTICK           CAF      1SEC                                  
030148,000246: 22,3461           54001                           TS       L                                     
030149,000247: 22,3462           34755                           CAF      ZERO                                  
030150,000248: 22,3463           21543                           DAS      -TPER                                 
030151,000249: 22,3464           05261                           TC       TASKOVER                              
030152,000250: 

Page 717

030154,000252: 22,3465           77776        V82GON             EXIT                                           #  AVERAGE G ON.  USE CURRENT STATE VECTOR
030155,000253:                                                                                                  #  FOR ORBITAL PARAMETER CALCULATIONS.
030156,000254: 22,3466           35021                           CAF      PRIO7                                 #  LESS THAN LAMBERT
030157,000255: 22,3467           05105                           TC       FINDVAC                               #  V82GON1 WILL PERFORM ORBIT CALCULATIONS
030158,000256: 22,3470  E4,1540                                  EBANK=   TFF                                   #  ABOUT PROPER BODY APPROX ONCE PER SEC.
030159,000257: 22,3470           03503 44064                     2CADR    V82GON1                               
030160,000258: 
030161,000259: 22,3472           00003                           RELINT                                         
030162,000260: 22,3473           10067                           CCS      NEWJOB                                #  WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
030163,000261: 22,3474           05122                           TC       CHANG1                                #  IS DONE.  NOTE:  V82GON1 (PRIO7, FINDVAC
030164,000262:                                                                                                  #  JOB) IS COMPLETED BEFORE V82GON (PRIO7,
030165,000263:                                                                                                  #  NOVAC JOB).
030166,000264: 22,3475           33317        V82REDSP           CAF      V16N44                                #  MONITOR HAPO, HPER, TFF
030167,000265: 22,3476           04616                           TC       BANKCALL                              
030168,000266: 22,3477           20334                           CADR     GOXDSPF                               
030169,000267: 22,3500           05563                           TC       B5OFF                                 #  TERM THIS TELLS V82GON1 TO KILL ITSELF.
030170,000268: 22,3501           05563                           TC       B5OFF                                 #  PROC DITTO.
030171,000269: 22,3502           03475                           TC       V82REDSP                              #  RECYCLE
030172,000270: 
030173,000271: 22,3503           06037        V82GON1            TC       INTPRET                               #  THIS EXEC PROGRAM PERPETUATES ITSELF
030174,000272:                                                                                                  #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
030175,000273: 22,3504           52175                           VLOAD    GOTO                                  #  HOLDS OFF CCS NEWJOB BETWEEN RN AND
030176,000274: 22,3505           01221                                    RN                                    #  VN FETCH SO RN, VN ARE FROM SAME
030177,000275: 22,3506           45507                                    NEXTLINE                              #  STATE VECTOR UPDATE.
030178,000276: 22,3507           26207        NEXTLINE           STOVL    RONE                                  #  RN AT (-29)M FOR EARTH OR MOON
030179,000277: 22,3510           01227                                    VN                                    
030180,000278: 22,3511           02215                           STORE    VONE                                  #  VN AT (-7)M/CS FOR EARTH OR MOON
030181,000279: 22,3512           52014                           BON      GOTO                                  
030182,000280: 22,3513           04304                                    MOONTHIS                              #  FLAG INDICATES BODY ABOUT WHICH ORBITAL
030183,000281: 22,3514           45516                                    MOONGON                               #  CALCULATIONS ARE TO BE PERFORMED.
030184,000282: 22,3515           45527                                    EARTHGON                              #  IF SET - MOON, IF RESET - EARTH.
030185,000283: 
030186,000284: 22,3516           71214        MOONGON            SET      DLOAD                                 
030187,000285: 22,3517           03475                                    V82EMFLG                              #  INDICATE MOON SCALING FOR SR30.1
030188,000286: 22,3520           04001                                    1/RTMUM                               #  LUNAR PARAMETERS LOADED HERE FOR SR30.1
030189,000287: 22,3521           14037                           STODL    TFF/RTMU                              
030190,000288: 22,3522           05364                                    MINPERM                               
030191,000289: 22,3523           26201                           STOVL    HPERMIN                               
030192,000290: 22,3524           02023                                    RLS                                   #  SCALED AT (-27)M.
030193,000291: 22,3525           52046                           ABVAL    GOTO                                  
030194,000292: 22,3526           45536                                    V82GON2                               
030195,000293: 22,3527           71214        EARTHGON           CLEAR    DLOAD                                 
030196,000294: 22,3530           03675                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
030197,000295: 22,3531           04003                                    1/RTMUE                               #  EARTH PARAMETERS LOADED HERE FOR SR30.1
030198,000296: 22,3532           14037                           STODL    TFF/RTMU                              
030199,000297: 22,3533           05366                                    MINPERE                               
030200,000298: 22,3534           16201                           STODL    HPERMIN                               
030201,000299: 22,3535           06315                                    RPAD                                  
030202,000300: 22,3536           36203        V82GON2            STCALL   RPADTEM                               #  COMMON CODE FOR EARTH & MOON.
030203,000301: 22,3537           45551                                    SR30.1                                

Page 718

030205,000303: 22,3540           77776                           EXIT                                           
030206,000304: 22,3541           34747        V82GON3            CAF      BIT5                                  
030207,000305: 22,3542           71044                           MASK     EXTVBACT                              #  SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
030208,000306: 22,3543           00006                           EXTEND                                         
030209,000307: 22,3544           15472                           BZF      ENDEXT                                #  YES, TERMINATE VB 82 LOOP
030210,000308: 22,3545           34777                           CAF      1SEC                                  
030211,000309: 22,3546           04616                           TC       BANKCALL                              #  WAIT ONE SECOND BEFORE REPEATING
030212,000310: 22,3547           01735                           CADR     DELAYJOB                              #  ORBITAL PARAMETER COMPUTATION.
030213,000311: 22,3550           03503                           TC       V82GON1                               
030214,000312: 
030215,000313: 22,3551  22,3541               SPLRET             =        V82GON3                               
030216,000314: 

Page 719

030218,000316:                                                                                                  #  SUBROUTINE NAME: SR30.1
030219,000317:                                                                                                  #  MOD NO: 0                                                             DATE: 16 FEB 67
030220,000318:                                                                                                  #  MOD BY: RR BAIRNSFATHER                                               LOG SECTION: R32
030221,000319:                                                                                                  #  MOD NO: 1     MOD BY: RR BAIRNSFATHER         DATE: 11 APR 67         SR30.1 CHANGED TO ALLOW MONITOR OPERN
030222,000320:                                                                                                  #  MOD NO: 2     MOD BY: RR BAIRNSFATHER         DATE: 14 APR 67         ADD OVFL CK FOR RAPO
030223,000321:                                                                                                  #  MOD NO: 3     MOD BY ALONSO                   DATE: 11 DEC 67         SUBROUTINE REWRITTEN
030224,000322:                                                                                                  #  MOD NO: 4     MOD BY ALONSO                   DATE: 26 MAR 68         PROG MOD TO HANDLE DIF EARTH/MOON SCALE
030225,000323:                                                                                                  #  MOD NO: 5     MOD BY: RR BAIRNSFATHER         DATE: 6 AUG 68          OVFL CK FOR HAPO & HPER. VOIDS MOD #2.
030226,000324: 
030227,000325:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:  ORBITAL PARAMETERS DISPLAY FOR NOUNS 32 AND 44.
030228,000326:                                                                                                  #  SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
030229,000327:                                                                                                  #  RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
030230,000328:                                                                                                  #  LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
030231,000329:                                                                                                  #  TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
030232,000330:                                                                                                  #  IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
030233,000331:                                                                                                  #  NEGATIVE IN -TPER.  OTHERWISE STORES +0 IN -TPER.  WHENEVER TPER IS
030234,000332:                                                                                                  #  CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC.  IF HAPO
030235,000333:                                                                                                  #  WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
030236,000334: 
030237,000335:                                                                                                  #  ADDENDUM:     HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
030238,000336:                                                                                                  #                ABOVE REMARKS.
030239,000337: 
030240,000338:                                                                                                  #  CALLING SEQUENCE:     CALL
030241,000339:                                                                                                  #                                SR30.1
030242,000340: 
030243,000341:                                                                                                  #  SUBROUTINES CALLED:   TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
030244,000342: 
030245,000343:                                                                                                  #  NORMAL EXIT MODE:     CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
030246,000344: 
030247,000345:                                                                                                  #  ALARMS:       NONE
030248,000346: 
030249,000347:                                                                                                  #  OUTPUT:       RAPO    (-29) M EARTH   APOGEE RADIUS   EARTH CENTERED COORD.
030250,000348:                                                                                                  #                        (-27) M MOON                    MOON CENTERED COORD.
030251,000349:                                                                                                  #                RPER    (-29) M EARTH   PERIGEE RADIUS  EARTH CENTERED COORD.
030252,000350:                                                                                                  #                        (-27) M MOON                    MOON CENTERED COORD.
030253,000351:                                                                                                  #                HAPOX   (-29) M         APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
030254,000352:                                                                                                  #                HPERX   (-29) M         PERIGEE ALT. ABOVE PAD OR LAND. SITE    MAX VALUE LIMITED TO 9999.9 NM.
030255,000353:                                                                                                  #                TFF     (-28) CS        TIME TO 300KFT OR 35KFT ALTITUDE
030256,000354:                                                                                                  #                -TPER   (-28) CS        TIME TO PERIGEE
030257,000355: 
030258,000356:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
030259,000357:                                                                                                  #        TFF/RTMU        (+17) EARTH     RECIPROCAL OF PROPER GRAV CONSTANT FOR
030260,000358:                                                                                                  #                        (+14) MOON      EARTH OR MOON = 1/SQRT(MU).
030261,000359:                                                                                                  #        RONE            (-29) M         STATE VECTOR
030262,000360:                                                                                                  #        VONE            (-7)  M/CS      STATE VECTOR
030263,000361:                                                                                                  #        RPADTEM         (-29) M EARTH   RADIUS OF LAUNCH PAD OR LUNAR LANDING
030264,000362:                                                                                                  #                        (-27) M MOON    SITE.
030265,000363:                                                                                                  #        HPERMIN         (-29) M EARTH   (300 OR 35) KFT MINIMUM PERIGEE ALTITUDE
030266,000364:                                                                                                  #                        (-27) M MOON    ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
030267,000365:                                                                                                  #        V82EMFLG        (INT SW BIT)    RESET FOR EARTH, SET FOR MOON.
030268,000366: 
030269,000367:                                                                                                  #  DEBRIS:       QPRET, PDL, S2
030270,000368: 

Page 720

030272,000370: 22,3551                                           COUNT*   $$/SR30S                              
030273,000371: 
030274,000372: 22,3551           44001        SR30.1             SETPD    STQ                                   #  INITIALIZE PUSHDOWN LIST.
030275,000373: 22,3552           00001                                    0                                     
030276,000374: 22,3553           00051                                    S2                                    
030277,000375:                                                                                                  #  SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
030278,000376:                                                                                                  #                VONE AT (-7)M/CS
030279,000377:                                                                                                  #  TFFCONMU, TFFRP/RA, CALCTPER AND CALCTFF
030280,000378:                                                                                                  #  CALLS REQUIRE:
030281,000379:                                                                                                  #  EARTH CENTERED (NO RESCALING REQUIRED)
030282,000380:                                                                                                  #        RONE SCALED TO B-29 M
030283,000381:                                                                                                  #        VONE SCALED TO B-7  M/CS
030284,000382:                                                                                                  #  MOON CENTERED (RESCALING REQUIRED)
030285,000383:                                                                                                  #        RONE SCALED TO B-27 M
030286,000384:                                                                                                  #        VONE SCALED TO B-5  M/CS
030287,000385: 22,3554           77214                           BOFF     VLOAD                                 
030288,000386: 22,3555           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
030289,000387: 22,3556           45565                                    TFFCALLS                              
030290,000388: 22,3557           02207                                    RONE                                  
030291,000389: 22,3560           77752                           VSL2                                           
030292,000390: 22,3561           26207                           STOVL    RONE                                  
030293,000391: 22,3562           02215                                    VONE                                  
030294,000392: 22,3563           77752                           VSL2                                           
030295,000393: 22,3564           02215                           STORE    VONE                                  
030296,000394: 22,3565           77624        TFFCALLS           CALL                                           
030297,000395: 22,3566           57361                                    TFFCONMU                              
030298,000396: 22,3567           77624                           CALL                                           #  TFFRP/RA COMPUTES RAPO,RPER.
030299,000397: 22,3570           57427                                    TFFRP/RA                              
030300,000398:                                                                                                  #  RETURNS WITH RAPO IN D(MPAC).
030301,000399: 22,3571           77625                           DSU                                            
030302,000400: 22,3572           02203                                    RPADTEM                               
030303,000401: 22,3573           64414                           BOFF     SR2R                                  #  NEED HAPO AT (-29)M FOR DISPLAY.
030304,000402:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
030305,000403:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
030306,000404: 22,3574           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
030307,000405: 22,3575           45576                                    +1                                    
030308,000406: 22,3576           77624                           CALL                                           #  IF HAPO > MAXNM, SET HAPO =9999.9 NM.
030309,000407: 22,3577           45636                                    MAXCHK                                #  OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
030310,000408: 22,3600           16120        STORHAPO           STODL    HAPOX                                 
030311,000409: 22,3601           00017                                    RPER                                  
030312,000410: 22,3602           77625                           DSU                                            
030313,000411: 22,3603           02203                                    RPADTEM                               #  GIVES HPER AT (-29)M EARTH, (-27)M MOON.
030314,000412: 22,3604           00161                           STORE    MPAC       +4                         #  SAVE THIS FOR COMPARISON TO HPERMIN.
030315,000413: 22,3605           64414                           BOFF     SR2R                                  #  NEED HPER AT (-29)M FOR DISPLAY.
030316,000414:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
030317,000415:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
030318,000416: 22,3606           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
030319,000417: 22,3607           45610                                    +1                                    
030320,000418: 22,3610           77624                           CALL                                           #  IF HPER > MAXNM, SET HPER = 9999.9 NM.
030321,000419: 22,3611           45636                                    MAXCHK                                

Page 721

030323,000421: 22,3612           16122        STORHPER           STODL    HPERX                                 #  STORE (RPER - RPADTEM) INTO HPERX.
030324,000422: 22,3613           00161                                    MPAC       +4                         
030325,000423: 22,3614           51025                           DSU      BPL                                   #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
030326,000424: 22,3615           02201                                    HPERMIN                               #  IF HPER L/ HPERMIN (300 OR 35) KFT,
030327,000425: 22,3616           45622                                    DOTPER                                #  THEN ZERO INTO -TPER.
030328,000426: 22,3617           52145                           DLOAD    GOTO                                  #  OTHERWISE CALCULATE TPER.
030329,000427: 22,3620           06522                                    HI6ZEROS                              
030330,000428: 22,3621           45626                                    SKIPTPER                              
030331,000429: 22,3622           45145        DOTPER             DLOAD    CALL                                  
030332,000430: 22,3623           00017                                    RPER                                  
030333,000431: 22,3624           57465                                    CALCTPER                              
030334,000432: 22,3625           77676                           DCOMP                                          #  TPER IS PUT NEG INTO -TPER.
030335,000433: 22,3626           16143        SKIPTPER           STODL    -TPER                                 
030336,000434: 22,3627           02201                                    HPERMIN                               #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
030337,000435: 22,3630           45015                           DAD      CALL                                  
030338,000436: 22,3631           02203                                    RPADTEM                               #  RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
030339,000437: 22,3632           57470                                    CALCTFF                               #  GIVES 59M59S FOR TFF IF RPER G/
030340,000438: 22,3633           77676                           DCOMP                                          #  HPERMIN + RPADTEM.  (TPER WAS NON ZERO)
030341,000439: 22,3634           36141                           STCALL   TFF                                   #  OTHERWISE COMPUTES TFF.       (GOTO)
030342,000440: 22,3635           00051                                    S2                                    
030343,000441: 
030344,000442: 22,3636           51025        MAXCHK             DSU      BPL                                   #  IF C(MPAC) > 9999.9 NM, MPAC = 9999.9 NM
030345,000443: 22,3637           05646                                    MAXNM                                 
030346,000444: 22,3640           45643                                    +3                                    #  OTHERWISE C(MPAC) = B(MPAC).
030347,000445: 22,3641           43415                           DAD      RVQ                                   
030348,000446: 22,3642           05646                                    MAXNM                                 
030349,000447: 22,3643           43545                 +3        DLOAD    RVQ                                   #  (USED BY P30 - P37 ALSO)
030350,000448: 22,3644           05646                                    MAXNM                                 
030351,000449: 
030352,000450: 22,3645           01065 05603  MAXNM              2OCT     0106505603                            
030353,000451: 

Page 722 Empty page.

030356,000454: 

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