Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97. A bug (which had been around since at least Apollo 10, Luminary 69) was discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute revision into Rev 1, which is what actually flew rather than the Rev 0 presented here. A hardcopy of Rev 0 is known to exist — it belonged to AGC developer Allan Klumpp for many years — but unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus the code you see here had been reconstructed (we believe accurately) rather than transcribed. The first step of the reconstruction of the Rev 0 source code was the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection. The process of reverting the active portion of the source code (i.e., other than program comments) from Rev 1 to Rev 0 was very minor, consisting only of moving the position of the STARTSB1 label in FRESH START AND RESTART. Allan had previously given us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read, in part:

	GAP:  ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051

A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here.

055294,000002:                                                                                                  ## Copyright:   Public domain.
055295,000003:                                                                                                  ## Filename:    TIME_OF_FREE_FALL.agc
055296,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
055297,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the third release
055298,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
055299,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
055300,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
055301,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
055302,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
055303,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
055304,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
055305,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
055306,000014:                                                                                                  ##              the original YUL assembler.
055307,000015:                                                                                                  ##
055308,000016:                                                                                                  ## Assembler:   yaYUL
055309,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
055310,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
055311,000019:                                                                                                  ## Pages:       1268-1283
055312,000020:                                                                                                  ## Mod history: 2009-05-26 RSB  Adapted from the corresponding 
055313,000021:                                                                                                  ##                              Luminary131 file, using page 
055314,000022:                                                                                                  ##                              images from Luminary 1A.
055315,000023:                                                                                                  ##              2011-01-06 JL   Fixed pseudo-label indentation.
055316,000024:                                                                                                  ##              2016-12-17 RSB  Proofed text comments with octopus/ProoferComments
055317,000025:                                                                                                  ##                              and corrected the errors found.
055318,000026:                                                                                                  ##              2017-03-14 RSB  Comment-text fixes noted in proofing Luminary 116.
055319,000027:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
055320,000028:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
055321,000029:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
055322,000030: 
055323,000031:                                                                                                  ## This source code has been transcribed or otherwise adapted from
055324,000032:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
055325,000033:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
055326,000034:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
055327,000035:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
055328,000036:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
055329,000037:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
055330,000038:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
055331,000039:                                                                                                  ## actually created.
055332,000040:                                                                                                  ##
055333,000041:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
055334,000042:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
055335,000043:                                                                                                  ## the listing from which it was transcribed. It has been verified to
055336,000044:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
055337,000045:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
055338,000046:                                                                                                  ##
055339,000047:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
055340,000048:                                                                                                  ##
055341,000049:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
055342,000050: 

Page 1268

055344,000052:                                                                                                  #  THE TFF SUBROUTINES MAY BE USED IN EITHER EARTH OR MOON CENTERED COORDINATES.  THE TFF ROUTINES NEVER
055345,000053:                                                                                                  #  KNOW WHICH ORIGIN APPLIES.  IT IS THE USER WHO KNOWS, AND WHO SUPPLIES RONE, VONE AND 1/SQRT(MU) AT THE
055346,000054:                                                                                                  #  APPROPRIATE SCALE LEVEL FOR THE PROPER PRIMARY BODY.
055347,000055: 
055348,000056:                                                                                                  #        EARTH ORIGIN    POSITION        -29     METERS
055349,000057:                                                                                                  #                        VELOCITY        -7      METERS/CENTISECOND
055350,000058:                                                                                                  #                        1/SQRT(MU)      +17     SQRT(CS SQ/METERS CUBED)
055351,000059: 
055352,000060:                                                                                                  #        MOON ORIGIN     POSITION        -27     METERS
055353,000061:                                                                                                  #                        VELOCITY        -5      METERS/CENTISECONDS
055354,000062:                                                                                                  #                        1/SQRT(MU)      +14     SQRT(CS SQ/METERS CUBED)
055355,000063: 
055356,000064:                                                                                                  #  ALL DATA PROVIDED TO AND RECEIVED FROM ANY TFF SUBROUTINE WILL BE AT ONE OF THE LEVELS ABOVE.  IN ALL CASES,
055357,000065:                                                                                                  #  THE FREE FALL TIME IS RETURNED IN CENTISECONDS AT (-28).  PROGRAM TFF/CONIC WILL GENERATE VONE/RTMU AND
055358,000066:                                                                                                  #  LEAVE IT IN VONE' AT (+10) IF EARTH ORIGIN AND (+9) IF MOON ORIGIN.
055359,000067: 
055360,000068:                                                                                                  #  THE USER MUST STORE THE STATE VECTOR IN RONE, VONE  AND MU IN THE FORM 1/SQRT(MU) IN TFF/RTMU
055361,000069:                                                                                                  #  AT THE PROPER SCALE BEFORE CALLING TFF/CONIC.  SINCE RONE, VONE ARE IN THE EXTENDED VERB STORAGE AREA,
055362,000070:                                                                                                  #  THE USER MUST ALSO LOCK OUT THE EXTENDED VERBS, AND RELEASE THEM WHEN FINISHED.
055363,000071: 
055364,000072:                                                                                                  #  PROGRAMS CALC/TFF AND CALC/TPER ASSUME THAT THE TERMINAL RADIUS IS LESS THAN THE PRESENT
055365,000073:                                                                                                  #  RADIUS.  THIS RESTRICTION CAN BE REMOVED BY A 15 W CODING CHANGE, BUT AT PRESENT IT IS NOT DEEMED NECESSARY.
055366,000074: 
055367,000075:                                                                                                  #  THE FOLLOWING ERASABLE QUANTITIES ARE USED BY THE TFF ROUTINES, AND ARE LOCATED IN THE PUSH LIST.
055368,000076: 
055369,000077:                                                                                                  #                                        BELOW   E:  IS USED FOR EARTH ORIGIN SCALE
055370,000078:                                                                                                  #                                                M:  IS USED FOR MOON  ORIGIN SCALE
055371,000079: 
055372,000080:                                                                                                  # TFFSW          =       119D    BIT1    0 = CALCTFF             1 = CALCTPER
055373,000081: 10,2213                        TFFDELQ            =        10D                                   #        Q2-Q1                   E: (-16)  M: (-15)
055374,000082: 10,2213                        RMAG1              =        12D                                   #        ABVAL(RN)  M            E: (-29)  M: (-27)
055375,000083:                                                                                                  # RPER           =       14D             PERIGEE RADIUS  M       E: (-29)  M: (-27)
055376,000084: 10,2213                        TFFQ1              =        14D                                   #        R.V / SQRT(MUE)         E: (-16)  M: (-15)
055377,000085:                                                                                                  # SDELF/2                                SIN(THETA) /2
055378,000086: 10,2213                        CDELF/2            =        14D                                   #        COS(THETA) /2
055379,000087:                                                                                                  # RAPO           =       16D             APOGEE RADIUS  M        E: (-29)  M: (-27)
055380,000088: 10,2213                        NRTERM             =        16D                                   #        TERMINAL RADIUS  M      E: (-29+NR)
055381,000089:                                                                                                  #                                          M: (-27+NR)
055382,000090: 10,2213                        RTERM              =        18D                                   #        TERMINAL RADIUS  M      E: (-29)  M: (-27)
055383,000091: 10,2213                        TFFVSQ             =        20D                                   #        -(V SQUARED/MU)  1/M    E: (20)   M: (18)
055384,000092: 10,2213                        TFF1/ALF           =        22D                                   #        SEMI MAJ AXIS  M        E: (-22-2 NA)
055385,000093:                                                                                                  #                                          M: (-20-2 NA)
055386,000094: 10,2213                        TFFRTALF           =        24D                                   #        SQRT(ALFA)              E:(10+NA) M: (9+NA)
055387,000095: 10,2213                        TFFALFA            =        26D                                   #        ALFA  1/M               E:(26-NR) M: (24-NR)
055388,000096: 10,2213                        TFFNP              =        28D                                   #        SEMI LATUS RECTUM  M    E: (-38+2 NR)
055389,000097:                                                                                                  #                                          M: (-36+2 NR)
055390,000098: 10,2213                        TFF/RTMU           =        30D                                   #        1/SQRT(MU)              E: (17)   M: (14)
055391,000099: 10,2213                        NRMAG              =        32D                                   #        PRESENT RADIUS  M       E: (-29+NR)
055392,000100:                                                                                                  #                                          M: (-27+NR)
055393,000101: 10,2213                        TFFX               =        34D                                   
055394,000102: 10,2213                        TFFTEM             =        36D                                   #        TEMPORARY

