Source Code

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

Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: NEW PROGRAM SHEPATIN BY EYLES
	DEC 13, 1966

	THIS PROGRAM WAS ASSEMBLED AS A VERSION OF REVISION 37 
        OF PROGRAM SUNBURST BY LEM GROUP
Note that the date is the date of the printout, not the date of the program revision.

036134,000002:                                                                                                  ## Copyright:   Public domain.
036135,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
036136,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
036137,000005:                                                                                                  ##              It is part of an early development version of the software
036138,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
036139,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
036140,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
036141,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
036142,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
036143,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
036144,000012:                                                                                                  ##              that the code format has been changed to conform to the
036145,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
036146,000014:                                                                                                  ##              original YUL assembler.
036147,000015:                                                                                                  ## Reference:   pp. 802-811
036148,000016:                                                                                                  ## Assembler:   yaYUL
036149,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
036150,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
036151,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
036152,000020:                                                                                                  ##              2017-06-14 HG   Transcribed
036153,000021:                                                                                                  ##              2017-06-15 HG   Fix operand CA  -> CS
036154,000022:                                                                                                  ##              2017-06-23 RSB  Proofed comment text with
036155,000023:                                                                                                  ##                              octopus/ProoferComments.
036156,000024: 

Page 802

036158,000026: 12,3220                                           BANK     12                                    
036159,000027: 12,3220  E3,1444                                  EBANK=   NBDX                                  
036160,000028: 
036161,000029:                                                                                                  #  PROGRAM DESCRIPTION- IMU COMPENSATION (LEM)                             DATE- 30 AUG 66
036162,000030:                                                                                                  #  MOD NO- 0                                                               LOG SECTION- IMU COMPENSATION PACKAGE
036163,000031:                                                                                                  #  MOD BY- GILBERT                                                         ASSEMBLY- SUNBURST REVISION 13
036164,000032: 
036165,000033:                                                                                                  #  FUNCTIONAL DESCRIPTION
036166,000034:                                                                                                  #        THE IMU COMPENSATION PACKAGE IS DESIGNED TO COMPENSATE FOR PIPA BIAS AND SCALE FACTOR ERROR AND AT THE
036167,000035:                                                                                                  #  SAME TIME ACCUMULATE GYRO TORQUING COMMANDS NECESSARY TO COMPENSATE FOR THE ASSOCIATED BIAS AND ACCELERATION-
036168,000036:                                                                                                  #  CAUSED GYRO DRIFTS. 1/PIPA MUST BE CALLED AT LEAST EVERY 2.55 SECONDS DUE TO SCALING CONSIDERATIONS.
036169,000037:                                                                                                  #  SPECIFICALLY, THE CORRECTION IS
036170,000038: 
036171,000039:                                                                                                  #        PIPA  = (1 + SCALE FACTOR ERROR)PIPA  - (BIAS)(DELTAT)
036172,000040: 
036173,000041:                                                                                                  #            C                               I
036174,000042: 
036175,000043:                                                                                                  #  WHERE PIPA  IS THE COMPENSATED DATA OBTAINED FROM THE SAMPLED DATA PIPA
036176,000044:                                                                                                  #            C                                                            I
036177,000045: 
036178,000046:                                                                                                  #  THE COMPENSATED DATA IS THEN USED TO COMPUTE THE IRIG TORQUING NECESSARY TO CANCEL THE NBD, ADIA, AND ADSRA
036179,000047:                                                                                                  #  GYRO COEFFICIENTS.
036180,000048:                                                                                                  #  SPECIFICALLY, THE COMPUTATIONS ARE
036181,000049: 
036182,000050:                                                                                                  #        XIRIG     -(ADIAX)(PIPAX ) + (ADSRAX)(PIPAY ) - (NBDX)(DELTAT)
036183,000051: 
036184,000052:                                                                                                  #                                C                  C
036185,000053:                                                                                                  #        YIRIG     -(ADIAY)(PIPAY ) + (ADSRAY)(PIPAZ ) - (NBDY)(DELTAT)
036186,000054:                                                                                                  #                                C                  C
036187,000055:                                                                                                  #        ZIRIG     -(ADIAZ)(PIPAZ ) - (ADSRAZ)(PIPAY ) + (NBDZ)(DELTAT)
036188,000056:                                                                                                  #                                C                  C
036189,000057: 
036190,000058:                                                                                                  #  THIS COMPENSATION IS SUMMED INTO THE GCOMP REGISTERS AND WHEN THE MAGNITUDE OF ANY IRIG COMMAND EXCEEDS 2
036191,000059:                                                                                                  #  PULSES, THE COMMANDS ARE SENT TO THE GYROS.
036192,000060: 
036193,000061:                                                                                                  #  DURING FREE-FALL PHASES OF A FLIGHT NBDX, NBDY, AND NBDZ ARE THE ONLY RELEVANT COEFFICIENTS. THESE BIAS TERMS
036194,000062:                                                                                                  #  WILL BE INTEGRATED BY ROUTINE NBDONLY APPROXIMATELY EVERY 81.93 SECONDS FOLLOWING AN EXECUTIVE CALL BY THE DUMMY
036195,000063:                                                                                                  #  TASK OF THE WAITLIST PROGRAM. NBDONLY IS ENABLED WHEN BIT 15 OF FLAGWRD2 IS SET TO INDICATE FREE-FALL. DURING
036196,000064: 
036197,000065:                                                                                                  #  THIS TIME 1/PIPA IS NOT CALLED.
036198,000066: 
036199,000067:                                                                                                  #  LASTBIAS IS CALLED VIA EXECUTIVE WHEN MAKING THE TRANSITION FROM FREE-FALL TO A PIPA READING MODE. THE NBD TERMS
036200,000068:                                                                                                  #  ARE COMPENSATED FOR FROM THE LAST NBDONLY CALL UP TO PIPA ZEROING. PREREAD WILL THEN ENABLE 1/PIPA AT ITS
036201,000069:                                                                                                  #  REGULAR INTERVAL. THE DRIFT FLAG MUST BE DOWN JUST PRIOR TO LASTBIAS. GYROCOMPASS NEVER CALLS LASTBIAS.
036202,000070: 
036203,000071:                                                                                                  #  SCALING CONSIDERATIONS
036204,000072:                                                                                                  #                             UNITS              MAX. VALUE     INTERNAL UNITS AND SCALING
036205,000073: 
036206,000074:                                                                                                  #         PIPA BIAS           (CM)/(SEC)(SEC)    3.125          (PIPA PULSES)/(CS) X 2(-5)
036207,000075: 
036208,000076:                                                                                                  #         PIPA SCALE FACTOR   P.P.M.             1953.125       (PPM) X 2(-9)
036209,000077:                                                                                                  #         NBD                 MERU               128.74604      (GYRO PULSES)/(CS) X 2(-5)
036210,000078:                                                                                                  #         ADIA                (MERU)/(G)         630.36633      (GYRO PULSES)/(PIPA PULSE) X 2(-6)
036211,000079:                                                                                                  #         ADSRA               (MERU)/(G)         630.36633      (GYRO PULSES)/(PIPA PULSE) X 2(-6)
036212,000080: 

