Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 237 OF AGC PROGRAM COLOSSUS 
	BY NASA 2021111-031  1:17 AUG. 24, 1968
Note that the date is the date of the printout, not the date of the program revision.

051347,000002:                                                                                                  ## Copyright:   Public domain.
051348,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
051349,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
051350,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
051351,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
051352,000007:                                                                                                  ## Assembler:   yaYUL
051353,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
051354,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051355,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
051356,000011:                                                                                                  ## Mod history: 2011-04-13 JL   Adapted from corresponding Colossus 249 file.
051357,000012:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
051358,000013:                                                                                                  ##                              and fixed errors found.
051359,000014:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
051360,000015:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
051361,000016: 

Page 1210

051363,000018:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
051364,000019:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM,EITHER
051365,000020:                                                                                                  #   EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
051366,000021: 
051367,000022:                                                                                                  #   R=MT(T)*(RP+LPXRP)    MT= M MATRIX TRANSPOSE
051368,000023: 
051369,000024:                                                                                                  #  CALLING SEQUENCE
051370,000025:                                                                                                  #   L       CALL
051371,000026:                                                                                                  #   L+1            RP-TO-R
051372,000027: 
051373,000028:                                                                                                  #  SUBROUTINES USED
051374,000029:                                                                                                  #   EARTHMX,MOONMX,EARTHL
051375,000030: 
051376,000031:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
051377,000032:                                                                                                  #      504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
051378,000033:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM   RADIANS  B0
051379,000034:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
051380,000035: 
051381,000036:                                                                                                  #  INPUT
051382,000037:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
051383,000038:                                                                                                  #   0-5D= RP VECTOR
051384,000039:                                                                                                  #   6-7D= TIME
051385,000040: 
051386,000041:                                                                                                  #  OUTPUT
051387,000042:                                                                                                  #   MPAC= R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
051388,000043: 
051389,000044: 26,2000                                           SETLOC   PLANTIN                               
051390,000045: 26,2000                                           BANK                                           
051391,000046: 
051392,000047: 26,3341                                           COUNT*   $$/LUROT                              
051393,000048: 
051394,000049: 26,3341           46020        RP-TO-R            STQ      BHIZ                                  
051395,000050: 26,3342           00050                                    RPREXIT                               
051396,000051: 26,3343           55356                                    RPTORA                                
051397,000052: 26,3344           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
051398,000053: 26,3345           55416                                    MOONMX                                #  LP=LM FOR MOON  RADIANS B0
051399,000054: 26,3346           77775                           VLOAD                                          
051400,000055: 26,3347           02012                                    504LM                                 
051401,000056: 26,3350           53235        RPTORB             VXV      VAD                                   
051402,000057: 26,3351           00001                                    504RPR                                
051403,000058: 26,3352           00001                                    504RPR                                
051404,000059: 26,3353           52105                           VXM      GOTO                                  
051405,000060: 26,3354           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
051406,000061: 26,3355           55404                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
051407,000062: 26,3356           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
051408,000063: 26,3357           55570                                    EARTHMX                               #  M MATRIX B-1
051409,000064: 26,3360           77624                           CALL                                           
051410,000065: 26,3361           55622                                    EARTHL                                #  L VECTOR RADIANS B0
051411,000066: 26,3362           76521                           MXV      VSL1                                  #  LP=M(T)*L  RAD B-0
051412,000067: 26,3363           00025                                    MMATRIX                               

Page 1211

051414,000069: 26,3364           77650                           GOTO                                           
051415,000070: 26,3365           55350                                    RPTORB                                
051416,000071: 

Page 1212

