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.

054269,000002:                                                                                                  ## Copyright:   Public domain.
054270,000003:                                                                                                  ## Filename:    POWERED_FLIGHT_SUBROUTINES.agc
054271,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
054272,000005:                                                                                                  ##              It is part of the source code for the original release
054273,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
054274,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
054275,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
054276,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
054277,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
054278,000011:                                                                                                  ##              that the code format has been changed to conform to the
054279,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
054280,000013:                                                                                                  ##              original YUL assembler.
054281,000014:                                                                                                  ## Reference:   pp. 1254-1261
054282,000015:                                                                                                  ## Assembler:   yaYUL
054283,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
054284,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
054285,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
054286,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
054287,000020:                                                                                                  ##              2017-01-13 RRB  Updated for Luminary 69.
054288,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
054289,000022:                                                                                                  ##                              but no errors found.
054290,000023:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
054291,000024:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
054292,000025:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
054293,000026:                                                                                                  ##                              Luminary 99 vs Comanche 55.
054294,000027: 

Page 1254

054296,000029: 14,3711                                           BANK     14                                    #  SAME FBANK AS THE FINDCDUD SUB-PROGRAM
054297,000030: 23,2000                                           SETLOC   POWFLITE                              
054298,000031: 23,2000                                           BANK                                           
054299,000032: 
054300,000033: 23,3443     0142                                  EBANK=   DEXDEX                                
054301,000034: 23,3443                                           COUNT*   $$/POWFL                              
054302,000035: 
054303,000036:                                                                                                  #      CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*TR*GS ALL COMPUTE THE SINES AND
054304,000037:                                                                                                  #  COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
054305,000038:                                                                                                  #  PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU.   AN
054306,000039:                                                                                                  #  ADDITIONAL OUTPUT IS THE 1'S COMPLEMENT ANGLES AT CDUSPOT.   THESE
054307,000040:                                                                                                  #  ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT,
054308,000041:                                                                                                  #  EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2.  THEY DIFFER ONLY IN
054309,000042:                                                                                                  #  WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
054310,000043: 
054311,000044:                                                                                                  #      CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
054312,000045:                                                                                                  #  SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
054313,000046:                                                                                                  #  THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
054314,000047:                                                                                                  #  CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
054315,000048: 
054316,000049:                                                                                                  #      CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
054317,000050: 
054318,000051:                                                                                                  #      CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP.   THIS
054319,000052:                                                                                                  #  ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
054320,000053:                                                                                                  #  ANGLES IN AN ORDER OTHER THAN X Y Z.   A CALL TO THIS ROUTINE IS
054321,000054:                                                                                                  #  NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
054322,000055:                                                                                                  #  MODES (SMNB OR NBSM).   SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
054323,000056:                                                                                                  #  COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
054324,000057:                                                                                                  #  IN THIS ORDER.   CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
054325,000058:                                                                                                  #  MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED.   NOTE THAT SINCE
054326,000059:                                                                                                  #  IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
054327,000060:                                                                                                  #  CALLED USING BANKCALL.   SORRY.
054328,000061: 
054329,000062:                                                                                                  #      CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
054330,000063:                                                                                                  #  INTERPRETIVE.
054331,000064: 
054332,000065: 23,3443           77776        CDUTRIG            EXIT                                           
054333,000066: 23,3444           03453                           TC       CDUTRIGS                              
054334,000067: 23,3445           06036                           TC       INTPRET                               
054335,000068: 23,3446           77616                           RVQ                                            
054336,000069: 
054337,000070: 23,3447           77776        CD*TR*G            EXIT                                           
054338,000071: 23,3450           03461                           TC       CD*TR*GS                              
054339,000072: 23,3451           06036                           TC       INTPRET                               
054340,000073: 23,3452           77616                           RVQ                                            
054341,000074: 
054342,000075: 23,3453           30032        CDUTRIGS           CA       CDUX                                  
054343,000076: 23,3454           54772                           TS       CDUSPOT    +4                         
054344,000077: 23,3455           30033                           CA       CDUY                                  
054345,000078: 23,3456           54766                           TS       CDUSPOT                               

