Source Code

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

The starting point was the source code of Comanche 44 (itself previously accurately reconstructed). Comanche 44 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 44 and 45. The now-reconstructed Comanche 45 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:
There is also a detailed commentary about the reconstruction process.

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.

052833,000002:                                                                                                  ## Copyright:   Public domain.
052834,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
052835,000004:                                                                                                  ## Purpose:     A section of Comanche revision 045.
052836,000005:                                                                                                  ##              It is part of the reconstructed source code for the
052837,000006:                                                                                                  ##              second release of the flight software for the Command
052838,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
052839,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
052840,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
052841,000010:                                                                                                  ##              exactly match those specified for Comanche 45 in NASA drawing
052842,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
052843,000012:                                                                                                  ##              reconstruction is correct.
052844,000013:                                                                                                  ## Assembler:   yaYUL
052845,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
052846,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
052847,000016:                                                                                                  ## Mod history: 2020-12-06 MAS  Created from Comanche 44.
052848,000017: 

Page 1243

052850,000019:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
052851,000020:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
052852,000021:                                                                                                  #  EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
052853,000022:                                                                                                  #        R = MT(T) * (RP + LP X RP)      MT = M MATRIX TRANSPOSE
052854,000023: 
052855,000024:                                                                                                  #  CALLING SEQUENCE
052856,000025:                                                                                                  #        L       CALL
052857,000026:                                                                                                  #        L+1             RP-TO-R
052858,000027: 
052859,000028:                                                                                                  #  SUBROUTINES USED
052860,000029:                                                                                                  #        EARTHMX, MOONMX, EARTHL
052861,000030: 
052862,000031:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
052863,000032:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
052864,000033:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM         RADIANS B0
052865,000034: 
052866,000035:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
052867,000036: 
052868,000037:                                                                                                  #  INPUT
052869,000038:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
052870,000039:                                                                                                  #        0-5D = RP VECTOR
052871,000040:                                                                                                  #        6-7D = TIME
052872,000041: 
052873,000042:                                                                                                  #  OUTPUT
052874,000043:                                                                                                  #        MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
052875,000044: 
052876,000045: 26,2000                                           SETLOC   PLANTIN                               
052877,000046: 26,2000                                           BANK                                           
052878,000047: 
052879,000048: 26,3344                                           COUNT*   $$/LUROT                              
052880,000049: 
052881,000050: 26,3344           46020        RP-TO-R            STQ      BHIZ                                  
052882,000051: 26,3345           00050                                    RPREXIT                               
052883,000052: 26,3346           55361                                    RPTORA                                
052884,000053: 26,3347           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
052885,000054: 26,3350           55421                                    MOONMX                                #  LP=LM FOR MOON        RADIANS B0
052886,000055: 26,3351           77775                           VLOAD                                          
052887,000056: 26,3352           02012                                    504LM                                 
052888,000057: 26,3353           53235        RPTORB             VXV      VAD                                   
052889,000058: 26,3354           00001                                    504RPR                                
052890,000059: 26,3355           00001                                    504RPR                                
052891,000060: 26,3356           52105                           VXM      GOTO                                  
052892,000061: 26,3357           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
052893,000062: 26,3360           55407                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
052894,000063: 26,3361           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
052895,000064: 26,3362           55573                                    EARTHMX                               #  M MATRIX B-1
052896,000065: 26,3363           77624                           CALL                                           
052897,000066: 26,3364           55625                                    EARTHL                                #  L VECTOR RADIANS B0
052898,000067: 26,3365           76521                           MXV      VSL1                                  #  LP=M(T)*L     RAD B-0
052899,000068: 26,3366           00025                                    MMATRIX                               

Page 1244

052901,000070: 26,3367           77650                           GOTO                                           
052902,000071: 26,3370           55353                                    RPTORB                                
052903,000072: 

Page 1245