Page 803

036214,000082:                                                                                                  #  CONVERSION TABLE
036215,000083:                                                                                                  #        1 PIPA PULSE = 1.00 (CM)/(SEC)               1 ERU = 7.29209817 X 10(-5) (RAD)/(SEC)
036216,000084:                                                                                                  #        1 ERU = 15.04104488 (ARCSEC)/(SEC)           1 (CM)/(SEC)(SEC) = .01 (PIPA PULSES)/(CS)
036217,000085:                                                                                                  #        1 GYRO PULSE = .61798096 ARCSEC              1 MERU = .00024272592 (GYRO PULSES)/(CS)
036218,000086:                                                                                                  #        1 G = 979.24 (CM)/(SEC)(SEC)  (AMR)          1 (MERU)/(G) = .000024787174 (GYRO PULSES)/(PIPA PULSE)
036219,000087: 
036220,000088:                                                                                                  #  REFERENCES
036221,000089:                                                                                                  #        AGC PROGRAMMING MEMO NO. 12, I.S.S. MEMO NO. 247, I.S.S. MEMO NO. 328, I.S.S. MEMO NO. 339
036222,000090: 
036223,000091:                                                                                                  #  CALLING SEQUENCE
036224,000092:                                                                                                  #        L      TC     BANKCALL
036225,000093:                                                                                                  #        L+1    CADR   1/PIPA
036226,000094:                                                                                                  #        L+2                       RETURNS HERE
036227,000095: 
036228,000096:                                                                                                  #  NORMAL EXIT MODES
036229,000097:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
036230,000098: 
036231,000099:                                                                                                  #  ALARM OR ABORT MODES
036232,000100:                                                                                                  #        ENDOFJOB
036233,000101: 
036234,000102: 
036235,000103:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED (CONSECUTIVE LOCATIONS)
036236,000104:                                                                                                  #        PBIASX    PIPAX BIAS
036237,000105:                                                                                                  #        PIPASCFX  PIPAX SCALE FACTOR ERROR
036238,000106:                                                                                                  #        PBIASY    PIPAY BIAS
036239,000107:                                                                                                  #        PIPASCFY  PIPAY SCALE FACTOR ERROR
036240,000108:                                                                                                  #        PBIASZ    PIPAZ BIAS
036241,000109:                                                                                                  #        PIPASCFZ  PIPAZ SCALE FACTOR ERROR
036242,000110:                                                                                                  #        NBDX      X IRIG BIAS DRIFT
036243,000111:                                                                                                  #        NBDY      Y IRIG BIAS DRIFT
036244,000112: 
036245,000113:                                                                                                  #        NBDZ      Z IRIG BIAS DRIFT
036246,000114:                                                                                                  #        ADIAX     IRIG ACCELERATION SENSITIVE DRIFT ALONG THE X INPUT AXIS
036247,000115:                                                                                                  #        ADIAY     IRIG ACCELERATION SENSITIVE DRIFT ALONG THE Y INPUT AXIS
036248,000116:                                                                                                  #        ADIAZ     IRIG ACCELERATION SENSITIVE DRIFT ALONG THE Z INPUT AXIS
036249,000117:                                                                                                  #        ADSRAX    IRIG ACCELERATION SENSITIVE DRIFT ALONG THE X SPIN REFERENCE AXIS
036250,000118:                                                                                                  #        ADSRAY    IRIG ACCELERATION SENSITIVE DRIFT ALONG THE Y SPIN REFERENCE AXIS
036251,000119:                                                                                                  #        ADSRAZ    IRIG ACCELERATION SENSITIVE DRIFT ALONG THE Z SPIN REFERENCE AXIS
036252,000120:                                                                                                  #        GCOMP     GYRO COMPENSATION PULSES (SET = ZERO FOR 1ST PASS)
036253,000121: 
036254,000122:                                                                                                  #  INPUT
036255,000123:                                                                                                  #        1/PIPADT - DELTA TIME SCALED AT (CS) X 2(+8)
036256,000124:                                                                                                  #        DELVX, DELVY, DELVZ - PIPA READINGS IN THE MAJOR PARTS - MINOR PARTS IRRELEVANT
036257,000125: 
036258,000126: 
036259,000127:                                                                                                  #  OUTPUT
036260,000128:                                                                                                  #        DELVX, DELVY, DELVZ - PIPA COUNTS SCALED 2(+14) COMPENSATED FOR PIPA BIAS AND SCALE FACTOR ERROR
036261,000129:                                                                                                  #        GCOMP - 3 DP LOCATIONS CONTAINING GYRO PULSES TO COMPENSATE FOR NBD, ADIA, AND ADSRA COEFFICIENTS
036262,000130: 
036263,000131:                                                                                                  #  DEBRIS
036264,000132:                                                                                                  #        CENTRALS - A,L,Q
036265,000133:                                                                                                  #        OTHER - BUF - BUF +2, VBUF - VBUF +2, GCOMPSW
036266,000134: 