Page 1255

054347,000080: 23,3457           30034                           CA       CDUZ                                  
054348,000081: 23,3460           54770                           TS       CDUSPOT    +2                         
054349,000082: 
054350,000083: 23,3461           00006        CD*TR*GS           EXTEND                                         
054351,000084: 23,3462           22142                           QXCH     TEM2                                  
054352,000085: 23,3463           34751                           CAF      FOUR                                  
054353,000086: 23,3464           76241        TR*GL**P           MASK     SIX                                   #  MAKE IT EVEN AND SMALLER
054354,000087: 23,3465           54143                           TS       TEM3                                  
054355,000088: 23,3466           50143                           INDEX    TEM3                                  
054356,000089: 23,3467           30766                           CA       CDUSPOT                               
054357,000090: 23,3470           52155                           DXCH     MPAC                                  #  STORING 2'S COMP ANGLE, LOADING MPAC
054358,000091: 23,3471           52127                           DXCH     VBUF       +4                         #  STORING MPAC FOR LATER RESTORATION
054359,000092: 23,3472           04713                           TC       USPRCADR                              
054360,000093: 23,3473           21465                           CADR     CDULOGIC                              
054361,000094: 23,3474           00006                           EXTEND                                         
054362,000095: 23,3475           30155                           DCA      MPAC                                  
054363,000096: 23,3476           50143                           INDEX    TEM3                                  
054364,000097: 23,3477           52767                           DXCH     CDUSPOT                               #  STORING 1'S COMPLEMENT ANGLE
054365,000098: 23,3500           04713                           TC       USPRCADR                              
054366,000099: 23,3501           01517                           CADR     COSINE                                
054367,000100: 23,3502           52155                           DXCH     MPAC                                  
054368,000101: 23,3503           50143                           INDEX    TEM3                                  
054369,000102: 23,3504           52745                           DXCH     COSCDU                                #  STORING COSINE
054370,000103: 23,3505           00006                           EXTEND                                         
054371,000104: 23,3506           50143                           INDEX    TEM3                                  
054372,000105: 23,3507           30767                           DCA      CDUSPOT                               #  LOADING 1'S COMPLEMENT ANGLE
054373,000106: 23,3510           04713                           TC       USPRCADR                              
054374,000107: 23,3511           01531                           CADR     SINE       +1                         #  SINE +1 EXPECTS ARGUMENT IN A AND L
054375,000108: 23,3512           52127                           DXCH     VBUF       +4                         #  BRINGING UP PRIOR MPAC TO BE RESTORED
054376,000109: 23,3513           52155                           DXCH     MPAC                                  
054377,000110: 23,3514           50143                           INDEX    TEM3                                  
054378,000111: 23,3515           52737                           DXCH     SINCDU                                
054379,000112: 23,3516           10143                           CCS      TEM3                                  
054380,000113: 23,3517           13464                           TCF      TR*GL**P                              
054381,000114: 23,3520           00142                           TC       TEM2                                  

Page 1256

