Source Code

These source-code files are part of a reconstructed copy of Luminary 163, the first (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 163 listing would be different.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

047880,000002:                                                                                                  ## Copyright:   Public domain.
047881,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
047882,000004:                                                                                                  ## Purpose:     A section of Luminary revision 163.
047883,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
047884,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
047885,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
047886,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
047887,000009:                                                                                                  ##              Luminary 173, as well as Luminary memos 157 amd 158.
047888,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
047889,000011:                                                                                                  ##              exactly match those specified for Luminary 163 in NASA
047890,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
047891,000013:                                                                                                  ##              that the reconstruction is correct.
047892,000014:                                                                                                  ## Reference:   pp. 1131-1139
047893,000015:                                                                                                  ## Assembler:   yaYUL
047894,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047895,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047896,000018:                                                                                                  ## Mod history: 2019-08-21 MAS  Created from Luminary 173.
047897,000019: 

Page 1131

047899,000021:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
047900,000022:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM,EITHER
047901,000023:                                                                                                  #   EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
047902,000024: 
047903,000025:                                                                                                  #   R=MT(T)*(RP+LPXRP)    MT = M MATRIX TRANSPOSE
047904,000026: 
047905,000027:                                                                                                  #  CALLING SEQUENCE
047906,000028:                                                                                                  #   L       CALL
047907,000029:                                                                                                  #   L+1            RP-TO-R
047908,000030: 
047909,000031:                                                                                                  #  SUBROUTINES USED
047910,000032:                                                                                                  #   EARTHMX,MOONMX,EARTHL
047911,000033: 
047912,000034:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
047913,000035:                                                                                                  #      504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
047914,000036:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM   RADIANS  B0
047915,000037:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
047916,000038: 
047917,000039:                                                                                                  #  INPUT
047918,000040:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
047919,000041:                                                                                                  #   0-5D= RP VECTOR
047920,000042:                                                                                                  #   6-7D= TIME
047921,000043: 
047922,000044:                                                                                                  #  OUTPUT
047923,000045:                                                                                                  #   MPAC= R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
047924,000046: 
047925,000047: 26,2000                                           SETLOC   PLANTIN1                              
047926,000048: 26,2000                                           BANK                                           
047927,000049: 
047928,000050: 26,3720                                           COUNT*   $$/LUROT                              
047929,000051: 
047930,000052: 26,3720           46020        RP-TO-R            STQ      BHIZ                                  
047931,000053: 26,3721           00050                                    RPREXIT                               
047932,000054: 26,3722           55735                                    RPTORA                                
047933,000055: 26,3723           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
047934,000056: 26,3724           51662                                    MOONMX                                #  LP=LM FOR MOON  RADIANS B0
047935,000057: 26,3725           77775                           VLOAD                                          
047936,000058: 26,3726           02013                                    504LM                                 
047937,000059: 26,3727           53235        RPTORB             VXV      VAD                                   
047938,000060: 26,3730           00001                                    504RPR                                
047939,000061: 26,3731           00001                                    504RPR                                
047940,000062: 26,3732           52105                           VXM      GOTO                                  
047941,000063: 26,3733           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
047942,000064: 26,3734           51650                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
047943,000065: 26,3735           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
047944,000066: 26,3736           55745                                    EARTHMX                               #  M MATRIX B-1
047945,000067: 26,3737           77624                           CALL                                           
047946,000068: 26,3740           15761                                    EARTHL                                #  L VECTOR RADIANS B0
047947,000069: 26,3741           76521                           MXV      VSL1                                  #  LP=M(T)*L  RAD B-0
047948,000070: 26,3742           00025                                    MMATRIX                               

Page 1132

047950,000072: 26,3743           77650                           GOTO                                           
047951,000073: 26,3744           55727                                    RPTORB                                
047952,000074: 24,2000                                           SETLOC   PLANTIN                               
047953,000075: 24,2000                                           BANK                                           
047954,000076: 24,3632                                           COUNT*   $$/LUROT                              
047955,000077: 

Page 1133

047957,000079:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
047958,000080:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
047959,000081:                                                                                                  #   (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
047960,000082: 
047961,000083:                                                                                                  #   RP=M(T)*(R-LXR)
047962,000084: 
047963,000085:                                                                                                  #  CALLING SEQUENCE
047964,000086:                                                                                                  #   L       CALL
047965,000087:                                                                                                  #   L+1            R-TO-RP
047966,000088: 
047967,000089:                                                                                                  #  SUBROUTINES USED
047968,000090:                                                                                                  #   EARTHMX,MOONMX,EARTHL
047969,000091: 
047970,000092:                                                                                                  #  INPUT
047971,000093:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
047972,000094:                                                                                                  #   0-5D= R VECTOR
047973,000095:                                                                                                  #   6-7D= TIME
047974,000096: 
047975,000097:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
047976,000098:                                                                                                  #      504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
047977,000099:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM   RADIANS B0
047978,000100:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
047979,000101: 
047980,000102:                                                                                                  #  OUTPUT
047981,000103:                                                                                                  #   MPAC=RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
047982,000104: 
047983,000105: 24,3632           46020        R-TO-RP            STQ      BHIZ                                  
047984,000106: 24,3633           00050                                    RPREXIT                               
047985,000107: 24,3634           51654                                    RTORPA                                
047986,000108: 24,3635           77624                           CALL                                           
047987,000109: 24,3636           51662                                    MOONMX                                
047988,000110: 24,3637           61375                           VLOAD    VXM                                   
047989,000111: 24,3640           02013                                    504LM                                 #  LP=LM
047990,000112: 24,3641           00025                                    MMATRIX                               
047991,000113: 24,3642           77772                           VSL1                                           #   L=MT(T)*LP  RADIANS B0
047992,000114: 24,3643           51235        RTORPB             VXV      BVSU                                  
047993,000115: 24,3644           00001                                    504RPR                                
047994,000116: 24,3645           00001                                    504RPR                                
047995,000117: 24,3646           77721                           MXV                                            #  M(T)*(R-LXR) B-2
047996,000118: 24,3647           00025                                    MMATRIX                               
047997,000119: 24,3650           40372        RPRPXXXX           VSL1     SETPD                                 
047998,000120: 24,3651           00001                                    0D                                    
047999,000121: 24,3652           77650                           GOTO                                           
048000,000122: 24,3653           00050                                    RPREXIT                               
048001,000123: 24,3654           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
048002,000124: 24,3655           55745                                    EARTHMX                               
048003,000125: 24,3656           77624                           CALL                                           
048004,000126: 24,3657           15761                                    EARTHL                                
048005,000127: 24,3660           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0) RAD B-0
048006,000128: 24,3661           51643                                    RTORPB                                
048007,000129: 

