Source Code

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

The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 178 listing would be different.

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

048041,000002:                                                                                                  ## Copyright:   Public domain.
048042,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
048043,000004:                                                                                                  ## Purpose:     A section of Luminary revision 178.
048044,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
048045,000006:                                                                                                  ##              release of the flight software for the Lunar Module's
048046,000007:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
048047,000008:                                                                                                  ##              code has been recreated from copies of Zerlina 56, Luminary
048048,000009:                                                                                                  ##              210, and Luminary 131, as well as many Luminary memos.
048049,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
048050,000011:                                                                                                  ##              exactly match those specified for Luminary 178 in NASA
048051,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
048052,000013:                                                                                                  ##              that the reconstruction is correct.
048053,000014:                                                                                                  ## Reference:   pp. 1131-1139
048054,000015:                                                                                                  ## Assembler:   yaYUL
048055,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
048056,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
048057,000018:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Zerlina 56.
048058,000019: 

Page 1131

048060,000021:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
048061,000022:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM,EITHER
048062,000023:                                                                                                  #   EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
048063,000024: 
048064,000025:                                                                                                  #   R=MT(T)*(RP+LPXRP)    MT = M MATRIX TRANSPOSE
048065,000026: 
048066,000027:                                                                                                  #  CALLING SEQUENCE
048067,000028:                                                                                                  #   L       CALL
048068,000029:                                                                                                  #   L+1            RP-TO-R
048069,000030: 
048070,000031:                                                                                                  #  SUBROUTINES USED
048071,000032:                                                                                                  #   EARTHMX,MOONMX,EARTHL
048072,000033: 
048073,000034:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
048074,000035:                                                                                                  #      504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
048075,000036:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM   RADIANS  B0
048076,000037:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
048077,000038: 
048078,000039:                                                                                                  #  INPUT
048079,000040:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
048080,000041:                                                                                                  #   0-5D= RP VECTOR
048081,000042:                                                                                                  #   6-7D= TIME
048082,000043: 
048083,000044:                                                                                                  #  OUTPUT
048084,000045:                                                                                                  #   MPAC= R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
048085,000046: 
048086,000047: 26,2000                                           SETLOC   PLANTIN1                              
048087,000048: 26,2000                                           BANK                                           
048088,000049: 
048089,000050: 26,3720                                           COUNT*   $$/LUROT                              
048090,000051: 
048091,000052: 26,3720           46020        RP-TO-R            STQ      BHIZ                                  
048092,000053: 26,3721           00050                                    RPREXIT                               
048093,000054: 26,3722           55735                                    RPTORA                                
048094,000055: 26,3723           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
048095,000056: 26,3724           51672                                    MOONMX                                #  LP=LM FOR MOON  RADIANS B0
048096,000057: 26,3725           77775                           VLOAD                                          
048097,000058: 26,3726           02013                                    504LM                                 
048098,000059: 26,3727           53235        RPTORB             VXV      VAD                                   
048099,000060: 26,3730           00001                                    504RPR                                
048100,000061: 26,3731           00001                                    504RPR                                
048101,000062: 26,3732           52105                           VXM      GOTO                                  
048102,000063: 26,3733           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
048103,000064: 26,3734           51660                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
048104,000065: 26,3735           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
048105,000066: 26,3736           55745                                    EARTHMX                               #  M MATRIX B-1
048106,000067: 26,3737           77624                           CALL                                           
048107,000068: 26,3740           15761                                    EARTHL                                #  L VECTOR RADIANS B0
048108,000069: 26,3741           76521                           MXV      VSL1                                  #  LP=M(T)*L  RAD B-0
048109,000070: 26,3742           00025                                    MMATRIX                               

Page 1132

048111,000072: 26,3743           77650                           GOTO                                           
048112,000073: 26,3744           55727                                    RPTORB                                
048113,000074: 24,2000                                           SETLOC   PLANTIN                               
048114,000075: 24,2000                                           BANK                                           
048115,000076: 24,3642                                           COUNT*   $$/LUROT                              
048116,000077: 