052905,000074:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
052906,000075:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
052907,000076:                                                                                                  #  (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
052908,000077:                                                                                                  #        RP = M(T) * (R - L X R)
052909,000078: 
052910,000079:                                                                                                  #  CALLING SEQUENCE
052911,000080:                                                                                                  #        L       CALL
052912,000081:                                                                                                  #        L+1             R-TO-RP
052913,000082: 
052914,000083:                                                                                                  #  SUBROUTINES USED
052915,000084:                                                                                                  #        EARTHMX, MOONMX, EARTHL
052916,000085: 
052917,000086:                                                                                                  #  INPUT
052918,000087:                                                                                                  #        MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
052919,000088:                                                                                                  #        0-5D = R VECTOR
052920,000089:                                                                                                  #        6-7D = TIME
052921,000090: 
052922,000091:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
052923,000092:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
052924,000093:                                                                                                  #                IN THE MOON-FIXED COORD. SYSTEM                 RADIANS B0
052925,000094: 
052926,000095:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
052927,000096: 
052928,000097:                                                                                                  #  OUTPUT
052929,000098:                                                                                                  #        MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
052930,000099: 
052931,000100: 26,3371           46020        R-TO-RP            STQ      BHIZ                                  
052932,000101: 26,3372           00050                                    RPREXIT                               
052933,000102: 26,3373           55413                                    RTORPA                                
052934,000103: 26,3374           77624                           CALL                                           
052935,000104: 26,3375           55421                                    MOONMX                                
052936,000105: 26,3376           61375                           VLOAD    VXM                                   
052937,000106: 26,3377           02012                                    504LM                                 #  LP=LM
052938,000107: 26,3400           00025                                    MMATRIX                               
052939,000108: 26,3401           77772                           VSL1                                           #  L = MT(T)*LP          RADIANS B0
052940,000109: 26,3402           51235        RTORPB             VXV      BVSU                                  
052941,000110: 26,3403           00001                                    504RPR                                
052942,000111: 26,3404           00001                                    504RPR                                
052943,000112: 26,3405           77721                           MXV                                            #  M(T)*(R-LXR)          B-2
052944,000113: 26,3406           00025                                    MMATRIX                               
052945,000114: 26,3407           40372        RPRPXXXX           VSL1     SETPD                                 
052946,000115: 26,3410           00001                                    0D                                    
052947,000116: 26,3411           77650                           GOTO                                           
052948,000117: 26,3412           00050                                    RPREXIT                               
052949,000118: 26,3413           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
052950,000119: 26,3414           55573                                    EARTHMX                               
052951,000120: 26,3415           77624                           CALL                                           
052952,000121: 26,3416           55625                                    EARTHL                                
052953,000122: 26,3417           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0)    RAD B-0
052954,000123: 26,3420           55402                                    RTORPB                                
052955,000124: 

Page 1246

