Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	16:27 JULY 14,1969
Note that the date is the date of the printout, not the date of the program revision.

048644,000002:                                                                                                  ## Copyright:   Public domain.
048645,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
048646,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
048647,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
048648,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
048649,000007:                                                                                                  ##
048650,000008:                                                                                                  ## Assembler:   yaYUL
048651,000009:                                                                                                  ## Contact:     Jim Lawton <jim.lawton@gmail.com>
048652,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
048653,000011:                                                                                                  ## Pages:       1140-1148
048654,000012:                                                                                                  ## Mod history: 2009-05-28 JVL  Updated from page images.
048655,000013:                                                                                                  ##              2016-12-17 RSB  Proofed text comments with octopus/ProoferComments
048656,000014:                                                                                                  ##                              and corrected the errors found.
048657,000015:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
048658,000016:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
048659,000017: 
048660,000018:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
048661,000019:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
048662,000020:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
048663,000021:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
048664,000022:                                                                                                  ## consequent reduction in image quality as well) are available online at
048665,000023:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
048666,000024:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the
048667,000025:                                                                                                  ## (much) higher-quality images which Paul actually created.
048668,000026:                                                                                                  ##
048669,000027:                                                                                                  ## Notations on the hardcopy document read, in part:
048670,000028:                                                                                                  ##
048671,000029:                                                                                                  ##    Assemble revision 001 of AGC program LMY99 by NASA 2021112-061
048672,000030:                                                                                                  ##    16:27 JULY 14, 1969
048673,000031: 

Page 1140

048675,000033:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
048676,000034:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
048677,000035:                                                                                                  #  EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
048678,000036: 
048679,000037:                                                                                                  #        R = MT(T) * (RP + LP X RP)      MT = M MATRIX TRANSPOSE
048680,000038: 
048681,000039:                                                                                                  #  CALLING SEQUENCE
048682,000040:                                                                                                  #        L       CALL
048683,000041:                                                                                                  #        L+1             RP-TO-R
048684,000042: 
048685,000043:                                                                                                  #  SUBROUTINES USED
048686,000044:                                                                                                  #        EARTHMX, MOONMX, EARTHL
048687,000045: 
048688,000046:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
048689,000047:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
048690,000048:                                                                                                  #                        IN THE MOON-FIXED COORD. SYSTEM         RADIANS B0
048691,000049: 
048692,000050:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
048693,000051: 
048694,000052:                                                                                                  #  INPUT
048695,000053:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
048696,000054:                                                                                                  #        0-5D = RP VECTOR
048697,000055:                                                                                                  #        6-7D = TIME
048698,000056: 
048699,000057:                                                                                                  #  OUTPUT
048700,000058:                                                                                                  #        MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
048701,000059: 
048702,000060: 26,2000                                           SETLOC   PLANTIN1                              
048703,000061: 26,2000                                           BANK                                           
048704,000062: 
048705,000063: 26,3716                                           COUNT*   $$/LUROT                              
048706,000064: 
048707,000065: 26,3716           46020        RP-TO-R            STQ      BHIZ                                  
048708,000066: 26,3717           00050                                    RPREXIT                               
048709,000067: 26,3720           55733                                    RPTORA                                
048710,000068: 26,3721           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
048711,000069: 26,3722           51720                                    MOONMX                                #  LP=LM FOR MOON  RADIANS B0
048712,000070: 26,3723           77775                           VLOAD                                          
048713,000071: 26,3724           02013                                    504LM                                 
048714,000072: 26,3725           53235        RPTORB             VXV      VAD                                   
048715,000073: 26,3726           00001                                    504RPR                                
048716,000074: 26,3727           00001                                    504RPR                                
048717,000075: 26,3730           52105                           VXM      GOTO                                  
048718,000076: 26,3731           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
048719,000077: 26,3732           51706                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
048720,000078: 26,3733           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
048721,000079: 26,3734           55743                                    EARTHMX                               #  M MATRIX B-1
048722,000080: 26,3735           77624                           CALL                                           
048723,000081: 26,3736           15753                                    EARTHL                                #  L VECTOR RADIANS B0
048724,000082: 26,3737           76521                           MXV      VSL1                                  #  LP=M(T)*L  RAD B-0
048725,000083: 26,3740           00025                                    MMATRIX                               

