Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

048855,000002:                                                                                                  ## Copyright:   Public domain.
048856,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
048857,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
048858,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
048859,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
048860,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
048861,000008:                                                                                                  ##              that the code format has been changed to conform to the
048862,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
048863,000010:                                                                                                  ##              original YUL assembler.
048864,000011:                                                                                                  ## Reference:   pp. 1138-1146
048865,000012:                                                                                                  ## Assembler:   yaYUL
048866,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
048867,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
048868,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
048869,000016:                                                                                                  ##              2016-12-09 JS   Compared to Luminary210 images. Updated where needed.
048870,000017:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
048871,000018:                                                                                                  ##                              and corrected errors found.
048872,000019:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
048873,000020:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
048874,000021: 

Page 1138

048876,000023:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
048877,000024:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM,EITHER
048878,000025:                                                                                                  #   EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
048879,000026:                                                                                                  #   R=MT(T)*(RP+LPXRP)    MT = M MATRIX TRANSPOSE
048880,000027: 
048881,000028:                                                                                                  #  CALLING SEQUENCE
048882,000029:                                                                                                  #   L       CALL
048883,000030:                                                                                                  #   L+1            RP-TO-R
048884,000031: 
048885,000032:                                                                                                  #  SUBROUTINES USED
048886,000033:                                                                                                  #   EARTHMX,MOONMX,EARTHL
048887,000034: 
048888,000035:                                                                                                  #    ITEMS AVAILABLE FROM LAUNCH DATA
048889,000036:                                                                                                  #     504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
048890,000037:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM  RADIANS  B0
048891,000038:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
048892,000039: 
048893,000040:                                                                                                  #  INPUT
048894,000041:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
048895,000042:                                                                                                  #   0-5D= RP VECTOR
048896,000043:                                                                                                  #   6-7D= TIME
048897,000044: 
048898,000045:                                                                                                  #  OUTPUT
048899,000046:                                                                                                  #   MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
048900,000047: 
048901,000048: 26,2000                                           SETLOC   PLANTIN1                              
048902,000049: 26,2000                                           BANK                                           
048903,000050: 
048904,000051: 26,3716                                           COUNT*   $$/LUROT                              
048905,000052: 
048906,000053: 26,3716           46020        RP-TO-R            STQ      BHIZ                                  
048907,000054: 26,3717           00050                                    RPREXIT                               
048908,000055: 26,3720           55733                                    RPTORA                                
048909,000056: 26,3721           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
048910,000057: 26,3722           51674                                    MOONMX                                #  LP=LM FOR MOON  RADIANS B0
048911,000058: 26,3723           77775                           VLOAD                                          
048912,000059: 26,3724           02013                                    504LM                                 
048913,000060: 26,3725           53235        RPTORB             VXV      VAD                                   
048914,000061: 26,3726           00001                                    504RPR                                
048915,000062: 26,3727           00001                                    504RPR                                
048916,000063: 26,3730           52105                           VXM      GOTO                                  
048917,000064: 26,3731           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
048918,000065: 26,3732           51662                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
048919,000066: 26,3733           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
048920,000067: 26,3734           55743                                    EARTHMX                               #  M MATRIX B-1
048921,000068: 26,3735           77624                           CALL                                           
048922,000069: 26,3736           15765                                    EARTHL                                #  L VECTOR RADIANS B0
048923,000070: 26,3737           76521                           MXV      VSL1                                  #  LP=M(T)*L  RAD B-0
048924,000071: 26,3740           00025                                    MMATRIX                               
048925,000072: 

Page 1139

048927,000074: 26,3741           77650                           GOTO                                           
048928,000075: 26,3742           55725                                    RPTORB                                
048929,000076: 24,2000                                           SETLOC   PLANTIN                               
048930,000077: 24,2000                                           BANK                                           
048931,000078: 24,3644                                           COUNT*   $$/LUROT                              
048932,000079: 

Page 1140

