Source Code

This is a reconstructed version of Luminary 130, the initial AGC program released in November 1969 for the Apollo 13 LM. Three more releases followed before the flown revision was finally manufactured in February 1970.

This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G.

In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'.

047783,000002:                                                                                                  ## Copyright:   Public domain.
047784,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
047785,000004:                                                                                                  ## Purpose:     A section of the reconstructed source code for Luminary 130.
047786,000005:                                                                                                  ##              This was the original program released for the Apollo 13 LM,
047787,000006:                                                                                                  ##              although several more revisions would follow. It has been
047788,000007:                                                                                                  ##              reconstructed from a listing of Luminary 131, from which it
047789,000008:                                                                                                  ##              differs on only two lines in P70-P71. The difference is
047790,000009:                                                                                                  ##              described in detail in Luminary memo #129, which was used
047791,000010:                                                                                                  ##              to perform the reconstruction. This file is intended to be a
047792,000011:                                                                                                  ##              faithful reconstruction, except that the code format has been
047793,000012:                                                                                                  ##              changed to conform to the requirements of the yaYUL assembler
047794,000013:                                                                                                  ##              rather than the original YUL assembler.
047795,000014:                                                                                                  ## Reference:   pp. 1134-1142
047796,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047797,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047798,000017:                                                                                                  ## Mod history: 06/01/03 RSB.   Began transcribing.
047799,000018:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
047800,000019:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
047801,000020:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
047802,000021:                                                                                                  ##                              numbers in 1701.pdf.
047803,000022:                                                                                                  ##              2017-02-27 RSB  Proofed comment text using octopus/ProoferComments.
047804,000023:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
047805,000024:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
047806,000025:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
047807,000026:                                                                                                  ##              2018-09-04 MAS  Copied from Luminary 131 for Luminary 130.
047808,000027: 

Page 1134

047810,000029:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
047811,000030:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
047812,000031:                                                                                                  #  EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
047813,000032:                                                                                                  #        R = MT(T) * (RP + LP X RP)      MT = M MATRIX TRANSPOSE
047814,000033: 
047815,000034:                                                                                                  #  CALLING SEQUENCE
047816,000035:                                                                                                  #        L       CALL
047817,000036:                                                                                                  #        L+1             RP-TO-R
047818,000037: 
047819,000038:                                                                                                  #  SUBROUTINES USED
047820,000039:                                                                                                  #        EARTHMX, MOONMX, EARTHL
047821,000040: 
047822,000041:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
047823,000042:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
047824,000043:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM         RADIANS B0
047825,000044: 
047826,000045:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
047827,000046: 
047828,000047:                                                                                                  #  INPUT
047829,000048:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
047830,000049:                                                                                                  #        0-5D = RP VECTOR
047831,000050:                                                                                                  #        6-7D = TIME
047832,000051: 
047833,000052:                                                                                                  #  OUTPUT
047834,000053:                                                                                                  #        MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
047835,000054: 
047836,000055: 26,2000                                           SETLOC   PLANTIN1                              
047837,000056: 26,2000                                           BANK                                           
047838,000057: 
047839,000058: 26,3716                                           COUNT*   $$/LUROT                              
047840,000059: 
047841,000060: 26,3716           46020        RP-TO-R            STQ      BHIZ                                  
047842,000061: 26,3717           00050                                    RPREXIT                               
047843,000062: 26,3720           55733                                    RPTORA                                
047844,000063: 26,3721           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
047845,000064: 26,3722           51730                                    MOONMX                                #  LP=LM FOR MOON        RADIANS B0
047846,000065: 26,3723           77775                           VLOAD                                          
047847,000066: 26,3724           02013                                    504LM                                 
047848,000067: 26,3725           53235        RPTORB             VXV      VAD                                   
047849,000068: 26,3726           00001                                    504RPR                                
047850,000069: 26,3727           00001                                    504RPR                                
047851,000070: 26,3730           52105                           VXM      GOTO                                  
047852,000071: 26,3731           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
047853,000072: 26,3732           51716                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
047854,000073: 26,3733           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
047855,000074: 26,3734           55743                                    EARTHMX                               #  M MATRIX B-1
047856,000075: 26,3735           77624                           CALL                                           
047857,000076: 26,3736           15761                                    EARTHL                                #  L VECTOR RADIANS B0
047858,000077: 26,3737           76521                           MXV      VSL1                                  #  LP=M(T)*L     RAD B-0
047859,000078: 26,3740           00025                                    MMATRIX                               