Page 1134

048009,000131:                                                                                                  #  ..... MOONMX SUBROUTINE .....
048010,000132:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
048011,000133: 
048012,000134:                                                                                                  #  CALLING SEQUENCE
048013,000135:                                                                                                  #   L       CALL
048014,000136:                                                                                                  #   L+1            MOONMX
048015,000137: 
048016,000138:                                                                                                  #  SUBROUTINES USED
048017,000139:                                                                                                  #   NEWANGLE
048018,000140: 
048019,000141:                                                                                                  #  INPUT
048020,000142:                                                                                                  #   6-7D= TIME
048021,000143:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
048022,000144:                                                                                                  #      BSUBO,BDOT
048023,000145:                                                                                                  #      TIMSUBO,NODIO,NODDOT,FSUBO,FDOT
048024,000146:                                                                                                  #      COSI= COS(I) B-1
048025,000147:                                                                                                  #      SINI= SIN(I) B-1
048026,000148:                                                                                                  #        I  IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
048027,000149:                                                                                                  #        PLANE OF THE ECLIPTIC  (1 DEGREE  32.1 MINUTES)
048028,000150: 
048029,000151:                                                                                                  #  OUTPUT
048030,000152:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
048031,000153: 
048032,000154: 24,3662           40220        MOONMX             STQ      SETPD                                 
048033,000155: 24,3663           00051                                    EARTHMXX                              
048034,000156: 24,3664           00011                                    8D                                    
048035,000157: 24,3665           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
048036,000158: 24,3666           00005                                    5                                     
048037,000159: 24,3667           65345                           DLOAD    PDDL                                  #  PD 10D            8-9D=BSUBO
048038,000160: 24,3670           14017                                    BSUBO                                 #                    10-11D= BDOT
048039,000161: 24,3671           14011                                    BDOT                                  
048040,000162: 24,3672           45006                           PUSH     CALL                                  #  PD 12D
048041,000163: 24,3673           51731                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B  REVS B0
048042,000164: 24,3674           71406                           PUSH     COS                                   #  PD 10D
048043,000165: 24,3675           14041                           STODL    COB                                   #  PD 8D    COS(B) B-1
048044,000166: 24,3676           77756                           SIN                                            #           SIN(B) B-1
048045,000167: 24,3677           14043                           STODL    SOB                                   #            SETUP INPUT FOR NEWANGLE
048046,000168: 24,3700           14015                                    FSUBO                                 #                      8-9D=FSUBO
048047,000169: 24,3701           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=FDOT
048048,000170: 24,3702           14007                                    FDOT                                  
048049,000171: 24,3703           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
048050,000172: 24,3704           00004                                    4                                     
048051,000173: 24,3705           51731                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
048052,000174: 24,3706           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
048053,000175: 24,3707           14013                                    NODIO                                 #                      8-9D=NODIO
048054,000176: 24,3710           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=NODDOT
048055,000177: 24,3711           14005                                    NODDOT                                #                      MPAC=T
048056,000178: 24,3712           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
048057,000179: 24,3713           00005                                    5                                     
048058,000180: 24,3714           51731                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1135