052957,000126:                                                                                                  #  ..... MOONMX SUBROUTINE .....
052958,000127:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
052959,000128: 
052960,000129:                                                                                                  #  CALLING SEQUENCE
052961,000130:                                                                                                  #        L       CALL
052962,000131:                                                                                                  #        L+1             MOONMX
052963,000132: 
052964,000133:                                                                                                  #  SUBROUTINES USED
052965,000134:                                                                                                  #        NEWANGLE
052966,000135: 
052967,000136:                                                                                                  #  INPUT
052968,000137:                                                                                                  #        6-7D = TIME
052969,000138: 
052970,000139:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
052971,000140:                                                                                                  #                BSUBO, BDOT
052972,000141:                                                                                                  #                TIMSUBO, NODIO, NODDOT, FSUBO, FDOT
052973,000142:                                                                                                  #                COSI = COS(I)   B-1
052974,000143:                                                                                                  #                SINI = SIN(I)   B-1
052975,000144:                                                                                                  #                I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
052976,000145:                                                                                                  #                PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
052977,000146: 
052978,000147:                                                                                                  #  OUTPUT
052979,000148:                                                                                                  #        MMATRIX = 3X3 M MATRIX          B-1 (STORED IN VAC AREA)
052980,000149: 
052981,000150: 26,3421           40220        MOONMX             STQ      SETPD                                 
052982,000151: 26,3422           00051                                    EARTHMXX                              
052983,000152: 26,3423           00011                                    8D                                    
052984,000153: 26,3424           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
052985,000154: 26,3425           00005                                    5                                     
052986,000155: 26,3426           65345                           DLOAD    PDDL                                  #  PD 10D        8-9D=BSUBO
052987,000156: 26,3427           15655                                    BSUBO                                 #                10-11D=BDOT
052988,000157: 26,3430           15647                                    BDOT                                  
052989,000158: 26,3431           45006                           PUSH     CALL                                  #  PD 12D
052990,000159: 26,3432           55546                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B   REVS B0
052991,000160: 26,3433           71406                           PUSH     COS                                   #  PD 10D
052992,000161: 26,3434           14041                           STODL    COB                                   #  PD 8D         COS(B) B-1
052993,000162: 26,3435           77756                           SIN                                            #                SIN(B) B-1
052994,000163: 26,3436           14043                           STODL    SOB                                   #                SETUP INPUT FOR NEWANGLE
052995,000164: 26,3437           15653                                    FSUBO                                 #                        8-9D=FSUBO
052996,000165: 26,3440           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=FDOT
052997,000166: 26,3441           15645                                    FDOT                                  
052998,000167: 26,3442           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
052999,000168: 26,3443           00004                                    4                                     
053000,000169: 26,3444           55546                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
053001,000170: 26,3445           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
053002,000171: 26,3446           15651                                    NODIO                                 #                        8-9D=NODIO
053003,000172: 26,3447           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=NODDOT
053004,000173: 26,3450           15643                                    NODDOT                                #                        MPAC=T
053005,000174: 26,3451           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
053006,000175: 26,3452           00005                                    5                                     
053007,000176: 26,3453           55546                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1247

053009,000178: 26,3454           71406                           PUSH     COS                                   #  PD 10D        8-9D= NODI REVS B0
053010,000179: 26,3455           77606                           PUSH                                           #  PD 12D        10-11D= COS(NODI) B-1
053011,000180: 26,3456           00025                           STORE    AVECTR                                
053012,000181: 26,3457           76405                           DMP      SL1R                                  
053013,000182: 26,3460           00041                                    COB                                   #                        COS(NODI) B-1
053014,000183: 26,3461           14035                           STODL    BVECTR     +2                         #  PD 10D  20-25D=AVECTR=COB*SIN(NODI)
053015,000184: 26,3462           76405                           DMP      SL1R                                  #                        SOB*SIN(NODI)
053016,000185: 26,3463           00043                                    SOB                                   
053017,000186: 26,3464           14037                           STODL    BVECTR     +4                         #  PD 8D
053018,000187: 26,3465           41556                           SIN      PUSH                                  #  PD 10D                -SIN(NODI) B-1
053019,000188: 26,3466           77676                           DCOMP                                          #          26-31D=BVECTR=COB*COS(NODI)
053020,000189: 26,3467           14033                           STODL    BVECTR                                #  PD 8D                 SOB*COS(NODI)
053021,000190: 26,3470           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
053022,000191: 26,3471           14007                           STODL    504F                                  
053023,000192: 26,3472           76405                           DMP      SL1R                                  
053024,000193: 26,3473           00041                                    COB                                   
053025,000194: 26,3474           14027                           STODL    AVECTR     +2                         
053026,000195: 26,3475           00011                                    SINNODI                               #  8-9D=SIN(NODI) B-1
053027,000196: 26,3476           76405                           DMP      SL1R                                  
053028,000197: 26,3477           00043                                    SOB                                   
053029,000198: 26,3500           14031                           STODL    AVECTR     +4                         #                        0
053030,000199: 26,3501           15335                                    HI6ZEROS                              #        8-13D= CVECTR=  -SOB B-1
053031,000200: 26,3502           57525                           PDDL     DCOMP                                 #  PD 10D                COB
053032,000201: 26,3503           00043                                    SOB                                   
053033,000202: 26,3504           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
053034,000203: 26,3505           00041                                    COB                                   
053035,000204: 26,3506           00033                                    BVECTR                                
053036,000205: 26,3507           63361                           VXSC     PDVL                                  #  PD 20D        BVECTR*SINI B-2
053037,000206: 26,3510           15641                                    SINI                                  
053038,000207: 26,3511           00011                                    CVECTR                                
053039,000208: 26,3512           53361                           VXSC     VAD                                   #  PD 14D        CVECTR*COSI B-2
053040,000209: 26,3513           15637                                    COSI                                  
053041,000210: 26,3514           77772                           VSL1                                           
053042,000211: 26,3515           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI B-1
053043,000212: 26,3516           63361                           VXSC     PDVL                                  #  PD 14D
053044,000213: 26,3517           15641                                    SINI                                  #                CVECTR*SINI B-2
053045,000214: 26,3520           00033                                    BVECTR                                
053046,000215: 26,3521           52361                           VXSC     VSU                                   #  PD 8D         BVECTR*COSI B-2
053047,000216: 26,3522           15637                                    COSI                                  
053048,000217: 26,3523           65372                           VSL1     PDDL                                  #  PD 14D
053049,000218: 26,3524           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
053050,000219: 26,3525           74346                           COS      VXSC                                  
053051,000220: 26,3526           00011                                    DVECTR                                
053052,000221: 26,3527           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF B-2
053053,000222: 26,3530           00007                                    504F                                  
053054,000223: 26,3531           52361                           VXSC     VSU                                   #  PD 14D        AVECTR*SINF B-2
053055,000224: 26,3532           00025                                    AVECTR                                
053056,000225: 26,3533           77772                           VSL1                                           
053057,000226: 26,3534           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF B-1
053058,000227: 26,3535           00007                                    504F                                  