054383,000116:                                                                                                  #  ****************************************************************************************************************
054384,000117:                                                                                                  #      QUICTRIG, INTENDED FOR GUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
054385,000118:                                                                                                  #  QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
054386,000119:                                                                                                  #  AND CDUSPOT +4.   UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
054387,000120:                                                                                                  #  CDUSPOT.   QUICTRIG'S EXECUTION TIME IS 4.1 MS;  THIS IS 10 TIMES AS FAST AS CD*TR*GS.    QUICTRIG MAY BE
054388,000121:                                                                                                  #  CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
054389,000122: 
054390,000123: 23,3521           00004        QUICTRIG           INHINT                                         #  INHINT SINCE DAP USES THE SAME TEMPS
054391,000124: 23,3522           00006                           EXTEND                                         
054392,000125: 23,3523           22061                           QXCH     ITEMP1                                
054393,000126: 23,3524           34751                           CAF      FOUR                                  
054394,000127: 23,3525           76241                 +4        MASK     SIX                                   
054395,000128: 23,3526           54062                           TS       ITEMP2                                
054396,000129: 23,3527           50062                           INDEX    ITEMP2                                
054397,000130: 23,3530           30766                           CA       CDUSPOT                               
054398,000131: 23,3531           05033                           TC       SPSIN                                 
054399,000132: 23,3532           00006                           EXTEND                                         
054400,000133: 23,3533           74736                           MP       BIT14                                 #  SCALE DOWN TO MATCH INTERPRETER OUTPUTS
054401,000134: 23,3534           50062                           INDEX    ITEMP2                                
054402,000135: 23,3535           52737                           DXCH     SINCDU                                
054403,000136: 23,3536           50062                           INDEX    ITEMP2                                
054404,000137: 23,3537           30766                           CA       CDUSPOT                               
054405,000138: 23,3540           05032                           TC       SPCOS                                 
054406,000139: 23,3541           00006                           EXTEND                                         
054407,000140: 23,3542           74736                           MP       BIT14                                 
054408,000141: 23,3543           50062                           INDEX    ITEMP2                                
054409,000142: 23,3544           52745                           DXCH     COSCDU                                
054410,000143: 23,3545           10062                           CCS      ITEMP2                                
054411,000144: 23,3546           13525                           TCF      QUICTRIG   +4                         
054412,000145: 23,3547           30061                           CA       ITEMP1                                
054413,000146: 23,3550           00003                           RELINT                                         
054414,000147: 23,3551           00000                           TC       A                                     
054415,000148: 

Page 1257

054417,000150:                                                                                                  #  ****************************************************************************************************************
054418,000151:                                                                                                  #      THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
054419,000152:                                                                                                  #  INTERPRETIVE.  LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
054420,000153: 
054421,000154:                                                                                                  #      THESE INTERFACE ROUTINES ARE PERMANENT.   ALL RESTORE USER'S EBANK
054422,000155:                                                                                                  #  SETTING.   ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
054423,000156:                                                                                                  #  RETURNING VIA QPRET.   ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
054424,000157:                                                                                                  #  MED INTERPRETER-STYLE IN MPAC; COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
054425,000158: 
054426,000159:                                                                                                  #       TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
054427,000160:                                                                                                  #  AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4; ODD
054428,000161:                                                                                                  #  LOCATIONS NEED NOT BE ZEROED).   TRG*NBSM DOES THE NB TO SM TRANSFOR-
054429,000162:                                                                                                  #  MATION;  TRG*SMNB, VICE VERSA.
054430,000163: 
054431,000164:                                                                                                  #      CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
054432,000165:                                                                                                  #  THE CDU COUNTERS.   OTHERWISE IT IS LIKE TRG*NBSM.
054433,000166: 
054434,000167:                                                                                                  #      CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
054435,000168: 
054436,000169: 23,3552           77776        CDU*SMNB           EXIT                                           
054437,000170: 23,3553           03453                           TC       CDUTRIGS                              
054438,000171: 23,3554           13557                           TCF      C*MM*N1                               
054439,000172: 
054440,000173: 23,3555           77776        TRG*SMNB           EXIT                                           
054441,000174: 23,3556           03461                           TC       CD*TR*GS                              
054442,000175: 23,3557           07531        C*MM*N1            TC       MPACVBUF                              #  AX*SR*T EXPECTS VECTOR IN VBUF
054443,000176: 23,3560           46244                           CS       THREE                                 #  SIGNAL FOR SM TO NB TRANSFORMATION
054444,000177: 23,3561           03601        C*MM*N2            TC       AX*SR*T                               
054445,000178: 23,3562           06036                           TC       INTPRET                               
054446,000179: 23,3563           43575                           VLOAD    RVQ                                   
054447,000180: 23,3564           00123                                    VBUF                                  
054448,000181: 
054449,000182: 23,3565           77776        CDU*NBSM           EXIT                                           
054450,000183: 23,3566           03453                           TC       CDUTRIGS                              
054451,000184: 23,3567           13572                           TCF      C*MM*N3                               
054452,000185: 
054453,000186: 23,3570           77776        TRG*NBSM           EXIT                                           
054454,000187: 23,3571           03461                           TC       CD*TR*GS                              
054455,000188: 23,3572           07531        C*MM*N3            TC       MPACVBUF                              #  FOR AX*SR*T
054456,000189: 23,3573           36244                           CA       THREE                                 #  SIGNAL FOR NB TO SM TRANSFORMATION
054457,000190: 23,3574           13561                           TCF      C*MM*N2                               
054458,000191: 
054459,000192:                                                                                                  #      *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
054460,000193:                                                                                                  #  AND COSCDU) RATHER THAN THE ANGLES THEMSELVES.   OTHERWISE THEY ARE
054461,000194:                                                                                                  #  LIKE TRG*NBSM AND TRG*SMNB.
054462,000195: 
054463,000196:                                                                                                  #       NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
054464,000197:                                                                                                  #  OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM

