Source Code

These source-code files are part of a reconstructed copy of Sunrise 69, the final release of the Block I Command Module (CM) Apollo Guidance Computer (AGC) system test software.

They have been created via disassembly of binary dumps of original core rope memory modules, part numbers 1003133-18, 1003133-19, 1003133-20, and 1003733-071. Corresponding portions of code have been copied from Solarium 55 where applicable. Extensive use was also made of the AGC Information Series documents, which were specifically written about the Sunrise software.

Since only binary dumps (rather than listings) of Sunrise are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

010231,000002:                                                                                                  ## Copyright:   Public domain.
010232,000003:                                                                                                  ## Filename:    INFLIGHT_ALIGNMENT_SUBROUTINES.agc
010233,000004:                                                                                                  ## Purpose:     A section of Sunrise 69.
010234,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
010235,000006:                                                                                                  ##              release of the Block I Command Module system test software. No
010236,000007:                                                                                                  ##              original listings of this program are available; instead, this
010237,000008:                                                                                                  ##              file was created via disassembly of dumps of Sunrise core rope
010238,000009:                                                                                                  ##              memory modules and comparison with the later Block I program
010239,000010:                                                                                                  ##              Solarium 55.
010240,000011:                                                                                                  ## Assembler:   yaYUL --block1
010241,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
010242,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
010243,000014:                                                                                                  ## Mod history: 2023-06-19 MAS  Created from Sunrise 45.
010244,000015: 
010245,000016: 
010246,000017:                                                                                                  #  CALGTA                GIVEN THE DESIRED XD,YD AND ZD UNIT VECTORS REFERED TO
010247,000018:                                                                                                  #  --------              PRESENT STABLE MEMBER ORIENTATION, THIS SUBROUTINE FINDS
010248,000019:                                                                                                  #                        THETAY, THETAZ, AND THETAX, THE REQUIRED GYRO TORQUE
010249,000020:                                                                                                  #                        ANGLES IN THE ORDER TO BE APPLIED TO BRING THE STABLE
010250,000021:                                                                                                  #                        MEMBER INTO THE DESIRED ORIENTATION.
010251,000022: 
010252,000023: 
010253,000024: 
010254,000025: 25,6000                                           BANK     25                                    
010255,000026: 25,6000           45575        CALCGTA            ITA      1                                     #  DEFINE THE VECTOR ZPRIME WHICH IS THE
010256,000027: 25,6001           45176                           DMOVE                                          
010257,000028: 25,6002           00052                                    S2                                    #  IMAGE OF Z UNDER THE ROTATION ABOUT Y
010258,000029: 25,6003           01035                                    XDSMPR                                
010259,000030: 
010260,000031: 25,6004           45176                           DMOVE    0                                     #  ZPRIME =(-XD  ,0 , XD )
010261,000032: 25,6005           12620                                    ZERODP                                #              2        0
010262,000033: 
010263,000034: 25,6006           47175                           COMP     1                                     
010264,000035: 25,6007           41153                           VDEF     UNIT                                  
010265,000036: 25,6010           01041                                    XDSMPR     +4                         
010266,000037: 25,6011           32027                           STORE    ZPRIME                                
010267,000038: 
010268,000039: 25,6012           56776                           TSRT     0                                     #  SET UP COSTH AND SINTH TO ENTER
010269,000040: 25,6013           00027                                    ZPRIME                                #      ARCTRIG FOR COMPUTATION OF THETA-Y
010270,000041: 25,6014           00002                                    1                                     
010271,000042: 25,6015           32023                           STORE    SINTH                                 
010272,000043: 
010273,000044: 25,6016           56776                           TSRT     0                                     
010274,000045: 25,6017           01035                                    XDSMPR                                
010275,000046: 25,6020           00002                                    1                                     
010276,000047: 25,6021           32021                           STORE    COSTH                                 
010277,000048: 
010278,000049: 25,6022           76776                           ITC      0                                     
010279,000050: 25,6023           12067                                    ARCTRIG                               
010280,000051: 
010281,000052: 25,6024           47576                           NOLOD    0                                     
010282,000053: 25,6025           33061                           STORE    IGC                                   
010283,000054: 
010284,000055: 25,6026           56776                           TSRT     0                                     
010285,000056: 25,6027           01037                                    XDSMPR     +2                         
010286,000057: 25,6030           00002                                    1                                     
010287,000058: 25,6031           32023                           STORE    SINTH                                 
010288,000059: 
010289,000060: 25,6032           64776                           DMP      0                                     
010290,000061: 25,6033           00027                                    ZPRIME                                
010291,000062: 25,6034           01041                                    XDSMPR     +4                         
010292,000063: 
010293,000064: 25,6035           64775                           DMP      1                                     
010294,000065: 25,6036           66776                           DSU                                            
010295,000066: 25,6037           00033                                    ZPRIME     +4                         
010296,000067: 25,6040           01035                                    XDSMPR                                
010297,000068: 25,6041           32021                           STORE    COSTH                                 
010298,000069: 
010299,000070: 25,6042           76776                           ITC      0                                     
010300,000071: 25,6043           12067                                    ARCTRIG                               
010301,000072: 
010302,000073: 25,6044           47576                           NOLOD    0                                     
010303,000074: 25,6045           33063                           STORE    MGC                                   
010304,000075: 
010305,000076: 25,6046           42775                           DOT      1                                     
010306,000077: 25,6047           63776                           TSLT                                           
010307,000078: 25,6050           00027                                    ZPRIME                                
010308,000079: 25,6051           01051                                    ZDSMPR                                
010309,000080: 25,6052           00002                                    1                                     
010310,000081: 25,6053           32021                           STORE    COSTH                                 
010311,000082: 
010312,000083: 25,6054           42776                           DOT      0                                     
010313,000084: 25,6055           00027                                    ZPRIME                                
010314,000085: 25,6056           01043                                    YDSMPR                                
010315,000086: 25,6057           32023                           STORE    SINTH                                 
010316,000087: 
010317,000088: 25,6060           76776                           ITC      0                                     
010318,000089: 25,6061           12067                                    ARCTRIG                               
010319,000090: 
010320,000091: 25,6062           47576                           NOLOD    0                                     
010321,000092: 25,6063           33057                           STORE    OGC                                   
010322,000093: 
010323,000094: 25,6064           44576                           ITCI     0                                     
010324,000095: 25,6065           00052                                    S2                                    
010325,000096: 
010326,000097: 
010327,000098: 25,6066           65175        ARCTRIG            ABS      1                                     #  GIVEN SINTH AND COSTH SCALED X1/4 FIND
010328,000099: 25,6067           66756                           DSU      BMN                                   #  THETA IN THE RANGE -PI TO +PI SCALED-
010329,000100: 25,6070           00023                                    SINTH                                 #  TEMPORARY FOR SINTH               XPI/2
010330,000101: 25,6071           12614                                    QTSN45                                #  CONSTANT=0.1768
010331,000102: 25,6072           12103                                    TRIG1                                 
010332,000103: 
010333,000104: 25,6073           63775                           TSLT     1                                     
010334,000105: 25,6074           61056                           ACOS     SIGN                                  
010335,000106: 25,6075           00021                                    COSTH                                 #  TEMPORARY FOR COSTH
010336,000107: 25,6076           00002                                    1                                     
010337,000108: 25,6077           00023                                    SINTH                                 #  TEMPORARY FOR SINTH
010338,000109: 25,6100           32025                           STORE    THETA                                 
010339,000110: 
010340,000111: 25,6101           40576                           ITCQ     0                                     #  RETURN TO MAIN PROGRAM
010341,000112: 
010342,000113: 25,6102           63775        TRIG1              TSLT     1                                     #  SINTH LESS THAN QTSN45
010343,000114: 25,6103           63176                           ASIN                                           
010344,000115: 25,6104           00023                                    SINTH                                 #  TEMPORARY FOR SINTH
010345,000116: 25,6105           00002                                    1                                     
010346,000117: 25,6106           32025                           STORE    THETA                                 
010347,000118: 
010348,000119: 25,6107           73776                           BMN      0                                     
010349,000120: 25,6110           00021                                    COSTH                                 
010350,000121: 25,6111           12116                                    TRIG2                                 
010351,000122: 
010352,000123: 25,6112           45175                           DMOVE    1                                     
010353,000124: 25,6113           40576                           ITCQ                                           
010354,000125: 25,6114           00025                                    THETA                                 
010355,000126: 25,6115           53775        TRIG2              SIGN     1                                     #  COSTH NEGATIVE
010356,000127: 25,6116           66776                           DSU                                            
010357,000128: 25,6117           12624                                    HALFDP                                
010358,000129: 25,6120           00023                                    SINTH                                 #  WITH ASIN
010359,000130: 25,6121           00025                                    THETA                                 
010360,000131: 25,6122           32025                           STORE    THETA                                 
010361,000132: 
010362,000133: 25,6123           40576                           ITCQ     0                                     #  RETURN
010363,000134: 
010364,000135: 
010365,000136:                                                                                                  #                                          THIS PROGRAM COMPUTES SXT ANGLES SAC AND
010366,000137:                                                                                                  #                                          PAC IN HALF AND EIGHT REVOLUTIONS RESPEC
010367,000138:                                                                                                  #                                          GO IN WITH S1=BASE ADDRESS OF CDU;S
010368,000139: 
010369,000140: 25,6124           45575        SMNB               ITA      1                                     #  CHECK THAT NBSMBIT IS OFF,IF IT ISGO TO
010370,000141: 25,6125           43411                           TEST     SWITCH                                #  NBSM1,OTHERWISE SWITCH IT OFF
010371,000142: 25,6126           00052                                    S2                                    
010372,000143: 25,6127           00006                                    NBSMBIT                               
010373,000144: 25,6130           12133                                    SMNB1                                 
010374,000145: 25,6131           00006                                    NBSMBIT                               
010375,000146: 
010376,000147: 25,6132           75575        SMNB1              AXT,1    1                                     #  NBSMBIT IS OFF
010377,000148: 25,6133           74572                           AXT,2    ITC                                   #  SET INDECES TO ROTATE X,Z ABOUT Y
010378,000149: 25,6134           00005                                    4                                     
010379,000150: 25,6135           00001                                    0                                     
010380,000151: 25,6136           12206                                    AXISROT                               #  DO AXIS ROTATION
010381,000152: 
010382,000153: 25,6137           75575                           AXT,1    1                                     #  SET INDECES TO ROTATE Y,X ABOUT Z
010383,000154: 25,6140           74572                           AXT,2    ITC                                   
010384,000155: 25,6141           00003                                    2                                     
010385,000156: 25,6142           00005                                    4                                     
010386,000157: 25,6143           12206                                    AXISROT                               #  DO AXIS ROTATION
010387,000158: 
010388,000159: 25,6144           75575                           AXT,1    1                                     #  SET INDECES TO ROTATE Z,Y ABOUT X
010389,000160: 25,6145           74572                           AXT,2    ITC                                   
010390,000161: 25,6146           00001                                    0                                     
010391,000162: 25,6147           00003                                    2                                     
010392,000163: 25,6150           12206                                    AXISROT                               #  DO AXIS ROTATION
010393,000164: 
010394,000165: 25,6151           44576                           ITCI     0                                     #  RETURN
010395,000166: 25,6152           00052                                    S2                                    
010396,000167: 
010397,000168: 
010398,000169: 25,6153           45575        NBSM               ITA      1                                     #  CHECK THAT NBSMBIT IS ON,IF IT IS NOT GO
010399,000170: 25,6154           43576                           TEST                                           #  TO NBSM1 AND SWITCH IT ON
010400,000171: 25,6155           00052                                    S2                                    
010401,000172: 25,6156           00006                                    NBSMBIT                               
010402,000173: 25,6157           12202                                    NBSM1                                 
010403,000174: 
010404,000175: 25,6160           75575        NBSM2              AXT,1    1                                     #  ROTATE Z,Y ABOUT X
010405,000176: 25,6161           74572                           AXT,2    ITC                                   
010406,000177: 25,6162           00001                                    0                                     
010407,000178: 25,6163           00003                                    2                                     
010408,000179: 25,6164           12206                                    AXISROT                               
010409,000180: 
010410,000181: 25,6165           75575                           AXT,1    1                                     #  ROTATE Y,X ABOUT Z
010411,000182: 25,6166           74572                           AXT,2    ITC                                   
010412,000183: 25,6167           00003                                    2                                     
010413,000184: 25,6170           00005                                    4                                     
010414,000185: 25,6171           12206                                    AXISROT                               
010415,000186: 
010416,000187: 25,6172           75575                           AXT,1    1                                     #  ROTATE X,Z ABOUT Y
010417,000188: 25,6173           74572                           AXT,2    ITC                                   
010418,000189: 25,6174           00005                                    4                                     
010419,000190: 25,6175           00001                                    0                                     
010420,000191: 25,6176           12206                                    AXISROT                               
010421,000192: 
010422,000193: 25,6177           44576                           ITCI     0                                     #  RETURN
010423,000194: 25,6200           00052                                    S2                                    
010424,000195: 
010425,000196: 25,6201           42575        NBSM1              SWITCH   1                                     
010426,000197: 25,6202           76776                           ITC                                            
010427,000198: 25,6203           00006                                    NBSMBIT                               
010428,000199: 25,6204           12161                                    NBSM2                                 
010429,000200: 
010430,000201: 
010431,000202: 25,6205           57574        AXISROT            XSU,1    2                                     #  ROUTINE FOR SINGLE AXIS ROTATIONS
010432,000203: 25,6206           42171                           SMOVE*   RTB                                   
010433,000204: 25,6207           61576                           XAD,1                                          #  REMARKS ARE FOR ROTATING Z,Y ABOUT X
010434,000205: 25,6210           00051                                    S1                                    
010435,000206: 25,6211           00011                                    4,1                                   #  INDEX1=0,INDEX2=2
010436,000207: 25,6212           07053                                    CDULOGIC                              #  ANGLES ARE STORED IN THE ORDER IGA,MGA,
010437,000208: 25,6213           00051                                    S1                                    
010438,000209: 25,6214           32037                           STORE    30D                                   #  OGA,SO WE PICK UP OGZ
010439,000210: 
010440,000211: 25,6215           55176        ACCUROT            COS      0                                     
010441,000212: 25,6216           00037                                    30D                                   
010442,000213: 25,6217           34021                           STORE    8D,1                                  #  STORE COS(OGA) IN 8
010443,000214: 
010444,000215: 25,6220           57176                           SIN      0                                     
010445,000216: 25,6221           00037                                    30D                                   
010446,000217: 25,6222           34025                           STORE    10D,1                                 #  STORE SIN(OGA) IN 10D
010447,000218: 
010448,000219: 25,6223           64375                           DMP*     1                                     
010449,000220: 25,6224           63776                           TSLT                                           
010450,000221: 25,6225           00025                                    10D,1                                 
010451,000222: 25,6226           00112                                    VAC        +4,2                       #  PUSH DOWN (VAC +2)SIN(OGA)
010452,000223: 25,6227           00002                                    1                                     
010453,000224: 
010454,000225: 25,6230           64375                           DMP*     1                                     
010455,000226: 25,6231           63776                           TSLT                                           
010456,000227: 25,6232           00021                                    8D,1                                  
010457,000228: 25,6233           00112                                    VAC        +4,2                       #  PUSH DOWN (VAC +2)COS(OGA)
010458,000229: 25,6234           00002                                    1                                     
010459,000230: 
010460,000231: 25,6235           64374                           DMP*     2                                     
010461,000232: 25,6236           63615                           TSLT     TEST                                  
010462,000233: 25,6237           65776                           BDSU                                           
010463,000234: 25,6240           00025                                    10D,1                                 
010464,000235: 25,6241           00111                                    VAC        +4,1                       
010465,000236: 25,6242           00002                                    1                                     
010466,000237: 25,6243           00006                                    NBSMBIT                               
010467,000238: 25,6244           12260                                    AXISROT1                              
010468,000239: 25,6245           34112                           STORE    VAC        +4,2                       #  VAC+2=(VAC+2)COS(OGA)-(VAC+4)SIN(OGA)
010469,000240: 
010470,000241: 25,6246           64375                           DMP*     1                                     
010471,000242: 25,6247           63742                           TSLT     DAD                                   
010472,000243: 25,6250           00021                                    8D,1                                  
010473,000244: 25,6251           00111                                    VAC        +4,1                       
010474,000245: 25,6252           00002                                    1                                     
010475,000246: 25,6253           34111                           STORE    VAC        +4,1                       #  VAC+4=(VAC+2)SIN(OGA)+(VAC+4)COS(OGA)
010476,000247: 
010477,000248: 25,6254           75175                           VMOVE    1                                     
010478,000249: 25,6255           40576                           ITCQ                                           
010479,000250: 25,6256           00041                                    VAC                                   
010480,000251: 
010481,000252: 25,6257           47575        AXISROT1           NOLOD    1                                     #  TEST WAS 0 FOR SMNB
010482,000253: 25,6260           70776                           DAD                                            
010483,000254: 25,6261           34112                           STORE    VAC        +4,2                       #  VAC+2=(VAC+2)COS(OGA)+(VAC+4)SIN(OGA)
010484,000255: 
010485,000256: 25,6262           64375                           DMP*     1                                     
010486,000257: 25,6263           63732                           TSLT     DSU                                   
010487,000258: 25,6264           00021                                    8D,1                                  
010488,000259: 25,6265           00111                                    VAC        +4,1                       
010489,000260: 25,6266           00002                                    1                                     
010490,000261: 25,6267           34111                           STORE    VAC        +4,1                       #  VAC+4=-(VAC+2)SIN(OGA)+(VAC+4)COS(OGA)
010491,000262: 
010492,000263: 25,6270           75175                           VMOVE    1                                     
010493,000264: 25,6271           40576                           ITCQ                                           
010494,000265: 25,6272           00041                                    VAC                                   
010495,000266: 
010496,000267: 
010497,000268: 25,6273           41775        CALCGA             VXV      1                                     #  CALCULATE GIMBAL ANGLES GIVEN THE X,Y,Z-
010498,000269: 25,6274           73176                           UNIT                                           
010499,000270: 25,6275           00771                                    XNB                                   
010500,000271: 25,6276           01021                                    YSM                                   
010501,000272: 
010502,000273: 25,6277           47575                           NOLOD    1                                     
010503,000274: 25,6300           42625                           DOT      ITA                                   
010504,000275: 25,6301           01005                                    ZNB                                   
010505,000276: 25,6302           00052                                    S2                                    
010506,000277: 25,6303           32021                           STORE    COSTH                                 #  TEMPORARY FOR COSTH
010507,000278: 
010508,000279: 25,6304           47575                           NOLOD    1                                     
010509,000280: 25,6305           42776                           DOT                                            
010510,000281: 25,6306           00777                                    YNB                                   
010511,000282: 25,6307           32023                           STORE    SINTH                                 
010512,000283: 
010513,000284: 25,6310           76776                           ITC      0                                     
010514,000285: 25,6311           12067                                    ARCTRIG                               
010515,000286: 
010516,000287: 25,6312           47575                           NOLOD    1                                     
010517,000288: 25,6313           76576                           RTB                                            
010518,000289: 25,6314           07074                                    1STO2S                                
010519,000290: 25,6315           33057                           STORE    OGC                                   
010520,000291: 
010521,000292: 25,6316           42773                           DOT      3                                     
010522,000293: 25,6317           63746                           TSLT     BOV                                   
010523,000294: 25,6320           56713                           TSRT     ASIN                                  
010524,000295: 25,6321           76576                           RTB                                            
010525,000296: 25,6322           01021                                    YSM                                   
010526,000297: 25,6323           00771                                    XNB                                   
010527,000298: 25,6324           00003                                    2                                     
010528,000299: 25,6325           12356                                    GIMLOCK1                              #  LOOK FOR EXCESSIVE MGC
010529,000300: 25,6326           00002                                    1                                     
010530,000301: 25,6327           07074                                    1STO2S                                
010531,000302: 25,6330           33063                           STORE    MGC                                   
010532,000303: 
010533,000304: 25,6331           65175                           ABS      1                                     
010534,000305: 25,6332           66616                           DSU      BPL                                   
010535,000306: 25,6333           01063                                    MGC                                   
010536,000307: 25,6334           12626                                    .333...                               
010537,000308: 25,6335           12356                                    GIMLOCK1                              
010538,000309: 
010539,000310: 25,6336           42776        CALCGA1            DOT      0                                     
010540,000311: 25,6337           01027                                    ZSM                                   
010541,000312: 25,6340           00001                                    0                                     #  CONTAINS AMG
010542,000313: 25,6341           32021                           STORE    COSTH                                 
010543,000314: 
010544,000315: 25,6342           42776                           DOT      0                                     
010545,000316: 25,6343           01013                                    XSM                                   
010546,000317: 25,6344           32023                           STORE    SINTH                                 
010547,000318: 
010548,000319: 25,6345           76776                           ITC      0                                     
010549,000320: 25,6346           12067                                    ARCTRIG                               
010550,000321: 25,6347           47575                           NOLOD    1                                     
010551,000322: 25,6350           76576                           RTB                                            
010552,000323: 25,6351           07074                                    1STO2S                                
010553,000324: 25,6352           33061                           STORE    IGC                                   
010554,000325: 
010555,000326: 25,6353           44576                           ITCI     0                                     
010556,000327: 25,6354           00052                                    S2                                    
010557,000328: 
010558,000329: 25,6355           77576        GIMLOCK1           EXIT     0                                     
010559,000330: 
010560,000331: 25,6356           02605                           TC       ALARM                                 
010561,000332: 25,6357           00401                           OCT      00401                                 
010562,000333: 25,6360           04000                           TC       INTPRET                               #  RESUME ROUTINE.
010563,000334: 
010564,000335: 25,6361           76776                           ITC      0                                     
010565,000336: 25,6362           12337                                    CALCGA1                               
010566,000337: 
010567,000338: 
010568,000339: 25,6363           42175        SXTNB              SMOVE*   1                                     #  THIS PROGRAM COMPUTES COMPONENTS OF
010569,000340: 25,6364           76571                           RTB      RTB                                   #  THE STAR HALF UNIT VECTOR,STARM, GIVEN
010570,000341: 25,6365           00013                                    5,1                                   #  THE MEASURED SXT ANGLES PAM AND SAM.
010571,000342: 25,6366           07053                                    CDULOGIC                              
010572,000343: 25,6367           07152                                    TRUNLOG                               
010573,000344: 
010574,000345: 25,6370           47575                           NOLOD    1                                     
010575,000346: 25,6371           57116                           SIN      TSLT                                  
010576,000347: 25,6372           00002                                    1                                     #  STORE A=SIN(PAM.PI/4)
010577,000348: 
010578,000349: 25,6373           42175                           SMOVE*   1                                     
010579,000350: 25,6374           76576                           RTB                                            
010580,000351: 25,6375           00007                                    3,1                                   
010581,000352: 25,6376           07053                                    CDULOGIC                              #  STORE  SAM/2 IN PD 4,RESOLVES +/- ZERO
010582,000353: 
010583,000354: 25,6377           47575                           NOLOD    1                                     
010584,000355: 25,6400           55122                           COS      DMP                                   
010585,000356: 25,6401           00003                                    2                                     
010586,000357: 25,6402           32041                           STORE    STARM                                 #  STARM +0=(A.COS(PI.SAM))/2
010587,000358: 
010588,000359: 25,6403           57175                           SIN      1                                     #  SIN(2PI.PD4).PD2
010589,000360: 25,6404           64776                           DMP                                            
010590,000361: 25,6405           32043                           STORE    STARM      +2                         #  STARM +2=(A.SIN(PI.SAM))/2
010591,000362: 
010592,000363: 25,6406           55176                           COS      0                                     
010593,000364: 25,6407           32045                           STORE    STARM      +4                         #  STARM +4=0.5.COS(PAM.PI/4)
010594,000365: 
010595,000366: 25,6410           40576                           ITCQ     0                                     
010596,000367: 
010597,000368: 
010598,000369:                                                                                                  #  AXISGEN               GIVEN TWO STAR VECTORS     -         -
010599,000370:                                                                                                  #  -------                                      STARA AND STARB WRITTEN IN TWO
010600,000371:                                                                                                  #                          COORDINATE SYSTEMS, THE D AND C SYSTEMS SO THAT WE
010601,000372:                                                                                                  #                          HAVE       -       -           -       -
010602,000373:                                                                                                  #                                 STARA   STARB   AND STARB , STARA
010603,000374:                                                                                                  #                                      D       D           C       C
010604,000375:                                                                                                  #                          THIS PROGRAM COMPUTES THE HALF UNIT AXES
010605,000376:                                                                                                  #                                  -   -   -
010606,000377:                                                                                                  #                                 XD  YD  ZD
010607,000378:                                                                                                  #                                   C   C   C
010608,000379:                                                                                                  #                          THAT IS THE D COORDINATE SYSTEM AXES REFERRED TO THE C
010609,000380:                                                                                                  #                          COORDINATE SYSTEM
010610,000381:                                                                                                  #                        THE INPUTS ARE STORED AS FOLLOWS
010611,000382:                                                                                                  #                                                                -
010612,000383:                                                                                                  #                                 C(STARAD) - C(STARAD +5) = STARA
010613,000384:                                                                                                  #                                                                 D
010614,000385:                                                                                                  #                                                                -
010615,000386:                                                                                                  #                                 C(STARAD+6)-C(STARAD+11D)= STARB
010616,000387:                                                                                                  #                                                                 D
010617,000388:                                                                                                  #                                                                -
010618,000389:                                                                                                  #                                 C(6D) - C(11D)           = STARA
010619,000390:                                                                                                  #                                                                 C
010620,000391:                                                                                                  #                                                                -
010621,000392:                                                                                                  #                                 C(12D) - C(17D)          = STARB
010622,000393:                                                                                                  #                                                                 C
010623,000394:                                                                                                  #                        RESULTS ARE LEFT IN XDC TO XDC +17D
010624,000395:                                                                                                  #                          THE RETUTINE DESTROYS THE INPUTS AND USES LOCATIONS
010625,000396:                                                                                                  #                             STARAD+12D TO STARAD+17D AND 18D - 23D +30D
010626,000397: 25,6411           75575        AXISGEN            AXT,1    1                                     
010627,000398: 25,6412           55576                           AST,1                                          
010628,000399: 25,6413           00777                                    STARAD     +6                         
010629,000400: 25,6414           00763                                    STARAD     -6                         
010630,000401: 25,6415           41375        AXISGEN1           VXV*     1                                     
010631,000402: 25,6416           73176                           UNIT                                           
010632,000403: 25,6417           02011                                    STARAD     +12D,1                     
010633,000404: 25,6420           02025                                    STARAD     +18D,1                     
010634,000405: 25,6421           36025                           STORE    STARAD     +18D,1                     
010635,000406: 
010636,000407: 25,6422           41375                           VXV*     1                                     
010637,000408: 25,6423           44776                           VSLT                                           
010638,000409: 25,6424           02011                                    STARAD     +12D,1                     
010639,000410: 25,6425           02025                                    STARAD     +18D,1                     
010640,000411: 25,6426           00002                                    1                                     
010641,000412: 25,6427           36041                           STORE    STARAD     +24D,1                     
010642,000413: 
010643,000414: 25,6430           51576                           TIX,1    0                                     
010644,000415: 25,6431           12416                                    AXISGEN1                              
010645,000416: 
010646,000417: 25,6432           53573                           AXC,1    3                                     
010647,000418: 25,6433           67565                           SXA,1    AXT,1                                 
010648,000419: 25,6434           55561                           AST,1    AXT,2                                 
010649,000420: 25,6435           54576                           AST,2                                          
010650,000421: 25,6436           00007                                    6                                     
010651,000422: 25,6437           00037                                    30D                                   
010652,000423: 25,6440           00023                                    18D                                   
010653,000424: 25,6441           00007                                    6                                     
010654,000425: 25,6442           00007                                    6                                     
010655,000426: 25,6443           00003                                    2                                     
010656,000427: 
010657,000428: 25,6444           65576        AXISGEN2           XCHX,1   0                                     
010658,000429: 25,6445           00037                                    30D                                   
010659,000430: 
010660,000431: 25,6446           75376                           VXSC*    0                                     
010661,000432: 25,6447           00001                                    0,1                                   
010662,000433: 25,6450           01776                                    STARAD     +6,2                       
010663,000434: 
010664,000435: 25,6451           75376                           VXSC*    0                                     
010665,000436: 25,6452           00015                                    6,1                                   
010666,000437: 25,6453           02012                                    STARAD     +12D,2                     
010667,000438: 25,6454           32031                           STORE    24D                                   
010668,000439: 
010669,000440: 25,6455           75374                           VXSC*    2                                     
010670,000441: 25,6456           50642                           VAD      VAD                                   
010671,000442: 25,6457           44725                           VSLT     XCHX,1                                
010672,000443: 25,6460           00031                                    12D,1                                 
010673,000444: 25,6461           02026                                    STARAD     +18D,2                     
010674,000445: 25,6462           77777                                    -                                     
010675,000446: 25,6463           00031                                    24D                                   
010676,000447: 25,6464           00002                                    1                                     
010677,000448: 25,6465           00037                                    30D                                   
010678,000449: 25,6466           36135                           STORE    XDC        +18D,1                     
010679,000450: 
010680,000451: 25,6467           51576                           TIX,1    0                                     
010681,000452: 25,6470           12472                                    AXISGEN3                              
010682,000453: 
010683,000454: 25,6471           50576        AXISGEN3           TIX,2    0                                     
010684,000455: 25,6472           12445                                    AXISGEN2                              
010685,000456: 
010686,000457: 25,6473           40576                           ITCQ     0                                     
010687,000458: 
010688,000459: 
010689,000460: 25,6474           75175        CALCSXA            VMOVE    1                                     #  THIS PROGRAM COMPUTES THE SXT ANGLES SAC
010690,000461: 25,6475           45572                           ITA      ITC                                   #  AND PAC GIVEN THE STAR VECTOR IN SM AXES
010691,000462: 25,6476           01005                                    STAR                                  
010692,000463: 25,6477           00052                                    S2                                    #  HALF UNIT VECTOR
010693,000464: 25,6500           12125                                    SMNB                                  
010694,000465: 
010695,000466: 25,6501           47576                           NOLOD    0                                     
010696,000467: 25,6502           32007                           STORE    6                                     #  STORE (STARM0,STARM1,STARM2)
010697,000468: 
010698,000469: 25,6503           45176                           DMOVE    0                                     
010699,000470: 25,6504           12620                                    ZERODP                                
010700,000471: 25,6505           32045                           STORE    VAC        +4                         #  SET VAC TO (STARM0,STARM1,0)
010701,000472: 
010702,000473: 25,6506           47575                           NOLOD    1                                     #  UNIT VAC TO (S0,S1,0)
010703,000474: 25,6507           73072                           UNIT     TSRT                                  
010704,000475: 25,6510           00003                                    2                                     
010705,000476: 25,6511           32001                           STORE    0                                     #  STORE  COS/4 =S0/4 , SIN/4 = S1/4 ,0
010706,000477: 
010707,000478: 25,6512           45176                           DMOVE    0                                     
010708,000479: 25,6513           00001                                    0                                     
010709,000480: 25,6514           00021                                    COSTH                                 
010710,000481: 
010711,000482: 25,6515           45176                           DMOVE    0                                     
010712,000483: 25,6516           00003                                    2                                     
010713,000484: 25,6517           00023                                    SINTH                                 
010714,000485: 
010715,000486: 25,6520           76776                           ITC      0                                     
010716,000487: 25,6521           12067                                    ARCTRIG                               #  USES THE COS/SIN STORED ABOVE
010717,000488: 
010718,000489: 25,6522           47576                           NOLOD    0                                     
010719,000490: 25,6523           33057                           STORE    SAC                                   
010720,000491: 
010721,000492: 25,6524           42773                           DOT      3                                     
010722,000493: 25,6525           63713                           TSLT     ASIN                                  
010723,000494: 25,6526           63746                           TSLT     BOV                                   
010724,000495: 25,6527           73776                           BMN                                            
010725,000496: 25,6530           00001                                    0                                     #  1/4 UNIT  (STARM0,STARM1,0)
010726,000497: 25,6531           00007                                    6                                     #  STARM-1/2 UNIT VECTOR
010727,000498: 25,6532           00004                                    3                                     
010728,000499: 25,6533           00004                                    3                                     
010729,000500: 25,6534           12542                                    CALCSXA1                              
010730,000501: 25,6535           12542                                    CALCSXA1                              
010731,000502: 25,6536           33061                           STORE    PAC                                   
010732,000503: 
010733,000504: 25,6537           44576                           ITCI     0                                     
010734,000505: 25,6540           00052                                    S2                                    
010735,000506: 
010736,000507: 25,6541           77576        CALCSXA1           EXIT     0                                     #  PROGRAM ERROR,STAR OUT OF FIELD OF VIEW
010737,000508: 25,6542           02605                           TC       ALARM                                 
010738,000509: 25,6543           00402                           OCT      00402                                 
010739,000510: 25,6544           02115                           TC       ENDOFJOB                              
010740,000511: 
010741,000512: 
010742,000513: 25,6545           41775        SXTANG             VXV      1                                     #  TIVELY FROM INPUTS STAR AND XDC,YDC,ZDC
010743,000514: 25,6546           73072                           UNIT     TSRT                                  #  THE HALF UNIT STAR VECTOR AND THE NAV
010744,000515: 25,6547           01051                                    ZDC                                   #  BASE HALF AXES.
010745,000516: 25,6550           01005                                    STAR                                  
010746,000517: 25,6551           00002                                    1                                     
010747,000518: 25,6552           32027                           STORE    PDA                                   #  DEFINES PROJECTION OF STAR IN XY PLANE
010748,000519: 
010749,000520: 25,6553           42775                           DOT      1                                     
010750,000521: 25,6554           47025                           COMP     ITA                                   #  COMPUTE  SIN(PI.SAC)/4
010751,000522: 25,6555           00027                                    PDA                                   
010752,000523: 25,6556           01035                                    XDC                                   
010753,000524: 25,6557           00052                                    S2                                    
010754,000525: 25,6560           32023                           STORE    SINTH                                 
010755,000526: 
010756,000527: 25,6561           42776                           DOT      0                                     #  COMPUTE  COS(PI.SAC)/4
010757,000528: 25,6562           00027                                    PDA                                   
010758,000529: 25,6563           01043                                    YDC                                   
010759,000530: 25,6564           32021                           STORE    COSTH                                 
010760,000531: 
010761,000532: 25,6565           76776                           ITC      0                                     #  COMPUTE SAC
010762,000533: 25,6566           12067                                    ARCTRIG                               
010763,000534: 
010764,000535: 25,6567           47576                           NOLOD    0                                     
010765,000536: 25,6570           33057                           STORE    SAC                                   
010766,000537: 
010767,000538: 25,6571           41773                           VXV      3                                     
010768,000539: 25,6572           42716                           DOT      TSLT                                  
010769,000540: 25,6573           63116                           ASIN     TSLT                                  #  COMPUTE PAC
010770,000541: 25,6574           71756                           BOV      BMN                                   
010771,000542: 25,6575           00027                                    PDA                                   
010772,000543: 25,6576           01051                                    ZDC                                   
010773,000544: 25,6577           01005                                    STAR                                  
010774,000545: 25,6600           00003                                    2                                     
010775,000546: 25,6601           00004                                    3                                     
010776,000547: 25,6602           12610                                    SXTALARM                              
010777,000548: 25,6603           12610                                    SXTALARM                              #  WE NOW HAVE PRECISION ANGLE
010778,000549: 25,6604           33061                           STORE    PAC                                   
010779,000550: 
010780,000551: 25,6605           44576                           ITCI     0                                     #  JOB IS DONE
010781,000552: 25,6606           00052                                    S2                                    
010782,000553: 
010783,000554: 25,6607           77576        SXTALARM           EXIT     0                                     #  BRANCH TO RESTART SEQUENCE
010784,000555: 
010785,000556: 25,6610           02605                           TC       ALARM                                 
010786,000557: 25,6611           00402                           OCT      00402                                 
010787,000558: 25,6612           02115                           TC       ENDOFJOB                              
010788,000559: 
010789,000560: 
010790,000561: 25,6613           05520 26075  QTSN45             2DEC     .1768                                 
010791,000562: 25,6615           05260 04061  THIRD              2DEC     .167                                  
010792,000563: 25,6617                        ZPRIME             =        22D                                   
010793,000564: 25,6617                        PDA                =        22D                                   
010794,000565: 25,6617                        COSTH              =        16D                                   
010795,000566: 25,6617                        SINTH              =        18D                                   
010796,000567: 25,6617                        THETA              =        20D                                   
010797,000568: 25,6617  0000040               STARM              =        VAC                                   
010798,000569: 25,6617           00000 00000  ZERODP             2DEC     0          B-28                       
010799,000570: 25,6621           37777        POSMAXDP           OCT      37777                                 
010800,000571: 25,6622           37777                           OCT      37777                                 
010801,000572: 25,6623           20000 00000  HALFDP             2DEC     .5                                    
010802,000573: 25,6625           12525 12525  .333...            2DEC     .3333333333                            

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