Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

049020,000002:                                                                                                  ## Copyright:   Public domain.
049021,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
049022,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
049023,000005:                                                                                                  ##              It is part of the source code for the original release
049024,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
049025,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
049026,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
049027,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
049028,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
049029,000011:                                                                                                  ##              that the code format has been changed to conform to the
049030,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
049031,000013:                                                                                                  ##              original YUL assembler.
049032,000014:                                                                                                  ## Reference:   pp. 1135-1143
049033,000015:                                                                                                  ## Assembler:   yaYUL
049034,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
049035,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
049036,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
049037,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
049038,000020:                                                                                                  ##              2016-12-24 RRB  Updated for Luminary 69.
049039,000021:                                                                                                  ##              2017-01-22 HG   Fix operand PLANTIN1 -> PLANTIN
049040,000022:                                                                                                  ##              2017-01-23 HG   Fix operand LO6ZEROS -> HI6ZEROS
049041,000023:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
049042,000024:                                                                                                  ##                              and fixed errors found.
049043,000025: 

Page 1135

049045,000027:                                                                                                  #  ..... RP-TO-R SUBROUTINE .....
049046,000028:                                                                                                  #  SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
049047,000029:                                                                                                  #   EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN THE BASIC REF. SYSTEM)
049048,000030: 
049049,000031:                                                                                                  #        R = MT(T)*(RP + LP X RP)        MT = M MATRIX TRANSPOSE
049050,000032: 
049051,000033:                                                                                                  #  CALLING SEQUENCE
049052,000034:                                                                                                  #        L       CALL
049053,000035:                                                                                                  #        L+1             RP-TO-R
049054,000036: 
049055,000037:                                                                                                  #  SUBROUTINES USED
049056,000038:                                                                                                  #        EARTHMX,MOONMX,EARTHL
049057,000039: 
049058,000040:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
049059,000041:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
049060,000042:                                                                                                  #                        IN THE MOON-FIXED COORD. SYSTEM         RADIANS B0
049061,000043: 
049062,000044:                                                                                                  #        ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
049063,000045: 
049064,000046:                                                                                                  #  INPUT
049065,000047:                                                                                                  #        MPAC= 0 FOR EARTH, NON-ZERO FOR MOON
049066,000048:                                                                                                  #        0-5D= RP VECTOR
049067,000049:                                                                                                  #        6-7D= TIME
049068,000050: 
049069,000051:                                                                                                  #  OUTPUT
049070,000052:                                                                                                  #        MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
049071,000053: 
049072,000054: 24,2000                                           SETLOC   PLANTIN                               
049073,000055: 24,2000                                           BANK                                           
049074,000056: 
049075,000057: 24,3504                                           COUNT*   $$/LUROT                              
049076,000058: 
049077,000059: 24,3504           46020        RP-TO-R            STQ      BHIZ                                  
049078,000060: 24,3505           00050                                    RPREXIT                               
049079,000061: 24,3506           51521                                    RPTORA                                
049080,000062: 24,3507           77624                           CALL                                           #  COMPUTE M MATRIX FOR MOON
049081,000063: 24,3510           51561                                    MOONMX                                #  LP=LM FOR MOON  RADIANS B0
049082,000064: 24,3511           77775                           VLOAD                                          
049083,000065: 24,3512           02013                                    504LM                                 
049084,000066: 24,3513           53235        RPTORB             VXV      VAD                                   
049085,000067: 24,3514           00001                                    504RPR                                
049086,000068: 24,3515           00001                                    504RPR                                
049087,000069: 24,3516           52105                           VXM      GOTO                                  
049088,000070: 24,3517           00025                                    MMATRIX                               #  MPAC=R=MT(T)*(RP+LPXRP)
049089,000071: 24,3520           51547                                    RPRPXXXX                              #  RESET PUSHLOC TO 0 BEFORE EXITING
049090,000072: 24,3521           77624        RPTORA             CALL                                           #  EARTH COMPUTATIONS
049091,000073: 24,3522           55657                                    EARTHMX                               #  M MATRIX B-1
049092,000074: 24,3523           77624                           CALL                                           
049093,000075: 24,3524           55711                                    EARTHL                                #  L VECTOR RADIANS B0
049094,000076: 24,3525           76521                           MXV      VSL1                                  #  LP=M(T)*L  RAD B-0
049095,000077: 24,3526           00025                                    MMATRIX                               

