Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Linden Sims. A team of volunteers performed the transcription and proof-reading. The scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 56 OF AGC PROGRAM ZERLINA BY ZOROASTER
	9:12 OCT. 21,1970
Note that the date is the date of the printout, not the date of the program revision.

021493,000002:                                                                                                  ## Copyright:   Public domain.
021494,000003:                                                                                                  ## Filename:    R60,R62.agc
021495,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
021496,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
021497,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
021498,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
021499,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
021500,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
021501,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
021502,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
021503,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
021504,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
021505,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
021506,000015:                                                                                                  ## Reference:   pp. 480-493
021507,000016:                                                                                                  ## Assembler:   yaYUL
021508,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
021509,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
021510,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
021511,000020:                                                                                                  ##              2017-08-22 MAS  Updated for Zerlina 56.
021512,000021: 

Page 480

021514,000023:                                                                                                  #  MOD NO: 0                        DATE: 1 MAY 1968
021515,000024: 
021516,000025:                                                                                                  #  MOD BY: DIGITAL DEVEL GROUP      LOG SECTION R60,R62
021517,000026: 
021518,000027:                                                                                                  #  FUNCTIONAL DESCRIPTION:
021519,000028: 
021520,000029:                                                                                                  #  CALLED AS A GENERAL SUBROUTINE TO MANEUVER THE LM TO A SPECIFIED
021521,000030:                                                                                                  #  ATTITUDE.
021522,000031: 
021523,000032:                                                                                                  #  1. IF THE 3-AXIS FLAG IS NOT SET THE FINAL CDU ANGLES ARE
021524,000033:                                                                                                  #  CALCULATED (VECPOINT).
021525,000034: 
021526,000035:                                                                                                  #  2. THE FDAI BALL ANGLES (NOUN 18) ARE CALCULATED (BALLANGS).
021527,000036: 
021528,000037:                                                                                                  #  3. REQUEST FLASHING DISPLAY V50 N18 PLEASE PERFORM AUTO MANEUVER.
021529,000038: 
021530,000039:                                                                                                  #  4. IF PRIORITY DISPLAY FLAG IS SET DO A PHASECHANGE. THEN AWAIT
021531,000040:                                                                                                  #  ASTRONAUT RESPONSE.
021532,000041: 
021533,000042:                                                                                                  #  5. DISPLAY RESPONSE RETURNS:
021534,000043: 
021535,000044:                                                                                                  #      A. ENTER - RESET 3-AXIS FLAG AND RETURN TO CLIENT.
021536,000045: 
021537,000046:                                                                                                  #      B. TERMINATE - IF IN P00 GO TO STEP 5A. OTHERWISE CHECK IF R61 IS
021538,000047:                                                                                                  #         THE CALLING PROGRAM. IF IN R61 AN EXIT IS MADE TO GOTOV56. IF
021539,000048:                                                                                                  #         NOT IN R61 AN EXIT IS DONE VIA GOTOP00H.
021540,000049: 
021541,000050:                                                                                                  #      C. PROCEED - CONTINUE WITH PROGRAM AT STEP 6.
021542,000051: 
021543,000052:                                                                                                  #  6. IF THE 3-AXISFLAG IS NOT SET, THE FINAL CDU ANGLES ARE CALCULATED
021544,000053:                                                                                                  #     (VECPOINT).
021545,000054: 
021546,000055:                                                                                                  #  7. THE FDAI BALL ANGLES (NOUN 18) ARE CALCULATED (BALLANGS).
021547,000056: 
021548,000057:                                                                                                  #  8. IF THE G+N SWITCH IS NOT SET GO BACK TO STEP 3.
021549,000058: 
021550,000059:                                                                                                  #  9. IF THE AUTO SWITCH IS NOT SET GO BACK TO STEP 3.
021551,000060: 
021552,000061:                                                                                                  #  10. NONFLASHING DISPLAY V06N18 (FDAI ANGLES).
021553,000062: 
021554,000063:                                                                                                  #  11. DO A PHASECHANGE.
021555,000064: 
021556,000065:                                                                                                  #  12. DO A MANEUVER CALCULATION AND ICDU DRIVE ROUTINE TO ACHIEVE FINAL
021557,000066: 
021558,000067:                                                                                                  #      GIMBAL ANGLES (GOMANUR).
021559,000068:                                                                                                  #  13. AT END OF MANEUVER GO TO STEP 3.
021560,000069: 
021561,000070:                                                                                                  #           IF SATISFACTORY MANEUVER STEP 5A EXITS R60.
021562,000071:                                                                                                  #           FOR FURTHER ADJUSTMENT OF THE VEHICLE ATTITUDE ABOUT THE
021563,000072:                                                                                                  #           DESIRED VECTOR, THE ROUTINE MAY BE PERFORMED AGAIN STARTING AT

Page 481