Page 1269

055396,000104:                                                                                                  #                REGISTERS S1, S2 ARE UNTOUCHED BY ANY TFF SUBROUTINE
055397,000105:                                                                                                  #                INDEX REGISTERS X1, X2 ARE USED BY ALL TFF SUBROUTINES.  THEY ARE ESTAB-
055398,000106:                                                                                                  #                LISHED IN TFF/CONIC AND MUST BE PRESERVED BETWEEN CALLS TO SUBSEQUENT
055399,000107:                                                                                                  #                SUBROUTINES.
055400,000108:                                                                                                  #                -NR                             C(X1) = NORM COUNT OF RMAG
055401,000109:                                                                                                  #                -NA                             C(X2) = NORM COUNT OF SQRT(ABS(ALFA))
055402,000110: 

Page 1270

055404,000112:                                                                                                  #  SUBROUTINE NAME:  TFFCONIC                                            DATE:  01.29.67
055405,000113:                                                                                                  #  MOD NO:  0                                                            LOG SECTION:  TIME OF FREE FALL
055406,000114:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
055407,000115:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67
055408,000116:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 21 NOV 67         ADD MOON MU.
055409,000117:                                                                                                  #  MOD NO:  3    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
055410,000118: 
055411,000119:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THIS SUBROUTINE IS CALLED TO COMPUTE THOSE CONIC PARAMETERS REQUIRED BY THE TFF
055412,000120:                                                                                                  #        SUBROUTINES AND TO ESTABLISH THEM IN THE PUSH LIST AREA.  THE PARAMETERS ARE LISTED UNDER OUTPUT.
055413,000121:                                                                                                  #        THE EQUATIONS ARE
055414,000122:                                                                                                  #                -   -  -
055415,000123:                                                                                                  #                H = RN*VN                       ANGULAR MOMENTUM
055416,000124:                                                                                                  #                      - -
055417,000125:                                                                                                  #                LCP = H.H / MU                  SEMI LATUS RECTUM
055418,000126:                                                                                                  #                              -  - 
055419,000127:                                                                                                  #                ALFA = 2/RN - VN.VN / MU        RECIPROCAL SEMI MAJ AXIS, SIGNED
055420,000128: 
055421,000129:                                                                                                  #        AND ALFA IS POS FOR ELLIPTIC ORBITS
055422,000130:                                                                                                  #                      0 FOR PARABOLIC ORBITS
055423,000131:                                                                                                  #                    NEG FOR HYPERBOLIC ORBITS.
055424,000132:                                                                                                  #        SUBROUTINE ALSO COMPUTES AND SAVES RMAG.
055425,000133: 
055426,000134:                                                                                                  #  CALLING SEQUENCE:
055427,000135:                                                                                                  #        TFFCONIC EXPECTS CALLER TO ENTER WITH CORRECT GRAVITATIONAL CONSTANT IN MPAC, IN THE FORM
055428,000136:                                                                                                  #        1/SQRT(MU).  PROGRAM WILL SAVE IN TFF/RTMU.  THE SCALE IS DETERMINED BY WHETHER EARTH OR MOON
055429,000137:                                                                                                  #        ORIGIN IS USED.  THE CALLER MUST LOCK OUT THE EXTENDED VERBS BEFORE PROVIDING STATE VECTOR IN RONE,
055430,000138:                                                                                                  #        VONE AT PROPER SCALE.  THE EXTENDED VERBS MUST BE RESTORED WHEN THE CALLER IS FINISHED USING THE
055431,000139:                                                                                                  #        TFF ROUTINES.
055432,000140: 
055433,000141:                                                                                                  #        ENTRY POINT TFFCONMU EXPECTS THAT TFF/RTMU IS ALREADY LOADED.
055434,000142: 
055435,000143:                                                                                                  #        TO SPECIFY MU:  DLOAD   CALL                            IF MU ALREADY STORED:   CALL
055436,000144:                                                                                                  #                                YOURMU  1/RTMU E:(17) M:(14)                                    TFFCONMU
055437,000145:                                                                                                  #                                TFFCONIC
055438,000146:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY IF LEQ 18D
055439,000147: 
055440,000148:                                                                                                  #  SUBROUTINES CALLED:  NONE
055441,000149: 
055442,000150:                                                                                                  #  NORMAL EXIT MODES:  RVQ
055443,000151: 
055444,000152:                                                                                                  #  ALARMS:  NONE
055445,000153: 
055446,000154:                                                                                                  #  OUTPUT:       THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
055447,000155:                                                                                                  #                RMAG1           E:(-29) M:(-27) M  RN, PRESENT RADIUS LENGTH.
055448,000156:                                                                                                  #                NRMAG           E:(-29+NR)      M  RMAG, NORMALIZED
055449,000157:                                                                                                  #                                M:(-27+NR)
055450,000158:                                                                                                  #                X1                              -NR, NORM COUNT
055451,000159:                                                                                                  #                TFFNP           E:(-38+2NR)     M  LCP, SEMI LATUS RECTUM, WEIGHTED BY NR.      FOR VGAMCALC
055452,000160:                                                                                                  #                                M:(-36+2NR)
055453,000161:                                                                                                  #                TFF/RTMU        E:(17) M:(14)   1/SQRT(MU)
055454,000162:                                                                                                  #                TFFVSQ          E:(20) M:(18)   1/M  -(V SQ/MU):  PRESENT VELOCITY,NORMLIZED.   FOR VGAMCALC
055455,000163:                                                                                                  #                TFFALFA         E:(26-NR)       1/M  ALFA, WEIGHTED BY NR
055456,000164:                                                                                                  #                                M:(24-NR)
055457,000165:                                                                                                  #                TFFRTALF        E:(10+NA)       SQRT(ALFA), NORMALIZED
055458,000166:                                                                                                  #                                M:(9+NA)

Page 1271

