Source Code

These source-code files are part of a reconstructed copy of LM131 revision 1, the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 listing.

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.

047430,000002:                                                                                                  ## Copyright:   Public domain.
047431,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
047432,000004:                                                                                                  ## Purpose:     A section of LM131 revision 1.
047433,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
047434,000006:                                                                                                  ##              release of the flight software for the Lunar Module's (LM)
047435,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13. The code has
047436,000008:                                                                                                  ##              been reconstructed from a listing of Luminary 131 and a dump
047437,000009:                                                                                                  ##              of a core rope memory module B5, part number 2010802-171,
047438,000010:                                                                                                  ##              which is the only module different between LM131 revision 1
047439,000011:                                                                                                  ##              and Luminary 131. The executable generated from this source
047440,000012:                                                                                                  ##              has been verified against the module dump, so while the names,
047441,000013:                                                                                                  ##              comments, and ordering may not be exactly correct, the
047442,000014:                                                                                                  ##              resulting binary is.
047443,000015:                                                                                                  ## Reference:   pp. 1134-1142
047444,000016:                                                                                                  ## Assembler:   yaYUL
047445,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
047446,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
047447,000019:                                                                                                  ## Mod history: 2022-10-28 MAS  Created from Luminary 131.
047448,000020: 

Page 1134

047450,000022:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
047451,000023:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
047452,000024:                                                                                                  #  EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
047453,000025:                                                                                                  #        R = MT(T) * (RP + LP X RP)      MT = M MATRIX TRANSPOSE
047454,000026: 
047455,000027:                                                                                                  #  CALLING SEQUENCE
047456,000028:                                                                                                  #        L       CALL
047457,000029:                                                                                                  #        L+1             RP-TO-R
047458,000030: 
047459,000031:                                                                                                  #  SUBROUTINES USED
047460,000032:                                                                                                  #        EARTHMX, MOONMX, EARTHL
047461,000033: 
047462,000034:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
047463,000035:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
047464,000036:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM         RADIANS B0
047465,000037: 
047466,000038:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
047467,000039: 
047468,000040:                                                                                                  #  INPUT
047469,000041:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
047470,000042:                                                                                                  #        0-5D = RP VECTOR
047471,000043:                                                                                                  #        6-7D = TIME
047472,000044: 
047473,000045:                                                                                                  #  OUTPUT
047474,000046:                                                                                                  #        MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
047475,000047: 
047476,000048: 26,2000                                           SETLOC   PLANTIN1                              
047477,000049: 26,2000                                           BANK                                           
047478,000050: 
047479,000051: 26,3716                                           COUNT*   $$/LUROT                              
047480,000052: 
047481,000053: 26,3716           46020        RP-TO-R            STQ      BHIZ                                  
047482,000054: 26,3717           00050                                    RPREXIT                               
047483,000055: 26,3720           55733                                    RPTORA                                
047484,000056: 26,3721           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
047485,000057: 26,3722           51730                                    MOONMX                                #  LP=LM FOR MOON        RADIANS B0
047486,000058: 26,3723           77775                           VLOAD                                          
047487,000059: 26,3724           02013                                    504LM                                 
047488,000060: 26,3725           53235        RPTORB             VXV      VAD                                   
047489,000061: 26,3726           00001                                    504RPR                                
047490,000062: 26,3727           00001                                    504RPR                                
047491,000063: 26,3730           52105                           VXM      GOTO                                  
047492,000064: 26,3731           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
047493,000065: 26,3732           51716                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
047494,000066: 26,3733           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
047495,000067: 26,3734           55743                                    EARTHMX                               #  M MATRIX B-1
047496,000068: 26,3735           77624                           CALL                                           
047497,000069: 26,3736           15761                                    EARTHL                                #  L VECTOR RADIANS B0
047498,000070: 26,3737           76521                           MXV      VSL1                                  #  LP=M(T)*L     RAD B-0
047499,000071: 26,3740           00025                                    MMATRIX                               