Page 1248

053060,000229: 26,3536           74356                           SIN      VXSC                                  #  PD 8D
053061,000230: 26,3537           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
053062,000231: 26,3540           00007                                    504F                                  
053063,000232: 26,3541           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
053064,000233: 26,3542           00025                                    AVECTR                                
053065,000234: 26,3543           57572                           VSL1     VCOMP                                 
053066,000235: 26,3544           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF) B-1
053067,000236: 26,3545           00051                                    EARTHMXX                              
053068,000237: 
053069,000238:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
053070,000239:                                                                                                  #  8-9D= XO (REVS B-0), PUSHLOC SET AT 12D
053071,000240:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
053072,000241:                                                                                                  #                        AND B+27 FOR FDOT
053073,000242:                                                                                                  #  X1=DIFFERENCE IN 23 AND SCALING OF XDOT, =0 FOR WEARTH, 5 FOR NODDOT AND
053074,000243:                                                                                                  #                                        BDOT AND 4 FOR FDOT
053075,000244:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
053076,000245: 
053077,000246: 26,3546           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
053078,000247: 26,3547           00007                                    6D                                    
053079,000248: 26,3550           20617                                    14D                                   
053080,000249: 26,3551           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
053081,000250: 26,3552           01707                                    TIMSUBO                               
053082,000251: 26,3553           00155                                    MPAC                                  
053083,000252: 26,3554           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
053084,000253: 26,3555           00020                                    TIMSUBM    +1                         
053085,000254: 26,3556           77605                           DMP                                            #  PD 10D        MULT BY XDOT IN 10-11D
053086,000255: 26,3557           43257                           SL*      DAD                                   #  PD 8D         ADD XO IN 8-9D AFTER SHIFTING
053087,000256: 26,3560           20206                                    5,1                                   #                SUCH THAT SCALING IS B-0
053088,000257: 26,3561           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
053089,000258: 26,3562           00017                                    TIMSUBM                               
053090,000259: 26,3563           41261                           SL       DMP                                   
053091,000260: 26,3564           20212                                    9D                                    
053092,000261: 26,3565           00013                                    10D                                   #  XDOT
053093,000262: 26,3566           43257                           SL*      DAD                                   #  PD 8D         SHIFT SUCH THAT THIS PART OF X
053094,000263: 26,3567           20213                                    10D,1                                 #                IS SCALED REVS/CSEC B-0
053095,000264: 26,3570           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
053096,000265: 26,3571           55572                                    +1                                    #  INSTRUCTION BEFORE EXITING
053097,000266: 26,3572           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)       REVS B0
053098,000267: 