Page 1141

048727,000085: 26,3741           77650                           GOTO                                           
048728,000086: 26,3742           55725                                    RPTORB                                
048729,000087: 24,2000                                           SETLOC   PLANTIN                               
048730,000088: 24,2000                                           BANK                                           
048731,000089: 24,3670                                           COUNT*   $$/LUROT                              
048732,000090: 

Page 1142

048734,000092:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
048735,000093:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
048736,000094:                                                                                                  #  (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
048737,000095: 
048738,000096:                                                                                                  #        RP = M(T) * (R - L X R)
048739,000097: 
048740,000098:                                                                                                  #  CALLING SEQUENCE
048741,000099:                                                                                                  #        L       CALL
048742,000100:                                                                                                  #        L+1             R-TO-RP
048743,000101: 
048744,000102:                                                                                                  #  SUBROUTINES USED
048745,000103:                                                                                                  #        EARTHMX, MOONMX, EARTHL
048746,000104: 
048747,000105:                                                                                                  #  INPUT
048748,000106:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
048749,000107:                                                                                                  #        0-5D = R VECTOR
048750,000108:                                                                                                  #        6-7D = TIME
048751,000109: 
048752,000110:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
048753,000111:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
048754,000112:                                                                                                  #                        IN THE MOON-FIXED COORD. SYSTEM   RADIANS B0
048755,000113: 
048756,000114:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
048757,000115: 
048758,000116:                                                                                                  #  OUTPUT
048759,000117:                                                                                                  #        MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
048760,000118: 
048761,000119: 24,3670           46020        R-TO-RP            STQ      BHIZ                                  
048762,000120: 24,3671           00050                                    RPREXIT                               
048763,000121: 24,3672           51712                                    RTORPA                                
048764,000122: 24,3673           77624                           CALL                                           
048765,000123: 24,3674           51720                                    MOONMX                                
048766,000124: 24,3675           61375                           VLOAD    VXM                                   
048767,000125: 24,3676           02013                                    504LM                                 #  LP=LM
048768,000126: 24,3677           00025                                    MMATRIX                               
048769,000127: 24,3700           77772                           VSL1                                           #  L = MT(T)*LP          RADIANS B0
048770,000128: 24,3701           51235        RTORPB             VXV      BVSU                                  
048771,000129: 24,3702           00001                                    504RPR                                
048772,000130: 24,3703           00001                                    504RPR                                
048773,000131: 24,3704           77721                           MXV                                            #  M(T)*(R-LXR)          B-2
048774,000132: 24,3705           00025                                    MMATRIX                               
048775,000133: 24,3706           40372        RPRPXXXX           VSL1     SETPD                                 
048776,000134: 24,3707           00001                                    0D                                    
048777,000135: 24,3710           77650                           GOTO                                           
048778,000136: 24,3711           00050                                    RPREXIT                               
048779,000137: 24,3712           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
048780,000138: 24,3713           55743                                    EARTHMX                               
048781,000139: 24,3714           77624                           CALL                                           
048782,000140: 24,3715           15753                                    EARTHL                                
048783,000141: 24,3716           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0)    RAD B-0
048784,000142: 24,3717           51701                                    RTORPB                                
048785,000143: 

Page 1143

