Source Code

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

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

047824,000002:                                                                                                  ## Copyright:   Public domain.
047825,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
047826,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
047827,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM) 
047828,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
047829,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
047830,000008:                                                                                                  ##              that the code format has been changed to conform to the
047831,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
047832,000010:                                                                                                  ##              original YUL assembler.
047833,000011:                                                                                                  ## Reference:   pp. 1132-1140
047834,000012:                                                                                                  ## Assembler:   yaYUL
047835,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047836,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047837,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
047838,000016:                                                                                                  ##              2017-01-25 RRB  Updated for Luminary 116.
047839,000017:                                                                                                  ##              2017-03-14 RSB  Proofed comment text via 3-way diff vs
047840,000018:                                                                                                  ##                              Luminary 99 and 131.
047841,000019:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
047842,000020:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
047843,000021: 

Page 1132

047845,000023:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
047846,000024:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
047847,000025:                                                                                                  #   EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
047848,000026: 
047849,000027:                                                                                                  #   R=MT(T)*(RP+LPXRP)     MT = M MATRIX TRANSPOSE
047850,000028: 
047851,000029:                                                                                                  #  CALLING SEQUENCE
047852,000030:                                                                                                  #   L       CALL
047853,000031:                                                                                                  #   L+1             RP-TO-R
047854,000032: 
047855,000033:                                                                                                  #  SUBROUTINES USED
047856,000034:                                                                                                  #   EARTHMX, MOONMX, EARTHL
047857,000035: 
047858,000036:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
047859,000037:                                                                                                  #      504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
047860,000038:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM    RADIANS  B0
047861,000039:                                                                                                  #         ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
047862,000040: 
047863,000041:                                                                                                  #  INPUT
047864,000042:                                                                                                  #   MPAC = 0 FOR EARTH,NON-ZERO FOR MOON
047865,000043:                                                                                                  #   0-5D = RP VECTOR
047866,000044:                                                                                                  #   6-7D = TIME
047867,000045: 
047868,000046:                                                                                                  #  OUTPUT
047869,000047:                                                                                                  #   MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
047870,000048: 
047871,000049: 26,2000                                           SETLOC   PLANTIN1                              
047872,000050: 26,2000                                           BANK                                           
047873,000051: 
047874,000052: 26,3716                                           COUNT*   $$/LUROT                              
047875,000053: 
047876,000054: 26,3716           46020        RP-TO-R            STQ      BHIZ                                  
047877,000055: 26,3717           00050                                    RPREXIT                               
047878,000056: 26,3720           55733                                    RPTORA                                
047879,000057: 26,3721           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
047880,000058: 26,3722           51727                                    MOONMX                                #  LP=LM FOR MOON  RADIANS B0
047881,000059: 26,3723           77775                           VLOAD                                          
047882,000060: 26,3724           02013                                    504LM                                 
047883,000061: 26,3725           53235        RPTORB             VXV      VAD                                   
047884,000062: 26,3726           00001                                    504RPR                                
047885,000063: 26,3727           00001                                    504RPR                                
047886,000064: 26,3730           52105                           VXM      GOTO                                  
047887,000065: 26,3731           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
047888,000066: 26,3732           51715                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
047889,000067: 26,3733           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
047890,000068: 26,3734           55743                                    EARTHMX                               #  M MATRIX B-1
047891,000069: 26,3735           77624                           CALL                                           
047892,000070: 26,3736           15761                                    EARTHL                                #  L VECTOR RADIANS B0
047893,000071: 26,3737           76521                           MXV      VSL1                                  #  LP=M(T)*L  RAD B-0
047894,000072: 26,3740           00025                                    MMATRIX                               

Page 1133

047896,000074: 26,3741           77650                           GOTO                                           
047897,000075: 26,3742           55725                                    RPTORB                                
047898,000076: 24,2000                                           SETLOC   PLANTIN                               
047899,000077: 24,2000                                           BANK                                           
047900,000078: 24,3677                                           COUNT*   $$/LUROT                              
047901,000079: 