021565,000074:                                                                                                  #           STEP 5C.
021566,000075: 
021567,000076:                                                                                                  #  CALLING SEQUENCE:  TC BANKCALL
021568,000077:                                                                                                  #                     CADR R60LEM
021569,000078: 
021570,000079:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED : SCAXIS, POINTVSM (FOR VECPOINT)
021571,000080:                                                                                                  #                                     3AXISFLG.
021572,000081: 
021573,000082:                                                                                                  #  SUBROUTINES CALLED: VECPOINT, BALLANGS, GOPERF2R, LINUS, GODSPER,
021574,000083:                                                                                                  #                     GOMANUR, DOWNFLAG, PHASCHNG, UPFLAG
021575,000084: 
021576,000085:                                                                                                  #  NORMAL EXIT MODES: CAE TEMPR60   (CALLERS RETURN ADDRESS)
021577,000086:                                                                                                  #                     TC  BANKJUMP
021578,000087: 
021579,000088:                                                                                                  #  ALARMS: NONE
021580,000089: 
021581,000090:                                                                                                  #  OUTPUT: NONE
021582,000091: 
021583,000092:                                                                                                  #  DEBRIS: CPHI, CTHETA, CPSI, 3AXISFLG, TBASE2
021584,000093: 
021585,000094: 
021586,000095: 34,2060                                           BANK     34                                    
021587,000096: 26,2000                                           SETLOC   MANUVER                               
021588,000097: 26,2000                                           BANK                                           
021589,000098: 
021590,000099: 26,2125     1163                                  EBANK=   TEMPR60                               
021591,000100: 
021592,000101: 26,2125                                           COUNT*   $$/R06                                
021593,000102: 26,2125           04645        R60LEM             TC       MAKECADR                              
021594,000103: 26,2126           55163                           TS       TEMPR60                               
021595,000104: 
021596,000105: 26,2127           34746        REDOMANN           CAF      3AXISBIT                              
021597,000106: 26,2130           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
021598,000107: 26,2131           10000                           CCS      A                                     
021599,000108: 26,2132           12140                           TCF      TOBALL                                #  YES
021600,000109: 26,2133           06051                           TC       INTPRET                               
021601,000110: 26,2134           77624                           CALL                                           
021602,000111: 26,2135           56040                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
021603,000112: 26,2136           00322                           STORE    CPHI                                  #  STORE FINAL ANGLES - CPHI,CTHETA,CPSI
021604,000113: 26,2137           77776                           EXIT                                           
021605,000114: 
021606,000115: 26,2140           05515        TOBALL             TC       UPFLAG                                #  INSURE THAT TOTAL ATTITUDE ERRORS ARE
021607,000116: 26,2141           00013                           ADRES    NEEDLFLG                              #  DISPLAYED ON FDAI ERROR NEEDLES
021608,000117: 26,2142           05527                           TC       DOWNFLAG                              
021609,000118: 26,2143           00000                           ADRES    NEED2FLG                              
021610,000119: 26,2144           04616                           TC       BANKCALL                              
021611,000120: 26,2145           54274                           CADR     BALLANGS                              #  TO CONVERT ANGLES TO FDAI
021612,000121: 26,2146           32262        TOBALLA            CAF      V06N18                                
021613,000122: 26,2147           04616                           TC       BANKCALL                              

Page 482

021615,000124: 26,2150           20711                           CADR     GOPERF2R                              #  DISPLAY PLEASE PERFORM AUTO MANEUVER
021616,000125: 26,2151           02250                           TC       R61TEST                               
021617,000126: 26,2152           02156                           TC       REDOMANC                              #  PROCEED
021618,000127: 26,2153           02203                           TC       ENDMANU1                              #  ENTER I.E. FINISHED WITH R60
021619,000128: 26,2154           02207                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
021620,000129: 26,2155           05155                           TC       ENDOFJOB                              
021621,000130: 
021622,000131: 26,2156           34746        REDOMANC           CAF      3AXISBIT                              
021623,000132: 26,2157           70101                           MASK     FLAGWRD5                              #  IS 3-AXIS FLAG SET
021624,000133: 26,2160           10000                           CCS      A                                     
021625,000134: 26,2161           12167                           TCF      TOBALLC                               #  YES
021626,000135: 26,2162           06051                           TC       INTPRET                               
021627,000136: 26,2163           77624                           CALL                                           
021628,000137: 26,2164           56040                                    VECPOINT                              #  TO COMPUTE FINAL ANGLES
021629,000138: 26,2165           00322                           STORE    CPHI                                  #  STORE ANGLES
021630,000139: 26,2166           77776                           EXIT                                           
021631,000140: 
021632,000141: 26,2167           04616        TOBALLC            TC       BANKCALL                              
021633,000142: 26,2170           54274                           CADR     BALLANGS                              #  TO CONVERT ANGLES TO FDAI
021634,000143: 26,2171           02263                           TC       G+N,AUTO                              #  CHECK AUTO MODE
021635,000144: 26,2172           10000                           CCS      A                                     
021636,000145: 26,2173           12146                           TCF      TOBALLA                               #  NOT AUTO, GO REREQUEST AUTO MANEUVER.
021637,000146: 
021638,000147: 26,2174           32262        AUTOMANV           CAF      V06N18                                #  STATIC DISPLAY DURING AUTO MANEUVER
021639,000148: 26,2175           04616                           TC       BANKCALL                              #                                       -
021640,000149: 26,2176           20452                           CADR     GODSPR                                #                                       -
021641,000150: 26,2177           02207                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
021642,000151: 
021643,000152: 26,2200           04616        STARTMNV           TC       BANKCALL                              #  PERFORM MANEUVER VIA KALCMANU
021644,000153: 26,2201           17747                           CADR     GOMANUR                               
021645,000154: 
021646,000155: 26,2202           12146        ENDMANUV           TCF      TOBALLA                               #  FINISHED MANEUVER.
021647,000156: 26,2203           05527        ENDMANU1           TC       DOWNFLAG                              #  RESET 3-AXIS FLAG
021648,000157: 26,2204           00124                           ADRES    3AXISFLG                              
021649,000158: 26,2205           31163                           CAE      TEMPR60                               #                                       -
021650,000159: 26,2206           04640                           TC       BANKJUMP                              #                                       -
021651,000160: 
021652,000161: 26,2207           40100        CHKLINUS           CS       FLAGWRD4                              
021653,000162: 26,2210           74740                           MASK     PDSPFBIT                              #  IS PRIORITY DISPLAY FLAG SET?
021654,000163: 26,2211           10000                           CCS      A                                     #                                       -
021655,000164: 26,2212           00002                           TC       Q                                     #  NO - EXIT
021656,000165: 26,2213           30002                           CA       Q                                     
021657,000166: 26,2214           54156                           TS       MPAC       +2                         #  SAVE RETURN
021658,000167: 26,2215           46257                           CS       THREE                                 #  OBTAIN LOCATION FOR RESTART
021659,000168: 26,2216           60133                           AD       BUF2                                  #  HOLDS Q OF LAST DISPLAY
021660,000169: 26,2217           55054                           TS       TBASE2                                
021661,000170: 
021662,000171: 26,2220           05364                           TC       PHASCHNG                              
021663,000172: 26,2221           00132                           OCT      00132                                 
021664,000173: 