048060,000182: 24,3715           71406                           PUSH     COS                                   #  PD 10D   8-9D= NODI  REVS  B0
048061,000183: 24,3716           77606                           PUSH                                           #  PD 12D 10-11D= COS(NODI)  B-1
048062,000184: 24,3717           00025                           STORE    AVECTR                                
048063,000185: 24,3720           76405                           DMP      SL1R                                  
048064,000186: 24,3721           00041                                    COB                                   #                          COS(NODI)    B-1
048065,000187: 24,3722           14035                           STODL    BVECTR     +2                         #  PD 10D   20-25D=AVECTR= COB*SIN(NODI)
048066,000188: 24,3723           76405                           DMP      SL1R                                  #                          SOB*SIN(NODI)
048067,000189: 24,3724           00043                                    SOB                                   
048068,000190: 24,3725           14037                           STODL    BVECTR     +4                         #  PD 8D
048069,000191: 24,3726           41556                           SIN      PUSH                                  #  PD 10D                 -SIN(NODI)   B-1
048070,000192: 24,3727           52076                           DCOMP    GOTO                                  #           26-31D=BVECTR= COV*COS(NODI)
048071,000193: 24,3730           53715                                    MOONMXA                               
048072,000194: 25,3715                                           BANK     25                                    
048073,000195: 25,2000                                           SETLOC   PLANTIN3                              
048074,000196: 25,2000                                           BANK                                           
048075,000197: 25,3715                                           COUNT*   $$/LUROT                              
048076,000198: 
048077,000199: 25,3715           14033        MOONMXA            STODL    BVECTR                                #  PD 8D                    SOB*COS(NODI)
048078,000200: 25,3716           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
048079,000201: 25,3717           14007                           STODL    504F                                  
048080,000202: 25,3720           76405                           DMP      SL1R                                  
048081,000203: 25,3721           00041                                    COB                                   
048082,000204: 25,3722           14027                           STODL    AVECTR     +2                         
048083,000205: 25,3723           00011                                    SINNODI                               #  8-9D=SIN(NODI)  B-1
048084,000206: 25,3724           76405                           DMP      SL1R                                  
048085,000207: 25,3725           00043                                    SOB                                   
048086,000208: 25,3726           14031                           STODL    AVECTR     +4                         #                           0
048087,000209: 25,3727           06520                                    HI6ZEROS                              #          8-13D= CVECTR= -SOB  B-1
048088,000210: 25,3730           57525                           PDDL     DCOMP                                 #  PD 10D                  COB
048089,000211: 25,3731           00043                                    SOB                                   
048090,000212: 25,3732           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
048091,000213: 25,3733           00041                                    COB                                   
048092,000214: 25,3734           00033                                    BVECTR                                
048093,000215: 25,3735           63361                           VXSC     PDVL                                  #  PD 20D         BVECTR*SINI  B-2
048094,000216: 25,3736           14003                                    SINI                                  
048095,000217: 25,3737           00011                                    CVECTR                                
048096,000218: 25,3740           53361                           VXSC     VAD                                   #  PD 14D         CVECTR*COSI  B-2
048097,000219: 25,3741           14001                                    COSI                                  
048098,000220: 25,3742           77772                           VSL1                                           
048099,000221: 25,3743           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI  B-1
048100,000222: 25,3744           63361                           VXSC     PDVL                                  #  PD 14D
048101,000223: 25,3745           14003                                    SINI                                  #                 CVECTR*SINI  B-2
048102,000224: 25,3746           00033                                    BVECTR                                
048103,000225: 25,3747           52361                           VXSC     VSU                                   #  PD 8D          BVECTR*COSI  B-2
048104,000226: 25,3750           14001                                    COSI                                  
048105,000227: 25,3751           65372                           VSL1     PDDL                                  #  PD 14D
048106,000228: 25,3752           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
048107,000229: 25,3753           74346                           COS      VXSC                                  
048108,000230: 25,3754           00011                                    DVECTR                                
048109,000231: 25,3755           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF  B-2