055460,000168:                                                                                                  #                X2                              -NA, NORMCOUNT
055461,000169:                                                                                                  #                TFF1/ALF        E:(-22-2NA)     SIGNED SEMI MAJ AXIS, WEIGHTED BY NA
055462,000170:                                                                                                  #                                M:(-20-2NA)
055463,000171:                                                                                                  #                PUSHLOC AT PDL+0
055464,000172: 
055465,000173:                                                                                                  #        THE FOLLOWING IS STORED IN GENERAL ERASABLE
055466,000174:                                                                                                  #                VONE'           E:(10) M:(9)    V/RT(MU), NORMALIZED VELOCITY
055467,000175: 
055468,000176:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
055469,000177:                                                                                                  #                RONE            E:(-29) M:(-27) M  STATE VECTOR         LEFT BY CALLER
055470,000178:                                                                                                  #                VONE            E:(-7) M:(-5)   M/CS  STATE VECTOR      LEFT BY CALLER
055471,000179:                                                                                                  #                TFF/RTMU        E:(17) M:(14)   1/RT(CS SQ/M CUBE)      IF ENTER VIA TFFCONMU.
055472,000180: 
055473,000181:                                                                                                  #  DEBRIS:       QPRET,          PDL+0 ... PDL+3
055474,000182: 
055475,000183: 33,3777                                           BANK     33                                    
055476,000184: 27,2000                                           SETLOC   TOF-FF                                
055477,000185: 27,2000                                           BANK                                           
055478,000186: 
055479,000187: 27,3360                                           COUNT*   $$/TFF                                
055480,000188: 
055481,000189: 27,3360           00037        TFFCONIC           STORE    TFF/RTMU                              #  1/SQRT(MU)    E:(17) M:(14)
055482,000190: 
055483,000191: 27,3361           53575        TFFCONMU           VLOAD    UNIT                                  #  COME HERE WITH TFFRTMU LOADED.
055484,000192: 27,3362           02207                                    RONE                                  #  SAVED RN.  M  E:(-29) M:(-27)
055485,000193: 27,3363           77725                           PDDL                                           #  UR/2 TO PDL+0, +5
055486,000194: 27,3364           00045                                    36D                                   #  MAGNITUDE
055487,000195: 27,3365           00015                           STORE    RMAG1                                 #  M  E:(-29) M:(-27)
055488,000196: 
055489,000197: 27,3366           77701                           NORM                                           
055490,000198: 27,3367           00047                                    X1                                    #  -NR
055491,000199: 27,3370           24041                           STOVL    NRMAG                                 #  RMAG  M  E:(-29+NR) M:(-27+NR)
055492,000200: 27,3371           02215                                    VONE                                  #  SAVED VN.  M/CS  E:(-7) M:(-5)
055493,000201: 27,3372           77761                           VXSC                                           
055494,000202: 27,3373           00037                                    TFF/RTMU                              #  E:(17) M:(14)
055495,000203: 27,3374           02170                           STORE    VONE'                                 #  VN/SQRT(MU)  E:(10) M:(9)
055496,000204: 
055497,000205: 27,3375           47361                           VXSC     VXV                                   
055498,000206: 27,3376           00041                                    NRMAG                                 #  E:(-29+NR) M:(-27+NR)
055499,000207:                                                                                                  #  UR/2 FROM PDL
055500,000208: 27,3377           47572                           VSL1     VSQ                                   #  BEFORE:  E:(-19+NR) M:(-18+NR)
055501,000209: 27,3400           14035                           STODL    TFFNP                                 #  LC P  M  E:(-38+2NR) M:(-36+2NR)
055502,000210:                                                                                                  #  SAVE ALSO FOR VGAMCALC
055503,000211: 27,3401           06512                                    TFF1/4                                
055504,000212: 27,3402           63271                           DDV      PDVL                                  #  (2/RMAG)  1/M  E:(26-NR) M:(24-NR)
055505,000213: 27,3403           00041                                    NRMAG                                 #  RMAG  M  E:(-29+NR) M:(-27+NR)
055506,000214: 27,3404           02170                                    VONE'                                 #  SAVED VN.  E:(10) M:(9)
055507,000215: 27,3405           57436                           VSQ      DCOMP                                 #  KEEP MPAC+2 HONEST FOR SQRT.
055508,000216: 27,3406           00025                           STORE    TFFVSQ                                #  -(V SQ/MU)  E:(20) M:(18)
055509,000217:                                                                                                  #  SAVE FOR VGAMCALC
055510,000218: 27,3407           43257                           SR*      DAD                                   

Page 1272

055512,000220: 27,3410           20573                                    0          -6,1                       #  GET -VSQ/MU  E:(26-NR) M:(24-NR)
055513,000221: 27,3411           77626                           STADR                                          
055514,000222:                                                                                                  #  2/RMAG  FROM PDL+2
055515,000223: 27,3412           77744                           STORE    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
055516,000224: 27,3413           41457                           SL*      PUSH                                  #  TEMP SAVE ALFA  E:(20) M:(18)
055517,000225: 27,3414           20173                                    0          -6,1                       
055518,000226: 27,3415           75446                           ABS      SQRT                                  #  E:(10) M:(9)
055519,000227: 27,3416           77701                           NORM                                           
055520,000228: 27,3417           00050                                    X2                                    #  X2 = -NA
055521,000229: 27,3420           00031                           STORE    TFFRTALF                              #  SQRT( ABS(ALFA) )  E:(10+NA) M:(9+NA)
055522,000230: 27,3421           75316                           DSQ      SIGN                                  #  NOT SO ACCURATE, BUT OK
055523,000231:                                                                                                  #  ALFA FROM PDL+2  E:(20) M:(18)
055524,000232: 27,3422           55254                           BZE      BDDV                                  #  SET 1/ALFA =0, TO SHOW SMALL ALFA
055525,000233: 27,3423           57425                                    +2                                    
055526,000234: 27,3424           06512                                    TFF1/4                                
055527,000235: 27,3425           00027                 +2        STORE    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055528,000236: 27,3426           77616        DUMPCNIC           RVQ                                            
055529,000237: 
055530,000238:                                                                                                  #                                                              39 W

Page 1273

055532,000240:                                                                                                  #  SUBROUTINE NAME:  TFFRP/RA                                            DATE: 01.17.67
055533,000241:                                                                                                  #  MOD NO:  0                                                            LOG SECTION:  TIME OF FREE FALL
055534,000242:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
055535,000243:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67
055536,000244:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
055537,000245:                                                                                                  #                                                                        ALSO IMPROVE ACCURACY OF RAPO.
055538,000246: 
055539,000247:                                                                                                  #  FUNCTIONAL DESCRIPTION:  USED BY CALCTPER AND TFF DISPLAYS TO CALCULATE PERIGEE RADIUS AND ALSO
055540,000248:                                                                                                  #        APOGEE RADIUS FOR A GENERAL CONIC.
055541,000249:                                                                                                  #        PROGRAM GIVES PERIGEE RADIUS AS         APOGEE RADIUS IS GIVEN BY
055542,000250:                                                                                                  #                RP = P/(1+E)                            RA = (1+E) / ALFA
055543,000251:                                                                                                  #        WHERE    2
055544,000252:                                                                                                  #                E  = 1 - P ALFA
055545,000253:                                                                                                  #        IF RA IS NEGATIVE OR SHOWS DIVIDE OVERFLOW, THEN RA = POSMAX BECAUSE
055546,000254:                                                                                                  #                1. APOGEE RADIUS IS NOT MEANINGFUL FOR HYPERBOLA
055547,000255:                                                                                                  #                2. APOGEE RADIUS IS NOT DEFINED FOR PARABOLA
055548,000256:                                                                                                  #                3. APOGEE RADIUS EXCEEDS THE SCALING FOR ELLIPSE.
055549,000257: 
055550,000258:                                                                                                  #        THIS SUBROUTINE REQUIRES THE SIGNED RECIPROCAL SEMI MAJ AXIS, ALFA, AND SEMI LATUS RECTUM AS DATA.
055551,000259: 
055552,000260:                                                                                                  #  CALLING SEQUENCE:     CALL
055553,000261:                                                                                                  #                                TFFRP/RA
055554,000262:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY IF LEQ 10D
055555,000263:                                                                                                  #        C(MPAC) UNSPECIFIED
055556,000264: 
055557,000265:                                                                                                  #  SUBROUTINES CALLED:   NONE
055558,000266: 
055559,000267:                                                                                                  #  NORMAL EXIT MODE:     RVQ
055560,000268:                                                                                                  #        IF ELLIPSE, WITHIN NORMAL SCALING, RAPO IS CORRECT.
055561,000269:                                                                                                  #        OTHERWISE, RAPO = POSMAX.
055562,000270: 
055563,000271:                                                                                                  #  ALARMS:       NONE
055564,000272: 
055565,000273:                                                                                                  #  OUTPUT:       STORED IN PUSH LIST AREA.  SCALE OF OUTPUT AGREES WITH DATA SUPPLIED TO TFF/CONIC.
055566,000274:                                                                                                  #        RPER    E:(-29) M:(-27)         M       PERIGEE RADIUS          DESTROYED BY CALCTFF/CALCTPER, TFFTRIG.
055567,000275:                                                                                                  #        RAPO    E:(-29) M:(-27)         M       APOGEE RADIUS           WILL BE DESTROYED BY CALCTFF/CALCTPER
055568,000276:                                                                                                  #        PUSHLOC AT PDL+0
055569,000277: 
055570,000278:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
055571,000279:                                                                                                  #        TFFALFA E:(26-NR)               M       1/SEMI MAJ AXIS         LEFT BY TFFCONIC
055572,000280:                                                                                                  #                M:(24-NR)
055573,000281:                                                                                                  #        TFFNP   E:(-38+2NR)             M       LC P, SEMI LATUS RECTUM LEFT BY TFFCONIC
055574,000282:                                                                                                  #                M:(-36+2NR)
055575,000283:                                                                                                  #        X1                              -NR, NORM COUNT OF RMAG         LEFT BY TFFCONIC
055576,000284:                                                                                                  #        X2                              -NA, NORM COUNT OF ALFA         LEFT BY TFFCONIC
055577,000285: 
055578,000286:                                                                                                  #  DEBRIS:       QPRET, PDL+0 ... PDL+1
055579,000287: 

