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.

029058,000002:                                                                                                  ## Copyright:   Public domain.
029059,000003:                                                                                                  ## Filename:    GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc
029060,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
029061,000005:                                                                                                  ##              It is part of the source code for the original release
029062,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
029063,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
029064,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
029065,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
029066,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
029067,000011:                                                                                                  ##              that the code format has been changed to conform to the
029068,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
029069,000013:                                                                                                  ##              original YUL assembler.
029070,000014:                                                                                                  ## Reference:   pp. 664-666
029071,000015:                                                                                                  ## Assembler:   yaYUL
029072,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
029073,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
029074,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
029075,000019:                                                                                                  ##              2016-12-14 MAS  Updated from comment-proofed Luminary 99 version.
029076,000020:                                                                                                  ##              2016-12-15 RRB  Updated for Luminary 69.
029077,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
029078,000022:                                                                                                  ##                              but no errors found.
029079,000023:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 5-way
029080,000024:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
029081,000025: 

Page 664

029083,000027:                                                                                                  #  GROUND TRACKING DETERMINATION PROGRAM P21
029084,000028:                                                                                                  #  PROGRAM DESCRIPTION
029085,000029:                                                                                                  #  MOD NO - 1
029086,000030:                                                                                                  #  MOD BY - N. M. NEVILLE
029087,000031: 
029088,000032:                                                                                                  #  FUNCTIONAL DECRIPTION -
029089,000033: 
029090,000034:                                                                                                  #  TO PROVIDE THE ASTRONAUT DETAILS OF THE LM OR CSM GROUND TRACK WITHOUT
029091,000035:                                                                                                  #  THE NEED FOR GROUND COMMUNICATION (REQUESTED BY DSKY).
029092,000036:                                                                                                  #  CALLING SEQUENCE -
029093,000037: 
029094,000038:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY V37E21E
029095,000039:                                                                                                  #  SUBROUTINES CALLED -
029096,000040: 
029097,000041:                                                                                                  #  GOPERF4
029098,000042:                                                                                                  #  GOFLASH
029099,000043:                                                                                                  #  THISPREC
029100,000044:                                                                                                  #  OTHPREC
029101,000045:                                                                                                  #  LAT-LONG
029102,000046: 
029103,000047:                                                                                                  #  NORMAL EXIT MODES -
029104,000048: 
029105,000049:                                                                                                  #  ASTRONAUT REQUEST TROUGH DSKY TO TERMINATE PROGRAM V34E
029106,000050:                                                                                                  #  ALARM OR ABORT EXIT MODES -
029107,000051: 
029108,000052:                                                                                                  #  NONE
029109,000053:                                                                                                  #  OUTPUT -
029110,000054: 
029111,000055:                                                                                                  #  OCTAL DISPLAY OF OPTION CODE AND VEHICLE WHOSE GROUND TRACK IS TO BE
029112,000056:                                                                                                  #  COMPUTED
029113,000057:                                                                                                  #        OPTION CODE     00002
029114,000058:                                                                                                  #        THIS            00001
029115,000059:                                                                                                  #        OTHER           00002
029116,000060:                                                                                                  #  DECIMAL DISPLAY OF TIME TO BE INTEGRATED TO HOURS , MINUTES , SECONDS
029117,000061:                                                                                                  #  DECIMAL DISPLAY OF LAT,LONG,ALT
029118,000062: 
029119,000063:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
029120,000064: 
029121,000065:                                                                                                  #  AX0           2DEC    4.652459653 E-5 RADIANS         %68-69 CONSTANTS"
029122,000066: 
029123,000067:                                                                                                  #  -AY0          2DEC    2.147535898 E-5 RADIANS
029124,000068: 
029125,000069:                                                                                                  #  AZ0           2DEC    .7753206164     REVOLUTIONS
029126,000070:                                                                                                  #  FOR LUNAR ORBITS 504LM VECTOR IS NEEDED
029127,000071: 
029128,000072:                                                                                                  #  504LM         2DEC    -2.700340600 E-5 RADIANS
029129,000073: 
029130,000074:                                                                                                  #  504LM _2      2DEC    -7.514128400 E-4 RADIANS
029131,000075: 
029132,000076:                                                                                                  #  504LM _4      2DEC    _2.553198641 E-4 RADIANS
029133,000077: 
029134,000078:                                                                                                  #  NONE
029135,000079:                                                                                                  #  DEBRIS

Page 665

