Source Code
These source-code files are part of a reconstructed copy of Luminary 163, the
first (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance
Computer (AGC) software.
The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 163 listing would be different. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. |
020842,000002: ## Copyright: Public domain.
020843,000003: ## Filename: R60,R62.agc
020844,000004: ## Purpose: A section of Luminary revision 163.
020845,000005: ## It is part of the reconstructed source code for the first
020846,000006: ## (unflown) release of the flight software for the Lunar
020847,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
020848,000008: ## The code has been recreated from a reconstructed copy of
020849,000009: ## Luminary 173, as well as Luminary memos 157 amd 158.
020850,000010: ## It has been adapted such that the resulting bugger words
020851,000011: ## exactly match those specified for Luminary 163 in NASA
020852,000012: ## drawing 2021152N, which gives relatively high confidence
020853,000013: ## that the reconstruction is correct.
020854,000014: ## Reference: pp. 480-493
020855,000015: ## Assembler: yaYUL
020856,000016: ## Contact: Ron Burkey <info@sandroid.org>.
020857,000017: ## Website: www.ibiblio.org/apollo/index.html
020858,000018: ## Mod history: 2019-08-21 MAS Created from Luminary 173.
020859,000019:
Page 480 |
020861,000021: # MOD NO: 0 DATE: 1 MAY 1968
020862,000022:
020863,000023: # MOD BY: DIGITAL DEVEL GROUP LOG SECTION R60,R62
020864,000024:
020865,000025: # FUNCTIONAL DESCRIPTION:
020866,000026:
020867,000027: # CALLED AS A GENERAL SUBROUTINE TO MANEUVER THE LM TO A SPECIFIED
020868,000028: # ATTITUDE.
020869,000029:
020870,000030: # 1. IF THE 3-AXIS FLAG IS NOT SET THE FINAL CDU ANGLES ARE
020871,000031: # CALCULATED (VECPOINT).
020872,000032:
020873,000033: # 2. THE FDAI BALL ANGLES (NOUN 18) ARE CALCULATED (BALLANGS).
020874,000034:
020875,000035: # 3. REQUEST FLASHING DISPLAY V50 N18 PLEASE PERFORM AUTO MANEUVER.
020876,000036:
020877,000037: # 4. IF PRIORITY DISPLAY FLAG IS SET DO A PHASECHANGE. THEN AWAIT
020878,000038: # ASTRONAUT RESPONSE.
020879,000039:
020880,000040: # 5. DISPLAY RESPONSE RETURNS:
020881,000041:
020882,000042: # A. ENTER - RESET 3-AXIS FLAG AND RETURN TO CLIENT.
020883,000043:
020884,000044: # B. TERMINATE - IF IN P00 GO TO STEP 5A. OTHERWISE CHECK IF R61 IS
020885,000045: # THE CALLING PROGRAM. IF IN R61 AN EXIT IS MADE TO GOTOV56. IF
020886,000046: # NOT IN R61 AN EXIT IS DONE VIA GOTOP00H.
020887,000047:
020888,000048: # C. PROCEED - CONTINUE WITH PROGRAM AT STEP 6.
020889,000049:
020890,000050: # 6. IF THE 3-AXISFLAG IS NOT SET, THE FINAL CDU ANGLES ARE CALCULATED
020891,000051: # (VECPOINT).
020892,000052:
020893,000053: # 7. THE FDAI BALL ANGLES (NOUN 18) ARE CALCULATED (BALLANGS).
020894,000054:
020895,000055: # 8. IF THE G+N SWITCH IS NOT SET GO BACK TO STEP 3.
020896,000056:
020897,000057: # 9. IF THE AUTO SWITCH IS NOT SET GO BACK TO STEP 3.
020898,000058:
020899,000059: # 10. NONFLASHING DISPLAY V06N18 (FDAI ANGLES).
020900,000060:
020901,000061: # 11. DO A PHASECHANGE.
020902,000062:
020903,000063: # 12. DO A MANEUVER CALCULATION AND ICDU DRIVE ROUTINE TO ACHIEVE FINAL
020904,000064:
020905,000065: # GIMBAL ANGLES (GOMANUR).
020906,000066: # 13. AT END OF MANEUVER GO TO STEP 3.
020907,000067:
020908,000068: # IF SATISFACTORY MANEUVER STEP 5A EXITS R60.
020909,000069: # FOR FURTHER ADJUSTMENT OF THE VEHICLE ATTITUDE ABOUT THE
020910,000070: # DESIRED VECTOR, THE ROUTINE MAY BE PERFORMED AGAIN STARTING AT
Page 481 |
020912,000072: # STEP 5C.
020913,000073:
020914,000074: # CALLING SEQUENCE: TC BANKCALL
020915,000075: # CADR R60LEM
020916,000076:
020917,000077: # ERASABLE INITIALIZATION REQUIRED : SCAXIS, POINTVSM (FOR VECPOINT)
020918,000078: # 3AXISFLG.
020919,000079:
020920,000080: # SUBROUTINES CALLED: VECPOINT, BALLANGS, GOPERF2R, LINUS, GODSPER,
020921,000081: # GOMANUR, DOWNFLAG, PHASCHNG, UPFLAG
020922,000082:
020923,000083: # NORMAL EXIT MODES: CAE TEMPR60 (CALLERS RETURN ADDRESS)
020924,000084: # TC BANKJUMP
020925,000085:
020926,000086: # ALARMS: NONE
020927,000087:
020928,000088: # OUTPUT: NONE
020929,000089:
020930,000090: # DEBRIS: CPHI, CTHETA, CPSI, 3AXISFLG, TBASE2
020931,000091:
020932,000092:
020933,000093: 34,2000 BANK 34
020934,000094: 26,2000 SETLOC MANUVER
020935,000095: 26,2000 BANK
020936,000096:
020937,000097: 26,2125 1163 EBANK= TEMPR60
020938,000098:
020939,000099: 26,2125 COUNT* $$/R06
020940,000100: 26,2125 04645 R60LEM TC MAKECADR
020941,000101: 26,2126 55163 TS TEMPR60
020942,000102:
020943,000103: 26,2127 34746 REDOMANN CAF 3AXISBIT
020944,000104: 26,2130 70101 MASK FLAGWRD5 # IS 3-AXIS FLAG SET
020945,000105: 26,2131 10000 CCS A
020946,000106: 26,2132 12140 TCF TOBALL # YES
020947,000107: 26,2133 06042 TC INTPRET
020948,000108: 26,2134 77624 CALL
020949,000109: 26,2135 56040 VECPOINT # TO COMPUTE FINAL ANGLES
020950,000110: 26,2136 00322 STORE CPHI # STORE FINAL ANGLES - CPHI,CTHETA,CPSI
020951,000111: 26,2137 77776 EXIT
020952,000112:
020953,000113: 26,2140 05515 TOBALL TC UPFLAG # INSURE THAT TOTAL ATTITUDE ERRORS ARE
020954,000114: 26,2141 00013 ADRES NEEDLFLG # DISPLAYED ON FDAI ERROR NEEDLES
020955,000115: 26,2142 05527 TC DOWNFLAG
020956,000116: 26,2143 00000 ADRES NEED2FLG
020957,000117: 26,2144 04616 TC BANKCALL
020958,000118: 26,2145 54274 CADR BALLANGS # TO CONVERT ANGLES TO FDAI
020959,000119: 26,2146 32262 TOBALLA CAF V06N18
020960,000120: 26,2147 04616 TC BANKCALL
Page 482 |
020962,000122: 26,2150 20711 CADR GOPERF2R # DISPLAY PLEASE PERFORM AUTO MANEUVER
020963,000123: 26,2151 02250 TC R61TEST
020964,000124: 26,2152 02156 TC REDOMANC # PROCEED
020965,000125: 26,2153 02203 TC ENDMANU1 # ENTER I.E. FINISHED WITH R60
020966,000126: 26,2154 02207 TC CHKLINUS # TO CHECK FOR PRIORITY DISPLAYS
020967,000127: 26,2155 05155 TC ENDOFJOB
020968,000128:
020969,000129: 26,2156 34746 REDOMANC CAF 3AXISBIT
020970,000130: 26,2157 70101 MASK FLAGWRD5 # IS 3-AXIS FLAG SET
020971,000131: 26,2160 10000 CCS A
020972,000132: 26,2161 12167 TCF TOBALLC # YES
020973,000133: 26,2162 06042 TC INTPRET
020974,000134: 26,2163 77624 CALL
020975,000135: 26,2164 56040 VECPOINT # TO COMPUTE FINAL ANGLES
020976,000136: 26,2165 00322 STORE CPHI # STORE ANGLES
020977,000137: 26,2166 77776 EXIT
020978,000138:
020979,000139: 26,2167 04616 TOBALLC TC BANKCALL
020980,000140: 26,2170 54274 CADR BALLANGS # TO CONVERT ANGLES TO FDAI
020981,000141: 26,2171 02263 TC G+N,AUTO # CHECK AUTO MODE
020982,000142: 26,2172 10000 CCS A
020983,000143: 26,2173 12146 TCF TOBALLA # NOT AUTO, GO REREQUEST AUTO MANEUVER.
020984,000144:
020985,000145: 26,2174 32262 AUTOMANV CAF V06N18 # STATIC DISPLAY DURING AUTO MANEUVER
020986,000146: 26,2175 04616 TC BANKCALL # -
020987,000147: 26,2176 20452 CADR GODSPR # -
020988,000148: 26,2177 02207 TC CHKLINUS # TO CHECK FOR PRIORITY DISPLAYS
020989,000149:
020990,000150: 26,2200 04616 STARTMNV TC BANKCALL # PERFORM MANEUVER VIA KALCMANU
020991,000151: 26,2201 17754 CADR GOMANUR
020992,000152:
020993,000153: 26,2202 12146 ENDMANUV TCF TOBALLA # FINISHED MANEUVER.
020994,000154: 26,2203 05527 ENDMANU1 TC DOWNFLAG # RESET 3-AXIS FLAG
020995,000155: 26,2204 00124 ADRES 3AXISFLG
020996,000156: 26,2205 31163 CAE TEMPR60 # -
020997,000157: 26,2206 04640 TC BANKJUMP # -
020998,000158:
020999,000159: 26,2207 40100 CHKLINUS CS FLAGWRD4
021000,000160: 26,2210 74740 MASK PDSPFBIT # IS PRIORITY DISPLAY FLAG SET?
021001,000161: 26,2211 10000 CCS A # -
021002,000162: 26,2212 00002 TC Q # NO - EXIT
021003,000163: 26,2213 30002 CA Q
021004,000164: 26,2214 54156 TS MPAC +2 # SAVE RETURN
021005,000165: 26,2215 46250 CS THREE # OBTAIN LOCATION FOR RESTART
021006,000166: 26,2216 60133 AD BUF2 # HOLDS Q OF LAST DISPLAY
021007,000167: 26,2217 55054 TS TBASE2
021008,000168:
021009,000169: 26,2220 05364 TC PHASCHNG
021010,000170: 26,2221 00132 OCT 00132
021011,000171:
Page 483 |
021013,000173: 26,2222 34745 CAF BIT7
021014,000174: 26,2223 05475 TC LINUS # GO SET BITS FOR PRIORITY DISPLAY -
021015,000175: 26,2224 00156 TC MPAC +2
021016,000176:
021017,000177: 26,2225 37717 RELINUS CAF PRIO26 # RESTORE ORIGINAL PRIORITY
021018,000178: 26,2226 05146 TC PRIOCHNG
021019,000179:
021020,000180: 26,2227 34747 CAF TRACKBIT # DON'T CONTINUE R60 UNLESS TRACKFLAG ON.
021021,000181: 26,2230 70075 MASK FLAGWRD1
021022,000182: 26,2231 10000 CCS A
021023,000183: 26,2232 12245 TCF RER60
021024,000184:
021025,000185: 26,2233 34745 CAF RNDVZBIT # IS IT P20?
021026,000186: 26,2234 70074 MASK FLAGWRD0
021027,000187: 26,2235 10000 CCS A
021028,000188: 26,2236 02242 TC +4 # YES
021029,000189: 26,2237 05364 TC PHASCHNG # NO, MUST BE P25, SET 2.11 SPOT
021030,000190: 26,2240 40112 OCT 40112
021031,000191:
021032,000192: 26,2241 05155 TC ENDOFJOB
021033,000193:
021034,000194: 26,2242 05364 TC PHASCHNG # SET 2.7 SPOT FOR P20
021035,000195: 26,2243 40072 OCT 40072
021036,000196:
021037,000197: 26,2244 05155 TC ENDOFJOB
021038,000198:
021039,000199: 26,2245 05515 RER60 TC UPFLAG # SET PRIO DISPLAY FLAG AFTER RESTART
021040,000200: 26,2246 00077 ADRES PDSPFLAG
021041,000201:
021042,000202: 26,2247 01054 TC TBASE2
021043,000203:
021044,000204: 26,2250 31010 R61TEST CA MODREG # IF WE ARE IN P00 IT MUST BE V49 OR V89
021045,000205: 26,2251 00006 EXTEND
021046,000206: 26,2252 12203 BZF ENDMANU1 # THUS WE GO TO ENDEXT VIA USER
021047,000207:
021048,000208: 26,2253 30100 CA FLAGWRD4 # ARE WE IN R61 (P20 OR P25)
021049,000209: 26,2254 74740 MASK PDSPFBIT
021050,000210: 26,2255 00006 EXTEND
021051,000211: 26,2256 16001 BZF GOTOPOOH # NO
021052,000212: 26,2257 06025 TC GOTOV56 # YES
021053,000213:
021054,000214: 26,2260 20100 BIT14+7 OCT 20100 # -
021055,000215: 26,2261 00203 OCT203 OCT 203
021056,000216: 26,2262 01422 V06N18 VN 0618
021057,000217: # SUBROUTINE TO CHECK FOR G+N CONTROL, AUTO STABILIZATION
021058,000218:
021059,000219: # RETURNS WITH C(A) = + IF NOT SET FOR G+N, AUTO
021060,000220: # RETURNS WITH C(A) = +0 IF SWITCHES ARE SET
021061,000221:
021062,000222: 26,2263 00006 G+N,AUTO EXTEND
Page 484 |
021064,000224: 26,2264 00030 READ CHAN30
021065,000225: 26,2265 74742 MASK BIT10
021066,000226: 26,2266 10000 CCS A
021067,000227: 26,2267 00002 TC Q # NOT IN G+N C(A) = +
021068,000228: 26,2270 00006 ISITAUTO EXTEND # CHECK FOR AUTO MODE
021069,000229: 26,2271 00031 READ CHAN31
021070,000230: 26,2272 74736 MASK BIT14
021071,000231: 26,2273 00002 TC Q # (+) = NOT IN AUTO, (+0) = AOK
021072,000232:
Page 485 |
021074,000234: # PROGRAM DESCRIPTION BALLANGS
021075,000235: # MOD NO. LOG SECTION R60,R62
021076,000236:
021077,000237: # WRITTEN BY RAMA M.AIYAWAR
021078,000238: # FUNCTIONAL DESCRIPTION
021079,000239:
021080,000240: # COMPUTES LM FDAI BALL DISPLAY ANGLES
021081,000241: # CALLING SEQUENCE
021082,000242:
021083,000243: # TC BALLANGS
021084,000244: # NORMAL EXIT MODE
021085,000245:
021086,000246: # TC BALLEXIT (SAVED Q)
021087,000247:
021088,000248: # ALARM OR EXIT MODE NIL
021089,000249: # SUBROUTINES CALLED
021090,000250: # CD*TR*G
021091,000251: # ARCTAN
021092,000252:
021093,000253: # INPUT
021094,000254:
021095,000255: # CPHI,CTHETA,CPSI ARE THE ANGLES CORRESPONDING TO AOG,AIG,AMG. THEY ARE
021096,000256: # SP,2S COMPLIMENT SCALED TO HALF REVOLUTION.
021097,000257: # OUTPUT
021098,000258:
021099,000259: # FDAIX,FDAIY,FDAIZ ARE THE REQUIRED BALL ANGLES SCALED TO HALF REVOLUTION
021100,000260: # SP,2S COMPLIMENT.
021101,000261: # THESE ANGLES WILL BE DISPLAYED AS DEGREES AND HUNDREDTHS, IN THE ORDER ROLL, PITCH, YAW, USING NOUNS 18 & 19.
021102,000262:
021103,000263: # ERASABLE INITIALIZATION REQUIRED
021104,000264:
021105,000265: # CPHI,CTHETA,CPSI EACH A SP REGISTER
021106,000266: # DEBRIS
021107,000267:
021108,000268: # A,L,Q,MPAC,SINCDU,COSCDU,PUSHLIST,BALLEXIT
021109,000269:
021110,000270:
021111,000271: # NOMENCLATURE: CPHI, CTHETA, & CPSI REPRESENT THE OUTER, INNER, & MIDDLE GIMBAL ANGLES, RESPECTIVELY; OR
021112,000272: # EQUIVALENTLY, CDUX, CDUY, & CDUZ.
021113,000273:
021114,000274: # NOTE: ARCTAN CHECKS FOR OVERFLOW AND SHOULD BE ABLE TO HANDLE ANY SINGULARITIES.
021115,000275:
021116,000276: 26,2000 SETLOC BAWLANGS
021117,000277: 26,2000 BANK
021118,000278:
021119,000279: 26,2274 COUNT* $$/BALL
021120,000280: 26,2274 04645 BALLANGS TC MAKECADR
021121,000281: 26,2275 55337 TS BALLEXIT
021122,000282: 26,2276 30321 CA CPHI
Page 486 |
021124,000284: 26,2277 54771 TS CDUSPOT +4
021125,000285: 26,2300 30322 CA CTHETA
021126,000286: 26,2301 54765 TS CDUSPOT
021127,000287: 26,2302 30323 CA CPSI
021128,000288: 26,2303 54767 TS CDUSPOT +2
021129,000289:
021130,000290: 26,2304 06042 TC INTPRET
021131,000291: 26,2305 45001 SETPD CALL
021132,000292: 26,2306 00001 0D
021133,000293: 26,2307 47541 CD*TR*G
021134,000294:
021135,000295: 26,2310 41345 DLOAD DMP
021136,000296: 26,2311 00742 SINCDUX # SIN (OGA)
021137,000297: 26,2312 00746 COSCDUZ # COS (MGA)
021138,000298:
021139,000299: 26,2313 57552 SL1 DCOMP # SCALE
021140,000300: 26,2314 65336 ARCSIN PDDL # YAW = ARCSIN(-SXCZ) INTO 0 PD
021141,000301: 26,2315 00740 SINCDUZ
021142,000302: 26,2316 14023 STODL SINTH # (SINTH = 18D IN PD)
021143,000303: 26,2317 00746 COSCDUZ
021144,000304: 26,2320 72405 DMP SL1 # RESCALE
021145,000305: 26,2321 00750 COSCDUX
021146,000306: 26,2322 34021 STCALL COSTH # (COSTH = 16D IN PD)
021147,000307: 26,2323 26506 ARCTAN
021148,000308: 26,2324 41325 PDDL DMP # ROLL = ARCTAN(SZ/CZCX) INTO 2 PD
021149,000309: 26,2325 00740 SINCDUZ
021150,000310: 26,2326 00742 SINCDUX
021151,000311: 26,2327 41512 SL2 PUSH # SXSZ INTO 4 PD
021152,000312: 26,2330 65205 DMP PDDL # SXSZCY INTO 4 PD
021153,000313: 26,2331 00744 COSCDUY
021154,000314: 26,2332 65205 DMP PDDL # SXSZSY INTO 6 PD
021155,000315: 26,2333 00736 SINCDUY
021156,000316: 26,2334 00750 COSCDUX
021157,000317: 26,2335 72405 DMP SL1 # CXCY
021158,000318: 26,2336 00744 COSCDUY
021159,000319: 26,2337 45425 DSU STADR # PULL UP FROM 6 PD
021160,000320: 26,2340 63756 STODL COSTH # COSTH = CXCY - SXSZSY
021161,000321: 26,2341 00736 SINCDUY
021162,000322: 26,2342 72405 DMP SL1
021163,000323: 26,2343 00750 COSCDUX # CXSY
021164,000324: 26,2344 45415 DAD STADR # PULL UP FROM 4 PD
021165,000325: 26,2345 43754 STCALL SINTH # SINTH = CXSY + SXSZCY
021166,000326: 26,2346 26506 ARCTAN # RETURNS WITH D(MPAC) = PITCH
021167,000327: 26,2347 55525 PDDL VDEF # PITCH INTO 2 PD, ROLL INTO MPAC FROM 2PD
021168,000328: 26,2350 77634 RTB # VDEF MAKES V(MPAC) = ROLL, PITCH, YAW
021169,000329: 26,2351 21621 V1STO2S
021170,000330: 26,2352 02345 STORE FDAIX # MODE IS TP
021171,000331: 26,2353 77776 EXIT
021172,000332:
021173,000333: 26,2354 31337 ENDBALL CA BALLEXIT
Page 487 |
021175,000335: 26,2355 04640 TC BANKJUMP
021176,000336:
Page 488 |
021178,000338: # PROGRAM DESCRIPTION - VECPOINT
021179,000339:
021180,000340:
021181,000341: # THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION. THE AXIS
021182,000342: # TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
021183,000343: # BEGINNING WITH THE LOCATION CALLED SCAXIS. THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
021184,000344: # THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
021185,000345: # SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM. THE COMPONENTS OF THIS
021186,000346: # VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES. WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
021187,000347: # ANGLES (2S COMPLEMENT) CORESPONDING TO THE CROSS-PRODUCT ROTATION BETWE EN SCAXIS AND POINTVSM AND STORES THEM
021188,000348: # IN T(MPAC) BEFORE RETURNING TO THE CALLER.
021189,000349: # THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK. WHEN POINTING A VECTOR IN THE Y-Z PLANE,
021190,000350: # THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
021191,000351: # PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
021192,000352: # LOCK. IF THE AXIS TO BE POINTED IS MORE THAN 40.6 DEGREES BUT LESS THAN 60.5 DEG FROM THE +X (OR-X) AXIS,
021193,000353: # THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES. IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
021194,000354: # THE ADDITIONAL ROTATION IS 35 DEGREES. THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
021195,000355: # STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
021196,000356: # WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
021197,000357: # CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK. IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
021198,000358: # REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION. AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
021199,000359: # EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
021200,000360:
021201,000361: # CALLING SEQUENCE -
021202,000362: # 1) LOAD SCAXIS, POINTVSM
021203,000363: # 2) CALL
021204,000364: # VECPOINT
021205,000365:
021206,000366: # RETURNS WITH
021207,000367:
021208,000368: # 1) DESIRED OUTER GIMBAL ANGLE IN MPAC
021209,000369: # 2) DESIRED INNER GIMBAL ANGLE IN MPAC +1
021210,000370: # 3) DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
021211,000371:
021212,000372:
021213,000373: # ERASABLES USED -
021214,000374:
021215,000375: # 1) SCAXIS 6
021216,000376: # 2) POINTVSM 6
021217,000377: # 3) MIS 18
021218,000378: # 4) DEL 18
021219,000379: # 5) COF 6
021220,000380: # 6) VECQTEMP 1
021221,000381: # 7) ALL OF VAC AREA 43
021222,000382:
021223,000383: # TOTAL 99
021224,000384:
021225,000385: 27,2000 SETLOC VECPT
021226,000386: 27,2000 BANK
Page 489 |
021228,000388: 27,2032 COUNT* $$/VECPT
021229,000389:
021230,000390: 27,2032 E6,1675 EBANK= BCDU
021231,000391:
021232,000392: 27,2032 40020 VECPNT1 STQ BOV # THIS ENTRY USES DESIRED CDUS
021233,000393: 27,2033 03324 VECQTEMP # NOT PRESENT-ENTER WITH CDUD'S IN MPAC
021234,000394: 27,2034 56035 VECPNT2
021235,000395: 27,2035 52164 VECPNT2 AXC,2 GOTO
021236,000396: 27,2036 03245 MIS
021237,000397: 27,2037 56046 STORANG
021238,000398: 27,2040 40020 VECPOINT STQ BOV # SAVE RETURN ADDRESS
021239,000399: 27,2041 03324 VECQTEMP
021240,000400: 27,2042 56043 VECLEAR # AND CLEAR OVFIND
021241,000401: 27,2043 47164 VECLEAR AXC,2 RTB
021242,000402: 27,2044 03245 MIS # READ THE PRESENT CDU ANGLES AND
021243,000403: 27,2045 44403 READCDUK # STORE THEM IN PD25, 26, 27
021244,000404: 27,2046 34032 STORANG STCALL 25D
021245,000405: 27,2047 44410 CDUTODCM # S/C AXES TO STABLE MEMBER AXES (MIS)
021246,000406: 27,2050 61375 VLOAD VXM
021247,000407: 27,2051 03773 POINTVSM # RESOLVE THE POINTING DIRECTION VF INTO
021248,000408: 27,2052 03246 MIS # INITIAL S/C AXES ( VF = POINTVSM)
021249,000409: 27,2053 77656 UNIT
021250,000410: 27,2054 00035 STORE 28D
021251,000411: # PD 28 29 30 31 32 33
021252,000412: 27,2055 53435 VXV UNIT # TAKE THE CROSS PRODUCT VF X VI
021253,000413: 27,2056 03765 SCAXIS # WHERE VI = SCAXIS
021254,000414: 27,2057 57400 BOV VCOMP
021255,000415: 27,2060 56170 PICKAXIS
021256,000416: 27,2061 17270 STODL COF # CHECK MAGNITUDE
021257,000417: 27,2062 00045 36D # OF CROSS PRODUCT
021258,000418: 27,2063 50025 DSU BMN # VECTOR, IF LESS
021259,000419: 27,2064 14417 DPB-14 # THAN B-14 ASSUME
021260,000420: 27,2065 56170 PICKAXIS # UNIT OPERATION
021261,000421: 27,2066 50375 VLOAD DOT # INVALID.
021262,000422: 27,2067 03765 SCAXIS
021263,000423: 27,2070 00035 28D
021264,000424: 27,2071 65552 SL1 ARCCOS
021265,000425: 27,2072 77624 COMPMATX CALL # NOW COMPUTE THE TRANSFORMATION FROM
021266,000426: 27,2073 44527 DELCOMP # FINAL S/C AXES TO INITIAL S/C AXES MFI
021267,000427: 27,2074 75160 AXC,1 AXC,2
021268,000428: 27,2075 03245 MIS # COMPUTE THE TRANSFORMATION FROM FINAL
021269,000429: 27,2076 02230 KEL # S/C AXES TO STABLE MEMBER AXES
021270,000430: 27,2077 77624 CALL # MFS = MIS MFI
021271,000431: 27,2100 44312 MXM3 # (IN PD LIST)
021272,000432:
021273,000433: 27,2101 51545 DLOAD ABS
021274,000434: 27,2102 00007 6 # MFS6 = SIN(CPSI) $2
021275,000435: 27,2103 50025 DSU BMN
021276,000436: 27,2104 14404 SINGIMLC # = SIN(59 DEGS) $2
021277,000437: 27,2105 56160 FINDGIMB # /CPSI/ LESS THAN 59 DEGS
Page 490 |
021279,000439: # I.E. DESIRED ATTITUDE NOT IN GIMBAL LOCK
021280,000440:
021281,000441: 27,2106 51545 DLOAD ABS # CHECK TO SEE IF WE ARE POINTING
021282,000442: 27,2107 03765 SCAXIS # THE THRUST AXIS
021283,000443: 27,2110 51025 DSU BPL
021284,000444: 27,2111 14406 SINVEC1 # SIN 49.4 DEGS $2
021285,000445: 27,2112 56160 FINDGIMB # IF SO, WE ARE TRYING TO POINT IT INTO
021286,000446: 27,2113 77775 VLOAD # GIMBAL LOCK, ABORT COULD GO HERE
021287,000447: 27,2114 77626 STADR
021288,000448: 27,2115 50515 STOVL MIS +12D
021289,000449: 27,2116 77626 STADR # STORE MFS (IN PD LIST) IN MIS
021290,000450: 27,2117 50523 STOVL MIS +6
021291,000451: 27,2120 77626 STADR
021292,000452: 27,2121 50531 STOVL MIS
021293,000453: 27,2122 03254 MIS +6 # INNER GIMBAL AXIS IN FINAL S/C AXES
021294,000454: 27,2123 57444 BPL VCOMP # LOCATE THE IG AXIS DIRECTION CLOSEST TO
021295,000455: 27,2124 56125 IGSAMEX # FINAL X S/C AXIS
021296,000456:
021297,000457: 27,2125 50035 IGSAMEX VXV BMN # FIND THE SHORTEST WAY OF ROTATING THE
021298,000458: 27,2126 03765 SCAXIS # S/C OUT OF GIMBAL LOCK BY A ROTATION
021299,000459: 27,2127 56134 U=SCAXIS # ABOUT +- SCAXIS, I.E. IF (IG (SGN MFS3)
021300,000460: # X SCAXIS . XF) LESS THAN 0, U = SCAXIS
021301,000461: # OTHERWISE U = -SCAXIS
021302,000462:
021303,000463: 27,2130 57575 VLOAD VCOMP
021304,000464: 27,2131 03765 SCAXIS
021305,000465: 27,2132 37270 STCALL COF # ROTATE ABOUT -SCAXIS
021306,000466: 27,2133 56137 CHEKAXIS
021307,000467: 27,2134 77775 U=SCAXIS VLOAD
021308,000468: 27,2135 03765 SCAXIS
021309,000469: 27,2136 03270 STORE COF # ROTATE ABOUT + SCAXIS
021310,000470: 27,2137 51545 CHEKAXIS DLOAD ABS
021311,000471: 27,2140 03765 SCAXIS # SEE IF WE ARE POINTING THE AOT
021312,000472: 27,2141 51025 DSU BPL
021313,000473: 27,2142 14410 SINVEC2 # SIN 29.5 DEGS $2
021314,000474: 27,2143 56147 PICKANG1 # IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
021315,000475: 27,2144 52145 DLOAD GOTO # IF NOT, MUST BE POINTING THE TRANSPONDER
021316,000476: 27,2145 14414 VECANG2 # OR SOME VECTOR IN THE Y, OR Z PLANE
021317,000477: 27,2146 56151 COMPMFSN # IN THIS CASE ROTATE 35 DEGS TO GET OUT
021318,000478: # OF GIMBAL LOCK (VECANG2 $360)
021319,000479: 27,2147 77745 PICKANG1 DLOAD
021320,000480: 27,2150 14412 VECANG1 # = 50 DEGS $ 360
021321,000481: 27,2151 77624 COMPMFSN CALL
021322,000482: 27,2152 44527 DELCOMP # COMPUTE THE ROTATION ABOUT SCAXIS TO
021323,000483: 27,2153 75160 AXC,1 AXC,2 # BRING MFS OUT OF GIMBAL LOCK
021324,000484: 27,2154 03245 MIS
021325,000485: 27,2155 02230 KEL
021326,000486: 27,2156 77624 CALL # COMPUTE THE NEW TRANSFORMATION FROM
021327,000487: 27,2157 44312 MXM3 # DESIRED S/C AXES TO STABLE MEMBER AXES
021328,000488: # WHICH WILL ALIGN VI WITH VF AND AVOID
Page 491 |
021330,000490: # GIMBAL LOCK
021331,000491: 27,2160 45160 FINDGIMB AXC,1 CALL
021332,000492: 27,2161 00000 0 # EXTRACT THE COMMANDED CDU ANGLES FROM
021333,000493: 27,2162 44654 DCMTOCDU # THIS MATRIX
021334,000494: 27,2163 40234 RTB SETPD
021335,000495: 27,2164 21621 V1STO2S # CONVERT TO 2:S COMPLEMENT
021336,000496: 27,2165 00001 0
021337,000497: 27,2166 77650 GOTO
021338,000498: 27,2167 03324 VECQTEMP # RETURN TO CALLER
021339,000499:
021340,000500: 27,2170 50375 PICKAXIS VLOAD DOT # IF VF X VI = 0, FIND VF . VI
021341,000501: 27,2171 00035 28D
021342,000502: 27,2172 03765 SCAXIS
021343,000503: 27,2173 72240 BMN TLOAD
021344,000504: 27,2174 54356 ROT180
021345,000505: 27,2175 00032 25D
021346,000506: 27,2176 77650 GOTO # IF VF = VI, CDU DESIRED = PRESENT CDU
021347,000507: 27,2177 03324 VECQTEMP # PRESENT CDU ANGLES
021348,000508:
021349,000509: 35,2000 BANK 35
021350,000510: 26,2000 SETLOC MANUVER1
021351,000511: 26,2000 BANK
021352,000512: 26,2356 47375 ROT180 VLOAD VXV # IF VF, VI ANTIPARALLEL, 108 DEG ROTATION
021353,000513: 26,2357 03254 MIS +6 # IS REQUIRED. Y STABLE MEMBER AXIS IN
021354,000514: 26,2360 06516 HIDPHALF # INITIAL S/C AXES.
021355,000515: 26,2361 47256 UNIT VXV # FIND Y(SM) X X(I)
021356,000516: 26,2362 03765 SCAXIS # FIND UNIT(VI X UNIT(Y(SM) X X(I)))
021357,000517: 26,2363 40056 UNIT BOV # I.E. PICK A VECTOR IN THE PLANE OF X(I),
021358,000518: 26,2364 54400 PICKX # Y(SM) PERPENDICULAR TO VI
021359,000519: 26,2365 17270 STODL COF
021360,000520: 26,2366 00045 36D # CHECK MAGNITUDE
021361,000521: 26,2367 50025 DSU BMN # OF THIS VECTOR.
021362,000522: 26,2370 14417 DPB-14 # IF LESS THAN B-14,
021363,000523: 26,2371 54400 PICKX # PICK X-AXIS.
021364,000524: 26,2372 77775 VLOAD
021365,000525: 26,2373 03270 COF
021366,000526: 26,2374 17270 XROT STODL COF
021367,000527: 26,2375 06516 HIDPHALF
021368,000528: 26,2376 77650 GOTO
021369,000529: 26,2377 56072 COMPMATX
021370,000530: 26,2400 52175 PICKX VLOAD GOTO # PICK THE XAXIS IN THIS CASE
021371,000531: 26,2401 06516 HIDPHALF
021372,000532: 26,2402 54374 XROT
021373,000533: 26,2403 15555 35172 SINGIMLC 2DEC .4285836003 # =SIN(59) $2
021374,000534:
021375,000535: 26,2405 14113 36326 SINVEC1 2DEC .3796356537 # =SIN(49.4) $2
021376,000536:
021377,000537: 26,2407 07701 35703 SINVEC2 2DEC .2462117800 # =SIN(29.5) $2
021378,000538:
021379,000539: 26,2411 04343 21616 VECANG1 2DEC .1388888889 # = 50 DEGREES $360
021380,000540:
Page 492 |
021382,000542: 26,2413 03070 34344 VECANG2 2DEC .09722222222 # = 35 DEGREES $360
021383,000543:
021384,000544: 26,2415 00000 1BITDP OCT 0 # KEEP THIS BEFORE DPB(-14) *********
021385,000545: 26,2416 00001 DPB-14 OCT 00001
021386,000546: 26,2417 00000 OCT 00000
021387,000547:
Page 493 |
021389,000549: # ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
021390,000550:
021391,000551:
021392,000552: 34,2000 BANK 34
021393,000553: 23,2000 SETLOC R62
021394,000554: 23,2000 BANK
021395,000555: 23,2103 E6,1675 EBANK= BCDU
021396,000556:
021397,000557: 23,2103 COUNT* $$/R62
021398,000558:
021399,000559: 23,2103 23,2103 R62DISP EQUALS R62FLASH
021400,000560:
021401,000561: 23,2103 35010 R62FLASH CAF V06N22 # FLASH V06N22 AND
021402,000562: 23,2104 04616 TC BANKCALL # ICDU ANGLES
021403,000563: 23,2105 20477 CADR GOFLASH
021404,000564: 23,2106 15503 TCF ENDEXT # TERMINATE
021405,000565: 23,2107 12111 TCF GOMOVE # PROCEED
021406,000566: 23,2110 12103 TCF R62FLASH # ENTER
021407,000567:
021408,000568: # ASTRONAUT MAY LOAD NEW ICDUS AT THIS
021409,000569: # POINT
021410,000570: 23,2111 05515 GOMOVE TC UPFLAG # SET FOR 3-AXIS MANEUVER
021411,000571: 23,2112 00124 ADRES 3AXISFLG
021412,000572:
021413,000573: 23,2113 04616 TC BANKCALL
021414,000574: 23,2114 54125 CADR R60LEM
021415,000575: 23,2115 15503 TCF ENDEXT # END R62
021416,000576:
End of include-file R60,R62.agc. Parent file is MAIN.agc