Source Code

These source-code files are part of a reconstructed copy of Comanche 72, the first release of the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 13.

They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments.

Since no contemporary listings of Comanche 72 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

057335,000002:                                                                                                  ## Copyright:   Public domain.
057336,000003:                                                                                                  ## Filename:    TIME_OF_FREE_FALL.agc
057337,000004:                                                                                                  ## Purpose:     A section of Comanche revision 072.
057338,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
057339,000006:                                                                                                  ##              release of the software for the Command Module's (CM) Apollo
057340,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 13. No original listings
057341,000008:                                                                                                  ##              of this program are available; instead, this file was recreated
057342,000009:                                                                                                  ##              from a printout of Comanche 055, binary dumps of a set of
057343,000010:                                                                                                  ##              Comanche 067 rope modules, and changelogs between Comanche 067
057344,000011:                                                                                                  ##              and 072. It has been adapted such that the resulting bugger words
057345,000012:                                                                                                  ##              exactly match those specified for Comanche 072 in NASA drawing
057346,000013:                                                                                                  ##              2021153G, which gives relatively high confidence that the
057347,000014:                                                                                                  ##              reconstruction is correct.
057348,000015:                                                                                                  ## Assembler:   yaYUL
057349,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
057350,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
057351,000018:                                                                                                  ## Mod history: 2024-05-13 MAS  Created from Comanche 067.
057352,000019: 
057353,000020:                                                                                                  #  THE TFF SUBROUTINES MAY BE USED IN EITHER EARTH OR MOON CENTERED COORDINATES.  THE TFF ROUTINES NEVER
057354,000021:                                                                                                  #  KNOW WHICH ORIGIN APPLIES.  IT IS THE USER WHO KNOWS, AND WHO SUPPLIES RONE, VONE AND 1/SQRT(MU) AT THE
057355,000022:                                                                                                  #  APPROPRIATE SCALE LEVEL FOR THE PROPER PRIMARY BODY.
057356,000023: 
057357,000024:                                                                                                  #        EARTH ORIGIN    POSITION        -29     METERS
057358,000025:                                                                                                  #                        VELOCITY        -7      METERS/CENTISECOND
057359,000026:                                                                                                  #                        1/SQRT(MU)      +17     SQRT(CS SQ/METERS CUBED)
057360,000027: 
057361,000028:                                                                                                  #        MOON ORIGIN     POSITION        -27     METERS
057362,000029:                                                                                                  #                        VELOCITY        -5      METERS/CENTISECONDS
057363,000030:                                                                                                  #                        1/SQRT(MU)      +14     SQRT(CS SQ/METERS CUBED)
057364,000031: 
057365,000032:                                                                                                  #  ALL DATA PROVIDED TO AND RECEIVED FROM ANY TFF SUBROUTINE WILL BE AT ONE OF THE LEVELS ABOVE.  IN ALL CASES,
057366,000033:                                                                                                  #  THE FREE FALL TIME IS RETURNED IN CENTISECONDS AT (-28).  PROGRAM TFF/CONIC WILL GENERATE VONE/RTMU AND
057367,000034:                                                                                                  #  LEAVE IT IN VONE' AT (+10) IF EARTH ORIGIN AND (+9) IF MOON ORIGIN.
057368,000035: 
057369,000036:                                                                                                  #  THE USER MUST STORE THE STATE VECTOR IN RONE, VONE  AND MU IN THE FORM 1/SQRT(MU) IN TFF/RTMU
057370,000037:                                                                                                  #  AT THE PROPER SCALE BEFORE CALLING TFF/CONIC.  SINCE RONE, VONE ARE IN THE EXTENDED VERB STORAGE AREA,
057371,000038:                                                                                                  #  THE USER MUST ALSO LOCK OUT THE EXTENDED VERBS, AND RELEASE THEM WHEN FINISHED.
057372,000039: 
057373,000040:                                                                                                  #  PROGRAMS CALC/TFF AND CALC/TPER ASSUME THAT THE TERMINAL RADIUS IS LESS THAN THE PRESENT
057374,000041:                                                                                                  #  RADIUS.  THIS RESTRICTION CAN BE REMOVED BY A 15 W CODING CHANGE, BUT AT PRESENT IT IS NOT DEEMED NECESSARY.
057375,000042: 
057376,000043:                                                                                                  #  THE FOLLOWING ERASABLE QUANTITIES ARE USED BY THE TFF ROUTINES, AND ARE LOCATED IN THE PUSH LIST.
057377,000044: 
057378,000045:                                                                                                  #                                        BELOW   E:  IS USED FOR EARTH ORIGIN SCALE
057379,000046:                                                                                                  #                                                M:  IS USED FOR MOON  ORIGIN SCALE
057380,000047: 
057381,000048:                                                                                                  # TFFSW          =       119D            BIT1    0 = CALCTFF             1 = CALCTPER
057382,000049: 23,3774                        TFFDELQ            =        10D                                   #        Q2-Q1                   E: (-16)  M: (-15)
057383,000050: 23,3774                        RMAG1              =        12D                                   #        ABVAL(RN)  M            E: (-29)  M: (-27)
057384,000051:                                                                                                  # RPER           =       14D             PERIGEE RADIUS  M       E: (-29)  M: (-27)
057385,000052: 23,3774                        TFFQ1              =        14D                                   #        R.V / SQRT(MUE)         E: (-16)  M: (-15)
057386,000053:                                                                                                  # SDELF/2                                SIN(THETA) /2
057387,000054: 23,3774                        CDELF/2            =        14D                                   #        COS(THETA) /2
057388,000055:                                                                                                  # RAPO           =       16D             APOGEE RADIUS  M        E: (-29)  M: (-27)
057389,000056: 23,3774                        NRTERM             =        16D                                   #        TERMINAL RADIUS  M      E: (-29+NR)
057390,000057:                                                                                                  #                                          M: (-27+NR)
057391,000058: 23,3774                        RTERM              =        18D                                   #        TERMINAL RADIUS  M      E: (-29)  M: (-27)
057392,000059: 23,3774                        TFFVSQ             =        20D                                   #        -(V SQUARED/MU)  1/M    E: (20)   M: (18)
057393,000060: 23,3774                        TFF1/ALF           =        22D                                   #        SEMI MAJ AXIS  M        E: (-22-2 NA)
057394,000061:                                                                                                  #                                          M: (-20-2 NA)
057395,000062: 23,3774                        TFFRTALF           =        24D                                   #        SQRT(ALFA)              E:(10+NA) M: (9+NA)
057396,000063: 23,3774                        TFFALFA            =        26D                                   #        ALFA  1/M               E:(26-NR) M: (24-NR)
057397,000064: 23,3774                        TFFNP              =        28D                                   #        SEMI LATUS RECTUM  M    E: (-38+2 NR)
057398,000065:                                                                                                  #                                          M: (-36+2 NR)
057399,000066: 23,3774                        TFF/RTMU           =        30D                                   #        1/SQRT(MU)              E: (17)   M: (14)
057400,000067: 23,3774                        NRMAG              =        32D                                   #        PRESENT RADIUS  M       E: (-29+NR)
057401,000068:                                                                                                  #                                          M: (-27+NR)
057402,000069: 23,3774                        TFFX               =        34D                                   
057403,000070: 23,3774                        TFFTEM             =        36D                                   #        TEMPORARY
057404,000071:                                                                                                  #                REGISTERS S1, S2 ARE UNTOUCHED BY ANY TFF SUBROUTINE
057405,000072:                                                                                                  #                INDEX REGISTERS X1, X2 ARE USED BY ALL TFF SUBROUTINES.  THEY ARE ESTAB-
057406,000073:                                                                                                  #                LISHED IN TFF/CONIC AND MUST BE PRESERVED BETWEEN CALLS TO SUBSEQUENT
057407,000074:                                                                                                  #                SUBROUTINES.
057408,000075:                                                                                                  #                -NR                             C(X1) = NORM COUNT OF RMAG
057409,000076:                                                                                                  #                -NA                             C(X2) = NORM COUNT OF SQRT(ABS(ALFA))
057410,000077: 
057411,000078:                                                                                                  #  SUBROUTINE NAME:  TFFCONIC                    DATE:  01.29.67
057412,000079:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
057413,000080:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
057414,000081:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67
057415,000082:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 21 NOV 67         ADD MOON MU.
057416,000083:                                                                                                  #  MOD NO:  3    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
057417,000084: 
057418,000085:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THIS SUBROUTINE IS CALLED TO COMPUTE THOSE CONIC PARAMETERS REQUIRED BY THE TFF
057419,000086:                                                                                                  #        SUBROUTINES AND TO ESTABLISH THEM IN THE PUSH LIST AREA.  THE PARAMETERS ARE LISTED UNDER OUTPUT.
057420,000087:                                                                                                  #        THE EQUATIONS ARE
057421,000088:                                                                                                  #                -   -  -
057422,000089:                                                                                                  #                H = RN*VN                       ANGULAR MOMENTUM
057423,000090:                                                                                                  #                      - -
057424,000091:                                                                                                  #                LCP = H.H / MU                  SEMI LATUS RECTUM
057425,000092:                                                                                                  #                              -  -
057426,000093:                                                                                                  #                ALFA = 2/RN - VN.VN / MU        RECIPROCAL SEMI MAJ AXIS, SIGNED
057427,000094: 
057428,000095:                                                                                                  #        AND ALFA IS POS FOR ELLIPTIC ORBITS
057429,000096:                                                                                                  #                      0 FOR PARABOLIC ORBITS
057430,000097:                                                                                                  #                    NEG FOR HYPERBOLIC ORBITS.
057431,000098:                                                                                                  #        SUBROUTINE ALSO COMPUTES AND SAVES RMAG.
057432,000099: 
057433,000100:                                                                                                  #  CALLING SEQUENCE:
057434,000101:                                                                                                  #        TFFCONIC EXPECTS CALLER TO ENTER WITH CORRECT GRAVITATIONAL CONSTANT IN MPAC, IN THE FORM
057435,000102:                                                                                                  #        1/SQRT(MU).  PROGRAM WILL SAVE IN TFF/RTMU.  THE SCALE IS DETERMINED BY WHETHER EARTH OR MOON
057436,000103:                                                                                                  #        ORIGIN IS USED.  THE CALLER MUST LOCK OUT THE EXTENDED VERBS BEFORE PROVIDING STATE VECTOR IN RONE,
057437,000104:                                                                                                  #        VONE AT PROPER SCALE.  THE EXTENDED VERBS MUST BE RESTORED WHEN THE CALLER IS FINISHED USING THE
057438,000105:                                                                                                  #        TFF ROUTINES.
057439,000106: 
057440,000107:                                                                                                  #        ENTRY POINT TFFCONMU EXPECTS THAT TFF/RTMU IS ALREADY LOADED.
057441,000108: 
057442,000109:                                                                                                  #        TO SPECIFY MU:  DLOAD   CALL            IF MU ALREADY STORED:           CALL
057443,000110:                                                                                                  #                                YOURMU          1/RTMU E:(17) M:(14)                    TFFCONMU
057444,000111:                                                                                                  #                                TFFCONIC
057445,000112:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY IF LEQ 18D
057446,000113: 
057447,000114:                                                                                                  #  SUBROUTINES CALLED:  NONE
057448,000115: 
057449,000116:                                                                                                  #  NORMAL EXIT MODES:  RVQ
057450,000117: 
057451,000118:                                                                                                  #  ALARMS:  NONE
057452,000119: 
057453,000120:                                                                                                  #  OUTPUT:       THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
057454,000121:                                                                                                  #                RMAG1           E:(-29) M:(-27)         M  RN, PRESENT RADIUS LENGTH.
057455,000122:                                                                                                  #                NRMAG           E:(-29+NR)              M  RMAG, NORMALIZED
057456,000123:                                                                                                  #                                M:(-27+NR)
057457,000124:                                                                                                  #                X1                                      -NR, NORM COUNT
057458,000125:                                                                                                  #                TFFNP           E:(-38+2NR)             M  LCP, SEMI LATUS RECTUM, WEIGHTED BY NR.  FOR VGAMCALC
057459,000126:                                                                                                  #                                M:(-36+2NR)
057460,000127:                                                                                                  #                TFF/RTMU        E:(17) M:(14)           1/SQRT(MU)
057461,000128:                                                                                                  #                TFFVSQ          E:(20) M:(18)           1/M  -(V SQ/MU):  PRESENT VELOCITY, NORMLIZED.  FOR VGAMCALC
057462,000129:                                                                                                  #                TFFALFA         E:(26-NR)               1/M  ALFA, WEIGHTED BY NR
057463,000130:                                                                                                  #                                M:(24-NR)
057464,000131:                                                                                                  #                TFFRTALF        E:(10+NA)               SQRT(ALFA), NORMALIZED
057465,000132:                                                                                                  #                                M:(9+NA)
057466,000133:                                                                                                  #                X2                                      -NA, NORM COUNT
057467,000134:                                                                                                  #                TFF1/ALF        E:(-22-2NA)             SIGNED SEMI MAJ AXIS, WEIGHTED BY NA
057468,000135:                                                                                                  #                                M:(-20-2NA)
057469,000136:                                                                                                  #                PUSHLOC AT PDL+0
057470,000137: 
057471,000138:                                                                                                  #        THE FOLLOWING IS STORED IN GENERAL ERASABLE
057472,000139:                                                                                                  #                VONE'           E:(10) M:(9)            V/RT(MU), NORMALIZED VELOCITY
057473,000140: 
057474,000141:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
057475,000142:                                                                                                  #                RONE            E:(-29) M:(-27)         M  STATE VECTOR         LEFT BY CALLER
057476,000143:                                                                                                  #                VONE            E:(-7) M:(-5)           M/CS  STATE VECTOR      LEFT BY CALLER
057477,000144:                                                                                                  #                TFF/RTMU        E:(17) M:(14)           1/RT(CS SQ/M CUBE)      IF ENTER VIA TFFCONMU.
057478,000145: 
057479,000146:                                                                                                  #  DEBRIS:       QPRET,  PDL+0 ... PDL+3
057480,000147: 
057481,000148: 33,3776                                           BANK     33                                    
057482,000149: 27,2000                                           SETLOC   TOF-FF                                
057483,000150: 27,2000                                           BANK                                           
057484,000151: 
057485,000152: 27,2760                                           COUNT*   $$/TFF                                
057486,000153: 
057487,000154: 27,2760           00037        TFFCONIC           STORE    TFF/RTMU                              #  1/SQRT(MU)    E:(17) M:(14)
057488,000155: 
057489,000156: 27,2761           53575        TFFCONMU           VLOAD    UNIT                                  #  COME HERE WITH TFFRTMU LOADED.
057490,000157: 27,2762           02327                                    RONE                                  #  SAVED RN.  M  E:(-29) M:(-27)
057491,000158: 27,2763           77725                           PDDL                                           #  UR/2 TO PDL+0, +5
057492,000159: 27,2764           00045                                    36D                                   #  MAGNITUDE
057493,000160: 27,2765           00015                           STORE    RMAG1                                 #  M  E:(-29) M:(-27)
057494,000161: 
057495,000162: 27,2766           77701                           NORM                                           
057496,000163: 27,2767           00047                                    X1                                    #  -NR
057497,000164: 27,2770           24041                           STOVL    NRMAG                                 #  RMAG  M  E:(-29+NR) M:(-27+NR)
057498,000165: 27,2771           02335                                    VONE                                  #  SAVED VN.  M/CS  E:(-7) M:(-5)
057499,000166: 27,2772           77761                           VXSC                                           
057500,000167: 27,2773           00037                                    TFF/RTMU                              #  E:(17) M:(14)
057501,000168: 27,2774           02372                           STORE    VONE'                                 #  VN/SQRT(MU)  E:(10) M:(9)
057502,000169: 
057503,000170: 27,2775           47361                           VXSC     VXV                                   
057504,000171: 27,2776           00041                                    NRMAG                                 #  E:(-29+NR) M:(-27+NR)
057505,000172:                                                                                                  #  UR/2 FROM PDL
057506,000173: 27,2777           47572                           VSL1     VSQ                                   #  BEFORE:  E:(-19+NR) M:(-18+NR)
057507,000174: 27,3000           14035                           STODL    TFFNP                                 #  LC P  M  E:(-38+2NR) M:(-36+2NR)
057508,000175:                                                                                                  #  SAVE ALSO FOR VGAMCALC
057509,000176: 27,3001           15324                                    TFF1/4                                
057510,000177: 27,3002           63271                           DDV      PDVL                                  #  (2/RMAG)  1/M  E:(26-NR) M:(24-NR)
057511,000178: 27,3003           00041                                    NRMAG                                 #  RMAG  M  E:(-29+NR) M:(-27+NR)
057512,000179: 27,3004           02372                                    VONE'                                 #  SAVED VN.  E:(10) M:(9)
057513,000180: 27,3005           57436                           VSQ      DCOMP                                 #  KEEP MPAC+2 HONEST FOR SQRT.
057514,000181: 27,3006           00025                           STORE    TFFVSQ                                #  -(V SQ/MU)  E:(20) M:(18)
057515,000182:                                                                                                  #  SAVE FOR VGAMCALC
057516,000183: 27,3007           43257                           SR*      DAD                                   
057517,000184: 27,3010           20573                                    0          -6,1                       #  GET -VSQ/MU  E:(26-NR) M:(24-NR)
057518,000185: 27,3011           77626                           STADR                                          
057519,000186:                                                                                                  #  2/RMAG  FROM PDL+2
057520,000187: 27,3012           77744                           STORE    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
057521,000188: 27,3013           41457                           SL*      PUSH                                  #  TEMP SAVE ALFA  E:(20) M:(18)
057522,000189: 27,3014           20173                                    0          -6,1                       
057523,000190: 27,3015           75446                           ABS      SQRT                                  #  E:(10) M:(9)
057524,000191: 27,3016           77701                           NORM                                           
057525,000192: 27,3017           00050                                    X2                                    #  X2 = -NA
057526,000193: 27,3020           00031                           STORE    TFFRTALF                              #  SQRT( ABS(ALFA) )  E:(10+NA) M:(9+NA)
057527,000194: 27,3021           75316                           DSQ      SIGN                                  #  NOT SO ACCURATE, BUT OK
057528,000195:                                                                                                  #  ALFA FROM PDL+2  E:(20) M:(18)
057529,000196: 27,3022           55254                           BZE      BDDV                                  #  SET 1/ALFA =0, TO SHOW SMALL ALFA
057530,000197: 27,3023           57025                                    +2                                    
057531,000198: 27,3024           15324                                    TFF1/4                                
057532,000199: 27,3025           00027                 +2        STORE    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057533,000200: 27,3026           77616        DUMPCNIC           RVQ                                            
057534,000201:                                                                                                  #                        39 W
057535,000202:                                                                                                  #  SUBROUTINE NAME:  TFFRP/RA                    DATE: 01.17.67
057536,000203:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
057537,000204:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
057538,000205:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67
057539,000206:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
057540,000207:                                                                                                  #                                                                        ALSO IMPROVE ACCURACY OF RAPO.
057541,000208: 
057542,000209:                                                                                                  #  FUNCTIONAL DESCRIPTION:  USED BY CALCTPER AND TFF DISPLAYS TO CALCULATE PERIGEE RADIUS AND ALSO
057543,000210:                                                                                                  #        APOGEE RADIUS FOR A GENERAL CONIC.
057544,000211:                                                                                                  #        PROGRAM GIVES PERIGEE RADIUS AS         APOGEE RADIUS IS GIVEN BY
057545,000212:                                                                                                  #                RP = P/(1+E)                            RA = (1+E) / ALFA
057546,000213:                                                                                                  #        WHERE    2
057547,000214:                                                                                                  #                E  = 1 - P ALFA
057548,000215:                                                                                                  #        IF RA IS NEGATIVE OR SHOWS DIVIDE OVERFLOW, THEN RA = POSMAX BECAUSE
057549,000216:                                                                                                  #                1. APOGEE RADIUS IS NOT MEANINGFUL FOR HYPERBOLA
057550,000217:                                                                                                  #                2. APOGEE RADIUS IS NOT DEFINED FOR PARABOLA
057551,000218:                                                                                                  #                3. APOGEE RADIUS EXCEEDS THE SCALING FOR ELLIPSE.
057552,000219: 
057553,000220:                                                                                                  #        THIS SUBROUTINE REQUIRES THE SIGNED RECIPROCAL SEMI MAJ AXIS, ALFA, AND SEMI LATUS RECTUM AS DATA.
057554,000221: 
057555,000222:                                                                                                  #  CALLING SEQUENCE:     CALL
057556,000223:                                                                                                  #                                TFFRP/RA
057557,000224:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY IF LEQ 10D
057558,000225:                                                                                                  #        C(MPAC) UNSPECIFIED
057559,000226: 
057560,000227:                                                                                                  #  SUBROUTINES CALLED:   NONE
057561,000228: 
057562,000229:                                                                                                  #  NORMAL EXIT MODE:     RVQ
057563,000230:                                                                                                  #        IF ELLIPSE, WITHIN NORMAL SCALING, RAPO IS CORRECT.
057564,000231:                                                                                                  #        OTHERWISE, RAPO = POSMAX.
057565,000232: 
057566,000233:                                                                                                  #  ALARMS:       NONE
057567,000234: 
057568,000235:                                                                                                  #  OUTPUT:       STORED IN PUSH LIST AREA.  SCALE OF OUTPUT AGREES WITH DATA SUPPLIED TO TFF/CONIC.
057569,000236:                                                                                                  #        RPER    E:(-29) M:(-27)         M       PERIGEE RADIUS          DESTROYED BY CALCTFF/CALCTPER, TFFTRIG.
057570,000237:                                                                                                  #        RAPO    E:(-29) M:(-27)         M       APOGEE RADIUS           WILL BE DESTROYED BY CALCTFF/CALCTPER
057571,000238:                                                                                                  #        PUSHLOC AT PDL+0
057572,000239: 
057573,000240:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
057574,000241:                                                                                                  #        TFFALFA E:(26-NR)               M       1/SEMI MAJ AXIS LEFT BY TFFCONIC
057575,000242:                                                                                                  #                M:(24-NR)
057576,000243:                                                                                                  #        TFFNP   E:(-38+2NR)             M       LC P, SEMI LATUS RECTUM LEFT BY TFFCONIC
057577,000244:                                                                                                  #                M:(-36+2NR)
057578,000245:                                                                                                  #        X1                              -NR, NORM COUNT OF RMAG         LEFT BY TFFCONIC
057579,000246:                                                                                                  #        X2                              -NA, NORM COUNT OF ALFA         LEFT BY TFFCONIC
057580,000247: 
057581,000248:                                                                                                  #  DEBRIS:       QPRET, PDL+0 ... PDL+1
057582,000249: 
057583,000250: 27,3027                        RAPO               =        16D                                   #  APOGEE RADIUS  M  E:(-29) M:(-27)
057584,000251: 27,3027                        RPER               =        14D                                   #  PERIGEE RADIUS  M  E:(-29) M:(-27)
057585,000252: 
057586,000253: 27,3027           41345        TFFRP/RA           DLOAD    DMP                                   
057587,000254: 27,3030           00033                                    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
057588,000255: 27,3031           00035                                    TFFNP                                 #  LC P  M E:(-38+2NR) M:(-36+2NR)
057589,000256: 27,3032           57457                           SR*      DCOMP                                 #  ALFA P (-12+NR)
057590,000257: 27,3033           20571                                    0          -8D,1                      #  ALFA P (-4)
057591,000258: 27,3034           51415                           DAD      ABS                                   #  (DCOMP GIVES VALID TP RESULT FOR SQRT)
057592,000259:                                                                                                  #  (ABS PROTECTS SQRT IF E IS VERY NEAR 0)
057593,000260: 27,3035           17367                                    DP2(-4)                               
057594,000261: 27,3036           43366                           SQRT     DAD                                   #  E SQ = (1- P ALFA) (-4)
057595,000262: 27,3037           15324                                    TFF1/4                                
057596,000263: 27,3040           55206                           PUSH     BDDV                                  #  (1+E)  (-2)  TO PDL+0
057597,000264: 27,3041           00035                                    TFFNP                                 #  LCP  M  E:(-38+2NR) M:(-36+2NR)
057598,000265: 27,3042           53657                           SR*      SR*                                   #  (DOES SR THEN SL TO AVOID OVFL)
057599,000266: 27,3043           20601                                    0,1                                   #  X1=-NR
057600,000267: 27,3044           20572                                    0          -7,1                       #  (EFFECTIVE SL)
057601,000268: 27,3045           14017                           STODL    RPER                                  #  PERIGEE RADIUS  M  E:(-29) M:(-27)
057602,000269:                                                                                                  #  (1+E)  (-2)  FROM PDL+0
057603,000270: 27,3046           41005                           DMP      BOVB                                  
057604,000271: 27,3047           00027                                    TFF1/ALF                              #  E:(-22-2NA) M:(-20-2NA)
057605,000272: 27,3050           57353                                    TCDANZIG                              #  CLEAR OVFIND, IF ON.
057606,000273: 27,3051           53654                           BZE      SL*                                   
057607,000274: 27,3052           57061                                    MAXRA                                 #  SET POSMAX, IF ALFA=0
057608,000275: 27,3053           57603                                    0          -5,2                       #  -5+NA
057609,000276: 27,3054           40057                           SL*      BOV                                   
057610,000277: 27,3055           57576                                    0,2                                   
057611,000278: 27,3056           57061                                    MAXRA                                 #  SET POSMAX IF OVFL.
057612,000279: 27,3057           77644                           BPL                                            #  CONTINUE WITH VALID RAPO.
057613,000280: 27,3060           57063                                    +3                                    
057614,000281: 27,3061           77745        MAXRA              DLOAD                                          #  RAPO CALC IS NOT VALID.  SET RAPO =
057615,000282: 27,3062           17373                                    NEARONE                               #  POSMAX AS A TAG.
057616,000283: 27,3063           00021                 +3        STORE    RAPO                                  #  APOGEE RADIUS  M  E:(-29) M:(-27)
057617,000284: 27,3064           77616        DUMPRPRA           RVQ                                            
057618,000285:                                                                                                  #                        30 W
057619,000286:                                                                                                  #  SUBROUTINE NAME:  CALCTPER / CALCTFF          DATE:  01.29.67
057620,000287:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
057621,000288:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
057622,000289:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 67
057623,000290:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 14 APR 67
057624,000291:                                                                                                  #  MOD NO:  3    MOD BY:  RR BAIRNSFATHER        DATE: 8 JUL 67          NEAR EARTH MUE AND NEG TFF (GONEPAST)
057625,000292:                                                                                                  #  MOD NO:  4    MOD BY:  RR BAIRNSFATHER        DATE: 21 NOV 67         ADD VARIABLE MU.
057626,000293:                                                                                                  #  MOD NO:  5    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
057627,000294: 
057628,000295:                                                                                                  #  FUNCTIONAL DESCRIPTION:  PROGRAM CALCULATES THE FREE-FALL TIME OF FLIGHT FROM PRESENT POSITION RN AND
057629,000296:                                                                                                  #        VELOCITY VN TO A RADIUS LENGTH SPECIFIED BY RTERM, SUPPLIED BY THE USER.  THE POSITION VECTOR
057630,000297:                                                                                                  #        RN MAY BE ON EITHER SIDE OF THE CONIC, BUT RTERM IS CONSIDERED ON THE INBOUND SIDE.
057631,000298:                                                                                                  #        THE EQUATIONS ARE
057632,000299: 
057633,000300:                                                                                                  #                Q2 = -SQRT(RTERM (2-RTERM ALFA) - LCP)  (INBOUND SIDE)) LEQ +- LCE/SQRT(ALFA)
057634,000301:                                                                                                  #                     -  -
057635,000302:                                                                                                  #                Q1 = RN.VN / SQRT(MU)                                   LEQ +- LCE/SQRT(ALFA)
057636,000303: 
057637,000304:                                                                                                  #                Z = NUM / DEN                                           LEQ +- 1/SQRT(ALFA)
057638,000305: 
057639,000306:                                                                                                  #        WHERE, IF INBOUND
057640,000307:                                                                                                  #                NUM = RTERM -RN                                         LEQ +- 2 LCE/ALFA
057641,000308:                                                                                                  #                DEN = Q2+Q1                                             LEQ +- 2 LCE/SQRT(ALFA)
057642,000309: 
057643,000310:                                                                                                  #        AND, IF OUTBOUND
057644,000311:                                                                                                  #                NUM = Q2-Q1                                             LEQ +- 2 LCE/SQRT(ALFA)
057645,000312:                                                                                                  #                DEN = 2 - ALFA (RTERM + RN).                            LEQ +- 2 LCE
057646,000313: 
057647,000314:                                                                                                  #        IF      ALFA ZZ < 1.0           (FOR ALL CONICS EXCEPT ELLIPSES HAVING ABS(DEL ECC ANOM) G 90 DEG)
057648,000315:                                                                                                  #        THEN    X = ALFA Z Z
057649,000316:                                                                                                  #        AND     TFF = (RTERM +RN -2 ZZ T(X) ) Z/SQRT(MU)
057650,000317:                                                                                                  #                EXCEPT  IF ALFA PNZ, AND IF TFF NEG,
057651,000318:                                                                                                  #                THEN    TFF = 2 PI /(ALFA SQRT(ALFA)) + TFF
057652,000319:                                                                                                  #        OR      IF ALFA ZZ GEQ 1.0      (FOR ELLIPSES HAVING ABS(DEL ECC ANOM) GEQ 90 DEG)
057653,000320:                                                                                                  #        THEN    X = 1/ALFA Z Z
057654,000321:                                                                                                  #        AND     TFF = (PI/SQRT(ALFA) -Q2 +Q1 +2(X T(X) -1) /ALFA Z) /ALFA SQRT(MU)
057655,000322:                                                                                                  #        WHERE   T(X) IS A POLYNOMIAL APPROXIMATION TO THE SERIES
057656,000323:                                                                                                  #                             2      3             2
057657,000324:                                                                                                  #                1/3 - X/5 + X /7 - X /9 ...     (X  < 1.0)
057658,000325: 
057659,000326:                                                                                                  #  CALLING SEQUENCE:     TIME TO RTERM                   TIME TO PERIGEE
057660,000327:                                                                                                  #                        CALL                            CALL
057661,000328:                                                                                                  #                                CALCTFF                         CALCTPER
057662,000329:                                                                                                  #                        C(MPAC) = TERMNL RAD M          C(MPAC) = PERIGEE RAD M
057663,000330:                                                                                                  #        FOR EITHER, E:(-29) M:(-27)
057664,000331:                                                                                                  #        FOR EITHER, PUSHLOC = PDL+0, ARBITRARY IF LEQ 8D.
057665,000332: 
057666,000333:                                                                                                  #  SUBROUTINES CALLED:   T(X), VIA RTB
057667,000334: 
057668,000335:                                                                                                  #  NORMAL EXIT MODE:     RVQ
057669,000336:                                                                                                  #        HOWEVER, PROGRAM EXITS WITH ONE OF THE FOLLOWING VALUES FOR TFF (-28) CS IN MPAC.  USER MUST STORE.
057670,000337:                                                                                                  #                A. TFF = FLIGHT TIME.  NORMAL CASE FOR POSITIVE FLIGHT TIME LESS THAN ONE ORBITAL PERIOD.
057671,000338:                                                                                                  #                B. (THIS OPTION IS NO LONGER USED.)
057672,000339:                                                                                                  #                C. TFF = POSMAX.  THIS INDICATES THAT THE CONIC FROM THE PRESENT POSITION WILL NOT RETURN TO
057673,000340:                                                                                                  #                   THE SPECIFIED ALTITUDE.  ALSO INDICATES OUTBOUND PARABOLA OR HYPERBOLA.
057674,000341: 
057675,000342:                                                                                                  #  OUTPUT:       C(MPAC)         (-28) CS        TIME OF FLIGHT, OR TIME TO PERIGEE
057676,000343:                                                                                                  #                TFFX            (0)             X,                                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
057677,000344:                                                                                                  #                NRTERM          E:(-29+NR) M    RTERM, WEIGHTED BY NR                   LEFT FOR ENTRY DISPLAY TFF ROUTINES
057678,000345:                                                                                                  #                                M:(-27+NR)
057679,000346:                                                                                                  #                TFFTEM          E:(-59+2NR)     LCP Z Z SGN(SDELF)                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
057680,000347:                                                                                                  #                                M:(-55+2NR)     LCP /ALFA SGN(SDELF)                    LEFT FOR ENTRY DISPLAY TFF ROUTINES
057681,000348:                                                                                                  #                NOTE:   TFFTEM = PDL 36D AND WILL BE DESTROYED BY .:UNIT:.
057682,000349:                                                                                                  #                RMAG1           E:(-29) M:(-27) PDL 12 NOT TOUCHED.
057683,000350:                                                                                                  #                TFFQ1           E:(-16) M:(-15) PDL 14D
057684,000351:                                                                                                  #                TFFDELQ         E:(-16) M:(-15) PDL 10D
057685,000352:                                                                                                  #                PUSHLOC AT PDL+0
057686,000353: 
057687,000354:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
057688,000355:                                                                                                  #                RONE            E:(-29) M:(-27) M  STATE VECTOR                         LEFT BY USER
057689,000356:                                                                                                  #                VONE'           E:(+10) M:(+9)  VN/SQRT(MU)                             LEFT BY TFF/CONIC
057690,000357:                                                                                                  #                RMAG1           E:(-29) M:(-27) PRESENT RADIUS, M                       LEFT BY TFFCONIC
057691,000358:                                                                                                  #                C(MPAC)         E:(-29) M:(-27) RTERM, TERMINAL RADIUS LENGTH, M        LEFT BY USER
057692,000359: 
057693,000360:                                                                                                  #                THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
057694,000361:                                                                                                  #                TFF/RTMU        E:(17) M:(14)   1/SQRT(MU)                              LEFT BY TFFCONIC.
057695,000362:                                                                                                  #                NRMAG           E:(-29+NR)      M  RMAG, NORMALIZED                     LEFT BY TFFCONIC
057696,000363:                                                                                                  #                                M:(-27+NR)
057697,000364:                                                                                                  #                X1                              -NR, NORM COUNT                         LEFT BY TFFCONIC
057698,000365:                                                                                                  #                TFFNP           E:(-38+2NR)     M  LCP, SEMI LATUS RECTUM, WEIGHT NR    LEFT BY TFFCONIC
057699,000366:                                                                                                  #                                M:(-36+2NR)
057700,000367:                                                                                                  #                TFFALFA         E:(26-NR)       1/M  ALFA, WEIGHT NR                    LEFT BY TFFCONIC
057701,000368:                                                                                                  #                                M:(24-NR)
057702,000369:                                                                                                  #                TFFRTALF        E:(10+NA)       SQRT(ALFA), NORMALIZED                  LEFT BY TFFCONIC
057703,000370:                                                                                                  #                                M:(9+NA)
057704,000371:                                                                                                  #                X2                              -NA, NORM COUNT                         LEFT BY TFFCONIC
057705,000372:                                                                                                  #                TFF1/ALF        E:(-22-2NA)     SIGNED SEMIMAJ AXIS, WEIGHTED BY NA     LEFT BY TFFCONIC
057706,000373:                                                                                                  #                                M:(-20-2NA)
057707,000374: 
057708,000375:                                                                                                  #  DEBRIS:       QPRET, PDL+0 ... PDL+3
057709,000376:                                                                                                  #                RTERM           E:(-29) M:(-27) RTERM, TERMINAL RADIUS LENGTH
057710,000377:                                                                                                  #                RAPO            E:(-29) M:(-27) PDL 16D (=NRTERM)
057711,000378:                                                                                                  #                RPER            E:(-29) M:(-27) PDL 14D (=TFFQ1)
057712,000379: 
057713,000380: 27,3065           77614        CALCTPER           SETGO                                          #  ENTER WITH RPER IN MPAC
057714,000381: 27,3066           03436                                    TFFSW                                 
057715,000382: 27,3067           57072                                    +3                                    
057716,000383: 27,3070           77614        CALCTFF            CLEAR                                          #  ENTER WITH RTERM IN MPAC
057717,000384: 27,3071           03676                                    TFFSW                                 
057718,000385: 27,3072           00023                 +3        STORE    RTERM                                 #  E:(-29) M:(-27)
057719,000386: 27,3073           77657                           SL*                                            
057720,000387: 27,3074           20201                                    0,1                                   #  X1=-NR
057721,000388: 27,3075           00021                           STORE    NRTERM                                #  RTERM  E:(-29+NR) M:(-27+NR)
057722,000389: 27,3076           44205                           DMP      BDSU                                  
057723,000390: 27,3077           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
057724,000391: 27,3100           15324                                    TFF1/4                                
057725,000392: 27,3101           41206                           PUSH     DMP                                   #  (2-ALFA RTERM)  (-3)  TO PDL+0
057726,000393: 27,3102           00021                                    NRTERM                                #  E:(-29+NR) M:(-27+NR)
057727,000394: 27,3103           53725                           PDDL     SR*                                   #  RTERM(2-ALFA RTERM) TO PDL+2
057728,000395:                                                                                                  #  E:(-32+NR) M:(-30+NR)
057729,000396: 27,3104           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
057730,000397: 27,3105           20573                                    0          -6,1                       #  X1 = -NR
057731,000398: 27,3106           43276                           DCOMP    DAD                                   #  DUE TO SHIFTS, KEEP PRECISION FOR SQRT
057732,000399:                                                                                                  #  RTERM(2-ALFA RTERM) FROM PDL +2
057733,000400:                                                                                                  #  E:(-32+NR) M:(-30+NR)
057734,000401: 27,3107           77657                           SR*                                            #  LEAVE  E:(-32) M:(-30)
057735,000402: 27,3110           20601                                    0,1                                   #  X1 = -NR
057736,000403: 27,3111           71214                           BOFF     DLOAD                                 #  CHECK TFF /TPER SWITCH
057737,000404: 27,3112           03756                                    TFFSW                                 
057738,000405: 27,3113           57115                                    +2                                    #  IF TFF, CONTINUE
057739,000406: 27,3114           15334                                    TFFZEROS                              #  IF TPER, SET Q2 = 0
057740,000407: 27,3115           75440                 +2        BMN      SQRT                                  #  E:(-16) M:(-15)
057741,000408: 27,3116           57250                                    MAXTFF1                               #  NO FREE FALL CONIC TO RTERM FROM HERE
057742,000409:                                                                                                  #  RESET PDL, SET TFF=POSMAX, AND EXIT.
057743,000410: 
057744,000411: 27,3117           41076                           DCOMP    BOVB                                  #  RT IS ON INBOUND SIDE.  ASSURE OVFIND=0
057745,000412: 27,3120           57353                                    TCDANZIG                              #  ANY PORT IN A STORM.
057746,000413: 27,3121           24045                           STOVL    TFFTEM                                #  Q2  E:(-16) M:(-15)
057747,000414: 27,3122           02372                                    VONE'                                 #  VN/SQRT(MU)  E:(10) M:(9)
057748,000415: 27,3123           52441                           DOT      SL3                                   
057749,000416: 27,3124           02327                                    RONE                                  #  SAVED RN.  E:(-29) M:(-27)
057750,000417: 27,3125           00017                           STORE    TFFQ1                                 #  Q1, SAVE FOR GONEPAST TEST.
057751,000418:                                                                                                  #  E:(-16) M:(-15)
057752,000419: 27,3126           44240                           BMN      BDSU                                  
057753,000420: 27,3127           57150                                    INBOUND                               #  USE ALTERNATE Z
057754,000421: 27,3130           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
057755,000422: 
057756,000423:                                                                                                  #  OUTBOUND Z CALC CONTINUES HERE
057757,000424: 
057758,000425: 27,3131           14043                           STODL    TFFX                                  #  NUM=Q2-Q1  E:(-16) M:(-15)
057759,000426: 27,3132           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
057760,000427: 27,3133           44205                           DMP      BDSU                                  
057761,000428: 27,3134           00041                                    NRMAG                                 #  RMAG  E:(-29+NR) M:(-27+NR)
057762,000429:                                                                                                  #  (2-RTERM ALFA)  (-3) FROM PDL+0
057763,000430: 27,3135           51406        SAVEDEN            PUSH     ABS                                   #  DEN TO PDL+0  E:(-3) OR (-16)
057764,000431:                                                                                                  #                M:(-3) OR (-15)
057765,000432: 27,3136           40015                           DAD      BOV                                   #  INDETERMINANCY TEST
057766,000433: 27,3137           17361                                    LIM(-22)                              #  =1.0-B(-22)
057767,000434: 27,3140           57161                                    TFFXTEST                              #  GO IF DEN >/= B(-22)
057768,000435: 27,3141           65345                           DLOAD    PDDL                                  #  SET DEN=0 OTHERWISE
057769,000436: 27,3142           15334                                    TFFZEROS                              
057770,000437:                                                                                                  #  XCH ZERO WITH PDL+0
057771,000438: 27,3143           57545                           DLOAD    DCOMP                                 
057772,000439: 27,3144           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
057773,000440: 27,3145           71240                           BMN      DLOAD                                 #  FOR TPER:  Z INDET AT DELE/2=0 AND 90.
057774,000441: 27,3146           57255                                    TFFEL1                                #  ASSUME 90, AND LEAVE 0 IN PDL: 1/Z=D/N
057775,000442: 
057776,000443:                                                                                                  #  Z INDET. AT PERIGEE FOR PARAB OR HYPERB.
057777,000444: 27,3147           77616        DUMPTFF1           RVQ                                            #  RETURN TFF =0
057778,000445: 
057779,000446:                                                                                                  #  INBOUND Z CALC CONTINUES HERE
057780,000447: 
057781,000448: 27,3150           77745        INBOUND            DLOAD                                          #  RESET PDL+0
057782,000449: 27,3151           45345                           DLOAD    DSU                                   #  ALTERNATE Z CALC
057783,000450: 27,3152           00023                                    RTERM                                 #  E:(-29) M:(-27)
057784,000451: 27,3153           00015                                    RMAG1                                 #  E:(-29) M:(-27)
057785,000452: 27,3154           14043                           STODL    TFFX                                  #  NUM=RTERM-RN  E:(-29) M:(-27)
057786,000453: 27,3155           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
057787,000454: 27,3156           52015                           DAD      GOTO                                  
057788,000455: 27,3157           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
057789,000456: 27,3160           57135                                    SAVEDEN                               #  DEN = Q2+Q1  E:(-16) M:(-15)
057790,000457: 
057791,000458: 27,3161           65215        TFFXTEST           DAD      PDDL                                  #  (ABS(DEN) TO PDL+2))  E:(-3) OR (-16)
057792,000459:                                                                                                  #                        M:(-3) OR (-15)
057793,000460: 27,3162           17363                                    DP(-22)                               #  RESTORE ABS(DEN) TO MPAC
057794,000461: 27,3163           00043                                    TFFX                                  #  NUM  E:(-16) OR (-29)  M:(-15) OR (-27)
057795,000462: 27,3164           53605                           DMP      SR*                                   
057796,000463: 27,3165           00031                                    TFFRTALF                              #  SQRT(ALFA)  E:(10+NA) M:(9+NA)
057797,000464: 27,3166           57201                                    0          -3,2                       #  X2=-NA
057798,000465: 27,3167           77671                           DDV                                            #  C(MPAC) =NUM SQRT(ALFA)       E:(-3) OR (-16)
057799,000466:                                                                                                  #                                M:(-3) OR (-15)
057800,000467:                                                                                                  #  ABS(DEN) FROM PDL+2   E:(-3) OR (-16)
057801,000468:                                                                                                  #                        M:(-3) OR (-15)
057802,000469: 27,3170           40145                           DLOAD    BOV                                   #  (THE DLOAD IS SHARED WITH TFFELL)
057803,000470: 27,3171           00043                                    TFFX                                  #  NUM  E:(-16) OR (-29)  M:(-15) OR (-27)
057804,000471: 27,3172           57253                                    TFFELL                                #  USE EQN FOR DELE GEQ 90, LEQ -90
057805,000472: 
057806,000473:                                                                                                  #  OTHERWISE, CONTINUE FOR GENERAL CONIC FOR TFF EQN
057807,000474: 
057808,000475: 27,3173           45471                           DDV      STADR                                 
057809,000476:                                                                                                  #  DEN FROM PDL+0        E:(-3) OR (-16)
057810,000477:                                                                                                  #                        M:(-3) OR (-15)
057811,000478: 27,3174           77732                           STORE    TFFTEM                                #  Z SAVE FOR SIGN OF SDELF.
057812,000479:                                                                                                  #  E:(-13) M:(-12)
057813,000480: 27,3175           63406                           PUSH     DSQ                                   #  Z TO PDL+0
057814,000481: 27,3176           41206                           PUSH     DMP                                   #  Z SQ TO PDL+2  E:(-26) M:(-24)
057815,000482: 27,3177           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
057816,000483: 27,3200           75261                           SL       SIGN                                  
057817,000484: 27,3201           20206                                    5                                     
057818,000485: 27,3202           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF (ENTRY DISPLAY)
057819,000486: 27,3203           14045                           STODL    TFFTEM                                #  P ZSQ  E:(-59+2NR) M:(-55+2NR)
057820,000487:                                                                                                  #  (ARG IS USED IN TFF/TRIG)
057821,000488:                                                                                                  #  ZSQ FROM PDL+2  E:(-26) M:(-24)
057822,000489: 27,3204           41206                           PUSH     DMP                                   #  RESTORE PUSH LOC
057823,000490: 27,3205           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
057824,000491: 27,3206           77657                           SL*                                            
057825,000492: 27,3207           20201                                    0,1                                   #  X1=-NR
057826,000493: 27,3210           00043                           STORE    TFFX                                  #  X
057827,000494: 27,3211           41234                           RTB      DMP                                   
057828,000495: 27,3212           57335                                    T(X)                                  #  POLY
057829,000496:                                                                                                  #  ZSQ FROM PDL+2  E:(-26) M:(-24)
057830,000497: 27,3213           44302                           SR2      BDSU                                  #  2 ZSQ T(X)  E:(-29) M:(-27)
057831,000498: 27,3214           00023                                    RTERM                                 #  RTERM  E:(-29) M:(-27)
057832,000499: 27,3215           41215                           DAD      DMP                                   
057833,000500: 27,3216           00015                                    RMAG1                                 #  E:(-29) M:(-27)
057834,000501:                                                                                                  #  Z FROM PDL+0  E:(-13) M:(-12)
057835,000502: 27,3217           51042                           SR3      BPL                                   #  TFF SQRT(MU)  E:(-45) M:(-42)
057836,000503: 27,3220           57241                                    ENDTFF                                #  (NO PUSH UP)
057837,000504: 27,3221           75206                           PUSH     SIGN                                  #  TFF SQRT(MU) TO PDL+0
057838,000505: 27,3222           00017                                    TFFQ1                                 #  Q1 FOR GONEPAST TEST
057839,000506: 27,3223           71244                           BPL      DLOAD                                 #  GONE PAST ?
057840,000507: 27,3224           57245                                    NEGTFF                                #  YES. TFF < 0.
057841,000508: 27,3225           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057842,000509: 27,3226           51076                           DCOMP    BPL                                   #  ALFA > 0 ?
057843,000510: 27,3227           57245                                    NEGTFF                                #  NO. TFF IS NEGATIVE.
057844,000511: 
057845,000512:                                                                                                  #  CORRECT FOR ORBITAL PERIOD.
057846,000513: 
057847,000514: 27,3230           77676                           DCOMP                                          #  YES.  CORRECT FOR ORB PERIOD.
057848,000515: 27,3231           56205                           DMP      DDV                                   
057849,000516: 27,3232           17357                                    PI/16                                 #  2 PI (-5)
057850,000517: 27,3233           00031                                    TFFRTALF                              #  SQRT(ALFA)  E:(10+NA) M:(9+NA)
057851,000518: 27,3234           53657                           SL*      SL*                                   
057852,000519: 27,3235           57602                                    0          -4,2                       #  X2=-NA
057853,000520: 27,3236           57602                                    0          -4,2                       
057854,000521: 27,3237           43257                           SL*      DAD                                   
057855,000522: 27,3240           57576                                    0,2                                   
057856,000523:                                                                                                  #  TFF SQRT(MU) FROM PDL+0       E:(-45) M:(-42)
057857,000524: 27,3241           40005        ENDTFF             DMP      BOV                                   #  TFF SQRT(MU) IN MPAC          E:(-45) M:(-42)
057858,000525: 27,3242           00037                                    TFF/RTMU                              #  E:(17) M:(14)
057859,000526: 27,3243           57251                                    MAXTFF                                #  SET POSMAX IF OVFL.
057860,000527: 
057861,000528: 27,3244           77616        DUMPTFF2           RVQ                                            #  RETURN TFF (-28) CS IN MPAC.
057862,000529: 
057863,000530: 27,3245           77745        NEGTFF             DLOAD                                          
057864,000531:                                                                                                  #  TFF SQRT(MU) FROM PDL+0, NEGATIVE.
057865,000532: 27,3246           77650                           GOTO                                           
057866,000533: 27,3247           57241                                    ENDTFF                                
057867,000534: 
057868,000535: 27,3250           77745        MAXTFF1            DLOAD                                          #  RESET PDL
057869,000536: 27,3251           43545        MAXTFF             DLOAD    RVQ                                   
057870,000537: 27,3252           17373                                    NEARONE                               
057871,000538: 
057872,000539:                                                                                                  #  TIME OF FLIGHT ELLIPSE WHEN DEL (ECCENTRIC ANOM) GEQ 90 AND LEQ -90.
057873,000540: 
057874,000541:                                                                                                  #  NUM FROM TFFX.        E:(-16) OR (-29)
057875,000542:                                                                                                  #                        M:(-15) OR (-27)
057876,000543: 27,3253           77712        TFFELL             SL2                                            #  NUM  E:(-14) OR (-27)  M:(-13) OR (-25)
057877,000544: 27,3254           41465                           BDDV     PUSH                                  #  TEMP SAVE D/N IN PDL+0
057878,000545:                                                                                                  #  DEN FROM PDL+0  E:(-3)/( 16)  M:(-3)/(-15)
057879,000546:                                                                                                  #  N/D TO PDL+0  E:(11) M:(10)
057880,000547: 27,3255           45345        TFFEL1             DLOAD    DSU                                   #  (ENTER WITH D/N=0 IN PDL+0)
057881,000548: 27,3256           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
057882,000549: 27,3257           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
057883,000550: 27,3260           14013                           STODL    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
057884,000551:                                                                                                  #  D/N FROM PDL+0
057885,000552: 27,3261           77626                           STADR                                          
057886,000553: 27,3262           77732                           STORE    TFFTEM                                #  D/N  E:(11) M:(10)
057887,000554: 27,3263           53605                           DMP      SL*                                   
057888,000555: 27,3264           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057889,000556: 27,3265           57576                                    0,2                                   #  1/ALFA Z  E:(-11-NA) M:(-10-NA)
057890,000557: 27,3266           41206                           PUSH     DMP                                   #  TO PDL+0
057891,000558: 27,3267           00045                                    TFFTEM                                #  1/Z  E:(11) M:(10)
057892,000559: 27,3270           41057                           SL*      BOVB                                  
057893,000560: 27,3271           57576                                    0,2                                   #  X2= -NA
057894,000561: 27,3272           45712                                    SIGNMPAC                              #  IN CASE X= 1.0, CONTINUE
057895,000562: 27,3273           00043                           STORE    TFFX                                  #  X=1/ALFA ZSQ
057896,000563: 27,3274           41234                           RTB      DMP                                   
057897,000564: 27,3275           57335                                    T(X)                                  #  POLY
057898,000565: 27,3276           00043                                    TFFX                                  
057899,000566: 27,3277           45242                           SR3      DSU                                   
057900,000567: 27,3300           17365                                    DP2(-3)                               
057901,000568: 27,3301           41405                           DMP      PUSH                                  #  2(X T(X)-1) /Z ALFA   E:(-15-NA)
057902,000569:                                                                                                  #                        M:(-14-NA)
057903,000570:                                                                                                  #  1/ALFA Z FROM PDL+0   E:(-11-NA)
057904,000571:                                                                                                  #                        M:(-10-NA)
057905,000572: 27,3302           41345                           DLOAD    DMP                                   #  GET SIGN FOR SDELF
057906,000573: 27,3303           00045                                    TFFTEM                                #  1/Z  E:(11) M:(10)
057907,000574: 27,3304           00015                                    RMAG1                                 #  E:(-29) M:(-27)
057908,000575: 27,3305           43312                           SL2      DAD                                   
057909,000576: 27,3306           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
057910,000577: 27,3307           14045                           STODL    TFFTEM                                #  (Q1+R 1/Z) =SGN OF SDELF  E:(-16) M:(-15
057911,000578: 27,3310           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
057912,000579: 27,3311           53605                           DMP      SL*                                   #  CALC FOR ARG FOR TFF/TRIG.
057913,000580: 27,3312           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057914,000581: 27,3313           57575                                    1,2                                   #  X2=-NA
057915,000582: 27,3314           53765                           SIGN     SL*                                   
057916,000583: 27,3315           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF
057917,000584: 27,3316           57576                                    0,2                                   
057918,000585: 27,3317           14045                           STODL    TFFTEM                                #  P/ALFA  E:(-59+2NR) M:(-55+2NR)
057919,000586:                                                                                                  #  (ARG FOR USE IN TFF/TRIG)
057920,000587: 27,3320           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057921,000588: 27,3321           41366                           SQRT     DMP                                   
057922,000589: 27,3322           17357                                    PI/16                                 #  PI (-4)
057923,000590: 27,3323           77615                           DAD                                            
057924,000591:                                                                                                  #  2(XT(X)-1)/Z ALFA FROM PDL    E:(-15-NA)
057925,000592:                                                                                                  #                                M:(-14-NA)
057926,000593: 27,3324           45257                           SL*      DSU                                   
057927,000594: 27,3325           57577                                    0          -1,2                       
057928,000595: 27,3326           00013                                    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
057929,000596: 27,3327           53605                           DMP      SL*                                   
057930,000597: 27,3330           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057931,000598: 27,3331           57601                                    0          -3,2                       
057932,000599: 27,3332           52057                           SL*      GOTO                                  
057933,000600: 27,3333           57602                                    0          -4,2                       
057934,000601: 27,3334           57241                                    ENDTFF                                #  TFF SQRT(MU) IN MPAC E:(-45) M:(-42)
057935,000602: 
057936,000603:                                                                                                  #  PROGRAM NAME:  T(X)                           DATE:  01.17.67
057937,000604:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
057938,000605:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
057939,000606: 
057940,000607:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THE POLYNOMIAL T(X) IS USED BY TIME OF FLIGHT SUBROUTINES CALCTFF AND
057941,000608:                                                                                                  #        CALCTPER TO APPROXIMATE THE SERIES
057942,000609:                                                                                                  #                           2     3
057943,000610:                                                                                                  #                1/3 -X/5 +X /7 -X /9 ...
057944,000611: 
057945,000612:                                                                                                  #        WHERE   X = ALFA Z Z            IF ALFA Z Z LEQ 1
057946,000613:                                                                                                  #                X = 1/(ALFA Z Z)        IF ALFA Z Z G 1
057947,000614: 
057948,000615:                                                                                                  #        ALSO    X IS NEG FOR HYPERBOLIC ORBITS
057949,000616:                                                                                                  #                X = 0 FOR PARABOLIC ORBITS
057950,000617:                                                                                                  #                X IS POSITIVE FOR ELLIPTIC ORBITS
057951,000618: 
057952,000619:                                                                                                  #        FOR FLIGHT 278, THE POLYNOMIAL T(X) IS FITTED OVER THE RANGE (0,+1) AND HAS A MAXIMUM
057953,000620:                                                                                                  #        DEVIATION FROM THE SERIES OF 2 E-5       (T(X) IS A CHEBYCHEV TYPE FIT AND WAS OBTAINED USING
057954,000621:                                                                                                  #        MAC PROGRAM AUTCURFIT294RRB AND IS VALID TO THE SAME TOLERANCE OVER THE RANGE (-.08,+1).)
057955,000622: 
057956,000623:                                                                                                  #  CALLING SEQUENCE:     RTB
057957,000624:                                                                                                  #                                T(X)
057958,000625:                                                                                                  #        C(MPAC) = X
057959,000626: 
057960,000627:                                                                                                  #  SUBROUTINES CALLED:  NONE
057961,000628: 
057962,000629:                                                                                                  #  NORMAL EXIT MODE:  TC DANZIG
057963,000630: 
057964,000631:                                                                                                  #  ALARMS:  NONE
057965,000632: 
057966,000633:                                                                                                  #  OUTPUT:  C(MPAC) = T(X)
057967,000634: 
057968,000635:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
057969,000636:                                                                                                  #        C(MPAC) = X
057970,000637: 
057971,000638:                                                                                                  #  DEBRIS:  NONE
057972,000639: 
057973,000640: 27,3335           07171        T(X)               TC       POLY                                  
057974,000641: 27,3336           00004                           DEC      4          B-14                       #  N-1
057975,000642: 27,3337           12525 12525                     2DEC     3.333333333 E-1                        
057976,000643: 27,3341           71463 57703                     2DEC*    -1.999819135 E-1*                       
057977,000644: 27,3343           04423 17645                     2DEC*    1.418148467 E-1*                       
057978,000645: 27,3345           74604 43667                     2DEC*    -1.01310997 E-1*                       
057979,000646: 27,3347           01626 37256                     2DEC*    5.609004986 E-2*                       
057980,000647: 27,3351           77404 52071                     2DEC*    -1.536156925 E-2*                       
057981,000648: 
057982,000649: 27,3353           06030        ENDT(X)            TC       DANZIG                                
057983,000650: 
057984,000651: 27,3354  27,3353               TCDANZIG           =        ENDT(X)                               
057985,000652: 
057986,000653:                                                                                                  #  TFF CONSTANTS
057987,000654: 
057988,000655: 32,3770                                           BANK     32                                    
057989,000656: 
057990,000657: 27,2000                                           SETLOC   TOF-FF1                               
057991,000658: 27,2000                                           BANK                                           
057992,000659: 
057993,000660:                                                                                                  #                                                NOTE _  NOTE _ ADJUSTED MUE FOR NEAR EARTH TRAJ.
057994,000661:                                                                                                  # MUE            =       3.990815471 E10         M CUBE/CS SQ
057995,000662:                                                                                                  # RTMUE          =       1.997702549 E5 B-18*    MODIFIED EARTH MU
057996,000663: 
057997,000664: 27,3354           24775 30424  1/RTMU             2DEC*    .5005750271 E-5        B17*            #  MODIFIED EARTH MU
057998,000665: 
057999,000666:                                                                                                  #                                                NOTE _  NOTE _ ADJUSTED MUE FOR NEAR EARTH TRAJ.
058000,000667:                                                                                                  # MUM            =       4.902778 E8             M CUBE/CS SQ
058001,000668:                                                                                                  # RTMUM          2DEC*   2.21422176 E4 B-18*
058002,000669: 27,3356           06220 37553  PI/16              2DEC     3.141592653 B-4                        
058003,000670: 27,3360           37777 37700  LIM(-22)           2OCT     3777737700                            #  1.0 -B(-22)
058004,000671: 27,3362           00000 00100  DP(-22)            2OCT     0000000100                            #  B(-22)
058005,000672: 27,3364           04000 00000  DP2(-3)            2DEC     1          B-3                        
058006,000673: 27,3366           02000 00000  DP2(-4)            2DEC     1          B-4                        #  1/16
058007,000674: 
058008,000675:                                                                                                  #  RPAD1         2DEC    6373338 B-29            M (-29) = 20909901.57 FT
058009,000676: 27,3370  22,3151               RPAD1              =        RPAD                                  
058010,000677: 
058011,000678: 27,3370           00305 11205  R300K              2DEC     6464778    B-29                       #  (-29) M
058012,000679: 27,3372           37777 37777  NEARONE            2DEC     .999999999                            
058013,000680: 27,3374  26,3333               TFFZEROS           EQUALS   HI6ZEROS                              
058014,000681: 27,3374  26,3323               TFF1/4             EQUALS   HIDP1/4                               

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