Page 483

021666,000175: 26,2222           34745                           CAF      BIT7                                  
021667,000176: 26,2223           05475                           TC       LINUS                                 #  GO SET BITS FOR PRIORITY DISPLAY     -
021668,000177: 26,2224           00156                           TC       MPAC       +2                         
021669,000178: 
021670,000179: 26,2225           37726        RELINUS            CAF      PRIO26                                #  RESTORE ORIGINAL PRIORITY
021671,000180: 26,2226           05146                           TC       PRIOCHNG                              
021672,000181: 
021673,000182: 26,2227           34747                           CAF      TRACKBIT                              #  DON'T CONTINUE R60 UNLESS TRACKFLAG ON.
021674,000183: 26,2230           70075                           MASK     FLAGWRD1                              
021675,000184: 26,2231           10000                           CCS      A                                     
021676,000185: 26,2232           12245                           TCF      RER60                                 
021677,000186: 
021678,000187: 26,2233           34745                           CAF      RNDVZBIT                              #  IS IT P20?
021679,000188: 26,2234           70074                           MASK     FLAGWRD0                              
021680,000189: 26,2235           10000                           CCS      A                                     
021681,000190: 26,2236           02242                           TC       +4                                    #  YES
021682,000191: 26,2237           05364                           TC       PHASCHNG                              #  NO, MUST BE P25, SET 2.11 SPOT
021683,000192: 26,2240           40112                           OCT      40112                                 
021684,000193: 
021685,000194: 26,2241           05155                           TC       ENDOFJOB                              
021686,000195: 
021687,000196: 26,2242           05364                           TC       PHASCHNG                              #  SET 2.7 SPOT FOR P20
021688,000197: 26,2243           40072                           OCT      40072                                 
021689,000198: 
021690,000199: 26,2244           05155                           TC       ENDOFJOB                              
021691,000200: 
021692,000201: 26,2245           05515        RER60              TC       UPFLAG                                #  SET PRIO DISPLAY FLAG AFTER RESTART
021693,000202: 26,2246           00077                           ADRES    PDSPFLAG                              
021694,000203: 
021695,000204: 26,2247           01054                           TC       TBASE2                                
021696,000205: 
021697,000206: 26,2250           31010        R61TEST            CA       MODREG                                #  IF WE ARE IN P00 IT MUST BE V49 OR V89
021698,000207: 26,2251           00006                           EXTEND                                         
021699,000208: 26,2252           12203                           BZF      ENDMANU1                              #  THUS WE GO TO ENDEXT VIA USER
021700,000209: 
021701,000210: 26,2253           30100                           CA       FLAGWRD4                              #  ARE WE IN R61  (P20 OR P25)
021702,000211: 26,2254           74740                           MASK     PDSPFBIT                              
021703,000212: 26,2255           00006                           EXTEND                                         
021704,000213: 26,2256           16001                           BZF      GOTOPOOH                              #  NO
021705,000214: 26,2257           06025                           TC       GOTOV56                               #  YES
021706,000215: 
021707,000216: 26,2260           20100        BIT14+7            OCT      20100                                 #                                       -
021708,000217: 26,2261           00203        OCT203             OCT      203                                   
021709,000218: 26,2262           01422        V06N18             VN       0618                                  
021710,000219:                                                                                                  #           SUBROUTINE TO CHECK FOR G+N CONTROL, AUTO STABILIZATION
021711,000220: 
021712,000221:                                                                                                  #           RETURNS WITH C(A) = +  IF NOT SET FOR G+N, AUTO
021713,000222:                                                                                                  #           RETURNS WITH C(A) = +0 IF SWITCHES ARE SET
021714,000223: 
021715,000224: 26,2263           00006        G+N,AUTO           EXTEND                                         

Page 484

021717,000226: 26,2264           00030                           READ     CHAN30                                
021718,000227: 26,2265           74742                           MASK     BIT10                                 
021719,000228: 26,2266           10000                           CCS      A                                     
021720,000229: 26,2267           00002                           TC       Q                                     #  NOT IN G+N  C(A) = +
021721,000230: 26,2270           00006        ISITAUTO           EXTEND                                         #  CHECK FOR AUTO MODE
021722,000231: 26,2271           00031                           READ     CHAN31                                
021723,000232: 26,2272           74736                           MASK     BIT14                                 
021724,000233: 26,2273           00002                           TC       Q                                     #  (+) = NOT IN AUTO, (+0) = AOK
021725,000234: 