048787,000145:                                                                                                  #  ..... MOONMX SUBROUTINE .....
048788,000146:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
048789,000147: 
048790,000148:                                                                                                  #  CALLING SEQUENCE
048791,000149:                                                                                                  #        L       CALL
048792,000150:                                                                                                  #        L+1             MOONMX
048793,000151: 
048794,000152:                                                                                                  #  SUBROUTINES USED
048795,000153:                                                                                                  #        NEWANGLE
048796,000154: 
048797,000155:                                                                                                  #  INPUT
048798,000156:                                                                                                  #        6-7D = TIME
048799,000157: 
048800,000158:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
048801,000159:                                                                                                  #                BSUBO, BDOT
048802,000160:                                                                                                  #                TIMSUBO, NODIO, NODDOT, FSUBO, FDOT
048803,000161:                                                                                                  #                COSI = COS(I)   B-1
048804,000162:                                                                                                  #                SINI = SIN(I)   B-1
048805,000163:                                                                                                  #                  I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
048806,000164:                                                                                                  #                  PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
048807,000165: 
048808,000166:                                                                                                  #  OUTPUT
048809,000167:                                                                                                  #        MMATRIX = 3X3 M MATRIX B-1      (STORED IN VAC AREA)
048810,000168: 
048811,000169: 24,3720           40220        MOONMX             STQ      SETPD                                 
048812,000170: 24,3721           00051                                    EARTHMXX                              
048813,000171: 24,3722           00011                                    8D                                    
048814,000172: 24,3723           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
048815,000173: 24,3724           00005                                    5                                     
048816,000174: 24,3725           65345                           DLOAD    PDDL                                  #  PD 10D        8-9D=BSUBO
048817,000175: 24,3726           14017                                    BSUBO                                 #                10-11D=BDOT
048818,000176: 24,3727           14011                                    BDOT                                  
048819,000177: 24,3730           45006                           PUSH     CALL                                  #  PD 12D
048820,000178: 24,3731           53743                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B   REVS B0
048821,000179: 24,3732           71406                           PUSH     COS                                   #  PD 10D
048822,000180: 24,3733           14041                           STODL    COB                                   #  PD 8D         COS(B) B-1
048823,000181: 24,3734           77756                           SIN                                            #                SIN(B) B-1
048824,000182: 24,3735           14043                           STODL    SOB                                   #  SETUP INPUT FOR NEWANGLE
048825,000183: 24,3736           14015                                    FSUBO                                 #                        8-9D=FSUBO
048826,000184: 24,3737           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=FDOT
048827,000185: 24,3740           14007                                    FDOT                                  
048828,000186: 24,3741           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
048829,000187: 24,3742           00004                                    4                                     
048830,000188: 24,3743           53743                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
048831,000189: 24,3744           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
048832,000190: 24,3745           14013                                    NODIO                                 #                        8-9D=NODIO
048833,000191: 24,3746           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=NODDOT
048834,000192: 24,3747           14005                                    NODDOT                                #                        MPAC=T
048835,000193: 24,3750           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
048836,000194: 24,3751           00005                                    5                                     
048837,000195: 24,3752           53743                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1144