Page 1136

049097,000079: 24,3527           77650                           GOTO                                           
049098,000080: 24,3530           51513                                    RPTORB                                
049099,000081: 

Page 1137

049101,000083:                                                                                                  #  ..... R-TO-RP SUBROUTINE .....
049102,000084:                                                                                                  #  SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
049103,000085:                                                                                                  #  (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
049104,000086: 
049105,000087:                                                                                                  #        RP = M(T)*(R - L X R)
049106,000088: 
049107,000089:                                                                                                  #  CALLING SEQUENCE
049108,000090:                                                                                                  #        L       CALL
049109,000091:                                                                                                  #        L+1             R-TO-RP
049110,000092: 
049111,000093:                                                                                                  #  SUBROUTINES USED
049112,000094:                                                                                                  #        EARTHMX,MOONMX,EARTHL
049113,000095: 
049114,000096:                                                                                                  #  INPUT
049115,000097:                                                                                                  #        MPAC= 0 FOR EARTH,NON-ZERO FOR MOON
049116,000098:                                                                                                  #        0-5D= R VECTOR
049117,000099:                                                                                                  #        6-7D= TIME
049118,000100: 
049119,000101:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
049120,000102:                                                                                                  #                504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL,EXPRESSED
049121,000103:                                                                                                  #                        IN THE MOON-FIXED COORD. SYSTEM   RADIANS B0
049122,000104: 
049123,000105:                                                                                                  #        ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
049124,000106: 
049125,000107:                                                                                                  #  OUTPUT
049126,000108:                                                                                                  #        MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
049127,000109: 
049128,000110: 24,3531           46020        R-TO-RP            STQ      BHIZ                                  
049129,000111: 24,3532           00050                                    RPREXIT                               
049130,000112: 24,3533           51553                                    RTORPA                                
049131,000113: 24,3534           77624                           CALL                                           
049132,000114: 24,3535           51561                                    MOONMX                                
049133,000115: 24,3536           61375                           VLOAD    VXM                                   
049134,000116: 24,3537           02013                                    504LM                                 #  LP=LM
049135,000117: 24,3540           00025                                    MMATRIX                               
049136,000118: 24,3541           77772                           VSL1                                           #   L=MT(T)*LP  RADIANS B0
049137,000119: 24,3542           51235        RTORPB             VXV      BVSU                                  
049138,000120: 24,3543           00001                                    504RPR                                
049139,000121: 24,3544           00001                                    504RPR                                
049140,000122: 24,3545           77721                           MXV                                            #  M(T)*(R-LXR) B-2
049141,000123: 24,3546           00025                                    MMATRIX                               
049142,000124: 24,3547           40372        RPRPXXXX           VSL1     SETPD                                 
049143,000125: 24,3550           00001                                    0D                                    
049144,000126: 24,3551           77650                           GOTO                                           
049145,000127: 24,3552           00050                                    RPREXIT                               
049146,000128: 24,3553           77624        RTORPA             CALL                                           #  EARTH COMPUTATIONS
049147,000129: 24,3554           55657                                    EARTHMX                               
049148,000130: 24,3555           77624                           CALL                                           
049149,000131: 24,3556           55711                                    EARTHL                                
049150,000132: 24,3557           77650                           GOTO                                           #  MPAC=L=(-AX,-AY,0) RAD B-0
049151,000133: 24,3560           51542                                    RTORPB                                
049152,000134: 

Page 1138