Page 1258

054466,000199:                                                                                                  #  AND TRG*SMNB NEED BE CALLED FOR EACH SERIES.   FOR SUBSEQUENT TRANSFOR-
054467,000200:                                                                                                  #  MATIONS USE *NBSM* AND *SMNB*.
054468,000201: 
054469,000202: 23,3575           77776        *SMNB*             EXIT                                           
054470,000203: 23,3576           13557                           TCF      C*MM*N1                               
054471,000204: 
054472,000205: 23,3577           77776        *NBSM*             EXIT                                           
054473,000206: 23,3600           13572                           TCF      C*MM*N3                               
054474,000207: 
054475,000208:                                                                                                  #        AX*SR*T COMBINES THE OLD SMNB AND NBSM.   FOR THE NB TO SM
054476,000209:                                                                                                  #  TRANSFORMATION, ENTER WITH +3 IN A.   FOR SM TO NB, ENTER WITH -3.
054477,000210:                                                                                                  #  THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
054478,000211:                                                                                                  #  AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
054479,000212:                                                                                                  #  AT SINCDU AND COSCDU, IN THE ORDER Y Z X.  A CALL TO CD*TR*GS, WITH
054480,000213:                                                                                                  #  THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
054481,000214:                                                                                                  #  THIS.  HERE IS A SAMPLE CALLING SEQUENCE:-
054482,000215:                                                                                                  #                TC      CDUTRIGS
054483,000216:                                                                                                  #                CS      THREE           ("CA THREE" FOR NBSM)
054484,000217:                                                                                                  #                TC      AX*SR*T
054485,000218:                                                                                                  #  THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
054486,000219:                                                                                                  #  THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
054487,000220: 
054488,000221:                                                                                                  #      AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
054489,000222:                                                                                                  #  UNITY.   A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
054490,000223:                                                                                                  #  HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
054491,000224:                                                                                                  #  FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
054492,000225: 
054493,000226: 23,3601           54142        AX*SR*T            TS       DEXDEX                                #  WHERE IT BECOMES THE INDEX OF INDEXES
054494,000227: 23,3602           00006                           EXTEND                                         
054495,000228: 23,3603           22145                           QXCH     RTNSAVER                              
054496,000229: 
054497,000230: 23,3604           10142        R*TL**P            CCS      DEXDEX                                #                +3 --> 0        -3 --> 2
054498,000231: 23,3605           40142                           CS       DEXDEX                                #  THUS:         +2 --> 1        -2 --> 1
054499,000232: 23,3606           66244                           AD       THREE                                 #                +1 --> 2        -1 --> 0
054500,000233: 23,3607           00006                           EXTEND                                         
054501,000234: 23,3610           50000                           INDEX    A                                     
054502,000235: 23,3611           33670                           DCA      INDEXI                                
054503,000236: 23,3612           52144                           DXCH     DEXI                                  
054504,000237: 
054505,000238: 23,3613           34753                           CA       ONE                                   
054506,000239: 23,3614           54130                           TS       BUF                                   
054507,000240: 23,3615           00006                           EXTEND                                         
054508,000241: 23,3616           50143                           INDEX    DEX1                                  
054509,000242: 23,3617           40123                           DCS      VBUF                                  
054510,000243: 23,3620           13622                           TCF      LOOP1                                 #  REALLY BE A SUBTRACT, AND VICE VERSA
054511,000244: 
054512,000245: 23,3621           52131        LOOP2              DXCH     BUF                                   #  LOADING VECTOR COMPONENT, STORING INDEX