Page 1274

055581,000289: 27,3427                        RAPO               =        16D                                   #  APOGEE RADIUS  M  E:(-29) M:(-27)
055582,000290: 27,3427                        RPER               =        14D                                   #  PERIGEE RADIUS  M  E:(-29) M:(-27)
055583,000291: 
055584,000292: 27,3427           41345        TFFRP/RA           DLOAD    DMP                                   
055585,000293: 27,3430           00033                                    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
055586,000294: 27,3431           00035                                    TFFNP                                 #  LC P  M E:(-38+2NR) M:(-36+2NR)
055587,000295: 27,3432           57457                           SR*      DCOMP                                 #  ALFA P (-12+NR)
055588,000296: 27,3433           20571                                    0          -8D,1                      #  ALFA P (-4)
055589,000297: 27,3434           51415                           DAD      ABS                                   #  (DCOMP GIVES VALID TP RESULT FOR SQRT)
055590,000298:                                                                                                  #  (ABS PROTECTS SQRT IF E IS VERY NEAR 0)
055591,000299: 27,3435           17765                                    DP2(-4)                               
055592,000300: 27,3436           43366                           SQRT     DAD                                   #  E SQ = (1- P ALFA) (-4)
055593,000301: 27,3437           06512                                    TFF1/4                                
055594,000302: 27,3440           55206                           PUSH     BDDV                                  #  (1+E)  (-2)  TO PDL+0
055595,000303: 27,3441           00035                                    TFFNP                                 #  LCP  M  E:(-38+2NR) M:(-36+2NR)
055596,000304: 27,3442           53657                           SR*      SR*                                   #  (DOES SR THEN SL TO AVOID OVFL)
055597,000305: 27,3443           20601                                    0,1                                   #  X1=-NR
055598,000306: 27,3444           20572                                    0          -7,1                       #  (EFFECTIVE SL)
055599,000307: 27,3445           14017                           STODL    RPER                                  #  PERIGEE RADIUS  M  E:(-29) M:(-27)
055600,000308:                                                                                                  #  (1+E)  (-2)  FROM PDL+0
055601,000309: 27,3446           41005                           DMP      BOVB                                  
055602,000310: 27,3447           00027                                    TFF1/ALF                              #  E:(-22-2NA) M:(-20-2NA)
055603,000311: 27,3450           57753                                    TCDANZIG                              #  CLEAR OVFIND, IF ON.
055604,000312: 27,3451           53654                           BZE      SL*                                   
055605,000313: 27,3452           57461                                    MAXRA                                 #  SET POSMAX, IF ALFA=0
055606,000314: 27,3453           57603                                    0          -5,2                       #  -5+NA
055607,000315: 27,3454           40057                           SL*      BOV                                   
055608,000316: 27,3455           57576                                    0,2                                   
055609,000317: 27,3456           57461                                    MAXRA                                 #  SET POSMAX IF OVFL.
055610,000318: 27,3457           77644                           BPL                                            #  CONTINUE WITH VALID RAPO.
055611,000319: 27,3460           57463                                    +3                                    
055612,000320: 27,3461           77745        MAXRA              DLOAD                                          #  RAPO CALC IS NOT VALID.  SET RAPO =
055613,000321: 27,3462           17771                                    NEARONE                               #  POSMAX AS A TAG.
055614,000322: 27,3463           00021                 +3        STORE    RAPO                                  #  APOGEE RADIUS  M  E:(-29) M:(-27)
055615,000323: 27,3464           77616        DUMPRPRA           RVQ                                            
055616,000324: 
055617,000325:                                                                                                  #                                                                30 W

Page 1275

055619,000327:                                                                                                  #  SUBROUTINE NAME:  CALCTPER / CALCTFF                                  DATE:  01.29.67
055620,000328:                                                                                                  #  MOD NO:  0                                                            LOG SECTION:  TIME OF FREE FALL
055621,000329:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
055622,000330:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 67
055623,000331:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 14 APR 67
055624,000332:                                                                                                  #  MOD NO:  3    MOD BY:  RR BAIRNSFATHER        DATE: 8 JUL 67          NEAR EARTH MUE AND NEG TFF (GONEPAST)
055625,000333:                                                                                                  #  MOD NO:  4    MOD BY:  RR BAIRNSFATHER        DATE: 21 NOV 67         ADD VARIABLE MU.
055626,000334:                                                                                                  #  MOD NO:  5    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
055627,000335: 
055628,000336:                                                                                                  #  FUNCTIONAL DESCRIPTION:  PROGRAM CALCULATES THE FREE-FALL TIME OF FLIGHT FROM PRESENT POSITION RN AND
055629,000337:                                                                                                  #        VELOCITY VN TO A RADIUS LENGTH SPECIFIED BY RTERM, SUPPLIED BY THE USER.  THE POSITION VECTOR
055630,000338:                                                                                                  #        RN MAY BE ON EITHER SIDE OF THE CONIC, BUT RTERM IS CONSIDERED ON THE INBOUND SIDE.
055631,000339:                                                                                                  #        THE EQUATIONS ARE
055632,000340: 
055633,000341:                                                                                                  #                Q2 = -SQRT(RTERM (2-RTERM ALFA) - LCP)  (INBOUND SIDE)) LEQ +- LCE/SQRT(ALFA)
055634,000342:                                                                                                  #                     -  -
055635,000343:                                                                                                  #                Q1 = RN.VN / SQRT(MU)                                   LEQ +- LCE/SQRT(ALFA)
055636,000344: 
055637,000345:                                                                                                  #                Z = NUM / DEN                                           LEQ +- 1/SQRT(ALFA)
055638,000346: 
055639,000347:                                                                                                  #        WHERE, IF INBOUND
055640,000348:                                                                                                  #                NUM = RTERM -RN                                         LEQ +- 2 LCE/ALFA
055641,000349:                                                                                                  #                DEN = Q2+Q1                                             LEQ +- 2 LCE/SQRT(ALFA)
055642,000350: 
055643,000351:                                                                                                  #        AND, IF OUTBOUND
055644,000352:                                                                                                  #                NUM = Q2-Q1                                             LEQ +- 2 LCE/SQRT(ALFA)
055645,000353:                                                                                                  #                DEN = 2 - ALFA (RTERM + RN).                            LEQ +- 2 LCE
055646,000354: 
055647,000355:                                                                                                  #        IF      ALFA ZZ < 1.0           (FOR ALL CONICS EXCEPT ELLIPSES HAVING ABS(DEL ECC ANOM) G 90 DEG)
055648,000356:                                                                                                  #        THEN    X = ALFA Z Z
055649,000357:                                                                                                  #        AND     TFF = (RTERM +RN -2 ZZ T(X) ) Z/SQRT(MU)
055650,000358:                                                                                                  #                EXCEPT  IF ALFA PNZ, AND IF TFF NEG,
055651,000359:                                                                                                  #                THEN    TFF = 2 PI /(ALFA SQRT(ALFA)) + TFF
055652,000360:                                                                                                  #        OR      IF ALFA ZZ GEQ 1.0      (FOR ELLIPSES HAVING ABS(DEL ECC ANOM) GEQ 90 DEG)
055653,000361:                                                                                                  #        THEN    X = 1/ALFA Z Z
055654,000362:                                                                                                  #        AND     TFF = (PI/SQRT(ALFA) -Q2 +Q1 +2(X T(X) -1) /ALFA Z) /ALFA SQRT(MU)
055655,000363:                                                                                                  #        WHERE   T(X) IS A POLYNOMIAL APPROXIMATION TO THE SERIES
055656,000364:                                                                                                  #                             2      3             2
055657,000365:                                                                                                  #                1/3 - X/5 + X /7 - X /9 ...     (X  < 1.0)
055658,000366: 
055659,000367:                                                                                                  #  CALLING SEQUENCE:     TIME TO RTERM                   TIME TO PERIGEE
055660,000368:                                                                                                  #                        CALL                            CALL
055661,000369:                                                                                                  #                                CALCTFF                         CALCTPER
055662,000370:                                                                                                  #                        C(MPAC) = TERMNL RAD M          C(MPAC) = PERIGEE RAD M
055663,000371:                                                                                                  #        FOR EITHER, E:(-29) M:(-27)
055664,000372:                                                                                                  #        FOR EITHER, PUSHLOC = PDL+0, ARBITRARY IF LEQ 8D.