Page 1134

047903,000081:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
047904,000082:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
047905,000083:                                                                                                  #   (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
047906,000084: 
047907,000085:                                                                                                  #   RP=M(T)*(R-LXR)
047908,000086: 
047909,000087:                                                                                                  #  CALLING SEQUENCE
047910,000088:                                                                                                  #   L       CALL
047911,000089:                                                                                                  #   L+1             R-TO-RP
047912,000090: 
047913,000091:                                                                                                  #  SUBROUTINES USED
047914,000092:                                                                                                  #   EARTHMX,MOONMX,EARTHL
047915,000093: 
047916,000094:                                                                                                  #  INPUT
047917,000095:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
047918,000096:                                                                                                  #   0-5D= R VECTOR
047919,000097:                                                                                                  #   6-7D= TIME
047920,000098: 
047921,000099:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
047922,000100:                                                                                                  #      504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
047923,000101:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM   RADIANS B0
047924,000102:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
047925,000103: 
047926,000104:                                                                                                  #  OUTPUT
047927,000105:                                                                                                  #   MPAC=RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
047928,000106: 
047929,000107: 24,3677           46020        R-TO-RP            STQ      BHIZ                                  
047930,000108: 24,3700           00050                                    RPREXIT                               
047931,000109: 24,3701           51721                                    RTORPA                                
047932,000110: 24,3702           77624                           CALL                                           
047933,000111: 24,3703           51727                                    MOONMX                                
047934,000112: 24,3704           61375                           VLOAD    VXM                                   
047935,000113: 24,3705           02013                                    504LM                                 #  LP=LM
047936,000114: 24,3706           00025                                    MMATRIX                               
047937,000115: 24,3707           77772                           VSL1                                           #   L=MT(T)*LP  RADIANS B0
047938,000116: 24,3710           51235        RTORPB             VXV      BVSU                                  
047939,000117: 24,3711           00001                                    504RPR                                
047940,000118: 24,3712           00001                                    504RPR                                
047941,000119: 24,3713           77721                           MXV                                            #  M(T)*(R-LXR) B-2
047942,000120: 24,3714           00025                                    MMATRIX                               
047943,000121: 24,3715           40372        RPRPXXXX           VSL1     SETPD                                 
047944,000122: 24,3716           00001                                    0D                                    
047945,000123: 24,3717           77650                           GOTO                                           
047946,000124: 24,3720           00050                                    RPREXIT                               
047947,000125: 24,3721           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
047948,000126: 24,3722           55743                                    EARTHMX                               
047949,000127: 24,3723           77624                           CALL                                           
047950,000128: 24,3724           15761                                    EARTHL                                
047951,000129: 24,3725           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0) RAD B-0
047952,000130: 24,3726           51710                                    RTORPB                                
047953,000131: 

Page 1135