051418,000073:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
051419,000074:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
051420,000075:                                                                                                  #   (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
051421,000076: 
051422,000077:                                                                                                  #   RP=M(T)*(R-LXR)
051423,000078: 
051424,000079:                                                                                                  #  CALLING SEQUENCE
051425,000080:                                                                                                  #   L       CALL
051426,000081:                                                                                                  #   L+1            R-TO-RP
051427,000082: 
051428,000083:                                                                                                  #  SUBROUTINES USED
051429,000084:                                                                                                  #   EARTHMX,MOONMX,EARTHL
051430,000085: 
051431,000086:                                                                                                  #  INPUT
051432,000087:                                                                                                  #   MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
051433,000088:                                                                                                  #   0-5D= R VECTOR
051434,000089:                                                                                                  #   6-7D= TIME
051435,000090: 
051436,000091:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
051437,000092:                                                                                                  #      504LM= THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
051438,000093:                                                                                                  #      IN THE MOON-FIXED COORD. SYSTEM   RADIANS B0
051439,000094:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
051440,000095: 
051441,000096:                                                                                                  #  OUTPUT
051442,000097:                                                                                                  #   MPAC=RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
051443,000098: 
051444,000099: 26,3366           46020        R-TO-RP            STQ      BHIZ                                  
051445,000100: 26,3367           00050                                    RPREXIT                               
051446,000101: 26,3370           55410                                    RTORPA                                
051447,000102: 26,3371           77624                           CALL                                           
051448,000103: 26,3372           55416                                    MOONMX                                
051449,000104: 26,3373           61375                           VLOAD    VXM                                   
051450,000105: 26,3374           02012                                    504LM                                 #  LP=LM
051451,000106: 26,3375           00025                                    MMATRIX                               
051452,000107: 26,3376           77772                           VSL1                                           #   L=MT(T)*LP  RADIANS B0
051453,000108: 26,3377           51235        RTORPB             VXV      BVSU                                  
051454,000109: 26,3400           00001                                    504RPR                                
051455,000110: 26,3401           00001                                    504RPR                                
051456,000111: 26,3402           77721                           MXV                                            #  M(T)*(R-LXR) B-2
051457,000112: 26,3403           00025                                    MMATRIX                               
051458,000113: 26,3404           40372        RPRPXXXX           VSL1     SETPD                                 
051459,000114: 26,3405           00001                                    0D                                    
051460,000115: 26,3406           77650                           GOTO                                           
051461,000116: 26,3407           00050                                    RPREXIT                               
051462,000117: 26,3410           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
051463,000118: 26,3411           55570                                    EARTHMX                               
051464,000119: 26,3412           77624                           CALL                                           
051465,000120: 26,3413           55622                                    EARTHL                                
051466,000121: 26,3414           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0) RAD B-0
051467,000122: 26,3415           55377                                    RTORPB                                
051468,000123: 

Page 1213