048934,000081:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
048935,000082:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
048936,000083:                                                                                                  #   (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
048937,000084:                                                                                                  #   RP=M(T)*(R-LXR)
048938,000085: 
048939,000086:                                                                                                  #  CALLING SEQUENCE
048940,000087:                                                                                                  #   L       CALL
048941,000088:                                                                                                  #   L+1     R-TO-RP
048942,000089: 
048943,000090:                                                                                                  #  SUBROUTINES USED
048944,000091:                                                                                                  #   EARTHMX, MOONMX, EARTHL
048945,000092: 
048946,000093:                                                                                                  #  INPUT
048947,000094:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
048948,000095:                                                                                                  #   0-5D= R VECTOR
048949,000096:                                                                                                  #   6-7D= TIME
048950,000097: 
048951,000098:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
048952,000099:                                                                                                  #      504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
048953,000100:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM   RADIANS B0
048954,000101:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
048955,000102: 
048956,000103:                                                                                                  #  OUTPUT
048957,000104:                                                                                                  #   MPAC=RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
048958,000105: 
048959,000106: 24,3644           46020        R-TO-RP            STQ      BHIZ                                  
048960,000107: 24,3645           00050                                    RPREXIT                               
048961,000108: 24,3646           51666                                    RTORPA                                
048962,000109: 24,3647           77624                           CALL                                           
048963,000110: 24,3650           51674                                    MOONMX                                
048964,000111: 24,3651           61375                           VLOAD    VXM                                   
048965,000112: 24,3652           02013                                    504LM                                 #  LP=LM
048966,000113: 24,3653           00025                                    MMATRIX                               
048967,000114: 24,3654           77772                           VSL1                                           #   L=MT(T)*LP  RADIANS B0
048968,000115: 24,3655           51235        RTORPB             VXV      BVSU                                  
048969,000116: 24,3656           00001                                    504RPR                                
048970,000117: 24,3657           00001                                    504RPR                                
048971,000118: 24,3660           77721                           MXV                                            #  M(T)*(R-LXR) B-2
048972,000119: 24,3661           00025                                    MMATRIX                               
048973,000120: 24,3662           40372        RPRPXXXX           VSL1     SETPD                                 
048974,000121: 24,3663           00001                                    0D                                    
048975,000122: 24,3664           77650                           GOTO                                           
048976,000123: 24,3665           00050                                    RPREXIT                               
048977,000124: 24,3666           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
048978,000125: 24,3667           55743                                    EARTHMX                               
048979,000126: 24,3670           77624                           CALL                                           
048980,000127: 24,3671           15765                                    EARTHL                                
048981,000128: 24,3672           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0) RAD B-0
048982,000129: 24,3673           51655                                    RTORPB                                
048983,000130: 

Page 1141