047955,000133:                                                                                                  #  ..... MOONMX SUBROUTINE .....
047956,000134:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
047957,000135: 
047958,000136:                                                                                                  #  CALLING SEQUENCE
047959,000137:                                                                                                  #   L       CALL
047960,000138:                                                                                                  #   L+1             MOONMX
047961,000139: 
047962,000140:                                                                                                  #  SUBROUTINES USED
047963,000141:                                                                                                  #   NEWANGLE
047964,000142: 
047965,000143:                                                                                                  #  INPUT
047966,000144:                                                                                                  #   6-7D= TIME
047967,000145:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
047968,000146:                                                                                                  #      BSUBO,BDOT
047969,000147:                                                                                                  #      TIMSUBO,NODIO,NODDOT,FSUBO,FDOT
047970,000148:                                                                                                  #      COSI = COS(I) B-1
047971,000149:                                                                                                  #      SINI = SIN(I) B-1
047972,000150:                                                                                                  #        I  IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
047973,000151:                                                                                                  #        PLANE OF THE ECLIPTIC   (1 DEGREE 32.1 MINUTES)
047974,000152: 
047975,000153:                                                                                                  #  OUTPUT
047976,000154:                                                                                                  #   MMATRIX = 3X3 M MATRIX B-1   (STORED IN VAC AREA)
047977,000155: 
047978,000156: 24,3727           40220        MOONMX             STQ      SETPD                                 
047979,000157: 24,3730           00051                                    EARTHMXX                              
047980,000158: 24,3731           00011                                    8D                                    
047981,000159: 24,3732           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
047982,000160: 24,3733           00005                                    5                                     
047983,000161: 24,3734           65345                           DLOAD    PDDL                                  #  PD 10D            8-9D=BSUBO
047984,000162: 24,3735           14017                                    BSUBO                                 #                    10-11D=BDOT
047985,000163: 24,3736           14011                                    BDOT                                  
047986,000164: 24,3737           45006                           PUSH     CALL                                  #  PD 12D
047987,000165: 24,3740           53712                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B  REVS B0
047988,000166: 24,3741           71406                           PUSH     COS                                   #  PD 10D
047989,000167: 24,3742           14041                           STODL    COB                                   #  PD 8D   COS(B) B-1
047990,000168: 24,3743           77756                           SIN                                            #          SIN(B) B-1
047991,000169: 24,3744           14043                           STODL    SOB                                   #           SETUP INPUT FOR NEWANGLE
047992,000170: 24,3745           14015                                    FSUBO                                 #                     8-9D=FSUBO
047993,000171: 24,3746           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D  10-11D=FDOT
047994,000172: 24,3747           14007                                    FDOT                                  
047995,000173: 24,3750           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
047996,000174: 24,3751           00004                                    4                                     
047997,000175: 24,3752           53712                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
047998,000176: 24,3753           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
047999,000177: 24,3754           14013                                    NODIO                                 #                      8-9D=NODIO
048000,000178: 24,3755           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=NODDOT
048001,000179: 24,3756           14005                                    NODDOT                                #                      MPAC=T
048002,000180: 24,3757           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
048003,000181: 24,3760           00005                                    5                                     
048004,000182: 24,3761           53712                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1136

