Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston facility, and the scanning was sponsored by Mike Stewart. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are in ALL-CAPS, whereas comments added later in transcription are in Mixed-Case. In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the BURST120 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 
	BY NASA 2021106-031 DEC 7, 1967

	THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED 
	FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE 
	UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.
Note that the date is the date of the printout, not the date of the program revision.

036792,000002:                                                                                                  ## Copyright:   Public domain.
036793,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
036794,000004:                                                                                                  ## Purpose:     A module for revision 0 of BURST120 (Sunburst). It 
036795,000005:                                                                                                  ##              is part of the source code for the Lunar Module's
036796,000006:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 5.
036797,000007:                                                                                                  ## Assembler:   yaYUL
036798,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
036799,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
036800,000010:                                                                                                  ## Mod history: 2016-09-30 RSB  Created draft version.
036801,000011:                                                                                                  ##              2016-10-30 RSB  Transcribed, primarily by adapting
036802,000012:                                                                                                  ##                              the Aurora 12 version of the file.
036803,000013:                                                                                                  ##              2016-11-01 RSB  Typos.
036804,000014:                                                                                                  ##              2016-11-02 RSB  More typos.
036805,000015:                                                                                                  ##              2016-12-06 RSB  Comment-proofing via octopus/ProoferComments;
036806,000016:                                                                                                  ##                              changes were made.
036807,000017: 

Page 859