Page 1249

053100,000269:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
053101,000270:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
053102,000271: 
053103,000272:                                                                                                  #  CALLING SEQUENCE
053104,000273:                                                                                                  #        L       CALL
053105,000274:                                                                                                  #        L+1             EARTHMX
053106,000275: 
053107,000276:                                                                                                  #  SUBROUTINES USED
053108,000277:                                                                                                  #        NEWANGLE
053109,000278: 
053110,000279:                                                                                                  #  INPUT
053111,000280:                                                                                                  #        INPUT AVAILABLE FROM LAUNCH DATA        AZO REVS B-0
053112,000281:                                                                                                  #                                                TEPHEM CSEC B-42
053113,000282:                                                                                                  #        6-7D= TIME CSEC B-28
053114,000283: 
053115,000284:                                                                                                  #  OUTPUT
053116,000285:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1 (STORED IN VAC AREA)
053117,000286: 
053118,000287: 26,3573           40220        EARTHMX            STQ      SETPD                                 #  SET 8-9D=AZO
053119,000288: 26,3574           00051                                    EARTHMXX                              
053120,000289: 26,3575           00011                                    8D                                    #  10-11D=WEARTH
053121,000290: 26,3576           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
053122,000291: 26,3577           00000                                    0                                     
053123,000292: 26,3600           65345                           DLOAD    PDDL                                  #  LEAVING PD SET AT 12D FOR NEWANGLE
053124,000293: 26,3601           01712                                    AZO                                   
053125,000294: 26,3602           15657                                    WEARTH                                
053126,000295: 26,3603           45006                           PUSH     CALL                                  
053127,000296: 26,3604           55546                                    NEWANGLE                              
053128,000297: 26,3605           41401                           SETPD    PUSH                                  #  18-19D=504AZ
053129,000298: 26,3606           00023                                    18D                                   #                         COS(AZ)   SIN(AZ)     0
053130,000299: 26,3607           65346                           COS      PDDL                                  #  20-37D=  MMATRIX=     -SIN(AZ)   COS(AZ)     0    B-1
053131,000300: 26,3610           00023                                    504AZ                                 #                            0         0        1
053132,000301: 26,3611           65356                           SIN      PDDL                                  
053133,000302: 26,3612           15335                                    HI6ZEROS                              
053134,000303: 26,3613           73525                           PDDL     SIN                                   
053135,000304: 26,3614           00023                                    504AZ                                 
053136,000305: 26,3615           65276                           DCOMP    PDDL                                  
053137,000306: 26,3616           00023                                    504AZ                                 
053138,000307: 26,3617           63346                           COS      PDVL                                  
053139,000308: 26,3620           15335                                    HI6ZEROS                              
053140,000309: 26,3621           41525                           PDDL     PUSH                                  
053141,000310: 26,3622           15333                                    HIDPHALF                              
053142,000311: 26,3623           77650                           GOTO                                           
053143,000312: 26,3624           00051                                    EARTHMXX                              
053144,000313: 

Page 1250

