Source Code

These source-code files are part of a reconstructed copy of Comanche 72/3 (AKA Manche72 revision 3), the final, flown mission release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

The starting point was the source code of Comanche 72 (itself previously reconstructed). Comanche 72 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 72 and 72/3. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72/3 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

051836,000002:                                                                                                  ## Copyright:   Public domain.
051837,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
051838,000004:                                                                                                  ## Purpose:     A section of Manche72 revision 3.
051839,000005:                                                                                                  ##              It is part of the reconstructed source code for the final, flown
051840,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
051841,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
051842,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
051843,000009:                                                                                                  ##              from a reconstructed copy of Comanche 072. It has been adapted
051844,000010:                                                                                                  ##              such that the resulting bugger words exactly match those
051845,000011:                                                                                                  ##              specified for Manche72 revision 3 in NASA drawing 2021153G,
051846,000012:                                                                                                  ##              which gives relatively high confidence that the reconstruction
051847,000013:                                                                                                  ##              is correct.
051848,000014:                                                                                                  ## Assembler:   yaYUL
051849,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
051850,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051851,000017:                                                                                                  ## Mod history: 2024-05-19 MAS  Created from Comanche 072.
051852,000018: 
051853,000019:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
051854,000020:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
051855,000021:                                                                                                  #  EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
051856,000022:                                                                                                  #        R = MT(T) * (RP + LP X RP)      MT = M MATRIX TRANSPOSE
051857,000023: 
051858,000024:                                                                                                  #  CALLING SEQUENCE
051859,000025:                                                                                                  #        L       CALL
051860,000026:                                                                                                  #        L+1             RP-TO-R
051861,000027: 
051862,000028:                                                                                                  #  SUBROUTINES USED
051863,000029:                                                                                                  #        EARTHMX, MOONMX, EARTHL
051864,000030: 
051865,000031:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
051866,000032:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
051867,000033:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM         RADIANS B0
051868,000034: 
051869,000035:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
051870,000036: 
051871,000037:                                                                                                  #  INPUT
051872,000038:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
051873,000039:                                                                                                  #        0-5D = RP VECTOR
051874,000040:                                                                                                  #        6-7D = TIME
051875,000041: 
051876,000042:                                                                                                  #  OUTPUT
051877,000043:                                                                                                  #        MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
051878,000044: 
051879,000045: 26,2000                                           SETLOC   PLANTIN                               
051880,000046: 26,2000                                           BANK                                           
051881,000047: 
051882,000048: 26,3343                                           COUNT*   $$/LUROT                              
051883,000049: 
051884,000050: 26,3343           46020        RP-TO-R            STQ      BHIZ                                  
051885,000051: 26,3344           00050                                    RPREXIT                               
051886,000052: 26,3345           55360                                    RPTORA                                
051887,000053: 26,3346           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
051888,000054: 26,3347           55420                                    MOONMX                                #  LP=LM FOR MOON        RADIANS B0
051889,000055: 26,3350           77775                           VLOAD                                          
051890,000056: 26,3351           02012                                    504LM                                 
051891,000057: 26,3352           53235        RPTORB             VXV      VAD                                   
051892,000058: 26,3353           00001                                    504RPR                                
051893,000059: 26,3354           00001                                    504RPR                                
051894,000060: 26,3355           52105                           VXM      GOTO                                  
051895,000061: 26,3356           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
051896,000062: 26,3357           55406                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
051897,000063: 26,3360           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
051898,000064: 26,3361           55572                                    EARTHMX                               #  M MATRIX B-1
051899,000065: 26,3362           77624                           CALL                                           
051900,000066: 26,3363           55624                                    EARTHL                                #  L VECTOR RADIANS B0
051901,000067: 26,3364           76521                           MXV      VSL1                                  #  LP=M(T)*L     RAD B-0
051902,000068: 26,3365           00025                                    MMATRIX                               
051903,000069: 26,3366           77650                           GOTO                                           
051904,000070: 26,3367           55352                                    RPTORB                                
051905,000071: 
051906,000072:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
051907,000073:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
051908,000074:                                                                                                  #  (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
051909,000075:                                                                                                  #        RP = M(T) * (R - L X R)
051910,000076: 
051911,000077:                                                                                                  #  CALLING SEQUENCE
051912,000078:                                                                                                  #        L       CALL
051913,000079:                                                                                                  #        L+1             R-TO-RP
051914,000080: 
051915,000081:                                                                                                  #  SUBROUTINES USED
051916,000082:                                                                                                  #        EARTHMX, MOONMX, EARTHL
051917,000083: 
051918,000084:                                                                                                  #  INPUT
051919,000085:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
051920,000086:                                                                                                  #        0-5D = R VECTOR
051921,000087:                                                                                                  #        6-7D = TIME
051922,000088: 
051923,000089:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
051924,000090:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
051925,000091:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM                 RADIANS B0
051926,000092: 
051927,000093:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
051928,000094: 
051929,000095:                                                                                                  #  OUTPUT
051930,000096:                                                                                                  #        MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
051931,000097: 
051932,000098: 26,3370           46020        R-TO-RP            STQ      BHIZ                                  
051933,000099: 26,3371           00050                                    RPREXIT                               
051934,000100: 26,3372           55412                                    RTORPA                                
051935,000101: 26,3373           77624                           CALL                                           
051936,000102: 26,3374           55420                                    MOONMX                                
051937,000103: 26,3375           61375                           VLOAD    VXM                                   
051938,000104: 26,3376           02012                                    504LM                                 #  LP=LM
051939,000105: 26,3377           00025                                    MMATRIX                               
051940,000106: 26,3400           77772                           VSL1                                           #  L = MT(T)*LP          RADIANS B0
051941,000107: 26,3401           51235        RTORPB             VXV      BVSU                                  
051942,000108: 26,3402           00001                                    504RPR                                
051943,000109: 26,3403           00001                                    504RPR                                
051944,000110: 26,3404           77721                           MXV                                            #  M(T)*(R-LXR)          B-2
051945,000111: 26,3405           00025                                    MMATRIX                               
051946,000112: 26,3406           40372        RPRPXXXX           VSL1     SETPD                                 
051947,000113: 26,3407           00001                                    0D                                    
051948,000114: 26,3410           77650                           GOTO                                           
051949,000115: 26,3411           00050                                    RPREXIT                               
051950,000116: 26,3412           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
051951,000117: 26,3413           55572                                    EARTHMX                               
051952,000118: 26,3414           77624                           CALL                                           
051953,000119: 26,3415           55624                                    EARTHL                                
051954,000120: 26,3416           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0)    RAD B-0
051955,000121: 26,3417           55401                                    RTORPB                                
051956,000122: 
051957,000123:                                                                                                  #  ..... MOONMX SUBROUTINE .....
051958,000124:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
051959,000125: 
051960,000126:                                                                                                  #  CALLING SEQUENCE
051961,000127:                                                                                                  #        L       CALL
051962,000128:                                                                                                  #        L+1             MOONMX
051963,000129: 
051964,000130:                                                                                                  #  SUBROUTINES USED
051965,000131:                                                                                                  #        NEWANGLE
051966,000132: 
051967,000133:                                                                                                  #  INPUT
051968,000134:                                                                                                  #        6-7D = TIME
051969,000135: 
051970,000136:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
051971,000137:                                                                                                  #                BSUBO, BDOT
051972,000138:                                                                                                  #                TIMSUBO, NODIO, NODDOT, FSUBO, FDOT
051973,000139:                                                                                                  #                COSI = COS(I)   B-1
051974,000140:                                                                                                  #                SINI = SIN(I)   B-1
051975,000141:                                                                                                  #                I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
051976,000142:                                                                                                  #                PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
051977,000143: 
051978,000144:                                                                                                  #  OUTPUT
051979,000145:                                                                                                  #        MMATRIX = 3X3 M MATRIX          B-1 (STORED IN VAC AREA)
051980,000146: 
051981,000147: 26,3420           40220        MOONMX             STQ      SETPD                                 
051982,000148: 26,3421           00051                                    EARTHMXX                              
051983,000149: 26,3422           00011                                    8D                                    
051984,000150: 26,3423           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
051985,000151: 26,3424           00005                                    5                                     
051986,000152: 26,3425           65345                           DLOAD    PDDL                                  #  PD 10D        8-9D=BSUBO
051987,000153: 26,3426           15654                                    BSUBO                                 #                10-11D=BDOT
051988,000154: 26,3427           15646                                    BDOT                                  
051989,000155: 26,3430           45006                           PUSH     CALL                                  #  PD 12D
051990,000156: 26,3431           55545                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B   REVS B0
051991,000157: 26,3432           71406                           PUSH     COS                                   #  PD 10D
051992,000158: 26,3433           14041                           STODL    COB                                   #  PD 8D         COS(B) B-1
051993,000159: 26,3434           77756                           SIN                                            #                SIN(B) B-1
051994,000160: 26,3435           14043                           STODL    SOB                                   #                SETUP INPUT FOR NEWANGLE
051995,000161: 26,3436           15652                                    FSUBO                                 #                        8-9D=FSUBO
051996,000162: 26,3437           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=FDOT
051997,000163: 26,3440           15644                                    FDOT                                  
051998,000164: 26,3441           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
051999,000165: 26,3442           00004                                    4                                     
052000,000166: 26,3443           55545                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
052001,000167: 26,3444           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
052002,000168: 26,3445           15650                                    NODIO                                 #                        8-9D=NODIO
052003,000169: 26,3446           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=NODDOT
052004,000170: 26,3447           15642                                    NODDOT                                #                        MPAC=T
052005,000171: 26,3450           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
052006,000172: 26,3451           00005                                    5                                     
052007,000173: 26,3452           55545                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0
052008,000174: 26,3453           71406                           PUSH     COS                                   #  PD 10D        8-9D= NODI REVS B0
052009,000175: 26,3454           77606                           PUSH                                           #  PD 12D        10-11D= COS(NODI) B-1
052010,000176: 26,3455           00025                           STORE    AVECTR                                
052011,000177: 26,3456           76405                           DMP      SL1R                                  
052012,000178: 26,3457           00041                                    COB                                   #                        COS(NODI) B-1
052013,000179: 26,3460           14035                           STODL    BVECTR     +2                         #  PD 10D  20-25D=AVECTR=COB*SIN(NODI)
052014,000180: 26,3461           76405                           DMP      SL1R                                  #                        SOB*SIN(NODI)
052015,000181: 26,3462           00043                                    SOB                                   
052016,000182: 26,3463           14037                           STODL    BVECTR     +4                         #  PD 8D
052017,000183: 26,3464           41556                           SIN      PUSH                                  #  PD 10D                -SIN(NODI) B-1
052018,000184: 26,3465           77676                           DCOMP                                          #          26-31D=BVECTR=COB*COS(NODI)
052019,000185: 26,3466           14033                           STODL    BVECTR                                #  PD 8D                 SOB*COS(NODI)
052020,000186: 26,3467           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
052021,000187: 26,3470           14007                           STODL    504F                                  
052022,000188: 26,3471           76405                           DMP      SL1R                                  
052023,000189: 26,3472           00041                                    COB                                   
052024,000190: 26,3473           14027                           STODL    AVECTR     +2                         
052025,000191: 26,3474           00011                                    SINNODI                               #  8-9D=SIN(NODI) B-1
052026,000192: 26,3475           76405                           DMP      SL1R                                  
052027,000193: 26,3476           00043                                    SOB                                   
052028,000194: 26,3477           14031                           STODL    AVECTR     +4                         #                        0
052029,000195: 26,3500           15334                                    HI6ZEROS                              #        8-13D= CVECTR=  -SOB B-1
052030,000196: 26,3501           57525                           PDDL     DCOMP                                 #  PD 10D                COB
052031,000197: 26,3502           00043                                    SOB                                   
052032,000198: 26,3503           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
052033,000199: 26,3504           00041                                    COB                                   
052034,000200: 26,3505           00033                                    BVECTR                                
052035,000201: 26,3506           63361                           VXSC     PDVL                                  #  PD 20D        BVECTR*SINI B-2
052036,000202: 26,3507           15640                                    SINI                                  
052037,000203: 26,3510           00011                                    CVECTR                                
052038,000204: 26,3511           53361                           VXSC     VAD                                   #  PD 14D        CVECTR*COSI B-2
052039,000205: 26,3512           15636                                    COSI                                  
052040,000206: 26,3513           77772                           VSL1                                           
052041,000207: 26,3514           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI B-1
052042,000208: 26,3515           63361                           VXSC     PDVL                                  #  PD 14D
052043,000209: 26,3516           15640                                    SINI                                  #                CVECTR*SINI B-2
052044,000210: 26,3517           00033                                    BVECTR                                
052045,000211: 26,3520           52361                           VXSC     VSU                                   #  PD 8D         BVECTR*COSI B-2
052046,000212: 26,3521           15636                                    COSI                                  
052047,000213: 26,3522           65372                           VSL1     PDDL                                  #  PD 14D
052048,000214: 26,3523           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
052049,000215: 26,3524           74346                           COS      VXSC                                  
052050,000216: 26,3525           00011                                    DVECTR                                
052051,000217: 26,3526           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF B-2
052052,000218: 26,3527           00007                                    504F                                  
052053,000219: 26,3530           52361                           VXSC     VSU                                   #  PD 14D        AVECTR*SINF B-2
052054,000220: 26,3531           00025                                    AVECTR                                
052055,000221: 26,3532           77772                           VSL1                                           
052056,000222: 26,3533           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF B-1
052057,000223: 26,3534           00007                                    504F                                  
052058,000224: 26,3535           74356                           SIN      VXSC                                  #  PD 8D
052059,000225: 26,3536           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
052060,000226: 26,3537           00007                                    504F                                  
052061,000227: 26,3540           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
052062,000228: 26,3541           00025                                    AVECTR                                
052063,000229: 26,3542           57572                           VSL1     VCOMP                                 
052064,000230: 26,3543           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF) B-1
052065,000231: 26,3544           00051                                    EARTHMXX                              
052066,000232: 
052067,000233:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
052068,000234:                                                                                                  #  8-9D= XO (REVS B-0), PUSHLOC SET AT 12D
052069,000235:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
052070,000236:                                                                                                  #                        AND B+27 FOR FDOT
052071,000237:                                                                                                  #  X1=DIFFERENCE IN 23 AND SCALING OF XDOT, =0 FOR WEARTH, 5 FOR NODDOT AND
052072,000238:                                                                                                  #                                        BDOT AND 4 FOR FDOT
052073,000239:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
052074,000240: 
052075,000241: 26,3545           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
052076,000242: 26,3546           00007                                    6D                                    
052077,000243: 26,3547           20617                                    14D                                   
052078,000244: 26,3550           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
052079,000245: 26,3551           01707                                    TIMSUBO                               
052080,000246: 26,3552           00155                                    MPAC                                  
052081,000247: 26,3553           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
052082,000248: 26,3554           00020                                    TIMSUBM    +1                         
052083,000249: 26,3555           77605                           DMP                                            #  PD 10D        MULT BY XDOT IN 10-11D
052084,000250: 26,3556           43257                           SL*      DAD                                   #  PD 8D         ADD XO IN 8-9D AFTER SHIFTING
052085,000251: 26,3557           20206                                    5,1                                   #                SUCH THAT SCALING IS B-0
052086,000252: 26,3560           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
052087,000253: 26,3561           00017                                    TIMSUBM                               
052088,000254: 26,3562           41261                           SL       DMP                                   
052089,000255: 26,3563           20212                                    9D                                    
052090,000256: 26,3564           00013                                    10D                                   #  XDOT
052091,000257: 26,3565           43257                           SL*      DAD                                   #  PD 8D         SHIFT SUCH THAT THIS PART OF X
052092,000258: 26,3566           20213                                    10D,1                                 #                IS SCALED REVS/CSEC B-0
052093,000259: 26,3567           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
052094,000260: 26,3570           55571                                    +1                                    #  INSTRUCTION BEFORE EXITING
052095,000261: 26,3571           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)       REVS B0
052096,000262: 
052097,000263:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
052098,000264:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
052099,000265: 
052100,000266:                                                                                                  #  CALLING SEQUENCE
052101,000267:                                                                                                  #        L       CALL
052102,000268:                                                                                                  #        L+1             EARTHMX
052103,000269: 
052104,000270:                                                                                                  #  SUBROUTINES USED
052105,000271:                                                                                                  #        NEWANGLE
052106,000272: 
052107,000273:                                                                                                  #  INPUT
052108,000274:                                                                                                  #        INPUT AVAILABLE FROM LAUNCH DATA        AZO REVS B-0
052109,000275:                                                                                                  #                                                TEPHEM CSEC B-42
052110,000276:                                                                                                  #        6-7D= TIME CSEC B-28
052111,000277: 
052112,000278:                                                                                                  #  OUTPUT
052113,000279:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1 (STORED IN VAC AREA)
052114,000280: 
052115,000281: 26,3572           40220        EARTHMX            STQ      SETPD                                 #  SET 8-9D=AZO
052116,000282: 26,3573           00051                                    EARTHMXX                              
052117,000283: 26,3574           00011                                    8D                                    #  10-11D=WEARTH
052118,000284: 26,3575           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
052119,000285: 26,3576           00000                                    0                                     
052120,000286: 26,3577           65345                           DLOAD    PDDL                                  #  LEAVING PD SET AT 12D FOR NEWANGLE
052121,000287: 26,3600           01712                                    AZO                                   
052122,000288: 26,3601           15656                                    WEARTH                                
052123,000289: 26,3602           45006                           PUSH     CALL                                  
052124,000290: 26,3603           55545                                    NEWANGLE                              
052125,000291: 26,3604           41401                           SETPD    PUSH                                  #  18-19D=504AZ
052126,000292: 26,3605           00023                                    18D                                   #                         COS(AZ)   SIN(AZ)     0
052127,000293: 26,3606           65346                           COS      PDDL                                  #  20-37D=  MMATRIX=     -SIN(AZ)   COS(AZ)     0    B-1
052128,000294: 26,3607           00023                                    504AZ                                 #                            0         0        1
052129,000295: 26,3610           65356                           SIN      PDDL                                  
052130,000296: 26,3611           15334                                    HI6ZEROS                              
052131,000297: 26,3612           73525                           PDDL     SIN                                   
052132,000298: 26,3613           00023                                    504AZ                                 
052133,000299: 26,3614           65276                           DCOMP    PDDL                                  
052134,000300: 26,3615           00023                                    504AZ                                 
052135,000301: 26,3616           63346                           COS      PDVL                                  
052136,000302: 26,3617           15334                                    HI6ZEROS                              
052137,000303: 26,3620           41525                           PDDL     PUSH                                  
052138,000304: 26,3621           15332                                    HIDPHALF                              
052139,000305: 26,3622           77650                           GOTO                                           
052140,000306: 26,3623           00051                                    EARTHMXX                              
052141,000307: 
052142,000308:                                                                                                  #  ..... EARTHL SUBROUTINE .....
052143,000309:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
052144,000310: 
052145,000311:                                                                                                  #  CALLING SEQUENCE
052146,000312:                                                                                                  #        L       CALL
052147,000313:                                                                                                  #        L+1             EARTHL
052148,000314: 
052149,000315:                                                                                                  #  INPUT
052150,000316:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
052151,000317: 
052152,000318:                                                                                                  #  OUTPUT
052153,000319:                                                                                                  #                -AX
052154,000320:                                                                                                  #        MPAC=   -AY     RADIANS B-0
052155,000321:                                                                                                  #                  0
052156,000322: 
052157,000323: 26,3624           57545        EARTHL             DLOAD    DCOMP                                 
052158,000324: 26,3625           01716                                    AXO                                   
052159,000325: 26,3626           14017                           STODL    504LPL                                
052160,000326: 26,3627           01714                                    -AYO                                  
052161,000327: 26,3630           14021                           STODL    504LPL     +2                         
052162,000328: 26,3631           15334                                    HI6ZEROS                              
052163,000329: 26,3632           24023                           STOVL    504LPL     +4                         
052164,000330: 26,3633           00017                                    504LPL                                
052165,000331: 26,3634           77616                           RVQ                                            
052166,000332: 
052167,000333:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
052168,000334: 
052169,000335: 26,3635  04,3563               1B1                =        DP1/2                                 #  1 SCALED B-1
052170,000336: 26,3635           17775 02052  COSI               2DEC     .99964173  B-1                        #  COS(5521.5 SEC) B-1
052171,000337: 
052172,000338: 26,3637           00333 10374  SINI               2DEC     .02676579  B-1                        #  SIN(5521.5 SEC) B-1
052173,000339: 
052174,000340: 26,3641  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
052175,000341: 26,3641  0000051               EARTHMXX           =        S2                                    #  EARTHMX, MOONMX SUBR. EXITS
052176,000342: 26,3641                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
052177,000343: 26,3641                        SINNODI            =        8D                                    #  2             SIN(NODI)
052178,000344: 26,3641                        DVECTR             =        8D                                    #  6             D VECTOR MOON
052179,000345: 26,3641                        CVECTR             =        8D                                    #  6             C VECTR MOON
052180,000346: 26,3641                        504AZ              =        18D                                   #  2             AZ
052181,000347: 26,3641                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
052182,000348: 26,3641                        504LPL             =        14D                                   #  6             L OR LP VECTOR
052183,000349: 26,3641                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
052184,000350: 26,3641                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
052185,000351: 26,3641                        MMATRIX            =        20D                                   #  18            M MATRIX
052186,000352: 26,3641                        COB                =        32D                                   #  2             COS(B) B-1
052187,000353: 26,3641                        SOB                =        34D                                   #  2             SIN(B) B-1
052188,000354: 26,3641                        504F               =        6D                                    #  2             F(MOON)
052189,000355: 26,3641           77665 42175  NODDOT             2DEC*    -1.703706190 E-11       B28*            #  REV/CSEC
052190,000356: 
052191,000357: 26,3643           22211 00636  FDOT               2DEC*    4.253263473 E-9        B27*            #  REV/CSEC
052192,000358: 
052193,000359: 26,3645           77777 77767  BDOT               2DEC*    -1.145529388 E-16       B28*            #  REV/CSEC
052194,000360: 
052195,000361: 26,3647           37436 01614  NODIO              2DEC*    9.862094363 E-1*                       #  REV
052196,000362: 
052197,000363: 26,3651           32417 32011  FSUBO              2DEC*    8.290901511 E-1*                       #  REV
052198,000364: 
052199,000365: 26,3653           02052 35552  BSUBO              2DEC     6.512013939 E-2                        #  REVS
052200,000366: 
052201,000367: 26,3655           37116 32631  WEARTH             2DEC*    1.160576171 E-7        B23*            #  REV/CSEC
052202,000368: 

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