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.

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

Page 1210

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

Page 1211

051422,000069: 26,3364           77650                           GOTO                                           
051423,000070: 26,3365           55350                                    RPTORB                                
051424,000071: 

Page 1212

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

Page 1213

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

Page 1214

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

Page 1215

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

Page 1216

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

Page 1217

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

Page 1218

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