051470,000125:                                                                                                  #  ..... MOONMX SUBROUTINE .....
051471,000126:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
051472,000127: 
051473,000128:                                                                                                  #  CALLING SEQUENCE
051474,000129:                                                                                                  #   L       CALL
051475,000130:                                                                                                  #   L+1            MOONMX
051476,000131: 
051477,000132:                                                                                                  #  SUBROUTINES USED
051478,000133:                                                                                                  #   NEWANGLE
051479,000134: 
051480,000135:                                                                                                  #  INPUT
051481,000136:                                                                                                  #   6-7D= TIME
051482,000137:                                                                                                  #     ITEMS AVAILABLE FROM LAUNCH DATA
051483,000138:                                                                                                  #      BSUBO,BDOT
051484,000139:                                                                                                  #      TIMSUBO,NODIO,NODDOT,FSUBO,FDOT
051485,000140:                                                                                                  #      COSI= COS(I) B-1
051486,000141:                                                                                                  #      SINI= SIN(I) B-1
051487,000142:                                                                                                  #        I  IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
051488,000143:                                                                                                  #        PLANE OF THE ECLIPTIC  (1 DEGREE 32.1 MINUTES)
051489,000144: 
051490,000145:                                                                                                  #  OUTPUT
051491,000146:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
051492,000147: 
051493,000148: 26,3416           40220        MOONMX             STQ      SETPD                                 
051494,000149: 26,3417           00051                                    EARTHMXX                              
051495,000150: 26,3420           00011                                    8D                                    
051496,000151: 26,3421           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
051497,000152: 26,3422           00005                                    5                                     
051498,000153: 26,3423           65345                           DLOAD    PDDL                                  #  PD 10D            8-9D=BSUBO
051499,000154: 26,3424           15652                                    BSUBO                                 #                    10-11D=BDOT
051500,000155: 26,3425           15644                                    BDOT                                  
051501,000156: 26,3426           45006                           PUSH     CALL                                  #  PD 12D
051502,000157: 26,3427           55543                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B  REVS B0
051503,000158: 26,3430           71406                           PUSH     COS                                   #  PD 10D
051504,000159: 26,3431           14041                           STODL    COB                                   #  PD 8D    COS(B) B-1
051505,000160: 26,3432           77756                           SIN                                            #           SIN(B) B-1
051506,000161: 26,3433           14043                           STODL    SOB                                   #            SETUP INPUT FOR NEWANGLE
051507,000162: 26,3434           15650                                    FSUBO                                 #                      8-9D=FSUBO
051508,000163: 26,3435           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=FDOT
051509,000164: 26,3436           15642                                    FDOT                                  
051510,000165: 26,3437           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
051511,000166: 26,3440           00004                                    4                                     
051512,000167: 26,3441           55543                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
051513,000168: 26,3442           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
051514,000169: 26,3443           15646                                    NODIO                                 #                      8-9D=NODIO
051515,000170: 26,3444           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D   10-11D=NODDOT
051516,000171: 26,3445           15640                                    NODDOT                                #                      MPAC=T
051517,000172: 26,3446           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
051518,000173: 26,3447           00005                                    5                                     
051519,000174: 26,3450           55543                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1214

051521,000176: 26,3451           71406                           PUSH     COS                                   #  PD 10D   8-9D= NODI  REVS  B0
051522,000177: 26,3452           77606                           PUSH                                           #  PD 12D 10-11D= COS(NODI)  B-1
051523,000178: 26,3453           00025                           STORE    AVECTR                                
051524,000179: 26,3454           76405                           DMP      SL1R                                  
051525,000180: 26,3455           00041                                    COB                                   #                          COS(NODI)    B-1
051526,000181: 26,3456           14035                           STODL    BVECTR     +2                         #  PD 10D   20-25D=AVECTR= COB*SIN(NODI)
051527,000182: 26,3457           76405                           DMP      SL1R                                  #                          SOB*SIN(NODI)
051528,000183: 26,3460           00043                                    SOB                                   
051529,000184: 26,3461           14037                           STODL    BVECTR     +4                         #  PD 8D
051530,000185: 26,3462           41556                           SIN      PUSH                                  #  PD 10D                  -SIN(NODI)   B-1
051531,000186: 26,3463           77676                           DCOMP                                          #           26-31D=BVECTR= COB*COS(NODI)
051532,000187: 26,3464           14033                           STODL    BVECTR                                #  PD 8D                   SOB*COS(NODI)
051533,000188: 26,3465           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
051534,000189: 26,3466           14007                           STODL    504F                                  
051535,000190: 26,3467           76405                           DMP      SL1R                                  
051536,000191: 26,3470           00041                                    COB                                   
051537,000192: 26,3471           14027                           STODL    AVECTR     +2                         
051538,000193: 26,3472           00011                                    SINNODI                               #  8-9D=SIN(NODI)  B-1
051539,000194: 26,3473           76405                           DMP      SL1R                                  
051540,000195: 26,3474           00043                                    SOB                                   
051541,000196: 26,3475           14031                           STODL    AVECTR     +4                         #                           0
051542,000197: 26,3476           15332                                    HI6ZEROS                              #          8-13D= CVECTR= -SOB  B-1
051543,000198: 26,3477           57525                           PDDL     DCOMP                                 #  PD 10D                  COB
051544,000199: 26,3500           00043                                    SOB                                   
051545,000200: 26,3501           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
051546,000201: 26,3502           00041                                    COB                                   
051547,000202: 26,3503           00033                                    BVECTR                                
051548,000203: 26,3504           63361                           VXSC     PDVL                                  #  PD 20D         BVECTR*SINI  B-2
051549,000204: 26,3505           15636                                    SINI                                  
051550,000205: 26,3506           00011                                    CVECTR                                
051551,000206: 26,3507           53361                           VXSC     VAD                                   #  PD 14D         CVECTR*COSI  B-2
051552,000207: 26,3510           15634                                    COSI                                  
051553,000208: 26,3511           77772                           VSL1                                           
051554,000209: 26,3512           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI  B-1
051555,000210: 26,3513           63361                           VXSC     PDVL                                  #  PD 14D
051556,000211: 26,3514           15636                                    SINI                                  #                 CVECTR*SINI  B-2
051557,000212: 26,3515           00033                                    BVECTR                                
051558,000213: 26,3516           52361                           VXSC     VSU                                   #  PD 8D          BVECTR*COSI  B-2
051559,000214: 26,3517           15634                                    COSI                                  
051560,000215: 26,3520           65372                           VSL1     PDDL                                  #  PD 14D
051561,000216: 26,3521           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
051562,000217: 26,3522           74346                           COS      VXSC                                  
051563,000218: 26,3523           00011                                    DVECTR                                
051564,000219: 26,3524           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF  B-2
051565,000220: 26,3525           00007                                    504F                                  
051566,000221: 26,3526           52361                           VXSC     VSU                                   #  PD 14D          AVECTR*SINF  B-2
051567,000222: 26,3527           00025                                    AVECTR                                
051568,000223: 26,3530           77772                           VSL1                                           
051569,000224: 26,3531           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF  B-1
051570,000225: 26,3532           00007                                    504F                                  