Page 1133

048118,000079:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
048119,000080:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
048120,000081:                                                                                                  #   (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
048121,000082: 
048122,000083:                                                                                                  #   RP=M(T)*(R-LXR)
048123,000084: 
048124,000085:                                                                                                  #  CALLING SEQUENCE
048125,000086:                                                                                                  #   L       CALL
048126,000087:                                                                                                  #   L+1            R-TO-RP
048127,000088: 
048128,000089:                                                                                                  #  SUBROUTINES USED
048129,000090:                                                                                                  #   EARTHMX,MOONMX,EARTHL
048130,000091: 
048131,000092:                                                                                                  #  INPUT
048132,000093:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
048133,000094:                                                                                                  #   0-5D= R VECTOR
048134,000095:                                                                                                  #   6-7D= TIME
048135,000096: 
048136,000097:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
048137,000098:                                                                                                  #      504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
048138,000099:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM   RADIANS B0
048139,000100:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
048140,000101: 
048141,000102:                                                                                                  #  OUTPUT
048142,000103:                                                                                                  #   MPAC=RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
048143,000104: 
048144,000105: 24,3642           46020        R-TO-RP            STQ      BHIZ                                  
048145,000106: 24,3643           00050                                    RPREXIT                               
048146,000107: 24,3644           51664                                    RTORPA                                
048147,000108: 24,3645           77624                           CALL                                           
048148,000109: 24,3646           51672                                    MOONMX                                
048149,000110: 24,3647           61375                           VLOAD    VXM                                   
048150,000111: 24,3650           02013                                    504LM                                 #  LP=LM
048151,000112: 24,3651           00025                                    MMATRIX                               
048152,000113: 24,3652           77772                           VSL1                                           #   L=MT(T)*LP  RADIANS B0
048153,000114: 24,3653           51235        RTORPB             VXV      BVSU                                  
048154,000115: 24,3654           00001                                    504RPR                                
048155,000116: 24,3655           00001                                    504RPR                                
048156,000117: 24,3656           77721                           MXV                                            #  M(T)*(R-LXR) B-2
048157,000118: 24,3657           00025                                    MMATRIX                               
048158,000119: 24,3660           40372        RPRPXXXX           VSL1     SETPD                                 
048159,000120: 24,3661           00001                                    0D                                    
048160,000121: 24,3662           77650                           GOTO                                           
048161,000122: 24,3663           00050                                    RPREXIT                               
048162,000123: 24,3664           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
048163,000124: 24,3665           55745                                    EARTHMX                               
048164,000125: 24,3666           77624                           CALL                                           
048165,000126: 24,3667           15761                                    EARTHL                                
048166,000127: 24,3670           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0) RAD B-0
048167,000128: 24,3671           51653                                    RTORPB                                
048168,000129: 

Page 1134