049154,000136:                                                                                                  #  ..... MOONMX SUBROUTINE .....
049155,000137:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
049156,000138: 
049157,000139:                                                                                                  #  CALLING SEQUENCE
049158,000140:                                                                                                  #        L       CALL
049159,000141:                                                                                                  #        L+1             MOONMX
049160,000142: 
049161,000143:                                                                                                  #  SUBROUTINES USED
049162,000144:                                                                                                  #        NEWANGLE
049163,000145: 
049164,000146:                                                                                                  #  INPUT
049165,000147:                                                                                                  #        6-7D= TIME
049166,000148: 
049167,000149:                                                                                                  #        ITEMS AVAILABLE FROM LAUNCH DATA
049168,000150:                                                                                                  #                BSUBO,BDOT
049169,000151:                                                                                                  #                TIMSUBO,NODIO,NODDOT,FSUBO,FDOT
049170,000152:                                                                                                  #                COSI= COS(I)    B-1
049171,000153:                                                                                                  #                SINI= SIN(I)    B-1
049172,000154:                                                                                                  #                  I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
049173,000155:                                                                                                  #                  PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
049174,000156: 
049175,000157:                                                                                                  #  OUTPUT
049176,000158:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1       (STORED IN VAC AREA)
049177,000159: 
049178,000160: 24,3561           40220        MOONMX             STQ      SETPD                                 
049179,000161: 24,3562           00051                                    EARTHMXX                              
049180,000162: 24,3563           00011                                    8D                                    
049181,000163: 24,3564           77770                           AXT,1                                          #  B REQUIRES SL 0, SL 5 IN NEWANGLE
049182,000164: 24,3565           00005                                    5                                     
049183,000165: 24,3566           65345                           DLOAD    PDDL                                  #  PD 10D        8-9D=BSUBO
049184,000166: 24,3567           10017                                    BSUBO                                 #                10-11D=BDOT
049185,000167: 24,3570           10011                                    BDOT                                  
049186,000168: 24,3571           45006                           PUSH     CALL                                  #  PD 12D
049187,000169: 24,3572           51706                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= B   REVS B0
049188,000170: 24,3573           71406                           PUSH     COS                                   #  PD 10D
049189,000171: 24,3574           14041                           STODL    COB                                   #  PD 8D         COS(B) B-1
049190,000172: 24,3575           77756                           SIN                                            #                SIN(B) B-1
049191,000173: 24,3576           14043                           STODL    SOB                                   #  SETUP INPUT FOR NEWANGLE
049192,000174: 24,3577           10015                                    FSUBO                                 #                        8-9D=FSUBO
049193,000175: 24,3600           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=FDOT
049194,000176: 24,3601           10007                                    FDOT                                  
049195,000177: 24,3602           45170                           AXT,1    CALL                                  #  F REQUIRES SL 1, SL 6 IN NEWANGLE
049196,000178: 24,3603           00004                                    4                                     
049197,000179: 24,3604           51706                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= F REVS B0
049198,000180: 24,3605           14027                           STODL    AVECTR     +2                         #  SAVE F TEMP
049199,000181: 24,3606           10013                                    NODIO                                 #                        8-9D=NODIO
049200,000182: 24,3607           41525                           PDDL     PUSH                                  #  PD 10D THEN 12D       10-11D=NODDOT
049201,000183: 24,3610           10005                                    NODDOT                                #                        MPAC=T
049202,000184: 24,3611           45170                           AXT,1    CALL                                  #  NODE REQUIRES SL 0, SL 5 IN NEWANGLE
049203,000185: 24,3612           00005                                    5                                     
049204,000186: 24,3613           51706                                    NEWANGLE                              #  EXIT WITH PD 8D AND MPAC= NODI REVS B0

Page 1139