048006,000184: 24,3762           71406                           PUSH     COS                                   #  PD 10D   8-9D= NODI REVS B0
048007,000185: 24,3763           77606                           PUSH                                           #  PD 12D 10-11D= COS(NODI) B-1
048008,000186: 24,3764           00025                           STORE    AVECTR                                
048009,000187: 24,3765           76405                           DMP      SL1R                                  
048010,000188: 24,3766           00041                                    COB                                   #                         COS(NODI)     B-1
048011,000189: 24,3767           14035                           STODL    BVECTR     +2                         #  PD 10D   20-25D=AVECTR= COB*SIN(NODI)
048012,000190: 24,3770           76405                           DMP      SL1R                                  #                          SOB*SIN(NODI)
048013,000191: 24,3771           00043                                    SOB                                   
048014,000192: 24,3772           14037                           STODL    BVECTR     +4                         #  PD 8D
048015,000193: 24,3773           41556                           SIN      PUSH                                  #  PD 10D                 -SIN(NODI)   B-1
048016,000194: 24,3774           52076                           DCOMP    GOTO                                  #           26-31D=BVECTR= COV*COS(NODI)
048017,000195: 24,3775           53633                                    MOONMXA                               
048018,000196: 25,3633                                           BANK     25                                    
048019,000197: 25,2000                                           SETLOC   PLANTIN3                              
048020,000198: 25,2000                                           BANK                                           
048021,000199: 25,3633                                           COUNT*   $$/LUROT                              
048022,000200: 
048023,000201: 25,3633           14033        MOONMXA            STODL    BVECTR                                #  PD 8D                    SOB*COS(NODI)
048024,000202: 25,3634           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
048025,000203: 25,3635           14007                           STODL    504F                                  
048026,000204: 25,3636           76405                           DMP      SL1R                                  
048027,000205: 25,3637           00041                                    COB                                   
048028,000206: 25,3640           14027                           STODL    AVECTR     +2                         
048029,000207: 25,3641           00011                                    SINNODI                               #  8-9D=SIN(NODI)  B-1
048030,000208: 25,3642           76405                           DMP      SL1R                                  
048031,000209: 25,3643           00043                                    SOB                                   
048032,000210: 25,3644           14031                           STODL    AVECTR     +4                         #                           0
048033,000211: 25,3645           06524                                    HI6ZEROS                              #          8-13D= CVECTR= -SOB  B-1
048034,000212: 25,3646           57525                           PDDL     DCOMP                                 #  PD 10D                  COB
048035,000213: 25,3647           00043                                    SOB                                   
048036,000214: 25,3650           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
048037,000215: 25,3651           00041                                    COB                                   
048038,000216: 25,3652           00033                                    BVECTR                                
048039,000217: 25,3653           63361                           VXSC     PDVL                                  #  PD 20D          BVECTR*SINI  B-2
048040,000218: 25,3654           14003                                    SINI                                  
048041,000219: 25,3655           00011                                    CVECTR                                
048042,000220: 25,3656           53361                           VXSC     VAD                                   #  PD 14D          CVECTR*COSI  B-2
048043,000221: 25,3657           14001                                    COSI                                  
048044,000222: 25,3660           77772                           VSL1                                           
048045,000223: 25,3661           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI   B-1
048046,000224: 25,3662           63361                           VXSC     PDVL                                  #  PD 14D
048047,000225: 25,3663           14003                                    SINI                                  #                 CVECTR*SINI  B-2
048048,000226: 25,3664           00033                                    BVECTR                                
048049,000227: 25,3665           52361                           VXSC     VSU                                   #  PD 8D          BVECTR*COSI  B-2
048050,000228: 25,3666           14001                                    COSI                                  
048051,000229: 25,3667           65372                           VSL1     PDDL                                  #  PD 14D
048052,000230: 25,3670           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
048053,000231: 25,3671           74346                           COS      VXSC                                  
048054,000232: 25,3672           00011                                    DVECTR                                
048055,000233: 25,3673           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF B-2

Page 1137

048057,000235: 25,3674           00007                                    504F                                  
048058,000236: 25,3675           52361                           VXSC     VSU                                   #  PD 14D          AVECTR*SINF  B-2
048059,000237: 25,3676           00025                                    AVECTR                                
048060,000238: 25,3677           77772                           VSL1                                           
048061,000239: 25,3700           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF  B-1
048062,000240: 25,3701           00007                                    504F                                  
048063,000241: 25,3702           74356                           SIN      VXSC                                  #  PD 8D
048064,000242: 25,3703           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
048065,000243: 25,3704           00007                                    504F                                  
048066,000244: 25,3705           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
048067,000245: 25,3706           00025                                    AVECTR                                
048068,000246: 25,3707           57572                           VSL1     VCOMP                                 
048069,000247: 25,3710           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF)  B-1
048070,000248: 25,3711           00051                                    EARTHMXX                              
048071,000249: 
048072,000250:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
048073,000251:                                                                                                  #  8-9D= XO (REVS B-0),PUSHLOC SET AT 12D
048074,000252:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
048075,000253:                                                                                                  #                          AND B+27 FOR FDOT
048076,000254:                                                                                                  #   X1=DIFFERENCE IN 23 AND SCALING OF XDOT,=0 FOR WEARTH, 5 FOR NODDOT AND
048077,000255:                                                                                                  #                                           BDOT AND 4 FOR FDOT
048078,000256:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
048079,000257: 
048080,000258: 25,3712           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
048081,000259: 25,3713           00007                                    6D                                    
048082,000260: 25,3714           20617                                    14D                                   
048083,000261: 25,3715           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
048084,000262: 25,3716           01707                                    TIMSUBO                               
048085,000263: 25,3717           00155                                    MPAC                                  
048086,000264: 25,3720           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
048087,000265: 25,3721           00020                                    TIMSUBM    +1                         
048088,000266: 25,3722           77605                           DMP                                            #  PD 10D  MULT BY XDOT IN 10-11D
048089,000267: 25,3723           43257                           SL*      DAD                                   #  PD 8D   ADD XO IN 8-9D AFTER SHIFTING
048090,000268: 25,3724           20206                                    5,1                                   #          SUCH THAT SCALING IS B-0
048091,000269: 25,3725           67206                           PUSH     SLOAD                                 #  PD 10D SAVE PARTIAL (X0+XDOT*T) IN 8-9D
048092,000270: 25,3726           00017                                    TIMSUBM                               
048093,000271: 25,3727           41261                           SL       DMP                                   
048094,000272: 25,3730           20212                                    9D                                    
048095,000273: 25,3731           00013                                    10D                                   #  XDOT
048096,000274: 25,3732           43257                           SL*      DAD                                   #  PD 8D    SHIFT SUCH THAT THIS PART OF X
048097,000275: 25,3733           20213                                    10D,1                                 #           IS SCALED REVS/CSEC B-0
048098,000276: 25,3734           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
048099,000277: 25,3735           53736                                    +1                                    #  INSTRUCTION BEFORE EXITING
048100,000278: 25,3736           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)  REVS B0
048101,000279: 