036809,000019: 12,3222                                           BANK     12                                    
036810,000020: 12,3222  E3,1444                                  EBANK=   NBDX                                  
036811,000021: 
036812,000022:                                                                                                  #  PROGRAM DESCRIPTION- IMU COMPENSATION (LEM)                             DATE- 1 DEC 66
036813,000023:                                                                                                  #  MOD NO- 0                                                               LOG SECTION- IMU COMPENSATION PACKAGE
036814,000024:                                                                                                  #  MOD BY- GILBERT                                                         ASSEMBLY- SUNBURST REVISION 48 
036815,000025: 
036816,000026:                                                                                                  #  FUNCTIONAL DESCRIPTION
036817,000027:                                                                                                  #        THE IMU COMPENSATION PACKAGE IS DESIGNED TO COMPENSATE FOR PIPA BIAS AND SCALE FACTOR ERROR AND AT THE
036818,000028:                                                                                                  #  SAME TIME ACCUMULATE GYRO TORQUING COMMANDS NECESSARY TO COMPENSATE FOR THE ASSOCIATED BIAS AND ACCELERATION-
036819,000029:                                                                                                  #  CAUSED GYRO DRIFTS. 1/PIPA MUST BE CALLED AT LEAST EVERY 2.55 SECONDS DUE TO SCALING CONSIDERATIONS.
036820,000030:                                                                                                  #  SPECIFICALLY, THE CORRECTION IS
036821,000031: 
036822,000032:                                                                                                  #        PIPA  = (1 + SCALE FACTOR ERROR)PIPA  -  (BIAS)(DELTAT)
036823,000033:                                                                                                  #            C                               I
036824,000034: 
036825,000035:                                                                                                  #  WHERE PIPA  IS THE COMPENSATED DATA OBTAINED FROM THE SAMPLED DATA PIPA
036826,000036:                                                                                                  #            C                                                            I
036827,000037: 
036828,000038:                                                                                                  #  THE COMPENSATED DATA IS THEN USED TO COMPUTE THE IRIG TORQUING NECESSARY TO CANCEL THE NBD, ADIA, AND ADSRA
036829,000039:                                                                                                  #  GYRO COEFFICIENTS.
036830,000040:                                                                                                  #  SPECIFICALLY, THE COMPUTATIONS ARE
036831,000041: 
036832,000042:                                                                                                  #        XIRIG     -(ADIAX)(PIPAX ) + (ADSRAX)(PIPAY ) - (NBDX)(DELTAT)  
036833,000043:                                                                                                  #                                C                  C
036834,000044:                                                                                                  #        YIRIG     -(ADIAY)(PIPAY ) + (ADSRAY)(PIPAZ ) - (NBDY)(DELTAT)
036835,000045:                                                                                                  #                                C                  C  
036836,000046:                                                                                                  #        ZIRIG     -(ADIAZ)(PIPAZ ) - (ADSRAZ)(PIPAY ) + (NBDZ)(DELTAT)
036837,000047:                                                                                                  #                                C                  C
036838,000048: 
036839,000049:                                                                                                  #  THIS COMPENSATION IS SUMMED INTO THE GCOMP REGISTERS AND WHEN THE MAGNITUDE OF ANY IRIG COMMAND EXCEEDS 2
036840,000050:                                                                                                  #  PULSES, THE COMMANDS ARE SENT TO THE GYROS.
036841,000051: 
036842,000052:                                                                                                  #  DURING FREE-FALL PHASES OF A FLIGHT NBDX, NBDY, AND NBDZ ARE THE ONLY RELEVANT COEFFICIENTS. THESE BIAS TERMS
036843,000053:                                                                                                  #  WILL BE INTEGRATED BY ROUTINE NBDONLY APPROXIMATELY EVERY 81.93 SECONDS FOLLOWING AN EXECUTIVE CALL BY THE DUMMY
036844,000054:                                                                                                  #  TASK OF THE WAITLIST PROGRAM. NBDONLY IS ENABLED WHEN BIT 15 OF FLAGWRD2 IS SET TO INDICATE FREE-FALL. DURING
036845,000055:                                                                                                  #  THIS TIME 1/PIPA IS NOT CALLED.
036846,000056: 
036847,000057:                                                                                                  #  LASTBIAS IS CALLED VIA EXECUTIVE WHEN MAKING THE TRANSITION FROM FREE-FALL TO A PIPA READING MODE. THE NBD TERMS
036848,000058:                                                                                                  #  ARE COMPENSATED FOR FROM THE LAST NBDONLY CALL UP TO PIPA ZEROING. PREREAD WILL THEN ENABLE 1/PIPA AT ITS
036849,000059:                                                                                                  #  REGULAR INTERVAL. THE DRIFT FLAG MUST BE DOWN JUST PRIOR TO LASTBIAS. GYROCOMPASS NEVER CALLS LASTBIAS.
036850,000060: 
036851,000061:                                                                                                  #  SCALING CONSIDERATIONS
036852,000062:                                                                                                  #                             UNITS              MAX. VALUE     INTERNAL UNITS AND SCALING
036853,000063: 
036854,000064:                                                                                                  #         PIPA BIAS           (CM)/(SEC)(SEC)    3.125          (PIPA PULSES)/(CS) X 2(-5) 
036855,000065:                                                                                                  #         PIPA SCALE FACTOR   P.P.M.             1953.125       (PPM) X 2(-9)
036856,000066:                                                                                                  #         NBD                 MERU               128.74604      (GYRO PULSES)/(CS) X 2(-5) 
036857,000067:                                                                                                  #         ADIA                (MERU)/(G)         630.36633      (GYRO PULSES)/(PIPA PULSE) X 2(-6)
036858,000068:                                                                                                  #         ADSRA               (MERU)/(G)         630.36633      (GYRO PULSES)/(PIPA PULSE) X 2(-6)
036859,000069: 

Page 860

