Source Code

These source-code files are part of a reconstructed copy of Comanche 45/2 (AKA Manche45 revision 2), the final, flown mission release of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Comanche 45/2 was preceded by Comanche 44 and Comanche 45. The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 45/2, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 45 (itself previously accurately reconstructed). Comanche 45 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 45 and 45/2. The now-reconstructed Comanche 45/2 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
Comments expected to have been present in 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.

052733,000002:                                                                                                  ## Copyright:   Public domain.
052734,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
052735,000004:                                                                                                  ## Purpose:     A section of Manche45 revision 2.
052736,000005:                                                                                                  ##              It is part of the reconstructed source code for the
052737,000006:                                                                                                  ##              final, flown release of the flight software for the Command
052738,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
052739,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
052740,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
052741,000010:                                                                                                  ##              exactly match those specified for Manche 45/2 in NASA drawing
052742,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
052743,000012:                                                                                                  ##              reconstruction is correct.
052744,000013:                                                                                                  ## Assembler:   yaYUL
052745,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052746,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052747,000016:                                                                                                  ## Mod history: 2020-12-24 MAS  Created from Comanche 45.
052748,000017: 

Page 1243

052750,000019:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
052751,000020:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
052752,000021:                                                                                                  #  EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
052753,000022:                                                                                                  #        R = MT(T) * (RP + LP X RP)      MT = M MATRIX TRANSPOSE
052754,000023: 
052755,000024:                                                                                                  #  CALLING SEQUENCE
052756,000025:                                                                                                  #        L       CALL
052757,000026:                                                                                                  #        L+1             RP-TO-R
052758,000027: 
052759,000028:                                                                                                  #  SUBROUTINES USED
052760,000029:                                                                                                  #        EARTHMX, MOONMX, EARTHL
052761,000030: 
052762,000031:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
052763,000032:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
052764,000033:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM         RADIANS B0
052765,000034: 
052766,000035:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
052767,000036: 
052768,000037:                                                                                                  #  INPUT
052769,000038:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
052770,000039:                                                                                                  #        0-5D = RP VECTOR
052771,000040:                                                                                                  #        6-7D = TIME
052772,000041: 
052773,000042:                                                                                                  #  OUTPUT
052774,000043:                                                                                                  #        MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
052775,000044: 
052776,000045: 26,2000                                           SETLOC   PLANTIN                               
052777,000046: 26,2000                                           BANK                                           
052778,000047: 
052779,000048: 26,3344                                           COUNT*   $$/LUROT                              
052780,000049: 
052781,000050: 26,3344           46020        RP-TO-R            STQ      BHIZ                                  
052782,000051: 26,3345           00050                                    RPREXIT                               
052783,000052: 26,3346           55361                                    RPTORA                                
052784,000053: 26,3347           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
052785,000054: 26,3350           55421                                    MOONMX                                #  LP=LM FOR MOON        RADIANS B0
052786,000055: 26,3351           77775                           VLOAD                                          
052787,000056: 26,3352           02012                                    504LM                                 
052788,000057: 26,3353           53235        RPTORB             VXV      VAD                                   
052789,000058: 26,3354           00001                                    504RPR                                
052790,000059: 26,3355           00001                                    504RPR                                
052791,000060: 26,3356           52105                           VXM      GOTO                                  
052792,000061: 26,3357           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
052793,000062: 26,3360           55407                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
052794,000063: 26,3361           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
052795,000064: 26,3362           55573                                    EARTHMX                               #  M MATRIX B-1
052796,000065: 26,3363           77624                           CALL                                           
052797,000066: 26,3364           55625                                    EARTHL                                #  L VECTOR RADIANS B0
052798,000067: 26,3365           76521                           MXV      VSL1                                  #  LP=M(T)*L     RAD B-0
052799,000068: 26,3366           00025                                    MMATRIX                               

Page 1244

052801,000070: 26,3367           77650                           GOTO                                           
052802,000071: 26,3370           55353                                    RPTORB                                
052803,000072: 