Page 1215

051572,000227: 26,3533           74356                           SIN      VXSC                                  #  PD 8D
051573,000228: 26,3534           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
051574,000229: 26,3535           00007                                    504F                                  
051575,000230: 26,3536           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
051576,000231: 26,3537           00025                                    AVECTR                                
051577,000232: 26,3540           57572                           VSL1     VCOMP                                 
051578,000233: 26,3541           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF)  B-1
051579,000234: 26,3542           00051                                    EARTHMXX                              
051580,000235:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
051581,000236:                                                                                                  #  8-9D= XO (REVS B-0),PUSHLOC SET AT 12D
051582,000237:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
051583,000238:                                                                                                  #                          AND B+27 FOR FDOT
051584,000239:                                                                                                  #   X1=DIFFERENCE IN 23 AND SCALING OF XDOT,=0 FOR WEARTH,5 FOR NODDOT AND
051585,000240:                                                                                                  #                                           BDOT AND 4 FOR FDOT
051586,000241:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
051587,000242: 
051588,000243: 26,3543           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
051589,000244: 26,3544           00007                                    6D                                    
051590,000245: 26,3545           20617                                    14D                                   
051591,000246: 26,3546           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
051592,000247: 26,3547           01707                                    TIMSUBO                               
051593,000248: 26,3550           00155                                    MPAC                                  
051594,000249: 26,3551           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
051595,000250: 26,3552           00020                                    TIMSUBM    +1                         
051596,000251: 26,3553           77605                           DMP                                            #  PD 10D  MULT BY XDOT IN 10-11D
051597,000252: 26,3554           43257                           SL*      DAD                                   #  PD 8D   ADD XO IN 8-9D AFTER SHIFTING
051598,000253: 26,3555           20206                                    5,1                                   #          SUCH THAT SCALING IS B-0
051599,000254: 26,3556           67206                           PUSH     SLOAD                                 #  PD 10D SAVE PARTIAL (X0+XDOT*T) IN 8-9D
051600,000255: 26,3557           00017                                    TIMSUBM                               
051601,000256: 26,3560           41261                           SL       DMP                                   
051602,000257: 26,3561           20212                                    9D                                    
051603,000258: 26,3562           00013                                    10D                                   #  XDOT
051604,000259: 26,3563           43257                           SL*      DAD                                   #  PD 8D   SHIFT SUCH THAT THIS PART OF X
051605,000260: 26,3564           20213                                    10D,1                                 #          IS SCALED REVS/CSEC B-0
051606,000261: 26,3565           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
051607,000262: 26,3566           55567                                    +1                                    #  INSTRUCTION BEFORE EXITING
051608,000263: 26,3567           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)  REVS B0
051609,000264: 

