Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

031365,000002:                                                                                                  ## Copyright:   Public domain.
031366,000003:                                                                                                  ## Filename:    R30.agc
031367,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
031368,000005:                                                                                                  ##              It is part of the source code for the original release
031369,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
031370,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
031371,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
031372,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
031373,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
031374,000011:                                                                                                  ##              that the code format has been changed to conform to the
031375,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
031376,000013:                                                                                                  ##              original YUL assembler.
031377,000014:                                                                                                  ## Reference:   pp. 720-730
031378,000015:                                                                                                  ## Assembler:   yaYUL
031379,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
031380,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
031381,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
031382,000019:                                                                                                  ##              2016-12-14 MAS  Updated from comment-proofed Luminary 99 version.
031383,000020:                                                                                                  ##              2017-01-18 RRB  Updated for Luminary 69.
031384,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
031385,000022:                                                                                                  ##                              and fixed errors found.
031386,000023:                                                                                                  ##              2017-02-08 RSB  Comment-text fixes discovered while proofing Artemis 72.
031387,000024:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
031388,000025:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
031389,000026:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
031390,000027:                                                                                                  ##                              Luminary 99 vs Comanche 55.
031391,000028: 

Page 720

031393,000030:                                                                                                  #  SUBROUTINE NAME:  V82CALL
031394,000031:                                                                                                  #  MOD NO: 0                                                             DATE: 16 FEB 67
031395,000032:                                                                                                  #  MOD BY: RR BAIRNSFATHER                                               LOG SECTION:  R30
031396,000033:                                                                                                  #  MOD NO: 1     MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67         SR30.1 CHANGED TO ALLOW MONITOR OPERN
031397,000034:                                                                                                  #  MOD NO: 2     MOD BY  ALONSO                  DATE: 11 DEC 67         VB82 PROGRAM REWRITTEN
031398,000035:                                                                                                  #  MOD NO: 3     MOD BY  ALONSO                  DATE: 26 MAR 68         PROG MOD TO HANDLE DIF EARTH/MOON SCALE
031399,000036: 
031400,000037:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:   CALLED BY VERB 82 ENTER.  PRIORITY 10
031401,000038:                                                                                                  #  USED THROUGHOUT.              CALCULATE AND DISPLAY ORBITAL PARAMETERS
031402,000039: 
031403,000040:                                                                                                  #  1.    IF AVERAGE G IS OFF:
031404,000041:                                                                                                  #                FLASH DISPLAY V04N06.  R2 INDICATES WHICH SHIP'S STATE VECTOR IS
031405,000042:                                                                                                  #                        TO BE UPDATED.  INITIAL CHOICE IS THIS SHIP (R2=1).  ASTRONAUT
031406,000043:                                                                                                  #                        CAN CHANGE TO OTHER SHIP BY V22EXE, WHERE X NOT EQ 1.
031407,000044:                                                                                                  #                SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
031408,000045:                                                                                                  #                CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
031409,000046:                                                                                                  #                        RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
031410,000047:                                                                                                  #                        HEIGHT ABOVE LAUNCH PAD OR LUNAR LANDING SITE), HAPO (APOGEE
031411,000048:                                                                                                  #                        HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
031412,000049:                                                                                                  #                        INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
031413,000050:                                                                                                  #                FLASH MONITOR V16N44 (HAPO, HPER, TFF).  TFF IS -59M59S IF IT WAS
031414,000051:                                                                                                  #                        NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
031415,000052:                                                                                                  #                        ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
031416,000053:                                                                                                  #                        DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
031417,000054:                                                                                                  #                        ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
031418,000055:                                                                                                  #        2.      IF AVERAGE G IS ON:
031419,000056:                                                                                                  #                        CALLS SR30.1 APPROX EVERY TWO SECS.  STATE VECTOR IS ALWAYS
031420,000057:                                                                                                  #                                FOR THIS VEHICLE.  V82 DOES NOT DISTURB STATE VECTOR.  RESULTS
031421,000058:                                                                                                  #                                OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
031422,000059:                                                                                                  #                        FLASH MONITOR V16N44 (HAPO, HPER, TFF).
031423,000060:                                                                                                  #        ADDENDUM:  HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
031424,000061:                                                                                                  #                ABOVE REMARKS.
031425,000062: 
031426,000063:                                                                                                  #  CALLING SEQUENCE: VERB 82 ENTER.
031427,000064: 
031428,000065:                                                                                                  #  SUBROUTINES CALLED:   SR30.1, GOXDSPF
031429,000066:                                                                                                  #                        MAYBE - THISPREC, OTHPREC, LOADTIME, DELRSPL
031430,000067: 
031431,000068:                                                                                                  #  NORMAL EXIT MODES:  TC ENDEXT
031432,000069: 
031433,000070:                                                                                                  #  ALARMS:  NONE
031434,000071: 
031435,000072:                                                                                                  #  OUTPUT:       HAPOX   (-29) M
031436,000073:                                                                                                  #                HPERX   (-29) M
031437,000074:                                                                                                  #                RAPO    (-29) M EARTH
031438,000075:                                                                                                  #                        (-27) M MOON
031439,000076:                                                                                                  #                RPER    (-29) M EARTH
031440,000077:                                                                                                  #                        (-27) M MOON
031441,000078:                                                                                                  #                TFF     (-28) CS        CONTAINS NEGATIVE QUANTITY
031442,000079:                                                                                                  #                -TPER   (-28) CS        CONTAINS NEGATIVE QUANTITY
031443,000080: 