Page 485

021727,000236:                                                                                                  #  PROGRAM DESCRIPTION BALLANGS
021728,000237:                                                                                                  #  MOD NO.         LOG SECTION  R60,R62
021729,000238: 
021730,000239:                                                                                                  #  WRITTEN BY RAMA M.AIYAWAR
021731,000240:                                                                                                  #  FUNCTIONAL DESCRIPTION
021732,000241: 
021733,000242:                                                                                                  #  COMPUTES LM FDAI BALL DISPLAY ANGLES
021734,000243:                                                                                                  #  CALLING SEQUENCE
021735,000244: 
021736,000245:                                                                                                  #           TC     BALLANGS
021737,000246:                                                                                                  #  NORMAL EXIT MODE
021738,000247: 
021739,000248:                                                                                                  #           TC     BALLEXIT        (SAVED Q)
021740,000249: 
021741,000250:                                                                                                  #  ALARM OR EXIT MODE  NIL
021742,000251:                                                                                                  #  SUBROUTINES CALLED
021743,000252:                                                                                                  #           CD*TR*G
021744,000253:                                                                                                  #           ARCTAN
021745,000254: 
021746,000255:                                                                                                  #  INPUT
021747,000256: 
021748,000257:                                                                                                  #  CPHI,CTHETA,CPSI  ARE  THE ANGLES CORRESPONDING TO AOG,AIG,AMG. THEY ARE
021749,000258:                                                                                                  #  SP,2S COMPLIMENT SCALED TO HALF REVOLUTION.
021750,000259:                                                                                                  #  OUTPUT
021751,000260: 
021752,000261:                                                                                                  #  FDAIX,FDAIY,FDAIZ ARE THE REQUIRED BALL ANGLES SCALED TO HALF REVOLUTION
021753,000262:                                                                                                  #  SP,2S COMPLIMENT.
021754,000263:                                                                                                  #  THESE ANGLES WILL BE DISPLAYED AS DEGREES AND HUNDREDTHS, IN THE ORDER ROLL, PITCH, YAW, USING NOUNS 18 & 19.
021755,000264: 
021756,000265:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
021757,000266: 
021758,000267:                                                                                                  #  CPHI,CTHETA,CPSI EACH A SP REGISTER
021759,000268:                                                                                                  #  DEBRIS
021760,000269: 
021761,000270:                                                                                                  #  A,L,Q,MPAC,SINCDU,COSCDU,PUSHLIST,BALLEXIT
021762,000271: 
021763,000272: 
021764,000273:                                                                                                  #  NOMENCLATURE:  CPHI, CTHETA, & CPSI REPRESENT THE OUTER, INNER, & MIDDLE GIMBAL ANGLES, RESPECTIVELY; OR
021765,000274:                                                                                                  #  EQUIVALENTLY, CDUX, CDUY, & CDUZ.
021766,000275: 
021767,000276:                                                                                                  #  NOTE:  ARCTAN CHECKS FOR OVERFLOW AND SHOULD BE ABLE TO HANDLE ANY SINGULARITIES.
021768,000277: 
021769,000278: 26,2000                                           SETLOC   BAWLANGS                              
021770,000279: 26,2000                                           BANK                                           
021771,000280: 
021772,000281: 26,2274                                           COUNT*   $$/BALL                               
021773,000282: 26,2274           04645        BALLANGS           TC       MAKECADR                              
021774,000283: 26,2275           55337                           TS       BALLEXIT                              
021775,000284: 26,2276           30321                           CA       CPHI                                  

Page 486