Page 1135

047861,000080: 26,3741           77650                           GOTO                                           
047862,000081: 26,3742           55725                                    RPTORB                                
047863,000082: 24,2000                                           SETLOC   PLANTIN                               
047864,000083: 24,2000                                           BANK                                           
047865,000084: 24,3700                                           COUNT*   $$/LUROT                              
047866,000085: 

Page 1136

047868,000087:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
047869,000088:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
047870,000089:                                                                                                  #  (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
047871,000090:                                                                                                  #        RP = M(T) * (R - L X R)
047872,000091: 
047873,000092:                                                                                                  #  CALLING SEQUENCE
047874,000093:                                                                                                  #        L       CALL
047875,000094:                                                                                                  #        L+1             R-TO-RP
047876,000095: 
047877,000096:                                                                                                  #  SUBROUTINES USED
047878,000097:                                                                                                  #        EARTHMX, MOONMX, EARTHL
047879,000098: 
047880,000099:                                                                                                  #  INPUT
047881,000100:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
047882,000101:                                                                                                  #        0-5D = R VECTOR
047883,000102:                                                                                                  #        6-7D = TIME
047884,000103: 
047885,000104:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
047886,000105:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
047887,000106:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM                 RADIANS B0
047888,000107: 
047889,000108:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
047890,000109: 
047891,000110:                                                                                                  #  OUTPUT
047892,000111:                                                                                                  #        MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
047893,000112: 
047894,000113: 24,3700           46020        R-TO-RP            STQ      BHIZ                                  
047895,000114: 24,3701           00050                                    RPREXIT                               
047896,000115: 24,3702           51722                                    RTORPA                                
047897,000116: 24,3703           77624                           CALL                                           
047898,000117: 24,3704           51730                                    MOONMX                                
047899,000118: 24,3705           61375                           VLOAD    VXM                                   
047900,000119: 24,3706           02013                                    504LM                                 #  LP=LM
047901,000120: 24,3707           00025                                    MMATRIX                               
047902,000121: 24,3710           77772                           VSL1                                           #  L = MT(T)*LP          RADIANS B0
047903,000122: 24,3711           51235        RTORPB             VXV      BVSU                                  
047904,000123: 24,3712           00001                                    504RPR                                
047905,000124: 24,3713           00001                                    504RPR                                
047906,000125: 24,3714           77721                           MXV                                            #  M(T)*(R-LXR)          B-2
047907,000126: 24,3715           00025                                    MMATRIX                               
047908,000127: 24,3716           40372        RPRPXXXX           VSL1     SETPD                                 
047909,000128: 24,3717           00001                                    0D                                    
047910,000129: 24,3720           77650                           GOTO                                           
047911,000130: 24,3721           00050                                    RPREXIT                               
047912,000131: 24,3722           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
047913,000132: 24,3723           55743                                    EARTHMX                               
047914,000133: 24,3724           77624                           CALL                                           
047915,000134: 24,3725           15761                                    EARTHL                                
047916,000135: 24,3726           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0)    RAD B-0
047917,000136: 24,3727           51711                                    RTORPB                                
047918,000137: 

Page 1137