048170,000131:                                                                                                  #  ..... MOONMX SUBROUTINE .....
048171,000132:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
048172,000133: 
048173,000134:                                                                                                  #  CALLING SEQUENCE
048174,000135:                                                                                                  #   L       CALL
048175,000136:                                                                                                  #   L+1            MOONMX
048176,000137: 
048177,000138:                                                                                                  #  SUBROUTINES USED
048178,000139:                                                                                                  #   NEWANGLE
048179,000140: 
048180,000141:                                                                                                  #  INPUT
048181,000142:                                                                                                  #   6-7D= TIME
048182,000143:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
048183,000144:                                                                                                  #      BSUBO,BDOT
048184,000145:                                                                                                  #      TIMSUBO,NODIO,NODDOT,FSUBO,FDOT
048185,000146:                                                                                                  #      COSI= COS(I) B-1
048186,000147:                                                                                                  #      SINI= SIN(I) B-1
048187,000148:                                                                                                  #        I  IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
048188,000149:                                                                                                  #        PLANE OF THE ECLIPTIC  (1 DEGREE  32.1 MINUTES)
048189,000150: 
048190,000151:                                                                                                  #  OUTPUT
048191,000152:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
048192,000153: 
048193,000154: 24,3672           40220        MOONMX             STQ      SETPD                                 
048194,000155: 24,3673           00051                                    EARTHMXX                              
048195,000156: 24,3674           00011                                    8D                                    
048196,000157: 24,3675           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
048197,000158: 24,3676           00005                                    5                                     
048198,000159: 24,3677           65345                           DLOAD    PDDL                                  #  PD 10D            8-9D=BSUBO
048199,000160: 24,3700           14017                                    BSUBO                                 #                    10-11D= BDOT
048200,000161: 24,3701           14011                                    BDOT                                  
048201,000162: 24,3702           45006                           PUSH     CALL                                  #  PD 12D
048202,000163: 24,3703           51741                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B  REVS B0
048203,000164: 24,3704           71406                           PUSH     COS                                   #  PD 10D
048204,000165: 24,3705           14041                           STODL    COB                                   #  PD 8D    COS(B) B-1
048205,000166: 24,3706           77756                           SIN                                            #           SIN(B) B-1
048206,000167: 24,3707           14043                           STODL    SOB                                   #            SETUP INPUT FOR NEWANGLE
048207,000168: 24,3710           14015                                    FSUBO                                 #                      8-9D=FSUBO
048208,000169: 24,3711           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=FDOT
048209,000170: 24,3712           14007                                    FDOT                                  
048210,000171: 24,3713           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
048211,000172: 24,3714           00004                                    4                                     
048212,000173: 24,3715           51741                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
048213,000174: 24,3716           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
048214,000175: 24,3717           14013                                    NODIO                                 #                      8-9D=NODIO
048215,000176: 24,3720           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=NODDOT
048216,000177: 24,3721           14005                                    NODDOT                                #                      MPAC=T
048217,000178: 24,3722           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
048218,000179: 24,3723           00005                                    5                                     
048219,000180: 24,3724           51741                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1135