048985,000132:                                                                                                  #  ..... MOONMX SUBROUTINE .....
048986,000133:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
048987,000134: 
048988,000135:                                                                                                  #  CALLING SEQUENCE
048989,000136:                                                                                                  #   L       CALL
048990,000137:                                                                                                  #   L+1     MOONMX
048991,000138: 
048992,000139:                                                                                                  #  SUBROUTINES USED
048993,000140:                                                                                                  #   NEWANGLE
048994,000141: 
048995,000142:                                                                                                  #  INPUT
048996,000143:                                                                                                  #   6-7D= TIME
048997,000144:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
048998,000145:                                                                                                  #      BSUBO,BDOT
048999,000146:                                                                                                  #      TIMSUBO,NODIO,NODDOT,FSUBO,FDOT
049000,000147:                                                                                                  #      COSI= COS(I) B-1
049001,000148:                                                                                                  #      SINI= SIN(I) B-1
049002,000149:                                                                                                  #        I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
049003,000150:                                                                                                  #        PLANE OF THE ECLIPTIC  (1 DEGREE 32.1 MINUTES)
049004,000151: 
049005,000152:                                                                                                  #  OUTPUT
049006,000153:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
049007,000154: 
049008,000155: 24,3674           40220        MOONMX             STQ      SETPD                                 
049009,000156: 24,3675           00051                                    EARTHMXX                              
049010,000157: 24,3676           00011                                    8D                                    
049011,000158: 24,3677           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
049012,000159: 24,3700           00005                                    5                                     
049013,000160: 24,3701           65345                           DLOAD    PDDL                                  #  PD 10D            8-9D=BSUBO
049014,000161: 24,3702           14017                                    BSUBO                                 #                    10-11D= BDOT
049015,000162: 24,3703           14011                                    BDOT                                  
049016,000163: 24,3704           45006                           PUSH     CALL                                  #  PD 12D
049017,000164: 24,3705           51743                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B  REVS B0
049018,000165: 24,3706           71406                           PUSH     COS                                   #  PD 10D
049019,000166: 24,3707           14041                           STODL    COB                                   #  PD 8D    COS(B) B-1
049020,000167: 24,3710           77756                           SIN                                            #           SIN(B) B-1
049021,000168: 24,3711           14043                           STODL    SOB                                   #  SETUP INPUT FOR NEWANGLE
049022,000169: 24,3712           14015                                    FSUBO                                 #                      8-9D=FSUBO
049023,000170: 24,3713           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=FDOT
049024,000171: 24,3714           14007                                    FDOT                                  
049025,000172: 24,3715           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
049026,000173: 24,3716           00004                                    4                                     
049027,000174: 24,3717           51743                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
049028,000175: 24,3720           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
049029,000176: 24,3721           14013                                    NODIO                                 #                      8-9D=NODIO
049030,000177: 24,3722           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=NODDOT
049031,000178: 24,3723           14005                                    NODDOT                                #                      MPAC=T
049032,000179: 24,3724           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
049033,000180: 24,3725           00005                                    5                                     
049034,000181: 24,3726           51743                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0
049035,000182: 

Page 1142

049037,000184: 24,3727           71406                           PUSH     COS                                   #  PD 10D   8-9D= NODI  REVS  B0
049038,000185: 24,3730           77606                           PUSH                                           #  PD 12D 10-11D= COS(NODI)  B-1
049039,000186: 24,3731           00025                           STORE    AVECTR                                
049040,000187: 24,3732           76405                           DMP      SL1R                                  
049041,000188: 24,3733           00041                                    COB                                   #                          COS(NODI)    B-1
049042,000189: 24,3734           14035                           STODL    BVECTR     +2                         #  PD 10D   20-25D=AVECTR= COB*SIN(NODI)
049043,000190: 24,3735           76405                           DMP      SL1R                                  #                          SOB*SIN(NODI)
049044,000191: 24,3736           00043                                    SOB                                   
049045,000192: 24,3737           14037                           STODL    BVECTR     +4                         #  PD 8D
049046,000193: 24,3740           41556                           SIN      PUSH                                  #  PD 10D                  -SIN(NODI)   B-1
049047,000194: 24,3741           52076                           DCOMP    GOTO                                  #          26-31D=BVECTR= COV*COS(NODI)
049048,000195: 24,3742           53712                                    MOONMXA                               
049049,000196: 25,3712                                           BANK     25                                    
049050,000197: 25,2000                                           SETLOC   PLANTIN3                              
049051,000198: 25,2000                                           BANK                                           
049052,000199: 25,3712                                           COUNT*   $$/LUROT                              
049053,000200: 
049054,000201: 25,3712           14033        MOONMXA            STODL    BVECTR                                #  PD 8D                    SOB*COS(NODI)
049055,000202: 25,3713           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
049056,000203: 25,3714           14007                           STODL    504F                                  
049057,000204: 25,3715           76405                           DMP      SL1R                                  
049058,000205: 25,3716           00041                                    COB                                   
049059,000206: 25,3717           14027                           STODL    AVECTR     +2                         
049060,000207: 25,3720           00011                                    SINNODI                               #  8-9D=SIN(NODI)  B-1
049061,000208: 25,3721           76405                           DMP      SL1R                                  
049062,000209: 25,3722           00043                                    SOB                                   
049063,000210: 25,3723           14031                           STODL    AVECTR     +4                         #                           0
049064,000211: 25,3724           06505                                    HI6ZEROS                              #          8-13D= CVECTR= -SOB  B-1
049065,000212: 25,3725           57525                           PDDL     DCOMP                                 #  PD 10D                  COB
049066,000213: 25,3726           00043                                    SOB                                   
049067,000214: 25,3727           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
049068,000215: 25,3730           00041                                    COB                                   
049069,000216: 25,3731           00033                                    BVECTR                                
049070,000217: 25,3732           63361                           VXSC     PDVL                                  #  PD 20D         BVECTR*SINI  B-2
049071,000218: 25,3733           14003                                    SINI                                  
049072,000219: 25,3734           00011                                    CVECTR                                
049073,000220: 25,3735           53361                           VXSC     VAD                                   #  PD 14D         CVECTR*COSI  B-2
049074,000221: 25,3736           14001                                    COSI                                  
049075,000222: 25,3737           77772                           VSL1                                           
049076,000223: 25,3740           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI  B-1
049077,000224: 25,3741           63361                           VXSC     PDVL                                  #  PD 14D
049078,000225: 25,3742           14003                                    SINI                                  #                 CVECTR*SINI  B-2
049079,000226: 25,3743           00033                                    BVECTR                                
049080,000227: 25,3744           52361                           VXSC     VSU                                   #  PD 8D          BVECTR*COSI  B-2
049081,000228: 25,3745           14001                                    COSI                                  
049082,000229: 25,3746           65372                           VSL1     PDDL                                  #  PD 14D
049083,000230: 25,3747           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
049084,000231: 25,3750           74346                           COS      VXSC                                  
049085,000232: 25,3751           00011                                    DVECTR                                
049086,000233: 25,3752           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF  B-2
049087,000234: 