029137,000081: 
029138,000082:                                                                                                  #  CENTRALS-A,Q,L
029139,000083:                                                                                                  #  OTHER - THOSE USED BY THE ABOVE LISTED SUBROUTINES
029140,000084:                                                                                                  #  SEE LEMPREC, LAT-LONG
029141,000085: 
029142,000086: 35,2511  30,2000                                  SBANK=   LOWSUPER                              #  FOR LOW 2CADR'S.
029143,000087: 
029144,000088: 33,2200                                           BANK     33                                    
029145,000089: 24,2000                                           SETLOC   P20S                                  
029146,000090: 24,2000                                           BANK                                           
029147,000091: 
029148,000092: 24,3402  E7,1756                                  EBANK=   P21TIME                               
029149,000093: 24,3402                                           COUNT*   $$/P21                                
029150,000094: 24,3402           34753        PROG21             CAF      ONE                                   
029151,000095: 24,3403           55145                           TS       OPTION2                               #  ASSUMED VEHICLE IS LM, R2 = 00001
029152,000096: 24,3404           34752                           CAF      BIT2                                  #  OPTION 2
029153,000097: 24,3405           04616                           TC       BANKCALL                              
029154,000098: 24,3406           20506                           CADR     GOPERF4                               
029155,000099: 24,3407           06001                           TC       GOTOPOOH                              #  TERMINATE
029156,000100: 24,3410           03412                           TC       +2                                    #  PROCEED VALUE OF ASSUMED VEHICLE OK
029157,000101: 24,3411           03404                           TC       -5                                    #  R2 LOADED THROUGH DSKY
029158,000102: 24,3412           33503        P21PROG1           CAF      V6N34                                 #  LOAD DESIRED TIME OF LAT-LONG.
029159,000103: 24,3413           04616                           TC       BANKCALL                              
029160,000104: 24,3414           20351                           CADR     GOFLASH                               
029161,000105: 24,3415           06001                           TC       GOTOPOOH                              #  TERM
029162,000106: 24,3416           03420                           TC       +2                                    #  PROCEED VALUES OK
029163,000107: 24,3417           03412                           TC       -5                                    #  TIME LOADED THROUGH DSKY
029164,000108: 24,3420           06036                           TC       INTPRET                               
029165,000109: 24,3421           77745                           DLOAD                                          
029166,000110: 24,3422           01046                                    DSPTEM1                               
029167,000111: 24,3423           03757                           STORE    P21TIME                               
029168,000112: 24,3424           45335                           SLOAD    DSU                                   
029169,000113: 24,3425           01146                                    OPTION2                               
029170,000114: 24,3426           11501                                    P21ONENN                              
029171,000115: 24,3427           71230                           BHIZ     DLOAD                                 
029172,000116: 24,3430           51443                                    P21PROG2                              #  VEHICLE TO BE INTEGRATED IS LEM
029173,000117: 24,3431           03757                                    P21TIME                               #  VEHICLE TO BE INTEGRATED IS CSM
029174,000118: 24,3432           34041                           STCALL   TDEC1                                 #  INTEGRATE TO TIME SPECIFIED IN TDEC
029175,000119: 24,3433           27043                                    OTHPREC                               #  ADJUST UNITS FOR LAT-LONG ROUTINE
029176,000120: 24,3434           46135        P21PROGA           SLOAD    BHIZ                                  
029177,000121: 24,3435           00050                                    X2                                    
029178,000122: 24,3436           51451                                    P21PROG3                              
029179,000123: 24,3437           43175                           VLOAD    SETGO                                 
029180,000124: 24,3440           00001                                    RATT                                  
029181,000125: 24,3441           01423                                    LUNAFLAG                              
029182,000126: 24,3442           51454                                    P21PROG4                              
029183,000127: 24,3443           77745        P21PROG2           DLOAD                                          
029184,000128: 24,3444           03757                                    P21TIME                               
029185,000129: 24,3445           34041                           STCALL   TDEC1                                 
029186,000130: 24,3446           27057                                    THISPREC                              
029187,000131: 24,3447           77650                           GOTO                                           

Page 666

029189,000133: 24,3450           51434                                    P21PROGA                              
029190,000134: 24,3451           43175        P21PROG3           VLOAD    CLEAR                                 
029191,000135: 24,3452           00001                                    RATT                                  
029192,000136: 24,3453           01663                                    LUNAFLAG                              
029193,000137: 24,3454           16032        P21PROG4           STODL    ALPHAV                                
029194,000138: 24,3455           00015                                    TAT                                   
029195,000139: 24,3456           45014                           CLEAR    CALL                                  
029196,000140: 24,3457           00662                                    ERADFLAG                              
029197,000141: 24,3460           26351                                    LAT-LONG                              
029198,000142: 24,3461           77776                           EXIT                                           
029199,000143: 24,3462           33502                           CAF      V06N43                                #  DISPLAY LAT,LONG,ALT
029200,000144: 24,3463           04616                           TC       BANKCALL                              #  LAT,LONG = 1/2 REVS B0
029201,000145: 24,3464           20351                           CADR     GOFLASH                               #  ALT = KM B14
029202,000146: 24,3465           06001                           TC       GOTOPOOH                              #  TERM
029203,000147: 24,3466           06001                           TC       GOTOPOOH                              
029204,000148: 24,3467           06036                           TC       INTPRET                               #  V32E RECYCLE
029205,000149: 24,3470           43345                           DLOAD    DAD                                   
029206,000150: 24,3471           03757                                    P21TIME                               
029207,000151: 24,3472           11477                                    600SEC                                #  600 SECONDS OR 10 MIN
029208,000152: 24,3473           01046                           STORE    DSPTEM1                               
029209,000153: 24,3474           77634                           RTB                                            
029210,000154: 24,3475           51412                                    P21PROG1                              
029211,000155: 24,3476           00003 25140  600SEC             2DEC     60000      B-28                       #  10 MIN
029212,000156: 
029213,000157: 24,3500           00001        P21ONENN           OCT      00001                                 #  NEEDED TO DETERMINE VEHICLE
029214,000158: 24,3501           00000                           OCT      00000                                 #  TO BE INTEGRATED
029215,000159: 24,3502           01453        V06N43             VN       00643                                 
029216,000160: 24,3503           01442        V6N34              VN       00634                                 
029217,000161: 
029218,000162: 

End of include-file GROUND_TRACKING_DETERMINATION_PROGRAM_-_P21.agc.  Parent file is MAIN.agc