036861,000071:                                                                                                  #  CONVERSION TABLE
036862,000072:                                                                                                  #        1 PIPA PULSE = 1.00 (CM)/(SEC)               1 ERU = 7.29209817 X 10(-5) (RAD)/(SEC)
036863,000073:                                                                                                  #        1 ERU = 15.04104488 (ARCSEC)/(SEC)           1 (CM)/(SEC)(SEC) = .01 (PIPA PULSES)/(CS)
036864,000074:                                                                                                  #        1 GYRO PULSE = .61798096 ARCSEC              1 MERU = .00024272592 (GYRO PULSES)/(CS)
036865,000075:                                                                                                  #        1 G = 979.24 (CM)/(SEC)(SEC)  (AMR)          1 (MERU)/(G) = .000024787174 (GYRO PULSES)/(PIPA PULSE)
036866,000076: 
036867,000077:                                                                                                  #  REFERENCES
036868,000078:                                                                                                  #        AGC PROGRAMMING MEMO NO. 12, I.S.S. MEMO NO. 247, I.S.S. MEMO NO. 328, I.S.S. MEMO NO. 339
036869,000079: 
036870,000080:                                                                                                  #  CALLING SEQUENCE 
036871,000081:                                                                                                  #        L      TC     BANKCALL
036872,000082:                                                                                                  #        L+1    CADR   1/PIPA
036873,000083:                                                                                                  #        L+2                       RETURNS HERE
036874,000084: 
036875,000085:                                                                                                  #  NORMAL EXIT MODES
036876,000086:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
036877,000087: 
036878,000088:                                                                                                  #  ALARM OR ABORT MODES
036879,000089:                                                                                                  #        ENDOFJOB
036880,000090: 
036881,000091:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED (CONSECUTIVE LOCATIONS)
036882,000092:                                                                                                  #        PBIASX    PIPAX BIAS
036883,000093:                                                                                                  #        PIPASCFX  PIPAX SCALE FACTOR ERROR
036884,000094:                                                                                                  #        PBIASY    PIPAY BIAS
036885,000095:                                                                                                  #        PIPASCFY  PIPAY SCALE FACTOR ERROR
036886,000096:                                                                                                  #        PBIASZ    PIPAZ BIAS
036887,000097:                                                                                                  #        PIPASCFZ  PIPAZ SCALE FACTOR ERROR
036888,000098:                                                                                                  #        NBDX      X IRIG BIAS DRIFT
036889,000099:                                                                                                  #        NBDY      Y IRIG BIAS DRIFT
036890,000100:                                                                                                  #        NDBZ      Z IRIG BIAS DRIFT
036891,000101:                                                                                                  #        ADIAX     IRIG ACCELERATION SENSITIVE DRIFT ALONG THE X INPUT AXIS  
036892,000102:                                                                                                  #        ADIAY     IRIG ACCELERATION SENSITIVE DRIFT ALONG THE Y INPUT AXIS 
036893,000103:                                                                                                  #        ADIAZ     IRIG ACCELERATION SENSITIVE DRIFT ALONG THE Z INPUT AXIS
036894,000104:                                                                                                  #        ADSRAX    IRIG ACCELERATION SENSITIVE DRIFT ALONG THE X SPIN REFERENCE AXIS      
036895,000105:                                                                                                  #        ADSRAY    IRIG ACCELERATION SENSITIVE DRIFT ALONG THE Y SPIN REFERENCE AXIS  
036896,000106:                                                                                                  #        ADSRAZ    IRIG ACCELERATION SENSITIVE DRIFT ALONG THE Z SPIN REFERENCE AXIS
036897,000107:                                                                                                  #        GCOMP     GYRO COMPENSATION PULSES (SET = ZERO FOR 1ST PASS)
036898,000108: 
036899,000109:                                                                                                  #  INPUT
036900,000110:                                                                                                  #        1/PIPADT - DELTA TIME SCALED AT (CS) X 2(+8)
036901,000111:                                                                                                  #        DELVX, DELVY, DELVZ - PIPA READINGS IN THE MAJOR PARTS - MINOR PARTS IRRELEVANT 
036902,000112: 
036903,000113:                                                                                                  #  OUTPUT
036904,000114:                                                                                                  #        DELVX, DELVY, DELVZ - PIPA COUNTS SCALED 2(+14) COMPENSATED FOR PIPA BIAS AND SCALE FACTOR ERROR
036905,000115:                                                                                                  #        GCOMP - 3 DP LOCATIONS CONTAINING GYRO PULSES TO COMPENSATE FOR NBD, ADIA, AND ADSRA COEFFICIENTS
036906,000116: 
036907,000117:                                                                                                  #  DEBRIS
036908,000118:                                                                                                  #        CENTRALS - A,L,Q
036909,000119:                                                                                                  #        OTHER - BUF - BUF +2, VBUF - VBUF +2, GCOMPSW
036910,000120: 

Page 861

