Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the second release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 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.

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

Page 1268

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

Page 1269

055378,000104:                                                                                                  #                REGISTERS S1, S2 ARE UNTOUCHED BY ANY TFF SUBROUTINE
055379,000105:                                                                                                  #                INDEX REGISTERS X1, X2 ARE USED BY ALL TFF SUBROUTINES.  THEY ARE ESTAB-
055380,000106:                                                                                                  #                LISHED IN TFF/CONIC AND MUST BE PRESERVED BETWEEN CALLS TO SUBSEQUENT
055381,000107:                                                                                                  #                SUBROUTINES.
055382,000108:                                                                                                  #                -NR                             C(X1) = NORM COUNT OF RMAG
055383,000109:                                                                                                  #                -NA                             C(X2) = NORM COUNT OF SQRT(ABS(ALFA))
055384,000110: 

Page 1270

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

Page 1271

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

Page 1272

055494,000220: 27,3410           20573                                    0          -6,1                       #  GET -VSQ/MU  E:(26-NR) M:(24-NR)
055495,000221: 27,3411           77626                           STADR                                          
055496,000222:                                                                                                  #  2/RMAG  FROM PDL+2
055497,000223: 27,3412           77744                           STORE    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
055498,000224: 27,3413           41457                           SL*      PUSH                                  #  TEMP SAVE ALFA  E:(20) M:(18)
055499,000225: 27,3414           20173                                    0          -6,1                       
055500,000226: 27,3415           75446                           ABS      SQRT                                  #  E:(10) M:(9)
055501,000227: 27,3416           77701                           NORM                                           
055502,000228: 27,3417           00050                                    X2                                    #  X2 = -NA
055503,000229: 27,3420           00031                           STORE    TFFRTALF                              #  SQRT( ABS(ALFA) )  E:(10+NA) M:(9+NA)
055504,000230: 27,3421           75316                           DSQ      SIGN                                  #  NOT SO ACCURATE, BUT OK
055505,000231:                                                                                                  #  ALFA FROM PDL+2  E:(20) M:(18)
055506,000232: 27,3422           55254                           BZE      BDDV                                  #  SET 1/ALFA =0, TO SHOW SMALL ALFA
055507,000233: 27,3423           57425                                    +2                                    
055508,000234: 27,3424           06512                                    TFF1/4                                
055509,000235: 27,3425           00027                 +2        STORE    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055510,000236: 27,3426           77616        DUMPCNIC           RVQ                                            
055511,000237: 
055512,000238:                                                                                                  #                                                              39 W

Page 1273

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

Page 1274

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

Page 1275

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

Page 1276

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

Page 1277

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

Page 1278

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

Page 1279

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

Page 1280

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

Page 1281

055902,000628: 27,3712           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055903,000629: 27,3713           57575                                    1,2                                   #  X2=-NA
055904,000630: 27,3714           53765                           SIGN     SL*                                   
055905,000631: 27,3715           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF
055906,000632: 27,3716           57576                                    0,2                                   
055907,000633: 27,3717           14045                           STODL    TFFTEM                                #  P/ALFA  E:(-59+2NR) M:(-55+2NR)
055908,000634:                                                                                                  #  (ARG FOR USE IN TFF/TRIG)
055909,000635: 27,3720           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055910,000636: 27,3721           41366                           SQRT     DMP                                   
055911,000637: 27,3722           17755                                    PI/16                                 #  PI (-4)
055912,000638: 27,3723           77615                           DAD                                            
055913,000639:                                                                                                  #  2(XT(X)-1)/Z ALFA FROM PDL    E:(-15-NA)
055914,000640:                                                                                                  #                                M:(-14-NA)
055915,000641: 27,3724           45257                           SL*      DSU                                   
055916,000642: 27,3725           57577                                    0          -1,2                       
055917,000643: 27,3726           00013                                    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
055918,000644: 27,3727           53605                           DMP      SL*                                   
055919,000645: 27,3730           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
055920,000646: 27,3731           57601                                    0          -3,2                       
055921,000647: 27,3732           52057                           SL*      GOTO                                  
055922,000648: 27,3733           57602                                    0          -4,2                       
055923,000649: 27,3734           57641                                    ENDTFF                                #  TFF SQRT(MU) IN MPAC E:(-45) M:(-42)
055924,000650: 

Page 1282

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

Page 1283

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

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