Page 1143

049089,000236: 25,3753           00007                                    504F                                  
049090,000237: 25,3754           52361                           VXSC     VSU                                   #  PD 14D          AVECTR*SINF  B-2
049091,000238: 25,3755           00025                                    AVECTR                                
049092,000239: 25,3756           77772                           VSL1                                           
049093,000240: 25,3757           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF  B-1
049094,000241: 25,3760           00007                                    504F                                  
049095,000242: 25,3761           74356                           SIN      VXSC                                  #  PD 8D
049096,000243: 25,3762           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
049097,000244: 25,3763           00007                                    504F                                  
049098,000245: 25,3764           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
049099,000246: 25,3765           00025                                    AVECTR                                
049100,000247: 25,3766           57572                           VSL1     VCOMP                                 
049101,000248: 25,3767           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF)  B-1
049102,000249: 25,3770           00051                                    EARTHMXX                              
049103,000250:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
049104,000251:                                                                                                  #  8-9D= XO (REVS B-0),PUSHLOC SET AT 12D
049105,000252:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
049106,000253:                                                                                                  #                          AND B+27 FOR FDOT
049107,000254:                                                                                                  #   X1=DIFFERENCE IN 23 AND SCALING OF XDOT,=0 FOR WEARTH,5 FOR NODDOT AND
049108,000255:                                                                                                  #                                           BDOT AND 4 FOR FDOT
049109,000256:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
049110,000257: 
049111,000258: 24,3743                                           BANK     24                                    
049112,000259: 24,2000                                           SETLOC   PLANTIN                               
049113,000260: 24,2000                                           BANK                                           
049114,000261: 
049115,000262: 24,3743           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
049116,000263: 24,3744           00007                                    6D                                    
049117,000264: 24,3745           20617                                    14D                                   
049118,000265: 24,3746           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
049119,000266: 24,3747           01707                                    TIMSUBO                               
049120,000267: 24,3750           00155                                    MPAC                                  
049121,000268: 24,3751           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
049122,000269: 24,3752           00020                                    TIMSUBM    +1                         
049123,000270: 24,3753           77605                           DMP                                            #  PD 10D  MULT BY XDOT IN 10-11D
049124,000271: 24,3754           43257                           SL*      DAD                                   #  PD 8D   ADD XO IN 8-9D AFTER SHIFTING
049125,000272: 24,3755           20206                                    5,1                                   #          SUCH THAT SCALING IS B-0
049126,000273: 24,3756           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
049127,000274: 24,3757           00017                                    TIMSUBM                               
049128,000275: 24,3760           41261                           SL       DMP                                   
049129,000276: 24,3761           20212                                    9D                                    
049130,000277: 24,3762           00013                                    10D                                   #  XDOT
049131,000278: 24,3763           43257                           SL*      DAD                                   #  PD 8D    SHIFT SUCH THAT THIS PART OF X
049132,000279: 24,3764           20213                                    10D,1                                 #           IS SCALED REVS/CSEC B-0
049133,000280: 24,3765           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
049134,000281: 24,3766           51767                                    +1                                    #  INSTRUCTION BEFORE EXITING
049135,000282: 24,3767           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)  REVS B0
049136,000283: 