Page 1136

048111,000233: 25,3756           00007                                    504F                                  
048112,000234: 25,3757           52361                           VXSC     VSU                                   #  PD 14D          AVECTR*SINF  B-2
048113,000235: 25,3760           00025                                    AVECTR                                
048114,000236: 25,3761           77772                           VSL1                                           
048115,000237: 25,3762           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF  B-1
048116,000238: 25,3763           00007                                    504F                                  
048117,000239: 25,3764           74356                           SIN      VXSC                                  #  PD 8D
048118,000240: 25,3765           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
048119,000241: 25,3766           00007                                    504F                                  
048120,000242: 25,3767           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
048121,000243: 25,3770           00025                                    AVECTR                                
048122,000244: 25,3771           57572                           VSL1     VCOMP                                 
048123,000245: 25,3772           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF)  B-1
048124,000246: 25,3773           00051                                    EARTHMXX                              
048125,000247:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
048126,000248:                                                                                                  #  8-9D= XO (REVS B-0),PUSHLOC SET AT 12D
048127,000249:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
048128,000250:                                                                                                  #                          AND B+27 FOR FDOT
048129,000251:                                                                                                  #   X1=DIFFERENCE IN 23 AND SCALING OF XDOT,=0 FOR WEARTH,5 FOR NODDOT AND
048130,000252:                                                                                                  #                                           BDOT AND 4 FOR FDOT
048131,000253:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
048132,000254: 
048133,000255: 24,3731                                           BANK     24                                    
048134,000256: 24,2000                                           SETLOC   PLANTIN                               
048135,000257: 24,2000                                           BANK                                           
048136,000258: 
048137,000259: 24,3731           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
048138,000260: 24,3732           00007                                    6D                                    
048139,000261: 24,3733           20617                                    14D                                   
048140,000262: 24,3734           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
048141,000263: 24,3735           01707                                    TIMSUBO                               
048142,000264: 24,3736           00155                                    MPAC                                  
048143,000265: 24,3737           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
048144,000266: 24,3740           00020                                    TIMSUBM    +1                         
048145,000267: 24,3741           77605                           DMP                                            #  PD 10D  MULT BY XDOT IN 10-11D
048146,000268: 24,3742           43257                           SL*      DAD                                   #  PD 8D   ADD XO IN 8-9D AFTER SHIFTING
048147,000269: 24,3743           20206                                    5,1                                   #          SUCH THAT SCALING IS B-0
048148,000270: 24,3744           67206                           PUSH     SLOAD                                 #  PD 10D SAVE PARTIAL (X0+XDOT*T) IN 8-9D
048149,000271: 24,3745           00017                                    TIMSUBM                               
048150,000272: 24,3746           41261                           SL       DMP                                   
048151,000273: 24,3747           20212                                    9D                                    
048152,000274: 24,3750           00013                                    10D                                   #  XDOT
048153,000275: 24,3751           43257                           SL*      DAD                                   #  PD 8D   SHIFT SUCH THAT THIS PART OF X
048154,000276: 24,3752           20213                                    10D,1                                 #          IS SCALED REVS/CSEC B-0
048155,000277: 24,3753           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
048156,000278: 24,3754           51755                                    +1                                    #  INSTRUCTION BEFORE EXITING
048157,000279: 24,3755           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)  REVS B0
048158,000280: 