Page 721

031445,000082:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:  STATE VECTOR.
031446,000083: 
031447,000084:                                                                                                  #  DEBRIS:       QPRET, RONE, VONE, TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
031448,000085:                                                                                                  #                MAYBE:  TSTART82, V82FLAGS, TDEC1.
031449,000086: 
031450,000087: 13,2351  E4,1517                                  EBANK=   HAPOX                                 
031451,000088: 31,2172                                           BANK     31                                    
031452,000089: 22,2000                                           SETLOC   R30LOC                                
031453,000090: 22,2000                                           BANK                                           
031454,000091: 22,3242                                           COUNT*   $$/R30                                
031455,000092: 
031456,000093: 22,3242           06036        V82CALL            TC       INTPRET                               
031457,000094: 22,3243           52014                           BON      GOTO                                  
031458,000095: 22,3244           03712                                    AVEGFLAG                              
031459,000096: 22,3245           45465                                    V82GON                                #  IF AVERAGE G ON
031460,000097: 22,3246           45247                                    V82GOFF                               #  IF AVERAGE G OFF
031461,000098: 
031462,000099: 22,3247           77776        V82GOFF            EXIT                                           #  ALLOW ASTRONAUT TO SELECT VEHICLE
031463,000100: 22,3250           34752                           CAF      TWO                                   #  DESIRED FOR ORBITAL PARAMETERS
031464,000101: 22,3251           55051                           TS       OPTIONX                               #  CALCULATION AND DISPLAY.
031465,000102: 22,3252           34753                           CAF      ONE                                   
031466,000103: 22,3253           55052                           TS       OPTIONX    +1                         
031467,000104: 22,3254           33316                           CAF      OPTIONVN                              #  V 04 N 06
031468,000105: 22,3255           04616                           TC       BANKCALL                              
031469,000106: 22,3256           20212                           CADR     GOXDSPF                               
031470,000107: 22,3257           05472                           TC       ENDEXT                                #  TERMINATE
031471,000108: 22,3260           03262                           TC       +2                                    #  PROCEED
031472,000109: 22,3261           03254                           TC       -5                                    #  DATA IN.  OPTION1+1 = 1 FOR THIS VEHICLE.
031473,000110:                                                                                                  #                UNEQ 1 FOR OTHER VEHICLE.
031474,000111: 22,3262           34750                           CAF      BIT4                                  #  80 MS
031475,000112: 22,3263           05203                           TC       WAITLIST                              
031476,000113: 22,3264  E4,1540                                  EBANK=   TFF                                   
031477,000114: 22,3264           03430 44064                     2CADR    TICKTEST                              
031478,000115: 
031479,000116: 22,3266           00003                           RELINT                                         
031480,000117: 22,3267           33320        V82GOFLP           CAF      TFFBANK                               #  MAJOR RECYCLE LOOP ENTRY
031481,000118: 22,3270           54003                           TS       EBANK                                 
031482,000119: 22,3271           34755                           CAF      ZERO                                  
031483,000120: 22,3272           55537                           TS       V82FLAGS                              #  ZERO FLAGS FOR TICKTEST. INHIBITS
031484,000121:                                                                                                  #  DECREMENTING OF TFF AND -TPER.
031485,000122: 22,3273           35021                           CAF      PRIO7                                 
031486,000123: 22,3274           05105                           TC       FINDVAC                               #  V82GOFF1 WILL EXECUTE STATE VECTOR
031487,000124: 22,3275  E4,1540                                  EBANK=   TFF                                   #  UPDATE AND ORBIT CALCULATIONS FOR
031488,000125: 22,3275           03321 44064                     2CADR    V82GOFF1                              #  SELECTED VEHICLE ABOUT PROPER BODY.
031489,000126: 
031490,000127: 22,3277           00003                           RELINT                                         
031491,000128: 22,3300           36244        V82STALL           CAF      THREE                                 #  STALL IN THIS LOOP AND WITHOLD V 16 N 44

