Source Code
These source-code files are part of a reconstructed copy of Sundial E, the
final release of the Block II 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 2003053-121, 2003053-151, and 2003972-211, belonging to the MIT Museum. Since only binary dumps (rather than listings) of Sundial 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. |
013449,000002: ## Copyright: Public domain.
013450,000003: ## Filename: INFLIGHT_ALIGNMENT_ROUTINES.agc
013451,000004: ## Purpose: A section of Sundial E.
013452,000005: ## It is part of the reconstructed source code for the final
013453,000006: ## release of the Block II Command Module system test software. No
013454,000007: ## original listings of this program are available; instead, this
013455,000008: ## file was created via disassembly of dumps of Sundial core rope
013456,000009: ## modules and comparison with other AGC programs.
013457,000010: ## Assembler: yaYUL
013458,000011: ## Contact: Ron Burkey <info@sandroid.org>.
013459,000012: ## Website: www.ibiblio.org/apollo/index.html
013460,000013: ## Mod history: 2023-06-22 MAS Created from Aurora 12.
013461,000014: ## 2023-06-30 MAS Updated for Sundial E.
013462,000015:
013463,000016:
013464,000017:
013465,000018: 07,2000 BANK 7
013466,000019: 07,2000 E5,1400 EBANK= XSM
013467,000020:
013468,000021:
013469,000022:
013470,000023: # CALCGTA COMPUTES THE GYRO TORQUE ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
013471,000024:
013472,000025: # THE INPUT IS THE DESIRED STABLE MEMBER COORDINATES REFERRED TO PRESENT STABLE MEMBER COORDINATES. THE THREE
013473,000026: # HALF-UNIT VECTORS ARE STORED AT XDC, YDC, AND ZDC.
013474,000027:
013475,000028: # THE OUTPUTS ARE THE THREE GYRO TORQUING ANGLES TO BE APPLIED TO THE Y, Z, AND X GYROS AND ARE STORED DP AT IGC,
013476,000029: # MGC, AND OGC RESPECTIVELY. ANGLES ARE SCALED PROPERLY FOR IMUPULSE.
013477,000030:
013478,000031:
013479,000032:
013480,000033: 07,2000 71230 CALCGTA ITA DLOAD # PUSHDOWN 00,02,16D,18D,22D-26D,32D-36D
013481,000034: 07,2001 00051 S2 # XDC = (XD1 XD2 XD3)
013482,000035: 07,2002 01423 XDC # YDC = (YD1 YD2 YD3)
013483,000036: 07,2003 65325 PDDL PDDL # ZDC = (ZD1 ZD2 ZD3)
013484,000037: 07,2004 16711 ZERODP
013485,000038: 07,2005 01427 XDC +4
013486,000039: 07,2006 55476 DCOMP VDEF
013487,000040: 07,2007 77656 UNIT
013488,000041: 07,2010 06027 STODL ZPRIME # ZP = UNIT(-XD3 O XD1) = (ZP1 ZP2 ZP3)
013489,000042: 07,2011 00027 ZPRIME
013490,000043:
013491,000044: 07,2012 77742 SR1
013492,000045: 07,2013 06023 STODL SINTH # SIN(IGC) = ZP1
013493,000046: 07,2014 00033 ZPRIME +4
013494,000047: 07,2015 77742 SR1
013495,000048: 07,2016 36021 STCALL COSTH # COS(IGC) = ZP3
013496,000049: 07,2017 16051 ARCTRIG
013497,000050:
013498,000051: 07,2020 07503 STODL IGC # Y GYRO TORQUING ANGLE FRACTION OF REV.
013499,000052: 07,2021 01425 XDC +2
013500,000053: 07,2022 77742 SR1
013501,000054: 07,2023 06023 STODL SINTH # SIN(MGC) = XD2
013502,000055: 07,2024 00027 ZPRIME
013503,000056:
013504,000057: 07,2025 65205 DMP PDDL
013505,000058: 07,2026 01427 XDC +4 # PD00 = (ZP1)(XD3)
013506,000059: 07,2027 00033 ZPRIME +4
013507,000060:
013508,000061: 07,2030 45205 DMP DSU
013509,000062: 07,2031 01423 XDC # MPAC = (ZP3)(XD1)
013510,000063: 07,2032 77626 STADR
013511,000064: 07,2033 41756 STCALL COSTH # COS(MGC) = MPAC - PD00
013512,000065: 07,2034 16051 ARCTRIG
013513,000066:
013514,000067: 07,2035 23505 STOVL MGC # Z GYRO TORQUING ANGLE FRACTION OF REV.
013515,000068: 07,2036 00027 ZPRIME
013516,000069: 07,2037 77641 DOT
013517,000070: 07,2040 01437 ZDC
013518,000071: 07,2041 22021 STOVL COSTH # COS(OGC) = ZP . ZDC
013519,000072: 07,2042 00027 ZPRIME
013520,000073: 07,2043 77641 DOT
013521,000074: 07,2044 01431 YDC
013522,000075: 07,2045 36023 STCALL SINTH # SIN(OGC) = ZP . YDC
013523,000076: 07,2046 16051 ARCTRIG
013524,000077:
013525,000078: 07,2047 37501 STCALL OGC # X GYRO TORQUING ANGLE FRACTION OF REV.
013526,000079: 07,2050 00051 S2
013527,000080:
013528,000081: # ARCTRIG COMPUTES AN ANGLE GIVEN THE SINE AND COSINE OF THIS ANGLE.
013529,000082:
013530,000083: # THE INPUTS ARE SIN/4 AND COS/4 STORED DP AT SINTH AND COSTH.
013531,000084:
013532,000085: # THE OUTPUT IS THE CALCULATED ANGLE BETWEEN +.5 AND -.5 REVOLUTIONS AND STORED AT THETA. THE OUTPUT IS ALSO
013533,000086: # AVAILABLE AT MPAC.
013534,000087:
013535,000088:
013536,000089:
013537,000090: 07,2051 51545 ARCTRIG DLOAD ABS # PUSHDOWN 16D,18D,20D,22D-26D
013538,000091: 07,2052 00023 SINTH
013539,000092: 07,2053 50025 DSU BMN
013540,000093: 07,2054 16677 QTSN45 # ABS(SIN/4) - SIN(45)/4
013541,000094: 07,2055 16064 TRIG1 # IF (-45,45) OR (135,-135)
013542,000095:
013543,000096:
013544,000097:
013545,000098: 07,2056 72545 DLOAD SL1 # (45,135) OR (-135,-45)
013546,000099: 07,2057 00021 COSTH
013547,000100: 07,2060 75326 ACOS SIGN
013548,000101: 07,2061 00023 SINTH
013549,000102: 07,2062 00025 STORE THETA # X = ARCCOS(COS) WITH SIGN(SIN)
013550,000103: 07,2063 77616 RVQ
013551,000104:
013552,000105:
013553,000106:
013554,000107: 07,2064 72545 TRIG1 DLOAD SL1 # (-45,45) OR (135,-135)
013555,000108: 07,2065 00023 SINTH
013556,000109: 07,2066 77736 ASIN
013557,000110: 07,2067 06025 STODL THETA # X = ARCSIN(SIN) WITH SIGN(SIN)
013558,000111: 07,2070 00021 COSTH
013559,000112: 07,2071 77640 BMN
013560,000113: 07,2072 16075 TRIG2 # IF (135,-135)
013561,000114:
013562,000115: 07,2073 43545 DLOAD RVQ
013563,000116: 07,2074 00025 THETA # X = ARCSIN(SIN) (-45,45)
013564,000117:
013565,000118:
013566,000119:
013567,000120: 07,2075 75345 TRIG2 DLOAD SIGN # (135,-135)
013568,000121: 07,2076 16701 HALFDP
013569,000122: 07,2077 00023 SINTH
013570,000123: 07,2100 77625 DSU
013571,000124: 07,2101 00025 THETA
013572,000125: 07,2102 00025 STORE THETA # X = .5 WITH SIGN(SIN) - ARCSIN(SIN)
013573,000126: 07,2103 77616 RVQ # (+) - (+) OR (-) - (-)
013574,000127:
013575,000128: # SMNB TRANSFORMS A STAR DIRECTION FROM STABLE MEMBER TO NAVIGATION BASE COORDINATES.
013576,000129:
013577,000130: # THE INPUTS ARE 1) THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT LOCATION 32D OF THE
013578,000131: # VAC AREA. 2) THE GIMBAL ANGLES (CDUY,CDUZ,CDUX) STORED AT ALTERNATING LOCATIONS RESPECTIVELY. THE ANGLES ARE
013579,000132: # USUALLY STORED AT LOCATIONS 2,4, AND 6 OF THE MARK VAC AREA. THEY CAN BE STORED AT LOCATIONS 20,22, AND 24 OF
013580,000133: # YOUR JOB VAC AREA. 3) THE BASE ADDRESS OF THE GIMBAL ANGLES STORED SP AT LOCATION S1 OF yOUR JOB VAC AREA.
013581,000134:
013582,000135: # THE OUTPUT IS THE STAR VECTOR REFERRED TO NAVIGATION BASE COORDINATES STORED AT 32D OF THE VAC AREA. THE OUTPUT
013583,000136: # IS ALSO AVAILABLE AT MPAC.
013584,000137:
013585,000138:
013586,000139:
013587,000140: 07,2104 43030 SMNB ITA CLEAR # PUSHDOWN 00,02,04-10D,30D,32D-36D
013588,000141: 07,2105 00051 S2
013589,000142: 07,2106 00264 NBSMBIT # SET NBSMBIT = 0
013590,000143:
013591,000144: 07,2107 77170 SMNB1 AXT,1 AXT,2 # ROTATE X,Z, ABOUT Y
013592,000145: 07,2110 00004 4
013593,000146: 07,2111 00000 0
013594,000147: 07,2112 77634 CALL
013595,000148: 07,2113 16154 AXISROT
013596,000149:
013597,000150: 07,2114 77170 AXT,1 AXT,2 # ROTATE Y,X ABOUT Z
013598,000151: 07,2115 00002 2
013599,000152: 07,2116 00004 4
013600,000153: 07,2117 77634 CALL
013601,000154: 07,2120 16154 AXISROT
013602,000155:
013603,000156: 07,2121 77170 AXT,1 AXT,2 # ROTATE Z,Y ABOUT X
013604,000157: 07,2122 00000 0
013605,000158: 07,2123 00002 2
013606,000159: 07,2124 77634 CALL
013607,000160: 07,2125 16154 AXISROT
013608,000161:
013609,000162: 07,2126 77650 GOTO
013610,000163: 07,2127 00051 S2
013611,000164:
013612,000165: # NBSM TRANSFORMS A STAR DIRECTION FROM NAVIGATION BASE TO STABLE MEMBER COORDINATES.
013613,000166:
013614,000167: # THE INPUTS ARE 1) THE STAR VECTOR REFERRED TO NAVIGATION BASE COORDINATES STORED AT LOCATION 32D OF THE VAC
013615,000168: # AREA. 2) THE GIMBAL ANGLES (CDUY,CDUZ,CDUX) STORED AT ALTERNATING LOCATIONS RESPECTIVELY. THE ANGLES ARE
013616,000169: # USUALLY STORED AT LOCATIONS 2,4, AND 6 OF THE MARK VAC AREA. THEY CAN BE STORED AT LOCATIONS 20,22, AND 24 OF
013617,000170: # YOUR JOB VAC AREA. 3) THE BASE ADDRESS OF THE GIMBAL ANGLES STORED SP AT LOCATION S1 OF YOUR JOB VAC AREA.
013618,000171:
013619,000172: # THE OUTPUT IS THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT LOCATION 32D OF THE VAC
013620,000173: # AREA. THE OUTPUT IS ALSO AVAILABLE AT MPAC.
013621,000174:
013622,000175:
013623,000176:
013624,000177: 07,2130 43030 NBSM ITA SET # PUSHDOWN 00,02,04-10D,30D,32D-36D
013625,000178: 07,2131 00051 S2
013626,000179: 07,2132 00064 NBSMBIT # SET NBSMBIT = 1
013627,000180:
013628,000181: 07,2133 77170 NBSM2 AXT,1 AXT,2 # ROTATE Z,Y ABOUT X
013629,000182: 07,2134 00000 0
013630,000183: 07,2135 00002 2
013631,000184: 07,2136 77634 CALL
013632,000185: 07,2137 16154 AXISROT
013633,000186:
013634,000187: 07,2140 77170 AXT,1 AXT,2 # ROTATE Y,X ABOUT Z
013635,000188: 07,2141 00002 2
013636,000189: 07,2142 00004 4
013637,000190: 07,2143 77634 CALL
013638,000191: 07,2144 16154 AXISROT
013639,000192:
013640,000193: 07,2145 77170 AXT,1 AXT,2 # ROTATE X,Z, ABOUT Y
013641,000194: 07,2146 00004 4
013642,000195: 07,2147 00000 0
013643,000196: 07,2150 77634 CALL
013644,000197: 07,2151 16154 AXISROT
013645,000198:
013646,000199: 07,2152 77650 GOTO
013647,000200: 07,2153 00051 S2
013648,000201:
013649,000202: # AXISROT IS UTILIZED BY THE SMNB AND NBSM ROUTINES. SEE REMARKS ON THESE ROUTINES FOR INPUTS AND OUTPUTS.
013650,000203:
013651,000204:
013652,000205:
013653,000206: 07,2154 66660 AXISROT XSU,1 SLOAD*
013654,000207: 07,2155 00050 S1 # SMNB . NBSM
013655,000208: 07,2156 00005 4,1 # IG MG OG . OG MG IG
013656,000209: 07,2157 56024 RTB XAD,1
013657,000210: 07,2160 11537 CDULOGIC
013658,000211: 07,2161 00050 S1
013659,000212: 07,2162 00037 STORE 30D
013660,000213:
013661,000214: 07,2163 77746 ACCUROT COS
013662,000215: 07,2164 10011 STODL 8D,1 # COS(ANGLE)
013663,000216: 07,2165 00037 30D
013664,000217: 07,2166 77756 SIN
013665,000218: 07,2167 02013 STORE 10D,1 # SIN(ANGLE)
013666,000219:
013667,000220: 07,2170 72403 DMP* SL1
013668,000221: 07,2171 77732 32D +4,2
013669,000222: 07,2172 40723 PDDL* DMP* # PD0
013670,000223: 07,2173 00011 8D,1 # S3SIN S1SIN S2SIN . S2SIN S1SIN S3SIN
013671,000224: 07,2174 77732 32D +4,2
013672,000225:
013673,000226: 07,2175 64752 SL1 PDDL* # PD2
013674,000227: 07,2176 00013 10D,1 # S3COS S1COS S2COS . S2COS S1COS S3COS
013675,000228:
013676,000229: 07,2177 72403 DMP* SL1 # MPAC
013677,000230: 07,2200 00045 32D +4,1 # S1SIN S2SIN S3SIN . S3SIN S2SIN S1SIN
013678,000231:
013679,000232: 07,2201 77614 BOFF
013680,000233: 07,2202 00344 NBSMBIT
013681,000234: 07,2203 16215 AXISROT1
013682,000235:
013683,000236: 07,2204 45421 BDSU STADR # . PD2 - MPAC
013684,000237: 07,2205 57732 STODL* 32D +4,2 # . S2 S1 S3
013685,000238: 07,2206 00011 8D,1
013686,000239:
013687,000240: 07,2207 72403 DMP* SL1 # . MPAC
013688,000241: 07,2210 00045 32D +4,1 # . S3COS S2COS S1COS
013689,000242:
013690,000243: 07,2211 45415 DAD STADR # . PD0 + MPAC
013691,000244: 07,2212 53732 STOVL 32D +4,1 # . S3 S2 S1
013692,000245: 07,2213 00041 32D
013693,000246: 07,2214 77616 RVQ
013694,000247:
013695,000248: 07,2215 45415 AXISROT1 DAD STADR # MPAC + PD2 .
013696,000249: 07,2216 57732 STODL* 32D +4,2 # S3 S1 S2 .
013697,000250: 07,2217 00011 8D,1
013698,000251: 07,2220 72403 DMP* SL1 # MPAC .
013699,000252: 07,2221 00045 32D +4,1 # S1COS S2COS S3COS .
013700,000253:
013701,000254: 07,2222 45425 DSU STADR # MPAC - PD0 .
013702,000255: 07,2223 53732 STOVL 32D +4,1 # S1 S2 S3 .
013703,000256: 07,2224 00041 32D
013704,000257: 07,2225 77616 RVQ
013705,000258:
013706,000259: # CALCGA COMPUTES THE CDU DRIVING ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
013707,000260:
013708,000261: # THE INPUTS ARE 1) THE NAVIGATION BASE COORDINATES REFERRED TO ANY COORDINATE SYSTEM. THE THREE HALF-UNIT
013709,000262: # VECTORS ARE STORED AT XNB, YNB, AND ZNB. 2) THE DESIRED STABLE MEMBER COORDINATES REFERRED TO THE SAME
013710,000263: # COORDINATE SYSTEM ARE STORED AT XSM, YSM, AND ZSM.
013711,000264:
013712,000265: # THE OUTPUTS ARE THE THREE CDU DRIVING ANGLES AND ARE STORED SP AT THETAD, THETAD +1, AND THETAD +2.
013713,000266:
013714,000267: 07,2226 47375 CALCGA VLOAD VXV # PUSHDOWN 00-04,16D,18D
013715,000268: 07,2227 01423 XNB # XNB = OGA (OUTER GIMBAL AXIS)
013716,000269: 07,2230 01407 YSM # YSM = IGA (INNER GIMBAL AXIS)
013717,000270: 07,2231 41456 UNIT PUSH # PD0 = UNIT(OGA X IGA) = MGA
013718,000271:
013719,000272: 07,2232 46041 DOT ITA
013720,000273: 07,2233 01437 ZNB
013721,000274: 07,2234 00051 S2
013722,000275: 07,2235 22021 STOVL COSTH # COS(OG) = MGA . ZNB
013723,000276: 07,2236 00001 0
013724,000277: 07,2237 77641 DOT
013725,000278: 07,2240 01431 YNB
013726,000279: 07,2241 36023 STCALL SINTH # SIN(OG) = MGA . YNB
013727,000280: 07,2242 16051 ARCTRIG
013728,000281: 07,2243 23501 STOVL OGC
013729,000282: 07,2244 00001 0
013730,000283:
013731,000284: 07,2245 50235 VXV DOT # PROVISION FOR MG ANGLE OF 90 DEGREES
013732,000285: 07,2246 01423 XNB
013733,000286: 07,2247 01407 YSM
013734,000287: 07,2250 77752 SL1
013735,000288: 07,2251 22021 STOVL COSTH # COS(MG) = IGA . (MGA X OGA)
013736,000289: 07,2252 01407 YSM
013737,000290: 07,2253 77641 DOT
013738,000291: 07,2254 01423 XNB
013739,000292: 07,2255 36023 STCALL SINTH # SIN(MG) = IGA . OGA
013740,000293: 07,2256 16051 ARCTRIG
013741,000294: 07,2257 01505 STORE MGC
013742,000295:
013743,000296: 07,2260 45246 ABS DSU
013744,000297: 07,2261 16717 .166...
013745,000298: 07,2262 77644 BPL
013746,000299: 07,2263 16302 GIMLOCK1 # IF ANGLE GREATER THAN 60 DEGREES
013747,000300:
013748,000301: 07,2264 50375 CALCGA1 VLOAD DOT
013749,000302: 07,2265 01415 ZSM
013750,000303: 07,2266 00001 0
013751,000304: 07,2267 22021 STOVL COSTH # COS(IG) = ZSM . MGA
013752,000305: 07,2270 01401 XSM
013753,000306: 07,2271 45441 DOT STADR
013754,000307: 07,2272 41754 STCALL SINTH # SIN(IG) = XSM . MGA
013755,000308: 07,2273 16051 ARCTRIG
013756,000309:
013757,000310: 07,2274 23503 STOVL IGC
013758,000311: 07,2275 01501 OGC
013759,000312: 07,2276 77624 RTB
013760,000313: 07,2277 11606 V1STO2S
013761,000314: 07,2300 36401 STCALL THETAD
013762,000315: 07,2301 00051 S2
013763,000316:
013764,000317: 07,2302 77776 GIMLOCK1 EXIT
013765,000318: 07,2303 05644 TC ALARM
013766,000319: 07,2304 00401 OCT 00401
013767,000320: 07,2305 06000 TC INTPRET
013768,000321: 07,2306 77650 GOTO
013769,000322: 07,2307 16264 CALCGA1
013770,000323:
013771,000324:
013772,000325: # THIS ROUTINE TAKES THE SHAFT AND TRUNNION ANGLES AS READ BY THE CM OPTICAL SYSTEM AND CONVERTS THEM INTO A UNIT
013773,000326: # VECTOR REFERENCED TO THE NAVIGATION BASE COORDINATE SYSTEM AND COINCIDENT WITH THE SEXTANT LINE OF SIGHT.
013774,000327:
013775,000328: # THE INPUTS ARE 1) THE SEXTANT SHAFT AND TRUNNION ANGLES ARE STORED SP IN LOCATIONS 3 AND 5 RESPECTIVELY OF THE
013776,000329: # MARK VAC AREA. 2) THE COMPLEMENT OF THE BASE ADDRESS OF THE MARK VAC AREA IS STORED SP AT LOCATION X1 OF YOUR
013777,000330: # JOB VAC AREA.
013778,000331:
013779,000332: # THE OUTPUT IS A HALF-UNIT VECTOR IN NAVIGATION BASE COORDINATES AND STORED AT LOCATION 32D OF THE VAC AREA. THE
013780,000333: # OUTPUT IS ALSO AVAILABLE AT MPAC.
013781,000334:
013782,000335:
013783,000336: 07,2310 45133 SXTNB SLOAD* RTB # PUSHDOWN 00,02,04,(17D-19D),32D-36D
013784,000337: 07,2311 00006 5,1 # TRUNNION = TA
013785,000338: 07,2312 11537 CDULOGIC
013786,000339: 07,2313 41424 RTB PUSH
013787,000340: 07,2314 16337 SXTLOGIC
013788,000341: 07,2315 72556 SIN SL1
013789,000342: 07,2316 66606 PUSH SLOAD* # PD2 = SIN(TA)
013790,000343: 07,2317 00004 3,1 # SHAFT = SA
013791,000344: 07,2320 41424 RTB PUSH # PD4 = SA
013792,000345: 07,2321 11537 CDULOGIC
013793,000346:
013794,000347: 07,2322 41346 COS DMP
013795,000348: 07,2323 00003 2
013796,000349: 07,2324 06041 STODL STARM # COS(SA)SIN(TA)
013797,000350:
013798,000351: 07,2325 41356 SIN DMP
013799,000352: 07,2326 77626 STADR
013800,000353: 07,2327 71734 STODL STARM +2 # SIN(SA)SIN(TA)
013801,000354:
013802,000355: 07,2330 77746 COS
013803,000356: 07,2331 22045 STOVL STARM +4
013804,000357: 07,2332 00041 STARM # STARM = 32D
013805,000358: 07,2333 76521 MXV VSL1
013806,000359: 07,2334 16646 NB1NB2
013807,000360: 07,2335 00041 STORE 32D
013808,000361: 07,2336 77616 RVQ
013809,000362:
013810,000363:
013811,000364: 07,2337 32667 SXTLOGIC CAF 10DEGS- # CORRECT FOR 19.775 DEGREE OFFSET
013812,000365: 07,2340 26140 ADS MPAC
013813,000366: 07,2341 37636 CAF QUARTER
013814,000367: 07,2342 07261 TC SHORTMP
013815,000368: 07,2343 06014 TC DANZIG
013816,000369:
013817,000370: # AXISGEN COMPUTES THE COORDINATES OF ONE COORDINATE SYSTEM REFERRED TO ANOTHER COORDINATE SYSTEM.
013818,000371:
013819,000372: # THE INPUTS ARE 1) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM A STORED AT STARAD. 2) THE STAR2 VECTOR
013820,000373: # REFERRED TO COORDINATE SYSTEM A STORED AT STARAD +6. 3) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM B STORED
013821,000374: # AT LOCATION 6 OF THE VAC AREA. 4) THE STAR2 VECTOR REFERRED TO COORDINATE SYSTEM B STORED AT LOCATION 12D OF
013822,000375: # THE VAC AREA.
013823,000376:
013824,000377: # THE OUTPUT DEFINES COORDINATE SYSTEM A REFERRED TO COORDINATE SYSTEM B. THE THREE HALF-UNIT VECTORS ARE STORED
013825,000378: # AT LOCATIONS XDC, XDC +6, XDC +12D, AND STARAD, STARAD +6, STARAD +12D.
013826,000379:
013827,000380: 07,2344 66370 AXISGEN AXT,1 SSP # PUSHDOWN 00-22D,24D-28D,30D
013828,000381: 07,2345 01452 STARAD +6
013829,000382: 07,2346 00051 S1
013830,000383: 07,2347 01436 STARAD -6
013831,000384:
013832,000385: 07,2350 46773 AXISGEN1 VLOAD* VXV* # 06D UA = S1
013833,000386: 07,2351 01461 STARAD +12D,1 # STARAD +00D UB = S1
013834,000387: 07,2352 01467 STARAD +18D,1
013835,000388: 07,2353 77656 UNIT # 12D VA = UNIT(S1 X S2)
013836,000389: 07,2354 33467 STOVL* STARAD +18D,1 # STARAD +06D VB = UNIT(S1 X S2)
013837,000390: 07,2355 01461 STARAD +12D,1
013838,000391:
013839,000392: 07,2356 76433 VXV* VSL1
013840,000393: 07,2357 01467 STARAD +18D,1 # 18D WA = UA X VA
013841,000394: 07,2360 03475 STORE STARAD +24D,1 # STARAD +12D WB = UB X VB
013842,000395:
013843,000396: 07,2361 77700 TIX,1
013844,000397: 07,2362 16350 AXISGEN1
013845,000398:
013846,000399: 07,2363 66160 AXC,1 SXA,1
013847,000400: 07,2364 00006 6
013848,000401: 07,2365 00036 30D
013849,000402:
013850,000403: 07,2366 66370 AXT,1 SSP
013851,000404: 07,2367 00022 18D
013852,000405: 07,2370 00051 S1
013853,000406: 07,2371 00006 6
013854,000407:
013855,000408: 07,2372 66374 AXT,2 SSP
013856,000409: 07,2373 00006 6
013857,000410: 07,2374 00052 S2
013858,000411: 07,2375 00002 2
013859,000412:
013860,000413: 07,2376 76720 AXISGEN2 XCHX,1 VLOAD*
013861,000414: 07,2377 00036 30D # X1=-6 X2=+6 X1=-6 X2=+4 X1=-6 X2=+2
013862,000415: 07,2400 00001 0,1
013863,000416: 07,2401 62757 VXSC* PDVL* # J=(UA)(UB1) J=(UA)(UB2) J=(UA)(UB3)
013864,000417: 07,2402 76324 STARAD +6,2
013865,000418: 07,2403 00007 6,1
013866,000419: 07,2404 77757 VXSC*
013867,000420: 07,2405 76316 STARAD +12D,2
013868,000421: 07,2406 30031 STOVL* 24D # K=(VA)(VB1) J=(VA)(VB2) J=(VA)(VB3)
013869,000422: 07,2407 00015 12D,1
013870,000423:
013871,000424: 07,2410 53357 VXSC* VAD
013872,000425: 07,2411 76310 STARAD +18D,2 # L=(WA)(WB1) J=(WA)(WB2) J=(WA)(WB3)
013873,000426: 07,2412 76455 VAD VSL1
013874,000427: 07,2413 00031 24D
013875,000428: 07,2414 77720 XCHX,1
013876,000429: 07,2415 00036 30D
013877,000430: 07,2416 03445 STORE XDC +18D,1 # XDC = L+J+K YDC = L+J+K ZDC = L+J+K
013878,000431:
013879,000432: 07,2417 77700 TIX,1
013880,000433: 07,2420 16421 AXISGEN3
013881,000434:
013882,000435: 07,2421 77704 AXISGEN3 TIX,2
013883,000436: 07,2422 16376 AXISGEN2
013884,000437:
013885,000438: 07,2423 77775 VLOAD
013886,000439: 07,2424 01423 XDC
013887,000440: 07,2425 23445 STOVL STARAD
013888,000441: 07,2426 01431 YDC
013889,000442: 07,2427 23453 STOVL STARAD +6
013890,000443: 07,2430 01437 ZDC
013891,000444: 07,2431 01461 STORE STARAD +12D
013892,000445:
013893,000446: 07,2432 77616 RVQ
013894,000447:
013895,000448:
013896,000449: # CALCSXA COMPUTES THE SEXTANT SHAFT AND TRUNNION ANGLES REQUIRED TO POSITION THE OPTICS SUCH THAT A STAR LINE-
013897,000450: # OF-SIGHT LIES ALONG THE STAR VECTOR. THE ROUTINE TAKES THE GIVEN STAR VECTOR AND EXPRESSES IT AS A VECTOR REF-
013898,000451: # ERENCED TO THE OPTICS COORDINATE SYSTEM. IN ADDITION IT SETS UP THREE UNIT VECTORS DEFINING THE X, Y, AND Z AXES
013899,000452: # REFERENCED TO THE OPTICS COORDINATE SYSTEM.
013900,000453:
013901,000454: # THE INPUTS ARE 1) THE STAR VECTOR REFERRED TO PRESENT STABLE MEMBER COORDINATES STORED AT STAR. 2) SAME ANGLE
013902,000455: # INPUT AS *SMNB*, I.E. SINES AND COSINES OF THE CDU ANGLES, IN THE ORDER Y Z X, AT SINCDU AND COSCDU. A CALL
013903,000456: # TO CDUTRIG WILL PROVIDE THIS INPUT.
013904,000457:
013905,000458: # THE OUTPUTS ARE THE SEXTANT SHAFT AND TRUNNION ANGLES STORED DP AT SAC AND PAC RESPECTIVELY. (LOW ORDER PART
013906,000459: # EQUAL TO ZERO).
013907,000460:
013908,000461:
013909,000462: 07,2433 77230 CALCSXA ITA VLOAD # PUSHDOWN 00-26D,28D,30D,32D-36D
013910,000463: 07,2434 00034 28D
013911,000464: 07,2435 01467 STAR
013912,000465: 07,2436 36041 STCALL 32D
013913,000466: 07,2437 16104 SMNB
013914,000467: 07,2440 76521 MXV VSL1
013915,000468: 07,2441 16624 NB2NB1
013916,000469: 07,2442 06007 STODL 6 # STORE (STARM0,STARM1,STARM2)
013917,000470: 07,2443 16711 ZERODP
013918,000471: 07,2444 00146 STORE MPAC +5 # SET MPAC TO (STARM0,STARM1,0)
013919,000472: 07,2445 77624 RTB
013920,000473: 07,2446 11576 VECMODE
013921,000474: 07,2447 40056 UNIT BOV
013922,000475: 07,2450 16570 ZNB=S1
013923,000476: 07,2451 06001 STODL 0 # STORE COS/4 =S0/4 , SIN/4 = S1/4 ,0
013924,000477: 07,2452 00001 0
013925,000478: 07,2453 06021 STODL COSTH
013926,000479: 07,2454 00003 2
013927,000480: 07,2455 36023 STCALL SINTH
013928,000481: 07,2456 16051 ARCTRIG # USES THE COS/SIN STORED ABOVE
013929,000482: 07,2457 77624 RTB
013930,000483: 07,2460 11602 1STO2S
013931,000484: 07,2461 23475 STOVL SAC
013932,000485: 07,2462 00001 0
013933,000486: 07,2463 72441 DOT SL1
013934,000487: 07,2464 00007 6
013935,000488: 07,2465 50136 ASIN BMN
013936,000489: 07,2466 16476 CALCSXA1 # TRUNNION ANGLE NEGATIVE
013937,000490: 07,2467 40112 SL2 BOV
013938,000491: 07,2470 16476 CALCSXA1 # TRUNNION ANGLE GREATER THAN 90 DEGREES
013939,000492: 07,2471 45025 DSU RTB
013940,000493: 07,2472 16675 20DEG-
013941,000494: 07,2473 11602 1STO2S
013942,000495: 07,2474 37477 STCALL PAC
013943,000496: 07,2475 00034 28D
013944,000497:
013945,000498: 07,2476 77776 CALCSXA1 EXIT # PROGRAM ERROR,STAR OUT OF FIELD OF VIEW
013946,000499: 07,2477 05644 TC ALARM
013947,000500: 07,2500 00402 OCT 00402
013948,000501: 07,2501 04353 TC ENDOFJOB
013949,000502:
013950,000503:
013951,000504: # SXTANG COMPUTES THE SEXTANT SHAFT AND TRUNNION ANGLES REQUIRED TO POSITION THE OPTICS SUCH THAT A STAR LINE-OF-
013952,000505: # SIGHT LIES ALONG THE STAR VECTOR.
013953,000506:
013954,000507: # THE INPUTS ARE 1) THE STAR VECTOR REFERRED TO ANY COORDINATE SYSTEM STORED AT STAR. 2) THE NAVIGATION BASE
013955,000508: # COORDINATES REFERRED TO THE SAME COORDINATE SYSTEM. THESE THREE HALF-UNIT VECTORS ARE STORED AT XNB, YNB, AND
013956,000509: # ZNB.
013957,000510:
013958,000511: # THE OUTPUTS ARE THE SEXTANT SHAFT AND TRUNNION ANGLES STORED DP AT SAC AND PAC RESPECTIVELY. (LOW ORDER PART
013959,000512: # EQUAL TO ZERO).
013960,000513:
013961,000514:
013962,000515: 07,2502 45030 SXTANG ITA RTB # PUSHDOWN 16D,18D,22D-26D,28D
013963,000516: 07,2503 00034 28D
013964,000517: 07,2504 11746 TRANSP1 # EREF WRT NB2
013965,000518: 07,2505 64375 VLOAD MXV
013966,000519: 07,2506 01423 XNB
013967,000520: 07,2507 16624 NB2NB1
013968,000521: 07,2510 77772 VSL1
013969,000522: 07,2511 23734 STOVL XNB1
013970,000523: 07,2512 01431 YNB
013971,000524: 07,2513 76521 MXV VSL1
013972,000525: 07,2514 16624 NB2NB1
013973,000526: 07,2515 23742 STOVL YNB1
013974,000527: 07,2516 01437 ZNB
013975,000528: 07,2517 76521 MXV VSL1
013976,000529: 07,2520 16624 NB2NB1
013977,000530: 07,2521 01750 STORE ZNB1
013978,000531:
013979,000532: 07,2522 45024 RTB RTB
013980,000533: 07,2523 11746 TRANSP1
013981,000534: 07,2524 11760 TRANSP2
013982,000535:
013983,000536: 07,2525 47375 SXTANG1 VLOAD VXV
013984,000537: 07,2526 01750 ZNB1
013985,000538: 07,2527 01467 STAR
013986,000539: 07,2530 40056 UNIT BOV
013987,000540: 07,2531 16570 ZNB=S1
013988,000541: 07,2532 00027 STORE PDA # PDA = UNIT(ZNB X S)
013989,000542:
013990,000543: 07,2533 57441 DOT DCOMP
013991,000544: 07,2534 01734 XNB1
013992,000545: 07,2535 22023 STOVL SINTH # SIN(SA) = PDA . -XNB
013993,000546: 07,2536 00027 PDA
013994,000547:
013995,000548: 07,2537 77641 DOT
013996,000549: 07,2540 01742 YNB1
013997,000550: 07,2541 36021 STCALL COSTH # COS(SA) = PDA . YNB
013998,000551: 07,2542 16051 ARCTRIG
013999,000552: 07,2543 77624 RTB
014000,000553: 07,2544 11602 1STO2S
014001,000554: 07,2545 23475 STOVL SAC
014002,000555: 07,2546 00027 22D
014003,000556: 07,2547 50235 VXV DOT
014004,000557: 07,2550 01750 ZNB1
014005,000558: 07,2551 01467 STAR
014006,000559: 07,2552 67512 SL2 ASIN
014007,000560: 07,2553 62440 BMN SL2
014008,000561: 07,2554 16564 SXTALARM # TRUNNION ANGLE NEGATIVE
014009,000562: 07,2555 45200 BOV DSU
014010,000563: 07,2556 16564 SXTALARM # TRUNNION ANGLE GREATER THAN 90 DEGREES
014011,000564: 07,2557 16675 20DEG-
014012,000565: 07,2560 77624 RTB
014013,000566: 07,2561 11602 1STO2S
014014,000567: 07,2562 37477 STCALL PAC
014015,000568: 07,2563 00034 28D
014016,000569: 07,2564 77776 SXTALARM EXIT # PROGRAM ERROR,STAR OUT OF FIELD OF VIEW
014017,000570: 07,2565 05644 TC ALARM
014018,000571: 07,2566 00403 OCT 00403
014019,000572: 07,2567 04353 TC ENDOFJOB
014020,000573: 07,2570 77745 ZNB=S1 DLOAD
014021,000574: 07,2571 16671 270DEG
014022,000575: 07,2572 07475 STODL SAC
014023,000576: 07,2573 16673 20DEGS-
014024,000577: 07,2574 37477 STCALL PAC
014025,000578: 07,2575 00034 28D
014026,000579:
014027,000580:
014028,000581:
014029,000582: # SMD/EREF TRANSFORMS STABLE MEMBER DESIRED COORDINATES FROM STABLE MEMBER DESIRED (DESIRED = PRESENT HERE) TO
014030,000583: # EARTH REFERENCE COORDINATES TO ALIGN THE STABLE MEMBER TO SPECIFIED GIMBAL ANGLES.
014031,000584:
014032,000585: # THE INPUTS ARE 1) THE MATRIX DEFINING THE EARTH REFERENCE COORDINATE FRAME WITH RESPECT TO THE NAVIGATION BASE
014033,000586: # COORDINATE FRAME. 2) SAME AS 2) AND 3) OF SMNB.
014034,000587:
014035,000588: # THE OUTPUT IS THE DESIRED STABLE MEMBER COORDINATES WITH RESPECT TO THE EARTH REFERENCE COORDINATE FRAME. THE
014036,000589: # THREE UNIT VECTORS ARE STORED AT XSM, YSM, AND ZSM.
014037,000590:
014038,000591: 07,2576 77230 SMD/EREF ITA VLOAD # PUSHDOWN 00,02,04-10D,30D,32D-36D
014039,000592: 07,2577 00014 12D
014040,000593: 07,2600 16707 XUNIT
014041,000594: 07,2601 36041 STCALL 32D
014042,000595: 07,2602 16104 SMNB # STABLE MEMBER TO NAVIGATION BASE
014043,000596: 07,2603 76521 MXV VSL1
014044,000597: 07,2604 01445 STARAD # THEN TO EARTH REFERENCE
014045,000598: 07,2605 23401 STOVL XSM
014046,000599: 07,2606 16705 YUNIT
014047,000600:
014048,000601: 07,2607 36041 STCALL 32D
014049,000602: 07,2610 16104 SMNB # STABLE MEMBER TO NAVIGATION BASE
014050,000603: 07,2611 76521 MXV VSL1
014051,000604: 07,2612 01445 STARAD # THEN TO EARTH REFERENCE
014052,000605: 07,2613 23407 STOVL YSM
014053,000606: 07,2614 16703 ZUNIT
014054,000607:
014055,000608: 07,2615 36041 STCALL 32D
014056,000609: 07,2616 16104 SMNB # STABLE MEMBER TO NAVIGATION BASE
014057,000610: 07,2617 76521 MXV VSL1
014058,000611: 07,2620 01445 STARAD # THEN TO EARTH REFERENCE
014059,000612: 07,2621 37415 STCALL ZSM
014060,000613: 07,2622 00014 12D
014061,000614:
014062,000615: 07,2623 15373 11211 NB2NB1 2DEC +.8431750 B-1
014063,000616: 07,2625 00000 00000 2DEC 0 B-28
014064,000617: 07,2627 67313 65001 2DEC -.5376396 B-1
014065,000618: 07,2631 00000 00000 ZERINFLT 2DEC 0 B-28
014066,000619: 07,2633 20000 00000 HALFNFLT 2DEC .5
014067,000620: 07,2635 00000 00000 2DEC 0 B-28
014068,000621: 07,2637 10464 12776 2DEC +.5376396 B-1
014069,000622: 07,2641 00000 00000 2DEC 0 B-28
014070,000623: 07,2643 15373 11211 2DEC +.8431750 B-1
014071,000624:
014072,000625:
014073,000626: 07,2645 15373 11211 NB1NB2 2DEC +.8431750 B-1
014074,000627: 07,2647 00000 00000 2DEC 0 B-28
014075,000628: 07,2651 10464 12776 2DEC +.5376396 B-1
014076,000629: 07,2653 00000 00000 2DEC 0 B-28
014077,000630: 07,2655 20000 00000 2DEC .5
014078,000631: 07,2657 00000 00000 2DEC 0 B-28
014079,000632:
014080,000633: 07,2661 67313 65001 2DEC -.5376396 B-1
014081,000634: 07,2663 00000 00000 2DEC 0 B-28
014082,000635: 07,2665 15373 11211 2DEC +.8431750 B-1
014083,000636:
014084,000637: 07,2667 07020 10DEGS- DEC 3600 B-14
014085,000638:
014086,000639: 07,2670 60000 270DEG DEC -08191 B-14
014087,000640: 07,2671 00000 DEC 00000 B-14
014088,000641:
014089,000642: 07,2672 61740 20DEGS- DEC -07199 B-14
014090,000643: 07,2673 00000 DEC 00000 B-14
014091,000644:
014092,000645: 07,2674 07020 20DEG- DEC 03600 B-14
014093,000646: 07,2675 00000 DEC 00000 B-14
014094,000647:
014095,000648: 07,2676 05520 26075 QTSN45 2DEC .1768
014096,000649:
014097,000650: 07,2700 20000 00000 HALFDP 2DEC .5
014098,000651:
014099,000652: 07,2702 00000 00000 ZUNIT 2DEC 0 B-28
014100,000653:
014101,000654: 07,2704 00000 00000 YUNIT 2DEC 0 B-28
014102,000655:
014103,000656: 07,2706 20000 00000 XUNIT 2DEC 0.5
014104,000657:
014105,000658: 07,2710 00000 00000 ZERODP 2DEC 0 B-28
014106,000659:
014107,000660: 07,2712 00000 00000 2DEC 0 B-28
014108,000661:
014109,000662: 07,2714 00000 00000 2DEC 0 B-28
014110,000663:
014111,000664: 07,2716 05252 25253 .166... 2DEC .1666666667
014112,000665:
014113,000666: 07,2720 ENDINFSS EQUALS
End of include-file INFLIGHT_ALIGNMENT_ROUTINES.agc. Parent file is MAIN.agc