Page 1276

055666,000374: 
055667,000375:                                                                                                  #  SUBROUTINES CALLED:   T(X), VIA RTB
055668,000376: 
055669,000377:                                                                                                  #  NORMAL EXIT MODE:     RVQ
055670,000378:                                                                                                  #        HOWEVER, PROGRAM EXITS WITH ONE OF THE FOLLOWING VALUES FOR TFF (-28) CS IN MPAC.  USER MUST STORE.
055671,000379:                                                                                                  #                A. TFF = FLIGHT TIME.  NORMAL CASE FOR POSITIVE FLIGHT TIME LESS THAN ONE ORBITAL PERIOD.
055672,000380:                                                                                                  #                B. (THIS OPTION IS NO LONGER USED.)
055673,000381:                                                                                                  #                C. TFF = POSMAX.  THIS INDICATES THAT THE CONIC FROM THE PRESENT POSITION WILL NOT RETURN TO
055674,000382:                                                                                                  #                   THE SPECIFIED ALTITUDE.  ALSO INDICATES OUTBOUND PARABOLA OR HYPERBOLA.
055675,000383: 
055676,000384:                                                                                                  #  OUTPUT:       C(MPAC)         (-28) CS        TIME OF FLIGHT, OR TIME TO PERIGEE
055677,000385:                                                                                                  #                TFFX            (0)             X,                                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
055678,000386:                                                                                                  #                NRTERM          E:(-29+NR) M    RTERM, WEIGHTED BY NR                   LEFT FOR ENTRY DISPLAY TFF ROUTINES
055679,000387:                                                                                                  #                                M:(-27+NR)
055680,000388:                                                                                                  #                TFFTEM          E:(-59+2NR)     LCP Z Z SGN(SDELF)                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
055681,000389:                                                                                                  #                                M:(-55+2NR)     LCP /ALFA SGN(SDELF)                    LEFT FOR ENTRY DISPLAY TFF ROUTINES
055682,000390:                                                                                                  #                NOTE:   TFFTEM = PDL 36D AND WILL BE DESTROYED BY .:UNIT:.
055683,000391:                                                                                                  #                RMAG1           E:(-29) M:(-27) PDL 12 NOT TOUCHED.
055684,000392:                                                                                                  #                TFFQ1           E:(-16) M:(-15) PDL 14D
055685,000393:                                                                                                  #                TFFDELQ         E:(-16) M:(-15) PDL 10D
055686,000394:                                                                                                  #                PUSHLOC AT PDL+0
055687,000395: 
055688,000396:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
055689,000397:                                                                                                  #                RONE            E:(-29) M:(-27) M  STATE VECTOR                         LEFT BY USER
055690,000398:                                                                                                  #                VONE'           E:(+10) M:(+9)  VN/SQRT(MU)                             LEFT BY TFF/CONIC
055691,000399:                                                                                                  #                RMAG1           E:(-29) M:(-27) PRESENT RADIUS, M                       LEFT BY TFFCONIC
055692,000400:                                                                                                  #                C(MPAC)         E:(-29) M:(-27) RTERM, TERMINAL RADIUS LENGTH, M        LEFT BY USER
055693,000401: 
055694,000402:                                                                                                  #                THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
055695,000403:                                                                                                  #                TFF/RTMU        E:(17) M:(14)   1/SQRT(MU)                              LEFT BY TFFCONIC.
055696,000404:                                                                                                  #                NRMAG           E:(-29+NR)      M  RMAG, NORMALIZED                     LEFT BY TFFCONIC
055697,000405:                                                                                                  #                                M:(-27+NR)
055698,000406:                                                                                                  #                X1                              -NR, NORM COUNT                         LEFT BY TFFCONIC
055699,000407:                                                                                                  #                TFFNP           E:(-38+2NR)     M  LCP, SEMI LATUS RECTUM, WEIGHT NR    LEFT BY TFFCONIC
055700,000408:                                                                                                  #                                M:(-36+2NR)
055701,000409:                                                                                                  #                TFFALFA         E:(26-NR)       1/M  ALFA, WEIGHT NR                    LEFT BY TFFCONIC
055702,000410:                                                                                                  #                                M:(24-NR)
055703,000411:                                                                                                  #                TFFRTALF        E:(10+NA)       SQRT(ALFA), NORMALIZED                  LEFT BY TFFCONIC
055704,000412:                                                                                                  #                                M:(9+NA)
055705,000413:                                                                                                  #                X2                              -NA, NORMCOUNT                          LEFT BY TFFCONIC
055706,000414:                                                                                                  #                TFF1/ALF        E:(-22-2NA)     SIGNED SEMIMAJ AXIS, WEIGHTED BY NA     LEFT BY TFFCONIC
055707,000415:                                                                                                  #                                M:(-20-2NA)
055708,000416: 
055709,000417:                                                                                                  #  DEBRIS:       QPRET, PDL+0 ... PDL+3
055710,000418:                                                                                                  #                RTERM           E:(-29) M:(-27) RTERM, TERMINAL RADIUS LENGTH
055711,000419:                                                                                                  #                RAPO            E:(-29) M:(-27) PDL 16D (=NRTERM)
055712,000420:                                                                                                  #                RPER            E:(-29) M:(-27) PDL 14D (=TFFQ1)
055713,000421: 

Page 1277