Page 804

036268,000136: 12,3220           33457        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
036269,000137: 12,3221           56003                           XCH      EBANK                                 
036270,000138: 
036271,000139: 12,3222           54153                           TS       MODE                                  
036272,000140: 
036273,000141: 12,3223           11463                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
036274,000142: 12,3224           13227                           TCF      +3                                    
036275,000143: 12,3225           13227                           TCF      +2                                    
036276,000144: 12,3226           13350                           TCF      IRIG1                                 #  RETURN
036277,000145: 
036278,000146: 12,3227           37753        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
036279,000147: 12,3230           54122                           TS       BUF        +2                         
036280,000148: 
036281,000149: 12,3231           50000                           INDEX    A                                     
036282,000150: 12,3232           30403                           CA       DELVX                                 #  CONTAINS PREVIOUS PIPA READING
036283,000151: 12,3233           54112                           TS       VBUF                                  #  TEMPORARY - MINOR PARTS IRRELEVANT
036284,000152: 
036285,000153: 12,3234           50122                           INDEX    BUF        +2                         
036286,000154: 12,3235           41436                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-5)             *
036287,000155: 12,3236           00006                           EXTEND                                         
036288,000156: 12,3237           71163                           MP       1/PIPADT                              #  (CS) X 2(+8)  NOW (PIPA PULSES) X 2(+3)*
036289,000157: 12,3240           00006                           EXTEND                                         #                                         *
036290,000158: 12,3241           77752                           MP       BIT4                                  #  SCALE 2(-3)      SHIFT LEFT 3          *
036291,000159: 12,3242           22113                           LXCH     VBUF       +1                         # (PIPA PULSES) X 2(0)    FRACTIONAL PULSE*
036292,000160: 
036293,000161: 12,3243           50122                           INDEX    BUF        +2                         
036294,000162: 
036295,000163: 12,3244           31437                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
036296,000164: 12,3245           00006                           EXTEND                                         
036297,000165: 12,3246           70112                           MP       VBUF                                  #  (PIPA PULSES) X 2(+14)
036298,000166: 12,3247           22114                           LXCH     VBUF       +2                         #  SAVE FOR FRACTIONAL COMPUTATION
036299,000167: 12,3250           00006                           EXTEND                                         
036300,000168: 12,3251           77750                           MP       BIT6                                  #  SCALE 2(+9)    NOW PIPA PULSES X 2(+14)
036301,000169: 12,3252           20113                           DAS      VBUF                                  #  (PIPAI) - (NBD)(DELTAT) + HI(PIPAI)(SFE)
036302,000170: 
036303,000171: 12,3253           30114                           CA       VBUF       +2                         #  NOW MINOR PART
036304,000172: 12,3254           00006                           EXTEND                                         
036305,000173: 
036306,000174: 12,3255           77750                           MP       BIT6                                  #  SCALE 2(+9)    SHIFT RIGHT 9
036307,000175: 12,3256           54001                           TS       L                                     
036308,000176: 12,3257           37761                           CAF      ZERO                                  
036309,000177: 12,3260           20113                           DAS      VBUF                                  #  (PIPAI) - (NBD)(DELTAT) + (PIPAI)(SFE)
036310,000178: 
036311,000179: 12,3261           00006                           EXTEND                                         
036312,000180: 12,3262           30113                           DCA      VBUF                                  #  RESTORE COMPENSATED PIPA READING
036313,000181: 12,3263           50122                           INDEX    BUF        +2                         
036314,000182: 12,3264           52404                           DXCH     DELVX                                 
036315,000183: 
036316,000184: 12,3265           10122                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX
036317,000185: 12,3266           67763                           AD       NEG1                                  
036318,000186: 
036319,000187: 12,3267           13230                           TCF      1/PIPA1    +1                         
036320,000188: 12,3270           13271                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE
036321,000189: 