Page 1135

047501,000073: 26,3741           77650                           GOTO                                           
047502,000074: 26,3742           55725                                    RPTORB                                
047503,000075: 24,2000                                           SETLOC   PLANTIN                               
047504,000076: 24,2000                                           BANK                                           
047505,000077: 24,3700                                           COUNT*   $$/LUROT                              
047506,000078: 

Page 1136

047508,000080:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
047509,000081:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
047510,000082:                                                                                                  #  (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
047511,000083:                                                                                                  #        RP = M(T) * (R - L X R)
047512,000084: 
047513,000085:                                                                                                  #  CALLING SEQUENCE
047514,000086:                                                                                                  #        L       CALL
047515,000087:                                                                                                  #        L+1             R-TO-RP
047516,000088: 
047517,000089:                                                                                                  #  SUBROUTINES USED
047518,000090:                                                                                                  #        EARTHMX, MOONMX, EARTHL
047519,000091: 
047520,000092:                                                                                                  #  INPUT
047521,000093:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
047522,000094:                                                                                                  #        0-5D = R VECTOR
047523,000095:                                                                                                  #        6-7D = TIME
047524,000096: 
047525,000097:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
047526,000098:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
047527,000099:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM                 RADIANS B0
047528,000100: 
047529,000101:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
047530,000102: 
047531,000103:                                                                                                  #  OUTPUT
047532,000104:                                                                                                  #        MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
047533,000105: 
047534,000106: 24,3700           46020        R-TO-RP            STQ      BHIZ                                  
047535,000107: 24,3701           00050                                    RPREXIT                               
047536,000108: 24,3702           51722                                    RTORPA                                
047537,000109: 24,3703           77624                           CALL                                           
047538,000110: 24,3704           51730                                    MOONMX                                
047539,000111: 24,3705           61375                           VLOAD    VXM                                   
047540,000112: 24,3706           02013                                    504LM                                 #  LP=LM
047541,000113: 24,3707           00025                                    MMATRIX                               
047542,000114: 24,3710           77772                           VSL1                                           #  L = MT(T)*LP          RADIANS B0
047543,000115: 24,3711           51235        RTORPB             VXV      BVSU                                  
047544,000116: 24,3712           00001                                    504RPR                                
047545,000117: 24,3713           00001                                    504RPR                                
047546,000118: 24,3714           77721                           MXV                                            #  M(T)*(R-LXR)          B-2
047547,000119: 24,3715           00025                                    MMATRIX                               
047548,000120: 24,3716           40372        RPRPXXXX           VSL1     SETPD                                 
047549,000121: 24,3717           00001                                    0D                                    
047550,000122: 24,3720           77650                           GOTO                                           
047551,000123: 24,3721           00050                                    RPREXIT                               
047552,000124: 24,3722           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
047553,000125: 24,3723           55743                                    EARTHMX                               
047554,000126: 24,3724           77624                           CALL                                           
047555,000127: 24,3725           15761                                    EARTHL                                
047556,000128: 24,3726           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0)    RAD B-0
047557,000129: 24,3727           51711                                    RTORPB                                
047558,000130: 

Page 1137

