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.

048997,000002:                                                                                                  ## Copyright:   Public domain.
048998,000003:                                                                                                  ## Filename:    PLANETARY_INERTIAL_ORIENTATION.agc
048999,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
049000,000005:                                                                                                  ##              It is part of the source code for the original release
049001,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
049002,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
049003,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
049004,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
049005,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
049006,000011:                                                                                                  ##              that the code format has been changed to conform to the
049007,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
049008,000013:                                                                                                  ##              original YUL assembler.
049009,000014:                                                                                                  ## Reference:   pp. 1135-1143
049010,000015:                                                                                                  ## Assembler:   yaYUL
049011,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
049012,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
049013,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
049014,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
049015,000020:                                                                                                  ##              2016-12-24 RRB  Updated for Luminary 69.
049016,000021:                                                                                                  ##              2017-01-22 HG   Fix operand PLANTIN1 -> PLANTIN
049017,000022:                                                                                                  ##              2017-01-23 HG   Fix operand LO6ZEROS -> HI6ZEROS
049018,000023:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
049019,000024:                                                                                                  ##                              and fixed errors found.
049020,000025: 

Page 1135

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

Page 1136

049074,000079: 24,3527           77650                           GOTO                                           
049075,000080: 24,3530           51513                                    RPTORB                                
049076,000081: 

Page 1137

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

Page 1138

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

Page 1139

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

Page 1140

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

Page 1141

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

Page 1142

049325,000330:                                                                                                  #  ..... EARTHL SUBROUTINE .....
049326,000331:                                                                                                  #  SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
049327,000332: 
049328,000333:                                                                                                  #  CALLING SEQUENCE
049329,000334:                                                                                                  #        L       CALL
049330,000335:                                                                                                  #        L+1             EARTHL
049331,000336: 
049332,000337:                                                                                                  #  INPUT
049333,000338:                                                                                                  #        AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
049334,000339: 
049335,000340:                                                                                                  #  OUTPUT
049336,000341:                                                                                                  #                -AX
049337,000342:                                                                                                  #        MPAC=   -AY     RADIANS B-0
049338,000343:                                                                                                  #                  0
049339,000344: 
049340,000345: 26,3711           57545        EARTHL             DLOAD    DCOMP                                 
049341,000346: 26,3712           01716                                    AXO                                   
049342,000347: 26,3713           14017                           STODL    504LPL                                
049343,000348: 26,3714           01714                                    -AYO                                  
049344,000349: 26,3715           14021                           STODL    504LPL     +2                         
049345,000350: 26,3716           06424                                    HI6ZEROS                              
049346,000351: 26,3717           24023                           STOVL    504LPL     +4                         
049347,000352: 26,3720           00017                                    504LPL                                
049348,000353: 26,3721           77616                           RVQ                                            
049349,000354: 

Page 1143

049351,000356:                                                                                                  #  CONSTANTS AND ERASABLE ASSIGNMENTS
049352,000357: 
049353,000358: 26,3722  11,2272               1B1                =        DP1/2                                 #  1  SCALED B-1
049354,000359: 26,3722  0000050               RPREXIT            =        S1                                    #  R-TO-RP AND RP-TO-R SUBR EXIT
049355,000360: 26,3722  0000051               EARTHMXX           =        S2                                    #  EARTHMX,MOONMX SUBR. EXITS
049356,000361: 26,3722                        504RPR             =        0D                                    #  6 REGS        R OR RP VECTOR
049357,000362: 26,3722                        SINNODI            =        8D                                    #  2             SIN(NODI)
049358,000363: 26,3722                        DVECTR             =        8D                                    #  6             D VECTOR MOON
049359,000364: 26,3722                        CVECTR             =        8D                                    #  6             C VECTR MOON
049360,000365: 26,3722                        504AZ              =        18D                                   #  2            AZ
049361,000366: 26,3722                        TIMSUBM            =        14D                                   #  3             TIME SUB M (MOON) T+T0 IN GETAZ
049362,000367: 26,3722                        504LPL             =        14D                                   #  6             L OR LP VECTOR
049363,000368: 26,3722                        AVECTR             =        20D                                   #  6             A VECTOR (MOON)
049364,000369: 26,3722                        BVECTR             =        26D                                   #  6             B VECTOR (MOON)
049365,000370: 26,3722                        MMATRIX            =        20D                                   #  18            M MATRIX
049366,000371: 26,3722                        COB                =        32D                                   #  2             COS(B) B-1
049367,000372: 26,3722                        SOB                =        34D                                   #  2             SIN(B) B-1
049368,000373: 26,3722                        504F               =        6D                                    #  2             F(MOON)
049369,000374: 

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