036912,000122: 12,3222           33455        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
036913,000123: 12,3223           56003                           XCH      EBANK                                 
036914,000124: 12,3224           54153                           TS       MODE                                  
036915,000125: 
036916,000126: 12,3225           11463                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
036917,000127: 12,3226           13231                           TCF      +3                                    
036918,000128: 12,3227           13231                           TCF      +2                                    
036919,000129: 12,3230           13346                           TCF      IRIG1                                 #  RETURN
036920,000130: 
036921,000131: 12,3231           37761        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
036922,000132: 12,3232           54122                           TS       BUF        +2                         
036923,000133: 
036924,000134: 12,3233           50122                           INDEX    BUF        +2                         
036925,000135: 12,3234           31437                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
036926,000136: 12,3235           00006                           EXTEND                                         
036927,000137: 12,3236           50122                           INDEX    BUF        +2                         
036928,000138: 12,3237           70403                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
036929,000139: 12,3240           54002                           TS       Q                                     #  SAVE MAJOR PART
036930,000140: 
036931,000141: 12,3241           30001                           CA       L                                     #  MINOR PART
036932,000142: 12,3242           00006                           EXTEND                                         
036933,000143: 12,3243           77756                           MP       BIT6                                  #  SCALE 2(+9)     SHIFT RIGHT 9
036934,000144: 12,3244           50122                           INDEX    BUF        +2                         
036935,000145: 12,3245           54404                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
036936,000146: 
036937,000147: 12,3246           30002                           CA       Q                                     #  MAJOR PART
036938,000148: 12,3247           00006                           EXTEND                                         
036939,000149: 12,3250           77756                           MP       BIT6                                  #  SCALE 2(+9)     SHIFT RIGHT 9
036940,000150: 12,3251           50122                           INDEX    BUF        +2                         
036941,000151: 12,3252           20404                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
036942,000152: 
036943,000153: 12,3253           50122                           INDEX    BUF        +2                         
036944,000154: 12,3254           41436                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-5)             *
036945,000155: 12,3255           00006                           EXTEND                                         
036946,000156: 12,3256           70765                           MP       1/PIPADT                              #  (CS) X 2(+8)  NOW (PIPA PULSES) X 2(+3)*
036947,000157: 12,3257           00006                           EXTEND                                         
036948,000158: 12,3260           77760                           MP       BIT4                                  #  SCALE 2(+11)  SHIFT RIGHT 11           *
036949,000159: 12,3261           50122                           INDEX    BUF        +2                         
036950,000160: 12,3262           20404                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
036951,000161: 
036952,000162: 12,3263           10122                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX
036953,000163: 12,3264           67771                           AD       NEG1                                  
036954,000164: 12,3265           13232                           TCF      1/PIPA1    +1                         
036955,000165: 12,3266           13267                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE
036956,000166: 

Page 862