049206,000188: 24,3614           71406                           PUSH     COS                                   #  PD 10D        8-9D= NODI REVS B0
049207,000189: 24,3615           77606                           PUSH                                           #  PD 12D        10-11D= COS(NODI) B-1
049208,000190: 24,3616           00025                           STORE    AVECTR                                
049209,000191: 24,3617           76405                           DMP      SL1R                                  
049210,000192: 24,3620           00041                                    COB                                   #                         COS(NODI) B-1
049211,000193: 24,3621           14035                           STODL    BVECTR     +2                         #  PD 10D  20-25D=AVECTR= COB*SIN(NODI)
049212,000194: 24,3622           76405                           DMP      SL1R                                  #                         SOB*SIN(NODI)
049213,000195: 24,3623           00043                                    SOB                                   
049214,000196: 24,3624           14037                           STODL    BVECTR     +4                         #  PD 8D
049215,000197: 24,3625           41556                           SIN      PUSH                                  #  PD 10D                -SIN(NODI) B-1
049216,000198: 24,3626           77676                           DCOMP                                          #          26-31D=BVECTR= COB*COS(NODI)
049217,000199: 24,3627           14033                           STODL    BVECTR                                #  PD 8D                  SOB*COS(NODI)
049218,000200: 24,3630           00027                                    AVECTR     +2                         #  MOVE F FROM TEMP LOC. TO 504F
049219,000201: 24,3631           14007                           STODL    504F                                  
049220,000202: 24,3632           76405                           DMP      SL1R                                  
049221,000203: 24,3633           00041                                    COB                                   
049222,000204: 24,3634           14027                           STODL    AVECTR     +2                         
049223,000205: 24,3635           00011                                    SINNODI                               #  8-9D=SIN(NODI) B-1
049224,000206: 24,3636           76405                           DMP      SL1R                                  
049225,000207: 24,3637           00043                                    SOB                                   
049226,000208: 24,3640           14031                           STODL    AVECTR     +4                         #                         0
049227,000209: 24,3641           06424                                    HI6ZEROS                              #        8-13D= CVECTR= -SOB  B-1
049228,000210: 24,3642           57525                           PDDL     DCOMP                                 #  PD 10D                COB
049229,000211: 24,3643           00043                                    SOB                                   
049230,000212: 24,3644           63325                           PDDL     PDVL                                  #  PD 12D THEN PD 14D
049231,000213: 24,3645           00041                                    COB                                   
049232,000214: 24,3646           00033                                    BVECTR                                
049233,000215: 24,3647           63361                           VXSC     PDVL                                  #  PD 20D        BVECTR*SINI  B-2
049234,000216: 24,3650           10003                                    SINI                                  
049235,000217: 24,3651           00011                                    CVECTR                                
049236,000218: 24,3652           53361                           VXSC     VAD                                   #  PD 14D        CVECTR*COSI  B-2
049237,000219: 24,3653           10001                                    COSI                                  
049238,000220: 24,3654           77772                           VSL1                                           
049239,000221: 24,3655           24041                           STOVL    MMATRIX    +12D                       #  PD 8D  M2=BVECTR*SINI+CVECTR*COSI  B-1
049240,000222: 24,3656           63361                           VXSC     PDVL                                  #  PD 14D
049241,000223: 24,3657           10003                                    SINI                                  #                CVECTR*SINI  B-2
049242,000224: 24,3660           00033                                    BVECTR                                
049243,000225: 24,3661           52361                           VXSC     VSU                                   #  PD 8D         BVECTR*COSI  B-2
049244,000226: 24,3662           10001                                    COSI                                  
049245,000227: 24,3663           65372                           VSL1     PDDL                                  #  PD 14D
049246,000228: 24,3664           00007                                    504F                                  #  8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI  B-1
049247,000229: 24,3665           74346                           COS      VXSC                                  
049248,000230: 24,3666           00011                                    DVECTR                                
049249,000231: 24,3667           73525                           PDDL     SIN                                   #  PD 20D  14-19D= DVECTR*COSF  B-2
049250,000232: 24,3670           00007                                    504F                                  
049251,000233: 24,3671           52361                           VXSC     VSU                                   #  PD 14D          AVECTR*SINF  B-2
049252,000234: 24,3672           00025                                    AVECTR                                
049253,000235: 24,3673           77772                           VSL1                                           
049254,000236: 24,3674           14033                           STODL    MMATRIX    +6                         #  M1= AVECTR*SINF-DVECTR*COSF  B-1
049255,000237: 24,3675           00007                                    504F                                  

Page 1140