Page 805

036323,000191: 12,3271           55463        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
036324,000192: 12,3272           54120                           TS       BUF                                   #  INDEX COUNTER - IRIGX, IRIGY, IRIGZ
036325,000193: 
036326,000194: 12,3273           00006        IRIGX              EXTEND                                         
036327,000195: 12,3274           40404                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
036328,000196: 12,3275           52145                           DXCH     MPAC                                  
036329,000197: 12,3276           31447                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036330,000198: 12,3277           03353                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)   (GYRO PULSES) X 2(+14)
036331,000199: 
036332,000200: 
036333,000201: 12,3300           00006                           EXTEND                                         
036334,000202: 12,3301           40406                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
036335,000203: 12,3302           52145                           DXCH     MPAC                                  
036336,000204: 12,3303           41452                           CS       ADSRAX                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036337,000205: 12,3304           03353                           TC       GCOMPSUB                              #  +(ADSRAX)(PIPAY)  (GYRO PULSES) X 2(+14)
036338,000206: 
036339,000207: 12,3305           41444                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
036340,000208: 12,3306           03402                           TC       DRIFSTUB                              #  -(NBDX)(DELTAT)   (GYRO PULSES) X 2(+14)
036341,000209: 
036342,000210: 12,3307           00006        IRIGY              EXTEND                                         
036343,000211: 12,3310           40406                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
036344,000212: 12,3311           52145                           DXCH     MPAC                                  
036345,000213: 12,3312           31450                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036346,000214: 12,3313           03353                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)   (GYRO PULSES) X 2(+14)
036347,000215: 
036348,000216: 12,3314           00006                           EXTEND                                         
036349,000217: 12,3315           40410                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
036350,000218: 12,3316           52145                           DXCH     MPAC                                  
036351,000219: 12,3317           41453                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036352,000220: 12,3320           03353                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)  (GYRO PULSES) X 2(+14)
036353,000221: 
036354,000222: 12,3321           41445                           CS       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
036355,000223: 
036356,000224: 12,3322           03402                           TC       DRIFSTUB                              #  -(NBDY)(DELTAT)   (GYRO PULSES) X 2(+14)
036357,000225: 
036358,000226: 12,3323           00006        IRIGZ              EXTEND                                         
036359,000227: 12,3324           40406                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
036360,000228: 12,3325           52145                           DXCH     MPAC                                  
036361,000229: 12,3326           31454                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036362,000230: 12,3327           03353                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)  (GYRO PULSES) X 2(+14)
036363,000231: 
036364,000232: 12,3330           00006                           EXTEND                                         
036365,000233: 12,3331           40410                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
036366,000234: 
036367,000235: 12,3332           52145                           DXCH     MPAC                                  
036368,000236: 12,3333           31451                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036369,000237: 12,3334           03353                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)   (GYRO PULSES) X 2(+14)
036370,000238: 
036371,000239: 12,3335           31446                           CA       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
036372,000240: 12,3336           03402                           TC       DRIFSTUB                              #  +(NBDZ)(DELTAT)   (GYRO PULSES) X 2(+14)
036373,000241: 