021777,000286: 26,2277           54771                           TS       CDUSPOT    +4                         
021778,000287: 26,2300           30322                           CA       CTHETA                                
021779,000288: 26,2301           54765                           TS       CDUSPOT                               
021780,000289: 26,2302           30323                           CA       CPSI                                  
021781,000290: 26,2303           54767                           TS       CDUSPOT    +2                         
021782,000291: 
021783,000292: 26,2304           06051                           TC       INTPRET                               
021784,000293: 26,2305           45001                           SETPD    CALL                                  
021785,000294: 26,2306           00001                                    0D                                    
021786,000295: 26,2307           47541                                    CD*TR*G                               
021787,000296: 
021788,000297: 26,2310           41345                           DLOAD    DMP                                   
021789,000298: 26,2311           00742                                    SINCDUX                               #  SIN (OGA)
021790,000299: 26,2312           00746                                    COSCDUZ                               #  COS (MGA)
021791,000300: 
021792,000301: 26,2313           57552                           SL1      DCOMP                                 #  SCALE
021793,000302: 26,2314           65336                           ARCSIN   PDDL                                  #  YAW = ARCSIN(-SXCZ) INTO 0 PD
021794,000303: 26,2315           00740                                    SINCDUZ                               
021795,000304: 26,2316           14023                           STODL    SINTH                                 #  (SINTH = 18D IN PD)
021796,000305: 26,2317           00746                                    COSCDUZ                               
021797,000306: 26,2320           72405                           DMP      SL1                                   #  RESCALE
021798,000307: 26,2321           00750                                    COSCDUX                               
021799,000308: 26,2322           34021                           STCALL   COSTH                                 #  (COSTH = 16D IN PD)
021800,000309: 26,2323           26506                                    ARCTAN                                
021801,000310: 26,2324           41325                           PDDL     DMP                                   #  ROLL = ARCTAN(SZ/CZCX) INTO 2 PD
021802,000311: 26,2325           00740                                    SINCDUZ                               
021803,000312: 26,2326           00742                                    SINCDUX                               
021804,000313: 26,2327           41512                           SL2      PUSH                                  #  SXSZ INTO 4 PD
021805,000314: 26,2330           65205                           DMP      PDDL                                  #  SXSZCY INTO 4 PD
021806,000315: 26,2331           00744                                    COSCDUY                               
021807,000316: 26,2332           65205                           DMP      PDDL                                  #  SXSZSY INTO 6 PD
021808,000317: 26,2333           00736                                    SINCDUY                               
021809,000318: 26,2334           00750                                    COSCDUX                               
021810,000319: 26,2335           72405                           DMP      SL1                                   #  CXCY
021811,000320: 26,2336           00744                                    COSCDUY                               
021812,000321: 26,2337           45425                           DSU      STADR                                 #  PULL UP FROM 6 PD
021813,000322: 26,2340           63756                           STODL    COSTH                                 #  COSTH = CXCY - SXSZSY
021814,000323: 26,2341           00736                                    SINCDUY                               
021815,000324: 26,2342           72405                           DMP      SL1                                   
021816,000325: 26,2343           00750                                    COSCDUX                               #  CXSY
021817,000326: 26,2344           45415                           DAD      STADR                                 #  PULL UP FROM 4 PD
021818,000327: 26,2345           43754                           STCALL   SINTH                                 #  SINTH = CXSY + SXSZCY
021819,000328: 26,2346           26506                                    ARCTAN                                #  RETURNS WITH D(MPAC) = PITCH
021820,000329: 26,2347           55525                           PDDL     VDEF                                  #  PITCH INTO 2 PD, ROLL INTO MPAC FROM 2PD
021821,000330: 26,2350           77634                           RTB                                            #  VDEF MAKES V(MPAC) = ROLL, PITCH, YAW
021822,000331: 26,2351           21602                                    V1STO2S                               
021823,000332: 26,2352           02336                           STORE    FDAIX                                 #  MODE IS TP
021824,000333: 26,2353           77776                           EXIT                                           
021825,000334: 
021826,000335: 26,2354           31337        ENDBALL            CA       BALLEXIT                              

Page 487

021828,000337: 26,2355           04640                           TC       BANKJUMP                              
021829,000338: 

Page 488

021831,000340:                                                                                                  #  PROGRAM DESCRIPTION - VECPOINT
021832,000341: 
021833,000342: 
021834,000343:                                                                                                  #           THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION.  THE AXIS
021835,000344:                                                                                                  #  TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
021836,000345:                                                                                                  #  BEGINNING WITH THE LOCATION CALLED SCAXIS.  THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
021837,000346:                                                                                                  #  THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
021838,000347:                                                                                                  #  SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM.  THE COMPONENTS OF THIS
021839,000348:                                                                                                  #  VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES.  WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
021840,000349:                                                                                                  #  ANGLES (2S COMPLEMENT) CORESPONDING TO THE CROSS-PRODUCT ROTATION BETWE EN SCAXIS AND POINTVSM AND STORES THEM
021841,000350:                                                                                                  #  IN T(MPAC) BEFORE RETURNING TO THE CALLER.
021842,000351:                                                                                                  #           THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK.  WHEN POINTING A VECTOR IN THE Y-Z PLANE,
021843,000352:                                                                                                  #  THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
021844,000353:                                                                                                  #  PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
021845,000354:                                                                                                  #  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,
021846,000355:                                                                                                  #  THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES.  IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
021847,000356:                                                                                                  #  THE ADDITIONAL ROTATION IS 35 DEGREES.  THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
021848,000357:                                                                                                  #  STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
021849,000358:                                                                                                  #           WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
021850,000359:                                                                                                  #  CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK.  IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
021851,000360:                                                                                                  #  REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION.  AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
021852,000361:                                                                                                  #  EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
021853,000362: 
021854,000363:                                                                                                  #           CALLING SEQUENCE -
021855,000364:                                                                                                  #               1) LOAD SCAXIS, POINTVSM
021856,000365:                                                                                                  #               2) CALL
021857,000366:                                                                                                  #                       VECPOINT
021858,000367: 
021859,000368:                                                                                                  #           RETURNS WITH
021860,000369: 
021861,000370:                                                                                                  #               1) DESIRED OUTER  GIMBAL ANGLE IN MPAC
021862,000371:                                                                                                  #               2) DESIRED INNER  GIMBAL ANGLE IN MPAC +1
021863,000372:                                                                                                  #               3) DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
021864,000373: 
021865,000374: 
021866,000375:                                                                                                  #           ERASABLES USED -
021867,000376: 
021868,000377:                                                                                                  #               1) SCAXIS           6
021869,000378:                                                                                                  #               2) POINTVSM         6
021870,000379:                                                                                                  #               3) MIS             18
021871,000380:                                                                                                  #               4) DEL             18
021872,000381:                                                                                                  #               5) COF              6
021873,000382:                                                                                                  #               6) VECQTEMP         1
021874,000383:                                                                                                  #               7) ALL OF VAC AREA 43
021875,000384: 
021876,000385:                                                                                                  #                        TOTAL     99
021877,000386: 
021878,000387: 27,2000                                           SETLOC   VECPT                                 
021879,000388: 27,2000                                           BANK                                           