049257,000239: 24,3676           74356                           SIN      VXSC                                  #  PD 8D
049258,000240: 24,3677           71525                           PDDL     COS                                   #  PD 14D  8-13D=DVECTR*SINF B-2
049259,000241: 24,3700           00007                                    504F                                  
049260,000242: 24,3701           53361                           VXSC     VAD                                   #  PD 8D         AVECTR*COSF B-2
049261,000243: 24,3702           00025                                    AVECTR                                
049262,000244: 24,3703           57572                           VSL1     VCOMP                                 
049263,000245: 24,3704           34025                           STCALL   MMATRIX                               #  M0= -(AVECTR*COSF+DVECTR*SINF)  B-1
049264,000246: 24,3705           00051                                    EARTHMXX                              
049265,000247: 
049266,000248:                                                                                                  #  COMPUTE X=X0+(XDOT)(T+T0)
049267,000249:                                                                                                  #  8-9D= XO (REVS B-0), PUSHLOC SET AT 12D
049268,000250:                                                                                                  #  10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
049269,000251:                                                                                                  #                        AND B+27 FOR FDOT
049270,000252:                                                                                                  #   X1=DIFFERENCE IN 23 AND SCALING OF XDOT,=0 FOR WEARTH,5 FOR NODDOT AND
049271,000253:                                                                                                  #                                        BDOT AND 4 FOR FDOT
049272,000254:                                                                                                  #  6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
049273,000255: 
049274,000256: 24,3706           54345        NEWANGLE           DLOAD    SR                                    #  ENTER PD 12D
049275,000257: 24,3707           00007                                    6D                                    
049276,000258: 24,3710           20617                                    14D                                   
049277,000259: 24,3711           72371                           TAD      TLOAD                                 #  CHANGE MODE TO TP
049278,000260: 24,3712           01707                                    TIMSUBO                               
049279,000261: 24,3713           00155                                    MPAC                                  
049280,000262: 24,3714           14017                           STODL    TIMSUBM                               #  T+T0 CSEC B-42
049281,000263: 24,3715           00020                                    TIMSUBM    +1                         
049282,000264: 24,3716           77605                           DMP                                            #  PD 10D        MULT BY XDOT IN 10-11D
049283,000265: 24,3717           43257                           SL*      DAD                                   #  PD 8D         ADD XO IN 8-9D AFTER SHIFTING
049284,000266: 24,3720           20206                                    5,1                                   #                SUCH THAT SCALING IS B-0
049285,000267: 24,3721           67206                           PUSH     SLOAD                                 #  PD 10D  SAVE PARTIAL (X0+XDOT*T) IN 8-9D
049286,000268: 24,3722           00017                                    TIMSUBM                               
049287,000269: 24,3723           41261                           SL       DMP                                   
049288,000270: 24,3724           20212                                    9D                                    
049289,000271: 24,3725           00013                                    10D                                   #  XDOT
049290,000272: 24,3726           43257                           SL*      DAD                                   #  PD 8D         SHIFT SUCH THAT THIS PART OF X
049291,000273: 24,3727           20213                                    10D,1                                 #                IS SCALED REVS/CSEC B-0
049292,000274: 24,3730           77600                           BOV                                            #  TURN OFF OVERFLOW IF SET BY SHIFT
049293,000275: 24,3731           51732                                    +1                                    #  INSTRUCTION BEFORE EXITING
049294,000276: 24,3732           77616                           RVQ                                            #  MPAC=X= X0+(XDOT)(T+T0)  REVS B0
049295,000277: 

Page 1141

049297,000279:                                                                                                  #  ..... EARTHMX SUBROUTINE .....
049298,000280:                                                                                                  #  SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
049299,000281: 
049300,000282:                                                                                                  #  CALLING SEQUENCE
049301,000283:                                                                                                  #        L       CALL
049302,000284:                                                                                                  #        L+1             EARTHMX
049303,000285: 
049304,000286:                                                                                                  #  SUBROUTINES USED
049305,000287:                                                                                                  #        NEWANGLE
049306,000288: 
049307,000289:                                                                                                  #  INPUT
049308,000290:                                                                                                  #        INPUT AVAILABLE FROM LAUNCH DATA        AZO  REVS B-0
049309,000291:                                                                                                  #                                                TEPHEM  CSEC B-42
049310,000292:                                                                                                  #        6-7D= TIME CSEC B-28
049311,000293: 
049312,000294:                                                                                                  #  OUTPUT
049313,000295:                                                                                                  #        MMATRIX= 3X3 M MATRIX B-1       (STORED IN VAC AREA)
049314,000296: 
049315,000297: 26,3657                                           BANK     26                                    
049316,000298: 26,2000                                           SETLOC   PLANTIN1                              
049317,000299: 26,2000                                           BANK                                           
049318,000300: 26,3657                                           COUNT*   $$/LUROT                              
049319,000301: 
049320,000302: 26,3657           40220        EARTHMX            STQ      SETPD                                 #  SET 8-9D=AZO
049321,000303: 26,3660           00051                                    EARTHMXX                              
049322,000304: 26,3661           00011                                    8D                                    #  10-11D=WEARTH
049323,000305: 26,3662           77770                           AXT,1                                          #  FOR SL 5, AND SL 10 IN NEWANGLE
049324,000306: 26,3663           00000                                    0                                     
049325,000307: 26,3664           65345                           DLOAD    PDDL                                  #  LEAVING PD SET AT 12D FOR NEWANGLE
049326,000308: 26,3665           01712                                    AZO                                   
049327,000309: 26,3666           10021                                    WEARTH                                
049328,000310: 26,3667           45006                           PUSH     CALL                                  
049329,000311: 26,3670           51706                                    NEWANGLE                              
049330,000312: 26,3671           41401                           SETPD    PUSH                                  #  18-19D=504AZ
049331,000313: 26,3672           00023                                    18D                                   #                         COS(AZ)   SIN(AZ)     0
049332,000314: 26,3673           65346                           COS      PDDL                                  #  20-37D=  MMATRIX=     -SIN(AZ)   COS(AZ)     0    B-1
049333,000315: 26,3674           00023                                    504AZ                                 #                            0         0        1
049334,000316: 26,3675           65356                           SIN      PDDL                                  
049335,000317: 26,3676           06424                                    HI6ZEROS                              
049336,000318: 26,3677           73525                           PDDL     SIN                                   
049337,000319: 26,3700           00023                                    504AZ                                 
049338,000320: 26,3701           65276                           DCOMP    PDDL                                  
049339,000321: 26,3702           00023                                    504AZ                                 
049340,000322: 26,3703           63346                           COS      PDVL                                  
049341,000323: 26,3704           06424                                    HI6ZEROS                              
049342,000324: 26,3705           41525                           PDDL     PUSH                                  
049343,000325: 26,3706           06422                                    HIDPHALF                              
049344,000326: 26,3707           77650                           GOTO                                           
049345,000327: 26,3710           00051                                    EARTHMXX                              
049346,000328: 