Page 722

031493,000130: 22,3301           71537                           MASK     V82FLAGS                              #  UNTIL STATE VECTOR UPDATE SETS ONE OF
031494,000131: 22,3302           10000                           CCS      A                                     #  OUR FLAG BITS.
031495,000132: 22,3303           03310                           TC       FLAGGON                               #  EXIT FROM STALL LOOP.
031496,000133: 22,3304           34777                           CAF      1SEC                                  
031497,000134: 22,3305           04616                           TC       BANKCALL                              
031498,000135: 22,3306           01735                           CADR     DELAYJOB                              
031499,000136: 22,3307           03300                           TC       V82STALL                              
031500,000137: 
031501,000138: 22,3310           33317        FLAGGON            CAF      V16N44                                #  MONITOR HAPO,HPER,TFF.
031502,000139: 22,3311           04616                           TC       BANKCALL                              
031503,000140: 22,3312           20212                           CADR     GOXDSPF                               
031504,000141: 22,3313           05563                           TC       B5OFF                                 #  TERM  THIS TELLS TICKTEST TO KILL ITSELF
031505,000142: 22,3314           05563                           TC       B5OFF                                 #  PROCEED   DITTO
031506,000143: 22,3315           03267                           TC       V82GOFLP                              #  RECYCLE   RECOMPUTE STATE VECT + DISPLAY
031507,000144: 
031508,000145: 22,3316           01014        OPTIONVN           VN       412                                   
031509,000146: 22,3317           04054        V16N44             VN       1644                                  
031510,000147: 22,3320           02140        TFFBANK            ECADR    TFF                                   
031511,000148: 
031512,000149: 22,3321           06036        V82GOFF1           TC       INTPRET                               
031513,000150: 22,3322           77634                           RTB                                            
031514,000151: 22,3323           21462                                    LOADTIME                              
031515,000152: 22,3324           00041                           STORE    TDEC1                                 #  TIME FOR STATE VECTOR UPDATE.
031516,000153: 22,3325           02211                           STORE    TSTART82                              #  TIME FOR INTERNAL USE.
031517,000154: 22,3326           77776                           EXIT                                           
031518,000155: 22,3327           41052                           CS       OPTIONX    +1                         #  1 FOR THIS VEHICLE, NOT 1 FOR OTHER.
031519,000156: 22,3330           64753                           AD       ONE                                   
031520,000157: 22,3331           00006                           EXTEND                                         
031521,000158: 22,3332           13356                           BZF      THISSHIP                              
031522,000159: 22,3333           06036        OTHSHIP            TC       INTPRET                               
031523,000160: 22,3334           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR OTHER SHIP.
031524,000161: 22,3335           27043                                    OTHPREC                               
031525,000162: 22,3336           77775        BOTHSHIP           VLOAD                                          #  MOVE RESULTS INTO TFFCONIC STORAGE AREAS
031526,000163: 22,3337           00001                                    RATT                                  #  TO BE CALLED BY SR30.1.
031527,000164: 22,3340           26213                           STOVL    RONE                                  #  RATT AT (-29)M FOR EARTH OR MOON
031528,000165: 22,3341           00007                                    VATT                                  
031529,000166: 22,3342           02221                           STORE    VONE                                  #  VATT AT (-7)M/CS FOR EARTH OR MOON
031530,000167: 22,3343           77743                           DLOAD*                                         
031531,000168: 22,3344           73774                                    1/RTMUE,2                             #  X2 IS 0 FOR EARTH CENTERED STATE VEC
031532,000169: 22,3345           00037                           STORE    TFF/RTMU                              #  X2 IS 2 FOR MOON
031533,000170: 22,3346           77743                           DLOAD*                                         #  AS LEFT BY THISPREC OR OTHPREC.
031534,000171: 22,3347           72411                                    MINPERE,2                             
031535,000172: 22,3350           02205                           STORE    HPERMIN                               #  TFFRTMU, HPERMIN AND RPADTEM ARE ALL
031536,000173: 22,3351           46135                           SLOAD    BHIZ                                  #  EARTH/MOON PARAMETERS AS SET HERE.
031537,000174: 22,3352           00050                                    X2                                    
031538,000175: 22,3353           45367                                    EARTHPAD                              
031539,000176: 22,3354           77650                           GOTO                                           
031540,000177: 22,3355           45373                                    MOONPAD                               

Page 723