047920,000139:                                                                                                  #  ..... MOONMX SUBROUTINE .....
047921,000140:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
047922,000141: 
047923,000142:                                                                                                  #  CALLING SEQUENCE
047924,000143:                                                                                                  #        L       CALL
047925,000144:                                                                                                  #        L+1             MOONMX
047926,000145: 
047927,000146:                                                                                                  #  SUBROUTINES USED
047928,000147:                                                                                                  #        NEWANGLE
047929,000148: 
047930,000149:                                                                                                  #  INPUT
047931,000150:                                                                                                  #        6-7D = TIME
047932,000151: 
047933,000152:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
047934,000153:                                                                                                  #                BSUBO, BDOT
047935,000154:                                                                                                  #                TIMSUBO, NODIO, NODDOT, FSUBO, FDOT
047936,000155:                                                                                                  #                COSI = COS(I)   B-1
047937,000156:                                                                                                  #                SINI = SIN(I)   B-1
047938,000157:                                                                                                  #                I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
047939,000158:                                                                                                  #                PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
047940,000159: 
047941,000160:                                                                                                  #  OUTPUT
047942,000161:                                                                                                  #        MMATRIX = 3X3 M MATRIX          B-1 (STORED IN VAC AREA)
047943,000162: 
047944,000163: 24,3730           40220        MOONMX             STQ      SETPD                                 
047945,000164: 24,3731           00051                                    EARTHMXX                              
047946,000165: 24,3732           00011                                    8D                                    
047947,000166: 24,3733           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
047948,000167: 24,3734           00005                                    5                                     
047949,000168: 24,3735           65345                           DLOAD    PDDL                                  #  PD 10D        8-9D=BSUBO
047950,000169: 24,3736           14017                                    BSUBO                                 #                10-11D=BDOT
047951,000170: 24,3737           14011                                    BDOT                                  
047952,000171: 24,3740           45006                           PUSH     CALL                                  #  PD 12D
047953,000172: 24,3741           53732                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B   REVS B0
047954,000173: 24,3742           71406                           PUSH     COS                                   #  PD 10D
047955,000174: 24,3743           14041                           STODL    COB                                   #  PD 8D         COS(B) B-1
047956,000175: 24,3744           77756                           SIN                                            #                SIN(B) B-1
047957,000176: 24,3745           14043                           STODL    SOB                                   #  SETUP INPUT FOR NEWANGLE
047958,000177: 24,3746           14015                                    FSUBO                                 #                        8-9D=FSUBO
047959,000178: 24,3747           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=FDOT
047960,000179: 24,3750           14007                                    FDOT                                  
047961,000180: 24,3751           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
047962,000181: 24,3752           00004                                    4                                     
047963,000182: 24,3753           53732                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
047964,000183: 24,3754           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
047965,000184: 24,3755           14013                                    NODIO                                 #                        8-9D=NODIO
047966,000185: 24,3756           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=NODDOT
047967,000186: 24,3757           14005                                    NODDOT                                #                        MPAC=T
047968,000187: 24,3760           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
047969,000188: 24,3761           00005                                    5                                     
047970,000189: 24,3762           53732                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1138