Page 489

021881,000390: 27,2032                                           COUNT*   $$/VECPT                              
021882,000391: 
021883,000392: 27,2032  E6,1675                                  EBANK=   BCDU                                  
021884,000393: 
021885,000394: 27,2032           40020        VECPNT1            STQ      BOV                                   #  THIS ENTRY USES DESIRED CDUS
021886,000395: 27,2033           03324                                    VECQTEMP                              #  NOT PRESENT-ENTER WITH CDUD'S IN MPAC
021887,000396: 27,2034           56035                                    VECPNT2                               
021888,000397: 27,2035           52164        VECPNT2            AXC,2    GOTO                                  
021889,000398: 27,2036           03245                                    MIS                                   
021890,000399: 27,2037           56046                                    STORANG                               
021891,000400: 27,2040           40020        VECPOINT           STQ      BOV                                   #  SAVE RETURN ADDRESS
021892,000401: 27,2041           03324                                    VECQTEMP                              
021893,000402: 27,2042           56043                                    VECLEAR                               #  AND CLEAR OVFIND
021894,000403: 27,2043           47164        VECLEAR            AXC,2    RTB                                   
021895,000404: 27,2044           03245                                    MIS                                   #  READ THE PRESENT CDU ANGLES AND
021896,000405: 27,2045           44403                                    READCDUK                              #  STORE THEM IN PD25, 26, 27
021897,000406: 27,2046           34032        STORANG            STCALL   25D                                   
021898,000407: 27,2047           44410                                    CDUTODCM                              #  S/C AXES TO STABLE MEMBER AXES (MIS)
021899,000408: 27,2050           61375                           VLOAD    VXM                                   
021900,000409: 27,2051           03773                                    POINTVSM                              #  RESOLVE THE POINTING DIRECTION VF INTO
021901,000410: 27,2052           03246                                    MIS                                   #  INITIAL S/C AXES ( VF = POINTVSM)
021902,000411: 27,2053           77656                           UNIT                                           
021903,000412: 27,2054           00035                           STORE    28D                                   
021904,000413:                                                                                                  #  PD 28 29 30 31 32 33
021905,000414: 27,2055           53435                           VXV      UNIT                                  #  TAKE THE CROSS PRODUCT VF X VI
021906,000415: 27,2056           03765                                    SCAXIS                                #  WHERE VI = SCAXIS
021907,000416: 27,2057           57400                           BOV      VCOMP                                 
021908,000417: 27,2060           56170                                    PICKAXIS                              
021909,000418: 27,2061           17270                           STODL    COF                                   #  CHECK MAGNITUDE
021910,000419: 27,2062           00045                                    36D                                   #  OF CROSS PRODUCT
021911,000420: 27,2063           50025                           DSU      BMN                                   #  VECTOR, IF LESS
021912,000421: 27,2064           14417                                    DPB-14                                #  THAN B-14 ASSUME
021913,000422: 27,2065           56170                                    PICKAXIS                              #  UNIT OPERATION
021914,000423: 27,2066           50375                           VLOAD    DOT                                   #           INVALID.
021915,000424: 27,2067           03765                                    SCAXIS                                
021916,000425: 27,2070           00035                                    28D                                   
021917,000426: 27,2071           65552                           SL1      ARCCOS                                
021918,000427: 27,2072           77624        COMPMATX           CALL                                           #  NOW COMPUTE THE TRANSFORMATION FROM
021919,000428: 27,2073           44527                                    DELCOMP                               #  FINAL S/C AXES TO INITIAL S/C AXES  MFI
021920,000429: 27,2074           75160                           AXC,1    AXC,2                                 
021921,000430: 27,2075           03245                                    MIS                                   #  COMPUTE THE TRANSFORMATION FROM FINAL
021922,000431: 27,2076           02221                                    KEL                                   #  S/C AXES TO STABLE MEMBER AXES
021923,000432: 27,2077           77624                           CALL                                           #  MFS = MIS MFI
021924,000433: 27,2100           44312                                    MXM3                                  #  (IN PD LIST)
021925,000434: 
021926,000435: 27,2101           51545                           DLOAD    ABS                                   
021927,000436: 27,2102           00007                                    6                                     #  MFS6 = SIN(CPSI)                    $2
021928,000437: 27,2103           50025                           DSU      BMN                                   
021929,000438: 27,2104           14404                                    SINGIMLC                              #  = SIN(59 DEGS)                      $2
021930,000439: 27,2105           56160                                    FINDGIMB                              #  /CPSI/ LESS THAN 59 DEGS

Page 490