036958,000168: 12,3267           55463        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
036959,000169: 12,3270           54120                           TS       BUF                                   #  INDEX COUNTER - IRIGX, IRIGY, IRIGZ
036960,000170: 
036961,000171: 12,3271           00006        IRIGX              EXTEND                                         
036962,000172: 12,3272           40404                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
036963,000173: 12,3273           52145                           DXCH     MPAC                                  
036964,000174: 12,3274           31447                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036965,000175: 12,3275           03351                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)   (GYRO PULSES) X 2(+14)
036966,000176: 
036967,000177: 12,3276           00006                           EXTEND                                         
036968,000178: 12,3277           40406                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
036969,000179: 12,3300           52145                           DXCH     MPAC                                  
036970,000180: 12,3301           41452                           CS       ADSRAX                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036971,000181: 12,3302           03351                           TC       GCOMPSUB                              #  +(ADSRAX)(PIPAY)  (GYRO PULSES) X 2(+14)
036972,000182: 
036973,000183: 12,3303           41444                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
036974,000184: 12,3304           03400                           TC       DRIFSTUB                              #  -(NBDX)(DELTAT)   (GYRO PULSES) X 2(+14)
036975,000185: 
036976,000186: 12,3305           00006        IRIGY              EXTEND                                         
036977,000187: 12,3306           40406                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
036978,000188: 12,3307           52145                           DXCH     MPAC                                  
036979,000189: 12,3310           31450                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036980,000190: 12,3311           03351                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)   (GYRO PULSES) X 2(+14)
036981,000191: 
036982,000192: 12,3312           00006                           EXTEND                                         
036983,000193: 12,3313           40410                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
036984,000194: 12,3314           52145                           DXCH     MPAC                                  
036985,000195: 12,3315           41453                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036986,000196: 12,3316           03351                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)  (GYRO PULSES) X 2(+14)
036987,000197: 
036988,000198: 12,3317           41445                           CS       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
036989,000199: 12,3320           03400                           TC       DRIFSTUB                              #  -(NBDY)(DELTAT)   (GYRO PULSES) X 2(+14)
036990,000200: 
036991,000201: 12,3321           00006        IRIGZ              EXTEND                                         
036992,000202: 12,3322           40406                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
036993,000203: 12,3323           52145                           DXCH     MPAC                                  
036994,000204: 12,3324           31454                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
036995,000205: 12,3325           03351                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)  (GYRO PULSES) X 2(+14)
036996,000206: 
036997,000207: 12,3326           00006                           EXTEND                                         
036998,000208: 12,3327           40410                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
036999,000209: 12,3330           52145                           DXCH     MPAC                                  
037000,000210: 12,3331           31451                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
037001,000211: 12,3332           03351                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)   (GYRO PULSES) X 2(+14)
037002,000212: 
037003,000213: 12,3333           31446                           CA       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
037004,000214: 12,3334           03400                           TC       DRIFSTUB                              #  +(NBDZ)(DELTAT)   (GYRO PULSES) X 2(+14)
037005,000215: 

Page 863

037007,000217: 12,3335           11463                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
037008,000218: 12,3336           13340                           TCF      +2                                    #  YES
037009,000219: 12,3337           13346                           TCF      IRIG1                                 #  NO
037010,000220: 
037011,000221: 12,3340           00004                           INHINT                                         
037012,000222: 12,3341           35656                           CAF      PRIO35                                #  SEND OUT GYRO TORQUING COMMANDS
037013,000223: 12,3342           05505                           TC       NOVAC                                 
037014,000224: 12,3343  E3,1444                                  EBANK=   NBDX                                  
037015,000225: 12,3343           03433 24063                     2CADR    1/GYRO                                
037016,000226: 
037017,000227: 12,3345           00003                           RELINT                                         
037018,000228: 12,3346           30153        IRIG1              CA       MODE                                  #  SET EBANK FOR RETURN
037019,000229: 12,3347           54003                           TS       EBANK                                 
037020,000230: 12,3350           15221                           TCF      SWRETURN                              
037021,000231: 
037022,000232: 
037023,000233: 
037024,000234: 12,3351           56144        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A 
037025,000235: 12,3352           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)  
037026,000236: 12,3353           70144                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
037027,000237: 12,3354           52113                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)            *
037028,000238: 
037029,000239: 12,3355           30145                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
037030,000240: 12,3356           00006                           EXTEND                                         
037031,000241: 12,3357           70144                           MP       MPAC                                  #  ADIA OR ADSRA
037032,000242: 12,3360           54001                           TS       L                                     
037033,000243: 12,3361           37767                           CAF      ZERO                                  
037034,000244: 12,3362           20113                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)            *
037035,000245: 
037036,000246: 12,3363           30112                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
037037,000247: 12,3364           00006                           EXTEND                                         
037038,000248: 12,3365           77753                           MP       BIT9                                  #  SCALE 2(+6)      SHIFT RIGHT 6         *
037039,000249: 12,3366           50120                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
037040,000250: 12,3367           21456                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI)  OR  HI(ADSRA)(PIPAI)
037041,000251: 
037042,000252: 12,3370           30113                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
037043,000253: 12,3371           00006                           EXTEND                                         
037044,000254: 12,3372           77753                           MP       BIT9                                  #  SCALE 2(+6)      SHIFT RIGHT 6         *
037045,000255: 12,3373           54001                           TS       L                                     
037046,000256: 12,3374           37767                           CAF      ZERO                                  
037047,000257: 12,3375           50120                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
037048,000258: 12,3376           21456                           DAS      GCOMP                                 #  (ADIA)(PIPAI)  OR  (ADSRA)(PIPAI)
037049,000259: 
037050,000260: 12,3377           00002                           TC       Q                                     
037051,000261: 