047972,000191: 24,3763           71406                           PUSH     COS                                   #  PD 10D        8-9D= NODI REVS B0
047973,000192: 24,3764           77606                           PUSH                                           #  PD 12D        10-11D= COS(NODI) B-1
047974,000193: 24,3765           00025                           STORE    AVECTR                                
047975,000194: 24,3766           76405                           DMP      SL1R                                  
047976,000195: 24,3767           00041                                    COB                                   #                        COS(NODI) B-1
047977,000196: 24,3770           14035                           STODL    BVECTR     +2                         #  PD 10D  20-25D=AVECTR=COB*SIN(NODI)
047978,000197: 24,3771           76405                           DMP      SL1R                                  #                        SOB*SIN(NODI)
047979,000198: 24,3772           00043                                    SOB                                   
047980,000199: 24,3773           14037                           STODL    BVECTR     +4                         #  PD 8D
047981,000200: 24,3774           41556                           SIN      PUSH                                  #  PD 10D                -SIN(NODI) B-1
047982,000201: 24,3775           52076                           DCOMP    GOTO                                  #          26-31D=BVECTR=COV*COS(NODI)
047983,000202: 24,3776           53653                                    MOONMXA                               
047984,000203: 
047985,000204: 25,3653                                           BANK     25                                    
047986,000205: 25,2000                                           SETLOC   PLANTIN3                              
047987,000206: 25,2000                                           BANK                                           
047988,000207: 25,3653                                           COUNT*   $$/LUROT                              
047989,000208: 
047990,000209: 25,3653           14033        MOONMXA            STODL    BVECTR                                #  PD 8D                 SOB*COS(NODI)
047991,000210: 25,3654           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
047992,000211: 25,3655           14007                           STODL    504F                                  
047993,000212: 25,3656           76405                           DMP      SL1R                                  
047994,000213: 25,3657           00041                                    COB                                   
047995,000214: 25,3660           14027                           STODL    AVECTR     +2                         
047996,000215: 25,3661           00011                                    SINNODI                               #  8-9D=SIN(NODI) B-1
047997,000216: 25,3662           76405                           DMP      SL1R                                  
047998,000217: 25,3663           00043                                    SOB                                   
047999,000218: 25,3664           14031                           STODL    AVECTR     +4                         #                        0
048000,000219: 25,3665           06524                                    HI6ZEROS                              #        8-13D= CVECTR=  -SOB B-1
048001,000220: 25,3666           57525                           PDDL     DCOMP                                 #  PD 10D                COB
048002,000221: 25,3667           00043                                    SOB                                   
048003,000222: 25,3670           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
048004,000223: 25,3671           00041                                    COB                                   
048005,000224: 25,3672           00033                                    BVECTR                                
048006,000225: 25,3673           63361                           VXSC     PDVL                                  #  PD 20D        BVECTR*SINI B-2
048007,000226: 25,3674           14003                                    SINI                                  
048008,000227: 25,3675           00011                                    CVECTR                                
048009,000228: 25,3676           53361                           VXSC     VAD                                   #  PD 14D        CVECTR*COSI B-2
048010,000229: 25,3677           14001                                    COSI                                  
048011,000230: 25,3700           77772                           VSL1                                           
048012,000231: 25,3701           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI B-1
048013,000232: 25,3702           63361                           VXSC     PDVL                                  #  PD 14D
048014,000233: 25,3703           14003                                    SINI                                  #                CVECTR*SINI B-2
048015,000234: 25,3704           00033                                    BVECTR                                
048016,000235: 25,3705           52361                           VXSC     VSU                                   #  PD 8D         BVECTR*COSI B-2
048017,000236: 25,3706           14001                                    COSI                                  
048018,000237: 25,3707           65372                           VSL1     PDDL                                  #  PD 14D
048019,000238: 25,3710           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
048020,000239: 25,3711           74346                           COS      VXSC                                  
048021,000240: 25,3712           00011                                    DVECTR                                
048022,000241: 25,3713           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF B-2

Page 1139