047560,000132:                                                                                                  #  ..... MOONMX SUBROUTINE .....
047561,000133:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
047562,000134: 
047563,000135:                                                                                                  #  CALLING SEQUENCE
047564,000136:                                                                                                  #        L       CALL
047565,000137:                                                                                                  #        L+1             MOONMX
047566,000138: 
047567,000139:                                                                                                  #  SUBROUTINES USED
047568,000140:                                                                                                  #        NEWANGLE
047569,000141: 
047570,000142:                                                                                                  #  INPUT
047571,000143:                                                                                                  #        6-7D = TIME
047572,000144: 
047573,000145:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
047574,000146:                                                                                                  #                BSUBO, BDOT
047575,000147:                                                                                                  #                TIMSUBO, NODIO, NODDOT, FSUBO, FDOT
047576,000148:                                                                                                  #                COSI = COS(I)   B-1
047577,000149:                                                                                                  #                SINI = SIN(I)   B-1
047578,000150:                                                                                                  #                I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
047579,000151:                                                                                                  #                PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
047580,000152: 
047581,000153:                                                                                                  #  OUTPUT
047582,000154:                                                                                                  #        MMATRIX = 3X3 M MATRIX          B-1 (STORED IN VAC AREA)
047583,000155: 
047584,000156: 24,3730           40220        MOONMX             STQ      SETPD                                 
047585,000157: 24,3731           00051                                    EARTHMXX                              
047586,000158: 24,3732           00011                                    8D                                    
047587,000159: 24,3733           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
047588,000160: 24,3734           00005                                    5                                     
047589,000161: 24,3735           65345                           DLOAD    PDDL                                  #  PD 10D        8-9D=BSUBO
047590,000162: 24,3736           14017                                    BSUBO                                 #                10-11D=BDOT
047591,000163: 24,3737           14011                                    BDOT                                  
047592,000164: 24,3740           45006                           PUSH     CALL                                  #  PD 12D
047593,000165: 24,3741           53732                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B   REVS B0
047594,000166: 24,3742           71406                           PUSH     COS                                   #  PD 10D
047595,000167: 24,3743           14041                           STODL    COB                                   #  PD 8D         COS(B) B-1
047596,000168: 24,3744           77756                           SIN                                            #                SIN(B) B-1
047597,000169: 24,3745           14043                           STODL    SOB                                   #  SETUP INPUT FOR NEWANGLE
047598,000170: 24,3746           14015                                    FSUBO                                 #                        8-9D=FSUBO
047599,000171: 24,3747           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=FDOT
047600,000172: 24,3750           14007                                    FDOT                                  
047601,000173: 24,3751           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
047602,000174: 24,3752           00004                                    4                                     
047603,000175: 24,3753           53732                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
047604,000176: 24,3754           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
047605,000177: 24,3755           14013                                    NODIO                                 #                        8-9D=NODIO
047606,000178: 24,3756           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=NODDOT
047607,000179: 24,3757           14005                                    NODDOT                                #                        MPAC=T
047608,000180: 24,3760           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
047609,000181: 24,3761           00005                                    5                                     
047610,000182: 24,3762           53732                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1138