048839,000197: 24,3753           71406                           PUSH     COS                                   #  PD 10D        8-9D= NODI REVS B0
048840,000198: 24,3754           77606                           PUSH                                           #  PD 12D        10-11D= COS(NODI) B-1
048841,000199: 24,3755           00025                           STORE    AVECTR                                
048842,000200: 24,3756           76405                           DMP      SL1R                                  
048843,000201: 24,3757           00041                                    COB                                   #                         COS(NODI) B-1
048844,000202: 24,3760           14035                           STODL    BVECTR     +2                         #  PD 10D  20-25D=AVECTR= COB*SIN(NODI)
048845,000203: 24,3761           76405                           DMP      SL1R                                  #                         SOB*SIN(NODI)
048846,000204: 24,3762           00043                                    SOB                                   
048847,000205: 24,3763           14037                           STODL    BVECTR     +4                         #  PD 8D
048848,000206: 24,3764           41556                           SIN      PUSH                                  #  PD 10D                -SIN(NODI) B-1
048849,000207: 24,3765           77676                           DCOMP                                          #          26-31D=BVECTR= COB*COS(NODI)
048850,000208: 24,3766           14033                           STODL    BVECTR                                #  PD 8D                  SOB*COS(NODI)
048851,000209: 24,3767           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
048852,000210: 24,3770           14007                           STODL    504F                                  
048853,000211: 24,3771           76405                           DMP      SL1R                                  
048854,000212: 24,3772           00041                                    COB                                   
048855,000213: 24,3773           77650                           GOTO                                           
048856,000214: 24,3774           53671                                    MOONMXA                               
048857,000215: 
048858,000216: 25,3671                                           BANK     25                                    
048859,000217: 25,2000                                           SETLOC   PLANTIN3                              
048860,000218: 25,2000                                           BANK                                           
048861,000219: 25,3671                                           COUNT*   $$/LUROT                              
048862,000220: 
048863,000221: 25,3671           14027        MOONMXA            STODL    AVECTR     +2                         
048864,000222: 25,3672           00011                                    SINNODI                               #  8-9D=SIN(NODI) B-1
048865,000223: 25,3673           76405                           DMP      SL1R                                  
048866,000224: 25,3674           00043                                    SOB                                   
048867,000225: 25,3675           14031                           STODL    AVECTR     +4                         #                         0
048868,000226: 25,3676           06522                                    HI6ZEROS                              #        8-13D= CVECTR= -SOB  B-1
048869,000227: 25,3677           57525                           PDDL     DCOMP                                 #  PD 10D                COB
048870,000228: 25,3700           00043                                    SOB                                   
048871,000229: 25,3701           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
048872,000230: 25,3702           00041                                    COB                                   
048873,000231: 25,3703           00033                                    BVECTR                                
048874,000232: 25,3704           63361                           VXSC     PDVL                                  #  PD 20D        BVECTR*SINI  B-2
048875,000233: 25,3705           14003                                    SINI                                  
048876,000234: 25,3706           00011                                    CVECTR                                
048877,000235: 25,3707           53361                           VXSC     VAD                                   #  PD 14D        CVECTR*COSI  B-2
048878,000236: 25,3710           14001                                    COSI                                  
048879,000237: 25,3711           77772                           VSL1                                           
048880,000238: 25,3712           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI  B-1
048881,000239: 25,3713           63361                           VXSC     PDVL                                  #  PD 14D
048882,000240: 25,3714           14003                                    SINI                                  #                CVECTR*SINI  B-2
048883,000241: 25,3715           00033                                    BVECTR                                
048884,000242: 25,3716           52361                           VXSC     VSU                                   #  PD 8D         BVECTR*COSI  B-2
048885,000243: 25,3717           14001                                    COSI                                  
048886,000244: 25,3720           65372                           VSL1     PDDL                                  #  PD 14D
048887,000245: 25,3721           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI  B-1
048888,000246: 25,3722           74346                           COS      VXSC                                  

Page 1145