053146,000315:                                                                                                  #  ..... EARTHL SUBROUTINE .....
053147,000316:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
053148,000317: 
053149,000318:                                                                                                  #  CALLING SEQUENCE
053150,000319:                                                                                                  #        L       CALL
053151,000320:                                                                                                  #        L+1             EARTHL
053152,000321: 
053153,000322:                                                                                                  #  INPUT
053154,000323:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
053155,000324: 
053156,000325:                                                                                                  #  OUTPUT
053157,000326:                                                                                                  #                -AX
053158,000327:                                                                                                  #        MPAC=   -AY     RADIANS B-0
053159,000328:                                                                                                  #                  0
053160,000329: 
053161,000330: 26,3625           57545        EARTHL             DLOAD    DCOMP                                 
053162,000331: 26,3626           01716                                    AXO                                   
053163,000332: 26,3627           14017                           STODL    504LPL                                
053164,000333: 26,3630           01714                                    -AYO                                  
053165,000334: 26,3631           14021                           STODL    504LPL     +2                         
053166,000335: 26,3632           15335                                    HI6ZEROS                              
053167,000336: 26,3633           24023                           STOVL    504LPL     +4                         
053168,000337: 26,3634           00017                                    504LPL                                
053169,000338: 26,3635           77616                           RVQ                                            
053170,000339: 

Page 1251

053172,000341:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
053173,000342: 
053174,000343: 26,3636  04,3560               1B1                =        DP1/2                                 #  1 SCALED B-1
053175,000344: 26,3636           17775 01734  COSI               2DEC     .99964115  B-1                        #  COS(1 DEG 32.1 MIN) B-1
053176,000345: 
053177,000346: 26,3640           00333 16153  SINI               2DEC     .02678760  B-1                        #  SIN(1 DEG 32.1 MIN) B-1
053178,000347: 
053179,000348: 26,3642  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
053180,000349: 26,3642  0000051               EARTHMXX           =        S2                                    #  EARTHMX, MOONMX SUBR. EXITS
053181,000350: 26,3642                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
053182,000351: 26,3642                        SINNODI            =        8D                                    #  2             SIN(NODI)
053183,000352: 26,3642                        DVECTR             =        8D                                    #  6             D VECTOR MOON
053184,000353: 26,3642                        CVECTR             =        8D                                    #  6             C VECTR MOON
053185,000354: 26,3642                        504AZ              =        18D                                   #  2             AZ
053186,000355: 26,3642                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
053187,000356: 26,3642                        504LPL             =        14D                                   #  6             L OR LP VECTOR
053188,000357: 26,3642                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
053189,000358: 26,3642                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
053190,000359: 26,3642                        MMATRIX            =        20D                                   #  18            M MATRIX
053191,000360: 26,3642                        COB                =        32D                                   #  2             COS(B) B-1
053192,000361: 26,3642                        SOB                =        34D                                   #  2             SIN(B) B-1
053193,000362: 26,3642                        504F               =        6D                                    #  2             F(MOON)
053194,000363: 26,3642           77665 42175  NODDOT             2DEC     -.457335143 E-2                        #  REVS/CSEC B+28=-1.07047016 E-6  RAD/SEC
053195,000364: 
053196,000365: 26,3644           22211 00265  FDOT               2DEC     .570862491                            #  REVS/CSEC B+27= 2.67240019 E-6  RAD/SEC
053197,000366: 
053198,000367: 26,3646           77777 77767  BDOT               2DEC     -3.07500412 E-8                        #  REVS/CSEC B+28=-7.19756666 E-14 RAD/SEC
053199,000368: 
053200,000369: 26,3650           41215 66331  NODIO              2DEC     -.960101269                            #  REVS B-0      =-6.03249419      RAD
053201,000370: 
053202,000371: 26,3652           15237 26751  FSUBO              2DEC     .415998375                            #  REVS B-0      = 2.61379488      RAD
053203,000372: 
053204,000373: 26,3654           02052 35713  BSUBO              2DEC     .0651205006                            #  REVS B=0      = 0.409164173     RAD
053205,000374: 
053206,000375: 26,3656           37116 32630  WEARTH             2DEC     .973561855                            #  REVS/CSEC B+23= 7.29211515 E-5  RAD/SEC
053207,000376: 

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