Page 1138

048103,000281:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
048104,000282:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
048105,000283: 
048106,000284:                                                                                                  #  CALLING SEQUENCE
048107,000285:                                                                                                  #   L       CALL
048108,000286:                                                                                                  #   L+1             EARTHMX
048109,000287: 
048110,000288:                                                                                                  #  SUBROUTINES USED
048111,000289:                                                                                                  #   NEWANGLE
048112,000290: 
048113,000291:                                                                                                  #  INPUT
048114,000292:                                                                                                  #   INPUT AVAILABLE FROM LAUNCH DATA       AZO  REVS B-0
048115,000293:                                                                                                  #                                          TEPHEM  CSEC B-42
048116,000294:                                                                                                  #    6-7D= TIME CSEC B-28
048117,000295: 
048118,000296:                                                                                                  #  OUTPUT
048119,000297:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
048120,000298: 
048121,000299: 26,3743                                           BANK     26                                    
048122,000300: 26,2000                                           SETLOC   PLANTIN1                              
048123,000301: 26,2000                                           BANK                                           
048124,000302: 26,3743                                           COUNT*   $$/LUROT                              
048125,000303: 
048126,000304: 26,3743           40220        EARTHMX            STQ      SETPD                                 #  SET   8-9D=AZO
048127,000305: 26,3744           00051                                    EARTHMXX                              
048128,000306: 26,3745           00011                                    8D                                    #  10-11D=WEARTH
048129,000307: 26,3746           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
048130,000308: 26,3747           00000                                    0                                     
048131,000309: 26,3750           65345                           DLOAD    PDDL                                  #    LEAVING PD SET AT 12D FOR NEWANGLE
048132,000310: 26,3751           01712                                    AZO                                   
048133,000311: 26,3752           14021                                    WEARTH                                
048134,000312: 26,3753           45006                           PUSH     CALL                                  
048135,000313: 26,3754           53712                                    NEWANGLE                              
048136,000314: 26,3755           41401                           SETPD    PUSH                                  #  18-19D=504AZ
048137,000315: 26,3756           00023                                    18D                                   #                     COS(AZ) SIN(AZ) 0
048138,000316: 26,3757           65346                           COS      PDDL                                  #  20-37D=  MMATRIX= -SIN(AZ) COS(AZ) 0 B-1
048139,000317: 26,3760           00023                                    504AZ                                 #                      0       0      1
048140,000318: 26,3761           65356                           SIN      PDDL                                  
048141,000319: 26,3762           06524                                    HI6ZEROS                              
048142,000320: 26,3763           73525                           PDDL     SIN                                   
048143,000321: 26,3764           00023                                    504AZ                                 
048144,000322: 26,3765           65276                           DCOMP    PDDL                                  
048145,000323: 26,3766           00023                                    504AZ                                 
048146,000324: 26,3767           63346                           COS      PDVL                                  
048147,000325: 26,3770           06524                                    HI6ZEROS                              
048148,000326: 26,3771           41525                           PDDL     PUSH                                  
048149,000327: 26,3772           06522                                    HIDPHALF                              
048150,000328: 26,3773           77650                           GOTO                                           
048151,000329: 26,3774           00051                                    EARTHMXX                              
048152,000330: 