031542,000179: 22,3356           06036        THISSHIP           TC       INTPRET                               
031543,000180: 22,3357           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR THIS SHIP.
031544,000181: 22,3360           27057                                    THISPREC                              
031545,000182: 22,3361           77650                           GOTO                                           
031546,000183: 22,3362           45336                                    BOTHSHIP                              
031547,000184: 
031548,000185:                                                                                                  #  THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED.  DO NOT SEPARATE PAIRS.
031549,000186: 
031550,000187: 22,3363           00001 11530  MINPERM            2DEC     10668      B-27                       #  35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
031551,000188: 
031552,000189: 22,3365           00002 31230  MINPERE            2DEC     91440      B-29                       #  300 KFT (-29)M FOR EARTH
031553,000190: 
031554,000191: 22,3367           43145        EARTHPAD           DLOAD    CLRGO                                 #  PAD 37-B RADIUS.  SCALED AT (-29)M.
031555,000192: 22,3370           06276                                    RPAD                                  
031556,000193: 22,3371           03635                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
031557,000194: 22,3372           45377                                    BOTHPAD                               
031558,000195: 
031559,000196: 22,3373           51575        MOONPAD            VLOAD    ABVAL                                 #  COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
031560,000197: 22,3374           02023                                    RLS                                   #  SCALED AT (-27)M.
031561,000198: 22,3375           77614                           SET                                            
031562,000199: 22,3376           03475                                    V82EMFLG                              #  INDICATE MOON  SCALING FOR SR30.1
031563,000200: 22,3377           36207        BOTHPAD            STCALL   RPADTEM                               
031564,000201: 22,3400           45551                                    SR30.1                                #  CALCULATE ORBITAL PARAMETERS
031565,000202: 22,3401           45234                           RTB      DSU                                   
031566,000203: 22,3402           21462                                    LOADTIME                              
031567,000204: 22,3403           02211                                    TSTART82                              #  PRESENT TIME - TIME V82GOFF1 BEGAN
031568,000205: 22,3404           02211                           STORE    TSTART82                              #                  SAVE IT
031569,000206: 22,3405           53145                           DLOAD    BZE                                   #  SR30.1 SETS -TPER=0 IF HPER L/
031570,000207: 22,3406           02143                                    -TPER                                 #  HPERMIN (300 OR 35) KFT.
031571,000208: 22,3407           45420                                    TICKTIFF                              #  (-TPER = 0)
031572,000209: 22,3410           43345        TICKTPER           DLOAD    DAD                                   #  (-TPER NON ZERO) TFF WAS NOT COMPUTED,
031573,000210: 22,3411           02143                                    -TPER                                 #  BUT WAS SET TO 59M59S.  DONT TICK TFF, DO
031574,000211: 22,3412           02211                                    TSTART82                              #  TICK -TPER.  DISPLAY BOTH.
031575,000212: 22,3413           02143                           STORE    -TPER                                 #  -TPER CORRECTED FOR TIME SINCE V82GOFF1
031576,000213: 22,3414           77776                           EXIT                                           #  BEGAN.
031577,000214: 22,3415           34753                           CAF      BIT1                                  
031578,000215: 22,3416           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY -TPER
031579,000216: 22,3417           05155                           TC       ENDOFJOB                              
031580,000217: 
031581,000218: 22,3420           43345        TICKTIFF           DLOAD    DAD                                   #  (-TPER=0) TFF WAS COMPUTED.  TICK TFF.
031582,000219: 22,3421           02141                                    TFF                                   #  DO NOT TICK -TPER.  DISPLAY TFF, BUT NOT
031583,000220: 22,3422           02211                                    TSTART82                              #  -TPER.
031584,000221: 22,3423           02141                           STORE    TFF                                   #  TFF CORRECTED FOR TIME SINCE V82GOFF1
031585,000222: 22,3424           77776                           EXIT                                           #  BEGAN.
031586,000223: 22,3425           34752                           CAF      BIT2                                  
031587,000224: 22,3426           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY TFF.
031588,000225: 22,3427           05155                           TC       ENDOFJOB                              
031589,000226: 

Page 724