Page 864

037053,000263: 12,3400           00006        DRIFSTUB           EXTEND                                         
037054,000264: 12,3401           22121                           QXCH     BUF        +1                         
037055,000265: 
037056,000266: 12,3402           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
037057,000267: 12,3403           70765                           MP       1/PIPADT                              #  (CS) X 2(+8)   NOW (GYRO PULSES) X 2(+3)
037058,000268: 12,3404           22145                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
037059,000269: 12,3405           00006                           EXTEND                                         
037060,000270: 12,3406           77760                           MP       BIT4                                  #  SCALE 2(+11)     SHIFT RIGHT 11
037061,000271: 12,3407           50120                           INDEX    BUF                                   
037062,000272: 12,3410           21456                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)   (GYRO PULSES) X 2(+14)
037063,000273: 
037064,000274: 12,3411           30145                           CA       MPAC       +1                         #  NOW MINOR PART
037065,000275: 12,3412           00006                           EXTEND                                         
037066,000276: 12,3413           77760                           MP       BIT4                                  #  SCALE 2(+11)     SHIFT RIGHT 11
037067,000277: 12,3414           54001                           TS       L                                     
037068,000278: 12,3415           37767                           CAF      ZERO                                  
037069,000279: 12,3416           50120                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
037070,000280: 12,3417           21456                           DAS      GCOMP                                 #  (NBD)(DELTAT)     (GYRO PULSES) X 2(+14)
037071,000281: 
037072,000282: 12,3420           37762        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
037073,000283: 12,3421           60120                           AD       BUF                                   
037074,000284: 12,3422           56120                           XCH      BUF                                   
037075,000285: 12,3423           50000                           INDEX    A                                     
037076,000286: 12,3424           11455                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
037077,000287: 12,3425           13427                           TCF      +2                                    #  YES
037078,000288: 12,3426           00121                           TC       BUF        +1                         #  NO
037079,000289: 
037080,000290: 12,3427           73477                           MASK     COMPCHK                               #  DEC -1
037081,000291: 12,3430           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
037082,000292: 12,3431           55463                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
037083,000293: 12,3432           00121                           TC       BUF        +1                         #  NO
037084,000294: 

Page 865

037086,000296: 12,3433           37761        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
037087,000297: 12,3434           54120                           TS       BUF                                   
037088,000298: 
037089,000299: 12,3435           50120                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
037090,000300: 12,3436           31456                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
037091,000301: 12,3437           00006                           EXTEND                                         
037092,000302: 12,3440           77754                           MP       BIT8                                  #  SHIFT RIGHT 7
037093,000303: 12,3441           50120                           INDEX    BUF                                   
037094,000304: 12,3442           55456                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
037095,000305: 
037096,000306: 12,3443           37767                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
037097,000307: 12,3444           50120                           INDEX    BUF                                   
037098,000308: 12,3445           57455                           XCH      GCOMP                                 #  GYRO PULSES
037099,000309: 12,3446           00006                           EXTEND                                         
037100,000310: 12,3447           77754                           MP       BIT8                                  #  SHIFT RIGHT 7
037101,000311: 12,3450           50120                           INDEX    BUF                                   
037102,000312: 12,3451           21456                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
037103,000313: 
037104,000314: 12,3452           10120                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
037105,000315: 12,3453           67771                           AD       NEG1                                  
037106,000316: 12,3454           13434                           TCF      1/GYRO     +1                         
037107,000317: 12,3455           01455        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
037108,000318: 
037109,000319: 12,3456           33455                           CAF      LGCOMP                                
037110,000320: 12,3457           05206                           TC       BANKCALL                              
037111,000321: 12,3460           26362                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
037112,000322: 12,3461           05206                           TC       BANKCALL                              
037113,000323: 12,3462           26751                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
037114,000324: 12,3463           15567                           TCF      ENDOFJOB                              #  TEMPORARY
037115,000325: 
037116,000326: 12,3464           37761        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
037117,000327: 12,3465           54120                           TS       BUF                                   
037118,000328: 
037119,000329: 12,3466           50120                           INDEX    BUF                                   #  RESCALE
037120,000330: 12,3467           31456                           CA       GCOMP      +1                         
037121,000331: 12,3470           00006                           EXTEND                                         
037122,000332: 12,3471           77754                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
037123,000333: 12,3472           50120                           INDEX    BUF                                   
037124,000334: 12,3473           23456                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
037125,000335: 
037126,000336: 12,3474           10120                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
037127,000337: 12,3475           67771                           AD       NEG1                                  
037128,000338: 12,3476           13465                           TCF      GCOMP1     +1                         
037129,000339: 12,3477           77776        COMPCHK            DEC      -1         B-14                       #  LESS THAN ZERO IMPOSSIBLE
037130,000340: 12,3500           15567                           TCF      ENDOFJOB                              
037131,000341: 