Page 1259

054514,000247: 23,3622           52155        LOOP1              DXCH     MPAC                                  
054515,000248: 23,3623           33666                           CA       SINSLOC                               
054516,000249: 23,3624           60143                           AD       DEX1                                  
054517,000250: 23,3625           54116                           TS       ADDRWD                                
054518,000251: 
054519,000252: 23,3626           07106                           TC       DMPSUB                                #  MULTIPLY BY SIN(CDUANGLE)
054520,000253: 23,3627           10142                           CCS      DEXDEX                                
054521,000254: 23,3630           52155                           DXCH     MPAC                                  #  NBSM CASE
054522,000255: 23,3631           13634                           TCF      +3                                    
054523,000256: 23,3632           00006                           EXTEND                                         #  SMNB CASE
054524,000257: 23,3633           40155                           DCS      MPAC                                  
054525,000258: 23,3634           52160                           DXCH     TERM1TMP                              
054526,000259: 
054527,000260: 23,3635           36241                           CA       SIX                                   #  SINCDU AND COSCDU (EACH 6 WORDS) MUST
054528,000261: 23,3636           26116                           ADS      ADDRWD                                #    BE CONSECUTIVE AND IN THAT ORDER
054529,000262: 
054530,000263: 23,3637           00006                           EXTEND                                         
054531,000264: 23,3640           50130                           INDEX    BUF                                   
054532,000265: 23,3641           50143                           INDEX    DEX1                                  
054533,000266: 23,3642           30123                           DCA      VBUF                                  
054534,000267: 23,3643           52155                           DXCH     MPAC                                  
054535,000268: 23,3644           07106                           TC       DMPSUB                                #  MULTIPLY BY COS(CDUANGLE)
054536,000269: 23,3645           52155                           DXCH     MPAC                                  
054537,000270: 23,3646           20160                           DAS      TERM1TMP                              
054538,000271: 23,3647           52160                           DXCH     TERM1TMP                              
054539,000272: 23,3650           20001                           DDOUBL                                         
054540,000273: 23,3651           50130                           INDEX    BUF                                   
054541,000274: 23,3652           50143                           INDEX    DEX1                                  
054542,000275: 23,3653           52123                           DXCH     VBUF                                  
054543,000276: 23,3654           52131                           DXCH     BUF                                   #  LOADING INDEX, STORING VECTOR COMPONENT
054544,000277: 
054545,000278: 23,3655           10000                           CCS      A                                     #  'CAUSE THAT'S WHERE THE INDEX NOW IS
054546,000279: 23,3656           13621                           TCF      LOOP2                                 
054547,000280: 
054548,000281: 23,3657           00006                           EXTEND                                         
054549,000282: 23,3660           26142                           DIM      DEXDEX                                #  DECREMENT MAGNITUDE PRESERVING SIGN
054550,000283: 
054551,000284: 23,3661           10142        TSTPOINT           CCS      DEXDEX                                #  ONLY THE BRANCHING FUNCTION IS USED
054552,000285: 23,3662           13604                           TCF      R*TL**P                               
054553,000286: 23,3663           00145                           TC       RTNSAVER                              
054554,000287: 23,3664           13604                           TCF      R*TL**P                               
054555,000288: 23,3665           00145                           TC       RTNSAVER                              
054556,000289: 
054557,000290: 23,3666           00736        SINSLOC            ADRES    SINCDU                                #  FOR USE IN SETTING ADDRWD
054558,000291: 
054559,000292: 23,3667           00004        INDEXI             DEC      4          B-14                       #  **********   DON'T   **********
054560,000293: 23,3670           00002                           DEC      2          B-14                       #  **********   TOUCH   **********
054561,000294: 23,3671           00000                           DEC      0          B-14                       #  **********   THESE   **********