048024,000243: 25,3714           00007                                    504F                                  
048025,000244: 25,3715           52361                           VXSC     VSU                                   #  PD 14D        AVECTR*SINF B-2
048026,000245: 25,3716           00025                                    AVECTR                                
048027,000246: 25,3717           77772                           VSL1                                           
048028,000247: 25,3720           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF B-1
048029,000248: 25,3721           00007                                    504F                                  
048030,000249: 25,3722           74356                           SIN      VXSC                                  #  PD 8D
048031,000250: 25,3723           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
048032,000251: 25,3724           00007                                    504F                                  
048033,000252: 25,3725           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
048034,000253: 25,3726           00025                                    AVECTR                                
048035,000254: 25,3727           57572                           VSL1     VCOMP                                 
048036,000255: 25,3730           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF) B-1
048037,000256: 25,3731           00051                                    EARTHMXX                              
048038,000257: 
048039,000258:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
048040,000259:                                                                                                  #  8-9D= XO (REVS B-0), PUSHLOC SET AT 12D
048041,000260:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
048042,000261:                                                                                                  #                        AND B+27 FOR FDOT
048043,000262:                                                                                                  #  X1=DIFFERENCE IN 23 AND SCALING OF XDOT, =0 FOR WEARTH,5 FOR NODDOT AND
048044,000263:                                                                                                  #                                        BDOT AND 4 FOR FDOT
048045,000264:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
048046,000265: 
048047,000266: 25,3732           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
048048,000267: 25,3733           00007                                    6D                                    
048049,000268: 25,3734           20617                                    14D                                   
048050,000269: 25,3735           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
048051,000270: 25,3736           01707                                    TIMSUBO                               
048052,000271: 25,3737           00155                                    MPAC                                  
048053,000272: 25,3740           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
048054,000273: 25,3741           00020                                    TIMSUBM    +1                         
048055,000274: 25,3742           77605                           DMP                                            #  PD 10D        MULT BY XDOT IN 10-11D
048056,000275: 25,3743           43257                           SL*      DAD                                   #  PD 8D         ADD XO IN 8-9D AFTER SHIFTING
048057,000276: 25,3744           20206                                    5,1                                   #                SUCH THAT SCALING IS B-0
048058,000277: 25,3745           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
048059,000278: 25,3746           00017                                    TIMSUBM                               
048060,000279: 25,3747           41261                           SL       DMP                                   
048061,000280: 25,3750           20212                                    9D                                    
048062,000281: 25,3751           00013                                    10D                                   #  XDOT
048063,000282: 25,3752           43257                           SL*      DAD                                   #  PD 8D         SHIFT SUCH THAT THIS PART OF X
048064,000283: 25,3753           20213                                    10D,1                                 #                IS SCALED REVS/CSEC B-0
048065,000284: 25,3754           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
048066,000285: 25,3755           53756                                    +1                                    #  INSTRUCTION BEFORE EXITING
048067,000286: 25,3756           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)       REVS B0
048068,000287: 

Page 1140

048070,000289:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
048071,000290:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
048072,000291: 
048073,000292:                                                                                                  #  CALLING SEQUENCE
048074,000293:                                                                                                  #        L       CALL
048075,000294:                                                                                                  #        L+1             EARTHMX
048076,000295: 
048077,000296:                                                                                                  #  SUBROUTINES USED
048078,000297:                                                                                                  #        NEWANGLE
048079,000298: 
048080,000299:                                                                                                  #  INPUT
048081,000300:                                                                                                  #        INPUT AVAILABLE FROM LAUNCH DATA        AZO REVS B-0
048082,000301:                                                                                                  #                                                TEPHEM CSEC B-42
048083,000302:                                                                                                  #        6-7D= TIME CSEC B-28
048084,000303: 
048085,000304:                                                                                                  #  OUTPUT
048086,000305:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1 (STORED IN VAC AREA)
048087,000306: 
048088,000307: 26,3743                                           BANK     26                                    
048089,000308: 26,2000                                           SETLOC   PLANTIN1                              
048090,000309: 26,2000                                           BANK                                           
048091,000310: 26,3743                                           COUNT*   $$/LUROT                              
048092,000311: 
048093,000312: 26,3743           40220        EARTHMX            STQ      SETPD                                 #  SET 8-9D=AZO
048094,000313: 26,3744           00051                                    EARTHMXX                              
048095,000314: 26,3745           00011                                    8D                                    #  10-11D=WEARTH
048096,000315: 26,3746           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
048097,000316: 26,3747           00000                                    0                                     
048098,000317: 26,3750           65345                           DLOAD    PDDL                                  #  LEAVING PD SET AT 12D FOR NEWANGLE
048099,000318: 26,3751           01712                                    AZO                                   
048100,000319: 26,3752           14021                                    WEARTH                                
048101,000320: 26,3753           45006                           PUSH     CALL                                  
048102,000321: 26,3754           53732                                    NEWANGLE                              
048103,000322: 26,3755           41401                           SETPD    PUSH                                  #  18-19D=504AZ
048104,000323: 26,3756           00023                                    18D                                   #                         COS(AZ)   SIN(AZ)     0
048105,000324: 26,3757           65346                           COS      PDDL                                  #  20-37D=  MMATRIX=     -SIN(AZ)   COS(AZ)     0    B-1
048106,000325: 26,3760           00023                                    504AZ                                 #                            0         0        1
048107,000326: 26,3761           65356                           SIN      PDDL                                  
048108,000327: 26,3762           06524                                    HI6ZEROS                              
048109,000328: 26,3763           73525                           PDDL     SIN                                   
048110,000329: 26,3764           00023                                    504AZ                                 
048111,000330: 26,3765           65276                           DCOMP    PDDL                                  
048112,000331: 26,3766           00023                                    504AZ                                 
048113,000332: 26,3767           63346                           COS      PDVL                                  
048114,000333: 26,3770           06524                                    HI6ZEROS                              
048115,000334: 26,3771           41525                           PDDL     PUSH                                  
048116,000335: 26,3772           06522                                    HIDPHALF                              
048117,000336: 26,3773           77650                           GOTO                                           
048118,000337: 26,3774           00051                                    EARTHMXX                              
048119,000338: 