Page 866

037133,000343: 12,3501           11463        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
037134,000344: 12,3502           13505                           TCF      +3                                    
037135,000345: 12,3503           13505                           TCF      +2                                    
037136,000346: 12,3504           15567                           TCF      ENDOFJOB                              
037137,000347: 
037138,000348: 12,3505           00004                           INHINT                                         
037139,000349: 12,3506           10076                           CCS      FLAGWRD2                              #  PREREAD T3RUPT MAY COINCIDE
037140,000350: 12,3507           15567                           TCF      ENDOFJOB                              
037141,000351: 12,3510           15567                           TCF      ENDOFJOB                              
037142,000352: 12,3511           13512                           TCF      +1                                    
037143,000353: 
037144,000354: 12,3512           30025                           CA       TIME1                                 #  (CS) X 2(+14)
037145,000355: 12,3513           56765                           XCH      1/PIPADT                              #  PREVIOUS TIME
037146,000356: 12,3514           00003                           RELINT                                         
037147,000357: 12,3515           40000                           COM                                            
037148,000358: 12,3516           60765                           AD       1/PIPADT                              
037149,000359: 12,3517           10000        NBD2               CCS      A                                     #  CALCULATE ELAPSED TIME
037150,000360: 12,3520           67763                           AD       ONE                                   #  NO TIME1 OVERFLOW
037151,000361: 12,3521           13526                           TCF      NBD3                                  #  RESTORE TIME DIFFERENCE AND JUMP
037152,000362: 12,3522           13524                           TCF      +2                                    #  TIME1 OVERFLOW
037153,000363: 12,3523           15567                           TCF      ENDOFJOB                              #  IF ELAPSED TIME = 0  (DIFFERENCE = -0)
037154,000364: 
037155,000365: 12,3524           40000                           COM                                            #  CALCULATE ABSOLUTE DIFFERENCE
037156,000366: 12,3525           67743                           AD       POSMAX                                
037157,000367: 
037158,000368: 12,3526           00006        NBD3               EXTEND                                         #  C(A) = DELTAT    (CS) X 2(+14)
037159,000369: 12,3527           77752                           MP       BIT10                                 #  SHIFT RIGHT 5
037160,000370: 12,3530           52113                           DXCH     VBUF                                  
037161,000371: 12,3531           00006                           EXTEND                                         
037162,000372: 12,3532           30113                           DCA      VBUF                                  
037163,000373: 12,3533           52145                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
037164,000374: 
037165,000375: 12,3534           37767                           CAF      ZERO                                  
037166,000376: 12,3535           55463                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
037167,000377: 12,3536           54120                           TS       BUF                                   #  PIPAX, PIPAY, PIPAZ
037168,000378: 
037169,000379: 12,3537           41444                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
037170,000380: 12,3540           03556                           TC       FBIASSUB                              #  -(NBDX)(DELTAT)    (GYRO PULSES) X 2(+14)
037171,000381: 
037172,000382: 12,3541           00006                           EXTEND                                         
037173,000383: 12,3542           40113                           DCS      VBUF                                  
037174,000384: 12,3543           52145                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
037175,000385: 12,3544           31445                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
037176,000386: 12,3545           03556                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)    (GYRO PULSES) X 2(+14)
037177,000387: 
037178,000388: 12,3546           00006                           EXTEND                                         
037179,000389: 12,3547           40113                           DCS      VBUF                                  
037180,000390: 12,3550           52145                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
037181,000391: 12,3551           41446                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
037182,000392: 12,3552           03556                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)    (GYRO PULSES) X 2 (+14)
037183,000393: 