048890,000248: 25,3723           00011                                    DVECTR                                
048891,000249: 25,3724           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF  B-2
048892,000250: 25,3725           00007                                    504F                                  
048893,000251: 25,3726           52361                           VXSC     VSU                                   #  PD 14D          AVECTR*SINF  B-2
048894,000252: 25,3727           00025                                    AVECTR                                
048895,000253: 25,3730           77772                           VSL1                                           
048896,000254: 25,3731           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF  B-1
048897,000255: 25,3732           00007                                    504F                                  
048898,000256: 25,3733           74356                           SIN      VXSC                                  #  PD 8D
048899,000257: 25,3734           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
048900,000258: 25,3735           00007                                    504F                                  
048901,000259: 25,3736           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
048902,000260: 25,3737           00025                                    AVECTR                                
048903,000261: 25,3740           57572                           VSL1     VCOMP                                 
048904,000262: 25,3741           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF)  B-1
048905,000263: 25,3742           00051                                    EARTHMXX                              
048906,000264: 
048907,000265:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
048908,000266:                                                                                                  #  8-9D= XO (REVS B-0), PUSHLOC SET AT 12D
048909,000267:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
048910,000268:                                                                                                  #                        AND B+27 FOR FDOT
048911,000269:                                                                                                  #   X1=DIFFERENCE IN 23 AND SCALING OF XDOT, =0 FOR WEARTH, 5 FOR NODDOT AND
048912,000270:                                                                                                  #                                        BDOT AND 4 FOR FDOT
048913,000271:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
048914,000272: 
048915,000273: 25,3743           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
048916,000274: 25,3744           00007                                    6D                                    
048917,000275: 25,3745           20617                                    14D                                   
048918,000276: 25,3746           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
048919,000277: 25,3747           01707                                    TIMSUBO                               
048920,000278: 25,3750           00155                                    MPAC                                  
048921,000279: 25,3751           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
048922,000280: 25,3752           00020                                    TIMSUBM    +1                         
048923,000281: 25,3753           77605                           DMP                                            #  PD 10D        MULT BY XDOT IN 10-11D
048924,000282: 25,3754           43257                           SL*      DAD                                   #  PD 8D         ADD XO IN 8-9D AFTER SHIFTING
048925,000283: 25,3755           20206                                    5,1                                   #                SUCH THAT SCALING IS B-0
048926,000284: 25,3756           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
048927,000285: 25,3757           00017                                    TIMSUBM                               
048928,000286: 25,3760           41261                           SL       DMP                                   
048929,000287: 25,3761           20212                                    9D                                    
048930,000288: 25,3762           00013                                    10D                                   #  XDOT
048931,000289: 25,3763           43257                           SL*      DAD                                   #  PD 8D         SHIFT SUCH THAT THIS PART OF X
048932,000290: 25,3764           20213                                    10D,1                                 #                IS SCALED REVS/CSEC B-0
048933,000291: 25,3765           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
048934,000292: 25,3766           53767                                    +1                                    #  INSTRUCTION BEFORE EXITING
048935,000293: 25,3767           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)  REVS B0
048936,000294: 

Page 1146

048938,000296:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
048939,000297:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
048940,000298: 
048941,000299:                                                                                                  #  CALLING SEQUENCE
048942,000300:                                                                                                  #        L       CALL
048943,000301:                                                                                                  #        L+1             EARTHMX
048944,000302: 
048945,000303:                                                                                                  #  SUBROUTINES USED
048946,000304:                                                                                                  #        NEWANGLE
048947,000305: 
048948,000306:                                                                                                  #  INPUT
048949,000307:                                                                                                  #        INPUT AVAILABLE FROM LAUNCH DATA        AZO  REVS B-0
048950,000308:                                                                                                  #                                                TEPHEM  CSEC B-42
048951,000309:                                                                                                  #        6-7D= TIME CSEC B-28
048952,000310: 
048953,000311:                                                                                                  #  OUTPUT
048954,000312:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1       (STORED IN VAC AREA)
048955,000313: 
048956,000314: 26,3743                                           BANK     26                                    
048957,000315: 26,2000                                           SETLOC   PLANTIN1                              
048958,000316: 26,2000                                           BANK                                           
048959,000317: 26,3743                                           COUNT*   $$/LUROT                              
048960,000318: 
048961,000319: 26,3743           40220        EARTHMX            STQ      SETPD                                 #  SET 8-9D=AZO
048962,000320: 26,3744           00051                                    EARTHMXX                              
048963,000321: 26,3745           00011                                    8D                                    #  10-11D=WEARTH
048964,000322: 26,3746           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
048965,000323: 26,3747           00000                                    0                                     
048966,000324: 26,3750           65345                           DLOAD    PDDL                                  #  LEAVING PD SET AT 12D FOR NEWANGLE
048967,000325: 26,3751           01712                                    AZO                                   
048968,000326: 26,3752           14021                                    WEARTH                                
048969,000327: 26,3753           45006                           PUSH     CALL                                  
048970,000328: 26,3754           53743                                    NEWANGLE                              
048971,000329: 26,3755           41401                           SETPD    PUSH                                  #  18-19D=504AZ
048972,000330: 26,3756           00023                                    18D                                   #                         COS(AZ)   SIN(AZ)     0
048973,000331: 26,3757           65346                           COS      PDDL                                  #  20-37D=  MMATRIX=     -SIN(AZ)   COS(AZ)     0    B-1
048974,000332: 26,3760           00023                                    504AZ                                 #                            0         0        1
048975,000333: 26,3761           65356                           SIN      PDDL                                  
048976,000334: 26,3762           06522                                    HI6ZEROS                              
048977,000335: 26,3763           73525                           PDDL     SIN                                   
048978,000336: 26,3764           00023                                    504AZ                                 
048979,000337: 26,3765           65276                           DCOMP    PDDL                                  
048980,000338: 26,3766           00023                                    504AZ                                 
048981,000339: 26,3767           63346                           COS      PDVL                                  
048982,000340: 26,3770           06522                                    HI6ZEROS                              
048983,000341: 26,3771           41525                           PDDL     PUSH                                  
048984,000342: 26,3772           06520                                    HIDPHALF                              
048985,000343: 26,3773           77650                           GOTO                                           
048986,000344: 26,3774           00051                                    EARTHMXX                              
048987,000345: 