048221,000182: 24,3725           71406                           PUSH     COS                                   #  PD 10D   8-9D= NODI  REVS  B0
048222,000183: 24,3726           77606                           PUSH                                           #  PD 12D 10-11D= COS(NODI)  B-1
048223,000184: 24,3727           00025                           STORE    AVECTR                                
048224,000185: 24,3730           76405                           DMP      SL1R                                  
048225,000186: 24,3731           00041                                    COB                                   #                          COS(NODI)    B-1
048226,000187: 24,3732           14035                           STODL    BVECTR     +2                         #  PD 10D   20-25D=AVECTR= COB*SIN(NODI)
048227,000188: 24,3733           76405                           DMP      SL1R                                  #                          SOB*SIN(NODI)
048228,000189: 24,3734           00043                                    SOB                                   
048229,000190: 24,3735           14037                           STODL    BVECTR     +4                         #  PD 8D
048230,000191: 24,3736           41556                           SIN      PUSH                                  #  PD 10D                 -SIN(NODI)   B-1
048231,000192: 24,3737           52076                           DCOMP    GOTO                                  #           26-31D=BVECTR= COV*COS(NODI)
048232,000193: 24,3740           53703                                    MOONMXA                               
048233,000194: 25,3703                                           BANK     25                                    
048234,000195: 25,2000                                           SETLOC   PLANTIN3                              
048235,000196: 25,2000                                           BANK                                           
048236,000197: 25,3703                                           COUNT*   $$/LUROT                              
048237,000198: 
048238,000199: 25,3703           14033        MOONMXA            STODL    BVECTR                                #  PD 8D                    SOB*COS(NODI)
048239,000200: 25,3704           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
048240,000201: 25,3705           14007                           STODL    504F                                  
048241,000202: 25,3706           76405                           DMP      SL1R                                  
048242,000203: 25,3707           00041                                    COB                                   
048243,000204: 25,3710           14027                           STODL    AVECTR     +2                         
048244,000205: 25,3711           00011                                    SINNODI                               #  8-9D=SIN(NODI)  B-1
048245,000206: 25,3712           76405                           DMP      SL1R                                  
048246,000207: 25,3713           00043                                    SOB                                   
048247,000208: 25,3714           14031                           STODL    AVECTR     +4                         #                           0
048248,000209: 25,3715           06470                                    HI6ZEROS                              #          8-13D= CVECTR= -SOB  B-1
048249,000210: 25,3716           57525                           PDDL     DCOMP                                 #  PD 10D                  COB
048250,000211: 25,3717           00043                                    SOB                                   
048251,000212: 25,3720           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
048252,000213: 25,3721           00041                                    COB                                   
048253,000214: 25,3722           00033                                    BVECTR                                
048254,000215: 25,3723           63361                           VXSC     PDVL                                  #  PD 20D         BVECTR*SINI  B-2
048255,000216: 25,3724           14003                                    SINI                                  
048256,000217: 25,3725           00011                                    CVECTR                                
048257,000218: 25,3726           53361                           VXSC     VAD                                   #  PD 14D         CVECTR*COSI  B-2
048258,000219: 25,3727           14001                                    COSI                                  
048259,000220: 25,3730           77772                           VSL1                                           
048260,000221: 25,3731           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI  B-1
048261,000222: 25,3732           63361                           VXSC     PDVL                                  #  PD 14D
048262,000223: 25,3733           14003                                    SINI                                  #                 CVECTR*SINI  B-2
048263,000224: 25,3734           00033                                    BVECTR                                
048264,000225: 25,3735           52361                           VXSC     VSU                                   #  PD 8D          BVECTR*COSI  B-2
048265,000226: 25,3736           14001                                    COSI                                  
048266,000227: 25,3737           65372                           VSL1     PDDL                                  #  PD 14D
048267,000228: 25,3740           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
048268,000229: 25,3741           74346                           COS      VXSC                                  
048269,000230: 25,3742           00011                                    DVECTR                                
048270,000231: 25,3743           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF  B-2

Page 1136

048272,000233: 25,3744           00007                                    504F                                  
048273,000234: 25,3745           52361                           VXSC     VSU                                   #  PD 14D          AVECTR*SINF  B-2
048274,000235: 25,3746           00025                                    AVECTR                                
048275,000236: 25,3747           77772                           VSL1                                           
048276,000237: 25,3750           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF  B-1
048277,000238: 25,3751           00007                                    504F                                  
048278,000239: 25,3752           74356                           SIN      VXSC                                  #  PD 8D
048279,000240: 25,3753           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
048280,000241: 25,3754           00007                                    504F                                  
048281,000242: 25,3755           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
048282,000243: 25,3756           00025                                    AVECTR                                
048283,000244: 25,3757           57572                           VSL1     VCOMP                                 
048284,000245: 25,3760           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF)  B-1
048285,000246: 25,3761           00051                                    EARTHMXX                              
048286,000247:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
048287,000248:                                                                                                  #  8-9D= XO (REVS B-0),PUSHLOC SET AT 12D
048288,000249:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
048289,000250:                                                                                                  #                          AND B+27 FOR FDOT
048290,000251:                                                                                                  #   X1=DIFFERENCE IN 23 AND SCALING OF XDOT,=0 FOR WEARTH,5 FOR NODDOT AND
048291,000252:                                                                                                  #                                           BDOT AND 4 FOR FDOT
048292,000253:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
048293,000254: 
048294,000255: 24,3741                                           BANK     24                                    
048295,000256: 24,2000                                           SETLOC   PLANTIN                               
048296,000257: 24,2000                                           BANK                                           
048297,000258: 
048298,000259: 24,3741           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
048299,000260: 24,3742           00007                                    6D                                    
048300,000261: 24,3743           20617                                    14D                                   
048301,000262: 24,3744           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
048302,000263: 24,3745           01707                                    TIMSUBO                               
048303,000264: 24,3746           00155                                    MPAC                                  
048304,000265: 24,3747           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
048305,000266: 24,3750           00020                                    TIMSUBM    +1                         
048306,000267: 24,3751           77605                           DMP                                            #  PD 10D  MULT BY XDOT IN 10-11D
048307,000268: 24,3752           43257                           SL*      DAD                                   #  PD 8D   ADD XO IN 8-9D AFTER SHIFTING
048308,000269: 24,3753           20206                                    5,1                                   #          SUCH THAT SCALING IS B-0
048309,000270: 24,3754           67206                           PUSH     SLOAD                                 #  PD 10D SAVE PARTIAL (X0+XDOT*T) IN 8-9D
048310,000271: 24,3755           00017                                    TIMSUBM                               
048311,000272: 24,3756           41261                           SL       DMP                                   
048312,000273: 24,3757           20212                                    9D                                    
048313,000274: 24,3760           00013                                    10D                                   #  XDOT
048314,000275: 24,3761           43257                           SL*      DAD                                   #  PD 8D   SHIFT SUCH THAT THIS PART OF X
048315,000276: 24,3762           20213                                    10D,1                                 #          IS SCALED REVS/CSEC B-0
048316,000277: 24,3763           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
048317,000278: 24,3764           51765                                    +1                                    #  INSTRUCTION BEFORE EXITING
048318,000279: 24,3765           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)  REVS B0
048319,000280: 