Page 806

036375,000243: 12,3337           11463                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
036376,000244: 
036377,000245: 12,3340           13342                           TCF      +2                                    #  YES
036378,000246: 12,3341           13350                           TCF      IRIG1                                 #  NO
036379,000247: 
036380,000248: 12,3342           00004                           INHINT                                         
036381,000249: 12,3343           35674                           CAF      PRIO35                                #  SEND OUT GYRO TORQUING COMMANDS
036382,000250: 12,3344           05523                           TC       NOVAC                                 
036383,000251: 12,3345  E3,1444                                  EBANK=   NBDX                                  
036384,000252: 12,3345           03435 24003                     2CADR    1/GYRO                                
036385,000253: 
036386,000254: 12,3347           00003                           RELINT                                         
036387,000255: 12,3350           30153        IRIG1              CA       MODE                                  #  SET EBANK FOR RETURN
036388,000256: 12,3351           54003                           TS       EBANK                                 
036389,000257: 
036390,000258: 12,3352           15237                           TCF      SWRETURN                              
036391,000259: 
036392,000260: 
036393,000261: 
036394,000262: 
036395,000263: 
036396,000264: 12,3353           56144        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
036397,000265: 12,3354           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
036398,000266: 12,3355           70144                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036399,000267: 
036400,000268: 12,3356           52113                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)            *
036401,000269: 
036402,000270: 12,3357           30145                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
036403,000271: 12,3360           00006                           EXTEND                                         
036404,000272: 12,3361           70144                           MP       MPAC                                  #  ADIA OR ADSRA
036405,000273: 12,3362           54001                           TS       L                                     
036406,000274: 12,3363           37761                           CAF      ZERO                                  
036407,000275: 12,3364           20113                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)            *
036408,000276: 
036409,000277: 12,3365           30112                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
036410,000278: 12,3366           00006                           EXTEND                                         
036411,000279: 12,3367           77745                           MP       BIT9                                  #  SCALE 2(+6)      SHIFT RIGHT 6         *
036412,000280: 
036413,000281: 12,3370           50120                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
036414,000282: 12,3371           21456                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI)  OR  HI(ADSRA)(PIPAI)
036415,000283: 
036416,000284: 12,3372           30113                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
036417,000285: 12,3373           00006                           EXTEND                                         
036418,000286: 12,3374           77745                           MP       BIT9                                  #  SCALE 2(+6)      SHIFT RIGHT 6         *
036419,000287: 12,3375           54001                           TS       L                                     
036420,000288: 12,3376           37761                           CAF      ZERO                                  
036421,000289: 12,3377           50120                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
036422,000290: 12,3400           21456                           DAS      GCOMP                                 #  (ADIA)(PIPAI)  OR  (ADSRA)(PIPAI)
036423,000291: 
036424,000292: 12,3401           00002                           TC       Q                                     
036425,000293: 