Page 1245

052805,000074:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
052806,000075:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
052807,000076:                                                                                                  #  (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
052808,000077:                                                                                                  #        RP = M(T) * (R - L X R)
052809,000078: 
052810,000079:                                                                                                  #  CALLING SEQUENCE
052811,000080:                                                                                                  #        L       CALL
052812,000081:                                                                                                  #        L+1             R-TO-RP
052813,000082: 
052814,000083:                                                                                                  #  SUBROUTINES USED
052815,000084:                                                                                                  #        EARTHMX, MOONMX, EARTHL
052816,000085: 
052817,000086:                                                                                                  #  INPUT
052818,000087:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
052819,000088:                                                                                                  #        0-5D = R VECTOR
052820,000089:                                                                                                  #        6-7D = TIME
052821,000090: 
052822,000091:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
052823,000092:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
052824,000093:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM                 RADIANS B0
052825,000094: 
052826,000095:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
052827,000096: 
052828,000097:                                                                                                  #  OUTPUT
052829,000098:                                                                                                  #        MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
052830,000099: 
052831,000100: 26,3371           46020        R-TO-RP            STQ      BHIZ                                  
052832,000101: 26,3372           00050                                    RPREXIT                               
052833,000102: 26,3373           55413                                    RTORPA                                
052834,000103: 26,3374           77624                           CALL                                           
052835,000104: 26,3375           55421                                    MOONMX                                
052836,000105: 26,3376           61375                           VLOAD    VXM                                   
052837,000106: 26,3377           02012                                    504LM                                 #  LP=LM
052838,000107: 26,3400           00025                                    MMATRIX                               
052839,000108: 26,3401           77772                           VSL1                                           #  L = MT(T)*LP          RADIANS B0
052840,000109: 26,3402           51235        RTORPB             VXV      BVSU                                  
052841,000110: 26,3403           00001                                    504RPR                                
052842,000111: 26,3404           00001                                    504RPR                                
052843,000112: 26,3405           77721                           MXV                                            #  M(T)*(R-LXR)          B-2
052844,000113: 26,3406           00025                                    MMATRIX                               
052845,000114: 26,3407           40372        RPRPXXXX           VSL1     SETPD                                 
052846,000115: 26,3410           00001                                    0D                                    
052847,000116: 26,3411           77650                           GOTO                                           
052848,000117: 26,3412           00050                                    RPREXIT                               
052849,000118: 26,3413           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
052850,000119: 26,3414           55573                                    EARTHMX                               
052851,000120: 26,3415           77624                           CALL                                           
052852,000121: 26,3416           55625                                    EARTHL                                
052853,000122: 26,3417           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0)    RAD B-0
052854,000123: 26,3420           55402                                    RTORPB                                
052855,000124: 

Page 1246