055715,000423: 27,3465           77614        CALCTPER           SETGO                                          #  ENTER WITH RPER IN MPAC
055716,000424: 27,3466           03436                                    TFFSW                                 
055717,000425: 27,3467           57472                                    +3                                    
055718,000426: 27,3470           77614        CALCTFF            CLEAR                                          #  ENTER WITH RTERM IN MPAC
055719,000427: 27,3471           03676                                    TFFSW                                 
055720,000428: 27,3472           00023                 +3        STORE    RTERM                                 #  E:(-29) M:(-27)
055721,000429: 27,3473           77657                           SL*                                            
055722,000430: 27,3474           20201                                    0,1                                   #  X1=-NR
055723,000431: 27,3475           00021                           STORE    NRTERM                                #  RTERM  E:(-29+NR) M:(-27+NR)
055724,000432: 27,3476           44205                           DMP      BDSU                                  
055725,000433: 27,3477           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
055726,000434: 27,3500           06512                                    TFF1/4                                
055727,000435: 27,3501           41206                           PUSH     DMP                                   #  (2-ALFA RTERM)  (-3)  TO PDL+0
055728,000436: 27,3502           00021                                    NRTERM                                #  E:(-29+NR) M:(-27+NR)
055729,000437: 27,3503           53725                           PDDL     SR*                                   #  RTERM(2-ALFA RTERM) TO PDL+2
055730,000438:                                                                                                  #  E:(-32+NR) M:(-30+NR)
055731,000439: 27,3504           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
055732,000440: 27,3505           20573                                    0          -6,1                       #  X1 = -NR
055733,000441: 27,3506           43276                           DCOMP    DAD                                   #  DUE TO SHIFTS, KEEP PRECISION FOR SQRT
055734,000442:                                                                                                  #  RTERM(2-ALFA RTERM) FROM PDL +2
055735,000443:                                                                                                  #  E:(-32+NR) M:(-30+NR)
055736,000444: 27,3507           77657                           SR*                                            #  LEAVE  E:(-32) M:(-30)
055737,000445: 27,3510           20601                                    0,1                                   #  X1 = -NR
055738,000446: 27,3511           71214                           BOFF     DLOAD                                 #  CHECK TFF /TPER SWITCH
055739,000447: 27,3512           03756                                    TFFSW                                 
055740,000448: 27,3513           57515                                    +2                                    #  IF TFF, CONTINUE
055741,000449: 27,3514           06522                                    TFFZEROS                              #  IF TPER, SET Q2 = 0
055742,000450: 27,3515           75440                 +2        BMN      SQRT                                  #  E:(-16) M:(-15)
055743,000451: 
055744,000452: 27,3516           57650                                    MAXTFF1                               #  NO FREE FALL CONIC TO RTERM FROM HERE
055745,000453:                                                                                                  #  RESET PDL, SET TFF=POSMAX, AND EXIT.
055746,000454: 
055747,000455: 27,3517           41076                           DCOMP    BOVB                                  #  RT IS ON INBOUND SIDE.  ASSURE OVFIND=0
055748,000456: 27,3520           57753                                    TCDANZIG                              #  ANY PORT IN A STORM.
055749,000457: 27,3521           24045                           STOVL    TFFTEM                                #  Q2  E:(-16) M:(-15)
055750,000458: 27,3522           02170                                    VONE'                                 #  VN/SQRT(MU)  E:(10) M:(9)
055751,000459: 27,3523           52441                           DOT      SL3                                   
055752,000460: 27,3524           02207                                    RONE                                  #  SAVED RN.  E:(-29) M:(-27)
055753,000461: 27,3525           00017                           STORE    TFFQ1                                 #  Q1, SAVE FOR GONEPAST TEST.
055754,000462:                                                                                                  #  E:(-16) M:(-15)
055755,000463: 27,3526           44240                           BMN      BDSU                                  
055756,000464: 27,3527           57550                                    INBOUND                               #  USE ALTERNATE Z
055757,000465: 27,3530           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
055758,000466: 
055759,000467:                                                                                                  #  OUTBOUND Z CALC CONTINUES HERE
055760,000468: 
055761,000469: 27,3531           14043                           STODL    TFFX                                  #  NUM=Q2-Q1  E:(-16) M:(-15)
055762,000470: 27,3532           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
055763,000471: 27,3533           44205                           DMP      BDSU                                  

Page 1278

055765,000473: 27,3534           00041                                    NRMAG                                 #  RMAG  E:(-29+NR) M:(-27+NR)
055766,000474:                                                                                                  #  (2-RTERM ALFA)  (-3) FROM PDL+0
055767,000475: 27,3535           51406        SAVEDEN            PUSH     ABS                                   #  DEN TO PDL+0  E:(-3) OR (-16)
055768,000476:                                                                                                  #                M:(-3) OR (-15)
055769,000477: 27,3536           40015                           DAD      BOV                                   #  INDETERMINANCY TEST
055770,000478: 27,3537           17757                                    LIM(-22)                              #  =1.0-B(-22)
055771,000479: 27,3540           57561                                    TFFXTEST                              #  GO IF DEN >/= B(-22)
055772,000480: 27,3541           65345                           DLOAD    PDDL                                  #  SET DEN=0 OTHERWISE
055773,000481: 27,3542           06522                                    TFFZEROS                              
055774,000482:                                                                                                  #  XCH ZERO WITH PDL+0
055775,000483: 27,3543           57545                           DLOAD    DCOMP                                 
055776,000484: 27,3544           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
055777,000485: 27,3545           71240                           BMN      DLOAD                                 #  FOR TPER:  Z INDET AT DELE/2=0 AND 90.
055778,000486: 27,3546           57655                                    TFFEL1                                #  ASSUME 90, AND LEAVE 0 IN PDL: 1/Z=D/N
055779,000487: 
055780,000488:                                                                                                  #  Z INDET. AT PERIGEE FOR PARAB OR HYPERB.
055781,000489: 27,3547           77616        DUMPTFF1           RVQ                                            #  RETURN TFF =0
055782,000490: 
055783,000491:                                                                                                  #  INBOUND Z CALC CONTINUES HERE
055784,000492: 
055785,000493: 27,3550           77745        INBOUND            DLOAD                                          #  RESET PDL+0
055786,000494: 27,3551           45345                           DLOAD    DSU                                   #  ALTERNATE Z CALC
055787,000495: 27,3552           00023                                    RTERM                                 #  E:(-29) M:(-27)
055788,000496: 27,3553           00015                                    RMAG1                                 #  E:(-29) M:(-27)
055789,000497: 27,3554           14043                           STODL    TFFX                                  #  NUM=RTERM-RN  E:(-29) M:(-27)
055790,000498: 27,3555           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
055791,000499: 27,3556           52015                           DAD      GOTO                                  
055792,000500: 27,3557           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
055793,000501: 27,3560           57535                                    SAVEDEN                               #  DEN = Q2+Q1  E:(-16) M:(-15)
055794,000502: 
055795,000503: 27,3561           65215        TFFXTEST           DAD      PDDL                                  #  (ABS(DEN) TO PDL+2))  E:(-3) OR (-16)
055796,000504:                                                                                                  #                        M:(-3) OR (-15)
055797,000505: 27,3562           17761                                    DP(-22)                               #  RESTORE ABS(DEN) TO MPAC
055798,000506: 27,3563           00043                                    TFFX                                  #  NUM  E:(-16) OR (-29)  M:(-15) OR (-27)
055799,000507: 27,3564           53605                           DMP      SR*                                   
055800,000508: 27,3565           00031                                    TFFRTALF                              #  SQRT(ALFA)  E:(10+NA) M:(9+NA)
055801,000509: 27,3566           57201                                    0          -3,2                       #  X2=-NA
055802,000510: 27,3567           77671                           DDV                                            #  C(MPAC) =NUM SQRT(ALFA)       E:(-3) OR (-16)
055803,000511:                                                                                                  #                                M:(-3) OR (-15)
055804,000512:                                                                                                  #  ABS(DEN) FROM PDL+2   E:(-3) OR (-16)
055805,000513:                                                                                                  #                        M:(-3) OR (-15)
055806,000514: 27,3570           40145                           DLOAD    BOV                                   #  (THE DLOAD IS SHARED WITH TFFELL)
055807,000515: 27,3571           00043                                    TFFX                                  #  NUM  E:(-16) OR (-29)  M:(-15) OR (-27)
055808,000516: 27,3572           57653                                    TFFELL                                #  USE EQN FOR DELE GEQ 90, LEQ -90
055809,000517: 
055810,000518:                                                                                                  #  OTHERWISE, CONTINUE FOR GENERAL CONIC FOR TFF EQN
055811,000519: 
055812,000520: 27,3573           45471                           DDV      STADR                                 
055813,000521:                                                                                                  #  DEN FROM PDL+0        E:(-3) OR (-16)
055814,000522:                                                                                                  #                        M:(-3) OR (-15)
055815,000523: 27,3574           77732                           STORE    TFFTEM                                #  Z SAVE FOR SIGN OF SDELF.

Page 1279