Page 1216

051611,000266:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
051612,000267:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
051613,000268: 
051614,000269:                                                                                                  #  CALLING SEQUENCE
051615,000270:                                                                                                  #   L       CALL
051616,000271:                                                                                                  #   L+1            EARTHMX
051617,000272: 
051618,000273:                                                                                                  #  SUBROUTINES USED
051619,000274:                                                                                                  #   NEWANGLE
051620,000275: 
051621,000276:                                                                                                  #  INPUT
051622,000277:                                                                                                  #     INPUT AVAILABLE FROM LAUNCH DATA     AZO  REVS B-0
051623,000278:                                                                                                  #                                          TEPHEM  CSEC B-42
051624,000279:                                                                                                  #   6-7D= TIME CSEC B-28
051625,000280: 
051626,000281:                                                                                                  #  OUTPUT
051627,000282:                                                                                                  #   MMATRIX= 3X3 M MATRIX B-1   (STORED IN VAC AREA)
051628,000283: 
051629,000284: 26,3570           40220        EARTHMX            STQ      SETPD                                 #  SET   8-9D=AZO
051630,000285: 26,3571           00051                                    EARTHMXX                              
051631,000286: 26,3572           00011                                    8D                                    #  10-11D=WEARTH
051632,000287: 26,3573           77770                           AXT,1                                          #  FOR SL 5, AND SL 10  IN NEWANGLE
051633,000288: 26,3574           00000                                    0                                     
051634,000289: 26,3575           65345                           DLOAD    PDDL                                  #    LEAVING PD SET AT 12D FOR NEWANGLE
051635,000290: 26,3576           01712                                    AZO                                   
051636,000291: 26,3577           15654                                    WEARTH                                
051637,000292: 26,3600           45006                           PUSH     CALL                                  
051638,000293: 26,3601           55543                                    NEWANGLE                              
051639,000294: 26,3602           41401                           SETPD    PUSH                                  #  18-19D=504AZ
051640,000295: 26,3603           00023                                    18D                                   #                     COS(AZ) SIN(AZ) 0
051641,000296: 26,3604           65346                           COS      PDDL                                  #  20-37D=  MMATRIX= -SIN(AZ) COS(AZ) 0 B-1
051642,000297: 26,3605           00023                                    504AZ                                 #                      0       0      1
051643,000298: 26,3606           65356                           SIN      PDDL                                  
051644,000299: 26,3607           15332                                    HI6ZEROS                              
051645,000300: 26,3610           73525                           PDDL     SIN                                   
051646,000301: 26,3611           00023                                    504AZ                                 
051647,000302: 26,3612           65276                           DCOMP    PDDL                                  
051648,000303: 26,3613           00023                                    504AZ                                 
051649,000304: 26,3614           63346                           COS      PDVL                                  
051650,000305: 26,3615           15332                                    HI6ZEROS                              
051651,000306: 26,3616           41525                           PDDL     PUSH                                  
051652,000307: 26,3617           15330                                    HIDPHALF                              
051653,000308: 26,3620           77650                           GOTO                                           
051654,000309: 26,3621           00051                                    EARTHMXX                              
051655,000310: 

Page 1217