021932,000441:                                                                                                  #  I.E. DESIRED ATTITUDE NOT IN GIMBAL LOCK
021933,000442: 
021934,000443: 27,2106           51545                           DLOAD    ABS                                   #  CHECK TO SEE IF WE ARE POINTING
021935,000444: 27,2107           03765                                    SCAXIS                                #  THE THRUST AXIS
021936,000445: 27,2110           51025                           DSU      BPL                                   
021937,000446: 27,2111           14406                                    SINVEC1                               #  SIN 49.4 DEGS                        $2
021938,000447: 27,2112           56160                                    FINDGIMB                              #  IF SO, WE ARE TRYING TO POINT IT INTO
021939,000448: 27,2113           77775                           VLOAD                                          #  GIMBAL LOCK, ABORT COULD GO HERE
021940,000449: 27,2114           77626                           STADR                                          
021941,000450: 27,2115           50515                           STOVL    MIS        +12D                       
021942,000451: 27,2116           77626                           STADR                                          #  STORE MFS (IN PD LIST) IN MIS
021943,000452: 27,2117           50523                           STOVL    MIS        +6                         
021944,000453: 27,2120           77626                           STADR                                          
021945,000454: 27,2121           50531                           STOVL    MIS                                   
021946,000455: 27,2122           03254                                    MIS        +6                         #  INNER GIMBAL AXIS IN FINAL S/C AXES
021947,000456: 27,2123           57444                           BPL      VCOMP                                 #  LOCATE THE IG AXIS DIRECTION CLOSEST TO
021948,000457: 27,2124           56125                                    IGSAMEX                               #  FINAL X S/C AXIS
021949,000458: 
021950,000459: 27,2125           50035        IGSAMEX            VXV      BMN                                   #  FIND THE SHORTEST WAY OF ROTATING THE
021951,000460: 27,2126           03765                                    SCAXIS                                #  S/C OUT OF GIMBAL LOCK BY A ROTATION
021952,000461: 27,2127           56134                                    U=SCAXIS                              #  ABOUT +- SCAXIS, I.E. IF  (IG (SGN MFS3)
021953,000462:                                                                                                  #  X SCAXIS . XF) LESS THAN 0, U = SCAXIS
021954,000463:                                                                                                  #  OTHERWISE U = -SCAXIS
021955,000464: 
021956,000465: 27,2130           57575                           VLOAD    VCOMP                                 
021957,000466: 27,2131           03765                                    SCAXIS                                
021958,000467: 27,2132           37270                           STCALL   COF                                   #  ROTATE ABOUT -SCAXIS
021959,000468: 27,2133           56137                                    CHEKAXIS                              
021960,000469: 27,2134           77775        U=SCAXIS           VLOAD                                          
021961,000470: 27,2135           03765                                    SCAXIS                                
021962,000471: 27,2136           03270                           STORE    COF                                   #  ROTATE ABOUT + SCAXIS
021963,000472: 27,2137           51545        CHEKAXIS           DLOAD    ABS                                   
021964,000473: 27,2140           03765                                    SCAXIS                                #  SEE IF WE ARE POINTING THE AOT
021965,000474: 27,2141           51025                           DSU      BPL                                   
021966,000475: 27,2142           14410                                    SINVEC2                               #  SIN 29.5 DEGS                        $2
021967,000476: 27,2143           56147                                    PICKANG1                              #  IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
021968,000477: 27,2144           52145                           DLOAD    GOTO                                  #  IF NOT, MUST BE POINTING THE TRANSPONDER
021969,000478: 27,2145           14414                                    VECANG2                               #  OR SOME VECTOR IN THE Y, OR Z PLANE
021970,000479: 27,2146           56151                                    COMPMFSN                              #  IN THIS CASE ROTATE 35 DEGS TO GET OUT
021971,000480:                                                                                                  #  OF GIMBAL LOCK (VECANG2  $360)
021972,000481: 27,2147           77745        PICKANG1           DLOAD                                          
021973,000482: 27,2150           14412                                    VECANG1                               #  = 50 DEGS                          $ 360
021974,000483: 27,2151           77624        COMPMFSN           CALL                                           
021975,000484: 27,2152           44527                                    DELCOMP                               #  COMPUTE THE ROTATION ABOUT SCAXIS TO
021976,000485: 27,2153           75160                           AXC,1    AXC,2                                 #  BRING MFS OUT OF GIMBAL LOCK
021977,000486: 27,2154           03245                                    MIS                                   
021978,000487: 27,2155           02221                                    KEL                                   
021979,000488: 27,2156           77624                           CALL                                           #  COMPUTE THE NEW TRANSFORMATION FROM
021980,000489: 27,2157           44312                                    MXM3                                  #  DESIRED S/C AXES TO STABLE MEMBER AXES
021981,000490:                                                                                                  #  WHICH WILL ALIGN VI WITH VF AND AVOID

Page 491