031591,000228: 22,3430           34747        TICKTEST           CAF      BIT5                                  #  THIS WAITLIST PROGRAM PERPETUATES ITSELF
031592,000229: 22,3431           71044                           MASK     EXTVBACT                              #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
031593,000230: 22,3432           10000                           CCS      A                                     
031594,000231: 22,3433           03441                           TC       DOTICK                                
031595,000232: 22,3434           37712                           CAF      PRIO25                                
031596,000233: 22,3435           05072                           TC       NOVAC                                 #  TERMINATE V 82.  CANT CALL ENDEXT IN RUPT.
031597,000234: 22,3436     1044                                  EBANK=   EXTVBACT                              
031598,000235: 22,3436           05472 04062                     2CADR    ENDEXT                                
031599,000236: 
031600,000237: 22,3440           05261                           TC       TASKOVER                              
031601,000238: 22,3441           34777        DOTICK             CAF      1SEC                                  #  RE-REQUEST TICKTEST.
031602,000239: 22,3442           05203                           TC       WAITLIST                              
031603,000240: 22,3443  E4,1540                                  EBANK=   TFF                                   
031604,000241: 22,3443           03430 44064                     2CADR    TICKTEST                              
031605,000242: 
031606,000243: 22,3445           36244                           CAF      THREE                                 
031607,000244: 22,3446           71537                           MASK     V82FLAGS                              
031608,000245: 22,3447           50000                           INDEX    A                                     
031609,000246: 22,3450           03451                           TC       +1                                    
031610,000247: 22,3451           05261                           TC       TASKOVER                              #  IF NO FLAGBITS SET DONT CHANGE TFF OR
031611,000248:                                                                                                  #  -TPER, BUT CONTINUE LOOP.
031612,000249: 22,3452           03460                           TC       TPERTICK                              #  ONLY BIT 1 SET.  INCR -TPER BY 1 SEC.
031613,000250: 22,3453           34777        TFFTICK            CAF      1SEC                                  #  ONLY BIT 2 SET.  INCR TFF BY 1 SEC.
031614,000251: 22,3454           54001                           TS       L                                     
031615,000252: 22,3455           34755                           CAF      ZERO                                  
031616,000253: 22,3456           21541                           DAS      TFF                                   
031617,000254: 22,3457           05261                           TC       TASKOVER                              
031618,000255: 22,3460           34777        TPERTICK           CAF      1SEC                                  
031619,000256: 22,3461           54001                           TS       L                                     
031620,000257: 22,3462           34755                           CAF      ZERO                                  
031621,000258: 22,3463           21543                           DAS      -TPER                                 
031622,000259: 22,3464           05261                           TC       TASKOVER                              
031623,000260: 

Page 725

031625,000262: 22,3465           77776        V82GON             EXIT                                           #  AVERAGE G ON.  USE CURRENT STATE VECTOR
031626,000263:                                                                                                  #  FOR ORBITAL PARAMETER CALCULATIONS.
031627,000264: 22,3466           35021                           CAF      PRIO7                                 #  LESS THAN LAMBERT
031628,000265: 22,3467           05105                           TC       FINDVAC                               #  V82GON1 WILL PERFORM ORBIT CALCULATIONS
031629,000266: 22,3470  E4,1540                                  EBANK=   TFF                                   #  ABOUT PROPER BODY APPROX ONCE PER SEC.
031630,000267: 22,3470           03503 44064                     2CADR    V82GON1                               
031631,000268: 
031632,000269: 22,3472           00003                           RELINT                                         
031633,000270: 22,3473           10067                           CCS      NEWJOB                                #  WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
031634,000271: 22,3474           05122                           TC       CHANG1                                #  IS DONE.  NOTE:  V82GON1 (PRIO7, FINDVAC
031635,000272:                                                                                                  #  JOB) IS COMPLETED BEFORE V82GON (PRIO7,
031636,000273:                                                                                                  #  NOVAC JOB).
031637,000274: 22,3475           33317        V82REDSP           CAF      V16N44                                #  MONITOR HAPO, HPER, TFF
031638,000275: 22,3476           04616                           TC       BANKCALL                              
031639,000276: 22,3477           20212                           CADR     GOXDSPF                               
031640,000277: 22,3500           05563                           TC       B5OFF                                 #  TERM THIS TELLS V82GON1 TO KILL ITSELF.
031641,000278: 22,3501           05563                           TC       B5OFF                                 #  PROC DITTO.
031642,000279: 22,3502           03475                           TC       V82REDSP                              #  RECYCLE
031643,000280: 
031644,000281: 22,3503           06036        V82GON1            TC       INTPRET                               #  THIS EXEC PROGRAM PERPETUATES ITSELF
031645,000282:                                                                                                  #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
031646,000283: 22,3504           52175                           VLOAD    GOTO                                  #  HOLDS OFF CCS NEWJOB BETWEEN RN AND
031647,000284: 22,3505           01221                                    RN                                    #  VN FETCH SO RN, VN ARE FROM SAME
031648,000285: 22,3506           45507                                    NEXTLINE                              #  STATE VECTOR UPDATE.
031649,000286: 22,3507           26213        NEXTLINE           STOVL    RONE                                  #  RN AT (-29)M FOR EARTH OR MOON
031650,000287: 22,3510           01227                                    VN                                    
031651,000288: 22,3511           02221                           STORE    VONE                                  #  VN AT (-7)M/CS FOR EARTH OR MOON
031652,000289: 22,3512           52014                           BON      GOTO                                  
031653,000290: 22,3513           04304                                    MOONTHIS                              #  FLAG INDICATES BODY ABOUT WHICH ORBITAL
031654,000291: 22,3514           45516                                    MOONGON                               #  CALCULATIONS ARE TO BE PERFORMED.
031655,000292: 22,3515           45527                                    EARTHGON                              #  IF SET - MOON, IF RESET - EARTH.
031656,000293: 
031657,000294: 22,3516           71214        MOONGON            SET      DLOAD                                 
031658,000295: 22,3517           03475                                    V82EMFLG                              #  INDICATE MOON SCALING FOR SR30.1
031659,000296: 22,3520           04001                                    1/RTMUM                               #  LUNAR PARAMETERS LOADED HERE FOR SR30.1
031660,000297: 22,3521           14037                           STODL    TFF/RTMU                              
031661,000298: 22,3522           05364                                    MINPERM                               
031662,000299: 22,3523           26205                           STOVL    HPERMIN                               
031663,000300: 22,3524           02023                                    RLS                                   #  SCALED AT (-27)M.
031664,000301: 22,3525           52046                           ABVAL    GOTO                                  
031665,000302: 22,3526           45536                                    V82GON2                               
031666,000303: 22,3527           71214        EARTHGON           CLEAR    DLOAD                                 
031667,000304: 22,3530           03675                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
031668,000305: 22,3531           04003                                    1/RTMUE                               #  EARTH PARAMETERS LOADED HERE FOR SR30.1
031669,000306: 22,3532           14037                           STODL    TFF/RTMU                              
031670,000307: 22,3533           05366                                    MINPERE                               
031671,000308: 22,3534           16205                           STODL    HPERMIN                               
031672,000309: 22,3535           06276                                    RPAD                                  
031673,000310: 22,3536           36207        V82GON2            STCALL   RPADTEM                               #  COMMON CODE FOR EARTH & MOON.
031674,000311: 22,3537           45551                                    SR30.1                                