Page 1141

048121,000340:                                                                                                  #  ..... EARTHL SUBROUTINE .....
048122,000341:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
048123,000342: 
048124,000343:                                                                                                  #  CALLING SEQUENCE
048125,000344:                                                                                                  #        L       CALL
048126,000345:                                                                                                  #        L+1             EARTHL
048127,000346: 
048128,000347:                                                                                                  #  INPUT
048129,000348:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
048130,000349: 
048131,000350:                                                                                                  #  OUTPUT
048132,000351:                                                                                                  #                -AX
048133,000352:                                                                                                  #        MPAC=   -AY     RADIANS B-0
048134,000353:                                                                                                  #                  0
048135,000354: 
048136,000355: 06,3761                                           BANK     06                                    
048137,000356: 06,2000                                           SETLOC   EARTHLOC                              
048138,000357: 06,2000                                           BANK                                           
048139,000358: 06,3761                                           COUNT*   $$/LUROT                              
048140,000359: 
048141,000360: 06,3761           57545        EARTHL             DLOAD    DCOMP                                 
048142,000361: 06,3762           01716                                    AXO                                   
048143,000362: 06,3763           14017                           STODL    504LPL                                
048144,000363: 06,3764           01714                                    -AYO                                  
048145,000364: 06,3765           14021                           STODL    504LPL     +2                         
048146,000365: 06,3766           24007                                    LO6ZEROS                              
048147,000366: 06,3767           24023                           STOVL    504LPL     +4                         
048148,000367: 06,3770           00017                                    504LPL                                
048149,000368: 06,3771           77616                           RVQ                                            
048150,000369: 

Page 1142

048152,000371:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
048153,000372: 
048154,000373: 06,3772  12,2004               1B1                =        DP1/2                                 #  1 SCALED B-1
048155,000374: 06,3772  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
048156,000375: 06,3772  0000051               EARTHMXX           =        S2                                    #  EARTHMX, MOONMX SUBR. EXITS
048157,000376: 06,3772                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
048158,000377: 06,3772                        SINNODI            =        8D                                    #  2             SIN(NODI)
048159,000378: 06,3772                        DVECTR             =        8D                                    #  6             D VECTOR MOON
048160,000379: 06,3772                        CVECTR             =        8D                                    #  6             C VECTR MOON
048161,000380: 06,3772                        504AZ              =        18D                                   #  2             AZ
048162,000381: 06,3772                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
048163,000382: 06,3772                        504LPL             =        14D                                   #  6             L OR LP VECTOR
048164,000383: 06,3772                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
048165,000384: 06,3772                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
048166,000385: 06,3772                        MMATRIX            =        20D                                   #  18            M MATRIX
048167,000386: 06,3772                        COB                =        32D                                   #  2             COS(B) B-1
048168,000387: 06,3772                        SOB                =        34D                                   #  2             SIN(B) B-1
048169,000388: 06,3772                        504F               =        6D                                    #  2             F(MOON)
048170,000389: 

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