Page 1147

048989,000347:                                                                                                  #  ..... EARTHL SUBROUTINE .....
048990,000348:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
048991,000349: 
048992,000350:                                                                                                  #  CALLING SEQUENCE
048993,000351:                                                                                                  #        L       CALL
048994,000352:                                                                                                  #        L+1             EARTHL
048995,000353: 
048996,000354:                                                                                                  #  INPUT
048997,000355:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
048998,000356: 
048999,000357:                                                                                                  #  OUTPUT
049000,000358:                                                                                                  #                -AX
049001,000359:                                                                                                  #        MPAC=   -AY     RADIANS B-0
049002,000360:                                                                                                  #                  0
049003,000361: 
049004,000362: 06,3753                                           BANK     06                                    
049005,000363: 06,2000                                           SETLOC   EARTHLOC                              
049006,000364: 06,2000                                           BANK                                           
049007,000365: 06,3753                                           COUNT*   $$/LUROT                              
049008,000366: 
049009,000367: 06,3753           57545        EARTHL             DLOAD    DCOMP                                 
049010,000368: 06,3754           01716                                    AXO                                   
049011,000369: 06,3755           14017                           STODL    504LPL                                
049012,000370: 06,3756           01714                                    -AYO                                  
049013,000371: 06,3757           14021                           STODL    504LPL     +2                         
049014,000372: 06,3760           24007                                    LO6ZEROS                              
049015,000373: 06,3761           24023                           STOVL    504LPL     +4                         
049016,000374: 06,3762           00017                                    504LPL                                
049017,000375: 06,3763           77616                           RVQ                                            
049018,000376: 

Page 1148

049020,000378:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
049021,000379: 
049022,000380: 06,3764  12,2004               1B1                =        DP1/2                                 #  1  SCALED B-1
049023,000381: 06,3764  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
049024,000382: 06,3764  0000051               EARTHMXX           =        S2                                    #  EARTHMX, MOONMX SUBR. EXITS
049025,000383: 06,3764                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
049026,000384: 06,3764                        SINNODI            =        8D                                    #  2             SIN(NODI)
049027,000385: 06,3764                        DVECTR             =        8D                                    #  6             D VECTOR MOON
049028,000386: 06,3764                        CVECTR             =        8D                                    #  6             C VECTR MOON
049029,000387: 06,3764                        504AZ              =        18D                                   #  2             AZ
049030,000388: 06,3764                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
049031,000389: 06,3764                        504LPL             =        14D                                   #  6             L OR LP VECTOR
049032,000390: 06,3764                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
049033,000391: 06,3764                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
049034,000392: 06,3764                        MMATRIX            =        20D                                   #  18            M MATRIX
049035,000393: 06,3764                        COB                =        32D                                   #  2             COS(B) B-1
049036,000394: 06,3764                        SOB                =        34D                                   #  2             SIN(B) B-1
049037,000395: 06,3764                        504F               =        6D                                    #  2             F(MOON)
049038,000396: 

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