055817,000525:                                                                                                  #  E:(-13) M:(-12)
055818,000526: 27,3575           63406                           PUSH     DSQ                                   #  Z TO PDL+0
055819,000527: 27,3576           41206                           PUSH     DMP                                   #  Z SQ TO PDL+2  E:(-26) M:(-24)
055820,000528: 27,3577           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
055821,000529: 27,3600           75261                           SL       SIGN                                  
055822,000530: 27,3601           20206                                    5                                     
055823,000531: 27,3602           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF (ENTRY DISPLAY)
055824,000532: 27,3603           14045                           STODL    TFFTEM                                #  P ZSQ  E:(-59+2NR) M:(-55+2NR)
055825,000533:                                                                                                  #  (ARG IS USED IN TFF/TRIG)
055826,000534:                                                                                                  #  ZSQ FROM PDL+2  E:(-26) M:(-24)
055827,000535: 27,3604           41206                           PUSH     DMP                                   #  RESTORE PUSH LOC
055828,000536: 27,3605           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
055829,000537: 27,3606           77657                           SL*                                            
055830,000538: 27,3607           20201                                    0,1                                   #  X1=-NR
055831,000539: 27,3610           00043                           STORE    TFFX                                  #  X
055832,000540: 27,3611           41234                           RTB      DMP                                   
055833,000541: 27,3612           57735                                    T(X)                                  #  POLY
055834,000542:                                                                                                  #  ZSQ FROM PDL+2  E:(-26) M:(-24)
055835,000543: 27,3613           44302                           SR2      BDSU                                  #  2 ZSQ T(X)  E:(-29) M:(-27)
055836,000544: 27,3614           00023                                    RTERM                                 #  RTERM  E:(-29) M:(-27)
055837,000545: 27,3615           41215                           DAD      DMP                                   
055838,000546: 27,3616           00015                                    RMAG1                                 #  E:(-29) M:(-27)
055839,000547:                                                                                                  #  Z FROM PDL+0  E:(-13) M:(-12)
055840,000548: 27,3617           51042                           SR3      BPL                                   #  TFF SQRT(MU)  E:(-45) M:(-42)
055841,000549: 27,3620           57641                                    ENDTFF                                #  (NO PUSH UP)
055842,000550: 27,3621           75206                           PUSH     SIGN                                  #  TFF SQRT(MU) TO PDL+0
055843,000551: 27,3622           00017                                    TFFQ1                                 #  Q1 FOR GONEPAST TEST
055844,000552: 27,3623           71244                           BPL      DLOAD                                 #  GONE PAST ?
055845,000553: 27,3624           57645                                    NEGTFF                                #  YES. TFF < 0.
055846,000554: 27,3625           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055847,000555: 27,3626           51076                           DCOMP    BPL                                   #  ALFA > 0 ?
055848,000556: 27,3627           57645                                    NEGTFF                                #  NO. TFF IS NEGATIVE.
055849,000557: 
055850,000558:                                                                                                  #  CORRECT FOR ORBITAL PERIOD.
055851,000559: 
055852,000560: 27,3630           77676                           DCOMP                                          #  YES.  CORRECT FOR ORB PERIOD.
055853,000561: 27,3631           56205                           DMP      DDV                                   
055854,000562: 27,3632           17755                                    PI/16                                 #  2 PI (-5)
055855,000563: 27,3633           00031                                    TFFRTALF                              #  SQRT(ALFA)  E:(10+NA) M:(9+NA)
055856,000564: 27,3634           53657                           SL*      SL*                                   
055857,000565: 27,3635           57602                                    0          -4,2                       #  X2=-NA
055858,000566: 27,3636           57602                                    0          -4,2                       
055859,000567: 27,3637           43257                           SL*      DAD                                   
055860,000568: 27,3640           57576                                    0,2                                   
055861,000569:                                                                                                  #  TFF SQRT(MU) FROM PDL+0       E:(-45) M:(-42)
055862,000570: 27,3641           40005        ENDTFF             DMP      BOV                                   #  TFF SQRT(MU) IN MPAC          E:(-45) M:(-42)
055863,000571: 27,3642           00037                                    TFF/RTMU                              #  E:(17) M:(14)
055864,000572: 27,3643           57651                                    MAXTFF                                #  SET POSMAX IF OVFL.
055865,000573: 
055866,000574: 27,3644           77616        DUMPTFF2           RVQ                                            #  RETURN TFF (-28) CS IN MPAC.
055867,000575: 

Page 1280

055869,000577: 27,3645           77745        NEGTFF             DLOAD                                          
055870,000578:                                                                                                  #  TFF SQRT(MU) FROM PDL+0, NEGATIVE.
055871,000579: 27,3646           77650                           GOTO                                           
055872,000580: 27,3647           57641                                    ENDTFF                                
055873,000581: 
055874,000582: 27,3650           77745        MAXTFF1            DLOAD                                          #  RESET PDL
055875,000583: 27,3651           43545        MAXTFF             DLOAD    RVQ                                   
055876,000584: 27,3652           17771                                    NEARONE                               
055877,000585: 
055878,000586:                                                                                                  #  TIME OF FLIGHT ELLIPSE WHEN DEL (ECCENTRIC ANOM) GEQ 90 AND LEQ -90.
055879,000587: 
055880,000588:                                                                                                  #  NUM FROM TFFX.        E:(-16) OR (-29)
055881,000589:                                                                                                  #                        M:(-15) OR (-27)
055882,000590: 27,3653           77712        TFFELL             SL2                                            #  NUM  E:(-14) OR (-27)  M:(-13) OR (-25)
055883,000591: 27,3654           41465                           BDDV     PUSH                                  #  TEMP SAVE D/N IN PDL+0
055884,000592:                                                                                                  #  DEN FROM PDL+0  E:(-3)/( 16) M:(-3)/(-15)
055885,000593:                                                                                                  #  N/D TO PDL+0  E:(11) M:(10)
055886,000594: 27,3655           45345        TFFEL1             DLOAD    DSU                                   #  (ENTER WITH D/N=0 IN PDL+0)
055887,000595: 27,3656           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
055888,000596: 27,3657           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
055889,000597: 27,3660           14013                           STODL    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
055890,000598:                                                                                                  #  D/N FROM PDL+0
055891,000599: 27,3661           77626                           STADR                                          
055892,000600: 27,3662           77732                           STORE    TFFTEM                                #  D/N  E:(11) M:(10)
055893,000601: 27,3663           53605                           DMP      SL*                                   
055894,000602: 27,3664           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055895,000603: 27,3665           57576                                    0,2                                   #  1/ALFA Z  E:(-11-NA) M:(-10-NA)
055896,000604: 27,3666           41206                           PUSH     DMP                                   #  TO PDL+0
055897,000605: 27,3667           00045                                    TFFTEM                                #  1/Z  E:(11) M:(10)
055898,000606: 27,3670           41057                           SL*      BOVB                                  
055899,000607: 27,3671           57576                                    0,2                                   #  X2= -NA
055900,000608: 27,3672           21712                                    SIGNMPAC                              #  IN CASE X= 1.0, CONTINUE
055901,000609: 27,3673           00043                           STORE    TFFX                                  #  X=1/ALFA ZSQ
055902,000610: 27,3674           41234                           RTB      DMP                                   
055903,000611: 27,3675           57735                                    T(X)                                  #  POLY
055904,000612: 27,3676           00043                                    TFFX                                  
055905,000613: 27,3677           45242                           SR3      DSU                                   
055906,000614: 27,3700           17763                                    DP2(-3)                               
055907,000615: 27,3701           41405                           DMP      PUSH                                  #  2(X T(X)-1) /Z ALFA   E:(-15-NA)
055908,000616:                                                                                                  #                        M:(-14-NA)
055909,000617:                                                                                                  #  1/ALFA Z FROM PDL+0   E:(-11-NA)
055910,000618:                                                                                                  #                        M:(-10-NA)
055911,000619: 27,3702           41345                           DLOAD    DMP                                   #  GET SIGN FOR SDELF
055912,000620: 27,3703           00045                                    TFFTEM                                #  1/Z  E:(11) M:(10)
055913,000621: 27,3704           00015                                    RMAG1                                 #  E:(-29) M:(-27)
055914,000622: 27,3705           43312                           SL2      DAD                                   
055915,000623: 27,3706           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
055916,000624: 27,3707           14045                           STODL    TFFTEM                                #  (Q1+R 1/Z) =SGN OF SDELF  E:(-16) M:(-15
055917,000625: 27,3710           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
055918,000626: 27,3711           53605                           DMP      SL*                                   #  CALC FOR ARG FOR TFF/TRIG.