Page 807

036427,000295: 12,3402           00006        DRIFSTUB           EXTEND                                         
036428,000296: 12,3403           22121                           QXCH     BUF        +1                         
036429,000297: 
036430,000298: 12,3404           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
036431,000299: 12,3405           71163                           MP       1/PIPADT                              #  (CS) X 2(+8)   NOW (GYRO PULSES) X 2(+3)
036432,000300: 12,3406           22145                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
036433,000301: 
036434,000302: 12,3407           00006                           EXTEND                                         
036435,000303: 12,3410           77752                           MP       BIT4                                  #  SCALE 2(+11)     SHIFT RIGHT 11
036436,000304: 12,3411           50120                           INDEX    BUF                                   
036437,000305: 12,3412           21456                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)   (GYRO PULSES) X 2(+14)
036438,000306: 
036439,000307: 12,3413           30145                           CA       MPAC       +1                         #  NOW MINOR PART
036440,000308: 12,3414           00006                           EXTEND                                         
036441,000309: 12,3415           77752                           MP       BIT4                                  #  SCALE 2(+11)     SHIFT RIGHT 11
036442,000310: 12,3416           54001                           TS       L                                     
036443,000311: 12,3417           37761                           CAF      ZERO                                  
036444,000312: 12,3420           50120                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
036445,000313: 12,3421           21456                           DAS      GCOMP                                 #  (NBD)(DELTAT)     (GYRO PULSES) X 2(+14)
036446,000314: 
036447,000315: 
036448,000316: 12,3422           37754        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
036449,000317: 12,3423           60120                           AD       BUF                                   
036450,000318: 12,3424           56120                           XCH      BUF                                   
036451,000319: 12,3425           50000                           INDEX    A                                     
036452,000320: 12,3426           11455                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
036453,000321: 12,3427           13431                           TCF      +2                                    #  YES
036454,000322: 12,3430           00121                           TC       BUF        +1                         #  NO
036455,000323: 
036456,000324: 12,3431           73501                           MASK     COMPCHK                               #  DEC -1
036457,000325: 
036458,000326: 12,3432           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
036459,000327: 12,3433           55463                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
036460,000328: 12,3434           00121                           TC       BUF        +1                         #  NO
036461,000329: 

Page 808