Page 1144

049138,000285:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
049139,000286:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
049140,000287: 
049141,000288:                                                                                                  #  CALLING SEQUENCE
049142,000289:                                                                                                  #   L       CALL
049143,000290:                                                                                                  #   L+1            EARTHMX
049144,000291: 
049145,000292:                                                                                                  #  SUBROUTINES USED
049146,000293:                                                                                                  #   NEWANGLE
049147,000294: 
049148,000295:                                                                                                  #  INPUT
049149,000296:                                                                                                  #     INPUT AVAILABLE FROM LAUNCH DATA      AZO  REVS B-0
049150,000297:                                                                                                  #                                           TEPHEM  CSEC B-42
049151,000298:                                                                                                  #   6-7D= TIME CSEC B-28
049152,000299: 
049153,000300:                                                                                                  #  OUTPUT
049154,000301:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
049155,000302: 
049156,000303: 26,3743                                           BANK     26                                    
049157,000304: 26,2000                                           SETLOC   PLANTIN1                              
049158,000305: 26,2000                                           BANK                                           
049159,000306: 26,3743                                           COUNT*   $$/LUROT                              
049160,000307: 
049161,000308: 26,3743           40220        EARTHMX            STQ      SETPD                                 #  SET   8-9D=AZO
049162,000309: 26,3744           00051                                    EARTHMXX                              
049163,000310: 26,3745           00011                                    8D                                    #  10-11D=WEARTH
049164,000311: 26,3746           77770                           AXT,1                                          #  FOR SL 5, AND SL 10  IN NEWANGLE
049165,000312: 26,3747           00000                                    0                                     
049166,000313: 26,3750           65345                           DLOAD    PDDL                                  #    LEAVING PD SET AT 12D FOR NEWANGLE
049167,000314: 26,3751           14023                                    AZO                                   
049168,000315: 26,3752           14021                                    WEARTH                                
049169,000316: 26,3753           45006                           PUSH     CALL                                  
049170,000317: 26,3754           51743                                    NEWANGLE                              
049171,000318: 26,3755           41401                           SETPD    PUSH                                  #  18-19D=504AZ
049172,000319: 26,3756           00023                                    18D                                   #                     COS(AZ) SIN(AZ) 0
049173,000320: 26,3757           65346                           COS      PDDL                                  #  20-37D=  MMATRIX= -SIN(AZ) COS(AZ) 0 B-1
049174,000321: 26,3760           00023                                    504AZ                                 #                      0       0      1
049175,000322: 26,3761           65356                           SIN      PDDL                                  
049176,000323: 26,3762           06505                                    HI6ZEROS                              
049177,000324: 26,3763           73525                           PDDL     SIN                                   
049178,000325: 26,3764           00023                                    504AZ                                 
049179,000326: 26,3765           65276                           DCOMP    PDDL                                  
049180,000327: 26,3766           00023                                    504AZ                                 
049181,000328: 26,3767           63346                           COS      PDVL                                  
049182,000329: 26,3770           06505                                    HI6ZEROS                              
049183,000330: 26,3771           41525                           PDDL     PUSH                                  
049184,000331: 26,3772           06503                                    HIDPHALF                              
049185,000332: 26,3773           77650                           GOTO                                           
049186,000333: 26,3774           00051                                    EARTHMXX                              
049187,000334: 