Page 1142

049348,000330:                                                                                                  #  ..... EARTHL SUBROUTINE .....
049349,000331:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
049350,000332: 
049351,000333:                                                                                                  #  CALLING SEQUENCE
049352,000334:                                                                                                  #        L       CALL
049353,000335:                                                                                                  #        L+1             EARTHL
049354,000336: 
049355,000337:                                                                                                  #  INPUT
049356,000338:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
049357,000339: 
049358,000340:                                                                                                  #  OUTPUT
049359,000341:                                                                                                  #                -AX
049360,000342:                                                                                                  #        MPAC=   -AY     RADIANS B-0
049361,000343:                                                                                                  #                  0
049362,000344: 
049363,000345: 26,3711           57545        EARTHL             DLOAD    DCOMP                                 
049364,000346: 26,3712           01716                                    AXO                                   
049365,000347: 26,3713           14017                           STODL    504LPL                                
049366,000348: 26,3714           01714                                    -AYO                                  
049367,000349: 26,3715           14021                           STODL    504LPL     +2                         
049368,000350: 26,3716           06424                                    HI6ZEROS                              
049369,000351: 26,3717           24023                           STOVL    504LPL     +4                         
049370,000352: 26,3720           00017                                    504LPL                                
049371,000353: 26,3721           77616                           RVQ                                            
049372,000354: 

Page 1143

049374,000356:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
049375,000357: 
049376,000358: 26,3722  11,2272               1B1                =        DP1/2                                 #  1  SCALED B-1
049377,000359: 26,3722  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
049378,000360: 26,3722  0000051               EARTHMXX           =        S2                                    #  EARTHMX,MOONMX SUBR. EXITS
049379,000361: 26,3722                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
049380,000362: 26,3722                        SINNODI            =        8D                                    #  2             SIN(NODI)
049381,000363: 26,3722                        DVECTR             =        8D                                    #  6             D VECTOR MOON
049382,000364: 26,3722                        CVECTR             =        8D                                    #  6             C VECTR MOON
049383,000365: 26,3722                        504AZ              =        18D                                   #  2            AZ
049384,000366: 26,3722                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
049385,000367: 26,3722                        504LPL             =        14D                                   #  6             L OR LP VECTOR
049386,000368: 26,3722                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
049387,000369: 26,3722                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
049388,000370: 26,3722                        MMATRIX            =        20D                                   #  18            M MATRIX
049389,000371: 26,3722                        COB                =        32D                                   #  2             COS(B) B-1
049390,000372: 26,3722                        SOB                =        34D                                   #  2             SIN(B) B-1
049391,000373: 26,3722                        504F               =        6D                                    #  2             F(MOON)
049392,000374: 

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