047612,000184: 24,3763           71406                           PUSH     COS                                   #  PD 10D        8-9D= NODI REVS B0
047613,000185: 24,3764           77606                           PUSH                                           #  PD 12D        10-11D= COS(NODI) B-1
047614,000186: 24,3765           00025                           STORE    AVECTR                                
047615,000187: 24,3766           76405                           DMP      SL1R                                  
047616,000188: 24,3767           00041                                    COB                                   #                        COS(NODI) B-1
047617,000189: 24,3770           14035                           STODL    BVECTR     +2                         #  PD 10D  20-25D=AVECTR=COB*SIN(NODI)
047618,000190: 24,3771           76405                           DMP      SL1R                                  #                        SOB*SIN(NODI)
047619,000191: 24,3772           00043                                    SOB                                   
047620,000192: 24,3773           14037                           STODL    BVECTR     +4                         #  PD 8D
047621,000193: 24,3774           41556                           SIN      PUSH                                  #  PD 10D                -SIN(NODI) B-1
047622,000194: 24,3775           52076                           DCOMP    GOTO                                  #          26-31D=BVECTR=COV*COS(NODI)
047623,000195: 24,3776           53653                                    MOONMXA                               
047624,000196: 
047625,000197: 25,3653                                           BANK     25                                    
047626,000198: 25,2000                                           SETLOC   PLANTIN3                              
047627,000199: 25,2000                                           BANK                                           
047628,000200: 25,3653                                           COUNT*   $$/LUROT                              
047629,000201: 
047630,000202: 25,3653           14033        MOONMXA            STODL    BVECTR                                #  PD 8D                 SOB*COS(NODI)
047631,000203: 25,3654           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
047632,000204: 25,3655           14007                           STODL    504F                                  
047633,000205: 25,3656           76405                           DMP      SL1R                                  
047634,000206: 25,3657           00041                                    COB                                   
047635,000207: 25,3660           14027                           STODL    AVECTR     +2                         
047636,000208: 25,3661           00011                                    SINNODI                               #  8-9D=SIN(NODI) B-1
047637,000209: 25,3662           76405                           DMP      SL1R                                  
047638,000210: 25,3663           00043                                    SOB                                   
047639,000211: 25,3664           14031                           STODL    AVECTR     +4                         #                        0
047640,000212: 25,3665           06524                                    HI6ZEROS                              #        8-13D= CVECTR=  -SOB B-1
047641,000213: 25,3666           57525                           PDDL     DCOMP                                 #  PD 10D                COB
047642,000214: 25,3667           00043                                    SOB                                   
047643,000215: 25,3670           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
047644,000216: 25,3671           00041                                    COB                                   
047645,000217: 25,3672           00033                                    BVECTR                                
047646,000218: 25,3673           63361                           VXSC     PDVL                                  #  PD 20D        BVECTR*SINI B-2
047647,000219: 25,3674           14003                                    SINI                                  
047648,000220: 25,3675           00011                                    CVECTR                                
047649,000221: 25,3676           53361                           VXSC     VAD                                   #  PD 14D        CVECTR*COSI B-2
047650,000222: 25,3677           14001                                    COSI                                  
047651,000223: 25,3700           77772                           VSL1                                           
047652,000224: 25,3701           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI B-1
047653,000225: 25,3702           63361                           VXSC     PDVL                                  #  PD 14D
047654,000226: 25,3703           14003                                    SINI                                  #                CVECTR*SINI B-2
047655,000227: 25,3704           00033                                    BVECTR                                
047656,000228: 25,3705           52361                           VXSC     VSU                                   #  PD 8D         BVECTR*COSI B-2
047657,000229: 25,3706           14001                                    COSI                                  
047658,000230: 25,3707           65372                           VSL1     PDDL                                  #  PD 14D
047659,000231: 25,3710           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
047660,000232: 25,3711           74346                           COS      VXSC                                  
047661,000233: 25,3712           00011                                    DVECTR                                
047662,000234: 25,3713           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF B-2

Page 1139

