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.

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

Page 802

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

Page 803

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

Page 804

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

Page 805

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

Page 806

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

Page 807

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

Page 808

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

Page 809

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

Page 810

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

Page 811

036626,000487: 12,3615           30153                           CA       MODE                                  
036627,000488: 12,3616           54003                           TS       EBANK                                 
036628,000489: 12,3617           15237                           TCF      SWRETURN                              #  RETURN TO CALLER

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