Page 1139

048154,000332:                                                                                                  #  ..... EARTHL SUBROUTINE .....
048155,000333:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
048156,000334: 
048157,000335:                                                                                                  #  CALLING SEQUENCE
048158,000336:                                                                                                  #   L       CALL
048159,000337:                                                                                                  #   L+1             EARTHL
048160,000338: 
048161,000339:                                                                                                  #  INPUT
048162,000340:                                                                                                  #   AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
048163,000341: 
048164,000342:                                                                                                  #  OUTPUT
048165,000343:                                                                                                  #            -AX
048166,000344:                                                                                                  #    MPAC=   -AY     RADIANS B-0
048167,000345:                                                                                                  #              0
048168,000346: 
048169,000347: 06,3761                                           BANK     06                                    
048170,000348: 06,2000                                           SETLOC   EARTHLOC                              
048171,000349: 06,2000                                           BANK                                           
048172,000350: 06,3761                                           COUNT*   $$/LUROT                              
048173,000351: 
048174,000352: 06,3761           57545        EARTHL             DLOAD    DCOMP                                 
048175,000353: 06,3762           01716                                    AXO                                   
048176,000354: 06,3763           14017                           STODL    504LPL                                
048177,000355: 06,3764           01714                                    -AYO                                  
048178,000356: 06,3765           14021                           STODL    504LPL     +2                         
048179,000357: 06,3766           24007                                    LO6ZEROS                              
048180,000358: 06,3767           24023                           STOVL    504LPL     +4                         
048181,000359: 06,3770           00017                                    504LPL                                
048182,000360: 06,3771           77616                           RVQ                                            
048183,000361: 

Page 1140

048185,000363:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
048186,000364: 
048187,000365: 06,3772  12,2004               1B1                =        DP1/2                                 #  1  SCALED B-1
048188,000366: 06,3772  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
048189,000367: 06,3772  0000051               EARTHMXX           =        S2                                    #  EARTHMX, MOONMX SUBR. EXITS
048190,000368: 06,3772                        504RPR             =        0D                                    #  6 REGS   R OR RP VECTOR
048191,000369: 06,3772                        SINNODI            =        8D                                    #  2        SIN(NODI)
048192,000370: 06,3772                        DVECTR             =        8D                                    #  6        D VECTOR MOON
048193,000371: 06,3772                        CVECTR             =        8D                                    #  6        C VECTR MOON
048194,000372: 06,3772                        504AZ              =        18D                                   #  2       AZ
048195,000373: 06,3772                        TIMSUBM            =        14D                                   #  3        TIME SUB M (MOON) T+T0 IN GETAZ
048196,000374: 06,3772                        504LPL             =        14D                                   #  6        L OR LP VECTOR
048197,000375: 06,3772                        AVECTR             =        20D                                   #  6        A VECTOR (MOON)
048198,000376: 06,3772                        BVECTR             =        26D                                   #  6        B VECTOR (MOON)
048199,000377: 06,3772                        MMATRIX            =        20D                                   #  18       M MATRIX
048200,000378: 06,3772                        COB                =        32D                                   #  2        COS(B) B-1
048201,000379: 06,3772                        SOB                =        34D                                   #  2        SIN(B) B-1
048202,000380: 06,3772                        504F               =        6D                                    #  2        F (MOON)
048203,000381: 

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