052857,000126:                                                                                                  #  ..... MOONMX SUBROUTINE .....
052858,000127:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
052859,000128: 
052860,000129:                                                                                                  #  CALLING SEQUENCE
052861,000130:                                                                                                  #        L       CALL
052862,000131:                                                                                                  #        L+1             MOONMX
052863,000132: 
052864,000133:                                                                                                  #  SUBROUTINES USED
052865,000134:                                                                                                  #        NEWANGLE
052866,000135: 
052867,000136:                                                                                                  #  INPUT
052868,000137:                                                                                                  #        6-7D = TIME
052869,000138: 
052870,000139:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
052871,000140:                                                                                                  #                BSUBO, BDOT
052872,000141:                                                                                                  #                TIMSUBO, NODIO, NODDOT, FSUBO, FDOT
052873,000142:                                                                                                  #                COSI = COS(I)   B-1
052874,000143:                                                                                                  #                SINI = SIN(I)   B-1
052875,000144:                                                                                                  #                I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
052876,000145:                                                                                                  #                PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
052877,000146: 
052878,000147:                                                                                                  #  OUTPUT
052879,000148:                                                                                                  #        MMATRIX = 3X3 M MATRIX          B-1 (STORED IN VAC AREA)
052880,000149: 
052881,000150: 26,3421           40220        MOONMX             STQ      SETPD                                 
052882,000151: 26,3422           00051                                    EARTHMXX                              
052883,000152: 26,3423           00011                                    8D                                    
052884,000153: 26,3424           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
052885,000154: 26,3425           00005                                    5                                     
052886,000155: 26,3426           65345                           DLOAD    PDDL                                  #  PD 10D        8-9D=BSUBO
052887,000156: 26,3427           15655                                    BSUBO                                 #                10-11D=BDOT
052888,000157: 26,3430           15647                                    BDOT                                  
052889,000158: 26,3431           45006                           PUSH     CALL                                  #  PD 12D
052890,000159: 26,3432           55546                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B   REVS B0
052891,000160: 26,3433           71406                           PUSH     COS                                   #  PD 10D
052892,000161: 26,3434           14041                           STODL    COB                                   #  PD 8D         COS(B) B-1
052893,000162: 26,3435           77756                           SIN                                            #                SIN(B) B-1
052894,000163: 26,3436           14043                           STODL    SOB                                   #                SETUP INPUT FOR NEWANGLE
052895,000164: 26,3437           15653                                    FSUBO                                 #                        8-9D=FSUBO
052896,000165: 26,3440           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=FDOT
052897,000166: 26,3441           15645                                    FDOT                                  
052898,000167: 26,3442           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
052899,000168: 26,3443           00004                                    4                                     
052900,000169: 26,3444           55546                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
052901,000170: 26,3445           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
052902,000171: 26,3446           15651                                    NODIO                                 #                        8-9D=NODIO
052903,000172: 26,3447           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=NODDOT
052904,000173: 26,3450           15643                                    NODDOT                                #                        MPAC=T
052905,000174: 26,3451           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
052906,000175: 26,3452           00005                                    5                                     
052907,000176: 26,3453           55546                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1247