047664,000236: 25,3714           00007                                    504F                                  
047665,000237: 25,3715           52361                           VXSC     VSU                                   #  PD 14D        AVECTR*SINF B-2
047666,000238: 25,3716           00025                                    AVECTR                                
047667,000239: 25,3717           77772                           VSL1                                           
047668,000240: 25,3720           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF B-1
047669,000241: 25,3721           00007                                    504F                                  
047670,000242: 25,3722           74356                           SIN      VXSC                                  #  PD 8D
047671,000243: 25,3723           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
047672,000244: 25,3724           00007                                    504F                                  
047673,000245: 25,3725           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
047674,000246: 25,3726           00025                                    AVECTR                                
047675,000247: 25,3727           57572                           VSL1     VCOMP                                 
047676,000248: 25,3730           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF) B-1
047677,000249: 25,3731           00051                                    EARTHMXX                              
047678,000250: 
047679,000251:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
047680,000252:                                                                                                  #  8-9D= XO (REVS B-0), PUSHLOC SET AT 12D
047681,000253:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
047682,000254:                                                                                                  #                        AND B+27 FOR FDOT
047683,000255:                                                                                                  #  X1=DIFFERENCE IN 23 AND SCALING OF XDOT, =0 FOR WEARTH,5 FOR NODDOT AND
047684,000256:                                                                                                  #                                        BDOT AND 4 FOR FDOT
047685,000257:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
047686,000258: 
047687,000259: 25,3732           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
047688,000260: 25,3733           00007                                    6D                                    
047689,000261: 25,3734           20617                                    14D                                   
047690,000262: 25,3735           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
047691,000263: 25,3736           01707                                    TIMSUBO                               
047692,000264: 25,3737           00155                                    MPAC                                  
047693,000265: 25,3740           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
047694,000266: 25,3741           00020                                    TIMSUBM    +1                         
047695,000267: 25,3742           77605                           DMP                                            #  PD 10D        MULT BY XDOT IN 10-11D
047696,000268: 25,3743           43257                           SL*      DAD                                   #  PD 8D         ADD XO IN 8-9D AFTER SHIFTING
047697,000269: 25,3744           20206                                    5,1                                   #                SUCH THAT SCALING IS B-0
047698,000270: 25,3745           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
047699,000271: 25,3746           00017                                    TIMSUBM                               
047700,000272: 25,3747           41261                           SL       DMP                                   
047701,000273: 25,3750           20212                                    9D                                    
047702,000274: 25,3751           00013                                    10D                                   #  XDOT
047703,000275: 25,3752           43257                           SL*      DAD                                   #  PD 8D         SHIFT SUCH THAT THIS PART OF X
047704,000276: 25,3753           20213                                    10D,1                                 #                IS SCALED REVS/CSEC B-0
047705,000277: 25,3754           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
047706,000278: 25,3755           53756                                    +1                                    #  INSTRUCTION BEFORE EXITING
047707,000279: 25,3756           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)       REVS B0
047708,000280: 

Page 1140

047710,000282:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
047711,000283:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
047712,000284: 
047713,000285:                                                                                                  #  CALLING SEQUENCE
047714,000286:                                                                                                  #        L       CALL
047715,000287:                                                                                                  #        L+1             EARTHMX
047716,000288: 
047717,000289:                                                                                                  #  SUBROUTINES USED
047718,000290:                                                                                                  #        NEWANGLE
047719,000291: 
047720,000292:                                                                                                  #  INPUT
047721,000293:                                                                                                  #        INPUT AVAILABLE FROM LAUNCH DATA        AZO REVS B-0
047722,000294:                                                                                                  #                                                TEPHEM CSEC B-42
047723,000295:                                                                                                  #        6-7D= TIME CSEC B-28
047724,000296: 
047725,000297:                                                                                                  #  OUTPUT
047726,000298:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1 (STORED IN VAC AREA)
047727,000299: 
047728,000300: 26,3743                                           BANK     26                                    
047729,000301: 26,2000                                           SETLOC   PLANTIN1                              
047730,000302: 26,2000                                           BANK                                           
047731,000303: 26,3743                                           COUNT*   $$/LUROT                              
047732,000304: 
047733,000305: 26,3743           40220        EARTHMX            STQ      SETPD                                 #  SET 8-9D=AZO
047734,000306: 26,3744           00051                                    EARTHMXX                              
047735,000307: 26,3745           00011                                    8D                                    #  10-11D=WEARTH
047736,000308: 26,3746           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
047737,000309: 26,3747           00000                                    0                                     
047738,000310: 26,3750           65345                           DLOAD    PDDL                                  #  LEAVING PD SET AT 12D FOR NEWANGLE
047739,000311: 26,3751           01712                                    AZO                                   
047740,000312: 26,3752           14021                                    WEARTH                                
047741,000313: 26,3753           45006                           PUSH     CALL                                  
047742,000314: 26,3754           53732                                    NEWANGLE                              
047743,000315: 26,3755           41401                           SETPD    PUSH                                  #  18-19D=504AZ
047744,000316: 26,3756           00023                                    18D                                   #                         COS(AZ)   SIN(AZ)     0
047745,000317: 26,3757           65346                           COS      PDDL                                  #  20-37D=  MMATRIX=     -SIN(AZ)   COS(AZ)     0    B-1
047746,000318: 26,3760           00023                                    504AZ                                 #                            0         0        1
047747,000319: 26,3761           65356                           SIN      PDDL                                  
047748,000320: 26,3762           06524                                    HI6ZEROS                              
047749,000321: 26,3763           73525                           PDDL     SIN                                   
047750,000322: 26,3764           00023                                    504AZ                                 
047751,000323: 26,3765           65276                           DCOMP    PDDL                                  
047752,000324: 26,3766           00023                                    504AZ                                 
047753,000325: 26,3767           63346                           COS      PDVL                                  
047754,000326: 26,3770           06524                                    HI6ZEROS                              
047755,000327: 26,3771           41525                           PDDL     PUSH                                  
047756,000328: 26,3772           06522                                    HIDPHALF                              
047757,000329: 26,3773           77650                           GOTO                                           
047758,000330: 26,3774           00051                                    EARTHMXX                              
047759,000331: 