Page 726

031676,000313: 22,3540           77776                           EXIT                                           
031677,000314: 22,3541           34747        V82GON3            CAF      BIT5                                  
031678,000315: 22,3542           71044                           MASK     EXTVBACT                              #  SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
031679,000316: 22,3543           00006                           EXTEND                                         
031680,000317: 22,3544           15472                           BZF      ENDEXT                                #  YES, TERMINATE VB 82 LOOP
031681,000318: 22,3545           34777                           CAF      1SEC                                  
031682,000319: 22,3546           04616                           TC       BANKCALL                              #  WAIT ONE SECOND BEFORE REPEATING
031683,000320: 22,3547           01735                           CADR     DELAYJOB                              #  ORBITAL PARAMETER COMPUTATION.
031684,000321: 22,3550           03503                           TC       V82GON1                               
031685,000322: 
031686,000323: 22,3551  22,3541               SPLRET             =        V82GON3                               
031687,000324: 

Page 727

031689,000326:                                                                                                  #  SUBROUTINE NAME: SR30.1
031690,000327:                                                                                                  #  MOD NO: 0                                                             DATE: 16 FEB 67
031691,000328:                                                                                                  #  MOD BY: RR BAIRNSFATHER                                               LOG SECTION: R32
031692,000329:                                                                                                  #  MOD NO: 1     MOD BY: RR BAIRNSFATHER         DATE: 11 APR 67         SR30.1 CHANGED TO ALLOW MONITOR OPERN
031693,000330:                                                                                                  #  MOD NO: 2     MOD BY: RR BAIRNSFATHER         DATE: 14 APR 67         ADD OVFL CK FOR RAPO
031694,000331:                                                                                                  #  MOD NO: 3     MOD BY ALONSO                   DATE: 11 DEC 67         SUBROUTINE REWRITTEN
031695,000332:                                                                                                  #  MOD NO: 4     MOD BY ALONSO                   DATE: 26 MAR 68         PROG MOD TO HANDLE DIF EARTH/MOON SCALE
031696,000333:                                                                                                  #  MOD NO: 5     MOD BY: RR BAIRNSFATHER         DATE: 6 AUG 68          OVFL CK FOR HAPO & HPER. VOIDS MOD #2.
031697,000334: 
031698,000335:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:  ORBITAL PARAMETERS DISPLAY FOR NOUNS 32 AND 44.
031699,000336:                                                                                                  #  SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
031700,000337:                                                                                                  #  RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
031701,000338:                                                                                                  #  LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
031702,000339:                                                                                                  #  TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
031703,000340:                                                                                                  #  IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
031704,000341:                                                                                                  #  NEGATIVE IN -TPER.  OTHERWISE STORES +0 IN -TPER.  WHENEVER TPER IS
031705,000342:                                                                                                  #  CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC.  IF HAPO
031706,000343:                                                                                                  #  WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
031707,000344: 
031708,000345:                                                                                                  #  ADDENDUM:     HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
031709,000346:                                                                                                  #                ABOVE REMARKS.
031710,000347: 
031711,000348:                                                                                                  #  CALLING SEQUENCE:     CALL
031712,000349:                                                                                                  #                                SR30.1
031713,000350: 
031714,000351:                                                                                                  #  SUBROUTINES CALLED:   TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
031715,000352: 
031716,000353:                                                                                                  #  NORMAL EXIT MODE:     CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
031717,000354: 
031718,000355:                                                                                                  #  ALARMS:       NONE
031719,000356: 
031720,000357:                                                                                                  #  OUTPUT:       RAPO    (-29) M EARTH   APOGEE RADIUS   EARTH CENTERED COORD.
031721,000358:                                                                                                  #                        (-27) M MOON                    MOON CENTERED COORD.
031722,000359:                                                                                                  #                RPER    (-29) M EARTH   PERIGEE RADIUS  EARTH CENTERED COORD.
031723,000360:                                                                                                  #                        (-27) M MOON                    MOON CENTERED COORD.
031724,000361:                                                                                                  #                HAPOX   (-29) M         APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
031725,000362:                                                                                                  #                HPERX   (-29) M         PERIGEE ALT. ABOVE PAD OR LAND. SITE    MAX VALUE LIMITED TO 9999.9 NM.
031726,000363:                                                                                                  #                TFF     (-28) CS        TIME TO 300KFT OR 35KFT ALTITUDE
031727,000364:                                                                                                  #                -TPER   (-28) CS        TIME TO PERIGEE
031728,000365: 
031729,000366:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
031730,000367:                                                                                                  #        TFF/RTMU        (+17) EARTH     RECIPROCAL OF PROPER GRAV CONSTANT FOR
031731,000368:                                                                                                  #                        (+14) MOON      EARTH OR MOON = 1/SQRT(MU).
031732,000369:                                                                                                  #        RONE            (-29) M         STATE VECTOR
031733,000370:                                                                                                  #        VONE            (-7)  M/CS      STATE VECTOR
031734,000371:                                                                                                  #        RPADTEM         (-29) M EARTH   RADIUS OF LAUNCH PAD OR LUNAR LANDING
031735,000372:                                                                                                  #                        (-27) M MOON    SITE.
031736,000373:                                                                                                  #        HPERMIN         (-29) M EARTH   (300 OR 35) KFT MINIMUM PERIGEE ALTITUDE
031737,000374:                                                                                                  #                        (-27) M MOON    ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
031738,000375:                                                                                                  #        V82EMFLG        (INT SW BIT)    RESET FOR EARTH, SET FOR MOON.
031739,000376: 
031740,000377:                                                                                                  #  DEBRIS:       QPRET, PDL, S2
031741,000378: 