052909,000178: 26,3454           71406                           PUSH     COS                                   #  PD 10D        8-9D= NODI REVS B0
052910,000179: 26,3455           77606                           PUSH                                           #  PD 12D        10-11D= COS(NODI) B-1
052911,000180: 26,3456           00025                           STORE    AVECTR                                
052912,000181: 26,3457           76405                           DMP      SL1R                                  
052913,000182: 26,3460           00041                                    COB                                   #                        COS(NODI) B-1
052914,000183: 26,3461           14035                           STODL    BVECTR     +2                         #  PD 10D  20-25D=AVECTR=COB*SIN(NODI)
052915,000184: 26,3462           76405                           DMP      SL1R                                  #                        SOB*SIN(NODI)
052916,000185: 26,3463           00043                                    SOB                                   
052917,000186: 26,3464           14037                           STODL    BVECTR     +4                         #  PD 8D
052918,000187: 26,3465           41556                           SIN      PUSH                                  #  PD 10D                -SIN(NODI) B-1
052919,000188: 26,3466           77676                           DCOMP                                          #          26-31D=BVECTR=COB*COS(NODI)
052920,000189: 26,3467           14033                           STODL    BVECTR                                #  PD 8D                 SOB*COS(NODI)
052921,000190: 26,3470           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
052922,000191: 26,3471           14007                           STODL    504F                                  
052923,000192: 26,3472           76405                           DMP      SL1R                                  
052924,000193: 26,3473           00041                                    COB                                   
052925,000194: 26,3474           14027                           STODL    AVECTR     +2                         
052926,000195: 26,3475           00011                                    SINNODI                               #  8-9D=SIN(NODI) B-1
052927,000196: 26,3476           76405                           DMP      SL1R                                  
052928,000197: 26,3477           00043                                    SOB                                   
052929,000198: 26,3500           14031                           STODL    AVECTR     +4                         #                        0
052930,000199: 26,3501           15335                                    HI6ZEROS                              #        8-13D= CVECTR=  -SOB B-1
052931,000200: 26,3502           57525                           PDDL     DCOMP                                 #  PD 10D                COB
052932,000201: 26,3503           00043                                    SOB                                   
052933,000202: 26,3504           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
052934,000203: 26,3505           00041                                    COB                                   
052935,000204: 26,3506           00033                                    BVECTR                                
052936,000205: 26,3507           63361                           VXSC     PDVL                                  #  PD 20D        BVECTR*SINI B-2
052937,000206: 26,3510           15641                                    SINI                                  
052938,000207: 26,3511           00011                                    CVECTR                                
052939,000208: 26,3512           53361                           VXSC     VAD                                   #  PD 14D        CVECTR*COSI B-2
052940,000209: 26,3513           15637                                    COSI                                  
052941,000210: 26,3514           77772                           VSL1                                           
052942,000211: 26,3515           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI B-1
052943,000212: 26,3516           63361                           VXSC     PDVL                                  #  PD 14D
052944,000213: 26,3517           15641                                    SINI                                  #                CVECTR*SINI B-2
052945,000214: 26,3520           00033                                    BVECTR                                
052946,000215: 26,3521           52361                           VXSC     VSU                                   #  PD 8D         BVECTR*COSI B-2
052947,000216: 26,3522           15637                                    COSI                                  
052948,000217: 26,3523           65372                           VSL1     PDDL                                  #  PD 14D
052949,000218: 26,3524           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
052950,000219: 26,3525           74346                           COS      VXSC                                  
052951,000220: 26,3526           00011                                    DVECTR                                
052952,000221: 26,3527           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF B-2
052953,000222: 26,3530           00007                                    504F                                  
052954,000223: 26,3531           52361                           VXSC     VSU                                   #  PD 14D        AVECTR*SINF B-2
052955,000224: 26,3532           00025                                    AVECTR                                
052956,000225: 26,3533           77772                           VSL1                                           
052957,000226: 26,3534           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF B-1
052958,000227: 26,3535           00007                                    504F                                  

Page 1248

052960,000229: 26,3536           74356                           SIN      VXSC                                  #  PD 8D
052961,000230: 26,3537           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
052962,000231: 26,3540           00007                                    504F                                  
052963,000232: 26,3541           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
052964,000233: 26,3542           00025                                    AVECTR                                
052965,000234: 26,3543           57572                           VSL1     VCOMP                                 
052966,000235: 26,3544           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF) B-1
052967,000236: 26,3545           00051                                    EARTHMXX                              
052968,000237: 
052969,000238:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
052970,000239:                                                                                                  #  8-9D= XO (REVS B-0), PUSHLOC SET AT 12D
052971,000240:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
052972,000241:                                                                                                  #                        AND B+27 FOR FDOT
052973,000242:                                                                                                  #  X1=DIFFERENCE IN 23 AND SCALING OF XDOT, =0 FOR WEARTH, 5 FOR NODDOT AND
052974,000243:                                                                                                  #                                        BDOT AND 4 FOR FDOT
052975,000244:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
052976,000245: 
052977,000246: 26,3546           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
052978,000247: 26,3547           00007                                    6D                                    
052979,000248: 26,3550           20617                                    14D                                   
052980,000249: 26,3551           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
052981,000250: 26,3552           01707                                    TIMSUBO                               
052982,000251: 26,3553           00155                                    MPAC                                  
052983,000252: 26,3554           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
052984,000253: 26,3555           00020                                    TIMSUBM    +1                         
052985,000254: 26,3556           77605                           DMP                                            #  PD 10D        MULT BY XDOT IN 10-11D
052986,000255: 26,3557           43257                           SL*      DAD                                   #  PD 8D         ADD XO IN 8-9D AFTER SHIFTING
052987,000256: 26,3560           20206                                    5,1                                   #                SUCH THAT SCALING IS B-0
052988,000257: 26,3561           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
052989,000258: 26,3562           00017                                    TIMSUBM                               
052990,000259: 26,3563           41261                           SL       DMP                                   
052991,000260: 26,3564           20212                                    9D                                    
052992,000261: 26,3565           00013                                    10D                                   #  XDOT
052993,000262: 26,3566           43257                           SL*      DAD                                   #  PD 8D         SHIFT SUCH THAT THIS PART OF X
052994,000263: 26,3567           20213                                    10D,1                                 #                IS SCALED REVS/CSEC B-0
052995,000264: 26,3570           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
052996,000265: 26,3571           55572                                    +1                                    #  INSTRUCTION BEFORE EXITING
052997,000266: 26,3572           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)       REVS B0
052998,000267: 