Page 1141

047761,000333:                                                                                                  #  ..... EARTHL SUBROUTINE .....
047762,000334:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
047763,000335: 
047764,000336:                                                                                                  #  CALLING SEQUENCE
047765,000337:                                                                                                  #        L       CALL
047766,000338:                                                                                                  #        L+1             EARTHL
047767,000339: 
047768,000340:                                                                                                  #  INPUT
047769,000341:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
047770,000342: 
047771,000343:                                                                                                  #  OUTPUT
047772,000344:                                                                                                  #                -AX
047773,000345:                                                                                                  #        MPAC=   -AY     RADIANS B-0
047774,000346:                                                                                                  #                  0
047775,000347: 
047776,000348: 06,3761                                           BANK     06                                    
047777,000349: 06,2000                                           SETLOC   EARTHLOC                              
047778,000350: 06,2000                                           BANK                                           
047779,000351: 06,3761                                           COUNT*   $$/LUROT                              
047780,000352: 
047781,000353: 06,3761           57545        EARTHL             DLOAD    DCOMP                                 
047782,000354: 06,3762           01716                                    AXO                                   
047783,000355: 06,3763           14017                           STODL    504LPL                                
047784,000356: 06,3764           01714                                    -AYO                                  
047785,000357: 06,3765           14021                           STODL    504LPL     +2                         
047786,000358: 06,3766           24007                                    LO6ZEROS                              
047787,000359: 06,3767           24023                           STOVL    504LPL     +4                         
047788,000360: 06,3770           00017                                    504LPL                                
047789,000361: 06,3771           77616                           RVQ                                            
047790,000362: 

Page 1142

047792,000364:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
047793,000365: 
047794,000366: 06,3772  12,2004               1B1                =        DP1/2                                 #  1 SCALED B-1
047795,000367: 06,3772  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
047796,000368: 06,3772  0000051               EARTHMXX           =        S2                                    #  EARTHMX, MOONMX SUBR. EXITS
047797,000369: 06,3772                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
047798,000370: 06,3772                        SINNODI            =        8D                                    #  2             SIN(NODI)
047799,000371: 06,3772                        DVECTR             =        8D                                    #  6             D VECTOR MOON
047800,000372: 06,3772                        CVECTR             =        8D                                    #  6             C VECTR MOON
047801,000373: 06,3772                        504AZ              =        18D                                   #  2             AZ
047802,000374: 06,3772                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
047803,000375: 06,3772                        504LPL             =        14D                                   #  6             L OR LP VECTOR
047804,000376: 06,3772                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
047805,000377: 06,3772                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
047806,000378: 06,3772                        MMATRIX            =        20D                                   #  18            M MATRIX
047807,000379: 06,3772                        COB                =        32D                                   #  2             COS(B) B-1
047808,000380: 06,3772                        SOB                =        34D                                   #  2             SIN(B) B-1
047809,000381: 06,3772                        504F               =        6D                                    #  2             F(MOON)
047810,000382: 

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