Page 728

031743,000380: 22,3551                                           COUNT*   $$/SR30S                              
031744,000381: 
031745,000382: 22,3551           44001        SR30.1             SETPD    STQ                                   #  INITIALIZE PUSHDOWN LIST.
031746,000383: 22,3552           00001                                    0                                     
031747,000384: 22,3553           00051                                    S2                                    
031748,000385:                                                                                                  #  SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
031749,000386:                                                                                                  #                VONE AT (-7)M/CS
031750,000387:                                                                                                  #  TFFCONMU, TFFRP/RA, CALCTPER AND CALCTFF
031751,000388:                                                                                                  #  CALLS REQUIRE:
031752,000389:                                                                                                  #  EARTH CENTERED (NO RESCALING REQUIRED)
031753,000390:                                                                                                  #        RONE SCALED TO B-29 M
031754,000391:                                                                                                  #        VONE SCALED TO B-7  M/CS
031755,000392:                                                                                                  #  MOON CENTERED (RESCALING REQUIRED)
031756,000393:                                                                                                  #        RONE SCALED TO B-27 M
031757,000394:                                                                                                  #        VONE SCALED TO B-5  M/CS
031758,000395: 22,3554           77214                           BOFF     VLOAD                                 
031759,000396: 22,3555           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031760,000397: 22,3556           45565                                    TFFCALLS                              
031761,000398: 22,3557           02213                                    RONE                                  
031762,000399: 22,3560           77752                           VSL2                                           
031763,000400: 22,3561           26213                           STOVL    RONE                                  
031764,000401: 22,3562           02221                                    VONE                                  
031765,000402: 22,3563           77752                           VSL2                                           
031766,000403: 22,3564           02221                           STORE    VONE                                  
031767,000404: 22,3565           77624        TFFCALLS           CALL                                           
031768,000405: 22,3566           57333                                    TFFCONMU                              
031769,000406: 22,3567           77624                           CALL                                           #  TFFRP/RA COMPUTES RAPO,RPER.
031770,000407: 22,3570           57401                                    TFFRP/RA                              
031771,000408:                                                                                                  #  RETURNS WITH RAPO IN D(MPAC).
031772,000409: 22,3571           77625                           DSU                                            
031773,000410: 22,3572           02207                                    RPADTEM                               
031774,000411: 22,3573           64414                           BOFF     SR2R                                  #  NEED HAPO AT (-29)M FOR DISPLAY.
031775,000412:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
031776,000413:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
031777,000414: 22,3574           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031778,000415: 22,3575           45576                                    +1                                    
031779,000416: 22,3576           77624                           CALL                                           #  IF HAPO > MAXNM, SET HAPO =9999.9 NM.
031780,000417: 22,3577           45636                                    MAXCHK                                #  OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
031781,000418: 22,3600           16120        STORHAPO           STODL    HAPOX                                 
031782,000419: 22,3601           00017                                    RPER                                  
031783,000420: 22,3602           77625                           DSU                                            
031784,000421: 22,3603           02207                                    RPADTEM                               #  GIVES HPER AT (-29)M EARTH, (-27)M MOON.
031785,000422: 22,3604           00161                           STORE    MPAC       +4                         #  SAVE THIS FOR COMPARISON TO HPERMIN.
031786,000423: 22,3605           64414                           BOFF     SR2R                                  #  NEED HPER AT (-29)M FOR DISPLAY.
031787,000424:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
031788,000425:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
031789,000426: 22,3606           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031790,000427: 22,3607           45610                                    +1                                    
031791,000428: 22,3610           77624                           CALL                                           #  IF HPER > MAXNM, SET HPER = 9999.9 NM.
031792,000429: 22,3611           45636                                    MAXCHK                                