Page 1137

048321,000282:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
048322,000283:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
048323,000284: 
048324,000285:                                                                                                  #  CALLING SEQUENCE
048325,000286:                                                                                                  #   L       CALL
048326,000287:                                                                                                  #   L+1            EARTHMX
048327,000288: 
048328,000289:                                                                                                  #  SUBROUTINES USED
048329,000290:                                                                                                  #   NEWANGLE
048330,000291: 
048331,000292:                                                                                                  #  INPUT
048332,000293:                                                                                                  #     INPUT AVAILABLE FROM LAUNCH DATA     AZO  REVS B-0
048333,000294:                                                                                                  #                                          TEPHEM  CSEC B-42
048334,000295:                                                                                                  #   6-7D= TIME CSEC B-28
048335,000296: 
048336,000297:                                                                                                  #  OUTPUT
048337,000298:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
048338,000299: 
048339,000300: 26,3745                                           BANK     26                                    
048340,000301: 26,2000                                           SETLOC   PLANTIN1                              
048341,000302: 26,2000                                           BANK                                           
048342,000303: 26,3745                                           COUNT*   $$/LUROT                              
048343,000304: 
048344,000305: 26,3745           40220        EARTHMX            STQ      SETPD                                 #  SET   8-9D=AZO
048345,000306: 26,3746           00051                                    EARTHMXX                              
048346,000307: 26,3747           00011                                    8D                                    #  10-11D=WEARTH
048347,000308: 26,3750           77770                           AXT,1                                          #  FOR SL 5, AND SL 10  IN NEWANGLE
048348,000309: 26,3751           00000                                    0                                     
048349,000310: 26,3752           65345                           DLOAD    PDDL                                  #    LEAVING PD SET AT 12D FOR NEWANGLE
048350,000311: 26,3753           14023                                    AZO                                   
048351,000312: 26,3754           14021                                    WEARTH                                
048352,000313: 26,3755           45006                           PUSH     CALL                                  
048353,000314: 26,3756           51741                                    NEWANGLE                              
048354,000315: 26,3757           41401                           SETPD    PUSH                                  #  18-19D=504AZ
048355,000316: 26,3760           00023                                    18D                                   #                     COS(AZ) SIN(AZ) 0
048356,000317: 26,3761           65346                           COS      PDDL                                  #  20-37D=  MMATRIX= -SIN(AZ) COS(AZ) 0 B-1
048357,000318: 26,3762           00023                                    504AZ                                 #                      0       0      1
048358,000319: 26,3763           65356                           SIN      PDDL                                  
048359,000320: 26,3764           06470                                    HI6ZEROS                              
048360,000321: 26,3765           73525                           PDDL     SIN                                   
048361,000322: 26,3766           00023                                    504AZ                                 
048362,000323: 26,3767           65276                           DCOMP    PDDL                                  
048363,000324: 26,3770           00023                                    504AZ                                 
048364,000325: 26,3771           63346                           COS      PDVL                                  
048365,000326: 26,3772           06470                                    HI6ZEROS                              
048366,000327: 26,3773           41525                           PDDL     PUSH                                  
048367,000328: 26,3774           06466                                    HIDPHALF                              
048368,000329: 26,3775           77650                           GOTO                                           
048369,000330: 26,3776           00051                                    EARTHMXX                              
048370,000331: 