Page 1249

053000,000269:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
053001,000270:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
053002,000271: 
053003,000272:                                                                                                  #  CALLING SEQUENCE
053004,000273:                                                                                                  #        L       CALL
053005,000274:                                                                                                  #        L+1             EARTHMX
053006,000275: 
053007,000276:                                                                                                  #  SUBROUTINES USED
053008,000277:                                                                                                  #        NEWANGLE
053009,000278: 
053010,000279:                                                                                                  #  INPUT
053011,000280:                                                                                                  #        INPUT AVAILABLE FROM LAUNCH DATA        AZO REVS B-0
053012,000281:                                                                                                  #                                                TEPHEM CSEC B-42
053013,000282:                                                                                                  #        6-7D= TIME CSEC B-28
053014,000283: 
053015,000284:                                                                                                  #  OUTPUT
053016,000285:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1 (STORED IN VAC AREA)
053017,000286: 
053018,000287: 26,3573           40220        EARTHMX            STQ      SETPD                                 #  SET 8-9D=AZO
053019,000288: 26,3574           00051                                    EARTHMXX                              
053020,000289: 26,3575           00011                                    8D                                    #  10-11D=WEARTH
053021,000290: 26,3576           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
053022,000291: 26,3577           00000                                    0                                     
053023,000292: 26,3600           65345                           DLOAD    PDDL                                  #  LEAVING PD SET AT 12D FOR NEWANGLE
053024,000293: 26,3601           01712                                    AZO                                   
053025,000294: 26,3602           15657                                    WEARTH                                
053026,000295: 26,3603           45006                           PUSH     CALL                                  
053027,000296: 26,3604           55546                                    NEWANGLE                              
053028,000297: 26,3605           41401                           SETPD    PUSH                                  #  18-19D=504AZ
053029,000298: 26,3606           00023                                    18D                                   #                         COS(AZ)   SIN(AZ)     0
053030,000299: 26,3607           65346                           COS      PDDL                                  #  20-37D=  MMATRIX=     -SIN(AZ)   COS(AZ)     0    B-1
053031,000300: 26,3610           00023                                    504AZ                                 #                            0         0        1
053032,000301: 26,3611           65356                           SIN      PDDL                                  
053033,000302: 26,3612           15335                                    HI6ZEROS                              
053034,000303: 26,3613           73525                           PDDL     SIN                                   
053035,000304: 26,3614           00023                                    504AZ                                 
053036,000305: 26,3615           65276                           DCOMP    PDDL                                  
053037,000306: 26,3616           00023                                    504AZ                                 
053038,000307: 26,3617           63346                           COS      PDVL                                  
053039,000308: 26,3620           15335                                    HI6ZEROS                              
053040,000309: 26,3621           41525                           PDDL     PUSH                                  
053041,000310: 26,3622           15333                                    HIDPHALF                              
053042,000311: 26,3623           77650                           GOTO                                           
053043,000312: 26,3624           00051                                    EARTHMXX                              
053044,000313: 

Page 1250