Page 729

031794,000431: 22,3612           16122        STORHPER           STODL    HPERX                                 #  STORE (RPER - RPADTEM) INTO HPERX.
031795,000432: 22,3613           00161                                    MPAC       +4                         
031796,000433: 22,3614           51025                           DSU      BPL                                   #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
031797,000434: 22,3615           02205                                    HPERMIN                               #  IF HPER L/ HPERMIN (300 OR 35) KFT,
031798,000435: 22,3616           45622                                    DOTPER                                #  THEN ZERO INTO -TPER.
031799,000436: 22,3617           52145                           DLOAD    GOTO                                  #  OTHERWISE CALCULATE TPER.
031800,000437: 22,3620           06424                                    HI6ZEROS                              
031801,000438: 22,3621           45626                                    SKIPTPER                              
031802,000439: 22,3622           45145        DOTPER             DLOAD    CALL                                  
031803,000440: 22,3623           00017                                    RPER                                  
031804,000441: 22,3624           57437                                    CALCTPER                              
031805,000442: 22,3625           77676                           DCOMP                                          #  TPER IS PUT NEG INTO -TPER.
031806,000443: 22,3626           16143        SKIPTPER           STODL    -TPER                                 
031807,000444: 22,3627           02205                                    HPERMIN                               #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
031808,000445: 22,3630           45015                           DAD      CALL                                  
031809,000446: 22,3631           02207                                    RPADTEM                               #  RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
031810,000447: 22,3632           57442                                    CALCTFF                               #  GIVES 59M59S FOR TFF IF RPER G/
031811,000448: 22,3633           77676                           DCOMP                                          #  HPERMIN + RPADTEM.  (TPER WAS NON ZERO)
031812,000449: 22,3634           36141                           STCALL   TFF                                   #  OTHERWISE COMPUTES TFF.       (GOTO)
031813,000450: 22,3635           00051                                    S2                                    
031814,000451: 
031815,000452: 22,3636           51025        MAXCHK             DSU      BPL                                   #  IF C(MPAC) > 9999.9 NM, MPAC = 9999.9 NM
031816,000453: 22,3637           05646                                    MAXNM                                 
031817,000454: 22,3640           45643                                    +3                                    #  OTHERWISE C(MPAC) = B(MPAC).
031818,000455: 22,3641           43415                           DAD      RVQ                                   
031819,000456: 22,3642           05646                                    MAXNM                                 
031820,000457: 22,3643           43545                 +3        DLOAD    RVQ                                   #  (USED BY P30 - P37 ALSO)
031821,000458: 22,3644           05646                                    MAXNM                                 
031822,000459: 
031823,000460: 22,3645           01065 05603  MAXNM              2OCT     01065      05603                      
031824,000461: 

Page 730 Empty page.

031827,000464: 

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