051657,000312:                                                                                                  #  ..... EARTHL SUBROUTINE .....
051658,000313:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
051659,000314: 
051660,000315:                                                                                                  #  CALLING SEQUENCE
051661,000316:                                                                                                  #   L       CALL
051662,000317:                                                                                                  #   L+1            EARTHL
051663,000318: 
051664,000319:                                                                                                  #  INPUT
051665,000320:                                                                                                  #   AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
051666,000321: 
051667,000322:                                                                                                  #  OUTPUT
051668,000323:                                                                                                  #            -AX
051669,000324:                                                                                                  #    MPAC=   -AY    RADIANS B-0
051670,000325:                                                                                                  #              0
051671,000326: 
051672,000327: 26,3622           57545        EARTHL             DLOAD    DCOMP                                 
051673,000328: 26,3623           01716                                    AXO                                   
051674,000329: 26,3624           14017                           STODL    504LPL                                
051675,000330: 26,3625           01714                                    -AYO                                  
051676,000331: 26,3626           14021                           STODL    504LPL     +2                         
051677,000332: 26,3627           15332                                    HI6ZEROS                              
051678,000333: 26,3630           24023                           STOVL    504LPL     +4                         
051679,000334: 26,3631           00017                                    504LPL                                
051680,000335: 26,3632           77616                           RVQ                                            
051681,000336: 

Page 1218

051683,000338:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
051684,000339: 26,3633  04,3450               1B1                =        DP1/2                                 #  1 SCALED B-1
051685,000340: 26,3633           17775 01734  COSI               2DEC     .99964115  B-1                        #  COS(1 DEG 32.1 MIN) B-1
051686,000341: 26,3635           00333 16153  SINI               2DEC     .02678760  B-1                        #  SIN(1 DEG 32.1 MIN) B-1
051687,000342: 26,3637  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
051688,000343: 26,3637  0000051               EARTHMXX           =        S2                                    #  EARTHMX,MOONMX SUBR. EXITS
051689,000344: 26,3637                        504RPR             =        0D                                    #  6 REGS  R OR RP VECTOR
051690,000345: 26,3637                        SINNODI            =        8D                                    #  2       SIN(NODI)
051691,000346: 26,3637                        DVECTR             =        8D                                    #  6       D VECTOR MOON
051692,000347: 26,3637                        CVECTR             =        8D                                    #  6       C VECTR MOON
051693,000348: 26,3637                        504AZ              =        18D                                   #  2      AZ
051694,000349: 26,3637                        TIMSUBM            =        14D                                   #  3       TIME SUB M (MOON) T+T0 IN GETAZ
051695,000350: 26,3637                        504LPL             =        14D                                   #  6       L OR LP VECTOR
051696,000351: 26,3637                        AVECTR             =        20D                                   #  6       A VECTOR (MOON)
051697,000352: 26,3637                        BVECTR             =        26D                                   #  6       B VECTOR (MOON)
051698,000353: 26,3637                        MMATRIX            =        20D                                   #  18      M MATRIX
051699,000354: 26,3637                        COB                =        32D                                   #  2       COS(B) B-1
051700,000355: 26,3637                        SOB                =        34D                                   #  2       SIN(B) B-1
051701,000356: 26,3637                        504F               =        6D                                    #  2       F(MOON)
051702,000357: 26,3637           77665 42175  NODDOT             2DEC     -.457335143 E-2                        #  REVS/CSEC B+28=-1.07047016 E-6  RAD/SEC
051703,000358: 26,3641           22211 00265  FDOT               2DEC     .570862491                            #  REVS/CSEC B+27= 2.67240019 E-6  RAD/SEC
051704,000359: 26,3643           77777 77767  BDOT               2DEC     -3.07500412 E-8                        #  REVS/CSEC B+28=-7.19756666 E-14 RAD/SEC
051705,000360: 26,3645           41215 66331  NODIO              2DEC     -.960101269                            #  REVS B-0    = -6.03249419  RAD
051706,000361: 26,3647           15237 26751  FSUBO              2DEC     .415998375                            #  REVS B-0    =  2.61379488  RAD
051707,000362: 26,3651           02052 35713  BSUBO              2DEC     .0651205006                            #  REVS B=0    =  0.409164173 RAD
051708,000363: 26,3653           37116 32630  WEARTH             2DEC     .973561855                            #  REVS/CSEC B+23=7.29211515 E-5 RAD/SEC

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