Page 1260

054563,000296: 23,3672           00004                           DEC      4          B-14                       #  ********** CONSTANTS **********
054564,000297: 
054565,000298:                                                                                                  #  ****************************************************************************************************************

Page 1261

054567,000300:                                                                                                  #  THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES. IT
054568,000301:                                                                                                  #  REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4).  SIN,COS(CDUY,Z,X) ARE IN
054569,000302:                                                                                                  #  SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY,SCALED TO ONE HALF. CDU INCREENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
054570,000303:                                                                                                  #  ONE REVOLUTION.
054571,000304: 
054572,000305:                                                                                                  #         *  COS(IGA)SEC(MGA)          0           -SIN(IGA)SEC(MGA) *
054573,000306:                                                                                                  #         *                                                          *
054574,000307:                                                                                                  #         * -COS(IGA)TAN(MGA)          1            SIN(IGA)TAN(MGA) *
054575,000308:                                                                                                  #         *                                                          *
054576,000309:                                                                                                  #         *      SIN(IGA)              0                COS(IGA)     *
054577,000310: 
054578,000311: 14,3711                                           BANK     14                                    
054579,000312: 23,2000                                           SETLOC   POWFLIT1                              
054580,000313: 23,2000                                           BANK                                           
054581,000314: 23,3673           41345        SMCDURES           DLOAD    DMP                                   
054582,000315: 23,3674           01265                                    DTHETASM                              
054583,000316: 23,3675           00745                                    COSCDUY                               
054584,000317: 
054585,000318: 23,3676           41325                           PDDL     DMP                                   
054586,000319: 23,3677           01271                                    DTHETASM   +4                         
054587,000320: 23,3700           00737                                    SINCDUY                               
054588,000321: 
054589,000322: 23,3701           77621                           BDSU                                           
054590,000323: 23,3702           77671                           DDV                                            
054591,000324: 23,3703           00747                                    COSCDUZ                               
054592,000325: 23,3704           03234                           STORE    DCDU                                  
054593,000326: 
054594,000327: 23,3705           72405                           DMP      SL1                                   #  SCALE
054595,000328: 23,3706           00741                                    SINCDUZ                               
054596,000329: 23,3707           77621                           BDSU                                           
054597,000330: 
054598,000331: 23,3710           01267                                    DTHETASM   +2                         
054599,000332: 23,3711           17236                           STODL    DCDU       +2                         
054600,000333: 23,3712           01265                                    DTHETASM                              
054601,000334: 
054602,000335: 23,3713           65205                           DMP      PDDL                                  
054603,000336: 23,3714           00737                                    SINCDUY                               
054604,000337: 23,3715           01271                                    DTHETASM   +4                         
054605,000338: 
054606,000339: 23,3716           43205                           DMP      DAD                                   
054607,000340: 23,3717           00745                                    COSCDUY                               
054608,000341: 23,3720           77752                           SL1                                            
054609,000342: 23,3721           03240                           STORE    DCDU       +4                         
054610,000343: 23,3722           77616                           RVQ                                            
054611,000344: 

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