053046,000315:                                                                                                  #  ..... EARTHL SUBROUTINE .....
053047,000316:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
053048,000317: 
053049,000318:                                                                                                  #  CALLING SEQUENCE
053050,000319:                                                                                                  #        L       CALL
053051,000320:                                                                                                  #        L+1             EARTHL
053052,000321: 
053053,000322:                                                                                                  #  INPUT
053054,000323:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
053055,000324: 
053056,000325:                                                                                                  #  OUTPUT
053057,000326:                                                                                                  #                -AX
053058,000327:                                                                                                  #        MPAC=   -AY     RADIANS B-0
053059,000328:                                                                                                  #                  0
053060,000329: 
053061,000330: 26,3625           57545        EARTHL             DLOAD    DCOMP                                 
053062,000331: 26,3626           01716                                    AXO                                   
053063,000332: 26,3627           14017                           STODL    504LPL                                
053064,000333: 26,3630           01714                                    -AYO                                  
053065,000334: 26,3631           14021                           STODL    504LPL     +2                         
053066,000335: 26,3632           15335                                    HI6ZEROS                              
053067,000336: 26,3633           24023                           STOVL    504LPL     +4                         
053068,000337: 26,3634           00017                                    504LPL                                
053069,000338: 26,3635           77616                           RVQ                                            
053070,000339: 

Page 1251

053072,000341:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
053073,000342: 
053074,000343: 26,3636  04,3560               1B1                =        DP1/2                                 #  1 SCALED B-1
053075,000344: 26,3636           17775 01734  COSI               2DEC     .99964115  B-1                        #  COS(1 DEG 32.1 MIN) B-1
053076,000345: 
053077,000346: 26,3640           00333 16153  SINI               2DEC     .02678760  B-1                        #  SIN(1 DEG 32.1 MIN) B-1
053078,000347: 
053079,000348: 26,3642  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
053080,000349: 26,3642  0000051               EARTHMXX           =        S2                                    #  EARTHMX, MOONMX SUBR. EXITS
053081,000350: 26,3642                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
053082,000351: 26,3642                        SINNODI            =        8D                                    #  2             SIN(NODI)
053083,000352: 26,3642                        DVECTR             =        8D                                    #  6             D VECTOR MOON
053084,000353: 26,3642                        CVECTR             =        8D                                    #  6             C VECTR MOON
053085,000354: 26,3642                        504AZ              =        18D                                   #  2             AZ
053086,000355: 26,3642                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
053087,000356: 26,3642                        504LPL             =        14D                                   #  6             L OR LP VECTOR
053088,000357: 26,3642                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
053089,000358: 26,3642                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
053090,000359: 26,3642                        MMATRIX            =        20D                                   #  18            M MATRIX
053091,000360: 26,3642                        COB                =        32D                                   #  2             COS(B) B-1
053092,000361: 26,3642                        SOB                =        34D                                   #  2             SIN(B) B-1
053093,000362: 26,3642                        504F               =        6D                                    #  2             F(MOON)
053094,000363: 26,3642           77665 42175  NODDOT             2DEC     -.457335143 E-2                        #  REVS/CSEC B+28=-1.07047016 E-6  RAD/SEC
053095,000364: 
053096,000365: 26,3644           22211 00265  FDOT               2DEC     .570862491                            #  REVS/CSEC B+27= 2.67240019 E-6  RAD/SEC
053097,000366: 
053098,000367: 26,3646           77777 77767  BDOT               2DEC     -3.07500412 E-8                        #  REVS/CSEC B+28=-7.19756666 E-14 RAD/SEC
053099,000368: 
053100,000369: 26,3650           41215 66331  NODIO              2DEC     -.960101269                            #  REVS B-0      =-6.03249419      RAD
053101,000370: 
053102,000371: 26,3652           15237 26751  FSUBO              2DEC     .415998375                            #  REVS B-0      = 2.61379488      RAD
053103,000372: 
053104,000373: 26,3654           02052 35713  BSUBO              2DEC     .0651205006                            #  REVS B=0      = 0.409164173     RAD
053105,000374: 
053106,000375: 26,3656           37116 32630  WEARTH             2DEC     .973561855                            #  REVS/CSEC B+23= 7.29211515 E-5  RAD/SEC
053107,000376: 

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