Page 1138

048372,000333:                                                                                                  #  ..... EARTHL SUBROUTINE .....
048373,000334:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
048374,000335: 
048375,000336:                                                                                                  #  CALLING SEQUENCE
048376,000337:                                                                                                  #   L       CALL
048377,000338:                                                                                                  #   L+1            EARTHL
048378,000339: 
048379,000340:                                                                                                  #  INPUT
048380,000341:                                                                                                  #   AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
048381,000342: 
048382,000343:                                                                                                  #  OUTPUT
048383,000344:                                                                                                  #            -AX
048384,000345:                                                                                                  #    MPAC=   -AY    RADIANS B-0
048385,000346:                                                                                                  #              0
048386,000347: 
048387,000348: 06,3761                                           BANK     06                                    
048388,000349: 06,2000                                           SETLOC   EARTHLOC                              
048389,000350: 06,2000                                           BANK                                           
048390,000351: 06,3761                                           COUNT*   $$/LUROT                              
048391,000352: 
048392,000353: 06,3761           57545        EARTHL             DLOAD    DCOMP                                 
048393,000354: 06,3762           01714                                    AXO                                   
048394,000355: 06,3763           14017                           STODL    504LPL                                
048395,000356: 06,3764           01712                                    -AYO                                  
048396,000357: 06,3765           14021                           STODL    504LPL     +2                         
048397,000358: 06,3766           24007                                    LO6ZEROS                              
048398,000359: 06,3767           24023                           STOVL    504LPL     +4                         
048399,000360: 06,3770           00017                                    504LPL                                
048400,000361: 06,3771           77616                           RVQ                                            
048401,000362: 

Page 1139

048403,000364:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
048404,000365: 06,3772  12,2004               1B1                =        DP1/2                                 #  1  SCALED B-1
048405,000366: 06,3772  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
048406,000367: 06,3772  0000051               EARTHMXX           =        S2                                    #  EARTHMX,MOONMX SUBR. EXITS
048407,000368: 06,3772                        504RPR             =        0D                                    #  6 REGS  R OR RP VECTOR
048408,000369: 06,3772                        SINNODI            =        8D                                    #  2       SIN(NODI)
048409,000370: 06,3772                        DVECTR             =        8D                                    #  6       D VECTOR MOON
048410,000371: 06,3772                        CVECTR             =        8D                                    #  6       C VECTR MOON
048411,000372: 06,3772                        504AZ              =        18D                                   #  2      AZ
048412,000373: 06,3772                        TIMSUBM            =        14D                                   #  3       TIME SUB M (MOON) T+T0 IN GETAZ
048413,000374: 06,3772                        504LPL             =        14D                                   #  6       L OR LP VECTOR
048414,000375: 06,3772                        AVECTR             =        20D                                   #  6       A VECTOR (MOON)
048415,000376: 06,3772                        BVECTR             =        26D                                   #  6       B VECTOR (MOON)
048416,000377: 06,3772                        MMATRIX            =        20D                                   #  18      M MATRIX
048417,000378: 06,3772                        COB                =        32D                                   #  2       COS(B) B-1
048418,000379: 06,3772                        SOB                =        34D                                   #  2       SIN(B) B-1
048419,000380: 06,3772                        504F               =        6D                                    #  2       F(MOON)

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