Source Code

These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
These dumps were then modified using memos, checklists, observed address changes, and the Sundance GSOPs to get the entire program to match Sundance revision 306 as closely as possible. Without more information, it is not possible to say how close it actually is; however, this code should be quite close. It is capable of flying the whole Apollo 9 mission using the original checklists and padload. Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

043957,000002:                                                                                                  ## Copyright:   Public domain.
043958,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
043959,000004:                                                                                                  ## Purpose:     A section of an attempt to reconstruct Sundance revision 306
043960,000005:                                                                                                  ##              as closely as possible with available information. Sundance
043961,000006:                                                                                                  ##              306 is the source code for the Lunar Module's (LM) Apollo
043962,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 9. This program was created
043963,000008:                                                                                                  ##              using the mixed-revision SundanceXXX as a starting point, and
043964,000009:                                                                                                  ##              pulling back features from Luminary 69 believed to have been
043965,000010:                                                                                                  ##              added based on memos, checklists, observed address changes,
043966,000011:                                                                                                  ##              or the Sundance GSOPs.
043967,000012:                                                                                                  ## Assembler:   yaYUL
043968,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
043969,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
043970,000015:                                                                                                  ## Mod history: 2020-07-24 MAS  Created from SundanceXXX.
043971,000016: 
043972,000017: 
043973,000018: 
043974,000019:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
043975,000020:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
043976,000021:                                                                                                  #   EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
043977,000022: 
043978,000023:                                                                                                  #        R = MT(T)*(RP + LP X RP)        MT = M MATRIX TRANSPOSE
043979,000024: 
043980,000025:                                                                                                  #  CALLING SEQUENCE
043981,000026:                                                                                                  #        L       CALL
043982,000027:                                                                                                  #        L+1             RP-TO-R
043983,000028: 
043984,000029:                                                                                                  #  SUBROUTINES USED
043985,000030:                                                                                                  #        EARTHMX,MOONMX,EARTHL
043986,000031: 
043987,000032:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
043988,000033:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
043989,000034:                                                                                                  #                        IN THE MOON-FIXED COORD. SYSTEM         RADIANS B0
043990,000035: 
043991,000036:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
043992,000037: 
043993,000038:                                                                                                  #  INPUT
043994,000039:                                                                                                  #        MPAC= 0 FOR EARTH, NON-ZERO FOR MOON
043995,000040:                                                                                                  #        0-5D= RP VECTOR
043996,000041:                                                                                                  #        6-7D= TIME
043997,000042: 
043998,000043:                                                                                                  #  OUTPUT
043999,000044:                                                                                                  #        MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
044000,000045: 
044001,000046: 24,2000                                           SETLOC   PLANTIN                               
044002,000047: 24,2000                                           BANK                                           
044003,000048: 
044004,000049: 24,3222                                           COUNT*   $$/LUROT                              
044005,000050: 
044006,000051: 24,3222           46020        RP-TO-R            STQ      BHIZ                                  
044007,000052: 24,3223           00050                                    RPREXIT                               
044008,000053: 24,3224           51237                                    RPTORA                                
044009,000054: 24,3225           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
044010,000055: 24,3226           51277                                    MOONMX                                #  LP=LM FOR MOON  RADIANS B0
044011,000056: 24,3227           77775                           VLOAD                                          
044012,000057: 24,3230           02011                                    504LM                                 
044013,000058: 24,3231           53235        RPTORB             VXV      VAD                                   
044014,000059: 24,3232           00001                                    504RPR                                
044015,000060: 24,3233           00001                                    504RPR                                
044016,000061: 24,3234           52105                           VXM      GOTO                                  
044017,000062: 24,3235           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
044018,000063: 24,3236           51265                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
044019,000064: 24,3237           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
044020,000065: 24,3240           51451                                    EARTHMX                               #  M MATRIX B-1
044021,000066: 24,3241           77624                           CALL                                           
044022,000067: 24,3242           51503                                    EARTHL                                #  L VECTOR RADIANS B0
044023,000068: 24,3243           76521                           MXV      VSL1                                  #  LP=M(T)*L  RAD B-0
044024,000069: 24,3244           00025                                    MMATRIX                               
044025,000070: 24,3245           77650                           GOTO                                           
044026,000071: 24,3246           51231                                    RPTORB                                
044027,000072: 
044028,000073:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
044029,000074:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
044030,000075:                                                                                                  #  (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
044031,000076: 
044032,000077:                                                                                                  #        RP = M(T)*(R - L X R)
044033,000078: 
044034,000079:                                                                                                  #  CALLING SEQUENCE
044035,000080:                                                                                                  #        L       CALL
044036,000081:                                                                                                  #        L+1             R-TO-RP
044037,000082: 
044038,000083:                                                                                                  #  SUBROUTINES USED
044039,000084:                                                                                                  #        EARTHMX,MOONMX,EARTHL
044040,000085: 
044041,000086:                                                                                                  #  INPUT
044042,000087:                                                                                                  #        MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
044043,000088:                                                                                                  #        0-5D= R VECTOR
044044,000089:                                                                                                  #        6-7D= TIME
044045,000090: 
044046,000091:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
044047,000092:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
044048,000093:                                                                                                  #                        IN THE MOON-FIXED COORD. SYSTEM   RADIANS B0
044049,000094: 
044050,000095:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
044051,000096: 
044052,000097:                                                                                                  #  OUTPUT
044053,000098:                                                                                                  #        MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
044054,000099: 
044055,000100: 24,3247           46020        R-TO-RP            STQ      BHIZ                                  
044056,000101: 24,3250           00050                                    RPREXIT                               
044057,000102: 24,3251           51271                                    RTORPA                                
044058,000103: 24,3252           77624                           CALL                                           
044059,000104: 24,3253           51277                                    MOONMX                                
044060,000105: 24,3254           61375                           VLOAD    VXM                                   
044061,000106: 24,3255           02011                                    504LM                                 #  LP=LM
044062,000107: 24,3256           00025                                    MMATRIX                               
044063,000108: 24,3257           77772                           VSL1                                           #   L=MT(T)*LP  RADIANS B0
044064,000109: 24,3260           51235        RTORPB             VXV      BVSU                                  
044065,000110: 24,3261           00001                                    504RPR                                
044066,000111: 24,3262           00001                                    504RPR                                
044067,000112: 24,3263           77721                           MXV                                            #  M(T)*(R-LXR) B-2
044068,000113: 24,3264           00025                                    MMATRIX                               
044069,000114: 24,3265           40372        RPRPXXXX           VSL1     SETPD                                 
044070,000115: 24,3266           00001                                    0D                                    
044071,000116: 24,3267           77650                           GOTO                                           
044072,000117: 24,3270           00050                                    RPREXIT                               
044073,000118: 24,3271           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
044074,000119: 24,3272           51451                                    EARTHMX                               
044075,000120: 24,3273           77624                           CALL                                           
044076,000121: 24,3274           51503                                    EARTHL                                
044077,000122: 24,3275           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0) RAD B-0
044078,000123: 24,3276           51260                                    RTORPB                                
044079,000124: 
044080,000125:                                                                                                  #  ..... MOONMX SUBROUTINE .....
044081,000126:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
044082,000127: 
044083,000128:                                                                                                  #  CALLING SEQUENCE
044084,000129:                                                                                                  #        L       CALL
044085,000130:                                                                                                  #        L+1             MOONMX
044086,000131: 
044087,000132:                                                                                                  #  SUBROUTINES USED
044088,000133:                                                                                                  #        NEWANGLE
044089,000134: 
044090,000135:                                                                                                  #  INPUT
044091,000136:                                                                                                  #        6-7D= TIME
044092,000137: 
044093,000138:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
044094,000139:                                                                                                  #                BSUBO,BDOT
044095,000140:                                                                                                  #                TIMSUBO,NODIO,NODDOT,FSUBO,FDOT
044096,000141:                                                                                                  #                COSI= COS(I)    B-1
044097,000142:                                                                                                  #                SINI= SIN(I)    B-1
044098,000143:                                                                                                  #                  I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
044099,000144:                                                                                                  #                  PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
044100,000145: 
044101,000146:                                                                                                  #  OUTPUT
044102,000147:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1       (STORED IN VAC AREA)
044103,000148: 
044104,000149: 24,3277           40220        MOONMX             STQ      SETPD                                 
044105,000150: 24,3300           00051                                    EARTHMXX                              
044106,000151: 24,3301           00011                                    8D                                    
044107,000152: 24,3302           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
044108,000153: 24,3303           00005                                    5                                     
044109,000154: 24,3304           65345                           DLOAD    PDDL                                  #  PD 10D        8-9D=BSUBO
044110,000155: 24,3305           11533                                    BSUBO                                 #                10-11D=BDOT
044111,000156: 24,3306           11525                                    BDOT                                  
044112,000157: 24,3307           45006                           PUSH     CALL                                  #  PD 12D
044113,000158: 24,3310           51424                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B   REVS B0
044114,000159: 24,3311           71406                           PUSH     COS                                   #  PD 10D
044115,000160: 24,3312           14041                           STODL    COB                                   #  PD 8D         COS(B) B-1
044116,000161: 24,3313           77756                           SIN                                            #                SIN(B) B-1
044117,000162: 24,3314           14043                           STODL    SOB                                   #  SETUP INPUT FOR NEWANGLE
044118,000163: 24,3315           11531                                    FSUBO                                 #                        8-9D=FSUBO
044119,000164: 24,3316           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=FDOT
044120,000165: 24,3317           11523                                    FDOT                                  
044121,000166: 24,3320           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
044122,000167: 24,3321           00004                                    4                                     
044123,000168: 24,3322           51424                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
044124,000169: 24,3323           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
044125,000170: 24,3324           11527                                    NODIO                                 #                        8-9D=NODIO
044126,000171: 24,3325           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=NODDOT
044127,000172: 24,3326           11521                                    NODDOT                                #                        MPAC=T
044128,000173: 24,3327           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
044129,000174: 24,3330           00005                                    5                                     
044130,000175: 24,3331           51424                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0
044131,000176: 24,3332           71406                           PUSH     COS                                   #  PD 10D        8-9D= NODI REVS B0
044132,000177: 24,3333           77606                           PUSH                                           #  PD 12D        10-11D= COS(NODI) B-1
044133,000178: 24,3334           00025                           STORE    AVECTR                                
044134,000179: 24,3335           76405                           DMP      SL1R                                  
044135,000180: 24,3336           00041                                    COB                                   #                         COS(NODI) B-1
044136,000181: 24,3337           14035                           STODL    BVECTR     +2                         #  PD 10D  20-25D=AVECTR= COB*SIN(NODI)
044137,000182: 24,3340           76405                           DMP      SL1R                                  #                         SOB*SIN(NODI)
044138,000183: 24,3341           00043                                    SOB                                   
044139,000184: 24,3342           14037                           STODL    BVECTR     +4                         #  PD 8D
044140,000185: 24,3343           41556                           SIN      PUSH                                  #  PD 10D                -SIN(NODI) B-1
044141,000186: 24,3344           77676                           DCOMP                                          #          26-31D=BVECTR= COB*COS(NODI)
044142,000187: 24,3345           14033                           STODL    BVECTR                                #  PD 8D                  SOB*COS(NODI)
044143,000188: 24,3346           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
044144,000189: 24,3347           14007                           STODL    504F                                  
044145,000190: 24,3350           76405                           DMP      SL1R                                  
044146,000191: 24,3351           00041                                    COB                                   
044147,000192: 24,3352           14027                           STODL    AVECTR     +2                         
044148,000193: 24,3353           00011                                    SINNODI                               #  8-9D=SIN(NODI) B-1
044149,000194: 24,3354           76405                           DMP      SL1R                                  
044150,000195: 24,3355           00043                                    SOB                                   
044151,000196: 24,3356           14031                           STODL    AVECTR     +4                         #                         0
044152,000197: 24,3357           06233                                    HI6ZEROS                              #        8-13D= CVECTR= -SOB  B-1
044153,000198: 24,3360           57525                           PDDL     DCOMP                                 #  PD 10D                COB
044154,000199: 24,3361           00043                                    SOB                                   
044155,000200: 24,3362           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
044156,000201: 24,3363           00041                                    COB                                   
044157,000202: 24,3364           00033                                    BVECTR                                
044158,000203: 24,3365           63361                           VXSC     PDVL                                  #  PD 20D        BVECTR*SINI  B-2
044159,000204: 24,3366           11517                                    SINI                                  
044160,000205: 24,3367           00011                                    CVECTR                                
044161,000206: 24,3370           53361                           VXSC     VAD                                   #  PD 14D        CVECTR*COSI  B-2
044162,000207: 24,3371           11515                                    COSI                                  
044163,000208: 24,3372           77772                           VSL1                                           
044164,000209: 24,3373           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI  B-1
044165,000210: 24,3374           63361                           VXSC     PDVL                                  #  PD 14D
044166,000211: 24,3375           11517                                    SINI                                  #                CVECTR*SINI  B-2
044167,000212: 24,3376           00033                                    BVECTR                                
044168,000213: 24,3377           52361                           VXSC     VSU                                   #  PD 8D         BVECTR*COSI  B-2
044169,000214: 24,3400           11515                                    COSI                                  
044170,000215: 24,3401           65372                           VSL1     PDDL                                  #  PD 14D
044171,000216: 24,3402           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI  B-1
044172,000217: 24,3403           74346                           COS      VXSC                                  
044173,000218: 24,3404           00011                                    DVECTR                                
044174,000219: 24,3405           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF  B-2
044175,000220: 24,3406           00007                                    504F                                  
044176,000221: 24,3407           52361                           VXSC     VSU                                   #  PD 14D          AVECTR*SINF  B-2
044177,000222: 24,3410           00025                                    AVECTR                                
044178,000223: 24,3411           77772                           VSL1                                           
044179,000224: 24,3412           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF  B-1
044180,000225: 24,3413           00007                                    504F                                  
044181,000226: 24,3414           74356                           SIN      VXSC                                  #  PD 8D
044182,000227: 24,3415           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
044183,000228: 24,3416           00007                                    504F                                  
044184,000229: 24,3417           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
044185,000230: 24,3420           00025                                    AVECTR                                
044186,000231: 24,3421           57572                           VSL1     VCOMP                                 
044187,000232: 24,3422           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF)  B-1
044188,000233: 24,3423           00051                                    EARTHMXX                              
044189,000234: 
044190,000235:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
044191,000236:                                                                                                  #  8-9D= XO (REVS B-0), PUSHLOC SET AT 12D
044192,000237:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
044193,000238:                                                                                                  #                        AND B+27 FOR FDOT
044194,000239:                                                                                                  #   X1=DIFFERENCE IN 23 AND SCALING OF XDOT,=0 FOR WEARTH,5 FOR NODDOT AND
044195,000240:                                                                                                  #                                        BDOT AND 4 FOR FDOT
044196,000241:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
044197,000242: 
044198,000243: 24,3424           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
044199,000244: 24,3425           00007                                    6D                                    
044200,000245: 24,3426           20617                                    14D                                   
044201,000246: 24,3427           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
044202,000247: 24,3430           01707                                    TIMSUBO                               
044203,000248: 24,3431           00155                                    MPAC                                  
044204,000249: 24,3432           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
044205,000250: 24,3433           00020                                    TIMSUBM    +1                         
044206,000251: 24,3434           77605                           DMP                                            #  PD 10D        MULT BY XDOT IN 10-11D
044207,000252: 24,3435           43257                           SL*      DAD                                   #  PD 8D         ADD XO IN 8-9D AFTER SHIFTING
044208,000253: 24,3436           20206                                    5,1                                   #                SUCH THAT SCALING IS B-0
044209,000254: 24,3437           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
044210,000255: 24,3440           00017                                    TIMSUBM                               
044211,000256: 24,3441           41261                           SL       DMP                                   
044212,000257: 24,3442           20212                                    9D                                    
044213,000258: 24,3443           00013                                    10D                                   #  XDOT
044214,000259: 24,3444           43257                           SL*      DAD                                   #  PD 8D         SHIFT SUCH THAT THIS PART OF X
044215,000260: 24,3445           20213                                    10D,1                                 #                IS SCALED REVS/CSEC B-0
044216,000261: 24,3446           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
044217,000262: 24,3447           51450                                    +1                                    #  INSTRUCTION BEFORE EXITING
044218,000263: 24,3450           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)  REVS B0
044219,000264: 
044220,000265:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
044221,000266:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
044222,000267: 
044223,000268:                                                                                                  #  CALLING SEQUENCE
044224,000269:                                                                                                  #        L       CALL
044225,000270:                                                                                                  #        L+1             EARTHMX
044226,000271: 
044227,000272:                                                                                                  #  SUBROUTINES USED
044228,000273:                                                                                                  #        NEWANGLE
044229,000274: 
044230,000275:                                                                                                  #  INPUT
044231,000276:                                                                                                  #        INPUT AVAILABLE FROM LAUNCH DATA        AZO  REVS B-0
044232,000277:                                                                                                  #                                                TEPHEM  CSEC B-42
044233,000278:                                                                                                  #        6-7D= TIME CSEC B-28
044234,000279: 
044235,000280:                                                                                                  #  OUTPUT
044236,000281:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1       (STORED IN VAC AREA)
044237,000282: 
044238,000283: 24,3451           40220        EARTHMX            STQ      SETPD                                 #  SET 8-9D=AZO
044239,000284: 24,3452           00051                                    EARTHMXX                              
044240,000285: 24,3453           00011                                    8D                                    #  10-11D=WEARTH
044241,000286: 24,3454           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
044242,000287: 24,3455           00000                                    0                                     
044243,000288: 24,3456           65345                           DLOAD    PDDL                                  #  LEAVING PD SET AT 12D FOR NEWANGLE
044244,000289: 24,3457           01712                                    AZO                                   
044245,000290: 24,3460           11535                                    WEARTH                                
044246,000291: 24,3461           45006                           PUSH     CALL                                  
044247,000292: 24,3462           51424                                    NEWANGLE                              
044248,000293: 24,3463           41401                           SETPD    PUSH                                  #  18-19D=504AZ
044249,000294: 24,3464           00023                                    18D                                   #                         COS(AZ)   SIN(AZ)     0
044250,000295: 24,3465           65346                           COS      PDDL                                  #  20-37D=  MMATRIX=     -SIN(AZ)   COS(AZ)     0    B-1
044251,000296: 24,3466           00023                                    504AZ                                 #                            0         0        1
044252,000297: 24,3467           65356                           SIN      PDDL                                  
044253,000298: 24,3470           06233                                    HI6ZEROS                              
044254,000299: 24,3471           73525                           PDDL     SIN                                   
044255,000300: 24,3472           00023                                    504AZ                                 
044256,000301: 24,3473           65276                           DCOMP    PDDL                                  
044257,000302: 24,3474           00023                                    504AZ                                 
044258,000303: 24,3475           63346                           COS      PDVL                                  
044259,000304: 24,3476           06233                                    HI6ZEROS                              
044260,000305: 24,3477           41525                           PDDL     PUSH                                  
044261,000306: 24,3500           06231                                    HIDPHALF                              
044262,000307: 24,3501           77650                           GOTO                                           
044263,000308: 24,3502           00051                                    EARTHMXX                              
044264,000309: 
044265,000310:                                                                                                  #  ..... EARTHL SUBROUTINE .....
044266,000311:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
044267,000312: 
044268,000313:                                                                                                  #  CALLING SEQUENCE
044269,000314:                                                                                                  #        L       CALL
044270,000315:                                                                                                  #        L+1             EARTHL
044271,000316: 
044272,000317:                                                                                                  #  INPUT
044273,000318:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
044274,000319: 
044275,000320:                                                                                                  #  OUTPUT
044276,000321:                                                                                                  #                -AX
044277,000322:                                                                                                  #        MPAC=   -AY     RADIANS B-0
044278,000323:                                                                                                  #                  0
044279,000324: 
044280,000325: 24,3503           57545        EARTHL             DLOAD    DCOMP                                 
044281,000326: 24,3504           01716                                    AXO                                   
044282,000327: 24,3505           14017                           STODL    504LPL                                
044283,000328: 24,3506           01714                                    -AYO                                  
044284,000329: 24,3507           14021                           STODL    504LPL     +2                         
044285,000330: 24,3510           06233                                    HI6ZEROS                              
044286,000331: 24,3511           24023                           STOVL    504LPL     +4                         
044287,000332: 24,3512           00017                                    504LPL                                
044288,000333: 24,3513           77616                           RVQ                                            
044289,000334: 
044290,000335:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
044291,000336: 
044292,000337: 24,3514           17775 01734  COSI               2DEC     .99964115  B-1                        #  COS(1 DEG 32.1 MIN) B-1
044293,000338: 24,3516           00333 16153  SINI               2DEC     .02678760  B-1                        #  SIN(1 DEG 32.1 MIN) B-1
044294,000339: 24,3520           77665 42175  NODDOT             2DEC     -.457335143 E-2                        #  REVS/CSEC B+28=-1.07047016 E-8  RAD/SEC
044295,000340: 24,3522           22211 00265  FDOT               2DEC     .570862491                            #  REVS/CSEC B+27= 2.67240019 E-6  RAD/SEC
044296,000341: 
044297,000342: 24,3524           77777 77767  BDOT               2DEC     -3.07500412 E-8                        #  REVS/CSEC B+28=-7.19756666 E-14 RAD/SEC
044298,000343: 24,3526           41215 66331  NODIO              2DEC     -.960101269                            #  REVS B-O    = -6.03249419  RAD
044299,000344: 24,3530           15237 26751  FSUBO              2DEC     .415998375                            #  REVS B-O    =  2.61379488  RAD
044300,000345: 24,3532           02052 35713  BSUBO              2DEC     .0651205006                            #  REVS B-O    =  0.409164173 RAD
044301,000346: 24,3534           37116 32630  WEARTH             2DEC     .973561855                            #  REVS/CSEC B+23=7.29211515 E-5 RAD/SEC
044302,000347: 
044303,000348: 24,3536  11,2273               1B1                =        DP1/2                                 #  1  SCALED B-1
044304,000349: 24,3536  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
044305,000350: 24,3536  0000051               EARTHMXX           =        S2                                    #  EARTHMX,MOONMX SUBR. EXITS
044306,000351: 24,3536                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
044307,000352: 24,3536                        SINNODI            =        8D                                    #  2             SIN(NODI)
044308,000353: 24,3536                        DVECTR             =        8D                                    #  6             D VECTOR MOON
044309,000354: 24,3536                        CVECTR             =        8D                                    #  6             C VECTR MOON
044310,000355: 24,3536                        504AZ              =        18D                                   #  2            AZ
044311,000356: 24,3536                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
044312,000357: 24,3536                        504LPL             =        14D                                   #  6             L OR LP VECTOR
044313,000358: 24,3536                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
044314,000359: 24,3536                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
044315,000360: 24,3536                        MMATRIX            =        20D                                   #  18            M MATRIX
044316,000361: 24,3536                        COB                =        32D                                   #  2             COS(B) B-1
044317,000362: 24,3536                        SOB                =        34D                                   #  2             SIN(B) B-1
044318,000363: 24,3536                        504F               =        6D                                    #  2             F(MOON)
044319,000364: 

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