036463,000331: 12,3435           37753        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
036464,000332: 12,3436           54120                           TS       BUF                                   
036465,000333: 
036466,000334: 12,3437           50120                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
036467,000335: 12,3440           31456                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
036468,000336: 12,3441           00006                           EXTEND                                         
036469,000337: 12,3442           77746                           MP       BIT8                                  #  SHIFT RIGHT 7
036470,000338: 12,3443           50120                           INDEX    BUF                                   
036471,000339: 12,3444           55456                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
036472,000340: 
036473,000341: 12,3445           37761                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
036474,000342: 12,3446           50120                           INDEX    BUF                                   
036475,000343: 
036476,000344: 12,3447           57455                           XCH      GCOMP                                 #  GYRO PULSES
036477,000345: 12,3450           00006                           EXTEND                                         
036478,000346: 12,3451           77746                           MP       BIT8                                  #  SHIFT RIGHT 7
036479,000347: 12,3452           50120                           INDEX    BUF                                   
036480,000348: 12,3453           21456                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
036481,000349: 
036482,000350: 12,3454           10120                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
036483,000351: 12,3455           67763                           AD       NEG1                                  
036484,000352: 12,3456           13436                           TCF      1/GYRO     +1                         
036485,000353: 12,3457           01455        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
036486,000354: 
036487,000355: 12,3460           33457                           CAF      LGCOMP                                
036488,000356: 
036489,000357: 12,3461           05224                           TC       BANKCALL                              
036490,000358: 12,3462           26361                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
036491,000359: 12,3463           05224                           TC       BANKCALL                              
036492,000360: 12,3464           26762                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
036493,000361: 12,3465           15605                           TCF      ENDOFJOB                              #  TEMPORARY
036494,000362: 
036495,000363: 12,3466           37753        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
036496,000364: 12,3467           54120                           TS       BUF                                   
036497,000365: 
036498,000366: 12,3470           50120                           INDEX    BUF                                   #  RESCALE
036499,000367: 
036500,000368: 12,3471           31456                           CA       GCOMP      +1                         
036501,000369: 12,3472           00006                           EXTEND                                         
036502,000370: 12,3473           77746                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
036503,000371: 12,3474           50120                           INDEX    BUF                                   
036504,000372: 12,3475           23456                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
036505,000373: 
036506,000374: 12,3476           10120                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
036507,000375: 12,3477           67763                           AD       NEG1                                  
036508,000376: 12,3500           13467                           TCF      GCOMP1     +1                         
036509,000377: 12,3501           77776        COMPCHK            DEC      -1         B-14                       #  LESS THAN ZERO IMPOSSIBLE
036510,000378: 12,3502           15605                           TCF      ENDOFJOB                              
036511,000379: 

Page 809

036513,000381: 12,3503           11463        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
036514,000382: 12,3504           13507                           TCF      +3                                    
036515,000383: 12,3505           13507                           TCF      +2                                    
036516,000384: 12,3506           15605                           TCF      ENDOFJOB                              
036517,000385: 
036518,000386: 12,3507           30025                           CA       TIME1                                 #  (CS) X 2(+14)
036519,000387: 12,3510           57163                           XCH      1/PIPADT                              #  PREVIOUS TIME
036520,000388: 12,3511           40000                           COM                                            
036521,000389: 
036522,000390: 12,3512           61163                           AD       1/PIPADT                              
036523,000391: 12,3513           10000        NBD2               CCS      A                                     #  CALCULATE ELAPSED TIME
036524,000392: 12,3514           67755                           AD       ONE                                   #  NO TIME1 OVERFLOW
036525,000393: 12,3515           13522                           TCF      NBD3                                  #  RESTORE TIME DIFFERENCE AND JUMP
036526,000394: 12,3516           13520                           TCF      +2                                    #  TIME1 OVERFLOW
036527,000395: 12,3517           15605                           TCF      ENDOFJOB                              #  IF ELAPSED TIME = 0  (DIFFERENCE = -0)
036528,000396: 
036529,000397: 12,3520           40000                           COM                                            #  CALCULATE ABSOLUTE DIFFERENCE
036530,000398: 12,3521           67735                           AD       POSMAX                                
036531,000399: 
036532,000400: 12,3522           00006        NBD3               EXTEND                                         #  C(A) = DELTAT    (CS) X 2(+14)
036533,000401: 12,3523           77744                           MP       BIT10                                 #  SHIFT RIGHT 5
036534,000402: 12,3524           52113                           DXCH     VBUF                                  
036535,000403: 12,3525           00006                           EXTEND                                         
036536,000404: 12,3526           30113                           DCA      VBUF                                  
036537,000405: 12,3527           52145                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
036538,000406: 
036539,000407: 12,3530           37761                           CAF      ZERO                                  
036540,000408: 12,3531           55463                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
036541,000409: 12,3532           54120                           TS       BUF                                   #  PIPAX, PIPAY, PIPAZ
036542,000410: 
036543,000411: 12,3533           41444                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
036544,000412: 12,3534           03552                           TC       FBIASSUB                              #  -(NBDX)(DELTAT)    (GYRO PULSES) X 2(+14)
036545,000413: 
036546,000414: 
036547,000415: 12,3535           00006                           EXTEND                                         
036548,000416: 12,3536           40113                           DCS      VBUF                                  
036549,000417: 12,3537           52145                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
036550,000418: 12,3540           31445                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
036551,000419: 12,3541           03552                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)    (GYRO PULSES) X 2(+14)
036552,000420: 
036553,000421: 12,3542           00006                           EXTEND                                         
036554,000422: 12,3543           40113                           DCS      VBUF                                  
036555,000423: 12,3544           52145                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
036556,000424: 
036557,000425: 12,3545           41446                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
036558,000426: 12,3546           03552                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)    (GYRO PULSES) X 2 (+14)
036559,000427: 
036560,000428: 12,3547           11463                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
036561,000429: 12,3550           13435                           TCF      1/GYRO                                #  YES
036562,000430: 12,3551           15605                           TCF      ENDOFJOB                              #  NO
036563,000431: 

