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.

053634,000002:                                                                                                  ## Copyright:   Public domain.
053635,000003:                                                                                                  ## Filename:    ORBITAL_INTEGRATION.agc
053636,000004:                                                                                                  ## Purpose:     A section of Skylark revision 048.
053637,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer (AGC)
053638,000006:                                                                                                  ##              for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
053639,000007:                                                                                                  ##              this software are available; instead, this file was created via
053640,000008:                                                                                                  ##              disassembly of dumps of the core rope modules actually flown on
053641,000009:                                                                                                  ##              Skylab-2. Access to these modules was provided by the New Mexico
053642,000010:                                                                                                  ##              Museum of Space History.
053643,000011:                                                                                                  ## Assembler:   yaYUL
053644,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
053645,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
053646,000014:                                                                                                  ## Mod history: 2023-09-04 MAS  Created from Artemis 072.
053647,000015:                                                                                                  ##              2024-03-04 MAS  Updated for Skylark 48.
053648,000016: 
053649,000017:                                                                                                  #  DELETE
053650,000018: 11,2000                                           SETLOC   ORBITAL                               
053651,000019: 11,2000                                           BANK                                           
053652,000020: 11,2731                                           COUNT*   $$/ORBIT                              
053653,000021: 
053654,000022:                                                                                                  #  DELETE
053655,000023: 11,2731           71201        KEPPREP            SETPD    DLOAD                                 
053656,000024: 11,2732           00001                                    0                                     
053657,000025: 11,2733           22722                                    MUEARTH                               
053658,000026: 11,2734           63366                           SQRT     PDVL                                  #  SQRT(MU) (+18 OR +15)         0D      PL 2D
053659,000027: 11,2735           01535                                    RCV                                   
053660,000028: 11,2736           65256                           UNIT     PDDL                                  #                                        PL 8D
053661,000029: 11,2737           00045                                    36D                                   
053662,000030: 11,2740           63301                           NORM     PDVL                                  #  NORM R (+29 OR +27 - N1)      2D      PL 4D
053663,000031: 11,2741           00047                                    X1                                    
053664,000032: 11,2742           65241                           DOT      PDDL                                  #  F*SQRT(MU) (+7 OR +5)         4D      PL 6D
053665,000033: 11,2743           01543                                    VCV                                   
053666,000034: 11,2744           02171                                    TAU.                                  #  (+28)
053667,000035: 11,2745           60225                           DSU      NORM                                  
053668,000036: 11,2746           01551                                    TC                                    
053669,000037: 11,2747           00051                                    S1                                    
053670,000038: 11,2750           77742                           SR1                                            
053671,000039: 11,2751           65271                           DDV      PDDL                                  
053672,000040: 11,2752           00003                                    2D                                    
053673,000041: 11,2753           41405                           DMP      PUSH                                  #  FS (+6 +N1-N2)                6D      PL 8D
053674,000042: 11,2754           00005                                    4D                                    
053675,000043: 11,2755           65316                           DSQ      PDDL                                  #  (FS)SQ (+12 +2(N1-N2))        8D      PL 10D
053676,000044: 11,2756           00005                                    4D                                    
053677,000045: 11,2757           65316                           DSQ      PDDL                                  #  SSQ/MU (-2 OR +2(N1-N2))      10D     PL 12D
053678,000046: 11,2760           22722                                    MUEARTH                               
053679,000047: 11,2761           40442                           SR3      SR4                                   
053680,000048: 11,2762           47515                           PDVL     VSQ                                   #  PREALIGN MU (+43 OR +37)      12D     PL 14D
053681,000049: 11,2763           01543                                    VCV                                   
053682,000050: 11,2764           44205                           DMP      BDSU                                  #                                        PL 12D
053683,000051: 11,2765           00045                                    36D                                   
053684,000052: 11,2766           41271                           DDV      DMP                                   #                                        PL 10D
053685,000053: 11,2767           00003                                    2D                                    #  -(1/R-ALPHA) (+12 +3N1-2N2)
053686,000054: 11,2770           53605                           DMP      SL*                                   
053687,000055: 11,2771           23752                                    DP2/3                                 
053688,000056: 11,2772           20176                                    0          -3,1                       #  10L(1/R-ALPHA) (+13 +2(N1-N2))
053689,000057: 11,2773           43260                           XSU,1    DAD                                   #  2(FS)SQ - ETCETRA                     PL 8D
053690,000058: 11,2774           00050                                    S1                                    #  X1 = N2-N1
053691,000059: 11,2775           45257                           SL*      DSU                                   #  -FS+2(FS)SQ ETC (+6 +N1-N2)           PL 6D
053692,000060: 11,2776           20211                                    8D,1                                  
053693,000061: 11,2777           41205                           DMP      DMP                                   
053694,000062: 11,3000           00001                                    0D                                    
053695,000063: 11,3001           00005                                    4D                                    
053696,000064: 11,3002           53657                           SL*      SL*                                   
053697,000065: 11,3003           20211                                    8D,1                                  
053698,000066: 11,3004           20201                                    0,1                                   #  S(-FS(1-2FS)-1/6...) (+17 OR +16)
053699,000067: 11,3005           65215                           DAD      PDDL                                  #                                        PL 6D
053700,000068: 11,3006           01553                                    XKEP                                  
053701,000069: 11,3007           53605                           DMP      SL*                                   #  S(+17 OR +16)
053702,000070: 11,3010           00001                                    0D                                    
053703,000071: 11,3011           20202                                    1,1                                   
053704,000072: 11,3012           43204                           BOVB     DAD                                   
053705,000073: 11,3013           57450                                    TCDANZIG                              
053706,000074: 11,3014           77626                           STADR                                          
053707,000075: 11,3015           75612                           STORE    XKEPNEW                               
053708,000076: 11,3016           52020                           STQ      GOTO                                  
053709,000077: 11,3017           02163                                    KEPRTN                                
053710,000078: 11,3020           24101                                    KEPLERN                               
053711,000079: 
053712,000080: 11,3021           66350        FBR3               LXA,1    SSP                                   
053713,000081: 11,3022           01500                                    DIFEQCNT                              
053714,000082: 11,3023           00051                                    S1                                    
053715,000083: 11,3024           77762                           DEC      -13        B-14                       
053716,000084: 11,3025           54345                           DLOAD    SR                                    
053717,000085: 11,3026           02173                                    DT/2                                  
053718,000086: 11,3027           20612                                    9D                                    
053719,000087: 11,3030           61500                           TIX,1    ROUND                                 
053720,000088: 11,3031           23032                                    +1                                    
053721,000089: 11,3032           43206                           PUSH     DAD                                   
053722,000090: 11,3033           01551                                    TC                                    
053723,000091: 11,3034           16171                           STODL    TAU.                                  
053724,000092: 11,3035           77615                           DAD                                            
053725,000093: 11,3036           01517                                    TET                                   
053726,000094: 11,3037           35517                           STCALL   TET                                   
053727,000095: 11,3040           22731                                    KEPPREP                               
053728,000096: 
053729,000097: 
053730,000098:                                                                                                  #  AGC ROUTINE TO COMPUTE ACCELERATION COMPONENTS.
053731,000099: 
053732,000100: 11,3041           77775        ACCOMP             VLOAD                                          
053733,000101: 11,3042           15726                                    ZEROVEC                               
053734,000102: 11,3043           26104                           STOVL    FV                                    
053735,000103: 11,3044           02054                                    ALPHAV                                
053736,000104: 11,3045           53261                           SR       VAD                                   
053737,000105: 11,3046           20610                                    7                                     
053738,000106: 11,3047           01535                                    RCV                                   
053739,000107: 11,3050           02062                           STORE    BETAV                                 
053740,000108: 11,3051           65014                           BOF      XCHX,2                                
053741,000109: 11,3052           01756                                    DIM0FLAG                              
053742,000110: 11,3053           23060                                    +5                                    
053743,000111: 11,3054           01500                                    DIFEQCNT                              
053744,000112: 11,3055           12120                           STORE    VECTAB,2                              
053745,000113: 11,3056           77724                           XCHX,2                                         
053746,000114: 11,3057           01500                                    DIFEQCNT                              
053747,000115: 11,3060           53575                           VLOAD    UNIT                                  
053748,000116: 11,3061           02054                                    ALPHAV                                
053749,000117: 11,3062           16054                           STODL    ALPHAV                                
053750,000118: 11,3063           00045                                    36D                                   
053751,000119: 11,3064           36167                           STCALL   ALPHAM                                
053752,000120: 11,3065           23076                                    GAMCOMP                               
053753,000121: 11,3066           66175                           VLOAD    SXA,1                                 
053754,000122: 11,3067           02062                                    BETAV                                 
053755,000123: 11,3070           00051                                    S2                                    
053756,000124: 11,3071           16054                           STODL    ALPHAV                                
053757,000125: 11,3072           02112                                    BETAM                                 
053758,000126: 11,3073           02167                           STORE    ALPHAM                                
053759,000127: 11,3074           77650                           GOTO                                           
053760,000128: 11,3075           23246                                    OBLATE                                
053761,000129: 11,3076           74575        GAMCOMP            VLOAD    VSR1                                  
053762,000130: 11,3077           02062                                    BETAV                                 
053763,000131: 11,3100           40236                           VSQ      SETPD                                 
053764,000132: 11,3101           00001                                    0                                     
053765,000133: 11,3102           61501                           NORM     ROUND                                 
053766,000134: 11,3103           00040                                    31D                                   
053767,000135: 11,3104           60325                           PDDL     NORM                                  #  NORMED B SQUARED TO PD LIST
053768,000136: 11,3105           02167                                    ALPHAM                                #  NORMALIZE (LESS ONE) LENGTH OF ALPHA
053769,000137: 11,3106           00041                                    32D                                   #  SAVING NORM SCALE FACTOR IN X1
053770,000138: 11,3107           63342                           SR1      PDVL                                  
053771,000139: 11,3110           02062                                    BETAV                                 #  C(PDL+2) = ALMOST NORMED ALPHA
053772,000140: 11,3111           77656                           UNIT                                           
053773,000141: 11,3112           16062                           STODL    BETAV                                 
053774,000142: 11,3113           00045                                    36D                                   
053775,000143: 11,3114           02112                           STORE    BETAM                                 
053776,000144: 11,3115           55301                           NORM     BDDV                                  #  FORM NORMALIZED QUOTIENT ALPHAM/BETAM
053777,000145: 11,3116           00042                                    33D                                   
053778,000146: 11,3117           65362                           SR1R     PDDL                                  #  C(PDL+2) = ALMOST NORMALIZED RHO.
053779,000147: 11,3120           23754                                    ASCALE                                
053780,000148: 11,3121           00051                           STORE    S1                                    
053781,000149: 11,3122           57124                           XCHX,2   XAD,2                                 
053782,000150: 11,3123           00050                                    S1                                    
053783,000151: 11,3124           00040                                    32D                                   
053784,000152: 11,3125           71264                           XSU,2    DLOAD                                 
053785,000153: 11,3126           00041                                    33D                                   
053786,000154: 11,3127           00003                                    2D                                    
053787,000155: 11,3130           65057                           SR*      XCHX,2                                
053788,000156: 11,3131           57177                                    0          -1,2                       
053789,000157: 11,3132           00050                                    S1                                    
053790,000158: 11,3133           74406                           PUSH     SR1R                                  #  RHO/4 TO 4D
053791,000159: 11,3134           50315                           PDVL     DOT                                   
053792,000160: 11,3135           02054                                    ALPHAV                                
053793,000161: 11,3136           02062                                    BETAV                                 
053794,000162: 11,3137           44372                           SL1R     BDSU                                  #  (RHO/4) - 2(ALPHAV/2.BETAV/2)
053795,000163: 11,3140           57206                           PUSH     DMPR                                  #  TO PDL+6
053796,000164: 11,3141           00005                                    4                                     
053797,000165: 11,3142           77752                           SL1                                            
053798,000166: 11,3143           43206                           PUSH     DAD                                   
053799,000167: 11,3144           33412                                    DQUARTER                              
053800,000168: 11,3145           75406                           PUSH     SQRT                                  
053801,000169: 11,3146           41475                           DMPR     PUSH                                  
053802,000170: 11,3147           00013                                    10D                                   
053803,000171: 11,3150           43352                           SL1      DAD                                   
053804,000172: 11,3151           33412                                    DQUARTER                              
053805,000173: 11,3152           43325                           PDDL     DAD                                   #  (1/4)+2((Q+1)/4)      TO PD+14D
053806,000174: 11,3153           00013                                    10D                                   
053807,000175: 11,3154           15724                                    HALFDP                                
053808,000176: 11,3155           72475                           DMPR     SL1                                   
053809,000177: 11,3156           00011                                    8D                                    
053810,000178: 11,3157           56215                           DAD      DDV                                   
053811,000179: 11,3160           23730                                    THREE/8                               
053812,000180: 11,3161           00017                                    14D                                   
053813,000181: 11,3162           74275                           DMPR     VXSC                                  
053814,000182: 11,3163           00007                                    6                                     
053815,000183: 11,3164           02062                                    BETAV                                 #                -
053816,000184: 11,3165           64515                           PDVL     VSR3                                  #  (G/2)(C(PD+4))B/2 TO PD+16D
053817,000185: 11,3166           02054                                    ALPHAV                                
053818,000186: 11,3167           41455                           VAD      PUSH                                  #  A12 + C(PD+16D) TO PD+16D
053819,000187: 11,3170           41345                           DLOAD    DMP                                   
053820,000188: 11,3171           00001                                    0                                     
053821,000189: 11,3172           00015                                    12D                                   #  -
053822,000190: 11,3173           61501                           NORM     ROUND                                 
053823,000191: 11,3174           00037                                    30D                                   
053824,000192: 11,3175           41265                           BDDV     DMP                                   
053825,000193: 11,3176           00003                                    2                                     
053826,000194: 11,3177           22722                                    MUEARTH                               
053827,000195: 11,3200           74276                           DCOMP    VXSC                                  
053828,000196: 11,3201           57124                           XCHX,2   XAD,2                                 
053829,000197: 11,3202           00050                                    S1                                    
053830,000198: 11,3203           00051                                    S2                                    
053831,000199: 11,3204           55064                           XSU,2    XSU,2                                 
053832,000200: 11,3205           00036                                    30D                                   
053833,000201: 11,3206           00037                                    31D                                   
053834,000202: 11,3207           77600                           BOV                                            #  CLEAR OVIND
053835,000203: 11,3210           23211                                    +1                                    
053836,000204: 11,3211           65057                           VSR*     XCHX,2                                
053837,000205: 11,3212           57177                                    0          -1,2                       
053838,000206: 11,3213           00050                                    S1                                    
053839,000207: 11,3214           77655                           VAD                                            
053840,000208: 11,3215           02104                                    FV                                    
053841,000209: 11,3216           02104                           STORE    FV                                    
053842,000210: 11,3217           43400                           BOV      RVQ                                   #  RETURN IF NO OVERFLOW
053843,000211: 11,3220           23221                                    +1                                    
053844,000212: 11,3221           51575        GOBAQUE            VLOAD    ABVAL                                 
053845,000213: 11,3222           01521                                    TDELTAV                               
053846,000214: 11,3223           77654                           BZE                                            
053847,000215: 11,3224           23243                                    INT-ABRT                              
053848,000216: 11,3225           54345                           DLOAD    SR                                    
053849,000217: 11,3226           02114                                    H                                     
053850,000218: 11,3227           20612                                    9D                                    
053851,000219: 11,3230           44206                           PUSH     BDSU                                  
053852,000220: 11,3231           01551                                    TC                                    
053853,000221: 11,3232           16171                           STODL    TAU.                                  
053854,000222: 11,3233           01517                                    TET                                   
053855,000223: 11,3234           45425                           DSU      STADR                                 
053856,000224: 11,3235           42260                           STCALL   TET                                   
053857,000225: 11,3236           22731                                    KEPPREP                               
053858,000226: 11,3237           77624                           CALL                                           
053859,000227: 11,3240           23437                                    RECTIFY                               
053860,000228: 11,3241           77650                           GOTO                                           
053861,000229: 11,3242           11577                                    TESTLOOP                              
053862,000230: 
053863,000231: 11,3243           77776        INT-ABRT           EXIT                                           
053864,000232: 11,3244           05701                           TC       POODOO                                
053865,000233: 11,3245           20430                           OCT      20430                                 #  SUB-SURFACE STATE VECTOR
053866,000234: 
053867,000235: 
053868,000236:                                                                                                  #  THE OBLATE ROUTINE COMPUTES THE ACCELERATION DUE TO OBLATENESS. IT USES THE UNIT OF THE VEHICLE
053869,000237:                                                                                                  #  POSITION VECTOR FOUND IN ALPHAV AND THE DISTANCE TO THE CENTER IN ALPHAM. THIS IS ADDED TO THE SUM OF THE
053870,000238:                                                                                                  #  DISTURBING ACCELERATIONS IN FV AND THE PROPER DIFEQ STAGE IS CALLED VIA X1.
053871,000239: 
053872,000240: 11,3246           77201        OBLATE             SETPD    VLOAD                                 
053873,000241: 11,3247           00001                                    0                                     
053874,000242: 11,3250           02031                                    UNITW                                 
053875,000243: 11,3251           77641                           DOT                                            
053876,000244: 11,3252           02054                                    ALPHAV                                
053877,000245: 11,3253           00023                           STORE    COSPHI/2                              
053878,000246: 11,3254           65275                           DMPR     PDDL                                  #  P     B-6      ,  3COSPHI/64           AT 00D
053879,000247: 11,3255           23736                                    3/32                                  #   2
053880,000248: 11,3256           00023                                    COSPHI/2                              
053881,000249: 11,3257           57316                           DSQ      DMPR                                  
053882,000250: 11,3260           23740                                    15/16                                 #   '                            2
053883,000251: 11,3261           41425                           DSU      PUSH                                  #  P     B-5      ,(1/2)(15COSPHI -3)     AT 02D
053884,000252: 11,3262           23734                                    3/64                                  #   3
053885,000253: 11,3263           41275                           DMPR     DMP                                   
053886,000254: 11,3264           00023                                    COSPHI/2                              
053887,000255: 11,3265           23744                                    7/12                                  
053888,000256: 11,3266           65372                           SL1R     PDDL                                  
053889,000257: 11,3267           00001                                    0D                                    
053890,000258: 11,3270           44275                           DMPR     BDSU                                  
053891,000259: 11,3271           23752                                    2/3                                   #   '                             '    '
053892,000260: 11,3272           57206                           PUSH     DMPR                                  #  P     B-7      ,(1/3)(7COSPHI P  -4P ) AT 04D
053893,000261: 11,3273           00023                                    COSPHI/2                              #   4                             3    2
053894,000262: 11,3274           65275                           DMPR     PDDL                                  
053895,000263: 11,3275           23746                                    9/16                                  
053896,000264: 11,3276           00003                                    2D                                    #   '                             '    '
053897,000265: 11,3277           44275                           DMPR     BDSU                                  #  P     B-10     ,(1/4)(9COSPHI P  -5P )
053898,000266: 11,3300           23750                                    5/128                                 #   5                             4    3
053899,000267: 11,3301           56205                           DMP      DDV                                   #                             '
053900,000268: 11,3302           23756                                    J4REQ/J3                              #        B-       ,(J RP/J R)P
053901,000269: 11,3303           02167                                    ALPHAM                                #                    4    3   5
053902,000270: 11,3304           57215                           DAD      DMPR                                  
053903,000271: 11,3305           00005                                    4D                                    #                        2     2  '              '
053904,000272: 11,3306           23760                                    2J3RE/J2                              #        B        ,(2J RP /J2 R )P  +(2J RP/J2R)P
053905,000273: 11,3307           43271                           DDV      DAD                                   #                     4           5     3        4
053906,000274: 11,3310           02167                                    ALPHAM                                #   -        2 '  2         '        '
053907,000275: 11,3311           00003                                    2D                                    #  (R/R)(J RP P /R + 2J RP P /  + J P )
053908,000276: 11,3312           77761                           VXSC                                           #         4    5       3    4  2   2 3
053909,000277: 11,3313           02054                                    ALPHAV                                #                    4       2  '           -
053910,000278: 11,3314           14033                           STODL    TVEC                                  #        B-6     , (SUM((J /R )P   (COSPHI))UR)
053911,000279: 11,3315           70405                           DMP      SR1                                   #                   I=2   I     I+1
053912,000280: 11,3316           23756                                    J4REQ/J3                              #                           '
053913,000281: 11,3317           43271                           DDV      DAD                                   #                (J RP/J R)P
053914,000282: 11,3320           02167                                    ALPHAM                                #                  4    3   4
053915,000283: 11,3321           50475                           DMPR     SR3                                   #              2    2  '              '
053916,000284: 11,3322           23760                                    2J3RE/J2                              #        (2J RP /J R )P  +(2J RP/J R)P
053917,000285: 11,3323           43271                           DDV      DAD                                   #           4     2    4     3    2   3
053918,000286: 11,3324           02167                                    ALPHAM                                #  
053919,000287: 11,3325           51361                           VXSC     BVSU                                  #                 4   '        -
053920,000288: 11,3326           02031                                    UNITW                                 #        B-6     SUM(P(COSPHI))UZ
053921,000289:                                                                                                  #                I=2  I
053922,000290: 11,3327           00033                                    TVEC                                  #   4              I-2   '          -
053923,000291: 11,3330           14033                           STODL    TVEC                                  #  SUM((MU J (RP/R)   )(P   (COSPHI)UR -
053924,000292: 11,3331           02167                                    ALPHAM                                #  I=2      I            I+2
053925,000293: 11,3332           63501                           NORM     DSQ                                   #              P (COSPHI)UZ))    B-6     AT 20D
053926,000294: 11,3333           00047                                    X1                                    #               I
053927,000295: 11,3334           60316                           DSQ      NORM                                  
053928,000296: 11,3335           00051                                    S1                                    #              4
053929,000297: 11,3336           55206                           PUSH     BDDV                                  #  NORMALIZED R                          AT 00D
053930,000298: 11,3337           23762                                    J2REQSQ                               
053931,000299: 11,3340           40161                           VXSC     BOV                                   
053932,000300: 11,3341           00033                                    TVEC                                  
053933,000301: 11,3342           23343                                    +1                                    #  B+38 FOR EARTH, B+42 FOR MOON
053934,000302: 11,3343           56070                           XAD,1    XAD,1                                 
053935,000303: 11,3344           00046                                    X1                                    
053936,000304: 11,3345           00046                                    X1                                    
053937,000305: 11,3346           53670                           XAD,1    VSL*                                  
053938,000306: 11,3347           00050                                    S1                                    
053939,000307: 11,3350           20153                                    0          -22D,1                     
053940,000308: 11,3351           40055                           VAD      BOV                                   
053941,000309: 11,3352           02104                                    FV                                    
053942,000310: 11,3353           23221                                    GOBAQUE                               
053943,000311: 11,3354           02104                           STORE    FV                                    #  B+16 FOR EARTH
053944,000312: 11,3355           72135        NBRANCH            SLOAD    LXA,1                                 
053945,000313: 11,3356           01501                                    DIFEQCNT                              
053946,000314: 11,3357           00154                                    MPAC                                  
053947,000315: 11,3360           73205                           DMP      CGOTO                                 
053948,000316: 11,3361           23764                                    -1/12                                 
053949,000317: 11,3362           00155                                    MPAC                                  
053950,000318: 11,3363           23364                                    DIFEQTAB                              
053951,000319: 
053952,000320: 11,3364           23463        DIFEQTAB           CADR     DIFEQ+0                               
053953,000321: 11,3365           23467                           CADR     DIFEQ+1                               
053954,000322: 11,3366           23500                           CADR     DIFEQ+2                               
053955,000323: 
053956,000324: 11,3367           51575        TIMESTEP           VLOAD    ABVAL                                 #  RECTIFY IF
053957,000325: 11,3370           01521                                    TDELTAV                               
053958,000326: 11,3371           77600                           BOV                                            
053959,000327: 11,3372           23414                                    CALLRECT                              
053960,000328: 11,3373           51025                           DSU      BPL                                   #        1) EITHER TDELTAV OR TNUV EQUALS OR
053961,000329: 11,3374           23742                                    3/4                                   #           EXCEEDS 3/4 IN MAGNITUDE
053962,000330: 11,3375           23414                                    CALLRECT                              
053963,000331: 11,3376           54215                           DAD      SR                                    #                        OR
053964,000332: 11,3377           23742                                    3/4                                   
053965,000333: 11,3400           20610                                    7                                     #        2) ABVAL(TDELTAV) EQUALS OR EXCEEDS
053966,000334: 11,3401           45271                           DDV      DSU                                   #           .01(ABVAL(RCV))
053967,000335: 11,3402           00013                                    10D                                   
053968,000336: 11,3403           23766                                    RECRATIO                              
053969,000337: 11,3404           77244                           BPL      VLOAD                                 
053970,000338: 11,3405           23414                                    CALLRECT                              
053971,000339: 11,3406           01527                                    TNUV                                  
053972,000340: 11,3407           45246                           ABVAL    DSU                                   
053973,000341: 11,3410           23742                                    3/4                                   
053974,000342: 11,3411           50000                           BOV      BMN                                   
053975,000343: 11,3412           23414                                    CALLRECT                              
053976,000344: 11,3413           23416                                    INTGRATE                              
053977,000345: 11,3414           77624        CALLRECT           CALL                                           
053978,000346: 11,3415           23437                                    RECTIFY                               
053979,000347: 11,3416           77214        INTGRATE           CLEAR    VLOAD                                 
053980,000348: 11,3417           00261                                    JSWITCH                               
053981,000349: 11,3420           01527                                    TNUV                                  
053982,000350: 11,3421           24756                           STOVL    ZV                                    
053983,000351: 11,3422           01521                                    TDELTAV                               
053984,000352: 11,3423           00750                           STORE    YV                                    
053985,000353: 11,3424           66375        DIFEQ0             VLOAD    SSP                                   
053986,000354: 11,3425           00750                                    YV                                    
053987,000355: 11,3426           01501                                    DIFEQCNT                              
053988,000356: 11,3427           00000                                    0                                     
053989,000357: 11,3430           16054                           STODL    ALPHAV                                
053990,000358: 11,3431           15726                                    DPZERO                                
053991,000359: 11,3432           02114                           STORE    H                                     #  START H AT ZERO. GOES 0(DELT/2)DELT.
053992,000360: 11,3433           52014                           BON      GOTO                                  
053993,000361: 11,3434           00301                                    JSWITCH                               
053994,000362: 11,3435           23673                                    DOW..                                 
053995,000363: 11,3436           23041                                    ACCOMP                                
053996,000364: 
053997,000365:                                                                                                  #  THE RECTIFY SUBROUTINE IS CALLED BY THE INTEGRATION PROGRAM AND OCCASIONALLY BY THE MEASUREMENT INCORPORATION
053998,000366:                                                                                                  #  ROUTINES TO ESTABLISH A NEW CONIC.
053999,000367: 
054000,000368: 11,3437           54375        RECTIFY            VLOAD    VSR                                   
054001,000369: 11,3440           01521                                    TDELTAV                               
054002,000370: 11,3441           20610                                    7                                     
054003,000371: 11,3442           77655                           VAD                                            
054004,000372: 11,3443           01535                                    RCV                                   
054005,000373: 11,3444           01503                           STORE    RRECT                                 
054006,000374: 11,3445           25535                           STOVL    RCV                                   
054007,000375: 11,3446           01527                                    TNUV                                  
054008,000376: 11,3447           53261                           VSR      VAD                                   
054009,000377: 11,3450           20605                                    4                                     
054010,000378: 11,3451           01543                                    VCV                                   
054011,000379: 11,3452           01511        MINIRECT           STORE    VRECT                                 
054012,000380: 11,3453           25543        TINIRECT           STOVL    VCV                                   
054013,000381: 11,3454           15726                                    ZEROVEC                               
054014,000382: 11,3455           01521                           STORE    TDELTAV                               
054015,000383: 11,3456           15527                           STODL    TNUV                                  
054016,000384: 11,3457           15726                                    ZEROVEC                               
054017,000385: 11,3460           01551                           STORE    TC                                    
054018,000386: 11,3461           01553                           STORE    XKEP                                  
054019,000387: 11,3462           77616                           RVQ                                            
054020,000388: 
054021,000389: 
054022,000390:                                                                                                  #  THE THREE DIFEQ ROUTINES - DIFEQ+0, DIFEQ+12, AND DIFEQ+24 - ARE ENTEREDTO PROCESS THE CONTRIBUTIONS AT THE
054023,000391:                                                                                                  #  BEGINNING, MIDDLE, AND END OF THE TIMESTEP, RESPECTIVELY. THE UPDATING IS DONE BY THE NYSTROM METHOD.
054024,000392: 
054025,000393: 11,3463           64575        DIFEQ+0            VLOAD    VSR3                                  
054026,000394: 11,3464           02104                                    FV                                    
054027,000395: 11,3465           36070                           STCALL   PHIV                                  
054028,000396: 11,3466           23636                                    DIFEQCOM                              
054029,000397: 11,3467           74575        DIFEQ+1            VLOAD    VSR1                                  
054030,000398: 11,3470           02104                                    FV                                    
054031,000399: 11,3471           53206                           PUSH     VAD                                   
054032,000400: 11,3472           02070                                    PHIV                                  
054033,000401: 11,3473           26076                           STOVL    PSIV                                  
054034,000402: 11,3474           53362                           VSR1     VAD                                   
054035,000403: 11,3475           02070                                    PHIV                                  
054036,000404: 11,3476           36070                           STCALL   PHIV                                  
054037,000405: 11,3477           23636                                    DIFEQCOM                              
054038,000406: 11,3500           57345        DIFEQ+2            DLOAD    DMPR                                  
054039,000407: 11,3501           02114                                    H                                     
054040,000408: 11,3502           23752                                    DP2/3                                 
054041,000409: 11,3503           74206                           PUSH     VXSC                                  
054042,000410: 11,3504           02070                                    PHIV                                  
054043,000411: 11,3505           53372                           VSL1     VAD                                   
054044,000412: 11,3506           00756                                    ZV                                    
054045,000413: 11,3507           53361                           VXSC     VAD                                   
054046,000414: 11,3510           02114                                    H                                     
054047,000415: 11,3511           00750                                    YV                                    
054048,000416: 11,3512           24750                           STOVL    YV                                    
054049,000417: 11,3513           02104                                    FV                                    
054050,000418: 11,3514           53322                           VSR3     VAD                                   
054051,000419: 11,3515           02076                                    PSIV                                  
054052,000420: 11,3516           76561                           VXSC     VSL1                                  
054053,000421: 11,3517           77655                           VAD                                            
054054,000422: 11,3520           00756                                    ZV                                    
054055,000423: 11,3521           00756                           STORE    ZV                                    
054056,000424: 11,3522           45014                           BOFF     CALL                                  
054057,000425: 11,3523           00341                                    JSWITCH                               
054058,000426: 11,3524           23574                                    ENDSTATE                              
054059,000427: 11,3525           57046                                    GRP2PC                                
054060,000428: 11,3526           77354                           LXA,2    VLOAD                                 
054061,000429: 11,3527           00763                                    COLREG                                
054062,000430: 11,3530           00756                                    ZV                                    
054063,000431: 11,3531           77732                           VSL3                                           #  ADJUST W-POSITION FOR STORAGE
054064,000432: 11,3532           12467                           STORE    W          +54D,2                     
054065,000433: 11,3533           77775                           VLOAD                                          
054066,000434: 11,3534           00750                                    YV                                    
054067,000435: 11,3535           40132                           VSL3     BOV                                   
054068,000436: 11,3536           23661                                    WMATEND                               
054069,000437: 11,3537           12401                           STORE    W,2                                   
054070,000438: 
054071,000439: 11,3540           77624                           CALL                                           
054072,000440: 11,3541           57046                                    GRP2PC                                
054073,000441: 11,3542           66354                           LXA,2    SSP                                   
054074,000442: 11,3543           00763                                    COLREG                                
054075,000443: 11,3544           00052                                    S2                                    
054076,000444: 11,3545           00000                                    0                                     
054077,000445: 11,3546           67114                           INCR,2   SXA,2                                 
054078,000446: 11,3547           00006                                    6                                     
054079,000447: 11,3550           00747                                    YV                                    
054080,000448: 11,3551           45104                           TIX,2    CALL                                  
054081,000449: 11,3552           23632                                    RELOADSV                              
054082,000450: 11,3553           57046                                    GRP2PC                                
054083,000451: 11,3554           67154                           LXA,2    SXA,2                                 
054084,000452: 11,3555           00747                                    YV                                    
054085,000453: 11,3556           00763                                    COLREG                                
054086,000454: 
054087,000455: 11,3557           77624        NEXTCOL            CALL                                           
054088,000456: 11,3560           57046                                    GRP2PC                                
054089,000457: 11,3561           76754                           LXA,2    VLOAD*                                
054090,000458: 11,3562           00763                                    COLREG                                
054091,000459: 11,3563           75376                                    W,2                                   
054092,000460: 11,3564           77722                           VSR3                                           #  ADJUST W-POSITION FOR INTEGRATION
054093,000461: 11,3565           00750                           STORE    YV                                    
054094,000462: 11,3566           76173                           VLOAD*   AXT,1                                 
054095,000463: 11,3567           75310                                    W          +54D,2                     
054096,000464: 11,3570           00000                                    0                                     
054097,000465: 11,3571           77722                           VSR3                                           #  ADJUST W-VELOCITY FOR INTEGRATION
054098,000466: 11,3572           34756                           STCALL   ZV                                    
054099,000467: 11,3573           23424                                    DIFEQ0                                
054100,000468: 
054101,000469: 11,3574           77200        ENDSTATE           BOV      VLOAD                                 
054102,000470: 11,3575           23221                                    GOBAQUE                               
054103,000471: 11,3576           00756                                    ZV                                    
054104,000472: 11,3577           25527                           STOVL    TNUV                                  
054105,000473: 11,3600           00750                                    YV                                    
054106,000474: 11,3601           01521                           STORE    TDELTAV                               
054107,000475: 11,3602           43014                           BON      BOFF                                  
054108,000476: 11,3603           04715                                    MIDAVFLG                              
054109,000477: 11,3604           27614                                    CKMID2                                #  CHECK FOR MID2 BEFORE GOING TO TIMEINC
054110,000478: 11,3605           01756                                    DIM0FLAG                              
054111,000479: 11,3606           11577                                    TESTLOOP                              
054112,000480: 11,3607           77776                           EXIT                                           
054113,000481: 11,3610           05415                           TC       PHASCHNG                              
054114,000482: 11,3611           04022                           OCT      04022                                 #  PHASE 1
054115,000483: 11,3612           07710                           TC       UPFLAG                                #  PHASE CHANGE HAS OCCURRED BETWEEN
054116,000484: 11,3613           00230                           ADRES    REINTFLG                              #  INTSTALL AND INTWAKE
054117,000485: 11,3614           06006                           TC       INTPRET                               
054118,000486: 11,3615           77731                           SSP                                            
054119,000487: 11,3616           00053                                    QPRET                                 
054120,000488: 11,3617           23624                                    AMOVED                                
054121,000489: 11,3620           52014                           BON      GOTO                                  
054122,000490: 11,3621           01714                                    VINTFLAG                              
054123,000491: 11,3622           11305                                    ATOPCSM                               
054124,000492: 11,3623           11340                                    ATOPLEM                               
054125,000493: 11,3624           66214        AMOVED             SET      SSP                                   
054126,000494: 11,3625           00061                                    JSWITCH                               
054127,000495: 11,3626           00764                                    COLREG                                
054128,000496: 11,3627           77741                           DEC      -30        B-14                       
054129,000497: 11,3630           77650                           GOTO                                           
054130,000498: 11,3631           23557                                    NEXTCOL                               
054131,000499: 
054132,000500: 
054133,000501: 11,3632           77745        RELOADSV           DLOAD                                          #  RELOAD TEMPORARY STATE VECTOR
054134,000502: 11,3633           00740                                    TDEC                                  #  FROM PERMANENT IN CASE OF
054135,000503: 11,3634           34041                           STCALL   TDEC1                                 
054136,000504: 11,3635           11464                                    INTEGRV2                              #  BY STARTING AT INTEGRV2.
054137,000505: 11,3636           43345        DIFEQCOM           DLOAD    DAD                                   #  INCREMENT H AND DIFEQCNT.
054138,000506: 11,3637           02173                                    DT/2                                  
054139,000507: 11,3640           02114                                    H                                     
054140,000508: 11,3641           66110                           INCR,1   SXA,1                                 
054141,000509: 11,3642           77763                           DEC      -12        B-14                       
054142,000510: 11,3643           01500                                    DIFEQCNT                              #  DIFEQCNT SET FOR NEXT ENTRY.
054143,000511: 11,3644           02114                           STORE    H                                     
054144,000512: 11,3645           74561                           VXSC     VSR1                                  
054145,000513: 11,3646           02104                                    FV                                    
054146,000514: 11,3647           74255                           VAD      VXSC                                  
054147,000515: 11,3650           00756                                    ZV                                    
054148,000516: 11,3651           02114                                    H                                     
054149,000517: 11,3652           77655                           VAD                                            
054150,000518: 11,3653           00750                                    YV                                    
054151,000519: 11,3654           02054                           STORE    ALPHAV                                
054152,000520: 11,3655           52014                           BON      GOTO                                  
054153,000521: 11,3656           00301                                    JSWITCH                               
054154,000522: 11,3657           23673                                    DOW..                                 
054155,000523: 11,3660           23021                                    FBR3                                  
054156,000524: 
054157,000525: 11,3661           43014        WMATEND            CLEAR    CLEAR                                 
054158,000526: 11,3662           01676                                    DIM0FLAG                              #  DONT INTEGRATE W THIS TIME
054159,000527: 11,3663           02676                                    RENDWFLG                              
054160,000528: 11,3664           77414                           SET      EXIT                                  
054161,000529: 11,3665           01472                                    STATEFLG                              #  PICK UP STATE VECTOR UPDATE
054162,000530: 11,3666           05644                           TC       ALARM                                 
054163,000531: 11,3667           00421                           OCT      421                                   
054164,000532: 11,3670           06006                           TC       INTPRET                               
054165,000533: 11,3671           77650                           GOTO                                           
054166,000534: 11,3672           11577                                    TESTLOOP                              #  FINISH INTEGRATING STATE VECTOR
054167,000535: 
054168,000536: 
054169,000537:                                                                                                  #  ORBITAL ROUTINE FOR EXTRAPOLATION OF THE W MATRIX. IT COMPUTES THE SECOND DERIVATIVE OF EACH COLUMN POSITION
054170,000538:                                                                                                  #  VECTOR OF THE MATRIX AND CALLS THE NYSTROM INTEGRATION ROUTINES TO SOLVE THE DIFFERENTIAL EQUATIONS. THE PROGRAM
054171,000539:                                                                                                  #  USES A TABLE OF VEHICLE POSITION VECTORS COMPUTED DURING THE INTEGRATION OF THE VEHICLES POSITION AND VELOCITY.
054172,000540: 
054173,000541: 11,3673           60575        DOW..              VLOAD    VSR4                                  
054174,000542: 11,3674           02054                                    ALPHAV                                
054175,000543: 11,3675           53513                           PDVL*    UNIT                                  
054176,000544: 11,3676           02120                                    VECTAB,1                              
054177,000545: 11,3677           46315                           PDVL     VPROJ                                 
054178,000546: 11,3700           02054                                    ALPHAV                                
054179,000547: 11,3701           52361                           VXSC     VSU                                   
054180,000548: 11,3702           23742                                    3/4                                   
054181,000549: 11,3703           60325                           PDDL     NORM                                  
054182,000550: 11,3704           00045                                    36D                                   
054183,000551: 11,3705           00052                                    S2                                    
054184,000552: 11,3706           63406                           PUSH     DSQ                                   
054185,000553: 11,3707           77605                           DMP                                            
054186,000554: 11,3710           65301                           NORM     PDDL                                  
054187,000555: 11,3711           00043                                    34D                                   
054188,000556: 11,3712           22722                                    MUEARTH                               
054189,000557: 11,3713           56342                           SR1      DDV                                   
054190,000558: 11,3714           77761                           VXSC                                           
054191,000559: 11,3715           57154                           LXA,2    XAD,2                                 
054192,000560: 11,3716           00051                                    S2                                    
054193,000561: 11,3717           00051                                    S2                                    
054194,000562: 11,3720           57074                           XAD,2    XAD,2                                 
054195,000563: 11,3721           00051                                    S2                                    
054196,000564: 11,3722           00042                                    34D                                   
054197,000565: 11,3723           77657                           VSL*                                           
054198,000566: 11,3724           57606                                    0          -8D,2                      
054199,000567: 11,3725           36104                           STCALL   FV                                    
054200,000568: 11,3726           23355                                    NBRANCH                               
054201,000569: 
054202,000570: 11,2000                                           SETLOC   ORBITAL1                              
054203,000571: 11,2000                                           BANK                                           
054204,000572: 
054205,000573: 11,3727                                           COUNT*   $$/ORBIT                              
054206,000574: 11,3727           14000 00000  THREE/8            2DEC     .375                                  
054207,000575: 
054208,000576: 11,3731           02314 31463  .3D                2DEC     .3         B-2                        
054209,000577: 
054210,000578: 11,3733           01400 00000  3/64               2DEC     3          B-6                        
054211,000579: 
054212,000580: 11,3735  15,3411               DP1/4              =        D1/4                                  #  1 B-2
054213,000581: 11,3735  15,3411               DQUARTER           EQUALS   DP1/4                                 
054214,000582: 11,3735           03000 00000  3/32               2DEC     3          B-5                        
054215,000583: 
054216,000584: 11,3737           36000 00000  15/16              2DEC     15.        B-4                        
054217,000585: 
054218,000586: 11,3741           30000 00000  3/4                2DEC     3.0        B-2                        
054219,000587: 
054220,000588: 11,3743           22525 12525  7/12               2DEC     .5833333333                            
054221,000589: 
054222,000590: 11,3745           22000 00000  9/16               2DEC     9          B-4                        
054223,000591: 
054224,000592: 11,3747           01200 00000  5/128              2DEC     5          B-7                        
054225,000593: 
054226,000594: 11,3751  06,3725               DPZERO             EQUALS   ZEROVEC                               
054227,000595: 11,3751           25252 25253  DP2/3              2DEC     .6666666667                            
054228,000596: 
054229,000597: 11,3753  11,3751               2/3                EQUALS   DP2/3                                 
054230,000598:                                                                                                  #  LM504 IS TEMPORARY
054231,000599: 11,2000                                           SETLOC   ORBITAL1                              
054232,000600: 11,2000                                           BANK                                           
054233,000601: 11,3753                                           COUNT*   $$/ORBIT                              
054234,000602:                                                                                                  #  IT IS VITAL THAT THE FOLLOWING CONSTANTS NOT BE SHUFFLED
054235,000603: 11,3753           77770        ASCALE             DEC      -7         B-14                       
054236,000604: 11,3754           77771                           DEC      -6         B-14                       
054237,000605: 
054238,000606: 11,3755  11,2721               MUEARTH            =        MUTABLE                               
054239,000607: 
054240,000608: 11,3755           02302 24736  J4REQ/J3           2DEC*    .4991607391 E7         B-26*           
054241,000609: 
054242,000610: 11,3757           77776 53032  2J3RE/J2           2DEC*    -.1355426363 E5         B-27*           
054243,000611: 
054244,000612: 11,3761           13710 35320  J2REQSQ            2DEC*    1.75501139 E21        B-72*           
054245,000613: 
054246,000614: 11,3763           74631 63145  -1/12              2DEC     -.1                                   
054247,000615: 
054248,000616: 11,3765           00243 32703  RECRATIO           2DEC     .01                                   
054249,000617: 
054250,000618: 11,3767                        RATT               EQUALS   00                                    
054251,000619: 11,3767                        VATT               EQUALS   6D                                    
054252,000620: 11,3767                        TAT                EQUALS   12D                                   
054253,000621: 11,3767                        RATT1              EQUALS   14D                                   
054254,000622: 11,3767                        VATT1              EQUALS   20D                                   
054255,000623: 11,3767                        MU(P)              EQUALS   26D                                   
054256,000624: 11,3767                        TDEC1              EQUALS   32D                                   
054257,000625: 11,3767                        URPV               EQUALS   14D                                   
054258,000626: 11,3767     0022               COSPHI/2           EQUALS   URPV       +4                         
054259,000627: 11,3767                        UZ                 EQUALS   20D                                   
054260,000628: 11,3767                        TVEC               EQUALS   26D                                   

End of include-file ORBITAL_INTEGRATION.agc.  Parent file is MAIN.agc