021983,000492:                                                                                                  #  GIMBAL LOCK
021984,000493: 27,2160           45160        FINDGIMB           AXC,1    CALL                                  
021985,000494: 27,2161           00000                                    0                                     #  EXTRACT THE COMMANDED CDU ANGLES FROM
021986,000495: 27,2162           44654                                    DCMTOCDU                              #  THIS MATRIX
021987,000496: 27,2163           40234                           RTB      SETPD                                 
021988,000497: 27,2164           21602                                    V1STO2S                               #  CONVERT TO 2:S COMPLEMENT
021989,000498: 27,2165           00001                                    0                                     
021990,000499: 27,2166           77650                           GOTO                                           
021991,000500: 27,2167           03324                                    VECQTEMP                              #  RETURN TO CALLER
021992,000501: 
021993,000502: 27,2170           50375        PICKAXIS           VLOAD    DOT                                   #  IF VF X VI = 0,  FIND VF . VI
021994,000503: 27,2171           00035                                    28D                                   
021995,000504: 27,2172           03765                                    SCAXIS                                
021996,000505: 27,2173           72240                           BMN      TLOAD                                 
021997,000506: 27,2174           54356                                    ROT180                                
021998,000507: 27,2175           00032                                    25D                                   
021999,000508: 27,2176           77650                           GOTO                                           #  IF VF = VI, CDU DESIRED = PRESENT CDU
022000,000509: 27,2177           03324                                    VECQTEMP                              #  PRESENT CDU ANGLES
022001,000510: 
022002,000511: 35,2000                                           BANK     35                                    
022003,000512: 26,2000                                           SETLOC   MANUVER1                              
022004,000513: 26,2000                                           BANK                                           
022005,000514: 26,2356           47375        ROT180             VLOAD    VXV                                   #  IF VF, VI ANTIPARALLEL, 108 DEG ROTATION
022006,000515: 26,2357           03254                                    MIS        +6                         #  IS REQUIRED. Y STABLE MEMBER AXIS IN
022007,000516: 26,2360           06516                                    HIDPHALF                              #  INITIAL S/C AXES.
022008,000517: 26,2361           47256                           UNIT     VXV                                   #  FIND Y(SM) X X(I)
022009,000518: 26,2362           03765                                    SCAXIS                                #  FIND UNIT(VI X UNIT(Y(SM) X X(I)))
022010,000519: 26,2363           40056                           UNIT     BOV                                   #  I.E. PICK A VECTOR IN THE PLANE OF X(I),
022011,000520: 26,2364           54400                                    PICKX                                 #  Y(SM) PERPENDICULAR TO VI
022012,000521: 26,2365           17270                           STODL    COF                                   
022013,000522: 26,2366           00045                                    36D                                   #  CHECK MAGNITUDE
022014,000523: 26,2367           50025                           DSU      BMN                                   #  OF THIS VECTOR.
022015,000524: 26,2370           14417                                    DPB-14                                #  IF LESS THAN B-14,
022016,000525: 26,2371           54400                                    PICKX                                 #  PICK X-AXIS.
022017,000526: 26,2372           77775                           VLOAD                                          
022018,000527: 26,2373           03270                                    COF                                   
022019,000528: 26,2374           17270        XROT               STODL    COF                                   
022020,000529: 26,2375           06516                                    HIDPHALF                              
022021,000530: 26,2376           77650                           GOTO                                           
022022,000531: 26,2377           56072                                    COMPMATX                              
022023,000532: 26,2400           52175        PICKX              VLOAD    GOTO                                  #  PICK THE XAXIS IN THIS CASE
022024,000533: 26,2401           06516                                    HIDPHALF                              
022025,000534: 26,2402           54374                                    XROT                                  
022026,000535: 26,2403           15555 35172  SINGIMLC           2DEC     .4285836003                            #  =SIN(59)                $2
022027,000536: 
022028,000537: 26,2405           14113 36326  SINVEC1            2DEC     .3796356537                            #  =SIN(49.4)              $2
022029,000538: 
022030,000539: 26,2407           07701 35703  SINVEC2            2DEC     .2462117800                            #  =SIN(29.5)              $2
022031,000540: 
022032,000541: 26,2411           04343 21616  VECANG1            2DEC     .1388888889                            #  = 50 DEGREES                       $360
022033,000542: 

Page 492

022035,000544: 26,2413           03070 34344  VECANG2            2DEC     .09722222222                            #  = 35 DEGREES                       $360
022036,000545: 
022037,000546: 26,2415           00000        1BITDP             OCT      0                                     #  KEEP THIS BEFORE DPB(-14)     *********
022038,000547: 26,2416           00001        DPB-14             OCT      00001                                 
022039,000548: 26,2417           00000                           OCT      00000                                 
022040,000549: 

Page 493

022042,000551:                                                                                                  #  ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
022043,000552: 
022044,000553: 
022045,000554: 34,2060                                           BANK     34                                    
022046,000555: 23,2000                                           SETLOC   R62                                   
022047,000556: 23,2000                                           BANK                                           
022048,000557: 23,2103  E6,1675                                  EBANK=   BCDU                                  
022049,000558: 
022050,000559: 23,2103                                           COUNT*   $$/R62                                
022051,000560: 
022052,000561: 23,2103  23,2103               R62DISP            EQUALS   R62FLASH                              
022053,000562: 
022054,000563: 23,2103           35010        R62FLASH           CAF      V06N22                                #  FLASH V06N22 AND
022055,000564: 23,2104           04616                           TC       BANKCALL                              #  ICDU ANGLES
022056,000565: 23,2105           20477                           CADR     GOFLASH                               
022057,000566: 23,2106           15503                           TCF      ENDEXT                                #  TERMINATE
022058,000567: 23,2107           12111                           TCF      GOMOVE                                #  PROCEED
022059,000568: 23,2110           12103                           TCF      R62FLASH                              #  ENTER
022060,000569: 
022061,000570:                                                                                                  #  ASTRONAUT MAY LOAD NEW ICDUS AT THIS
022062,000571:                                                                                                  #  POINT
022063,000572: 23,2111           05515        GOMOVE             TC       UPFLAG                                #  SET FOR 3-AXIS MANEUVER
022064,000573: 23,2112           00124                           ADRES    3AXISFLG                              
022065,000574: 
022066,000575: 23,2113           04616                           TC       BANKCALL                              
022067,000576: 23,2114           54125                           CADR     R60LEM                                
022068,000577: 23,2115           15503                           TCF      ENDEXT                                #  END R62
022069,000578: 

End of include-file R60,R62.agc.  Parent file is MAIN.agc