Page 810

036565,000433: 12,3552           56002        FBIASSUB           XCH      Q                                     
036566,000434: 
036567,000435: 12,3553           54121                           TS       BUF        +1                         
036568,000436: 
036569,000437: 12,3554           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
036570,000438: 12,3555           00006                           EXTEND                                         
036571,000439: 12,3556           70144                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
036572,000440: 12,3557           50120                           INDEX    BUF                                   
036573,000441: 12,3560           21456                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)    (GYRO PULSES) X 2(+14)
036574,000442: 
036575,000443: 12,3561           30002                           CA       Q                                     #  NOW FRACTIONAL PART
036576,000444: 12,3562           00006                           EXTEND                                         
036577,000445: 12,3563           70145                           MP       MPAC       +1                         
036578,000446: 12,3564           54001                           TS       L                                     
036579,000447: 
036580,000448: 12,3565           37761                           CAF      ZERO                                  
036581,000449: 12,3566           50120                           INDEX    BUF                                   
036582,000450: 12,3567           21456                           DAS      GCOMP                                 #  (NBD)(DELTAT)     (GYRO PULSES) X 2(+14)
036583,000451: 
036584,000452: 12,3570           13422                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
036585,000453: 
036586,000454: 
036587,000455: 
036588,000456: 
036589,000457: 
036590,000458: 12,3571           11463        LASTBIAS           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
036591,000459: 12,3572           13575                           TCF      +3                                    
036592,000460: 12,3573           13575                           TCF      +2                                    
036593,000461: 12,3574           15605                           TCF      ENDOFJOB                              
036594,000462: 
036595,000463: 12,3575           35670                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+14)
036596,000464: 12,3576           57163                           XCH      1/PIPADT                              
036597,000465: 12,3577           40000                           COM                                            
036598,000466: 12,3600           61321                           AD       PIPTIME    +1                         #  TIME AT PIPAI = 0
036599,000467: 12,3601           13513                           TCF      NBD2                                  
036600,000468: 
036601,000469: 
036602,000470: 
036603,000471: 
036604,000472: 12,3602           33457        GCOMPZER           CAF      LGCOMP                                #  ROUTINE TO ZERO GCOMP BEFORE FIRST
036605,000473: 12,3603           56003                           XCH      EBANK                                 #  CALL TO 1/PIPA
036606,000474: 12,3604           54153                           TS       MODE                                  
036607,000475: 
036608,000476: 12,3605           37761                           CAF      ZERO                                  
036609,000477: 12,3606           55463                           TS       GCOMPSW                               
036610,000478: 12,3607           55455                           TS       GCOMP                                 
036611,000479: 12,3610           55456                           TS       GCOMP      +1                         
036612,000480: 12,3611           55457                           TS       GCOMP      +2                         
036613,000481: 
036614,000482: 12,3612           55460                           TS       GCOMP      +3                         
036615,000483: 12,3613           55461                           TS       GCOMP      +4                         
036616,000484: 12,3614           55462                           TS       GCOMP      +5                         
036617,000485: 

Page 811

036619,000487: 12,3615           30153                           CA       MODE                                  
036620,000488: 12,3616           54003                           TS       EBANK                                 
036621,000489: 12,3617           15237                           TCF      SWRETURN                              #  RETURN TO CALLER

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