Page 1145

049189,000336:                                                                                                  #  ..... EARTHL SUBROUTINE .....
049190,000337:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
049191,000338: 
049192,000339:                                                                                                  #  CALLING SEQUENCE
049193,000340:                                                                                                  #   L       CALL
049194,000341:                                                                                                  #   L+1            EARTHL
049195,000342: 
049196,000343:                                                                                                  #  INPUT
049197,000344:                                                                                                  #   AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
049198,000345: 
049199,000346:                                                                                                  #  OUTPUT
049200,000347:                                                                                                  #            -AX
049201,000348:                                                                                                  #    MPAC=   -AY    RADIANS B-0
049202,000349:                                                                                                  #              0
049203,000350: 
049204,000351: 06,3765                                           BANK     06                                    
049205,000352: 06,2000                                           SETLOC   EARTHLOC                              
049206,000353: 06,2000                                           BANK                                           
049207,000354: 06,3765                                           COUNT*   $$/LUROT                              
049208,000355: 
049209,000356: 06,3765           57545        EARTHL             DLOAD    DCOMP                                 
049210,000357: 06,3766           01714                                    AXO                                   
049211,000358: 06,3767           14017                           STODL    504LPL                                
049212,000359: 06,3770           01712                                    -AYO                                  
049213,000360: 06,3771           14021                           STODL    504LPL     +2                         
049214,000361: 06,3772           24007                                    LO6ZEROS                              
049215,000362: 06,3773           24023                           STOVL    504LPL     +4                         
049216,000363: 06,3774           00017                                    504LPL                                
049217,000364: 06,3775           77616                           RVQ                                            
049218,000365: 

Page 1146

049220,000367:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
049221,000368: 
049222,000369: 06,3776  12,2004               1B1                =        DP1/2                                 #  1  SCALED B-1
049223,000370: 06,3776  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
049224,000371: 06,3776  0000051               EARTHMXX           =        S2                                    #  EARTHMX,MOONMX SUBR. EXITS
049225,000372: 06,3776                        504RPR             =        0D                                    #  6 REGS  R OR RP VECTOR
049226,000373: 06,3776                        SINNODI            =        8D                                    #  2       SIN(NODI)
049227,000374: 06,3776                        DVECTR             =        8D                                    #  6       D VECTOR MOON
049228,000375: 06,3776                        CVECTR             =        8D                                    #  6       C VECTR MOON
049229,000376: 06,3776                        504AZ              =        18D                                   #  2      AZ
049230,000377: 06,3776                        TIMSUBM            =        14D                                   #  3       TIME SUB M (MOON) T+T0 IN GETAZ
049231,000378: 06,3776                        504LPL             =        14D                                   #  6       L OR LP VECTOR
049232,000379: 06,3776                        AVECTR             =        20D                                   #  6       A VECTOR (MOON)
049233,000380: 06,3776                        BVECTR             =        26D                                   #  6       B VECTOR (MOON)
049234,000381: 06,3776                        MMATRIX            =        20D                                   #  18      M MATRIX
049235,000382: 06,3776                        COB                =        32D                                   #  2       COS(B) B-1
049236,000383: 06,3776                        SOB                =        34D                                   #  2       SIN(B) B-1
049237,000384: 06,3776                        504F               =        6D                                    #  2       F(MOON)
049238,000385: 

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