Page 867

037185,000395: 12,3553           11463                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
037186,000396: 12,3554           13433                           TCF      1/GYRO                                #  YES
037187,000397: 12,3555           15567                           TCF      ENDOFJOB                              #  NO
037188,000398: 

Page 868

037190,000400: 12,3556           56002        FBIASSUB           XCH      Q                                     
037191,000401: 12,3557           54121                           TS       BUF        +1                         
037192,000402: 
037193,000403: 12,3560           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
037194,000404: 12,3561           00006                           EXTEND                                         
037195,000405: 12,3562           70144                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
037196,000406: 12,3563           50120                           INDEX    BUF                                   
037197,000407: 12,3564           21456                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)    (GYRO PULSES) X 2(+14)
037198,000408: 
037199,000409: 12,3565           30002                           CA       Q                                     #  NOW FRACTIONAL PART
037200,000410: 12,3566           00006                           EXTEND                                         
037201,000411: 12,3567           70145                           MP       MPAC       +1                         
037202,000412: 12,3570           54001                           TS       L                                     
037203,000413: 12,3571           37767                           CAF      ZERO                                  
037204,000414: 12,3572           50120                           INDEX    BUF                                   
037205,000415: 12,3573           21456                           DAS      GCOMP                                 #  (NBD)(DELTAT)     (GYRO PULSES) X 2(+14)
037206,000416: 
037207,000417: 12,3574           13420                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
037208,000418: 
037209,000419: 
037210,000420: 
037211,000421: 12,3575           11463        LASTBIAS           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
037212,000422: 12,3576           13601                           TCF      +3                                    
037213,000423: 12,3577           13601                           TCF      +2                                    
037214,000424: 12,3600           15567                           TCF      ENDOFJOB                              
037215,000425: 
037216,000426: 12,3601           35652                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
037217,000427: 12,3602           56765                           XCH      1/PIPADT                              
037218,000428: 12,3603           40000                           COM                                            
037219,000429: 12,3604           61307                           AD       PIPTIME    +1                         #  TIME AT PIPA1 = 0
037220,000430: 12,3605           13517                           TCF      NBD2                                  
037221,000431: 
037222,000432: 
037223,000433: 
037224,000434: 12,3606           33455        GCOMPZER           CAF      LGCOMP                                #  ROUTINE TO ZERO GCOMP BEFORE FIRST
037225,000435: 12,3607           56003                           XCH      EBANK                                 #  CALL TO 1/PIPA
037226,000436: 12,3610           54153                           TS       MODE                                  
037227,000437: 
037228,000438: 12,3611           37767                           CAF      ZERO                                  
037229,000439: 12,3612           55463                           TS       GCOMPSW                               
037230,000440: 12,3613           55455                           TS       GCOMP                                 
037231,000441: 12,3614           55456                           TS       GCOMP      +1                         
037232,000442: 12,3615           55457                           TS       GCOMP      +2                         
037233,000443: 12,3616           55460                           TS       GCOMP      +3                         
037234,000444: 12,3617           55461                           TS       GCOMP      +4                         
037235,000445: 12,3620           55462                           TS       GCOMP      +5                         
037236,000446: 
037237,000447: 12,3621           30153                           CA       MODE                                  
037238,000448: 12,3622           54003                           TS       EBANK                                 
037239,000449: 12,3623           15221                           TCF      SWRETURN                              #  RETURN TO CALLER

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