Page 1137

048160,000282:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
048161,000283:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
048162,000284: 
048163,000285:                                                                                                  #  CALLING SEQUENCE
048164,000286:                                                                                                  #   L       CALL
048165,000287:                                                                                                  #   L+1            EARTHMX
048166,000288: 
048167,000289:                                                                                                  #  SUBROUTINES USED
048168,000290:                                                                                                  #   NEWANGLE
048169,000291: 
048170,000292:                                                                                                  #  INPUT
048171,000293:                                                                                                  #     INPUT AVAILABLE FROM LAUNCH DATA     AZO  REVS B-0
048172,000294:                                                                                                  #                                          TEPHEM  CSEC B-42
048173,000295:                                                                                                  #   6-7D= TIME CSEC B-28
048174,000296: 
048175,000297:                                                                                                  #  OUTPUT
048176,000298:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
048177,000299: 
048178,000300: 26,3745                                           BANK     26                                    
048179,000301: 26,2000                                           SETLOC   PLANTIN1                              
048180,000302: 26,2000                                           BANK                                           
048181,000303: 26,3745                                           COUNT*   $$/LUROT                              
048182,000304: 
048183,000305: 26,3745           40220        EARTHMX            STQ      SETPD                                 #  SET   8-9D=AZO
048184,000306: 26,3746           00051                                    EARTHMXX                              
048185,000307: 26,3747           00011                                    8D                                    #  10-11D=WEARTH
048186,000308: 26,3750           77770                           AXT,1                                          #  FOR SL 5, AND SL 10  IN NEWANGLE
048187,000309: 26,3751           00000                                    0                                     
048188,000310: 26,3752           65345                           DLOAD    PDDL                                  #    LEAVING PD SET AT 12D FOR NEWANGLE
048189,000311: 26,3753           14023                                    AZO                                   
048190,000312: 26,3754           14021                                    WEARTH                                
048191,000313: 26,3755           45006                           PUSH     CALL                                  
048192,000314: 26,3756           51731                                    NEWANGLE                              
048193,000315: 26,3757           41401                           SETPD    PUSH                                  #  18-19D=504AZ
048194,000316: 26,3760           00023                                    18D                                   #                     COS(AZ) SIN(AZ) 0
048195,000317: 26,3761           65346                           COS      PDDL                                  #  20-37D=  MMATRIX= -SIN(AZ) COS(AZ) 0 B-1
048196,000318: 26,3762           00023                                    504AZ                                 #                      0       0      1
048197,000319: 26,3763           65356                           SIN      PDDL                                  
048198,000320: 26,3764           06520                                    HI6ZEROS                              
048199,000321: 26,3765           73525                           PDDL     SIN                                   
048200,000322: 26,3766           00023                                    504AZ                                 
048201,000323: 26,3767           65276                           DCOMP    PDDL                                  
048202,000324: 26,3770           00023                                    504AZ                                 
048203,000325: 26,3771           63346                           COS      PDVL                                  
048204,000326: 26,3772           06520                                    HI6ZEROS                              
048205,000327: 26,3773           41525                           PDDL     PUSH                                  
048206,000328: 26,3774           06516                                    HIDPHALF                              
048207,000329: 26,3775           77650                           GOTO                                           
048208,000330: 26,3776           00051                                    EARTHMXX                              
048209,000331: 

