Source Code

These source-code files are part of a reconstructed copy of Skylark 048, the Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.

They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to.

The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction.

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

016639,000002:                                                                                                  ## Copyright:   Public domain.
016640,000003:                                                                                                  ## Filename:    R60,R62.agc
016641,000004:                                                                                                  ## Purpose:     A section of Skylark revision 048.
016642,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer (AGC)
016643,000006:                                                                                                  ##              for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
016644,000007:                                                                                                  ##              this software are available; instead, this file was created via
016645,000008:                                                                                                  ##              disassembly of dumps of the core rope modules actually flown on
016646,000009:                                                                                                  ##              Skylab-2. Access to these modules was provided by the New Mexico
016647,000010:                                                                                                  ##              Museum of Space History.
016648,000011:                                                                                                  ## Assembler:   yaYUL
016649,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
016650,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
016651,000014:                                                                                                  ## Mod history: 2023-09-04 MAS  Created from Artemis 072.
016652,000015:                                                                                                  ##              2024-03-05 MAS  Updated for Skylark 48.
016653,000016: 
016654,000017: 27,2000                                           SETLOC   MANUVER                               
016655,000018: 27,2000                                           BANK                                           
016656,000019: 
016657,000020: 27,2000     0777                                  EBANK=   TEMPR60                               
016658,000021: 
016659,000022: 27,2000                                           COUNT*   $$/R60                                
016660,000023: 
016661,000024:                                                                                                  #  R60CSM        
016662,000025:                                                                                                  #  REV 13   CONFORMS TO GSOP CHAPTER FOUR REVISION LOGIC  09  JAN 18,1968
016663,000026: 
016664,000027: 27,2000           04676        R60CSM             TC       MAKECADR                              
016665,000028: 27,2001           54777                           TS       TEMPR60                               
016666,000029: 
016667,000030: 27,2002           06006        REDOMANN           TC       INTPRET                               
016668,000031: 27,2003           45014                           BON      CALL                                  #  IS 3-AXIS FLAG SET
016669,000032: 27,2004           02711                                    3AXISFLG                              
016670,000033: 27,2005           56010                                    TOBALL1                               #  YES
016671,000034: 27,2006           56135                                    VECPOINT                              #  NO CALL VECPOINT
016672,000035: 27,2007           01300                           STORE    CPHI                                  
016673,000036: 27,2010           77776        TOBALL1            EXIT                                           
016674,000037: 
016675,000038: 27,2011           35044        TOBALL             CAF      V06N18                                
016676,000039: 27,2012           04647                           TC       BANKCALL                              
016677,000040: 27,2013           21034                           CADR     GOPERF2R                              #  DISPLAY PLEASE PERFORM AUTO MANEUVER
016678,000041: 27,2014           02125                           TC       R61TEST                               
016679,000042: 27,2015           02021                           TC       REDOMANC   -1                         
016680,000043: 27,2016           12054                           TCF      ENDMANU1                              #  ENTER I.E. FINISHED WITH R60
016681,000044: 
016682,000045: 27,2017           02056                           TC       CHKLINUS                              #  TO CHECK FOR PRIORITY DISPLAYS
016683,000046: 27,2020           05220                           TC       ENDOFJOB                              
016684,000047: 
016685,000048: 27,2021           06006                 -1        TC       INTPRET                               
016686,000049: 27,2022           45014        REDOMANC           BON      CALL                                  #  IS 3-AXIS FLAG SET
016687,000050: 27,2023           02711                                    3AXISFLG                              
016688,000051: 27,2024           56027                                    +3                                    #  YES
016689,000052: 27,2025           56135                                    VECPOINT                              #  NO CALL VECPOINT
016690,000053: 27,2026           01300                           STORE    CPHI                                  #  STORE ANGLES
016691,000054: 27,2027           77776                           EXIT                                           
016692,000055: 
016693,000056: 27,2030           37673        TOBALLC            CAF      FURST3                                #  BITS 15,14,13 OF CHAN31 = 011
016694,000057: 27,2031           05627                           TC       C31BTCHK                              #  FOR AUTO AND G&N CONTROL
016695,000058: 27,2032           12033                           TCF      +1                                    
016696,000059: 27,2033           67671                           AD       NEG30000                              
016697,000060: 27,2034           00006                           EXTEND                                         
016698,000061: 27,2035           12037                           BZF      +2                                    #  AUTO, NON-FLASH N18
016699,000062: 27,2036           12011                           TCF      TOBALL                                #  NOT AUTO
016700,000063: 27,2037           35044                           CAF      V06N18                                #  SET UP NON-FLASHING V06 N18
016701,000064: 27,2040           04647                           TC       BANKCALL                              
016702,000065: 27,2041           20570                           CADR     GODSPR                                
016703,000066: 27,2042           02056                           TC       CHKLINUS                              
016704,000067: 
016705,000068: 27,2043           04666        STARTMNV           TC       POSTJUMP                              
016706,000069: 27,2044           44000                           CADR     KALCMAN3                              
016707,000070: 
016708,000071: 27,2045           06006        ENDMANUV           TC       INTPRET                               
016709,000072: 27,2046           43014                           BOFF     BOFF                                  
016710,000073: 27,2047           05350                                    AUTOSEQ                               
016711,000074: 27,2050           56010                                    TOBALL1                               
016712,000075: 27,2051           00752                                    TRACKFLG                              
016713,000076: 27,2052           56010                                    TOBALL1                               
016714,000077: 27,2053           77776                           EXIT                                           
016715,000078: 
016716,000079: 27,2054           30777        ENDMANU1           CA       TEMPR60                               
016717,000080: 27,2055           04671                           TC       BANKJUMP                              #                                        -
016718,000081: 
016719,000082: 27,2056           40100        CHKLINUS           CS       FLAGWRD4                              
016720,000083: 27,2057           74766                           MASK     PDSPFBIT                              #  IS PRIORITY DISPLAY FLAG SET
016721,000084: 27,2060           10000                           CCS      A                                     #                                        -
016722,000085: 27,2061           00002                           TC       Q                                     #  NO - EXIT
016723,000086: 27,2062           30002                           CA       Q                                     
016724,000087: 27,2063           54156                           TS       MPAC       +2                         #  SAVE RETURN
016725,000088: 27,2064           46214                           CS       THREE                                 #  OBTAIN LOCATION FOR RESTART.
016726,000089: 27,2065           60133                           AD       BUF2                                  #  HOLDS Q OF LAST DISPALY
016727,000090: 27,2066           55247                           TS       TBASE1                                
016728,000091: 
016729,000092: 27,2067           05415                           TC       PHASCHNG                              
016730,000093: 27,2070           00071                           OCT      71                                    #  1.7SPOT FOR RELINUS
016731,000094: 
016732,000095: 27,2071  01,2022               1P7SPT1            =        1.7SPOT                               
016733,000096: 27,2071           34773                           CAF      BIT7                                  
016734,000097: 27,2072           05531                           TC       LINUS                                 #  GO SET BITS FOR PRIORITY DISPLAY      -
016735,000098: 27,2073           00156                           TC       MPAC       +2                         
016736,000099: 
016737,000100: 27,2074           34775        RELINUS            CAF      TRACKBIT                              #  IS TRACK FLAG ON
016738,000101: 27,2075           70075                           MASK     FLAGWRD1                              
016739,000102: 27,2076           00006                           EXTEND                                         
016740,000103: 27,2077           12123                           BZF      GOREDO20                              #  NO
016741,000104: 
016742,000105: 27,2100           07710                           TC       UPFLAG                                
016743,000106: 27,2101           00077                           ADRES    PDSPFLAG                              #  R60 PRIODSP FLAG
016744,000107: 
016745,000108: 27,2102           30104                           CA       FLAGWRD8                              
016746,000109: 27,2103           74771                           MASK     UTBIT                                 
016747,000110: 27,2104           10000                           CCS      A                                     
016748,000111: 27,2105           02120                           TC       RELINUSX                              #  UTFLAG SET,DO NOT SET TARG1FLG,OPTIND
016749,000112: 27,2106           07710                           TC       UPFLAG                                
016750,000113: 27,2107           00024                           ADRES    TARG1FLG                              #  FOR R52
016751,000114: 
016752,000115: 27,2110           35003                           CAF      ZERO                                  #  RESET TO ZERO, SINCE
016753,000116: 27,2111           55313                           TS       OPTIND                                #  OPTIND WAS SET TO -1 BY V379
016754,000117: 
016755,000118: 27,2112           35001                           CAF      BIT1                                  
016756,000119: 27,2113           05246                           TC       WAITLIST                              
016757,000120: 27,2114     1333                                  EBANK=   FIXTIME                               
016758,000121: 27,2114           02264 60062                     2CADR    CTASK                                 
016759,000122: 
016760,000123: 27,2116           07710                           TC       UPFLAG                                
016761,000124: 27,2117           00037                           ADRES    R21MARK                               #  ALLOW OPTICS MARKING DURING P2
016762,000125: 
016763,000126: 27,2120           35065        RELINUSX           CAF      PRIO14                                #  RESTORE ORIGINAL PRIORITY
016764,000127: 27,2121           05211                           TC       PRIOCHNG                              
016765,000128: 
016766,000129: 27,2122           01247                           TC       TBASE1                                
016767,000130: 
016768,000131: 27,2123           04666        GOREDO20           TC       POSTJUMP                              #  RESTORE R03 DEADBAND, DO STOPRATE,
016769,000132: 27,2124           74662                           CADR     FIXDB                                 #   SET UP 1.11 RESTART, EOJ.
016770,000133: 27,2125           31204        R61TEST            CA       MODREG                                #  ARE WE IN P00.  IF YES THIS MUST BE
016771,000134: 27,2126           00006                           EXTEND                                         #      VERB49 OR VERB89 SO DO ENDEXT.
016772,000135: 27,2127           12054                           BZF      ENDMANU1                              #  RESET 3-AXIS & RUTURN.  USER DOES ENDEXT
016773,000136: 27,2130           30100                           CA       FLAGWRD4                              #  ARE WE IN R61 (P20)
016774,000137: 27,2131           74766                           MASK     PDSPFBIT                              
016775,000138: 27,2132           00006                           EXTEND                                         
016776,000139: 27,2133           14103                           BZF      GOTOPOOH                              #  NO
016777,000140: 27,2134           04557                           TC       GOTOV56                               #  YES
016778,000141: 
016779,000142:                                                                                                  #  PROGRAM DESCRIPTION - VECPOINT
016780,000143: 
016781,000144: 
016782,000145:                                                                                                  #           THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION.  THE AXIS
016783,000146:                                                                                                  #  TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
016784,000147:                                                                                                  #  BEGINNING WITH THE LOCATION CALLED SCAXIS.  THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
016785,000148:                                                                                                  #  THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
016786,000149:                                                                                                  #  SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM.  THE COMPONENTS OF THIS
016787,000150:                                                                                                  #  VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES.  WITH THIS INFORMATION VECPOINT COMPUTES A SET OF THREE GIMBAL
016788,000151:                                                                                                  #  ANGLES (2S COMPLEMENT) CORRESPONDING TO THE CROSS-PRODUCT ROTATION BETWEEN SCAXIS AND POINTVSM AND STORES THEM
016789,000152:                                                                                                  #  IN T(MPAC) BEFORE RETURNING TO THE CALLER.
016790,000153:                                                                                                  #          THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK.  WHEN POINTING A VECTOR IN THE Y-Z PLANE,
016791,000154:                                                                                                  #  THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROBLEM BY ROTATING THE CROSS-
016792,000155:                                                                                                  #  PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
016793,000156:                                                                                                  #  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,
016794,000157:                                                                                                  #  THE ADDITIONAL ROTATION TO AVOID GIMAL LOCK IS 35 DEGREES.  IF THE AXIS IS MORE THAN 60.5 DEGEES FROM +X (OR -X)
016795,000158:                                                                                                  #  THE ADDITIONAL ROTATION IS 35 DEGREES.  THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
016796,000159:                                                                                                  #  STORED AS 2S COMPLIMENT ANGLES IN T(MPAC) BEFORE RETURNING TO THE CALLER.
016797,000160:                                                                                                  #           WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
016798,000161:                                                                                                  #  CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK.  IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
016799,000162:                                                                                                  #  REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION.  AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
016800,000163:                                                                                                  #  EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
016801,000164: 
016802,000165:                                                                                                  #  CALLING SEQUENCE -
016803,000166: 
016804,000167:                                                                                                  #        1) LOAD SCAXIS, POINTVSM
016805,000168:                                                                                                  #        2) CALL
016806,000169:                                                                                                  #                VECPOINT
016807,000170: 
016808,000171:                                                                                                  #  RETURNS WITH
016809,000172: 
016810,000173:                                                                                                  #        1) DESIRED OUTER  GIMBAL ANGLE IN MPAC
016811,000174:                                                                                                  #        2) DESIRED INNER  GIMBAL ANGLE IN MPAC +1
016812,000175:                                                                                                  #        3) DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
016813,000176: 
016814,000177:                                                                                                  #  ERASABLES USED -
016815,000178: 
016816,000179:                                                                                                  #        1) SCAXIS                6
016817,000180:                                                                                                  #        2) POINTVSM              6
016818,000181:                                                                                                  #        3) MIS                  18
016819,000182:                                                                                                  #        4) DEL                  18
016820,000183:                                                                                                  #        5) COF                   6
016821,000184:                                                                                                  #        6) VECQTEMP              1
016822,000185:                                                                                                  #        7) ALL OF VAC AREA      43
016823,000186: 
016824,000187:                                                                                                  #                        TOTAL   99
016825,000188: 
016826,000189: 27,2000                                           SETLOC   VECPT                                 
016827,000190: 27,2000                                           BANK                                           
016828,000191: 27,2135  E6,1712                                  EBANK=   BCDU                                  
016829,000192: 
016830,000193: 27,2135                                           COUNT*   $$/VECPT                              
016831,000194: 27,2135           40020        VECPOINT           STQ      BOV                                   #  SAVE RETURN ADDRESS
016832,000195: 27,2136           03341                                    VECQTEMP                              
016833,000196: 27,2137           56140                                    VECLEAR                               #  AND CLEAR OVFIND
016834,000197: 27,2140           47164        VECLEAR            AXC,2    RTB                                   
016835,000198: 27,2141           02271                                    MIS                                   #  READ THE PRESENT CDU ANGLES AND
016836,000199: 27,2142           44370                                    READCDUK                              #  STORE THEM IN PD25, 26, 27
016837,000200: 27,2143           34032                           STCALL   25D                                   
016838,000201: 27,2144           44377                                    CDUTODCM                              #  S/C AXES TO STABLE MEMBER AXES (MIS)
016839,000202: 27,2145           61375                           VLOAD    VXM                                   
016840,000203: 27,2146           03362                                    POINTVSM                              #  RESOLVE THE POINTING DIRECTION VF INTO
016841,000204: 27,2147           02272                                    MIS                                   #  INITIAL S/C AXES (VF = POINTVSM)
016842,000205: 27,2150           77656                           UNIT                                           
016843,000206: 27,2151           00035                           STORE    28D                                   
016844,000207:                                                                                                  #  PD 28 29 30 31 32 33
016845,000208: 27,2152           53435                           VXV      UNIT                                  #  TAKE THE CROSS PRODUCT VF X VI
016846,000209: 27,2153           03354                                    SCAXIS                                #  WHERE VI = SCAXIS
016847,000210: 27,2154           57400                           BOV      VCOMP                                 
016848,000211: 27,2155           56265                                    PICKAXIS                              
016849,000212: 27,2156           16314                           STODL    COF                                   #  CHECK MAGNITUDE
016850,000213: 27,2157           00045                                    36D                                   #  OF CROSS PRODUCT
016851,000214: 27,2160           50025                           DSU      BMN                                   #  VECTOR, IF LESS
016852,000215: 27,2161           16336                                    DPB-14                                #  THAN B-14 ASSUME
016853,000216: 27,2162           56265                                    PICKAXIS                              #  UNIT OPERATION
016854,000217: 27,2163           50375                           VLOAD    DOT                                   #           INVALID.
016855,000218: 27,2164           03354                                    SCAXIS                                
016856,000219: 27,2165           00035                                    28D                                   
016857,000220: 27,2166           65552                           SL1      ARCCOS                                
016858,000221: 27,2167           77624        COMPMATX           CALL                                           #  NOW COMPUTE THE TRANSFORMATION FROM
016859,000222: 27,2170           44522                                    DELCOMP                               #  FINAL S/C AXES TO INITIAL S/C AXES    MFI
016860,000223: 27,2171           75160                           AXC,1    AXC,2                                 
016861,000224: 27,2172           02271                                    MIS                                   #  COMPUTE THE TRANSFORMATION FROM FINAL
016862,000225: 27,2173           03425                                    DEL                                   #  S/C AXES TO STABLE MEMBER AXES
016863,000226: 27,2174           77624                           CALL                                           #  MFS = MIS MFI
016864,000227: 27,2175           44304                                    MXM3                                  #  (IN PD LIST)
016865,000228: 
016866,000229: 27,2176           51545                           DLOAD    ABS                                   
016867,000230: 27,2177           00007                                    6                                     #  MFS6 = SIN(CPSI)                      $2
016868,000231: 27,2200           50025                           DSU      BMN                                   
016869,000232: 27,2201           16323                                    SINGIMLC                              #  = SIN(59 DEGS)                        $2
016870,000233: 27,2202           56255                                    FINDGIMB                              #  /CPSI/ LESS THAN 59 DEGS
016871,000234:                                                                                                  #  I.E. DESIRED ATTITUDE NOT IN GIMBAL LOCK
016872,000235: 
016873,000236: 27,2203           51545                           DLOAD    ABS                                   #  CHECK TO SEE IF WE ARE POINTING
016874,000237: 27,2204           03354                                    SCAXIS                                #  THE THRUST AXIS
016875,000238: 27,2205           51025                           DSU      BPL                                   
016876,000239: 27,2206           16325                                    SINVEC1                               #  SIN 49.4 DEGS                         $2
016877,000240: 27,2207           56255                                    FINDGIMB                              #  IF SO, WE ARE TRYING TO POINT IT INTO
016878,000241: 27,2210           77775                           VLOAD                                          #  GIMBAL LOCK, ABORT COULD GO HERE
016879,000242: 27,2211           77626                           STADR                                          
016880,000243: 27,2212           51471                           STOVL    MIS        +12D                       
016881,000244: 27,2213           77626                           STADR                                          #  STORE MFS (IN PD LIST) IN MIS
016882,000245: 27,2214           51477                           STOVL    MIS        +6                         
016883,000246: 27,2215           77626                           STADR                                          
016884,000247: 27,2216           51505                           STOVL    MIS                                   
016885,000248: 27,2217           02300                                    MIS        +6                         #  INNER GIMBAL AXIS IN FINAL S/C AXES
016886,000249: 27,2220           57444                           BPL      VCOMP                                 #  LOCATE THE IG AXIS DIRECTION CLOSEST TO
016887,000250: 27,2221           56222                                    IGSAMEX                               #  FINAL X S/C AXIS
016888,000251: 
016889,000252: 27,2222           50035        IGSAMEX            VXV      BMN                                   #  FIND THE SHORTEST WAY OF ROTATING THE 
016890,000253: 27,2223           03354                                    SCAXIS                                #  S/C OUT OF GIMBAL LOCK BY A ROTATION 
016891,000254: 27,2224           56231                                    U=SCAXIS                              #  ABOUT +- SCAXIS, I.E. IF  (IG (SGN MFS3)
016892,000255:                                                                                                  #  X SCAXIS . XF) LESS THAN 0, U = SCAXIS
016893,000256:                                                                                                  #  OTHERWISE U = -SCAXIS
016894,000257: 
016895,000258: 27,2225           57575                           VLOAD    VCOMP                                 
016896,000259: 27,2226           03354                                    SCAXIS                                
016897,000260: 27,2227           36314                           STCALL   COF                                   #  ROTATE ABOUT -SCAXIS
016898,000261: 27,2230           56234                                    CHEKAXIS                              
016899,000262: 27,2231           77775        U=SCAXIS           VLOAD                                          
016900,000263: 27,2232           03354                                    SCAXIS                                
016901,000264: 27,2233           02314                           STORE    COF                                   #  ROTATE ABOUT + SCAXIS
016902,000265: 27,2234           51545        CHEKAXIS           DLOAD    ABS                                   
016903,000266: 27,2235           03354                                    SCAXIS                                #  SEE IF WE ARE POINTING THE AOT
016904,000267: 27,2236           51025                           DSU      BPL                                   
016905,000268: 27,2237           16327                                    SINVEC2                               #  SIN 29.5 DEGS                         $2
016906,000269: 27,2240           56244                                    PICKANG1                              #  IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
016907,000270: 27,2241           52145                           DLOAD    GOTO                                  #  IF NOT, MUST BE POINTING THE TRANSPONDER
016908,000271: 27,2242           16333                                    VECANG2                               #  OR SOME VECTOR IN THE Y, OR Z PLANE
016909,000272: 27,2243           56246                                    COMPMFSN                              #  IN THIS CASE ROTATE 35 DEGS TO GET OUT
016910,000273:                                                                                                  #  OF GIMBAL LOCK (VECANG2  $360)
016911,000274: 27,2244           77745        PICKANG1           DLOAD                                          
016912,000275: 27,2245           16331                                    VECANG1                               #  = 50 DEGS                           $ 360
016913,000276: 27,2246           77624        COMPMFSN           CALL                                           
016914,000277: 27,2247           44522                                    DELCOMP                               #  COMPUTE THE ROTATION ABOUT SCAXIS TO
016915,000278: 27,2250           75160                           AXC,1    AXC,2                                 #  BRING MFS OUT OF GIMBAL LOCK
016916,000279: 27,2251           02271                                    MIS                                   
016917,000280: 27,2252           03425                                    DEL                                   
016918,000281: 27,2253           77624                           CALL                                           #  COMPUTE THE NEW TRANSFORMATION FROM
016919,000282: 27,2254           44304                                    MXM3                                  #  DESIRED S/C AXES TO STABLE MEMBER AXES
016920,000283:                                                                                                  #  WHICH WILL ALIGN VI WITH VF AND AVOID
016921,000284:                                                                                                  #  GIMBAL LOCK
016922,000285: 27,2255           45160        FINDGIMB           AXC,1    CALL                                  
016923,000286: 27,2256           00000                                    0                                     #  EXTRACT THE COMMANDED CDU ANGLES FROM
016924,000287: 27,2257           44647                                    DCMTOCDU                              #  THIS MATRIX
016925,000288: 27,2260           77634                           RTB                                            
016926,000289: 27,2261           45625                                    V1STO2S                               #  CONVERT TO 2:S COMPLEMENT
016927,000290: 27,2262           52001        VECPTRET           SETPD    GOTO                                  
016928,000291: 27,2263           00001                                    0                                     
016929,000292: 27,2264           03341                                    VECQTEMP                              #  RETURN TO CALLER
016930,000293: 
016931,000294: 27,2265           50375        PICKAXIS           VLOAD    DOT                                   #  IF VF X VI = 0, FIND VF . VI
016932,000295: 27,2266           00035                                    28D                                   
016933,000296: 27,2267           03354                                    SCAXIS                                
016934,000297: 27,2270           72240                           BMN      TLOAD                                 
016935,000298: 27,2271           56275                                    ROT180                                
016936,000299: 27,2272           00032                                    25D                                   
016937,000300: 27,2273           77650                           GOTO                                           #  IF VF = VI, CDU DESIRED = PRESENT CDU
016938,000301: 27,2274           56262                                    VECPTRET                              #  PRESENT CDU ANGLES
016939,000302: 27,2275           47375        ROT180             VLOAD    VXV                                   #  IF VF, VI ANTIPARALLEL, 180 DEG ROTATION
016940,000303: 27,2276           02300                                    MIS        +6                         #  IS REQUIRED. Y STABLE MEMBER AXIS IN
016941,000304: 27,2277           15202                                    HIUNITX                               #  INITIAL S/C AXIS.
016942,000305: 27,2300           47256                           UNIT     VXV                                   #  FIND Y(SM) X X(I)
016943,000306: 27,2301           03354                                    SCAXIS                                #  FIND UNIT(VI X UNIT(Y(SM) X X(I)))
016944,000307: 27,2302           40056                           UNIT     BOV                                   #  I.E. PICK A VECTOR IN THE PLANE OF X(I),
016945,000308: 27,2303           56317                                    PICKX                                 #  Y(SM) PERPENDICULAR TO VI
016946,000309: 27,2304           16314                           STODL    COF                                   
016947,000310: 27,2305           00045                                    36D                                   #  CHECK MAGNITUDE
016948,000311: 27,2306           50025                           DSU      BMN                                   #  OF THIS VECTOR.
016949,000312: 27,2307           16336                                    DPB-14                                #  IF LESS THAN B-14,
016950,000313: 27,2310           56317                                    PICKX                                 #  PICK X-AXIS.
016951,000314: 27,2311           77775                           VLOAD                                          
016952,000315: 27,2312           02314                                    COF                                   
016953,000316: 27,2313           16314        XROT               STODL    COF                                   
016954,000317: 27,2314           15202                                    HIDPHALF                              
016955,000318: 27,2315           77650                           GOTO                                           
016956,000319: 27,2316           56167                                    COMPMATX                              
016957,000320: 27,2317           52175        PICKX              VLOAD    GOTO                                  #  PICK THE XAXIS IN THIS CASE
016958,000321: 27,2320           15202                                    HIUNITX                               
016959,000322: 27,2321           56313                                    XROT                                  
016960,000323: 27,2000                                           SETLOC   MANUVER1                              
016961,000324: 27,2000                                           BANK                                           
016962,000325: 
016963,000326: 27,2322                                           COUNT*   $$/VECPT                              
016964,000327: 27,2322           15555 35172  SINGIMLC           2DEC     .4285836003                            #  = SIN(59)             $2
016965,000328: 27,2324           14113 36326  SINVEC1            2DEC     .3796356537                            #  = SIN(49.4)           $2
016966,000329: 27,2326           07701 35703  SINVEC2            2DEC     .2462117800                            #  = SIN(29.5)           $2
016967,000330: 27,2330           04343 21616  VECANG1            2DEC     .1388888889                            #  = 50 DEGREES                        $360
016968,000331: 27,2332           03070 34344  VECANG2            2DEC     .09722222222                            #  = 35 DEGREES                        $360
016969,000332: 
016970,000333: 27,2334           00000        1BITDP             OCT      0                                     #  KEEP THIS BEFORE DPB(-14)      *********
016971,000334: 27,2335           00001        DPB-14             OCT      00001                                 
016972,000335: 27,2336           00000                           OCT      00000                                 
016973,000336: 27,2000                                           SETLOC   MANUVER                               
016974,000337: 27,2000                                           BANK                                           
016975,000338: 
016976,000339:                                                                                                  #  ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
016977,000340: 
016978,000341: 27,2337     1277                                  EBANK=   CPHI                                  
016979,000342: 
016980,000343: 27,2337                                           COUNT*   $$/R62                                
016981,000344: 27,2337           35040        R62DISP            CAF      V06N22                                #  DISPLAY COMMAND ICDUS CPHI, CTHETA, CPHI
016982,000345: 27,2340           04647                           TC       BANKCALL                              
016983,000346: 27,2341           20623                           CADR     GOFLASH                               
016984,000347: 27,2342           15537                           TCF      ENDEXT                                
016985,000348: 27,2343           12345                           TCF      GOMOVE                                #  PROCEED
016986,000349: 27,2344           12337                           TCF      R62DISP                               #  ENTER
016987,000350: 
016988,000351:                                                                                                  #  ASTRONAUT MAY LOAD NEW ICDUS AT THIS
016989,000352:                                                                                                  #  POINT
016990,000353: 27,2345           07710        GOMOVE             TC       UPFLAG                                #  SET 3-AXIS FLAG
016991,000354: 27,2346           00124                           ADRES    3AXISFLG                              #  BIT 6  FLAG 5
016992,000355: 27,2347           04647                           TC       BANKCALL                              
016993,000356: 27,2350           56000                           CADR     R60CSM                                
016994,000357: 
016995,000358: 27,2351           15537                           TCF      ENDEXT                                

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