Page 1281

055920,000628: 27,3712           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055921,000629: 27,3713           57575                                    1,2                                   #  X2=-NA
055922,000630: 27,3714           53765                           SIGN     SL*                                   
055923,000631: 27,3715           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF
055924,000632: 27,3716           57576                                    0,2                                   
055925,000633: 27,3717           14045                           STODL    TFFTEM                                #  P/ALFA  E:(-59+2NR) M:(-55+2NR)
055926,000634:                                                                                                  #  (ARG FOR USE IN TFF/TRIG)
055927,000635: 27,3720           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055928,000636: 27,3721           41366                           SQRT     DMP                                   
055929,000637: 27,3722           17755                                    PI/16                                 #  PI (-4)
055930,000638: 27,3723           77615                           DAD                                            
055931,000639:                                                                                                  #  2(XT(X)-1)/Z ALFA FROM PDL    E:(-15-NA)
055932,000640:                                                                                                  #                                M:(-14-NA)
055933,000641: 27,3724           45257                           SL*      DSU                                   
055934,000642: 27,3725           57577                                    0          -1,2                       
055935,000643: 27,3726           00013                                    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
055936,000644: 27,3727           53605                           DMP      SL*                                   
055937,000645: 27,3730           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055938,000646: 27,3731           57601                                    0          -3,2                       
055939,000647: 27,3732           52057                           SL*      GOTO                                  
055940,000648: 27,3733           57602                                    0          -4,2                       
055941,000649: 27,3734           57641                                    ENDTFF                                #  TFF SQRT(MU) IN MPAC E:(-45) M:(-42)
055942,000650: 

Page 1282

055944,000652:                                                                                                  #  PROGRAM NAME:  T(X)                           DATE:  01.17.67
055945,000653:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
055946,000654:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
055947,000655: 
055948,000656:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THE POLYNOMIAL T(X) IS USED BY TIME OF FLIGHT SUBROUTINES CALCTFF AND
055949,000657:                                                                                                  #        CALCTPER TO APPROXIMATE THE SERIES
055950,000658:                                                                                                  #                           2     3
055951,000659:                                                                                                  #                1/3 -X/5 +X /7 -X /9 ...
055952,000660: 
055953,000661:                                                                                                  #        WHERE   X = ALFA Z Z            IF ALFA Z Z LEQ 1
055954,000662:                                                                                                  #                X = 1/(ALFA Z Z)        IF ALFA Z Z G 1
055955,000663: 
055956,000664:                                                                                                  #        ALSO    X IS NEG FOR HYPERBOLIC ORBITS
055957,000665:                                                                                                  #                X = 0 FOR PARABOLIC ORBITS
055958,000666:                                                                                                  #                X IS POSITIVE FOR ELLIPTIC ORBITS
055959,000667: 
055960,000668:                                                                                                  #        FOR FLIGHT 278, THE POLYNOMIAL T(X) IS FITTED OVER THE RANGE (0,+1) AND HAS A MAXIMUM
055961,000669:                                                                                                  #        DEVIATION FROM THE SERIES OF 2 E-5   (T(X) IS A CHEBYCHEV TYPE FIT AND WAS OBTAINED USING
055962,000670:                                                                                                  #        MAC PROGRAM AUTCURFIT294RRB AND IS VALID TO THE SAME TOLERANCE OVER THE RANGE (-.08,+1).)
055963,000671: 
055964,000672:                                                                                                  #  CALLING SEQUENCE:     RTB
055965,000673:                                                                                                  #                                T(X)
055966,000674:                                                                                                  #        C(MPAC) = X
055967,000675: 
055968,000676:                                                                                                  #  SUBROUTINES CALLED:  NONE
055969,000677: 
055970,000678:                                                                                                  #  NORMAL EXIT MODE:  TC   DANZIG
055971,000679: 
055972,000680:                                                                                                  #  ALARMS:  NONE
055973,000681: 
055974,000682:                                                                                                  #  OUTPUT:  C(MPAC) = T(X)
055975,000683: 
055976,000684:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
055977,000685:                                                                                                  #        C(MPAC) = X
055978,000686: 
055979,000687:                                                                                                  #  DEBRIS:  NONE
055980,000688: 
055981,000689: 27,3735           07222        T(X)               TC       POLY                                  
055982,000690: 27,3736           00004                           DEC      4          B-14                       #  N-1
055983,000691: 27,3737           12525 12525                     2DEC     3.333333333 E-1                        
055984,000692: 
055985,000693: 27,3741           71463 57703                     2DEC*    -1.999819135 E-1*                       
055986,000694: 
055987,000695: 27,3743           04423 17645                     2DEC*    1.418148467 E-1*                       
055988,000696: 
055989,000697: 27,3745           74604 43667                     2DEC*    -1.01310997 E-1*                       
055990,000698: 
055991,000699: 27,3747           01626 37256                     2DEC*    5.609004986 E-2*                       
055992,000700: 
055993,000701: 27,3751           77404 52071                     2DEC*    -1.536156925 E-2*                       
055994,000702: 
055995,000703: 27,3753           06061        ENDT(X)            TC       DANZIG                                
055996,000704: 
055997,000705: 27,3754  27,3753               TCDANZIG           =        ENDT(X)                               
055998,000706: 

Page 1283

056000,000708:                                                                                                  #  TFF CONSTANTS
056001,000709: 
056002,000710: 32,3773                                           BANK     32                                    
056003,000711: 
056004,000712: 27,2000                                           SETLOC   TOF-FF1                               
056005,000713: 27,2000                                           BANK                                           
056006,000714: 
056007,000715:                                                                                                  #                                                NOTE _  NOTE _  ADJUSTED MUE FOR NEAR EARTH TRAJ.
056008,000716:                                                                                                  # MUE            =       3.990815471 E10         M CUBE/CS SQ
056009,000717:                                                                                                  # RTMUE          =       1.997702549 E5 B-18*    MODIFIED EARTH MU
056010,000718: 
056011,000719:                                                                                                  #                                                NOTE _  NOTE _  ADJUSTED MUE FOR NEAR EARTH TRAJ.
056012,000720:                                                                                                  # MUM            =       4.902778 E8             M CUBE/CS SQ
056013,000721:                                                                                                  # RTMUM          2DEC*   2.21422176 E4 B-18*
056014,000722: 
056015,000723: 27,3754           06220 37553  PI/16              2DEC     3.141592653 B-4                        
056016,000724: 
056017,000725: 27,3756           37777 37700  LIM(-22)           2OCT     3777737700                            #  1.0 -B(-22)
056018,000726: 
056019,000727: 27,3760           00000 00100  DP(-22)            2OCT     0000000100                            #  B(-22)
056020,000728: 
056021,000729: 27,3762           04000 00000  DP2(-3)            2DEC     1          B-3                        
056022,000730: 
056023,000731: 27,3764           02000 00000  DP2(-4)            2DEC     1          B-4                        #  1/16
056024,000732: 
056025,000733:                                                                                                  #  RPAD1         2DEC    6373338 B-29            M (-29) = 20909901.57 FT
056026,000734: 
056027,000735: 27,3766  23,2314               RPAD1              =        RPAD                                  
056028,000736: 
056029,000737: 27,3766           00305 11205  R300K              2DEC     6464778    B-29                       #  (-29) M
056030,000738: 
056031,000739: 27,3770           37777 37777  NEARONE            2DEC     .999999999                            
056032,000740: 
056033,000741: 27,3772  23,2521               TFFZEROS           EQUALS   HI6ZEROS                              
056034,000742: 27,3772  23,2511               TFF1/4             EQUALS   HIDP1/4                               
056035,000743: 

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