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.

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

Page 480

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

Page 481

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

Page 482

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

Page 483

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

Page 484

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

Page 485

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

Page 486

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

Page 487

021823,000337: 26,2355           04640                           TC       BANKJUMP                              
021824,000338: 

Page 488

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

Page 489

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

Page 490

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

Page 491

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

Page 492

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

Page 493

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

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