Page 1138

048211,000333:                                                                                                  #  ..... EARTHL SUBROUTINE .....
048212,000334:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
048213,000335: 
048214,000336:                                                                                                  #  CALLING SEQUENCE
048215,000337:                                                                                                  #   L       CALL
048216,000338:                                                                                                  #   L+1            EARTHL
048217,000339: 
048218,000340:                                                                                                  #  INPUT
048219,000341:                                                                                                  #   AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
048220,000342: 
048221,000343:                                                                                                  #  OUTPUT
048222,000344:                                                                                                  #            -AX
048223,000345:                                                                                                  #    MPAC=   -AY    RADIANS B-0
048224,000346:                                                                                                  #              0
048225,000347: 
048226,000348: 06,3761                                           BANK     06                                    
048227,000349: 06,2000                                           SETLOC   EARTHLOC                              
048228,000350: 06,2000                                           BANK                                           
048229,000351: 06,3761                                           COUNT*   $$/LUROT                              
048230,000352: 
048231,000353: 06,3761           57545        EARTHL             DLOAD    DCOMP                                 
048232,000354: 06,3762           01714                                    AXO                                   
048233,000355: 06,3763           14017                           STODL    504LPL                                
048234,000356: 06,3764           01712                                    -AYO                                  
048235,000357: 06,3765           14021                           STODL    504LPL     +2                         
048236,000358: 06,3766           24007                                    LO6ZEROS                              
048237,000359: 06,3767           24023                           STOVL    504LPL     +4                         
048238,000360: 06,3770           00017                                    504LPL                                
048239,000361: 06,3771           77616                           RVQ                                            
048240,000362: 

Page 1139

048242,000364:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
048243,000365: 06,3772  12,2004               1B1                =        DP1/2                                 #  1  SCALED B-1
048244,000366: 06,3772  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
048245,000367: 06,3772  0000051               EARTHMXX           =        S2                                    #  EARTHMX,MOONMX SUBR. EXITS
048246,000368: 06,3772                        504RPR             =        0D                                    #  6 REGS  R OR RP VECTOR
048247,000369: 06,3772                        SINNODI            =        8D                                    #  2       SIN(NODI)
048248,000370: 06,3772                        DVECTR             =        8D                                    #  6       D VECTOR MOON
048249,000371: 06,3772                        CVECTR             =        8D                                    #  6       C VECTR MOON
048250,000372: 06,3772                        504AZ              =        18D                                   #  2      AZ
048251,000373: 06,3772                        TIMSUBM            =        14D                                   #  3       TIME SUB M (MOON) T+T0 IN GETAZ
048252,000374: 06,3772                        504LPL             =        14D                                   #  6       L OR LP VECTOR
048253,000375: 06,3772                        AVECTR             =        20D                                   #  6       A VECTOR (MOON)
048254,000376: 06,3772                        BVECTR             =        26D                                   #  6       B VECTOR (MOON)
048255,000377: 06,3772                        MMATRIX            =        20D                                   #  18      M MATRIX
048256,000378: 06,3772                        COB                =        32D                                   #  2       COS(B) B-1
048257,000379: 06,3772                        SOB                =        34D                                   #  2       SIN(B) B-1
048258,000380: 06,3772                        504F               =        6D                                    #  2       F(MOON)

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