WDL-TR2184 f5 NOVEMBER 1963 GPU PRICE $

CFSTI PRICE(S) $

Hard copy (HC)

Microfiche (MF> ^ •

H653 July 65 'S MANUAL for Interplanetary Error Propagation Program K66-15732

(ACCESSION NUMBER)

(NASA CR OR TMX OR AD NUMBER)

CONTRACT NAS 5-3342

prepared for National Aeronautics and Space Administration joddard Space Flight Center ^reenbelt, Maryland

PHILCO WDL DIVISION PALO ALTO. CALIFORNIA WDL-TR2184 15 November 1963

PROGRAMMER'S MANUAL FOR INTERPLANETARY ERROR PROPAGATION PROGRAM

Prepared by

PHILCO CORPORATION A Subsidiary of Ford MoCor Company WDL Division Palo Alto, California

CONTRACT NAS 5-3342

Prepared for

NATIONAL AERONAUTICS AND SPACE ADMINISTRATION GODDARD SPACE FLIGHT CENTER Greenbelt, Maryland

PHILCQ WDL DIVISION ABSTRACT

WDL-TR2184 UNCLASSIFIED PROGRAMMER'S MANUAL FOR INTERPLANETARY ERROR PROPAGATION PROGRAM 420 pages 15 November 1963 NAS 5-3342

This report discusses the subroutines that are used in the Interplanetary Error Propagation Program. A narrative des- cription and card listing are provided for each subroutine; flow diagrams are included, if applicable. A listing of assigned locations in common is also presented.

THIS UNCLASSIFIED ABSTRACT IS DESIGNED FOR RETENTION IN A STANDARD 3-BY-5 CARD-SIZE FILE, IF DESIRED WHERE THE ABSTRACT COVERS MORE THAN ONE SIDE OF THE CARD, THE ENTIRE RECTANGLE MAY BE CUT OUT AND FOLDED AT THE DOTTED CENTER LINE (IF THE ABSTRACT IS CLASSIFIED, HOWEVER, IT MUST NOT BE REMOVED FROM THE DOCUMENT IN WHICH IT IS INCLUDED )

PHILCQ WDL DIVISION WDL-TR2184

FOREWORD

This report is submitted to the National Aeronautics and Space Administration, Goddard Space Flight Center, in fulfilling the require- ments of Contract NAS 5-3342.

The documentation provided by Philco WDL in support of the Interplane- tary Error Propagation Program consists of the following three volumes:

• WDL-TR2184, "Programmer's Manual for Interplanetary Error Propagation Program"

• WDL-TR2185S "User's Manual for Interplanetary Error Propagation Program"

9 Guidance and Control System Engineering Department Technical

Report No. 48" The application of State Space Methods to Navigation Problems," by Stanley F. Schmidt

These volumes discusse the theory of the Schmidt-Kalman filter used in the program for data smoothing, the manner in which the program is used, and subroutine description and listing.

-iii-

'HILCQ WDL DIVISION Page intentionally left blank WDL-TR2184

TABLE OF CONTENTS

Section Page 1 INTRODUCTION 1-1 1. 1 General . . . 1-1 ... 1-1

Main Chains MAIN(Chain 1) M-3 MAIN(Chain 2) M-13 MAIN(Chain 3) M-19

Subroutine Listing

ARKTAN S-3 ARKTNS S-5 ASINH S-7 BODY S-9 BVEC S-15 CHNGP S-23 COMPHQ S-27 CONST! S-41 CONVPI S-51 CORRTP S-63 CROSS S-67 (CSH)S S-69 DE6FN S-71 DOT S-117 EARTR S-119 ECLIP S-145 ENCKE S-147 ERP S-151 ERPT S-153 FINP S-155 FNORM S-173

-v-

»HILCQ WDL DIVISION WDL-TR2184

TABLE OF CONTENTS (Cont'd)

Section Paee Subroutine Listing (Cont'd) GHA S-175 GOTOB S-179 GOTOR S-197 GUID S-203 HOUR S-217 HPHT S-221 INPUT S-223 INTR.INTRI S-231 INV3 S-245 INVAO S-249 LOADO S-251 LOADT S-253 MASS S-255 MATRX S-259 MATSUB S-261 MNA S-267 MNAND S-273 MONBTR S-277 MULT S-285 NUTAIT S-287 OBLN S-295 ONBTR S-303 ORTC S-307 OUTC S-311 OUTDAT S-321 OUTP S-325 PTRAN S-338 RETRO S-341 ROTATE S-347 ROTEQ S-349 RVIN S-355

-vi-

PHILCQ WDL DIVISION WDL-TR2184

TABLE OF CONTENTS (Cont'd)

Section Subroutine Listing (Cont'd) RVOUT S-361 SDEC S-365 SETN S-369 SHIFTP S-371 STEPC S-375 TIMEC S-391 TIMED S-395 TRAC S-397 TRANSH S-403

LIST OF TABLES

Number Page 1-1 List of Assigned Quantities in Common "C" Array T . . . . 1-3 1-2 List of Assigned Quantities in Common "S" Array 1-6 1-3 List of Assigned Quantities in Common "1C" Array 1-12 1-4 List of Assigned Quantities in Common "T" Array 1-15

-vii-

PHILCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

PROGRAM SUBROUTINE LISTING

ARKTNS Single Precision Arctangent ARKTAN Double Precision Arctangent ASINH(X) Function Evaluation BODY Calculates Accelerations Due to Perturbing Bodies BVEC Calculates B Vector CHNGP Determines when to Shift Body Center COMPHQ Computations for ONBTR and MONBTR Subroutines CONST1 Array of Input Constants CONVPI Converts Input Covariance to 1950 CORRTP Updates P Matrix CROSS Cross Product (CSH)S Fortran II Card Image Input Subroutine DE6FN Fapclmtegfation ,SubroGtine' u DOT Function Forming Dot Product EARTR Updates Covariance Matrix for Earth Based Tracking KCLIP Transforms Coordinates through Transformations ENCKE Calculates Perturbation due to Deviation from CONIC ERP Prints Out Ephemeris Error ERPT Prints Out Time of Ephemeris Error FINP Data Input Subroutine FNORM Norm of A Vector GHA Greenwich Hour Angle GOTOB Main Subroutine for Integration of Trajectories GOTOR Iterates to Solve Keplers Equation GUID Performs Guidance Calculations HOUR Reads Printer Clock HPHT Performs Matrix Multiplication H*P*HT INPUT Converts Inputs to Equinox of 1950 Reference INTR FAP Ephemeris Subroutine INV3 Inverts Up to a 6 By 6 Matrix INVAO Forms Inverse of Transistion Matrix LOADO Obtains Transition Matrix From T Array

-ix-

WDL DBVBSION WDL-TR2184

LOADT Puts Unit ICS On Perturbation Equations MASS Arranges Gravitational Constants of Bodies Considered MATRX Multiplies A*B=C or A*B*AT=C Max Dimension (10.10) MATSUB Error Propagation Logic Subroutine MNA Transformation to Selenocenic.. Coordinates MNAND Transformation for Selenocenic Velocities MONBTR Updates Covariance Matrix for Moon Beacons MULT Multiplies Two 3 by 3 Matrices NUTAIT Calculates Nutation Matrix OBLN Calculates Acceleration Due to Oblateness ONBTR Updates Covariance Matrix for Onboard Tracking ORTC Outputs Orbital Parameters OUTC Outputs Trajectory OUTDAT Outputs Calendar Date OUTP Outputs RMS Values of Orbital Parameters PTRAN Transforms P Matrix RETRO Performs Retro Fire ROTATE Calculates Transformation for Rotation About an Axis ROTEQ Calculates Matrix from Equinox 1950 to Mean Equinox of Date RVIN Transforms Coordinates From Spherical to Cartesian RVOUT Transforms Coordinates from Cartesian to Spherical SDEC Second Derivative Subroutine SETN Set Read and Write Tape Numbers SHIFTP Shifts Body Center STEPC Move Along Conic in Time TIMEC Converts Calendar Date to Days from 1950 TIMED Converts Days Hours Min Sec to Seconds TRAC Tracking Station -Coordinates TRANSH Transforms H Matrix From Date to 1950

-x-

PHILCO WDL DIVISION WDL-TR2184

PROGRAMMER'S MANUAL FOR INTERPLANETARY ERROR PROPAGATION PROGRAM

WDL DIVISION WDL-TR2184

SECTION 1

INTRODUCTION

1.1 GENERAL This manual contains subroutine descriptions, logic, and FORTRAN listings for the Interplanetary Error Propagation Program. Listings of the quantities which are in the four common storage arrays (T,S,C, and 1C) are also included.

1.2 GENERAL DESCRIPTION OF METHOD OF ORBIT DETERMINATION USED IN PROGRAM The classical approach to the determination of an orbit from tracking data is the maximum likelihood, least-squares technique. This program uses a different approach to this problem. The relationships between the observed tracking data and the initial conditions (or an equivalent set of parameters) which determine the orbit are highly nonlinear. Therefore, it is assumed that a preliminary estimate of the initial conditions and, therefore, the orbit, is known. The equations are then linearized about this "nominal" orbit and an adjustment to the nominal orbit found from the differences between the observed tracking data and the predicted tracking data based on the nominal orbit. In the least-squares technique, the data is pro- cessed in parallel in the sense that the normal equations are summed over all the available tracking data before a modification to the nominal orbit is determined.

The Schmidt-Kalman technique differs from the classical least-squares approach in two ways: first, the estimate used is based upon the mini- mization of a risk function different from that used in the least-squares approach and, second, the data is processed serially instead of in parallel. The Schmidt-Kalman technique depends upon a linearization of the relations between the orbit parameters and the observed tracking data. Therefore, it assumes some nominal trajectory and an associated error estimate (covariance matrix) for the nominal trajectory.

1-1

PHILCQ WDL DIVISION WDL-TR2184

CrNF-RAL TLOW PIIAOPAM

Or OVf-RAI.l. ERROR PROPAGATION PROGRAM

Mft.t, n MM i r ' " '

i ARE 1 1 ".',';',' IS TIMS A UIDANCE YES CALL CALL I Jl 1 ~ * ^ i --» „,,..,, • '-' ^ ' GOTOB |~~*! CHAIN 2 ~| ' TO oE I "/"* cOMPUTEO 1 | NO NO 4 1 1 |

,

GOTOB INTE- GRATES TRAJECTORY TO TARGET TO OUTAIN GUIDANCE MATRIX

MAIN CHAIN I MAIN CHAIN 3

r -i r 1

1 t.FI 1)1' 1 1 ^ ; ROf.HAM CALL , CALL CALI 1 | FOR ERROR O'AIN 3 1 1 GOTOB CHAIN 1 | I PROrAGATlON HUN 1 1 L_ II _ | MATSUB GOT OR i r~ "*" ~i r~ | READ PROPAGATE GOTOB 1 COVARI'iNCE DATA MATRICES CARDS IN TIME

J

SET UP MATSU- R CALL INT, SEQUENCE CALL AND TYPE EARTR MEASUREMENTS REfNG MADE

CALL ONPTR CONTROL INTEORAT'ON 1 — -• TACKACE TO PERMIT CAI 1 CAI 1. OF MAT'jim

,.

CAI 1 c-uin CALL MAT '",11 >?

— ' | i 1

Figure 1-1

1-2

PHILCO NA/DL DIVISION WDL-TR2184

The serial processing of the tracking data and associated updating of the nominal orbit occurs as follows: At the start of the time period for which tracking data are to be processed and an improved estimate of the orbit is to be obtained, it is assumed that an estimate of the orbit (a set of state variables) and an error estimate exist. Both of these estimates are updated to an instant of time when tracking data are available. Based upon the available tracking data at this time, a revised estimate of the nominal trajectory is obtained together with a revised estimate of the associated covariance matrix. These two estimates are then propagated along the orbit until additional tracking data become available. In this way, the orbit is updated and tracking data are processed serially.

1.3 GENERAL PROGRAM DESCRIPTION This program is capable of error studies and their propagation along lunar and planetary trajectories. The design of the program is such as to facilitate the accurate and rapid evaluation of tracking systems for a given lunar or interplanetary trajectory. The program is also able to analyze the errors based on ground tracking as well as on-board tracking independently and in combination. The program has the option to calculate the errors and their projection to the target planets for a probe or a spacecraft based on the following type of measurements.

a. Earth-based tracking 1. Range 2. Range rate 3. Azimuth 4. Elevation 5. Minitrack data

b. On-board tracking 1. Right ascension 2. Declination 3. Range 4. Range rate 5. Range and range rate from beacons on the target planets. 1-la

H!LCQ WDL DIVISION WDL-TR2184

The program is also capable of propagating guidance covariance matrices along the nominal trajectory. The program has the facility of using two

types of guidance laws: (1) Fixed time of arrivals and (2) Variable time of arrival with the constraint that the energy with respect to the target be held constant.

The program is composed of three chainsu Each link is complete in itself; that is, each contains a main program and all necessary sub- routines. Control is passed from one link to the next by the CALL CHAIN statement. The program requires an ephemeris tape for operation. Figure 1-1 shows a general block diagram of the flow through the program,

The following tables show the assigned locations in "common storage":

Table 1-1: "C" Array - Floating Point Variables Table 1-2: "S" Array - Floating Point Constants Table 1-3: "1C" Array Fixed Point Variables Table 1-4: "T" Array - Storage for Integration Routine

1-lb

PHILCQ WDL DIVISIOI WDL-TR2184

TABLE 1-1

LIST OF ASSIGNED QUANTITIES IN COMMON "C" ARRAY

DIMENSION 1000 FORTRAN CELL NAME DIMENSION DESCRIPTION

C(10) TW Whole days from 1950 at last rectification

C(ll) TF Fractional days from 1950 at last rectifi- cation

C(12) TSECO Time in seconds at last rectification

C(13) TP1 Time in whole days

C(14) TP2 Time in fractional days

C(15) XP (3) X, Y, Z, equinox of 1950

C(18) VXP (3) X, Y, 2 equinox of 1950

C(21) AE (3) Acceleration due to deviation from conic

C(24) AO (3) Acceleration due to oblateness

C(27) CA (3) Acceleration due to perturbing bodies

C(30) TSEC Seconds from start - zero reference time

C(33) X (3) Reference conic X, Y, 2

• • • C(36) VX (3) Reference conic X, Y, Z

C(46) XSO (3) Initial position for STEPC conic

C(49) VXSO (3) Initial velocity for STEPC conic

C(55) V Gravity constant of central body

C(56) VKB (6) Gravitational constants of bodies used

C(62) PO (22) Ephemeris positions of bodies

C(84) VE (22) Ephemeris velocities of bodies

C(106) RBO (6) Distances to bodies

1-3

WDL DIVISION WUL-TR2184

DIMENSION 1000 FORTRAN CELL NAME DIMENSION DESCRIPTION

C(112) RBOP (6) Distances to bodies

C(120) EN (3,3) Nutation matrix

C(129) EA (3,3) Transformation from 1950 to mean equinox of date

C(138) AN (3,3) Transformation from 1950 to true equator of date

C(147) ECL (3,3) Transformation from 1950 to ecliptic of date

C(156) ECX (3) Position: ecliptic coordinates

C(159) ECV (3) Velocity: ecliptic coordinates

C(162) BET Angle from line of nodes to radius vector

C(163) THT True anomaly

C(171) BP (3,3) Acceleration partials for use in variational equations

C(180) SMA Semi -Major Axis

C(181) ECC Eccentricity

C(182) RCA Radius of closest approach

C(183) OINC Orbital inclination

C(184) OMG Longitude of ascending

C(185) BEP Argument of periapsis

C(186) XED (3) Position: equator date

C(189) VED (3) Velocity: equator date C(192) RCV (3) it x v" 2 C(195) RCV2 htxvl C(196) R2 R2

1-4

PHILCQ WDL DIVISION WDL-TR2184

DIMENSION 1000 FORTRAN CELL NAME DIMENSION DESCRIPTION 2 2 C(197) v v

C(198) RDV R • v 2 2 C(199) C3 c = v - • -^

C(460) PFTA (6,6) Deviation From Nominal Covariance Matrix

C(568) TRANS (3,6) Guidance partial matrix being used on runs

C(622) TLAST (4,6) Delta time since last observation in ONBTR

C(647) TOUT Time to output for MATSUB

C(648) TGUIDE Time to make guidance correction

C(649) TSECP LAST TIME through MATSUB

C(650) TPRINT Output print interval

C(651) TSTART Start time

C(652) P (6,6) Knowledge of state covariance matrix

C(752) AOS (6,6) Transition matrix from start to present time

C(788) STPARS (3,3) Station partials MONBTR

C(797) CIOMP Compute guidance matrices

C(800) STPARD (3,3) Station partials MONBTR 0(888)^1 C(900)J Constants used in COMPHQ

C(973) OUTPUT (6) Data for output purposes

1-5

WDL DIVISION WDL-TR2184

TABLE 1-2

LIST OF ASSIGNED QUANTITIES IN COMMON "S" ARRAY

DIMENSION 1000 FORTRAN CELL NAME DIMENSION DESCRIPTION

C(D Earth Planetary Mass

S(2) Moon Planetary Mass

S(3) Sun Planetary Mass

S(4) Venus Planetary Mass

S(5) Mars Planetary Mass

S(6) Jupiter Planetary Mass

S(7) SPARE

S(8) SPARE

S(9) SPARE

S(10)\ Earth Constants S(19)J

S(20)\ Moon Constants S(29)J

S(30)\ Sun Constants S(39)j

S(40)\ Venus Constants S(49)j

S(50)\ Mars Constants S(59)j

S(60)\ Jupiter Constants S(69)j

S(70) 86400. Conversion factor days to seconds

S(71) 1/86400. Conversion factor seconds to days

1-6

PHILCQ WDL DIVISION WDL-TR2184

DIMENSION 1000 FORTRAN CELL NAME DIMENSION DESCRIPTION

S(72) .017453296 Conversion factor for degrees to radians

S(73) 57.29578 Conversion factor for radians to degrees

S(80) AT Launch latitude - degrees

S(81) ON Launch longitude - degrees

S(82) AL Launch altitude - kn>.

S(83) TLTI Time from launch to injection, days hours, rain sec

S(84) FAZ Firing azimuth

S(110) TSTOP Time to stop calling MATSUB

S(lll) TIM Type of input

S(112) DATE Start date

S(113) FDATE Fractional start date

S(114) CIBDY Central body

S(115) X (3) Initial position

S(118) vx (3) Initial velocity

S(121) TIBDY Target Body

S(122) OUTTP Type of output

S(124) SKTB Type of stop

1-7

»HILCQ WDL DIVISION WDL-TR2184

EARTH BASED TRACKING DATA N = 0 - 19

CELL DESCRIPTION UNITS 2 S(125)+N*15 Variance of range KM

S(126)+N*15 Variance of azimuth RAD2

S(127)+N*15 Variance of elevation RAD2

S(128)+N*15 Variance of range rate KM2/ SEC2

S(129)+N*15 Variance of latitude RAD2

S(130)-I-N*15 Variance of longitude RAD2

S(131)+N*15 Variance of altitude KM2

S(132)+N*15 Variance of azimuth biases RAD2

S(133)+N*15 Variance of elevation biases RAD2

S(134)+N*15 Latitude of station DEG

S(135)+N*15 Longitude of station DEC

S(136)+N*15 Altitude of station KM

S(137)+N*15 Station name

S(138)+N*15 Period of observation SEC

S(139)+N*15 Variance of time bias SEC*

S(425) Velocity of light error KM2/ SEC2

ON-BQARD TRACKING DATA

S(426) Variance of range KM2

S(427) Variance of right ascension RAD2

S(428) Variance of declination RAD2

S(429) Variance of range rate KM2/ SEC2

S(430) Variance of range bias KM2

S(431) Variance of right ascension bias RAD2

1-8

PHILCQ WDL DIVISION WDL-TR2184

CELL DESCRIPTION UNITS

S(432) Variance of declination bias RAD2

S(433) Variance of range rate bias XM2/SEC2

S(434) Variance of clock time bias SEC2

S(435) Spare

S(436) Spare

N = 0 - 5 EARTH, MOON,SUN, VENUS, MARS, JUPITER

FORTRAN CELL NAME DIMENSION DESCRIPTION UNITS

S(437)+4*N Period of range observation SEC

S(438)+4*N Period of right ascension SEC Observation

S(439)+4*N Period of declination Observation SEC

S(440)+4*N Period of range rate Observation SEC

S(471) Shutoff Error (Rocket) (%)2

S(473) Pointing Error (Motor) (RAD)2

S(475) Type of guidance decision 0-Time + Ratio

S(476) TGUID (6) Times for guidance correction

S(483) GDCOR Ratio for making guidance correction 2 S(484) DMON Error in monitoring guidance m correction

S(485) ENKE Correction criteria for deivation from reference conic

1-9

WBL DIVOSION WDL-TR2184

FORTRAN CELL NAME DIMENSION DESCRIPTION UNITS

MOON BEACON TRACKING DATA N = 0 - 9

S(500)+N*15 Variance of range KM2

S(501)+N*15 Variance of right ascension RAD2

S(502)+N*15 Variance of declination RAD2

S(503)+N*15 Variance of range rate KM2/ SEC2

S(504)+N*15 Variance of range bias KM2

S(505)+N*15 Variance of right ascension bias RAD2

S(506)-«-N*15 Variance of declination bias RAD2

S(507)+N*15 Variance range rate bias KM2/ SEC2

S(508)+N*15 Variance clock bias SEC2

S(509)+N*15 Latitude of station DEC

S(510)+N*15 Longitude of station DEC

S(511)+N*15 Altitude of station KM

S(512)+N*15 Station name

S(513)+N*15 Period of observation SEC

S(514)+N*15 SPARE

S(650) PARI (21) Initial deviation from nominal covariance matrix

S(671) PI (21) Initial knowledge of state covariance matrix

S(720) PUPIN Type of coordinates for PI

S(721) PARIN Type of coordinates for PARI

S(722) FTA (3,6) Guidance transition matrix fixed time arrival

1-10

PHILCQ WDl_ DIVISIOI WDL-TR2184

FORTRAN CELL NAME DIMENSION DESCRIPTION UNITS

S(740) CTE (3,6) Guidance transition matrix constant energy WRT* target

MOON BEACON DATA N = 0 - 9

S(758)+N*3 Variance of station latitude RAD2

S(759)+N*3 Variance of station longitude RAD2

S(760)+N*3 Variance of station altitude KM2

EARTH BASED TRACKING DATA N = 0 - 19

S(788)+N*5 Tracking Station horizon RAD

S(789)+N*5 Variance of M die cos

S(790)+N*5 Variance of M dircos bias

S(791)+N*5 Variance of L dircos

S(792)+N*5 Variance of L dircos bias

S(888) RETR to call subroutine RETRO

S(900) RAD (6) Radius to bodies

* with respect to

l-ll

WDL DDVBSION WDL-TR2184

TABLE 1-3

LIST OF ASSIGNED QUANTITIES IN COMMON "1C" ARRAY

DIMENSION 300 FORTRAN CELL NAME DIMENSION DESCRIPTION IC(1) N # of sets of equations

1C (2) IOR body center

IC(3) NOR new body center

1C (4) KSTP type stop

1C (5) KTYPE switch indicating type stop

1C (6) ITARG target body

IC(7) KOUT type of output

1C (8) IMMSUB key to test if MATSUB is to be called

+ if tracking station 1 considered

IC(ll) + if tracking station 2 considered

+ if tracking station 3 considered

IC(29) + if station 20 considered

IC(30) + range, 0 no range Station + AZ-EL, 0 no AZ-EL # 1

IC(32) + dircos, 0 no dircoa

IC(33) + range rate, 0 no range rate

1-12

PHILjCQ WDL DIVISIOI WDL-TR2184

FORTRAN CELL NAME DIMENSION DESCRIPTION 1C (106) + range, 0 no range

IC(107) + AZ-EL, 0 no AZ-EL Station 1C (108) + dircos 0 no dircos # 20

1C (109) + range rate, 0 no range irate

1C (110) Earth observed + yes, 0 no

IC(lll) Moon observed, + yes, 0 no

Sun observed, + yes, 0 no

Venus observed, + yes, 0 no

1C (114) Mars observed, + yes, 0 no

Jupiter observed, + yes, 0 no

range, + yes, 0 no

rt. ascension, + yes, 0 no Earth on-board / measurements declination, + yes, 0 no

range rate, + yes, 0 no

IC(136) range, + yes, 0 no

IC(137) rt. ascension, + yes, 0 no Jupiter on-board IC(138) declination, + yes, 0 no measurements

IC(139) range rate, + yes, 0 no

IC(140) + Moon beacon station 1 o 10 Moon beacon stations IC(149) + Moon beacon station 10

1-13

3 HBLCQ WDL DIVBS1ON WDL-TR2184

FORTRAN CELL NAME DIMENSION DESCRIPTION IC(150) + range "\

IC(151) + right ascension \ station + declination | one IC(152) o IC(153) + range rate

IC(186) + range

IC(187) + right ascension I ° V station 1C (188) •f declination ( ten O 11 IC(189) + range rate J

1C (190) LSTAT Key for earth based tracking

IC(191) LONB Key for on-board tracking

IC(192) LMB Key for moon beacon tracking

IC(193) IGUID Positive if guidance run

1C (194) ISTAT (20) Keep account which of 20 trackers saw vehicle last time in MATSUB

1C (2 14) NOUT Output indicator

IC(215) PUP IN type of P matrix input

IC(216) PAR IN type of PAR matrix input

IC(217) IGDTP type of guidance

IC(218) IGDKEY guidance key set in main

IC(219) IGD number of guidance corrections IC(220) IMOONB (20) Keep account which of 10 moon beacons saw vehicle last time in MATSUB IC(231) NSTEP Key for STEPC

1-14

PHILCQ WDL DIVISION WDL-TR2184

TABLE 1-4 LIST OF ASSIGNED QUANTITIES IN COMMON "T" ARRAY

This Is the common storage block for the integration package. See the sub- routine writeup for DE6FN for definitions of the quantities in storage.

DIMENSION 1360

CELL DESCRIPTION T(D N No. of Equations "^

T(2) X initial conditions which must be T(3) H Step Size ' supplied

T(4) y± i = I,N T(N44) y/ i = 1,N - T(2B+4, y" i = I,N second derivatives stored by V subroutine

T(3N44) y^ i = 1,N most significant

T(4N44) y[ i = I,N least significant

T(5N44) AyJ i = 1,N

T(6N+4) Ay^ i = 1,N

T(7N+4) yi i = 1,N most significant

T(8N+4) y£ i = I,N least significant

T(9N+4) yi3 1 - l.H ^| saved for central T(10N+4) difference equations yi3 i = 1'N J

1-15

WDL DIVISION WDL-TR2184

DIMENSION 1360

CELL DESCRIPTION v" i = 1 N \ T(llN-K) yiO ' \ T(12NH) y" i = 1,N \ \ saved from 6R, R-K steps, T(13N44) y" i = 1,N \Used to form difference tables in an attempt to proceed to a T(UN-K) y" i = 1,N cowell step.

T(15N+4) yV4 i - I,N /

T(16N+4) yJ5 i = I,N /

T(17N+4) y'^6 1-i.H/

T(18N+4) used only if coordinates changed.

T(19N+4)^

11 N storages. N sets of differences saved • • for next cowell step.

T(30N-8) ^

1-16

PHILCQ WDL DIVISION WDL-TR2184

MAIN CHAINS

M-l

PHILCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184 Subroutine: MAIN (Chain 1)

Purposet Set up program to perform guidance runs to obtain transition and partial matrices. Call Chain 2 for error propagation runs and write out end point data after program returns from Chain 3.

Common storages used or required: T, S, C, 1C BVEC, CHAIN, CONST1, FINP, GOTOB, Subroutines required: INPUT, INVAO, LOADO, LOADT, MATRX, RETRO. TIMEC. TIMED Functions required: „ Approximate number of storages required: 793 DEC

M"3 MAIN(Chain

WDL DIVISION WDL-TR2184

MAIN (CHAIN 0

CALL SETN TO HAS GOTOB BEEN OBTAIN INPUT/OUTPUT CALLED FOR ERROR GO TO 152 TAPE NUMBERS PROPAGATION RUN?

NO

CALL CONSTI TO PLACE CONSTANTS IN S ARRAY

CALL TINP TO READ INPUT DATA

IS A GUIDANCE RUN TO BE MADE?

SET IGUID = I

SET IGOTP = (1) FOR FIXED TIME ARRIVAL (2) FOR CONSTANT ENERGY

IS GUIDANCE PARTIAL MATRIX TO BE COMPUTED?

WRITE OUT "START OF RUN TO COMPUTE GUIDANCE MATRICES"

SET UP NUMBER OF EQUATIONS (NSETS). CENTRAL BODY (IOR) , AND TARGET BODY (ITARG)

MULTIPLY TARGET RADIUS BY 5 FOR DISTANCE STOP IN GOTOB

CALL TIMEC TO CONVERT INJECTION TIME TO DAYS FROM 1950

CALL INPUT TO CONVERT INPUT STATE TO EQUINOX OF 1950 REFERENCE

SET TIME SINCE LAST RECTIFICATION, (TSECO) . = 0

MAIN (CHAIN-I) ~2

PHILCQ WDL DIVISION WDL-TR2184

I

CACALL L TIMEO TO CONVERT EFINAMAL STOP TIME TO SECONDS

CONVERT FINAL b,TOP TIME, (TSTP) . TO DAYS

CALL GOTOB TO INTEGRATE NGMII^L TRAJECTORY AND N SETS OF PERTURBATION EQUATIONS TO WITHIN •> TARGET RADII OF TARGET

CALL BVEC TO OBTAIN MISS PARTIALS AT POINT L WHERE GOTO8 STOPPED

CALL LOADO TO LOAD TRANSITION MATRIX INTO AO

CAI-I- MATRX TO OBTAIN CTf MATRIX

IS DISTANCE TO TARGET FROM I GO 10 207 l»^--- VEHICI.E>5 TIMES TARGET RADIUS'

REDUCE TARGET RADIUS BEING USED, TO TRUE TARGET RADIUS

CALL GOTOB TO INTEGRATE TO END POINT

CALL LOADO TO PUT PRESENT TRANSITION MATRIX IN AO ARRAY

REDUCE TARGET RADIUS BEING USED, TO TRUE TARGET RADIUS

WRITE END POINT DATA

LOAD FTA MATRIX WITH TRANSITION MATRIX

WRITE OUT 'START OF DATA RUN"

c CALL CHAIN 2 L M J MAIN (CHAIN-l)-S

WDL DIVISION WDL-TR2184

CALL LOADO TO PUT I PRESENT TRANSITION MATRIX IN AO ARRAY

1 r

CALl MATRX TO FORM STATE. COVARIANCE MATRIX, P

MAKE P MATRIX SYMMETRIC ABOUT MAIN DIAGONAL

WRITE OUT 'STATE COVARIANCE MATRIX AT END POINT"

CALL MATRX TO UPDATE AOS MATRIX

WRITE OUT "STATE TRANSITION MATRIX FROM INJECT TO END POINT"

CAUL INVAO TO INVERT TRANSITION MATRIX, AOS

CALL MATRX TO FORM COVARIANCE MATRIX AT INJECTION

WRITE OUT "STATE COVARIANCE MATRIX AT INJECTION"

CALL BVEC TO FIND MISS PARTIALS AT END POINT

WRITE OUT PARTIALS AT END POINT

CALL MATRX TO FIND KNOWLEDGE OF TARGET MISS, (PUN)

M-6 MAIN (CHAIN-1}

PHILCQ WDL DIVISION OTL-TR2184

WRITE OUT KNOWLEDGE OF TARGET MISS

IS THIS A GUIDANCE RUNT

YES

< r CALL. MATRX TO FIND MATRIX OF \ GUIDANCE ERRORS, 'PFTA)

MAKC PKTA SYMMETRIC c ABOUT MAIN DIAGONAL

WRITE OUT COVARIANCE MATRIX OF GUIDANCE ERRORS". (PFTAj

CALL INVAO TO INVERT THE AO TRANSITION MATRIX

CALI. MATRX Tf< FIND >VARI«.NCr MATRIX OF TARGET F MISS PARAMETERS. ' r-UNt

WRITE OUT PUN MATRIX S COVARIANCE MATRIX OF KNOWLEDGE OF TARGET MISS PARAMETERS '

CALL MATRX TO FIND COVARIANCE MATRIX OF TARGET MISS PARAMETERS, (PUN1

WRITE OUT PUN AS COVARIANCF MATRIX OF TARGET [ MISS PARAMETERS'

IS RETR> . OOOI'

SET GUID O CIOMP - a RETR • O

GO TO 200

M-7 (CHAIN-1)-5

NA/DL DIVISION WDL-TR2184

MAIN (CHAIN 1)

* LABEL1 MAI1 CEC20D 2 MAIN PROGRAM MAI10000 C ERROR PROPAGATION MAI10010 Ci ALONG INTERPLANETARY TRAJECTORIES MAI10015 C iREQUIRES FOLLOWING 'SUBROUTINES AND FUNCTIONS MAI10020 C ARKTNS SINGLE, PRECISION ARCTANGENT MAI10030 :C' ARKTAN DOUBLE. PRECISION ARCTANGENT MAI10040 C' ASINH(X) FUNCTION EVALUATION MAI10050 C BODY CALCULATES ACCELERATIONS DUE TO PERTURBING1 BODIES MAI10060 C BVEC CALCULATES B VECTOR MAI10070 C1 CHNGP DETERMINES WHEN TO SHIFT BODY CENTER MAI1009Q C' .COMPHQ COMPUTATIONS FOR ONBTR AND MONBTR SUBROUTINES MAI10095 •c- .CQNSTl ARRAY OF INPUT CONSTANTS MAI10100 C CONVPI CONVERTS INPUT COVARIENCE MATRIX TO 1950 MAI10110 C' .CORKTP UPDATES P MATRIX MAI10020 .c .'CROSS CROSS PRODUCT MA110130 c •DOT FUNCTION FORMING DOT PRODUCT MA110140 c •DE6FN FAP INTEGRATION SUBROUTINE MAI10160 C1 EARTR UPDATES .COVARIANCE MATRIX FOR EARTH BASED TRACKING MAI10170 :C- ECLIP TRANSFORMS COORDINATES THROUGH TRANSFORMATIONS MAI10180 C' ENCKE CALCULATES PERTURBATION MAI10320 c MATSUB ERROR PROROGATION LOGIC SUBROUTINE MAI10330 c MNA TRANSFORMATION TO SELENOCENTIC' COORDINATES MA11034Q c MNAND TRANSFORMATION FOR SELENOCENTRIC' VELOCITIES MAI10345 C' MONBTR UPDATES COV-ARIANCE MATRIX FOR MOON BEACONS MAI10350 c ,MULT MULTIPLIES TWO 3 BY 3 MATRICES MAI10370 c NUTAIT CALCULATES NUTATION MATRIX MAI10380 C1 OBLIN CALCULATES ACCELERATION 'DUE TO' OBLATENESS MAI10390 c. ONBTR UPDATES COVARIANCE MATRIX FOR 'ONBOARD TRACKING MAI10400 C' ORTC OUTPUTS ORBITAL PARAMETERS MAI10420 c 'OUTC OUTPUTS TRAJECTORY MAI1044Q C' OUTDAT OUTPUTS CALENDAR DATE MAT10430 C' OUTP OUTPUTS RMS VALUES OF 'ORBITAL PARAMETERS MAI10450 C' •PTRAN TRANSFORMS P MATRIX MAI10452

M-8 MAIN (CHAIN 1)' PHILCQ WDL DIVISIOKI UDL-TR2184

A IN (CHAIN 1) (Cont'd)

RETRO PERFORMS RETRO FIRE MAI10455 ROTATE CALCULATES TRANSFORMATION FOR ROTATION ABOUT AN AXIS MAI10460 ROTEQ CALCULATES MATRIX FROM EQUINOX 1950 TO MEAN EQUINOX MAI10465 OF DATE MAI10468 RVIN TRANSFORMS COORDINATES FROM .SPHERICAL TO CARTESIAN MAI10470 RVOUT TRANSFORMS COORDINATES FROM CARTESIAN TO SPHERICAL MAI10480 SDEG SECOND DERIVATIVE SUBROUTINE MAI10530 SETN SET REAL) AND WRITE TAPE NUMBERS MAI10535 SHIFTP SHIFTS GCDY CENTER MAI1054Q KOVE ALONG CONIC IN TIME MAI10545 TlMtC CONVERTS CALENDAR OATE TO 'DAYS 1 FROM 1950 MAI10550 TIMED CONVERTS D«YS HOURS.MINI SEC TO SECONDS MAI10560 TRAC TRACKING STATION COORDIATES MAI1057Q TRANSH TRANSFORMS H HATRIX FROM DATE TO 1950 MAI10580 COMMON T,S,C,IC MAI10600 DIMENSION TU360>»S(1000),C(1000),IC(300),X(3) MAI10610 1,VX(3),XD(3),VXP(3>,AN(3,3),UM(6>,8VU),PBV(3,6) MAH0620 2,AO(6,6),PARH21),PI(2l),ISTAT(20),FTA(3,6) MAI10630 3,TRANS(3,6) MAI10640 4,PFTA(6,6),P(6,6),TGUID<6) MAI10650 DIMENSION AOS(6,6),RAD(6), RBOP(6 ) ,CT£(3,6),AOI(6 6),PUN(3,3) MAI10660 EQUIVALENCES,TDU«>,(S,SDUM),(C,CUUM),(IC*IDUM), MAI10670 1(1C(W),IMMSUB), (S(112),DATE),(S(113),FiDATE),(S(115),X) VX)MAI10680 2,(IC<193>,IGUID),(S(11Q),TSTOP),(IC(2),IOR),(S(111),TIM) MAI10690 3,(IC(6),ITARG)»(ICC4),KSTP),(IC(1),NSETS).(C(10),TW),(C(11),TF) MAI10700 4,,STD),(S(1),UM),(C(15),XP) MAI10710 5,,(S<671).PI), MAI10750 9,(S(720),PUPIIM),(S(721),PARIN) MAI10760 EQUIVALENCE ,RBOP),

M~9 MAIN (CHAIN 1) -7 WDL DIVISION WDL-TR2184

MAIN (CHAIN 1) (Cont'd)

2 CONTINUE MAI1092 IGUID=1 MAI1093 GO TO 8 MAI1094 3 CONTINUE MAI1095 MAI1096 IGDTP = QUID MAI1097J IF(IGDTP-3) 204,204,205 MAI1098 205 CONTINUE MAI1099. IGDTP=2 MAI1100 204 CONTINUE MAI1101 IGUID=2 MAI1102 ClOMP IS SET POSITIVE'IF MATRICES ARE TO BE' COMPUTED MAI1103 IF(CIOMP) 8,8,4 MAI1104 CONTINUE COMPsCIOMP MAI1106I WRITE OUTPUT TAPE MJTS.750 MAI1107I 750 F,ORMAT(43H1START OF RUN TO' COMPUTE GUIDANCE MATRICIES) MAI1108I NSETS=7 MAI1109 IORsS<114) MAI1HO ITARG=S(121) MAI11X1 RAD(ITARG)=5,*RAD(ITARG) M A 1 1 1 1 2 1 KlNsS(lll) MAI1U3J CALL TIMEC(DATE,FDATE,TW,TF) MAI1114! CALL INPUT(KIN,XP,VXP,TW,TF,AN,X,VX) MAIIIISJ TSECO =0. MAI1116I KSTP=1 MAI1117J CALL' LOADT MAI1118I CALL1 TIMED(TSTOP.TSTPS) MAI1119I TSTP=TSTPS*STD MAI1120J IMMSUB=1 MAI1121J CALL GOTOB(TSTP) MAI1122I CALL BVEC(lOR,ITARG,XP,VXP,BV,PBV,TPl.TPe»UM) MAI1123! CALL1 LOADO(AO) MAI1124I CALL MATRX(PBVtAO;CTE,3*6,6,0) MAI1125I IF(RBOP(ITARG)-RAD(ITARG))206,206,207 MAI1126' 206 CONTINUE MAI1127| RAD(ITARG)=RAD(ITARG)/5, MAI1128 TSECO=TSEC MAI1129 CALL GOTOB(TSTP) MAI1130 CALL LOADO(AO) MAI1131 GO TO 208 MAI1132 207 CONTINUE MAI1133. RAD(ITARG)=RAD(ITARG)/5, MAI1134 208 CONTINUE MAI1135 WRITE OUTPUT.TAPE NUTS,706,((AO(I,J),J»l,6),1=1,6) MAI1136 706 FORMAK31HOTRANSITION 'MATRIX TO END 'POINT//( 6E17 , 8 ) ) MAI1137 URITE OUTPUT TAPE MJTS,707, «CIE< I, J) ,'J = l,6) ,1 = 1,3) MAI1138 707 FORMAT(49HOB VECTOR TRANSITION MATRIX, BV 'ROWS B , T , B>, R , VINF// MAI1139 K6E17.8) ) MAI1140 DO 6 1=1,3 MAI1141 DO 6 J=l,6 MAI1142

M-10 MAIN (CHAIN 1) =8 PHILCQ WDL DIVISIOI WDL-TR2184

Mil (CHAIN 1) - (Cont'd)

FTAiI,J>=AO(I,J) M A 1 1 1 4 ,< Q CONTINUE MAIH44Q CONTINUE MAJ ] 145Q *KTTE OUTPUT TAPE KUTs,75i MAT11460 FC^MAT(l»,HlbTART OF DATA RUN) M A T 1 1 4 7 !} CALL CHAIiM(2,B3) CALL LOAnU(AO) AO IS TRANSITION MATwlX FROM LAST TIKE IN MATSUB MA 1 11500 CALL MATRX(AO,P,P,6,6,6,1) DO 3 G 1 = 1,6 M A T 1 1 5 1 1 DL1 3G J = T,6 MAIH-)] 2 MAI11714 >- < j , J. ) = P < I , J > K A 111516 ,3 0 COM! INUE ^ A 1 1 1 5 1 8 P IS STATE COVARJACE MATHIX AT END POINT f AT 11 520 KRZTt: OUTPUT TAPE N uTS , 8 0 0 , ( ( P ( I , J ) , J = l 1=1,6, 6 ) ) MAI 11 530 OC F 0 L? M A T ( 3 8 H 0 STATE. CUVARlftNCt MATRIX AT END PC I NT v' A 1 1 1 ? 4 0 1/(6E17.8) ) MATH550 CALL MATRXtAO, AUS.,A OS,6,6,6,0) •V>AH19^0 ACS IS TRANSITION MATRIX FROM INJECTION TO END POINT MAI11570 Wh'TTE OUTPUT TAPE NUTS,601,((ACS(I,J),J = l, 6)1=1,6) M A 1 1 1 5 8 0 801 FORMAT(50HO STATE TRANSITION MATRIX FROM INJECT TO ENU POINT MAI1159Q 1/(6E17.8)) MAH16fiO CALL INVAO(AOS.AOI) M A 1 1 1 6 1 C : FORMS INVERSE OF, ACS M A I 1 1 5 2 0 CALL MATRX(AOI,P.ACS,6,6,6,1) I"A IU63 ^RITE OUTPUT TAPE NUTS,802,AOS X A I i 1 6 4 802 FORMAT(3«HO STATE COVARIANCE MATRIX AT INJECTION M A 1 1 5 6 5 0 1/(6E17.8)) MA 111660 CALL BVEC(IOR,ITARG,XP,VXP,BV,PBV,TP1,TP2,UM) MAI11670 WRITE OUTPUT TAPE NUTS,810,«PbV(J,I),1=1,6),J=l,3) MAH1680 810 FORiMAT(4QHO B*T,B*R,VINF PARTIALS AT END POINT PfV 1/(6E17.8>) MAT 11700 ,CALL MATRX(PBV,P,PbN,3,6,6,l) MAI 11 710 WRITE OUTPUT.TAPE NUTS,811,PUN WAI 1172Q 811 FORMATC47HO COVARIANCE MATRIX OF KNO^LEGE OF B*T,d*R,VINF MAI H730 1/(3E20.8)) w A 11 1 7 4 0 IGUIU = IGUID MAI H7SO GO TO (23,22) ,'IGUID M A 1 1 1 7 6 0 22 CONTINUE MAI 11770 CALL MATRX(AO,PFTA,PFTA,6,6,6 , 1) M A 1 1 1 7 6 0 DO 31 1=1,6 y A 1 1 7 P 1 DO 31 J=T,6 1 1 7 8 ? PFTA(I,J)=(PFTA(I,j)+PFTA(J,I))/2. FFTA(J,I)=PFTA(I,J) 31 .CONTINUE MAI11788 WRITE OUTPUT TAPE N'UTS, 80 4 , ( ( PTF A (I, J ) , J = l, 6 > , I = 1, 6 ) MAIH79Q H04 FORMAT(38HO COVARIANCE. MATRIX OF GUIDANCE ERRORS MAIH300 1/C6E17.8) ) MAH1310 CALL INVAO(AO.AOI) MAI11B20 CALL MATRX(TRANS,AOI,TRANS,3,6,b,0) MAI11830

M-ll W/.IN (CHAIN 1) -9 »HILCQ WDL DIVISION MAIN (CHAIN 1) (Cont'd) CALL MATRX(TRANS,P,PUNp3,6,6,l) MAI1184 WRITE OUTPUT.TAPE 'NUTS,803,PUN MAI1185 803 FORMAT(58HO COVARIANCE MATRIX OF KNOWLEDGE OF TARGET MISS PARAMETEMAI1186 IRS MAI1187 2/(3E20.8)) MAH188 CALL MATRX(TRANS,PFTA,PUN,3,6,.6,1) MAI1189 • WRITE OUTPUT,TAPE N'UTS, 807, PUN MAI1190 807 FORMAT(45HO COVARIANCE MATRIX OF TARGET MISS PARAMETERS MAI1191 1/(3E20.8) ) MAI1192 IF(RETR-.0001)23,23,10 MAI1192 10 CONTINUE MAI1192 •CALL RETRO MAI1192 23 CONTINUE MAI1193 RETR=0, MAI1193 •GUID = 0 MAI1194 • ClOMPsO MAIH95 GO TO 200 MAI1196 END MAI1

iM-12 MAIN (CHAIN' I

RHILCQ WDL DIVISION WDL-TR2184

Subroutine: MAIN (Chain 2)

Purpose! Set up program to perform error propagation run. Call Chain 3 to make data run.

Common storages used or required: T, S, C, 1C CHAIN, CONVPI, INPUT, TIMEC, Subroutines required: TIMED

Functions required: None

Approximate number of storages required: 317 DEC

M"13 MAIN (Chain 2) -1

WDL DIVISION WBL-TR2184

MAIN (CHAIN 2)

CALL SETN TO OBTAIN INPUT-' OUTPUT TAPE NUMBERS

SET IMMSUB * 2 TO INDICATE ERROR PROPAGATION RUN IN GOTOB

SET NUMBER OF EQUATIONS. (N8ETS) . CENTRAL BODY, (IOR) . TARGET BODY, (ITARQ) . TYPE OF INPUT, (KIN) . AND STOP SWITCH. (KSTP)

CALL TIMECTO CONVERT INJECTION TIME TO DAYS FROM 1950

CALL INPUT TO CONVERT INPUT STATE TO EQUINOX OF 1950 REFERENCE

CALL LOADT TO PLACE UNIT INITIAL CONDITIONS ON PERTURBATION EQUATIONS

YES WERE GUIDANCE MATRICES COMPUTED?

CALL TIMED TO CONVERT FINAL STOP TIME TO SECONDS

SET FINAL STOP TIME, TSTPS, EQUAL TO CURRENT TIME, TSEC.

CALL CONPI TO CONVERT INPUT STATE COVARIANCE MATRIX TO 1950 COORDINATES

M-14 MAIN (CHAIN 2 ) -2

PHIJjCQ WDL DIVISION WRITE OUT INITIAL P MATRIX

IS THIS A GUIDANCE RUN?

IS TYPE OF GUIDANCE RUN FIXED TIME OF ARRIVAL?

SET TRANS ARRAY = FTA MATRIX

SET TRANS ARRAY CTE MATRIX

CALL CONVPI

IS TYPE OF GUIDANCE DECISION TIME?

CALL TIMED TO CONVERT "TIME TO GUIDE". TGUID

WRITE OUT INITIAL PAR MATRIX

SET TRANSITION MATRIX, AOS, EQUAL TO THE IDENTITY MATRIX

c CALL CHAIN 3 M~ 1 5 MAIN (CHAIN 2) -2

^HILCQ WDL DIVISION WDL-TR2184

(CHAIN 2)

* LABEL MAI2 * SYMBOL TABLE MAI2 CEC20E2 PART 2 MAIN CONTINUED MAI20000 COMMON T.S,C,IC MAI20010 -DIMENSION T(1360),S(1000),C(1000),IC(300),X(3) MAI20020 1,VX(3),XP(3),VXP(3),AN(3,3),UM(6),BV(4),PBV<3,6) MAI20030 '2,AO(6,6),PARI(21>,PI(21),ISTAT(20),FTA(3,6) MAI20040 3»TRANS(3,6> MAI20050 4,'PFTA(6,6),P(6,6),TGUID(6) NAI20Q60 •DIMENSION AOS(6,6) ,RAD(6), R80P ( 6 ) , CTE ( 3 , 6 ) , AOI ( 6, 6 ) , PUN ( MAI20073, 3 ) 0 EQUIVALENCE(T,TDUM), (S,SDUM), (C,CDUM), (IC,IDUM>, MAI20080 KlC(8),IMMSU8)f (5(112), DATE), ( S ( 113 ) , FDATE ) , ( S ( 115 ) , X ) , )MAI2009( S ( 1180 ) , VX 2, (IC(193),IGUID).(S(110),TSTOP),(IC<2),IOR),(S(111),TIM) MA120i,00 •3,(IC(6),ITARG),(IC(-4.),KSTP),(IC(1),NSETS),(C(10),TW),(C(11),TF) MAI20110 4, (C(138),AN), (C(12),TSECO), ( S(71) ,'STD) , ( S( 1 ) , U(M C ) ( 15 ) , XP ) MAI20120 5. PI,P) MAI20460 WRITE OUTPUT '• TAPE 'K'OUT, 708 MAI20470

M-16 MAIN (CHAIN 2) -4 PHILCO WDL DIVISIOES WDL-TR2184

A1N (CHAIN 2) (Cont'd)

FORMAK18HOINITIAL P 'MATRIX) MAI20480 WRITE OUTPUT TAPE NOUT,709,P MAI20490 FORMAT(6E17,8) MAI20500 IGUID=IGUID MAI20510 GO TO (19,18), IGUID MAI20920 CONTINUE MAI20530 IGDTPslGDTP MAI20540 GO TO(211j212.212),IGDTP MAI20550 • CONTINUE MAI20560 DO 202 1=1,3 MAI20570 'DO 202 J = l,6 MAI20580 TRANSd, J)=FTA MAI20590 CONTINUE' MAI20600 GO TO 214 MAI20610 DO 213 1*1,3 MAI20620 'DO 213 Jsi,6 MAI20630 'TRANSd. J)=CTE(I, J) MAI20640' CONTINUE MAI20650 IGDKY=1 MAI20660 INPARsRARIN MAI20670 .CALL 'CONVPI(INPAR,'PARI,PFTA) MAI20680 SU75) CONTAINS TYPE OF. GUIDANCE DECISION 0 TIME, * RATIO MAI20690 IF(S(475))17,17,20 MAI20700 17 • CONTINUE MAI20710 CALLi TIMED(TGUID(1),TGUIDE.) MAI20720 20 CONTINUE MAI20730- WRITE OUTPUT TAPE A'OUT,710 MAI20740 710 FORMATC20HO INITIAL PAR 'MATRIX) MAI20750 WRITE OUTPUT TAPE -NOUT,709,PFTA MAI20760 19 'CONTINUE' MAI20770 >DO 150 1 = 1,6 MAI20780 DO 151 Jol,6 MAI20790 AOS

M-17 MAIN (CHAIN 2) -5

WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine: MAIN (Chain 3)

Purpose; Call subroutine GOTOB to perform integration of trajectory for an error propagation run. Set cellT(1359) = 1359 to indicate GOTOB has been called and call Chain 1.

Common storages used or required: T

Subroutines required: GOTOB Functions required: None

Approximate number of storages required:

M-19 MAIN (Chain 3) - 1

>HILCQ WDL DIVISION WDL-TR2184

MAIN (CHAIN •)

CALL GOTOS FOR ERROR PROPAGATION RUN

SET TO 3591 = 1359 TO INDICATE IN CHAIN I THAT GOTOB HAS BEEN CALI ED FOR AN ERROP PROPAGATION RUN

CAUL CHAIN I

M-20 MAIN (CHAIN 3) -2

PHILCQ WDL DIVISION WDL-TR2184

[N (CHAIN 3) LABEL MAI3 SYMBOL TABLE MAI3 C20C2 CHAIN 3 GOTOB 'ONLY MAI30000 COMMON T MAI30010 DIMENSION 1(1360) MAI30020 EQUIVALENCE(T(1358),TSTP) MAI30030 •CALL GOTOB(TSTP) MAT30040 T<1359)=1359, MAI30050 • CALL CHAINCUB3) MAI30060 END MAT3

MAIN (CHAIN 3) -3

M-21

=»HILCQ WDL DIVISION •y. Page Intentionally Left Blank WDL-TR2184

SUBROUTINES

(Subroutine discussion is presented in the following manner: (1) subroutine description, (2) subroutine flow diagrams, if applicable, (3) subroutine listings.)

S-l

WDL DBVISiON Page Intentionally Left Blank WDL-TR2184

Function: ARKTAN

Purpose! To find the double precision arctangent 9 of (Y/X) in the proper quadrant. -II ^ 9 * II for N = 180; 0 ^ 9 s 360 for N = 360.

Calling Sequence: 7 = ARKTAN (N. X. Y)

Input and Output

Data Symbolic Program Mathematical Dimensions Definition I/O Name or Dimensions Symbol Location or Units

I N 1 N = 180 or 360, as above I X 1

I Y 1

0 ARKTAN radians tan"1 (Y/X)

Common storages used or required: None

Subroutines required: None

Functions required: DATAN, other double precision routines Approximate number of storages required:

S-3 ARKTAN - 1

3HILCQ WDL DIVISION ARKTAN WDL- TR2 iW

* LABEL ARKT * -SYMBOL TABLE ARKT CE.C2021 FUNCTION ARKTAN ARKTOOOO CALL SETN(NINnNOUT) ARKT0015 FUNCTION ARKTAN(N.X.Y) ARKT0010 0 P=3.14159265 ARKTOQ20 K=M/180 ARKT0030 D ARKTAN 9 ATANF(ABSF(Y/X ) ) ARKT004Q IF(Y)1,2,3 ARKT0050 1 GO TO (4,5),K ARKT0060 ARKTOQ70 D 10 ARKTAN = ARKTAN-P ARKT0080 GO TO 9 ARKTOQ90 D 11 ARKTAN = -P+,5 ARKT0100 -GO TO 9 ARKTOUO D 12 ARKTAN = -ARKTAN ARKT0120 GO TO 9 ARKT0130 5 IF IS UNDEFINED/1HQ> ARKT0260 GO TO 9 ARKT0270 3 IF(X)8,19,9 ARKT0280 D 8 ARKTAN = P-ARKTAN ARKT029Q GO TO 9 ARKT0300 D 19 ARKTAN = ,5*P ARKT0310 9 RETURN ARKT0320 END ARKT

S-4 ARKTAN - 2

PHILCQ WDL DIVISION WDL-TR2184

Function: ARKTNS

Purpose; To find the arctangent Q of (Y/X) in the proper quadrant. -R £ 9 £ n for N = 180; 0 ^ 9 < 360 for N = 360.

Calling Sequence; Z = ARKTNS (N. X. Y)

Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I N 1 N = 180 or 360, as above I X 1

I Y 1

0 ARKTNS radians tan" (Y/X)

Common storages used or required: None

Subroutines required: None Functions required: ATANF

Approximate number of storages required: ______

S-5 ARKTNS - 1

WDL DIVISION ARKTNS

* LABEL ARKS * SYMBOL TABLE ARKS CEC2022 FUNCTION ARKTNS ARKSOOOO FUNCTION ARKTNS (

£-6 - 2

PHILCQ NA/DL DIVISION WDL-TR2184

Function: ASINH

PurP°se; To compute 9 = arcsinh (X) = log (X +

Calling Sequence; Y = ASINH (X)

Input and Output

Symbolic Data Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

I X

1 3 0 ASINH radians sinh" (X) = loge (X -t-NJX + 1)

Common storages used or required: None

Subroutines required: None

Functions required: LOGF

Approximate number of storages required:

S-7 ASINH - 1

HBLCQ WDL DIVtSBON !••««. ASINH WDL-TR21S4

* LABEL ASIN + SYMBOL TABLE ASIN FUNCTION ASINH(X) ASINOOO' .ASINH=LOGF(X+SQRTF(X*X+1 0) ) A SIN 0 0 I1 RETURN A SIN 0 0 2 END ASIN

S-8

PHILCQ WDL DIVISBOf WDL-TR2184 Subroutine: BODY

Purpose; To compute the perturbing acceleration due to the perturbing bodies included in the ephemeris. It also computes the first variation of the perturbing acceleration for use in the integration of the variational equations.

Calling Sequence; CALL BODY (XP, PO, VKB, RBO, RBOP, CA, NOR, BP, T, NEQ, U)

Input and Output

Data Symbolic Program Mathematical Definition I/O Name or Dimensions Symbol Dimensions Location or Units

I XP 3 ~R Km Position vector

I PO 22 Ri Km Positions of bodies in ephemeris Km3/ 2 I VKB 6 H sec Gravitational constants of bodie being considered

0 RBOP 6 l%v Km Magnitude of position of vehicle

relative to i th body

0 RBO 6 1% Km Position of i — body relative to central body (Cont'd.) Common storages used or required: None

Subroutines required: None

Functions required: FNORM

Approximate number of storages required:

S-9 BODY-1

WDL DIVISION WDL-TR2184

(Cont'd.)

Data Symbolic Program Mathematical Dimensions Definition I/O Name or Dimensions Symbol Location or Units

0 CA 3 Perturbation accelerations

I NOR 1 Number of central body dXj 0 BP 3,3 dx i First variation of perturbation accelerations

I/O T 1360 Common T Block I NEQ 1 Number of equations being integrated Km3/ 2 Central body gravitational I U 1 H sec constant

Equation Being Solved

The perturbation term due to the n bodies being considered is:

R

R3 JP

where R. = R - R.. JP J

The vector P is placed in the cells called CA.

If the number of equations being solved is greater than three, the first variation of P with respect to position is determined and placed in the T block for the integration package

i = 1,3 AP , J = 1,3

S-10 BODY-2

PHILCQ WDL DIVISIO WDL-TR2184

The form of AP is obtained by differentiating

with respect to X.. This yields:

AP.. - -£ tv1 y/ -^r •"» f^»Sr ^C ~ [R,.I *•*•» _ • ^-"^»» ) f R•"•! k \ R 3 9Xi R5 Vk P 9X J kP k=0 I kp J Kkp

with M> = M- and R = R o op

or AP.. i.j. = y -^ k=I 0/-v A\ki p

S-ll BODY - 3

HLCQ WDL DIVBSION WDL-TR2184

SUBROUTINE BODY

STEP THROUGH 6 BODIES

IS BODY BEING CONSIDERED THE CENTRAL BODY

YES

IS THE NUMBER OF EQ BEING IS BODY OBTAIN INTEGRATED BEING RELATIVE GREATER THAN 3 CONSIDERED POSITION VECTOR

YES

OBTAIN iPLACE RELATIVE VARIATIONS POSITION VECTOR OF ACCELERATIONS IN T BLOCK

IS THIS SET RADIUS CENTRAL TO TARGET BODY I010 CONSIDERATION

NO

SET UP COMPUTE PERTURBATION CONSTANTS FOR CENTRAL BODY ACCELERATION (CA)

IS THE NUMBER OF EQUATIONS BEING INTEGRATED GREATER THAN 3

YES

COMPUTE FIRST VARIATION OF PERTURBATION ACCELERATIONS (AP)

S-12 BODY -

PHILCO. WDL D1VISIC WDL-TR21W- * LABEL + SYMBOL SUBROUTINE. BODY(XpPO, VKB , RBO, RBOPp C A , NCR . AP,T»NEQ»U) BOHYQUO DIMENSION X(3),PO(22>i>VK8(6),RBQ(6)iRBOP(6),CA(3)pXN(18> NjP(3) BOQY001 1AP(3,'3),T(1360> BOOV002 N = NOR DO 1 1=1,15 RODY004 o a 23=1 • BODY003 1 XMI> = PO(J) BOOYOQ6 DO 2 1=16,18 BODY007 j = 20=1 BODYOOB 2 XN(I) = PO(J) DO 3 1=1,3 BODYOin CAdJsQ, "OOY011 3 CONTINUE • HOHY01? DO 9 1=1,6 - . BODY013 Kl - 3*1-3 PODY014 IF(I-N)10, 11,10 11 CONTINUE BODY016 DO 12 Jsl,3 RJP(J)=X(J) ' BODYOIR 12 CONTINUE POPY019 GO TO 13 BODY020 10 CONTINUE BODY021 IF (VKB(I» 5,8,5 . BODY02? 5 DO 6 J=l,3 BOOY023 K s Kl+J BOHY024 RJP(J) = X(JJ = XN(K) BODY025 6 CONTINUE BODY026 13 CONTINUE BODY027 RBOP(I) = FNORM(RJP) BODY028 RBO(I) c FNORM(XN(K1+1» BODY029 R3 = RBOP(D**3 BODY030 X3 = RBO(I)+*3 80DY031 FAC=VKB(I)/R3 FAX = VKB(I)/X3 - BODYfMS IF(I-N)4,23,4 BOPYQ34 4 CONTINUE BODY03r? C ' ACCELERATIONS (NEGATIVE) DUE TO PERTURBING BODIES BOOYOift DO 7 J=l,3 . K1J = Kl * J CA(J)=CA(J)*FAC*RJP(J)*FAX*XN(K1J) BODY 059 7 CONTINUE BOnYCMl! •GO TO 26 BODY04J 23 CONTINUE 80r:Y045 FAC=U/R3 BOOY043 FAX=U/X3 800Y044 26 'CONTINUE BOnY045 DO 24 J=1P3 BOOY046 RJP( J)=RJP( J)/RBOP(I) BODY047 24 CONTINUE BOnY048 BODY -

S-I3

jPHILCQ WDL DIVISION BODY (CONT'd) WDI -1

RJP IS NOW A UNIT VECTOR 8 0 n Y 0 4 s , IF(NEQ-3)14,14,15 15 CONTINUE PARTIALS FOR PERTURBATION EQUATIONS BODY05; DO 20 jal,3 BODY053C J = J B 0 0 Y 0 5 '1-' DO 20 K = J,.3 BOPYO?1 AP(J,K)sAP(J,K)+FAC*<3.*KJP(J)+RJP(K)} IF(J-K)21,22,21 BODY037J •"21 CONTINUE AP(K, J)aAP( J,K) BODY05' . GO TO 20 BODY 0 50 [ 22 CONTINUE BODY 06 ~ AP(J, J)»AP( J, J.)-FAC BODY06' 20 CONTINUE BODY063I 25 FORMAT(3E16B8)' 14 CONTINUE BODY061 ' GO TO 9 BODYO&oi 8 RBOP(I) = liElU RODY067[ 9 CONTINUE .BODY 06 , NSsNEQ/3-1 BODY06 . IF(NS)16,16.17 BODY07H( 16 CONTINUE BODY07" RETURN BODY07- 17 CONTINUE BODY0731 DO 18 Inl,NS 8 0 D Y 0 7 * ' BODY07' N'STPB3*3*I BODY07uL DO 19 J=l,3 BODY0771 KKaNST+J BOOY07, T(KK)=0. BODY07 •DO 19 K = lf3 BODY080C .JJeNSTP*K B 0 D Y 0 8 " ' T(KK)=T(KK)*AP( J,K)*T(JJ) BODY03 19 'CONTINUE BODYOd3'C 18 CONTINUE ' B 0 n Y 0 3 4.r GO TO 16 BODY08 END BOOY

s-u BODY

PhHLCQ \A/DL DIVISION WDL-TR2184

Subroutine: BVEC

Purpose; To obtain the matrix of target miss partials; B-T, B'R, and V infinity with respect to the state.

Calling Sequence; CALL BVEC (IOR, ITARG, X, V, BV, PBV, TO, TF, UM)

Input and Output

Symbolic Data Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

I IOR 1 Central body

I ITARG 1 Target body _k I X 3 R Position vector

I V 3 u Velocity vector

0 BV 4 Nominal Miss Parameters

0 PBV (3,6) Matrix of Miss Partials

I TW 1 t days Whole days from 1950

I TF 1 t days Fractional days from 1950

,.3, 2 I UM 1 u. Km /sr:c Grav/'tional constant Common storages used or required: None

Subroutines required: DOT, INTRI, CROSS

Functions required: FNORM

Approximate number of storages required:

5-15 BVEC - 1

PHBLCQ WDS_ DIVISION WDL-TR2184

Derivation of the B, S, T, and R vectors

The B, R, S, and T vectors are used to define a target miss (se.e Fig. 1 below)

INCOMING ASYMPTOTE

VECTOR OUT PAPER

T IS SELECTED ARBITRARILY

GEOMETRY NEAR TARGET FIG. I

B, the position vector in the plane of the trajectory originating at the center of gravity of the target and directed perpendicularly to the in- coming asymptote of the hyperbola, is approximately the vector miss which would occur if the target had no mass.

To determine the target miss direction relative to the target, a set of orthogonal vectors is computed. Let S be a unit vector in the direction of the incoming asymptote, T be a unit vector perpendicular to S that lies in a fixed plane of interest such as the equatorial plane, and R be a unit vector to form a right-handed system.

/S R S X T

S-16 BVEC - 2

PHSLCQ WDL DIVISBOIS WDL-TR2184

Since B is perpendicular to S, it lies in the plane determined by R and T. The variables which are used to describe the miss relative to a plane of interest are the projections of B on T and R, i.e., B-T and ~B-R.

The quantities used in the derivation of the vectors are the following:

h = |R x v| c = v2 - £

h2 C3 e = Jl +

True anamoly

-1 cos

Unit vectors to specify orientation of conic

c = RJC_v |JR X"v|

R cos 9 - M sin 9

h = C X

The unit vector in the direction of the asymptote is given by

S-17 BVEC - 3

>HLCQ WOL DBV3S1ON WDL-TR2184

The impact parameter

where B - 1

Also « 2 j. o 2 1 SX +SY

T.. = - 2 2 s S N x Y

A A /\ and R = S X T

Derivation of partials of V infinity with respect to the state

2 _2u VINF =\ vr — —~-

i = 1,2,3 Xi (VINF) R3

dviNF i = 1,2,3 (VINF)

Reference: JPL EXTERNAL PUBLICATION NO. 674

S-18 BVEC - 4

PH1LCQ WDL DIVISION WDL-TR2184

SUBROUTINE BVEC

IS CENTRAL YES BODY TARGET BODY

NO

CALL EPHEMERIS OBTAIN POS ft VELOCITY VECTORS RELATIVE TO TARGET

INDEX t = 1-7

OBTAIN ORBITAL ELEMENTS

POS TES* T V INFINITY ZERO O'R NEC

WRITE OUTPUT MOTION IS ELLIPTIC OR PARABOLIC

COMPUTE B VECTOR a S VECTOR

$ COMPUTE t.f a 3.8

TEST *INDEX I 1 2 | 3 J 4 5 | 6 | i~[ A A

^

INCREMENT I INDEX

1=7

\ RETURN/ COMPUTE PARTIALS FOR V INFINITY -^-\7

S-19 BVEC - 5

»HSLCQ WDL DIVISION BVEC + LABEL' BVEC * SYMBOL TABLED BVEC CEC2001 .SUBROUTINE BVEC BVECOOOO' •SUBROUTINE' BVEC {IOR,ITARG,X,V,BV,PBV,TW,TF,UM) BVEC0010' 'DIMENSION X(3),V(3),XP<3),VP<3>,BV<4),>PBV(3,6),PO(22),VE(22) BVECOQ201 i;BD(-3).1CP<3)«RB<3).RMt3)f UMC6),PP(-3)«OQ(3).S(3),B(3).RR(3),TT<3) BVEC00301 'CALL"SETN(NIN,NOUT) BVEC0035 | 'Ds2,'E6 BVEC004Q 'DO I" Ial,3, BVEC0050 XP(I)=X(I) BVEC0060' VPDO 4 1 = 1,3, BVEC0140 BVEC0150 XP(I)sXP(I)-PO(IB) BVEC0160 VP(I)sVP(I)"VE(IB) BVEC0170; 4 'CONTINUE' BVEC0180 3 CONTINUE, BVEC0190 DO 5 1=1,7 BVEC0200 CALL' CROSS(XP,VP,CP) BVEC0210] DsFNORM(CP) BVEC0220' ReFNORM(XP) BVEC0230 •DO 6 -Jsl.3 BVEC0240) :CP(-J)BCP(J.)/D BVEC0250| RB(J)=XPCJ)/R BVEC0260 CONTINUE' BVEC0270 .CALL.:CROSS(OP,RB»RK) BVEC0280 •UaUMdTARG.) BVEC0290 BVEC0300 BVEC0310 7 CONTINUE BVEC0320 WRITE OUTPUT,TAPE NOUT,100 BVEC0330 100 FORMATO2H MOTION IS ELLIPTIC.'OR- PARABOLIC) BVEC0340I •GO TO 25 BVEC0350 8 CONTINUE 8VEC0360 BVEC0370 E2al0-«P*C3/U BVEC0380 E B BVEC0390' BVEC0400 SEM2sE2-lo BVEC0410I SEM1»SQRTF,(SEM2) BVEC0420I BVEC0430 -SE :sS BVEC0440i RDOTsDOT(XP«VP)/R BVEC0450 -CTHETB(p.R-)/(E*R) BVEC0460 STHETs(RDOT*SQRTF('P/U) BVEC0470.

BVEC - 6

S-20

PHILCQ WDL DIVISION! BVEC (CONT'd) WDL-TR2184

DO 9 J = l,3 BVEC0480 PP(.J)=CTHET*RB(J)-STHET*RM(J> BVEC049Q GQ(J)=STHET*RB(J>*CTHET*RM(J) BVEC0500 S(J)=PP(J)/E + SE>QQ BVEC0510 B<'J)sASE*PP(J)-A*SE*QQ(J> BVEC0520 9 CONTINUE' BVEC0530 S2aSQRTF(S(l)**2*S(2)**2> BVEC054Q TT(1)=S(2)/S2 BVEC0550 TT(2)=-S(1)/S2. BVEC0560 TT(3)=0, BVEC057Q CALL CROSS(S,TT,RR) BVEC0580 BD(1)=DOT(B,TT> BVEC0590 BD(2)=DOT(B,RR) BVEC0600 1 = 1 BVEC0610 GO TO (10,11,12,13,14,15,16),! BVEC0620 10 CONTINUE BVEC0630 DO 17 J = l,2 BVEC0640 BV( J)=:BD< J) BVEC0650 17 'CONTINUE BVEC0660 BV(3)=SQRTF(C3) BVEC0670 XP(l)sXP(l>*10. BVEC0680 GO TO 5 BVEC0690 11 CONTINUE BVEC0700 -DO 18 jsi,2 BVEC0710 PBV(J,1)«(BD(J)-BV(J))/10. BVEC0720 18 .CONTINUE BVEC0730 XP(1)=XP(1)-10. BVEC0740 XP(2)=XP(2)*10. BVEC0750 GO TO 5 BVEC0760 12 CONTINUE BVEC0770 DO 19 J=l,2 BVEC0780 •PBV(J*2)s(BD(J)"PV(J))/10. BVEC079Q 19 CONTINUE BVEC0300 XP(2>=XP(2)-10. BVEC0310 XP(-3)=XP<3)*10, BVEC0820 GO TO 5 BVEC0330 13 CONTINUE BVECOB4Q DO 20 Jel,2 8VEC0850 PBV-,01 BVEC0950 VP(2)=VP(2)+,01 BVEC0960 GO TO 5 BVEC0970 15 CONTINUE BVEC0980

S-21 BVEC - 7

WDL DIVISION BVEC (CQNT'd) WDL-T;R2W>

DO 22 J=l,2 BVEC0990 'PBVU»5)s(BD)*100. 8VEC1000 22 CONTINUE1 BVEC1010 VP(2)sVP(2)-, 01 BVEC1020 VP(3)=VP(3)+.01 BVEC1030 GO TO 5 BVEC1040 16 CONTINUE BVEC1050 DO 23 jsl,2 BVEC1Q60 P6V(J*6)=(BD(J)-BV(J))*100. BVEC107Q 23 CONTINUE BVECIOSO' VP(3)=VP(3)-,01 BVEC1090 CONTINUE1 BVEC1100-I VIN=SORTF(C3) BVEC1110 UR2=1.*U/R**3 BVEC1120 UR3=UR2/VIN BVEC1130 DO 24 Isl,3 BVEC11.40 BVEC1150 3* J)aVP(I)/VIN BVEC1160 PBV(3,I)=UR3*XP(I) BVECH7Q 24 CONTINUE 8VEC1180 25 CONTINUE BVEC1190 RETURN BVEC1200 END BVEC

BVEC - 8 S-22

PHILCQ WDL DIVISION WDL-TR2184

Subroutine: CHNGP

Purpose; To choose the appropriate body center as a function of distance from the present central body.

Calling Sequence: CALL CHNGP (NOR, IOR, RAD)

Input and Output

Data Symbolic Program Mathematical I/O Name or Dimensions Symbol Dimensions Definition Location or Units

0 NOR 1 New body center

I IOR 1 Present body center

I RAD 6 Km. RAD(I) = distance from body I

to vehicle

Common storages used or required: None

Subroutines required: None

Functions required: None

Approximate number of storages required:

5-23 CHNGP-1

WDL DIVISION WDL-TR2184

Method of Selecting Body Center

Present Central Body New Central Body

1) Earth Sun R s 25 x 10

4 Earth R? * 3 x IO A Moon R £ 3 x 10 A 2) Moon Moon R < 3 x 10

4 Earth R? ^ 3 x IO

3) Sun Earth Rj ^ 25 x IO5

5 Venus R4 < 25 x IO

5 Mars R5 < 25 x IO

Jupiter R, < 25 x IO5 o Sun (if none of above)

4) Venus Venus R, < 25 x 10

Sun R, S 25 x IO5

5) Mars Mars R5 < 25 x 10'

f Sun Rc :> 25 x 10

6) Jupiter Jupiter R, ^ 25 x 10-

Sun R^ < 25 x 10'

where 1^ = RAD(I) = distance from body (i) to the vehicle.

S-24 CHNGP-2

PHBLCQ WDL DIVISIO WDL-TR2184

LABEL CHNG SYMBOL TABLE' CHNG fC2002 CHNG •SUBROUTINE CHNGP(NOR,IOR«RAD) CHNGOQOO DIMENSION RAD(6) CHNG0010 10 s IOR CHNG0020 NOR a IOR CHNG0025' GO TO (1,2,3,4,4,4), 10 CHNGOQ30 1 IF CRAD(1>-2500000,> 11*12,12 CHNG0040 11 IF (RAD(2)~30000,) 13,14,14 CHNG0050 12 'NOR a 3 CHNG0060 •GO TO 14- CHNG0070 13 'NOR .n 2 CHNG0080 14 .RETURN CHNG009Q. '2 IF (RAD(2)=30000,) 14,21,21 CHNG0100 21 iNOR a 1 CHNG0110 GO TO 14 CHNG0120 ,3 'IF (RAD(1>=2500000,) 31,31,32 CHNG0130 31 NOR a 1 CHNG0140 •GO TO 14 CHNG0150 32 'DO -'34- Ia4,6 CHNG0160 IF CRAD(I)-2500000.) 33,34,34 CHNG0170 33 NOR a I CHNG0180 GO TO 14 CHNG0190 34 CONTINUE' CHNG0200' GO TO 14 CNNG0210 4 IF (RAD(IO)=25000008) 14,41,41 CHNG0220 41 'NOR •= 3 CHNG0230 GO TO 14 CHNG024Q END CHNG

CHNGP - 3 S-25

WDL DBVISION Page Intentionally Left Blank WDL-TR2184

Subroutine: COMPHQ

Purpose; To compute the H matrix of measurement partials with respect to the vehicle state and the variance of the measurements. The subroutine is called by ONBTR, on-board tracking subroutine, and MONBTR, the moon beacon tracking subroutine. The types of measurements which are evaluated are range, right ascension, declination, and range rate. After computation of the H matrix and the measurement error, subroutine CORRTP is called to perform the filtering of the measurement and updating of the state covariance matrix, P. Calling Sequence; CALL COMPHQ (JJJ. KK. NN1

jnput and Output

Data Symbolic Program Mathematical I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I JJJ 1 Type of measurement I KK 1 On-board or moon beacon

I NN 1 Key for locating constants in

storage

Common storages used or required: T. S. C. 1C Subroutines required: CORRTP, DOT

Functions required: SQRT

Approximate number of storages required: 388 DEC

3-27 COMPHQ - 1

>HLCQ WDL DIVISION WDL-TR2184

Calling Sequence Elaboration

The calling sequence of COMPHQ consists of CALL COMPHQ (JJJ, KK, NN) where:

JJJ is a key which indicates the type of measurement being performed.

1. Range 2. Right ascension 3. Declination 4. Range rate

KK is a key which indicates if the measurements being made are: (1) on-board measurements or (2) moon beacons.

NN is a key which is used to obtain constants out of the common S array.

COMPHQ Partial Derivatives

To perform the covariance matrix updating for on-board observations and moon based beacons, a number of partial derivatives are required. The partials are derived in the following paragraphs.

The following quantities and relationships are used in the deriva- tions. The vehicle's postion, X, and velocity, X, relative to the celestial body or moon beacon are obtained from common. These vectors may be written as: +Y -YV+Y ZV +ZB,

s'28 COMPHQ - 2

PHILCQ WDL DIVISIOi WDL-TR2184

Two relationships which will be used in the derivation are:

dPAR dPAR *x "ax;

dPAR dPAR

The FORTRAN program names for the above vector are as follows:

FORTRAN ' DERIVATION NAME DIMENSION NAME DIMENSION

XREL (3) "x" (3)

VREL (3) X (3)

The quantities being measured are the following:

y _^. 1 /O R = RANGE = |x| = (X-X)

R - Range Rate = |"x| =

X RA = tan * i ~r

1 f X3 DEC = Sin \~f

A. The following is a derivation of the partials relating the types of measurements and the vehicle state. In the program, these partials are used as a row vector. The FORTRAN name of the vector is H. H may be written as follows: H„ "dMEA S "dMEA S dMEAS "dMEAS dMEAS dMEAS S-29 COMPHQ - 3

WDL DIVISION WDL-TR2184

(1) Derivation of partials for range measurement.

R - (X-X)1/2

(2) Derivation of partials for range rate measurement. *-¥ - . R21> R R22« R R2 3'

R ' R ' R

(3) Derivation of partials for right ascension measurement.

-1 f?\ -1 RA = Tan = Tan

dRA

-1 X 2 (1 + Y29) = L1 2 2 Xl + X2

\ S "o *M H — I *•"*" "im > I L 1 ; 0; 0; 0; HRA - ^ ^-; -^-J = 1—2 2; —5 2 ° ^1 + X2 Xl+ X2

S"30 CCMPHQ - 4

PHILCQ WDL DIVISIO WDL-TR2184

(4) Derivation of partials for declination measurement. X DEC = Sin-\ r' 3—

dDEC PAR

,-1/2 [1 -

0; 0;

B. In order to include errors in the measurements being made due to station location errors and time bias, the partials of the measurements with respect to latitude, longitude, altitude, and time are required. In the program, the station location errors are used as a row vector with FORTRAN name DUM. DUM may be written as follows:

EAS VdLAT ' dLON ' dALT ^J

The following matrices are obtained from MONBTR and used in the computation of DUM.

A dLAT dLON dALT / dLAT SLON "SALT

STPARS £. ^. ^ STPARD J !i_ OLAT dLON dALT 1 dLAT \dx 3 dLAT dLON dALT dLAT

3-31 COMPHQ - 5

WDL DIVISION WDL-TR2184

(1) Derivation of range measurement error partials.

6R _ Y 6R *Xi dLAT " { 3x7 dLAT

3

-HD(l,i) STPARS(i.l)

Similarly 3 I -V1- STPARS(i,2)

(2) Derivation of range rate measurement error partials.

X R = V 3R i , 3EL i dLALATT ,/_, c5x~ dLAT dx ^LAT i=l X £

1) - H^d.i+3) STPARD(i.l) i=l

Similarly 3

V -H^d.i) STPARS(i,2) - HRR(l,i+3) STPARD(i,2)

CCMPHQ - 6

PHBLCQ >A/DL DIVISIO WDL-TR2184

dR STPARS(i,3) - H__(1,1+3) STPARD(i,3) dALT KK

(3) Derivation of right ascension measurement error partials.

X dRA = V dRA < i dLAT l_i dx. dLAT 1=1 X

Similarly

STPARS(i,2) LON

.i) STPARS(i,3)

(4) Derivation of declination measurement error partials.

dDEC = V" dDEC i dLAT /_ dx. dLAT

dDEC -H (l,i) STPARS(i.l) dLAT DEC

Similarly

dDEC dLON ,i) STPARS(i,2)

S-33 COMPHQ - 7

PHILCQ WDL OBViSiON WDL-TR2184

,i) STPARS(i,3)

(5) Derivation of time derivatives of measurement quantities to permit inclusion of time bias errors.

BRA

Similarly

The errors in the measurements are computed in the following manner for station location errors and time bias.

'Q2LAT' Station

QQSTAT a2LON Location

sp-2ALT Error 1x1 1x3 3x1

S-34 COMPHQ - 8

PHILCQ WDL DIVISIO QQDOT = ^ ^MS . aTm^) Time Bias Error

The computation of the H matrices and the measurement errors are the primary computations in COMPHQ. COMPHQ calls CORRTP which uses quantities to update the state covariance matrix.

S"35 COMPHQ - 9

SHIILCQ WDL DIVISION ULL- TU2 1 C/:

COMPUTE SAME SAME SAME TOTAL VARIANCE FOR RA. FOR DEC. FOR RR FOR RANGE 1 i ^ 1 1 CAL^rL i| CORRT P i|

\RETURNJT COMFHQ - 10

£•-36

PHILCQ WDI_ DIVISIO 1 ^ • CI.-JHQ WDL-TR218

LABEL COMP SYMBOL TABLE COMP :C2008 SUBROUTINE COMPHQ COMP SUBROUTINE COMPHQ(JJJ,KK,NN) COMPOQOO COMMON T,S,C,IC COMP0010 •DIMENSION TU360),S(1000),C(1000),IC<1) COMP0020 l»XREL(3),VREL<3),H<6),P(6i6).STPARS<3,3) ,DUM(3),OUTPUT(6) COMP0025 DIMENSION STPARD(3,3) COMP0030 EQUIVALENCE (T,TDUM)<. (S.'SDUM), (C,CDUM), (IC,ICDUM) COMP0040 1«(C(895)»XREL>» (C(-898). VRED* (C(894), OBNO),(C(893),XMAG). COMP0050 2(C(892).IDEX),(C(891) .DEN1), ( C ( 890 ) , DEN2 ) , ( C ( 788) . STPARS ) COMP0060 3/»(C(889),DEX2),(C(888),DEX3), (C(652),P)P ( C ( 973 ), OUTPUT ) COMP0065 4»(5(73),RTD) COMP0070 EQUIVALENCE ( C(800)»STPARD) COMP0075 , KK IsONBOARD MEASUREMENTS 2=MOON BEACONS COMP0080 JJJ 1=RANGE 2=RIGHT ASC, .3=DECL, 4nRANGE- RATE COMP0090 NNaNN COMP0100 COMP0110 KKaKK COMP0120 COMP013C GO TO (7,13*17,21), JJJ COMP0140 'CONTINUE COMP015C IF(S(NN*8) )9,9,8 COMP016C CONTINUE COMP017C GET HERE TO COMPUTE ERROR IN RANGE OBS, DUE TO TIME BIAS. COMP018C RDOT=DOT(XREL«VREL>*DEX3 COMP019C RDOTsRANGE RATE COMP020C OUTPUT(2)=RDOT COMP0205 RDOT2=RDOT*RDOT COMP021C QQRDOT=RDOT2*S(NN*8) COMP022C QQRDOT=RANGE VARIANCE DUE TO TIME 'BIAS COMP023C GO TO 10 COMP024C CONTINUE COMP025C •QQRDOT = 0, COMP026I 10 .CONTINUE COMP027I THE FOLLOWING ARE H MATRIX CALCULATIONS FOR RANGE COMP028I •DO 11 Is?l,3 COMP029I K = I*3 COMP030! H(I) = = XRELU>*DEX3 COMP031I COMP032I 11 CONTINUE. CQMP033C 'GO TO (29,26),KK COMP034C 31 CONTINUE' COMP0350 QOnS(.NN)/OBNO*S(NN*4)+OQRDOT*S(425)*XMAG**2*OQSTAT COMP0360 QQaTOTAL RANGE VARIANCE-INSTR ,'*BIAS*TIME' BIAS ERROR SPEED LIGHT COMP0370 ^STATION LOCATION ERRORS COMP038C 12 CONTINUE COMP039C CALL CORRTP (QQ,HBP) COMP040C CORRTP UPDATES COVARIANCE MATRIX FiQR MEASUREMENT COMP041C GO TO 25 COMP042C 13 CONTINUE COMP043C

S-37 COMPHQ - 11

HPHSLCQ WDL DIVISION COMFHQ (CONT'd)

1F(S(NN*8) )15,15,14 COMPO 440 14 CONTINUE COMPO 450 GET HERE TO COMPUTE ERROR IN RA MEASUREMENT DUE TO CLOCK BIAS COMPO 460 RADOT=(VREL(2)*XREL(1>-VREL(1)+XREL(2) )*DEN2 COMPO 470 CUTPUT(4)=RADOT*RTD COMPO 475 RADOTsRIGHT ASCENSION RATE COMPO 480 RADOT2=RADOT+RADOT COMPO 490 QQRADT*RADOT2*S = 0. COMPO 600 H(D= XREL(2)*DEN2 COMPO 610 h(2)==>XREL(l)*DEN2 COMPO 620 GO TO (29.26), KK COMPO 630 32 CONTINUE COMPO 640 GQ=S(NN+l)/OBNO*S(NN*5f+aQRADT+QQSTAT COMPO 650 GGsTOTAL RIGHT ASCENSION VARIANCE COMPO 660 GO TO 12 COMPO 67Q 17 CONTINUE COMPO 680 IF(S(NN*8) >19,19,18 COMPO 690 18 CONTINUE COMPO 700 GET HERE TO COMPUTE ERROR IN DEC .MEAS .'DUE TO CLOCK BIAS 710 CRUD=XREL<1)*VREL(1)+XREL(2)+VREL(2) COMPO 720 CRUD2=VREL(3)*DEX=XREL(3)*CRUD COMPO 730 DEDOT=CRUD2/(SQRTF(DEX)*DEX2) COMPO 740 OUTPUT(b)=DEDOT*RTD COMPO 745 CEDOT2=DEDOT*DEDOT COMPO 750 QQDEDT=DEDOT2*S(NN*8) COMPO 760 OQDEDT=DECLINATION VARIANCE DUE TO TIME BIAS COMPO 770 GO TO 20 COMPO 780 19 CONTINUE COMPO 790 GQDEDT=0. COMPO 800 20 CONTINUE COMPO 810 THE FOLLOWING ARE H MATRIX COMP, FOR DECLINATION COMPO 820 H(4>=0, COMPO 330 M5)=0. COMPO 840 H(6)=0. COMPO 350 H(l)s XREL(1)*XREL(3)+DEN1 860 H(2)= XREL(2)*XREL(3)*DEN1 COMPO 370 H(3)=-DEX+DEN1 COMPO 880 GO TO (29,26), KK COMPO 390 33 CONTINUE COMPO 900 QQ = S(NN-t-2)/OBNO*S(NN*6)*QQDEDT COMPO 910 GQ=TOTAL DECLINATION VARIANCE COMPO 920

S-38 COMPKO - U

PHILCQ WDL DIVISION e 'JiPHQ (CONI' d) WDL-TR21S

GO TO 12 COMP093i - i 21 .CONTINUE COMP094) i 1C THE FOLLOWING ARE H MATRIX COMP, FOR RANGE RATE COMP095I Ll RDOT=DOT(XRELpVREL>*DEX3 COMP096) OUTPUT(2)sRDOT COMP096! DO 22 J = l*3 COMP097I COMP098I -H(K)= = XREL( J.)*DEX3 COMP099I H<-J)s = DEX3*(VREL( J>*H(K)*RDOT) COMPlOOl 22 CONTINUE COMPIOO: GO TO (29,42), KK 42 CONTINUE CQMPlOOi DO 40 Ial,3 COMPlOOl DUM(l)sO. COMP101 DO 40 J=l*3 COMPIOI 'JJeJ*3 COMP101 40 .DUM(I)sD'UM(I)+H(J)*STPARS(J,I>*H(JJ)*STPARD(J.I) COMPIOI GO TO 41 COMP102 43 CONTINUE COMP102 QQs»S(NN*3)/06NO*S(NN*7)*QQSTAT COMP102 " c •QOsRANGE HATE VARIANCE COMP1Q3 GO TO 12 COMP104 26 CONTINUE COMP105 •1. THE FOLLOWING COMPUTATIONS ARE FOR STATION LOCATION ERRORS COMP106 DO -27 1 = 1,3 COMP107 DUM(I)=0. COMP108 DO 27 J = l<,3 CQMP109 DUM{J)=DUM(I}*H{J)*STPARS(J,I) COMP13.D 27 CONTINUE COMP111 41 .CONTINUE COMPIH OOSTAT=0? COMP112 DO 28 lBi,3 COMPH3 COMPU4 QQSTATsQOSTAT*(DUM(I)**2) COMP115 28 CONTINUE COMP116 GO TO 30 COMP117 29 .CONTINUE COMP118 QQSTAT=08 CQMP119 30 CONTINUE COMP120 GO TOC31p32(,33s43), JJJ COMP121 25 CONTINUE COMP122 RETURN COMP123 END CQMP

S-39 COMPHQ - 13

IPHILCQ WDL. DIVBSBON Page Intentionally Left Blank WDL-TR2184

Subroutine: CONSTl

Purposei To read permanent or semipermanent constants into the common S array.

Calling Sequence: -v I CALL CONSTl

Input and Output

Common storages used or required: T. S

Subroutines required: None

Functions required: None

Approximate number of storages required: 669 DEC

M

S-41 CONSTl - 1

pHILCQ WDL DIVISION CONST1 WDL-TR25'";} "- ,,x&

* LABEL CONS : * SYMBOL TABLE COM3 CEC2026 SUBROUTINE CONST1 CONS I SUBROUTINE CONST1 CONSOOOO [ COMMON T,S CONS0010 ' DIMENSION T(1360).S(1000) CONS0020, EQUIVALENCE

S-42 CONST1 - 2

PHILCQ WDL DIVISION ^JSTl

114 IS CENTRAL BODY NUMBER,(1)EARTH,(2)MOON(3)SUN(4)VENUS(5) C HARS(6)JUPITER C 115=120 ARE INPUT STATE CORRESPONDING 'TO1 S(lll) THRU 114, C 121 TARGET BODY C 122 TYPE OF OUTPUTJKOUT S(i2l)s2. C 123 TSECO c N GOES FROM 0 .TO' 19 c (125>+N*15 VARIANCE OF RANGE c (126>+N*1S VARIANCE OF AZIMUTH RAD*+2 c (127)*N+15 VARIANCE OF ELEVATION RAD**2 VARIANCE OF RANGE RATE KM**2/SEC**2 c (129)*N*15 VARIANCE OF LATITUDE RAD**2 c (130)+N*15 VARIANCE OF LONGITUDE RAD+*2 c (131>*N*15 VARIANCE OF ALTITUDE c (132)+N*15 VARIANCE OF AZIMUTH BIASES RAD**2 c (133>*N*15 VARIANCE OF ELEVATION BIASES RAD**2 c <134)+N*15 LATITUDE OF STATION DEG c (135)*N*15 LONGTUDE OF STATION DEG c (136>*N*15 ALTITUDE OF STATION KM c (137)+N*15 STATION NAME c (138)*N*15 PERIOD OF OBSERVATION SEC c <139)+N*15 VARIANCE OF TIME BIAS SEC**2 c 'STATION 1 ANTIGUA RADAR 91.1

S(l26)s0000004 S(l27)a,-000004- S(128)=900000001 S ( 129 }r0 0000000001 S(130)=90000000001 8(131)8,0001 S(134)=17,0267 S(135)=298,2247 S(l36)sO, •J S(137)=6HANTIG -S(138)=1. STATION '2 ASCENSION RADAR 12,16 S(l40)s0000225 8(141)8, 000004 'S(142) = 8000004 - S(143)=,00000001 S(144)=00000000001 S(145)=80000000001 S(146)=,0001

S(150)=3450'587393 8(151)80. S(152)*6HASCENS S(l53)Bl. STATION 3 MILLSTONE 'HILL RADAR S(155)=8000225

S-43 CONST1 -

iPHSLCQ WDL. DIVISION CONST1 WDL-TR2.

S(l56)s , 000004 COMS0990 S(l57)s , 000004 CONS1000 S(158)=,00000001 CONS1010 S(l59)s. 0000000001 CONS1020 S(160)s, 0000000001 CONS1030 S(161)s,0001 COMS1040 S(l64)s42.4232 CONS1050 S<165)=288,5080 CONS1060 S(166)*0. CONS1070 S(l67)s6HMlLHIL COMS1080 S(l68)sl. CONS1090 STATION 4 MOBILE STATION MTS CONS1100 S<170)= 2500, E-6 CONS1110 S(l71)s ,04 E-6 CONS1120 .8(172)= ,04 E-6 CONS1130 5(173)* ,04 E-6 CONS1140 „. S(l74)s 1, E-10 CONS1150L 8(175)= It E-10 CONS1160 5(176)= 9, E-6 5(177)= .0016E-6 CONS1180 8(178)= .0016E-6 CONSU90 ;J 8=, 000004 CONS1410f S ( 2 0 2 ) s „ 0 0 0 0 0 4 CONS14PO| S0203)s.00000001 CONS1430! S(204)«, 0000000001 CONS1440 S(205)s, 0000000001 CONS1450 f S(206)s,0001 CONS1460 ! S(209)s32,l60973 CONS147Q S(210)-295, 299179 COWS1480, 1 S(211)sO. CONS1490 .

S-44 CONST 1 - 4 I

PHBLCQ WDL DIVISION .-JSTl '"} S(212)=6HBERMUD S(213)=1. ' \ c •STATION 7 GOLDSTONE RECEIVER J c <50M SIG SC215) C250Q.E-6 n c »2MIL S(216) R.04 E=6 ^c .'2MIL 5(217) R.04 E-6 c .'2M/SEC •S(218) s,04 E=6 c •63978M ^r— •SC219) Bl,E-10 ,„ c 63o78M • SC220) sl.E-10 -i C 3H : S(221) s95E-6 .j c ,04MR SC222) S.0016E-6 '1 c ,04MR .J S(223) 5.0016E-6 S(224) B35.3895 1 S(225) s243, 15175 C..J S(226) sle03754 SC227)a6HGOSTRC S(228) S(229) STATION 8 GOLDSTONE TRANSMITTER S(230)= 000225 J S('232) = ,000004 S(233)=800000001 S('234)ss0000000001 S(235)=,0000000001

S(239) e35 1 S(240) =243,19539 S(24l) B.98949 •S('242)=6HGOSTTR S(243)=l,0 ; c STATION 9 GBI RADAR XN-2 S(245)=9000225 SC246)a,000004 S(247)s8000004 :SC248)a,OOOOP001 SC249)s60000000001 S(250)=90000000001 U S(251)=,0001 50254)326,459736 SC255)s2ai065l892 S(256)=0,

S-45

pHILCQ WDL DIVISION TW CONST1 - O

S(257)=6HGBIRAD COMS2010 S(25B)=1.0 CONS2Q20 C STATION 10 JOHANNESBURG CONS2030 C 50M SIG CONS204Q S(260) =?500.E-6 COMS2050 C .2MIL CON'S2060 S(261) =.04 E»6 CONS207Q C .'2MIL CONS208U S(262) =,04 E-6 CONS2090 C ,2M/SEC CONS2100 5(263) =,04 E-6 CONS2110 C 63.78M CONS2120 S(264) si.E-10 CONS2130 C 63.78M COMS214Q S(26S) si.E-10 CO\iS21(3Q C 3K SIG CONS2160 S(266) s 9,E-6 CONS2170 C .04MR CONS2180 S(267) 0016E~6 CONS2190 C .04MR CONS2200 5(268) 0016E-6 CO\'S2210 C DEG CONS2220 S(269) 8-25,88735 CONS2230 C DEG COMS224Q 5(270) R 27,68478 CONS2250 0 C KM CONS2260 5(271) a.1.38192 CONS227Q S(272)=6HJOHABG CONS228U C SEC CONS2290 5(273) = 30, CONS2300 C 3MS SIG CONS2310 Q 5(274) = 9.E-6 CONS2320 C STATION IN HAWAII CONS2330 S(27t»s, 000225 COMS234Q 5(276)=,000004 CONS2350 5(277)=,000004 CONS2360 •S(-278) = , 00000001 CONS2370 8(279)3,0000000001 CONS2380 S(280)=,0000000001 CONS2390 S(281)s.000l CONS2400 8(284)318. 823066 CONS2410 S(28b)=204.314722 CONS2420 S(286)=0. CONS2430 S(287)=6HHAWAII CONS2440 S(288)=l,0 CONS2450 STATION 12 JODRELL BANK CONS2460 S(290)sf000225 CONS2470 S(291) = ,000004 CONS2480 8(292)3. 000004 CONS2490 5(293) = ,00000001 CONS2500 5(294) = ,0000000001 CONS251Q

S-46 CONST1 - 6

PHILCQ WDL DlVISIOtv UJNST1 .5 (295) = ,0000000001 S(296)=9OQ01 S(299)=53»049636 5(300)3357,693889 S(30l)sO. S(302)=6HJODBNK S(303)=l,0 STATION 13 PUERTO RICO RADAR 9,1 S(305)=0000225' S(306)39OQOQ04 S(307)s»000004 .5(308)=, 00000001 S (.3 09) = , 0000000001 S(310)s90000000001 S(311)=,0001 S(314)=i8. 060396 S(315)=2928911805 .S(316) = 0. S(317)=6HPURICO S(318)=1,0 .STATION 14 SAN SALVADOR^ -5(320)=, 000225

5(322)= ,000004 5(323)= eoooooooi 5(324)= ,0000000001 5(325)= ,0000000001 5(326) =,0001 5(329) =23,173566 5(330)5 285,4956 5(331)= 0, S(332)= 6HSANSAL / 7 T; i \ - S * O w w # ™1.» 0 "S C STATION 15 WOOMERA :) - c SOW SIG 5(335) P 25000E«6

S(336) e 004E=6 o'2M!L 5(337) s .•2M/SEC 5(338) s 63C78M 5(339) B l.E-10 J c 63e78M 5(340) a loE«10 -1 p •i L 3M 5(341) s 9aE-6

S(342) = OO!6E-6 .04MR

S-47

IPHILCQ WDL DIVISION CONST1 WDL-TR2;'

S(343) CONS3030 5(344) =-31,38287 CONS3040 ,S(345) =136,88502 CONS3050 S(34b) = .15079 CONS3060 S(347)=6HWOf!ERA CONS3070 SEC CONS3080 S(348) = 30, CONS3090 31*5 CONS3100 S(349) = 9.E-6 COMS3110 STATION 16 JPL CARE CANAUERAL CONS33L20 S(350)=,000225 CONS3130 5(351) = .000004 CONS314Q S(352)=,000004 CONS315Q S<353) = ,00000001 CONS3160 S(354)=90000000001 CONS3170 S(355)=,OOOOQ00001 CONS3180 S(356)=,0001 COMS3190 DEG CONS3200 S(359) = 26,48713 CONS3210 DEG CONS3220 S(360) = 279.42315 CONS3230 KM CONS3240 S(361) = ,00257 CONS3250 S(362) = 6HCAPJET CONS3260 S(363)=1.0 COMS3265 425 =SPEED OF LIGHT ACCURACY CONS3270 STATION 17 MAJUNGA COWS3271 S(369)=oOQOOOOQ001 CONS3272 S(37U)=80000000001 CONS3273 S(371)=50001 CONS3274 5(374)5-15,216666 CONS3275 S(375)=46,38333 CONS3276 S(377)=6HMAJUNG CONS3277 S(378)=30= CONS3278 STATION 18 CARNARVON CONS3279 S(384)=e0000000001 CONS3280 S(385)=.0000000001 CONS3281 S(386)=,0001 CONS3282 S(389)="24,8666 CONS3283 S(390)=113.63333 COMS3284 S(392)=6MCAHNVN COMS32P5 S(393)=30o CONS3286 STATION 19-ROSMAN CONS3287 S(399)=»0000000001 CONS3288 S < 4 0 0 ) = „ 0 0 0 0 Q 0 0 0 01 CONS3289 S(4Q1)=,0001 CONS3290 S(404)=35p20000 CONS3291 S(405)=277,1333 CONS3292 S(407)=6HROSMAN CONS3293 S(408)=30p COMS3294 S(425)=1.E-12 CQNS3295

S-48 CONST! - 8

PHBLCQ WDL DIVISION L../ST1 WDL-TR218

c FROM S(426) TO S(470) IS ONBOARD ERROR DATA CONS33C •S<475)=1.0 CONS333 S<476)=100. CONS33S :S(477)=200, CONS333 S<-478)»300. CQNS33* S(479)s400. CONS33S •S(480)=5008 CONS336 S(481)s600e CONS333 S(485)se03 CONS337 C' N GOES FROM 0 TO 9 LUNAR BASED BEACONS CONS33E ' C (500>*N*15 VARIANCE OF RANGE KM2 CONS33? C (501>+N*15 VARIANCE- OF AZIMUTH RAD2 CONS34C c (502>*N*15 VARIANCE OF ELEVATION RAD2 CONS34H c (903>*N*15 VARIANCE OF RANGE' RATE KM2/SEC2 CONS34S c (504>*N*15 VARIANCE OF LATITUDE RAD2 CONS343 1 c (§05>*N*15 VARIANCE OF LONGITUDE- RAD2 CONS34< ! c (906>+N*15 VARIANCE OF ALTITUDE- KM2 CONS346 c. (507>*N*15 VARIANCE OF AZIMUTH BIAS RAD?, •CONS346 } ^ (508)'*N*15 VARIANCE OF ELEVATION '.BIAS RAD2 CONS349 1 c (509>*N*15 LATITUDE' OF .STATION DEG CONS346 c (510>*N*15 LONGITUDE iQF STATION DEG U CONS349 c (511>*N*15 ALTITUDE OF STATION KM CONS35I c (S12>+-N*15 STATION NAME CONS39! c <513>o-N*15 PERIOD OF -OBSERVATION SEC' CONS355 C' (•514>*N*15 'SPARE CONS355 i C (650) TO (685) IS INITIAL P MATRIX C- (686) TO (721) INITIAL PAR MATRIX CONS3S? c (722) 'TO (739) TRANSITION MATRIX FT A GUIDANCE CONS3@e S(90Q)s6378,165 .5(901)51738, RETURN CONS36i END CONS n

L; Ji r-i

Q

S-49 CONST1 -

PHSLCQ WDL DBVBSDON Page Intentionally Left Blank WDL-TR2184

Subroutiner CONVPI

Purpose; Subroutine CONVPI transforms the input covariance matrices to the mean equinox of 1950 coordinate system. The input covariance matrices may be input in four coordinate systems: 1. Instantaneous launch pad tangent plane 2. Instantaneous injection tangent plane 3. True equinox of date 4. Mean equinox of 1950.

Calling" Sequence: CALL CONVPI (ITYPE. PIN. POUT)

Input and Output

t. Data Symbolic Program Mathematical I/O Name or Dimensions Definition Location Dimensions Symbol or Units

I ITYPE 1 Logic key which indicates the type of input coordinate frame Km2, - I PIN 21 (Km/ Sec) Upper half of input covariance matrix in vector form Km , 0 POUT 6, 6 E<*50 V' fKin/serV Output covariance matrix (1950)

Common storages used or required: T, S. C. 1C CROSS, GHA, MULT, NUTAIT, PTRAN, Subroutines required: ROTEQ, TIMED, TRAC COS SIN Functions required: FNORM

Approximate number of storages required: 476 DEC

S-51 CONVPI-1

JPHILCQ WDL DIVISION 0 WDL-TR2184 0 Calling Sequence Elaboration

The calling sequence consists of CALL CONVPI (INTYPE, PIN, POUT) where:

INTYPE is a logic key which indicates the type of coordinate system in which the input covariance matrix is expressed. The range of the key is one to five. One through four indicate the four coordinate systems described above. A five in the call sequence indicates that the input matrix is in the same coordinate frame as the input matrix of the preceding call of the subroutine.

PIN is in the input covariance matrix. The matrix must be in the form of a column matrix with dimension (21). The (21) elements represent the upper half of the input covariance matrix.

1 234 5 6 789 10 11 12 13 14 15 PIN 16 17 18 "1 J 19 20 21

Input Elements

The required order of the input covariance matrix is the following: For INTYPE = 1 or 2

S-52 CONVPI-2

PHILCQ WDL DIVISION WDL-TR2184

•AV ' ~AV ~I T NOR NOR ALT ALT' PIN = E * AV AV NOR NOR ALT_ _ALT_ 6x1 1x6

where R x v AV = - coordinate along velocity R x v ^ S\ R x v NOR H - •» S coordinate normal to orbit plane R x v

u s coordinate in direction of altitude R~ Dots represent corresponding rates.

For INTYPE = 3 or 4

x" i-..-i"x"T Y Y Z Z PIN = E X X Y Y

6x1 1x6

0 POUT is the output covariance matrix in cartesian coordinates mean equator 1950.

S-53 CONVPI-3

1PHBLCQ WDL DIVISION WDL-TR2184 n

CONVPI Transformations 0 INTYPE = 1 Transformation from launch pad tangent plane to 1950,

Required input constants for operation:

LAUNCH PAD COORDINATES S(80) Altitude (KM) S(81) Longitude (DEC) '] S(82) Latitude (DEC)

LAUNCH AZIMUTH S(84) Azimuth (DEG)

TIME FROM LAUNCH TO INJECTION S(83) Time DAYS HOURS. MIN SEC

The transformation from launch pad azimuth coordinates, (AV, NOR, ALT) to

mean equinox of 1950 (Xso, , Z__) is obtained as follows. Subroutine TRAC is called with launch time and launch pad coordinates to obtain a set of orthogonal unit vectors. The unit vectors, in equator of date, are: AU_ , unit up vector through the launch pad,A E , unit east vector, andA N_, unit north vector. These unit vectors written in matrix form represent the transformation from equator of date coordinates to launch pad coordinates of date

D AT DATE (1) 3x1 3x1 AT UD

3x3

S-54 CONVPI-4

PHILCQ WDL DIVISION. WDL-TR2184

The transformation from launch pad coordinates, (N, E, U), to the desired launch azimuth coordinates, (AV, NOR, ALT), is a rotation about the U vector by an angle equal to the launch azimuth.

cos LAZ sin LAZ 0 -sin LAZ cos LAZ 0 ROT 1 *LA*, Z - < > (2) 0 01 3x1 3x3 3x1 3x3 3x1

substituting for JL_ from equation (1) yields

1 ROT < > )ATE (3)

3x1 3x3 3x3 3x1

Subroutines ROTEQ and NUTAIT are called to obtain transformation matrix (AN) which is the transformation from mean equinox of 1950 to true equator of date.

SATE = (AN> Xi950 (A)

3x1 3x3 3x1

Substituting equation (4) into (3) yields

(AN) (5)

3x1 3x3 3x3 3x3 3x1 S-55 CONVPI-5

PHILCQ WDL D9VBSOON 13 WDL-TR2184

or r- -iT

(AN) (ROT) (TRANS) (6) L1950 D n 3x1 3x3 3x3 3x3 3x1 3x3 3x1

The corresponding velocity transformation is the following: _* -A *1950 " (TRANS> *LAZ (7) under the assumption that (AN) = 0 which implies (TRANS) = 0.

The 3x3 matrix, (TRANS), is the desired transformation from launch azimuth coordinates to mean equator of 1950. Subroutine PTRAN is called with a 2 in the call list to perform the desired covariance matrix transformation.

(TRANS) 0 3x3 3x3 (TRANS) E (8) 0 (TRANS) | (TRANS) 3x3 3x3

6x6 6x6 6x6 6x6

fl where X-grft nd X-A7 now represent the total state vector (position and velocity).

INTYPE •= 2 Transformation from injection tangent plane to 1950.

The transformation from injection tangent plane coordinates, (AV, NOR, ALT), to mean equinox 1950 is obtained as follows. The unit vectors for the injection tangent plane coordinates are obtained in equator of 1950.

R x v AV 50 IR x v S-56 CONVPI-6

PHILCQ WDL DIVISION. > WDL-TR2184

R x v NOR (9) 50 R x v

JL. ALT ->-| 50 Rl

These vectors written in matrix form represent the transformation from mean Q equinox of 1950 to injection tangent plane

AV 50 NOR X (10) ITP 50 1950 ALT 50

3x1 3x3 , 3x1 '1 _J or

—i AV 50

NOR X = (TRANS) X 1950 50 ITp ITp (H)

ALT50 3x1 3x3 3x1 3x3 3x1

The corresponding velocity transformation is

(TRANS) XITp (12)

3x1 3x3 3x1

Subroutine PTRAN is called with a 2 in the call list and the operation pre- sented in equation (8) is performed with the 3x3 matrix, (TRANS), defined in equation (11).

S-57 CONVPI-7

iPHILCQ WDL DIVISION WDL-TR2184 / ) .

INTYPE = 3 Transformation from equator of date to equator of 1950.

The transformation from equator of date to equator of 1950 is obtained as follows. Subroutines ROTEQ and NUTAIT are called to obtain (AN), the required transformation matrix.

(AN> ^1950

3x1 3x3 3x1 n u.1 or 0 Xi950 - SATE (14) i|

3x1 3x3 u 3x1 3x3 3x1

The corresponding velocity transformation is

"^ " X1950 = SATE (15>

Subroutine PTRAN is called with a 2 in the call list and the operation presented in equation (8) is performed with the 3x3 matrix, (TRANS), defined in equation (14).

INTYPE = 4 Transformation from equator of 1950 to equator of 1950. The transformation is the unit matrix. 3 ^1950 = <*> X1950 = (TRANS) ^950 3x1 3x3 3x1 0

INTYPE = 5 The subroutine calls PTRAN to perform the operation pre- sented in equation (8) with the transformation matrix, (TRANS), which is in storage from the previous call of CONVPI. S-58 CONVPI-8

PHILCQ WDL DIVISION WDL-TR2184

LI SUIfftOU I INE CONVP)

1

SET UP 6 x 6 TEST COVARIANCE MATRIX E OF INPUT IN L(P) >

TYPE - 2 II TYPE - 3 || TYPE - 4 I | TYP6 - S

POSMAG_= FNORM(X)

UNIT-MATRIX

PV = TOTAL NUMBER OF DAYS FNORMfX X XV) TDI = TWI 4- TFI 13

FORM TRANSFORMATION FROM EOUATOR OF DATE TO 1950

FORM TRANSFORMATION J FROM LAUNCH PAD PLANE TO 1990

FORM TRANSFORMATION CONVERT FROM LAUNCH PAD P-MATRIX PLANE TO 1950 FROM INPUT COORDINATE

SET UP INPUT FOR TRAC

S-59 CONVPI - 9

PHILCQ WDL DIVISION CONVPI

* LABEL CONV * SYMBOL TABLE CONV :EC2010 SUBROUTINE CON'V SUBROUTINE CONVPI(INPUTP,PI> PS) CONV0030 COMMON T,S,C,IC CONV0040 DIMENSION T(1360).S(1000),C(lOOO)fIC(l) CONV0050 1,PI(21),P(6,6),A(3,3),EM(3,3),AN(3,3),U(3) CONVOQ60 2 , E(3), EN(3),PDUMH<3,3),DUM(3,3),PS<6,6> CONV007Q 3.X(3)»VX(3). OROK8(3),ALV(3)jRT(3) CONV0080 EQUIVALENCE (T,Tr>UN),(S.SDUM),(C,CDUM),(IC,ICDUM) CONV009Q 1,(3(70),DTS),(S(72),DR),(S(83),TLTI) CONV0100 2f

£- 60 CONVPI - 10

PHILCQ WDL DIVISION SAZ=SINF(FAZ> CAZ=COSF(FAZ) DO 6 1=1,3 PDUMP(I*1)=CAZ*EN(I>*SAZ+E(I) •PDUMP(I»2)=-SAZ*EN*CAZ*E{I) •PDUMP CONTINUE DO 7 1=1.3 DO 7 J = l,3 DUM(I,J)=0. 'DO 7 K = l,3 DUM(I0J)=DUM(I,J)*AN(K,I)+PDUMP(K,J) CONTINUE DUM IS TRANSFORMATION FROM LAUNCH 'PADPLANE TO 1950 CONTINUE - - . 'CALL PTRAN(P,DUM.PS,2) PTRAN CONVERTS P MATRIX FROM INPUT COORDINATES TO EQ 1950 GO TO "15 10 CONTINUE •POSMAG=FNORM(X> CALL CROSS(X,VX, OROURB) PV=FNORM(ORORB) CALL CROSS (ORORB,X,ALV) ALaPOSMAG+PV 'DO 11 1 = 1,3 PDUMP(I,1)=ALV(D/AL PDUMP(If2)= ORORB(I)/PV PDUMP(I»3)=X(I)/POSMA6 11 CONTINUE DO 12 1=1,3 DO 12 J=1.3 DUMCI* J)=0, DO 12 K=l,3 •DUM

S-61 CONVPI -

IPHILCQ WDL DIVISION WDL-TR21S4

i? CONTINUE: GO TO 8 CONV1030 15 CONTINUE CONV1040 RETURN CONV1050 END CO\'V

S-62 CONVPI - 12

PHILCQ WDL DIVISION Subroutine: CORRTP

Purpose; To perform the filtering or weighting of the observation being made and updating of the state covariance matrix for the inclusion of the observation.

Calling Sequence: CALL CORRTP (QQ, H, P)

Input and Output

Symbolic Program Mathematical Data I/O Name or Dimensions Symbol Dimensions Definition Location or Units

I QQ 1 CTfiEAS Measurement variance I a MEAS H (1,6) Measurement partials I d STATE 1,0 P (6,6) E( 1c xT) State covariance matrix

;«~j

u Common storages used or required: None Subroutines required: None

0 Functions required: None

Approximate number of storages required: 124 DEC

3-63 CORRTP-1

JPHILCQ WDL DIVISION o n WDL-TR2184

Equation Being Solved

The updating of the state coveriance matrix for an observation as- suming the Schmidt-Kahlman optimum filter is used on the data is the following:

PNEW = POLD " Po «

] 3 'i

0

s"64 CORRTP-2

PHILCQ WDL DIVISION * LABEL * SYMBOL TABLE CEC2025 SUBROUTINE CORRTP •SUBROUTINE CORRTP(00*H,P) •DIMENSION P(6,6)»H(6),PMT(6) DIMENSION PCOR(6,6) BBa00 DO 43 Jsl,6 RMT(J)=0. •DO 44 Ksl,6 'PMT(J)*PMT( J)+P(.J.K)*H(K) 44 -CONTINUE ,BBHBB*PMT(J)*H(J) 43 CONTINUE •BB a- BB*QQ DO 45 Jsis6 'DO 45' Ksi,6 •PCORj;K)aP( J,K>-PCOR(JiK) 45 CONTINUE RETURN END

3-65 CORRTP -

IPHILCQ WDL. DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine! CROSS

Purpose: To find the cross product of two 3-dimenstonal vectors.

n Calling Sequence: CALL CROSS (A. B. C)

Input and Output

Data Symbolic Program Mathematical Dimensions Definition I/O Name or Symbol Location Dimensions or Units

I A 3 First input vector f I B 3 Second input vector

0 C 3 Result = AXB

Common storages used or required: None 0 Subroutines required: None Functions required: None

Approximate number of storages required:

5-67 CROSS - 1

IPHILCQ WDL DIVISION CROSS WDL-TR2184

LABEL CROS SYMBOL TABLE CROS SUBROUTINE CROSS(A,B,C) CROSOOOO DIMENSION A<3),B(3),C(3> CROS0010 C(1)=A(2)*B(3)-A(3)+B(2) CROS0020 C(2)3A(3)*B(1)-A(1)*B(3> CROS0030 C(3)5A(1)*B(2)-A(2)+B(1) CROS0040 RETURN CROS0050 END CROS

3

3 n

D D

S-68 CRO££ - 2

PHILCQ WDL DIVISION WDL-TR2184

Subroutine: (CSH)S

Purpose; This is the standard Fortran II card image input subroutine modified to output the card image, accept logical input and output tape numbers from SETN, and call subroutine HOUR to read the clock if desired.

Calling Sequence; CALL (CSH)S (BUFF)

Input and Output

Symbolic Program Mathematical Data J I/O Name or Symbol Dimensions Definition Location Dimensions or Units

0 , BUFF 12 Buffer for contents of card read

Common storages used or required: None. 0 SETN< HOUR, System read Subroutines required: routines.

Functions required: None.

Approximate number of storages required:

S-69 (CSH)S - 1

'PHSLCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

•'1 Subroutine: DE6FN .'J Identification RW DE6FN Q 704 - FORTRAN SAP Language Subroutine STL Q Purpose This F0RTRAN subprogram integrates a set of d simultaneous second-order r~| ordinary differential equations in which first derivatives may or may not , I appear. It is the F0RTRAN version of the standard subroutine RW DE6F.

.- \ Restrictions^ Same as explained in the write-up for RW DE6F.

: -j Method <~J A fourth-order Runge-Kutta method (RW DE5F) is used to start the integration and to change the step-size during integration. A Cowell "second-sum" method '""* based on sixth differences is used to continue the integration. While input to this routine is single precision, double precision is used internally to control round-off Trors. Truncation error can be controlled by choosing an • - appropriate step-size,or by using the variable step-size mode of operation. j The set-up entry uses the auxiliary subroutine to evaluate the second-order derivatives. The values of the variables and derivatives are consistent at all times. A detailed description of the method used is available in j Appendix A. —j Usage 1 ! a. Calling LIST for set-up entry (performed prior to initiating the integra- '•"•"' tion) .

•~j CALL DE6FN(10,11,T(1),N,V, J,K, A3, A4, A5, A6) LJ 10 is the same as PO of RW DE6F write-up.

t ! +1 1st derivatives are present in the evaluation of the second derivatives. -1 1st derivatives are missing in the evaluation of the second j, I derivatives.

•L^ui 11 is the same as PI of RW DE6F write-up.

[J +1 Variable step-size mode of operation is used. -1 Fixed step-size mode of operation is used. ; j '• --I S-71 DE6FN-1

JPHILCQ WDL DIVISION WDL-TR2184 -,,j • 0 T is the name of the floating point array which is oT dimension 30^3 and is reserved by the ujei . This region should be located p| in COiljON, since it must be refeiied to by the main program and [^\ by the subroutine V. T(l) need noL be set equal to N; however, all other requirements that concern the usage of area T apply. rn The value of N is not available to the programmer in T(l) and if rj it is required by the auxiliary subroutine, it should appear in COMMON also.

N is the number of equations (an integer) . '•—*

V is the name of a F0RTRAN subroutine for evaluating the derivatives ]~] y.. This subroutine must be named in the main program by the use j df an "F'' card.

J equates to B in KW DE6F write-up (an integer). £J

K equates to l! in ,^W DE6F write-up (an integer) . pi

A3 equates to OM-3 in 1>W DE6F write-up (floating point) . ~

A4 equates to cy+4 in .:W DE6'F write-up (floating point) . , j

A5 equates to or+5 in »:W DE6" write-up (floating point) .

A6 equates to QM-6 in /.W DE6F write-up (floating point). K]

For meaning of N, V, J, K, A3, A4, A5, A6 refer to UW DE6F write-up. T~.

legion T contains the following information prior to Set-up Entry. '~*

T(2) x value of independent variable j T(3) h value of step-size J T(4)thru y.thru values of the independent variables y.

)thru y'thru values of the first derivatives y/

N H T(2Ji-4) thru y^thru values of the second derivatives y ?' T(3.«-3) y} " r, T(3!'H-4) - T(30N+4) temporary storage LJ

hore detailed description of thio storage may be found in the :iVJ DE6F p \/iite-up. M

b. iU-' DE6FN entry to integrate one step. - i r CALL DE6FPI (ACCUT1) [j Upon return \CCUIi will have the result1; which formerly appeared in the aciur.ul.atoi. S--72 DE6FN-2 v~

PHIUCQ V^DL DIVISION ' s-"' WDL-TR2184 u c. RW DE6FN entry for a running- start.

Li CALL DE6FP2

cL KW DE6FN entry for a change of step-^i.e in Cowell/Kunge-Kutta System, D CALL DE6FP3(H) H is the new value of h which was formerly placed in the accumulator pT prior to entry. <~,j e= UK DE6FN entry for a change of step-si.se for a final integration. ^ CALL DE6FP4 ..J T(3) mudt be set to the correct value before the CALL,

,—> f, RW DE6FN entry to initiate a running change in coordinates and to 3et a ! list call to a non-aero value. CALL DE6FNZ (VALUE) :~i •_j g. RW DE&FN entry to change from variable mode to fixed mode. CALL DE6FNG i_, ho RW DE6FN entry to change from fixed mode to variable mode, CALL DE6FPS ' 1 ,. J i, RW DE6FN entry to change the value of h . . CALL DE6FKN (VALUE) ! VALUE is the new h . in floating point. ' ] mm & f r.-, j. RW DE6FN entry to change the value of h i J max ^ CALL DE6FMA (VALUE) VALUE is the new h value in floating point. Cj,i max

~* k. 'KW DE6FN entrJ y to change the value of 'my m. . T ! CALL DE6FCI1 (VALUE) -J VALUE is the new y . value in floating point.

H 1. RW DE6FN entry to change the value of K after a Cowell integration step. CALL DE6FCH(NU,R) f-> NR is the integer value of R. 1,1 K is the value in floating point.

[ S-73 DE6FN-3

iPHILCQ WDL DIVISION WDL-TR2184

Identification RWDE6F Floating Point Cow 1211 (Second Sum), Kunge-Kutta • j Integration ot Second-Order Equations "~* 704 - SAP STL [1

Purpose To solve a set of N simultaneous second-order ordinary differential equations M in which first derivatives may or may not appear. ,J

Restrictions No internal checks are made for overflow or underflow. The user must provide an auxiliary subroutine which evaluates the second-order derivatives. The initial conditions must be set up prior to the first set up entry.

Method A fourth-order Runge-Kutta method* (RWDE5F) is used to start the integration and to change the step-size during integration. A Cowell "second-sum" method based on sixth differences is used to continue the integration. While input to this routine is single precision, double precision is used internally to control round-off errors. Truncation error can be controlled by choosing an appropriate step-size, or by using the variable step-size mode of operation. The set-up entry uses the auxiliary subroutine to evaluate the second-order -, derivatives. The values of the variables and derivatives are consistent at all times. A detailed description of the method used is available in Appendix A of this Subroutine.

Usage J Calling sequence to set up a problem:

Loc. Instruction Comments J Y TSX DE6F,4 Set up entry. a+1 PO T,0,V Option, addresses of storage and J auxiliary subroutines. 0/+2 PI B,0, R Option and Parameters ' ( or+3 DEC IE- S Sis the number of significant ^ figures desired. QM-4 DEC h . Minimum step-size. Floating point. !

* Scarborough, T.B., Numerical Mathematical 0 Analysis, Third Edition, John Hopkins Press, Baltimore, 1955 (pp. 301-302)

s_?4 DE6FN-4

PHILCQ WDL DIVISIONJ •~~} WDL-TR2184 Cii Loc. Instruction Comments^ i 1 a+5 DEC h Maximum step-size. Floating point. L J max of+6 DEC y7 m.m Minimum y.i value allowed for testing". Floating point. (See Appendix A for B details of yJ ij| Calling sequence to integrate all variables one step: ^ a T3X DE6F+1.4 Integration entry. /-, or+l Return Sign of AC will be plus if the integration - j was Runge-Kutta and minus if Cowell.

The 'address T is the first of 30N+3 calls ananged as follows: T PZE N, 0, 0 N is the number of equations. Fixed point. T+l x Value of independent variable. Floating • point. T+2 h Valua of step-size. Floating point. T+23 thru y. thru "N Values of the dependent variables y. . T-! i*f2 y \ Floating point S T-Kf!-3 thru y! ttuu I Valuas of the first derivatives y!

T+2.^-f2 y' ( Floating point

T4-3N+3 thru y'.' thru^ Locations where the user's auxiliary \ oubroutine must store the second T-K3N4-3 Y1' / derivatives y'.' .

;j T+3JH-3 thru T+30W-2 27N cells of temporary storage. T+3UW-3 thru TH-9W-2 (6N) are used by the kunge-Kutta subroutine (RWDE5F) . thru TH-5N+2 and T+8M+3 thru T+9N+2 contain the least significant parts ~ (except when a change of coordinates is in progress) of y; and y. respectively, "| and must be preserved throught the entire integration procedure. The final vj 21N cells of the T storage are used by the Cowell subroutine and must also be preserved. (See Appendix L of this subroutine for a detailed description of these 27N cells.) Q The address V is the entry point of the auxiliary subroutine which evaluates the derivatives yV and is entered by the calling sequence: ••* TSX V,4 Index registers need not be saved in V. CH-1 Return Return must be made via a TRA 1,4.

S-75 DE6FN-5

WDL DB VISION 0 WDL-TR2184

The first B ( < N) equations are tested to determine whether it is necessary to halve or possibly to double the step-size or to proceed with a Cowell integration step.

For a given step-size h, the Cowell integration step is h and the Runge-Kutta integration step is h/R.

Options PO - PZE 1st derivatives are present in the evaluation of the second Ru derivatives - MZE 1st derivatives are missing in the evaluation of the second derivatives. PI = PZE Variable step-size mode of operation is used. a = MZE Fixed step-size mode of operation is usecl.

If 1E-S, h . , h , and y . are not specified (0 in first calling sequence), nu.n max 'mm the subroutine will set them to 1E-9, 0, 1E18, and 1., respectively.

Special Usage (See Appendices A and B for complete details.)

The following special usages are possible: 1. Running change of coordinates. 2. Running start. 3. Change of step-size by user in the Cowell/Runge-Kutta system. 4. Change of step-size for a final integration or at some prescribed value of x.

Space Required (In addition to T and V). 955 calls of program and constants. (Includes DE5F.) 44 calls of COMMON thru COMMON + 43.

Timing Set-up time. (V=time for 1 entry to the auxiliary subroutine.) .012 [l2N + 512 ] ms. + IV.

To integrate one step: 1. Runge-Kutta (AC=+ after an integration return.) A. With 1st derivatives. .012 [476N + (8N4-18)/R + 240] ms. + 4V.

B. Without 1st derivatives. .012 [383N + (8N + 18)/R + 240] ms. + 3V.

S-76 DE6FN-6

PHILCQ WDL DIVISION WDL-TR2184

Timing (Continued) 2. Cowall (AC= - after an integration return.) A. '..'ith 1st derivative.;.

.012 £2901:-! + 9213 -!- 194^] ms. + 2V.

-;- .012 f2124>: ••:- 34 . if previous integration was ilunge-Kutta.

B. i.ithouc 1st derivacivj •}.

.012 2334,v! •! 9215 :- 194 ms. + 2V.

-!- .012 2124N -1 ciSo -r 34 rns. if previous integration was Uunge-Kutta.

3. Change oi Coordinates. (la addition to first paxt of 2A or 23.)

.012 f~2286j"| EU. -: 8V.

0 Q a

S-77 DE6FN-7

f JPHILCQ WDL DIVISION APPENDIX A WDL-TR2184

METHOD

This routine is prepared to solve the following system:

i = 1, 2, .... N

In case none of the f. involve the first derivatives y', time is saved by 1 x ,---) indicating this in the set-up. The Runge-Kutta routine RWDE5F is used to Lyf start the integration and also to change the step-size h. The user must ask for each integration step, and the routine will follow this sequence: p]

1. R Runge-Kutta steps of size - R- - are taken to obtain11 y.., . yJi» yi'i • This is continued until we reach y.,, y!,, y!',, after 11 11 lo lo lo a total of 6R Runge-Kutta steps. The integer R (=4 if unspecified) simply allows Runge-Kutta to operate at a smaller step than the main program.

2. For each of the N equations, that part of the difference table above the diagonal line is constructed in three steps:

5"78 DE6FN-8

PHILCQ WDL DIVISION. > WDL-TR2184

10

10 10 III 11 10 II A '12 11 10 III 12 * 11

AIV '13 11 10

'F 14 VI "F A 15 11

'12

"F16 13

14

"F 17 15

"F

First the known y" through y" are differenced to give the right half of the table. Next are calculated in extra precision:

„ n rv vi 2ON) »Fp = r A r A i4 2 0 yi3 C2 A 12 • C4 A 11 C6 A 10

S-79 DE6FN-9

1PHILCQ WDL DBVISBON WDL-TR2184

y' - n v" - n A _ n A - n 14 h °0 yi3 °1 Ai3 °2 A 12 D3 12

- D4A l -D 5A l "D 6

The table is then completed down to the diagonal line, by re- n quiring the difference between any entry and the entry above to equal the entry to the right. The constants used in equations (2) - (7) are given in the description of the Livermore Cowell routine.

Before going to a Cowell step, the step-size h is tested. The ( 1 tests are omitted, however, if the user so indicates in the initial calling sequence, in which case h is fixed. Only the ; first B equations are used to test, where 1 ^ B ^ N and B = N ^-J if unspecified. We determine--

V T. malllttAx * JLui i-ir T» ^ Au t ^i V = , ^ ^ ^ „ ——7maxfy -. , . y r. )• If V ^ —-— , then the i * i SB i6 7min

ratio of 5th difference to function is too large — if S decimal places are to be retained at that step. Therefore, h is reduced <- to h/2 and Runge-Kutta re-entered for another sequence of 6R ^

steps. These begin with the latest calculated values (y.,,y'.,ID io) — ' and no ground is retraced. The constant y . ("I if unspecified) prevents division by y near a zero; for example, in sine calcula- tion y =.1 avoids difficulty near 180 . The integer S, taken as 9 if unspecified, allows a large h if chosen smaller, say S =

1Q-1-S 1Q3-S If - T)— < V < - r— , we proceed to a Cowell step.

S-80 DE6FN-10

PHILCQ WDL DIVISION 1

_ '°;~x WDL-TR2184 J 10"1"8 | If V ^ T— , we may be able to double h. We test further J h to see that

1 8 = max. ''Jo , lo- - max (yW . ,, y . ) 2 B i6' 'min' h

and if so, we re-enter Runge-Kutta after replacing h by 2h, since A-J ' j the step-size h has led to needlessly small difference to function ratios. Of course, h is not halved or doubled if this would 18 :"1 violate h . or h , which are 0 and 10 if unspecified. min max r-> 4. The Cowell integration begins with predictions: L'i + 4) ,a h ( tt + Vt6 + »i *15 • . -+»6A10>

I VT ™ 5) y'I / = h ('F.i/7 + NUny". io, -f N1, A,1,3 -f . . . + No, A 1,.0)

-_ t These use the row of the difference table above the diagonal line;

. |\ only this row is needed for a Cowell step and is kept up to date as the integration proceeds. (We mention that the above prediction

I for y.'7 is omitted in the missing first derivative option.) Now

from y.7 and y.'7» we obtain y" and then complete the row of dif- fn ferences out to A ... under the diagonal line in the table. With UJ this row, we calculate final corrected values --

+ + V Q 7) y!? = h ( 'F17 + Vi'7 • • • *6 * Jl> n I From these we get corrected values for y'i7, and recalculate the entire row under the diagonal line. This completes the integra- •'7' 1I tion step. Using the new row of differences, the next step be- gins by testing the step-size (i.e., at 3.). "' S-81 DE6FN-11

IPHILCQ WDL DIVISION WDL-TR2184 •o ' ll Further Properties of the Program 0 In some problems, information about the first derivative (velocity) may be less reliable than information about the function (position). The user may then choose a "running change of coordinates" or a "running start;" these depend on the fact that with 8 consecutive values of the y. (and the y! in case first derivatives are present in the f.) the Cowell part of the program can be self-starting. The mathematics is simple: step No. 1 is omitted, and No. 2 modified to calculate "F., and "F._ from Eq. (2) (in- stead of "F./ and 'F.,). The difference table may again be completed, and Cowell integration begins. The user, having tested the AC to establish that the previous step was a Cowell step, begins a running change of co- ordinates by setting cell DE6F 4- 500 to non-zero. He then sets up a counter and begins immediately to store 8 consecutive values of the y. starting at T+3+11N (and y! starting at T+3+3N, if they appear in the f.). —) i i , ( After changing the coordinates the 8th time, the user may change the sec- ond derivative evaluation routines; if x and h are to be in new units this should also be done. When another step is asked for, the routine will form a difference table in the new coordinates and proceed to a Cowell step.

The mechanics of a running start are similar; after going through the

set-up routine, the user loads his values of y through y 7 (and the y! if needed in the f.) into the same locations as above and makes the re- Tl quired transfer. J n There may also be occasions on which the user will wish to modify h him- y self; e.g., if he wishes to produce the numerical solution at some pre- scribed value of x, or if he wishes to approach a running change of co- ordinates at a step-size smaller than that being used by the routine. The technique of modifying h is described in Appendix B.

S"82 DE6FN-12

PHILCQ WDL DIVISION n WDL-TR2184 !:! APPENDIX B "i ,J USAGE AND CODING INFORMATION

j There are essentially two entries to the subroutine. The first entry must be made once at the beginning to set up the addresses, options, parameters, Q etc., of the routine for integration of N simultaneous second-order, ordinary differential equations, in which first derivatives may or may not r; appear. The first entry utilizes the auxiliary subroutine to evaluate the ~-l , second-order derivatives at the initial conditions. Thus, the initial conditions must be set up prior to the first entry. The second entry may ' | be used any number of times after the first to integrate all y, from x to x+h by a Cowell step; or x to x+h/R by a Runge-Kutta step. .I ~\ The first entry has the following calling sequence: LOG. Instruction Comments

] " a TSX DE6F,4 Set-up entry. I «_ J a+1 PO T,0,V Option, addresses of storage and "") auxiliary subroutine. i j Ot+2 PI B,0,R Option and parameters.

! OH-3 DEC 1E-S S is the number of significant figures ~J . desired.

': 1 CK+4 DEC h , Minimum step-size. Floating point.

a+5 DEC h Maximum step-size. Floating point.

a+6 DEC y . Minimum y value allowed for testing. m Floating point.

CH-7 Return

(a+1): T is the address of the first word of a block of 30N+3 cells of temporary storage arranged as follows:

S"83 DE6FN-13

i 1PHILCQ WDL DIVISION WDL-TR2184

Loc. Contents Comments

T PZE N,0,0 N is the number of equations. Fixed point.

T+l Value of independent variable. Float- ing point.

T+2 Value of step-size. Floating point.

T+3 thru y. thru Values of the dependent variables y.. Floating point. T+N+2

T+N+3 thru y! thru Values of the first derivatives y'. Floating point. T+2N+2 y' 0

T+2N+3 thru y^1 thru Locations where the user's auxiliary subroutine must store the second T+3N+2 1 a N derivatives y' . Floating point. T+3N+3 thru T+30N+2 27N cells of temporary storage. o

The next 27N storages of T are temporary storages. The Runge-Kutta sub- routine uses the first 6N cells (T+3N+2 thru T+9N+3) and the Cowell routine uses the final 2lN cells (T+9N+3 thru T+30N+2). However, if a change of coordinates (see Special Usage) is made, the Cowell routine will also use the first 6N cells. The attached T Storage Chart shows the set-up of the entire T region. The N cells starting at T+5N+3 and the N cells starting at T+6N+3 are used by the Runge-Kutta subroutine to compute A'y and Ay . • However, A'y and Ay are destroyed before final exit, and these cells y contain intermediate values of no significance to the user. The left side

of the chart shows the storage for the normal case where 6R Runge-Kutta Ili steps are taken (using the first 9N cells of T for each integration) before an attempt is made to proceed to a Cowell step. At 'the beginning of each set of R steps, the Cowell subroutine saves the values of the second derivatives (7 sets starting at T+11N+3). In addition, the values of y._ and y' are saved, starting at T+9N+3 and T+10N+3 respectively, for use in the central difference equations where "F., and 'P., are calculated. Care must be exercised in using certain values in the temporary region.

s"84 DE6FN-14

PHILCQ WDL DIVISION 'tV WDL-TR2184 'O .. For instance, after a Runge-Kutta integration step, the most significant f] values of y. and y', starting at T+7N+3 and T+3N+3 respectively, will be the values of the previous integration; while the least significant values of y. and y', starting at T+8N+3 and T+4N+3, respectively, will be the Q values of the present integration. The Cowell routine also saves the least n significant values of y. and y' (unless a change of coordinates is in |j progress) in these same storages at the end of each integration. The UN __ storages starting at T+19N+3 contain the right half of the N difference i 1 tables, an example of which is shown in Appendix A. The right side of -•-. / the chart shows other values which are stored in the T region during a | change of coordinates and will be explained later under Special Usage.

*~ Even through only one symbol is given (yJn» etc.), it should be understood

"1 that N values are stored as in the left side of the chart. Thus, y!n

signifies y{Q, y^Q, y . . . .

j The address V is the entry point of an auxiliary subroutine which the user must provide to evaluate the second derivatives yl1. This subroutine must I store yi' in T+2N+3 through T+3N+2 as shown above. The subroutine is entered by the calling sequence:

Loc. Instruction Comments

j a TSX V,4 Index registers need not be saved. U Of+l Return Return via a TRA 1,4. ""I

The derivatives yV are evaluated during the set-up and at the end of each integration step. Thus, the values of the variables and the derivatives are consistent at all times. Extra precision is recommended for the evalua- tion of the second derivatives yV. [j PO should be set to PZE if the first derivatives are present in the evalua- tion of the second derivatives. If first derivatives are not present, PO should be set to MZE.

S-85 DE6FN-15

JPHBLCQ WDL DIVISION WDL-TR2184

(Of+2): Pi should be set to PZE if a variable step-size is wanted. For a fixed step-size; Pi should be set to MZE. The former allows doubling and halving while the latter restricts the routine to a fixed r. The user may change the mode of operation externally at any time by setting cell DE6F+501 to plus for a variable step-size and minus for a fixed step-size. ,

Only the first B (1 ^ B ^ N) equations are tested to determine doubling or halving of h. Thus, the user should arrange the N equations in descending order of importance, and specify B accordingly. If B = 0 in the calling sequence, it will be set to N.

R is the ratio of the Cowell step-size to the Runge-Kutta step-size. Thus, smaller integration steps can be taken in the Runge-Kutta subroutine by setting R greater than 1. If R = 0 in the calling sequence,it will be set to 4. R is saved in the decrement of cell DE6F+516 and in floating point in cell DE6F+517. After any Cowell integration step (AC= - ). the user chould change R by. changing both of these cells.

(g+3): 1E-S is a floating point number where S is the number of significant figures of accuracy desired at each step. The user should experiment with S to fit his own particular problem. The 1 of 1E-S may also be varied from 1 to 9 (1E-S thru 9E-S) for a final degree of control over the accuracy testing. If 1E-S=0 in the calling sequence, it will be set to 1E-9.

(df+4); h is a floating point number giving a lower bound for h. h is saved in cell DE6F+509 and can be changed at any time.

(

S-86 DE6FN-16

"1 PHILCQ WDL DIVISION WDL-TR2184

y is a positive floating point number which is used in testing min the step-size. If y'mi .n =0 in the calling sequence, it will be set to 1. y ,. iss saveid in cell DE6F+511 and can be changed at any 'miminn time.

If the fixed step-size mode of operation is selected (P1=*1ZE), then B, 1E-S, h . , h , and y . are all ignored by the subroutine. (If P1=MZE, set min' max* 'mm e> j \ B = 1 for maximum efficiency.) "1 11 The integration entry has the following calling sequence: •-'-I Loc. Instruction Comments

| or TSX DE6F+1,4 Integrates all variables one step. ot+l Return 1 Upon return from the integration entry, the accumulator will be plus if j the integration was a Runge-Kutta step and minus if the integration was a Cowell step. Ordinarily, x will have been advanced to x 4h/R for a ~) Runge-Kutta step and x + h for' a Cowell step. However, in the variable _J h mode, it is possible that the value of h in T*2 prior to the integration entry has been changed to h/2 or 2h. In this case, the integration step , ] will be a Runge-Kutta step, and the value of x x^ill be either x + h/2R or x + 2h/R. All values of y , y!, and y" will be consistent with the new • value of x. The user must never change the value of the step-size h ex- cept as described under Special Usage.

Special Usage (See Appendix A. Further Properties of the Program.) ki 1. Running Change of Coordinates. (Normal Entries.)

,-. After any Cowell integration step (AC= -), the user may initialize jj the beginning of a change of coordinates by setting cell DE6F+500 to non- gero. Starting with the present values, he begins to save eight consecutive ! sets of y. starting at T+11N+3 (and y! starting at T+3N+3 if they appear in the y1.1). He continues to use the integration entry above. The routine will ! S-87 DE6FN-17 i

• -I IpHILCQ WDL DIVISION WDL-TR2184

detect the non-zero value stored in cell DE6F+500 and will begin a count- down in cell DE6F+502 from 8 (-1) 0. The next seven integrations will be Cowell steps and all testing will be discontinued during this period. After the eighth set of y ^47)» and yJ (yjy) lf necessary, have been stored (DE6F+502 will have a fixed point 1 in the address), the user may change the second derivative evaluation routine V and the units of x and h. The units of the eight sets of y. and y' may be changed while storing each set, or after all eight sets have been stored. When another integration step is asked for, the routine will perform the change of coordinates and proceed to a Cowell integration step. Cell DE6F+500 will be restored to zero, and an 8 will be restored to the address of cell DE6F+502. Thus, the routine will be ready for another change of coordinates and will oper- ate under standard conditions.

2. Running Start. (Special Entry.)

A running start is similar to a running change of coordinates except that the user must supply all eight sets of y (and y' if necessary) at one time. The following sequence of operations must be followed:

A. Set up the initial conditions in the T storage. Only N, x, and h are needed, although the eight sets of y. (but not y')

can also be stored at this time, x must correspond to y.7 and h must be the interval at which the y. have been obtained. Thus, x = x_ + 7h where x_ corresponds to y~ (and y').

B. Use the first entry calling sequence to set up all parameters and options. The V subroutine will be used but will have no effect on the problem. Also, cells T+4N+3 thru T+5N+2 and T+8N+3 thru T+9N+2 will be set to zero. Thus, the eight sets of y' must be stored after the setup entry.

c. Store eight consecutive sets (equal intervals) of y. starting at cell T+11N+3 (and eight consecutive sets of y! starting at cell T+3N+3, if needed).

S-88 DE6FN-18

PHILCQ WDL DIVISIONi " -y WDL-TR2184

D. Execute the following calling sequence one time:

Loc. Instruction Comments jj a TSX DE6F+16,4 Enter only once. p, a+1 Return Integrates 1 step.

-, E. Continue with the regular integration entry (TSX DE6F+1,4) rj to integrate further. Step D integrates all variables one

Cowell step, and x(x0 + 7h) is advanced to x -*• h(xQ + 8h) .- , j From this point, the routine will operate under normal con- <—j ditions. 1 3. Change of Sutep-Size in the Cowell/Runge-Kutta System. (Special Entry.) .1 During the integration procedure, the user may wish to output for a specific value of x without interrupting the Cowell/Runge-Kutta integration | procedure. Or, he may wish to change the value of the step size h prior to a running change of coordinates. He can do this after any integration entry ~] with the following procedure: J '! Loc. Instruction Comments ^J or TSX DE6F+22.4 Changes h and starts new series of 6R Runge-Kutta steps. nij ff+1 Return

,--•) Thus, the integration step will be h/R. Continue with the regular integra- J tion entry (TSX DE6F+1,4) to integrate further.

| 1 If the above procedure is being used to reduce the step-size prior to a change of coordinates, the user must prevent the routine from doubling again until after the change of coordinates. Doubling can be prevented either by storing zero in cell DE6F+510 (h ), or by setting cell ("j DE6F+501 (fixed step size) negative prior to the above entry. After the "-' change of coordinates, the user may restore the above cells.

' S-89 DE6FN-19

JPHBLCQ WDL DIVISION WDL-TR2184

4. Change of Step Size for a Final Integration. (Special Entry.)

This is simply a direct transfer to the Runge-Kutta integration subroutine and should be used to end exactly at a specific value of x.

After changing the value of h in T+2,

Loc. Instruction Comment

01 TSX DE6F+588.4 Integrates one step with the Runge-Kutta subroutine. <*+! Return

The integration step will be the value of h in T+2. This procedure could be used in the middle of the integration procedure if 3. above (TSX DE6F+22,4) is used immediately afterwards to restart in the Cowell/ u Runge-Kutta system.

In addition to the user's auxiliary subroutine and the 30N+3 cells for the T storage, the storage requirements are 955 words for RWDE6F plus 44 words I of COMMON.

The value of the independent variable x is accumulated in double precision when incremented by h. The least significant part of x is saved in cell DE6F+718.

L)

0 0

S'90 DE6FN-20

DIVISION WDL-TR2184

APPENDIX B - T STORAGE CHART

N X h Initial conditions which user must supp T+3 Vl y2 • •

T-Hf+3 y • • y' ( i y' \2nd derivatives stored by V subroutine. T+2N+3 yl y" • • •\Most significant y y Coordinate Change T-H3N+3 yi y' • • yN io iO " yl 8 sets of consecutive T+4N+3 y{ y' . • y " Least significant y" y! saved by user If T+5N+3. Ay i Ay' • • Ay- Destroyed by R.K. yi2 t Ay 1 Destroyed by R.K. yl y" y" - f(x,y,y'). Cowell T+6N+3 2 Ay- 1 y Most significant y y stores yj over y^. T+7N+3 l y2 • • yN i4 i4 y J Least significant y T+8N+3 l y2 • • i5 1 Saved for central y!3 y23 • yN3 1 u. (difference equations yv y T+10N+3 y23 y* i7 i7 y v" v" "\ Normal Case. y Coordinate Change T+UN+3 i'o y20 • yNO io 0 T+12N+3 yu y" . y" Saved from 6R R-K 8 sets of consecutive v" v" v" steps. Used to form y y. saved by user. T+13N+3 y!2 y22 • • yN2 i2 v" v" ^difference tables in y Cowell uses (with V sub) T+14N+3 y!3 y" • • yN3 i3 an attempt to proceed y to form y" above. T+15N+3 y!4 y" • • y" i4 v" v" to a Cowell step. y T+16N+3 y!5 y25 • • yN5 i5

T+17N+3 y yv" • yv" !6 26 • N6 J T+18N+3 Used only if coordinates changed. y17

»I „» Ite lip Al 'F F UN storages. T+19N+3 ^LO l" <& ^15 V16 18 18 17 ' 17 N sets of A^ v" "F "F F F T-H9N+14 zO ^ ^ Al2I3I *ll °25 X26 F28 r28 ' 27 ' 27 ^1 *« differences IP n T+19N+25 A y F F AL 4 ^5 36 " 38 ""38 ' 37 *37 saved for * * ..ft t 1 next Cowell , . . , . Moat Lst. Most Lst. Sig. step. • • • • • Sig. Slg. Slg. (See Appendix A) T+30N-8 A y F F F <5 ^1 *N4 \5 N6 ' N8 \8 ' N7 ' N7 ^

S-91 DE6FN-21

PHILCQ NA/DL DIVISION DE6FN (CONT'd) WDL-TR2 184 ;

* FAR DE6FN TTL DE6FP3 DE6FN0060 ENTRY DE6FNZ DE6FN0070f| ENTRY DE6F-ps DE6FN0080i J ENTRY DE&FNS DE6FN0090 ENTRY DE6FCH DE6FN0100Q ENTRY DE&FCM DE6FN0110N ENTRY DE6FP4 DE6FN0120 ENTRY DE6FMN .^ ENTRY DE&FMA DE6FNOJ,40U PZE o DE6FN0150-J PZE o DE6FN016Q PZE o DE6FNOJL70iT DE6FN SXD DE6FN-1,! SAVE 1R DE6FN0180.! SXD DE6FN°2,2 DE6FN0190" • SXD DE6FN = 3,4' DE6FN0200p •CLA 5,4 DE6FN021o! STA DUX1 DE6FN0220 •CLA 6,4 DE6FN0230 STA BCOM LOC. B DE6FN024Q 1 CLA 7,4 DE6FN0250-J STA RCOM LOC R DE6FN0260 BCOM CLA * DE6FN0270"] STA CALL+1 DE6FN0280 J ARS 18 DE6FN0290 'STO CELM1 DE6FN0300n RCOM CLA * DE6FN0310' ADD CELM1 '-^ •STO CALL+2 2ND WORD DE6FN0330 CLA 8,4 DE6FN03»o[n STA **1 DE6FN0350-J CLA * DE6FN0360 STO .'CALL + 3 3RD WORD DE6FN0370r .CLA 9,4 DE6FN0380 STA **1 DE6FN0390 CLA * DE6FN0400r, STO CALL*4 4TH WORD DE6FN0410 .CLA 10,4 DE6FN042o'-^ -STA **1 DE6FN0430 .CLA * DE6FN0440n STO CALL+5 5TH WORD DE6FN0450U CLA n>4 DE6FN0460 STA **1 DE6FN0470',-. CLA * DE6FN04801 :STO CALL*6 6TH WORD DE6FN0490

S-92 DE6FN-22

PHILCQ \VD1_ D5VJSIOK 1 .' fN (CONT'd) WDL-TR21&

CLA 2,4- SET .SIGN DE6FN050 ;STA + + 1 DE6FN051 '1 .CLA + DE6FN052 j TPL' * + 3 2ND WORD DE6FN05S .CLS CALL+2 DE6FN054 1 STO CALL*2 DE6FN095 LJ •CLA 4> 4 LOC ENDT DE6FNOS6 • STA NTOTA CLA 3,4- DE6FNOS8 tj -STA 'REVER*3 DE6FNOS9 :STA REVER*5' DE6FN060 .STA NTOT DE6FN061 *> STA COMN DE6FN068 ;STA COMCEL DE6FN063 ;STA SVTD DE6FN064 NTOTA .CLA * DE6FN06B 1 ARS .*--?. 18 DE6FN066 NTOT -STO' * •DE6FN067 „ COMCEL. -LDQ' * FIND TOP T DE6FN068 . i iMPY TRTY DE6FN069 jii :STQ CELM1 DE6FN070 XLA SVTD DE6FN071 SUB CELM1 DE6FN072 SUB TWO DE6FN073 ADM CALL+1 DE6FN074 STA START SAP. T DE6FN075 >STO CALL+1 DE6FN076 ! 'CLA 1,4 DE6FN077 -STA * + l DE6FN078 ,CLA * DE6FN079 ! 'w.i 'TPL **3 SET. ,SIGN PO DE6FN080 CLS CALL+1 DE6FN081 ^•i 1 :STO CALL*1 DE6FN08 u.JCOMN LDQ * COMPUTE. DE6FN083 iMPY FIFTN MID 'POINT DE6FN084 ('«"j -STQ CELM1 : DE6FN085 J ;CLA CELM1 DE6FN086 - ADD ONE DE6FN087 .STO HN DE6FN088 •» CLA START DE6FN089 ' ADD HN DE6FN090 ;STA REVER+2 DE6FN091 f "l .STA REVER-t-4 DE6FN09 kj ' TTSX REVER,4 DE6FN093 CALL TSX DE6F* 4 ENTER DE6FN094 ;~~T » 'PZE e t DUX DE6FN095 •PZE DE6FN096 tJ 'PZE. DE6FN097 DE6FN098 ~ PZE DE6FN099 ] PZE DE6FN10

S-93 DE6FN-23

IRHILCQ WDL DIVISBON 1 DE6FN (CONT'd) WDL- ]

TSX REVER, 4 DE6FN1010 .LXD DE6FN-1,! DE6FN1020,- .LXD DE6FN=2,2 DE6FN1030! L LXD DE6FN-3.4 DE6FN1040 TRA 12,4 DE6FN10BO REVER LXA HN,1 REVERSE T BLOCK ,LXD ZERO, 2 DE6FN107QU IN LDO DE6FN1080 .CLA DE6FN1090P1 ;STO DE6FNliOOf] STO DE6FNUi(T TXI DE6FN1120n DE6FN1130! TIX IN, 1,1 U TRA 1,4 DE6FN11.4Q DE6FP1 SXD DE6FN1150 .SXD . SXD DE6FNH70U TSX REVER, 4 DE6FN1180 TSX DE6F+1,4 DE6FN1190?;) • STO CELM1 DE6FN1200L] TSX REVER, 4 DE6FN121(T" -LXD DE6FN1220,-, DE6FN12305 \ LXD U .LXD. DE6FN-3»4- DE6FN1240 -CLA 1,4 DE6FN1250 :STA DE6FN1260 :CLA. CELM1 DE6FN12701 .STO * DE6FN1280 TRA 2,4 DE6FN129Q") DE6PP2 :SXD. DE6FN1300 .SXD; DE6FN1310 •SXD. DE6FN1320,.-. TSX REVER, 4 DE6FN1330/1 TSX 'DE6F*16,4- DE6FN1340-J REVER,4 DE6FN1350 TSX r .LXD DE6FN136G' j ,LXD DE6FN1370J ,LXD DE6FN1380 •TRA 1,4 DE6FN139Q.-1 DE6PP3 -SXD DE6FN=1*1 DE6FN1400J >SXD DE6FN14l(H SXD •DE6FN-3»4- DE6FN1420 TSX ,REVER,4 DE6FN1440U CLA .1,4 DE.6FN1450 .STA •**! DE6FN1460n :CLA * DE6FN147CU •TSX DE6F*22,4< DE6FN1480 -TSX :REVER,4 DE6FN1490-, .LXD • DE6FN150DI J .LXD" DE6FN1510

S-94 DE6FN-24

PHILCQ WDL DIVISION il LXD DE6FN-3,4 TRA 2,4 DE6FN13: f DE6FP4 SXD DE6FN-1*!. DE6FN15!1 •SXD DE6FN-2,2 DE6FN15! SXD DE6FN-3,4- DE6FN15( TSX REVER,4 TSX DE6F+588,4 DE6FN15I TSX REVER,4 DE6FN15! .LXD DE6FN-1*! DE6FN16I .LXD- DE6FN-2.-21 DE6FN16! LXD DE6FN16! TRA 1,4 DE6FN16! DE6FNZ :CLA 1,4 DE6FN16- ;STA **1- DE6FN16! .CLA * DE6FN16I STO DE6F*500 DE6FN16! TRA 2,4 DE6FN16I DE6PPS •CLA DE6FN161 SSP DE6FN17I STO DE6F*501 DE6FN17! TflA 1,4 DE6FN17 -I DE6FNG CLA DE6F*501 DE6FN17 SSM DE6FN17 STO DE6F+501 DE6FN17 TRA 1,4 DE6FN17 DE6PMN •CLA 1,4 DE6FN17 :STA **1 DE6FN17 CLA DE6FN17 •"'t :STO DE6F*509 DE6FN18 J TRA 2,4 DE6FN18 DE6F.MA •CLA 1,4 DE6FN18 STA DE6FN18 .CLA •DE6FN18 3 STO DE6F+510 DE6FN18 TRA 2,4 DE6FN18 ? /| DUX SXD: DUX2,4 DE6FN18 TSX REVER,4 DE6FN18 DUX1 TSX 0,4 DE6FN18 TSX REVER.4 DE6FN19 LXD DUX2.4 0 DE6FN19 TRA 1,4 DE6FN19 n DUX2 'PZE DE6FN19 N DE6FCM CLA 1,4 DE6FN19 • STA **1 DE6FN19 .CLA * DE6FN19 •STO •DE6F*511 DE6FN19 TRA 2,4 DE6FN19 DE6FCH 1,4 DE6FN19 •STA LINKA DE6FN20 2,4 DE6FN20 :STA LINKB DE6FN20

S-95 DE6FN-25

iPHBLCQ NA/DL DIVISION n

DE6FN (CONT'd)

LINKA CLA * DE6FN2030 STO DE6F+516 DE6FN2040" LINKS 'CLA * DE6FN2050'- •STO DE6F+517 DE6FN2060L" TRA 3,4 DE6FN2070 ZERO 'PZE 0 DE6FN208of ONE 'DEC 1 TWO •DEC 2 DE6FN2100 FIFTN DEC 15 DE6FN21lcn HN •PZE o DE6FN2140 j SVTD PZE o DE6FN216(f COMMON BSS 44 DE6FN2170-I DE6F TRA DE6F+0799 COWELL METHOD INTEGRATION SUB (TR' SETUP) DE6FN2180 SXD DE6F+0504,! 2ND ENTRY, BEGIN DE6FN2190U • SXD :DE6F+05Q5,2 INTEGRATION DE6FN2200 SXD DE6F+05Q6,4 DE6FN2210' ] CLA DE6F*0500 TEST -SWITCH. FOR COORD. CHANGE DE6FN222CJ TZE' DE6F+OQ11 OsNORMAL CASE' DE6FN2230 'CLA DE6F+05Q2 8(--l)0 DE6FN224C •SUB DE6F+0531 1 DE6FN225C • STO DE6F+0502 DE6FN2260 TNZ DE6F+0011 CONTINUE IF NOT ZERO DE6FN2270-, TRA DE6F+0091 TR FOR COORDo CHANGE DE6FN22801 :CLA DE6F+0503 TEST RoK. OR COWELL DE6FN229IH TMI. DE6F*0185 •-sCOWELL DE6FN2300 CLA DE6F+0709 TEST 1ST .'TIME FOR. R.K8a*- DE6FN231C"] TMI 'DE6F + 0043 = 2N = 3RDj> » « « p'RTH 'RoK, INTEGRo DE6FN232CU TRA DE6F*0030 TR TO BEGIN RUNGE KUTTA SERIES (R) DE6FN2330 SXD DE6F*0504.1 'PROGRAMMER' MAY ENTER' HERE FOR DE6FN234C .SXD DE6F+0505>2 •SPECIAL :COORD, CHANGED 8 SETS DE6FN235C •SXD DE6F*0506.,4 'OF' Y,S MUST BE' IN T*11N*3 DE6FN2360 •STZ DE6F*0502 AND T MUST BE AT 8THi Y. DE6FN2370- :SXD .DE6F<-0500.4 8 SETS 'OF Y' PRIME: MUST BE DE6FN238t' TRA DE6F*0091 AT 'T*3N*3MF 'F(X*Y,'Y PRIME) USED* . DE6FN239t-J :SXD DE6F*0504,1 'PROGRAMMER MAY ENTERi HERE' WITH: H, IN AC DE6FN2400 .SXD DE6F*0505,2 AND START NEW RUNGE KUTTA SERIES DE6FN24in .SXD DE6F*0506,4 .H/R WILL''BEi INTEGRATION STEP, DE6FN24BIJ ISTO COMMON*000 NEW H DE6FN2430 CLA DE6F+0500 CANNOT CHANGE H. IF 'COORD,. TNZ DE6F*0006 CHANGE IS IN PROGRESS DE6FN245( .LDQ COMMON*000 NEW H DE6FN2460 TSX. DE6F*0077,2 CHANGE VMINfVMAX* WMAX FOR H2 DE6FN2470 .CLA DE6F*0519 H/RsR.K, H FOR EACH STEP DE6FN248f| FDP"DE6F*0517 R=TOTAL R,K, STEPS DE6FN249GJ ;STQ 0 (T + 2) DE6FN25DO LDQ -DE6F*0519 DELTA (T) s H DE6FN251I?-) FMP 'DE6F*0519 DE6FN2526J •STO DE6F*0520 DELTA (T) SQUARED DE6FN2530 .STZ DE6F+.0518 SET KsO»(K=0(l)6) 'SSM DE6FN255f. STO DE6F*0709 'FIX SWITCH FOR '2ND* ETC ENTRIES DE6FN2560-

S-96 DE6FN-26

PHILCQ \A/DL DIVISION )FM WDL-TR21I

3 LXA DE6F*0527,1 7N(FIX TO SAVE 2ND DERIVo ) DE6FN25' . SXD DE6F*0527,1 7N(=N)N DE6FN25I "<-, 1 CLA DE6F*0516 fRsR0Ks STEPS PER DELTA(T) DE6FN25 • 1 •STO DE6F*0515 R1 IN DECR9 DE6FN26 LXD DE6F*05l5'pl R(=l)l DE6FN26I CLA DE6F*0516 RaTOTA1 L R5Kc STEPS 'PER D(T) DE6FN26 SUB DE6F*0515' 1R(I)sCURRENT •RIsR(-l)l IN DECR= DE6FN26 D TNZ DE6F*0054 TlR IF NOT 1ST R DE6FN26 LXA DE6F*0710.4 N DE6FN26 S LXD.-DE6F*0527,2 7N(=N)N DE6FN26 o .CLA o*4 'T*3N*312ND DE'RIVc) DE6FN26 • STO 0,2 T+11N*3*<7N)«(7N -2ND1 DERIVS) DE6FN26 0 1 I TXl DE6F*0052*2,= 1 DE6FN26 J TIX DE6F*0049p4,1 DE6FN27 SXD TDE6F*0527p2 ' '7N(=N)N DE6FN27 .LXA 'DE6F*0518«2 DE6FN27 '"1-\ TXH DE6F-*0122»2.5 IF K86, TR TO .COWELL' DE6FN27) .,'.V1) TSX DE6F*0588S4 TR TO -RUNGE .KUTTA INTEGRATION DE6FN27] TIX 'DE6F + 0070pl.1 REDUCE R TIL' R^RN DE6FN27I ~1 .LXD"DE6F*0516,1 RsRN (RESTORE R FOR NEXT CYCLE) DE6FN27' jj :CLA DE6F*0518 K = DC 1) 6 DE6FN27 .ADD 'DE6F*0531 DE6FN27 •~] - STO DE6F*0518 DE6FN27 ;J SUB .DE6F*0533 DE6FN28 TNZ 'DE6F*0070 SAVE Y«3) AND Y(3) -PRIME IF 0 DE6FN28 LXA DE6F*0710,2 N DE6FN28 i CLA 0*2 T*N + 3»Y(I>aDEPE-NDENT VAR0 < DE6FN28 " -' -STO 0,2 T*10N*3BYC3) DE6FN28 n i A n o DE6FN28 "*"•> • I/LA U a £. T*2N*3sY(IJ PRlMEslST DERIV STO Op2 T*llN*3sY(3)'PRIME DE6FN28 _j TIX .DE6F*0065*2* 1 DE6FN28 SXD"DE6F+0515t 1 SAVE R DE6FN28 "~1 •SSP1 KUTTA DE6FN28 ; j ,STO DE6F*0503. METHOD DE6FN29 ••- -V .LXD .DE6F*0506»4 DE6FN29 -r> LXD DE6F*0504J,1 1 RBKa STEP. COMPLETED DE6FN29 .'* f LXD. DE6F*0505.2 DE6FN29 -J TRA Ip4 RETURN TO PROGRAMMER DE6FN29 •CLA DE6F*0519 OLD H (SUB0 FOR NEW VMIN, VMAX* WMAX) DE6FN29 ', '^ ,STO' COMMON*001 'HlsQLD H (SAVE- FOR CHANGE1 OF' HMAX) •DE6FN29 ;<1 ;CLA -DE6F*0520 OLD H SQo^Hi SQo DE6FN29 ,STO COMMON*000 'HI SOo DE6FN29 n STQ 'DE6F*0519- NEW :HsH2 DE6FN291 F.MP DE6F*0519 DE6FN38 u\ — a' :STO DE6F*0520 NEW 'H SQes?H2 SQo DE6FN30 .LXA DE6F*0§33,5' -3 IN 1R1-, IR4 DE6FN30 ;CLA ,COMMON*OOO HI SQ. DE6FN3Q POP DE6F*0520' H2 SQo DE6FN30 FMP DE6F*05l5i4 .CHANGE VMIN* VMAX» VMAX DE-6FN30 1 ; ')[ STO DE6F*05l5i4 (V/H1 'SQ0 )Xr TIX DE6F*0085,4,1 • DE6FN30

S-97 DE6FN-27

IPHILCQ \A/DL DIVISION mjf. DE6FN (CONT'd) WDL-TR2184 f~)

TRA 1,2 DE6FN3080r LDQ 0 (COORD, '.CHANGE1 BEGINS) DE6FN3Q90! FMP DE6F*0544 -8, ill! FAD o DE6FN3J.10 • STO 0 T + l DE6FN3120F] LXA DE6F*0528,1 8N DE6FN3130LJ .SXD 'DE6F*0528,1 8N(-N)0 DE6FN3J.40 • CLA 0 ls(T) DE6FN3l50n FAD 0 DE6FN3J60 •STO 0 DE6FN317Q LXA DE6F+0710,2 N DE6FN3180 .CLA OP! T + llN-*3*<8N)s(YO*Yl,,,.,Y7) DE6FN3190 •STO 0,2 T + N*3 DE6FN3200L • CLA 0*1 T*3N*3*(8N)clST DERIV. DE6FN3210 STO 0,2 T+2N*3(IF SAVED) DE6FN3220H TXI DE6F+0106,!, MOVE 'DEPENDENT VAR, TO T*3 THRU T+N+2DE6FN3230f j TIX DE6F*01Ql,2t TSX 0,4 V CFORM2ND iDERlVo ) DE6FN3250-- .LXD DE6F+0528,! -8N DE6FN3260? .LXA DE6F+0710,2 N DE6FN3270L U CLA 0,2 T+3N«3 (2ND DERIV.) DE6FN3280m STO 0,1 T*3N*3*(8N) •DE6FN3290-H TXI STORE '2ND sDERIV, . (8 SETS) DE6FN3300>J| TIX DE6F + OUO,2* DE6FN3310 TXH DE6F*0096P1, LOOP FOR 8 SETS OF Y DE6FN3320-' LDQ 0 (T+2)sHsDELTACT) DE6FN3330! TSX DE6F+0077,2 CHANGE. VMINp•VMAX, WMAX CLA DE6F*0519 H2sNEW H DE6FN3350.-5I FDP 'COMMON-CQ01 H1=OLD H DE6FN3360- I DE6F*0512*1 CHANGE UNITS 'OF HMINpHMAX, DE6FN3370J •STO DE6F+0512.1 AND XMIN DE6FN3380 TIX DE6F*0117,1, DE6FN3390; • STZ -DE6F + 0521 CLEAR Wp W = MAX (DELTA VID/Y DE6FN34001 STZ DE6F+0522 CLEAR Vp V = MAX (DELTA VD/Y DE6FN3410 LXA DE6F+0529.4 .UN DE6FN3420:- SXD DE6F+0529,4 •DE6FN343oi: LXA 'DE6F*0710,4 N DE6FN3440' LXA 'DE6F*0527,2 7N • SXD !DE6F*0527,2 7N(-1)6N DE6FN3460r' 0,4 T*N*3=Y .STO DE6F-*0711 :SEE V AND W CALC9 DE6FN3480 'DE6F*0502: NORMALLY = 8 (NO CHANGE' IN COORD,) DE6FN349Qf TNZ 0=COORD, CHANGE DE6FN3500LJI TSX FORM DIFF8 DE6FN3510 PZE T*3N+3+(7N) DE6FN3520ri :CLA >DE6F*0520 H .SO. DE6FN3530 TSX 'DE6F*0344»2 FORM SUM OF PRODUCTS DE6FN3540 •PZE. 'DE6F*05S2*0. COMMON*21 C(I)XDELTAS' DE6FN3550 .CLA 0,4 T*15N*3(Y3,COORD» CHANGE) DE6FN3560M TSX DE6F*0482,2 ADD 'Y3 TO '0*3,0*4 rnr*£.Extt.i*rctm<*' ' TSX DE6F*0373,2 F4(II) IN Al AND A2 DE6FN3580

S-98 DE6FN-28

PHILCQ WDL DIVISION Ua6FN (CONT'd) WDL-TR2U

CLS DE6F*0507 . DE6FN35? ,STO DE6F*0714 =F4(II) DE6FN36( DE6F*0508. DE6FN36! STO DE6F*07l5 DE6FN362 TSX DE6F*0380,2 FORM DIFF, PZE' 0 T*4N*3+(7N) DE6FN36' DE6F*0345,2 -H- SQ8 STILL UN- COM*2 DE6FN36! PZE DE6F*0552*0*COMMON*21 DE6FN36i •CLA 0,4 T*16N*3fl(Y4p OOORD, CHANGE') DE6FN36! 'TSX DE6F*0482*'2 '.ADD Y4- TO 0*3,0*4 DE6FN36I TSX DE6F*0373,2 F5XII) IN Al AND A2 DE6FN36I DE6F*0714 DE6FN371 STO COMMON*003 -«F4(II) DE6FN37! DE6F*0715 DE6FN37! •STO • COMMON*004 - - DE6FN371 TSX DE6F+0491,2 F4 DE6FN37! •STO COMMON*003 DE6FN37! • STQ ,COMMON*004 DE6FN37I • CLA :COMMO"N*008 Y4- C2ND -DERlVi) DE6FN37' TSX DE6F*0482.2, T5(I) IN COMMON*3«4> DE6FN37I LXA DE6F*0533,1 3 DE6FN371 'TSX DE6F*0491,2 F5(II> ORT6(II) IF COORD. -OHG-, ,STO DE6FN38S • STQ >DE6F->0508 CLA Y(4),Y(5)pY«>6) 2ND DE6FN38S TSX DE6F*0482,2 • OR Y(5)«Y(6)fl Y<7) IF' COORD, CHANGE DE6FN384 TSX DE6F+0491,2 FORM F51H),F6(II),F7(IH,F81II> DE6FN38! TIX DE6F*0163.1,1 'OR F6CII);F7 DE6FN39< •STO T+19N*3*<11N) DE6FN391} TXI DE6FN39? TIX DE6F*0177,2.1 • SXD:'DE6F*0529,1 SAVE FOR NEXT SET DE6FN40I .LXD,-DE6F*0527.'2 DE6FN40J TXI DE6FN4QJ TIX •COMPLETE N £QNS, . DE6PN40U 'TSX DE6F*0414»4 : TEST 'H (MAY TR R K8 AGAIN) • CLA iDE6F*0502. 8(- = l)0 IF COORD :CH6.

S-99 DE6FN-29

JPHILCQ WDL DBVBSBON any. WDL-TR2184

DE6FN (Cont'dj.

CLA DE6F+0519 H DE6FN4100 STO T*2s(H) RESTORE AFTER ReK. DE6FN4UO FAD T*lsT=INDEPENDENT VAR. DE6FN4120 STO COMMON*000 T+H/2 (MOST SIG.) DE6FN4130 STQ COMMON*001 LST, SIG', CLA COMMON*OOI DE6FN4150 FAD DE6F*0718 CUM, LST9 SIGS DE6FN4160 FAD COMMON*000 DE6FN417Q STQ DE6F+0718 •SAVE LSTo ^SIQ. FOR NEXT INTEGRATION STO T+ISCT+H.) DE6FN4190 LXA DE6F*0710,4 N DE6FN4200 LXA DE6F+0529,! UN DE6FN4glof CLA DE6F*0530 T * 1 9 N * 3 * ( 7 ) DE6FN422oi :STA DE6F*0208 DE6FN4230 :STA DE6F*0218 T*19N*3+<7) • CLA 'DE6F*0520 TSX DE6F*0344»2 DE6FN426( PZE 0,0,DE6F*0566 N*3*(7) STORED ABOVE (*11N) DE6FN4270.- LDQ DE6F*0520 H SQ DE6PN4280' FMP 0,1 T+l9N*3*{llN*7)sF8(II) DE6FN4290 'TSX 'DE6F*0473, 2 u TAD COMMON*003 DE6FN4310;', 1 STO -0,4- T*N*3aNEW Y DE6FN4320LJ •CLA DE6F+0717 'TEST MISSING IST'DERIV. IN F DE6FN4330 •TMI DE6F*0224 »aF(X» Y)y*sF(X»Y(,Y PRIME) DE6FN4340"] • CLA 'DE6F + 0519 'H DE6FN4350J TSX -DE6F + 0344»2 DE6FN4360 PZE' 0,Q,DE6F*0587 N*3*(7) (- + 11N) INCRo BY 11, DE6FN4370-, LDQ DE6F*0519' H DE6FN4380, FMP1 0,1 T+19N*3*<11N*9)«F7(I) TSX 'DE6F*0473.2 TAD :COMMON*003 DE6FN4410'"1] -STO 0,4 T*2N*3sNEW Y PRIME DE6FN4420LJ CAL 'DE6F*0208 T*19N*3*<7) DE6FN4430 ADM DE6F*0541 11 STA DE6F*0208 DE6FN4450' STA 'DE6F + 0218 DE6FN4460 •TXI DE6F*0229-.l,- 11 SET UP NEXT F8(II),F7(I) DE6FN4470r. TIX DE6F*0206,4,1 LOOP FOR N EONS. DE6FN448jr't] TSX 0,4 V (TR 'TO1 FORM -2ND -DERIV.) .LXA -DE6F*0529,1 UN DE6FN4500 .LXA DE6F*0710,4 N- DE6FN45KT1 LXA -DE6F*0541,2 11 DE6FN4520J CLA 0,1 T+19N*3*(11N) DE6FN4530 :STO COMMON*031,'2 READ DIFFo TO COM*20 DE6FN454Q--, TXI DE6F+0237,!,- 1 DE6FN4950 TIX DE6F*0234,2,1 DE6FN456CM SXD 'DE6F*0529fll DE6FN4570 CLA 0,4 T*3N*3=Y(7) 2ND 'DERIVo DE6FN4580 STO COMMON*039 Y(7) 2ND DERIV, DE6FN4590. LXA DE6F*0536pl >6 DE6FN4600

WDL DIVISION PHILCQ S-100 DE6FN-30 WDL-TR2184

DE6FN (Cont'd)

.LXA DE6F*0571,2 ZERO TO IR2 DE6FN461 FSB COMMON*Q26fl2 Y(6) 2ND 'DERIV, .05(1)...DO(VI) DE6FN46S STO COMMON*038,'2 •D6(I)^D5(II),D4(III),. . ,D1(VD DE6FN46B TXI il WE; ARE GOING' BACKWARDS HERE DE6FN460 TIX il DE6FN46S >DE6F*0520 H SQ DE6FN466 TSX DE6F*0344,2 B(I) X DELTAS DE6FN46 ,OOMMON*40 DE6FN468 ,LDQ DE6F*0520 H SQ, DE6FN469 'COMMON*027 F8(II) DE6FN470 . TSX DE6F*0473,2 DE6FN471 ?I—I FAD. COMMON*003 DE6FN47 STO 0*4 DE6FN473 .wxj CLA DE6F*0500 TEST COORD, CHANGE TNZ DE6F*0258 CANNOT -SAVE IF COORD," CHANGE- DE6FN475 STQ T*9N*3sLSTe .SJG. , (FOR R-.K.) DE6FN476 /"I •pi A -UL« DE6F*0519' H DE6FN477 TSX BCD DOT Y DELTAS DE6FN478 \7\ •PZE ,DE6F*0580,0»COMMON*40 DE6FN479 ;/] LDQ DE6F*0519 ,H DE6FN48C FMP :COMMON*029 u 'F7(I> DE6FN481 TSX DE6F*0473fl2 DE6FN48 FAD COMMON*003 .1. _ J DE6FN483 • STO 0,4 'T*2N*3sNEW Y PRIME: •DE6FN484 •^UTl "A DE6F*OSOO DE6FN485 ~] TNZ DE6F*0269 j DE6FN486 STQ T*5N*3sLST,. SIG.. (FOR R0K0> DE6FN487 LXD DE6F*0529,1 } DE6FN488 TIX DE6F*0233,4,1 COMPLETE N SETS DE6FN489 J TSX 0,4 V (FORM Y(7) 2ND; DERIV, DE6FN490 STZ DE6F*0522 CLEAR V DE6FN491 " ""] •STZ DE6F*0521 CLEAR W DE6FN492 .LXA J •DE6F*0529,4 UN' DE6FN493 LXA DE6F*0710,1 N DE6FN494

S-101 DE6FN-3l| LiPHSLCQ WDL DeVDSlON WDL-TR218&

' .J

DE6FN (Cont'd)

•STO DE6F+0507 DE6FN5120 CLA ,COMMON*028 F8CII) LST8 -SIQ, DE6FN5130! STO DE6F+0508 TSX DE6F + 049JL,2 DOUBLE PREC« FAD •STO COMMON*040 F9(II) MOSTo SIG', STQ COMMON*041 F9(II) LSTo SIG8 LXA DE6F+0536,4 •6 DE6FN5180 LXA DE6F+0571,2 DE6FN5t90n CLA .COMMON*039,'2 Y(7) 2ND- DERIV.»D6(I)»..,.DKVI) DE6FN5gOol-| FSB COMMON*026,'2 Y(6) 2ND DERIV,,D5(I)»,,,.DO DE6F*0714 F42 FORM MAX V DE6FN561CJ TRA •DE6F*0313 FOR THIS Y DE6FN5620 ] S-102 DE6FN-32

PHILCQ WDL DIVISIOKJ WDL-TK21CM o

DE6FN (Cont'd) STO COMMON*002 H SO, 'OR H IN AC- DE6FN562 SXD DE6F+0707.1 SUB, TO RORM (CONSTANTS X DIFF-, ) DE6FN56* >SXD: DE6F+0708,2 DE6FN565 CAL' 1.2 A.O,'B (AaCONSTANTS, DE6FN566 • STA 'DE6F + 0356 CONSTANT ADDR, -*7 DE6FN567 ARS 18 DE6FN566 • STA DE6F+0357. DIFF..ADDR. *7 DE6FN56S :CLA COMMON+008 Y3 2ND DERIV, DE6FN57C B .STO. COMMON*014 COR Y4 IF .COORD, CHANGE) DE6FN571 STZ COMMON*003 DE6FN572 >STZ C'OMMON*004 DE6FN573 .LXA DE6F*0537,1 DE6FN57* .LDQ 0,1 CO+7, .OR D0*7, OR N6*7, ETC, DE6FN575 FMP COMMON*21, OR -COM + 271, ETC, - •DE6FN578 TSX -ACCUM, PRODUCT IN 0*3. DE6FN577 TIX DE6F*0356,lil DE6FN578 LDQ1 COMMON+002 'H -SH., ,QR H' DE6FN579 FMP' COMMON*003 MOST SIG, DE6FN580 STO COMMON*003 DE6FN581 • STQ COMMON*000 DE6FN582 .LDQ COMMON*002 H SO, 'OR H DE6FN583 FMP COMMON*004 DE6FN584 j FAD COMMON*000 DE6FN585 FAD COMMON*003 DE6FN586 •STO- COMMON-003 MOST ,SI6>, 'IN COMMON*3 DE6FN587 -STQ' -COMMON*004 LST, , SIG', IN. OOMMON*4 DE6FN588 .LXD DE6F*0707,1 DE6FN589 .LXD; QE6F*0708,-2 DE6FN590 •TRA •2,2 DE6FN591 CLA. COMMON-003 DIVIDES -0*3;C*4 BY C*2 DE6FN592 •-FDP- COMMON*002 iH SQ -OR 'H DE6FN593 :STQ DE6F*0507 MOST -SIG', .IN Al DE6FN594 FAD. 'COMMON*004 'REMAINDER •+ LST, SIG', DE6FN595 FDP 'COMMON*002 H SQ, 'OR H." DE6FN596 STQ' • DE6F + 0508 LST9 . SIQ>, .IN' A2 DE6FN597 TRA 1/2. DE6FN598 :SXD. MOVE '2ND iDERlV. AND FORM DIFF-, DE6FN599 .CAL' :STARTING^ ADDR, OF -2ND 'DERIV. DE6FN600 •STA DE6F*0385 DE6FN601 LXD 2,» N ,IN 'DECR, DE6FN608 LXA 6 (FORM 'DIFFERENCES) DE6FN6Q9 .SXD COMMON*000,'2 DE6FN610 LXA DE6F*0571,1 ZERO C2ND/DERIV, STORED AT DE6FN611 •C.LA- COMMON*021».l AT 'COMMON*5, 'AGAIN AT COM +20 DE6FN612 -COMMON*020P1 FORM 'DIFFERENCES IN DE6FN613

S-103 DE6FN=33 r"\ JPHILCQ DIVBSiON WDL-TR2L84

DE6FN (Cont'd) STO 'COMMON*020».l COM*20 THRU COM*25 DE6FN6140 TXI DE6F+0397,1,°1 DE6FN6150' TIX DE6F+0393.2.1 LOOP 6p§p , , ,»1 TIMES .LXD COMMON*000*2 DE6FN6170 DE6F+0405,2,5 TR IF 1ST DIFF, DE6FN618I TXH DE6F+04Q8p2>3 TR IF 2ND OR 3RD DIFF, TXH, DE6F+0411,2,1 TR IF 4TH, OR 5TH DIFF. DE6FN6200 TIX DE6F+039lj2,l DE6FN62lOra LXD DE6F+Q716,2 DE6FN6220rl TRA 2 2 DE6FN6230lJ CLA COMMON*023 DELTA (1)3 DE6FN6240 STO COMMON*Q15 IN COM+15 DE6FN6250H TRA DE6F+0402 DE6FN626GJ COMMON*022 DELTA (11)2 OR DELTA (111)2 DE6FN6270 •STO ,COMMON*Q21,2 IN CQM+16 OR OOM*17 DE6FN628C } TRA DE6F*0402 DE6FN629C;, | • CLA ,COMMON*021 'DELTA(IV>1 OR DELTA(V)1 DE6FN6300~" STO COMMON*021,'2 IN COM*18 OR COM*19 DE6FN6310 TRA DE6F+0402 DE6FN632tH CLA DE6F+0500 SWITCH (OoNORMAL CASE.) f. -J TNZ 1.4 "STOP TEST IF NON/ZERO' DE6FN6340 CLA • DE6F*0501 TEST FIXED H TMI 1,4 ==FIXED 'H INTERGRATION DE6FN636CJ •CLA DE6F+0519 HoDELTA(T) COWELL TEST DE6FN6370 FOP •DE6F*0719 2, STQ COMMON*000 H/2 DE6FN639C- .CLA 00200 (WILL^MULT By 2, SQUARED • STO COMMON*001 WILL MULT VMAXflVMIN, AND WMAX DE6FN6410 CLA •DE6F*0509 MINIMUM H ALLOWED tCAN=0) DE6FN642(! LRS 0 SET SIGNS PLUS DE6FN643M TLQ DE6F+0438 H/2 LESS THAN. H MlNe DE6FN6440 CLA 4 NEW VALUES DUE1 TO CHANGE IN H DE6FN654Q TIX DE6FN655n TRA •DE-6F + 0030 RETURN TO RUNGE- KUTTA DE6FN656JJ •DE6F*0519- •H = DELTA(T) DE6FN6570 FAD )DE6F*0519 DE6FN6S8fl_, ;STO COMMON*000 2H DE6FN6S9 -SSP DE6FN660tH LDQ DE6F<-0510 MAXIMUM H ALLOWED DE6FN6610 TLQ •DE6F*0452 2H GREATER THAN H MAX, DE6FN662(7' LDQ •DE6F*0512' .10 TO <-l-S)/OH 'SQUARED)* VMIN DE6FN663U CLA DE6F*0522. V°MAX(DELTA VIIVY DE6FN664Q

'J

S-104 DE6FN-34 PHILCQ WDL DIVISIONn WDL-TR2184 3 ^""\ \ j "<-, ^ 3,E6FN- (Cont'd) '' TLQ 'DDE6F+045i 2 V QR» THAN V MIN CLS: DDE6F+052l 3 002.0 DIVIDES BY 2 ;SOUARED DE6FN66< 3 ;STO.::COMMON*00C 1 DECREASES VMlNp WMAX, VMAX DE6PN66' •CLA.-DDE6F+051I 4 .2 LO TO (-1«-S)/(H -SQUARED)" NMAX DE6FN66 LDQ' DDE6F+0521 WaMAX (DELTA 'VID/Y DE6FN66S TLQ '•DE6D F + 0429' W LESS THAN hi MAX, (SET H»2H) DE6FN671 •TRA 11.4- RETURN TO PROGRAM- DE6FN67? TSX ''DE6D F + 0455,2 FORM LARGEST 'V AND W DE6PN67J TRA 'DDE6F+033i 9 DE6FN67; • PI * j n 'UL" UDE6F*050l SUB TO FORM iMAX V AND W FOR 1ST N-B EONS, DE6FN67<| *2 •-sFIXED iH INTEGRATION » - , . j TMI 1 DE6FN69! •CLA -D•DE6F*07I U Y DE6FN67) SSP SET Y'PLUS DE6PN67' ".LD"Q -DDE6F+0511 A'HMIN. Y1.ALLOWED DE6FN67I '~} {. 1 TLQ DDE6F+046. 2 TR IF 'Y GREATER-THAN. Y MIN, DE6FN67' !,] STQ 'DDE6F+071l 1 'OTHERWISE, -SET YeY'MIN,sA DE6FN68I -SXD CCOMMON*002*1 DE6FN68! H .LXA DDE6F*0532*1 DE6FN68! .COMMON*022,1 kJ 'CLA .C DELTA 'VI (OR DELTA V) DE6FN68! FDP DDE6F*07U, Y COR Y MIN) DE6FN68' '"'i • CLA DE6F+0523,D ! MAX," WCOR- V) THIS, FAR- DE6FN68! i LRS 0 SET SIGNS. PLUS DE6FN68< :_ j •TLQ!'DDE6F+0470 NEW W (OR V) 'IS -SMALLER DE6FN68! ' .STQ-DDE6F*0523pl NEW' MAX, W (OR V) DE6FN68I ' X ! TIX DDE6F*0464>1,1 LOOP. FOR V DE6FN68(

J LXD CCOMMON*002pl DE6FN69I •TRA 1lp-21 DE6FN69: ._. rSTQl.CCOMMON*000 LST .SIQ>. (PREC, AND 1/2) DE6FN69! ' ( FAD CCOMMON*003 MOST :SIQ. DE6FN69! _J .STO:'CCOMMON*003 DE6FN69* : .STQ CCOMMON*001 DE6FN69! i CLA CCOMMON*000 DE6FN69I LJ TAD ,CCOMMON*001 DE6FN69! FAD cCOMMON*004 DE6PN69I Fl :STO.'CCOMMON*004 ' LST, SIG, DE6FN69< ;. 1 .TRA .1.21 . DE6FN70( UFA CCOMMON*003 ,ADDS AC TO.'OOM*3* COM*4 DE6FN70! :"3 • STO- COMMON*00C 3 AND STORES ANSWER'IN DE6FN70J .STQ' CCOMMON*000 ';r J'* DE6FN70: .CLA- CCOMMON*000 •DE6FN70- 'UFA 'CCOMMON*004 DE6FN70? FAD CCOMMON*003 DE6FN70< 0 -STO- CCOMMON*003 .MOST .SIG', •IN'-OOMMON*3 DE6FN70! STQ-.CCOMMON*004 LST, ..SIQ-. 'IN :OOMMON*4 DE6FN70I •TRA 1 2 DE6FN70< CLA-DDE6F+05Q7 DOUBLE PRECISION FAD DE6FN71I •UFA'iCCOMMON*003 DE6PN71: • J .STO -CCOMMON*001 DE6PN71! I ,STQ CCOMMON*000 I DE6PN71! .CLA- cCOMMON*000 DE6FN71i iUFA DDE6F- + 0508 DE6FN71!

S-105 DE6FN-3

ipHBLCQ \A/DL DBVQSOON WDL-TR2184 '^ DE6FN (Cont'd) 0 UFA COMMON*004 DE6FN7160- FAD COMMON*OOI DE6FN7170; 'TRA 1,2 DE6FN71BOLJ BSS 1 SWITCH (PROGRAMMER CHANGES) (0 = NQRMAl'> DE6FN7190 BSS 1 FIXED H STORAGE («=FIXED STEP SIZE) DE6FN720ffn BSS 1 COUNTER FOR CHANGE OF' COORD,, :BSS 1 *eR.K, STEP,=sOOWELL STEP DE6FN7220 'BSS 1 SAVE INDEX REG, FOR* (IR1) BSS 1 COWELL METHOD (IR2) DE6FN7a»oL BSS (IR4) DE6FN7250 BSS 1ST NO,(MOST -SIQ.) DE6FN7260 BSS 1 1ST NO, (1ST, SIG',) DE6FN7270H BSS 1 H (ABS, VALUE) PROG, SPEC', BSS 1 HMAX (IF Haflp :SE!T HMAXs 1E18 DE6FN7290 BSS 1 A»MIN, Y ALLOWED FOR TEST DE6FN7300~J BSS 1 10 TO C-1-S)/(H. SQUARED)»VMIN DE6FN73tC(' !j BSS 1 10 TO <3-S)/(H :SQUARED)«VMAX DE6FN7320'~ BSS 1 10 TO' C»1»S)/(H SQUARED)RWMAX DE6FN7330-, BSS 1 R(I)sCURR£NT RIsRi( = l)l IN DECR, DE6FN7340'- BSS 1 RsTOTAL ITERATIONS 'PER D(T) DE6FN7350v:J BSS 1 R (FLOATING PT,) (ABOVEeFIXED PTe) DE6FN7360 BSS 1 0(1)8 (COUNTER -R.K. LOOPS) DE6FN737o":! • BSS 1 HsDELTA(T)=CURRENT D(T) DE6FN7380J • BSS 1 DELTA (T) SQUARED DE6FN7390 BSS 1 W = MAX ('DELTA VID/Y DE6FN740C;~] BSS 1 V«MAX(DELTA VI)'/Y DE6FN7410, I 'OCT '002000000000 MULT, BY 2 SQUARED (OR DIVIDE') DE6FN7420" •OCT 233000000000 NO TO FLOAT FIXED PT NO, DE6FN7430.-., 'DEC 1E18 ;IF HBO, SET ,HMAX = 1E18 DE6FN744Q •DEC 0 2N E75. J •DEC 0 7N DE6FN7460 DEC 0 -8N DE6FN7470~j 'DEC 0 UN DE6FN748CJ 'DEC 0 iDUMMY=T*19N*3*(7) DE6FN7490 •DEC 1 1 DE6FN750Qr', •DEC 2 2 DE6FN751D' ) DEC 3 3 DE6FN7S20'" 'DEC 4 4 DE6FN75SO_ •DEC 5 5 DE6FN754C' | 'DEC 6 6 'DEC 7 7 DE6FN7560 DEC 8 8 DE6FN757CH 'DEC 9 9 • DEC 10 10 DE6FN7590 DEC' 11 11 DE6FN7600- DEC' 13 13 DE6FN76KJ 'DEC 1. DE6FN76201- •DEC-°8e --8. DE6FN7630 DEC =80333333333E»2 (SIGNS HAVE BEEN REVERSED) (CO) DE6FN764tT •DEC 0 'ClsO DE6FN7650- ;DEC + 4,166666667E—3 .'C2 DE6FN7660

S-I06 DE6FN-36

PHILCQ WDL DIVISIOJ n Li ,~ WDL-TR2184

LJDE6FN (Cont'd) n 'DEC 0 C3 DE6FN7&I 'DEC •--5-.125661376E-! 4 C4 DE6FN761 y 'DEC 0 C5 DE6FN76 •DEC •++7.964065256E-• 5 :C6 DE6FN7?( •DEC +1 ••5 (SIGNS HAVE BEE'N REVERSED) (DO) DE6FN77! DEC' +1 8333333333E 2 'Dl DE6FN77! •DEC-- 8166666667E 2 •D2 DE6FN77; •DEC •-: 8527777778E 2 'D3 DE6FN77: DEC •*: e638888889E 3 'D4 DE6FN77! •DEC •**3,l580688E-; 3 •D5 DE6FN77I DEC •--1.-5790344E-: 3 •D6 DE6FN771 •DEC -++6< 9549575617E 2 (NO CHANGE IN SIGNS) (N6) DE6FN77I •3 1 ~j •DEC + ( 8820436508E 2 'N5 DE6FN77 -•DEC •+:7.134589948E 2 N4 DE6FN78i r-| DEC +i 0,075 N3 DE6FN78! yj DEC • ++7 ' 6916666667E 2 N2 DE6FN78I n F f1 < . A i U E. w +8™ ' 8333333333E 2 'Nl DE6FN781 DEC ••+! 8333333333E 2 NO DE6FN78< ' •! -DEC---;2»708608907E 3 B6 DE6FN78! u^J : •DEC -;38141534392E 3 B5 DE6FN78' k ! • DEC' -;3e6541D0529E •3

1 !. •DEC -;2.638888889E 2 ;B3 DOT 'DE6FN79! DEC-'-'4.166666667E 2: B2 DOT DE6FN79I 1 88'333333333E 2 81 DOT :DEC --i DE6FN79 n DEC' • + '005 '-BO DOT DE6FN79I d iDEC-. .:304224S37 (NO 'CHANGE IN iiSIQNS) (N6. DOT) DE6FN79< DEC. ,:315591931 N5 'DOT DE6FN8QI * -i •DEC' ,;329861111 J •STO DDE6F*07.1l 1 CH SQ)/2 DE6FNB1* FDP DDE6F*072I 0 4, DE6FN815

S-107 DE6FN-37

JPHILCQ WDL DDVISBON WDL-TR2184/

DE6FM (Cont'd) li STO DE6F + 0712. (H SQ)/8 DE6FN8180 •CIA DE6F+0713 H DE6FN819Q FDP DE6F+0722 DE6FN8200 ,STO DE6F+0716 H/6 DE6FN8210 LXA DE6F+0710,! N DE6FN8220n ;'CLA 0,1 SAVE YI STO 0,1 (T+4N*3)sYI PRIME> MOST SIG, DE6FN8260H TIX DE6F+0604,!,! LXA DE6F+0723,! DE6FN8a80 • SXD-'DE6F*0724»1 ,LXA DE6F+0710,6 N TO JR2 AND IR4 DE6FN8300U TXL DE6F+0629*1,1 TR IF KBI DE6FN8310 TXL-'DE6F*0649,1,2 TR 'IF K82 DE6FN8320[ TXL 'DE6F+0629,1,3 TR IF K«3 DE6FN8330T .LXA DE6F+0710,2 Ks4 (N TO IR4) DE6FN8340'' • CLA 0,2- T+3N*3*F(X,Y,Y 'PRIME) DE6FN8350,.- : FAD 0,2 T*6N*3sCUMe D(YN) PRIME DE6FN8360 - •STO 0,2 T*6N*3sNEW -D(YN) PRIME TIX DE6F+0616,2,1 DE6FN8380 TXH"DE6F+0669,1,3 OUT IF' Ks4 DE6FN8390i] TIX DE6F + 0615,U1 ADD 2F(X,'Y,PRIME) IF DE6FN8400CJ LXD DE6F*0724,1 K DE6FN841Q TXH DE6F'+0626»1,2 TR IF «83 DE6FN8420 CLA DE6F+0717 TEST MISSINQ IST'DERIV, IN F' DE6FN8430 TMI DE6F+0628 *«F(X,Y,Y PRIME) DE6FN8440 TSX 0,4 V (TR OUT FOR F(X,Y,Y PRIME) DE6FN8450 _ LXD DE6F+0724,! DE6FN8460' ' : TXI DE6F*0610,1*1 INCREASE K :BY 1 DE6FN8470 ^- XLA o T+ls DE6FN8480 FAD' DE6F»0714 H/2 DE6FN849ori STO COMMON*000 T + H/2 (MOST SIG.) DE6FN8500LJ STO COMMON-001 LST, SIG', DE6FN8310 •CLA COMMON*OOI DE6FN8520 T\ FAD DE6F*0718 CUM. LST, 'SIG. DE6FN8530 fl FAD COMMON-OOO DE6FN8S40 ~! -STO"DE6F*07i8- SAVE UST, ;SIQ,.FOR NEXT INTEGRATION DE6FN8S50 .„, STO 0 T*le(T*H/2) DE6FN856Q |; TIX -DE6F*0639>lil IRls.1 IF KH« IR1 = 2 IF K«3 DE6FN8S70 fl: LDQ DE6F*0713»1 (H SQ)/8 OR (Hi SQ)/2 (K=l,3) DE6FN8380 FMP 0,2 T*3N*3«F'Y -PRIME) DE6FN8§90r" • STO1 COMMON*000 DE6FN8600 LDO 'DE6F*0715',1 (H/2) .OR <'H) Kal OR 3 DE6FN8610 FMP 0,2 T*4N*3SYN PRIME'(M.S.) DE6FN86eon FAD .COMMON*000 (H SQ)/8 X F(X,'Y OR (T*H) DE6FN8650 TIX DE6F*0639,2,1 N 'WAS IN IR2' DE6FN8660 LXD DE6F*0724.,1 'RESTORE :« TO' 1 OR 3 DE6FN8670 • CLA DE6F*0717 TEST MISSING 1ST >DERIV, IN F DE6FN8680

S-108 DE6FN - 31J

PHILCQ WDL DIVISION WDL-TR2184

(Cont'd) TMI DE6F+0656 »=F(X,Y), +sF(X,Y,Y PRIME) DE6FN86 LDQ DE6F+0716,! H/2 OR H DE6FN87 FMP 0,4 T*3N*3=F(X,Y,Y -PRIME) DE6FN87 FAD 0,4 T*4N*3=YN PRIME (M.S.) DE6FN87 STO 0,4 T*2N*3=NEW Y PRIME DE6FN87 Q TIX DE6F+Q65l,4,l DE6FN87 LXA DE6F+0710.2 N DE6FN87 TXL DE6F+0664,!,! TR TO STORE IF K=l DE6FN87 CLA 0,2 T+3N+3=F(X»Y,Y PRIME) DE6FN87 FAD 0,2 T*7N*3=CUM.DELTA(YN) DE6FN87 STO 0,2 T*7N*3 DE6FN87 TIX DE6F+0658,2,1 DE6FN88 TXL DE6F+06t5>1,2 TR IF Ks2 (CONNOTsl) DE6FN88 TXI DE6F+0615.1,-! REDUCE K FROM 3 TO 2 DE6FN88 n CLA 0,2 T*3N*3=F(X»YpY -PRIME) DE6FN88 STO 0,2 T*6N*3=STORE FOR D(YN)PRIME' DE6FN88 STO 0,2 T*7N*3«STORE FQR D(YN) DE6FN88 TIX DE6F+0664,2,1 N WAS IN IR2 DE6FN88 TRA DE6F+0626 TR FOR K=2 DE6FN88 LXA DE6F*0717,4 2N DE6FN88 LXA DE6F+0710,2 N DE6FN88 LDQ DE6F+0716 H/6 DE6FN89 FMP '0,4 T*7N*3=D(YN)P AND D(YN) DE6FN89 • STQ COMMON*002 DE6FN89 •UFA 0,,2 T*4N*3 = YN PRIME- (M..S. > DE6FN89 STO COMMQN*QOO DE6FN89 STQ COMMON*OQ1 DE6FN89 CLA COMMON*001 DE6FN89 UFA 0.2 T+5N*3=YN PRIME (LSI. SIG.) DE6FN89 •UFA COMMON*Q02 DE6FN89 FAD -COMMON*000 DE6FN89 STO 0,4 T*3N*3s(YN)P AND (YN) (M.S.) DE6FN90 STQ 0,4 T*7N*35

IPHILCQ WDL DIVISION DE6FN (Cont'd)

TJX DE6F+0687,2,1 DE6FN920Q TSX 0,4 V (FORM 2ND DERIV.) DE6FN9210 LXD DE6F+0709,4 DE6FN9220 LXD DE6F+0707,! DE6FN9230 LXD DE6F+0708,2 DE6FN9240 TRA 1,4 LEAVE SUB, FROM 2ND ENTRY DE6FN9250 PZE 2,0.0 IR1 SAVED IN DECR. DE6FN9260 BSS 11 DE6FN9270 DEC 2. 2. DE6FN9280 DEC 4. 4. DE6FN9290 DEC 8. 8, DE6FN9300 DEC 6, 6. DE6FN9310 DEC 1 1 DE6FN9320 BSS 1 K»l(*l)4 DE6FN9330 SXD R.K, SET UP ENTRY DE6FN934Q SXD DE6FN9350 SXD DE6F+0709,4 DE6FN9360 STZ DE6F+0718 CLEAR .LST. SIQ. OF T DE6FN9370 CLA 1,4 T,0,V DE6FN9380 STA DE6F+0708 T«ADDRESS DE6FN9390 STO DE6F+0717 •«F(X»Y), *8F(X,Y,Y PRIME) DE6FN9400 STA DE6F+0737 DE6FN9410 ARS 18 V TO ADDR, DE6FN9420 STA DE6F+0796 DE6FN9430 STA DE6F*0702 DE6FN944Q STA DE6F+0626 DE6FN9450 CLA (T)sN DE6FN9460 STO DE6F+0710 DE6FN9470 'CAL DE6F+0708 T DE6FN9480 ADD DE6F*0723 1 DE6FN9490 DE6FN9500 STA DE6F+0629 DE6FN9510 STA DE6F+0637 DE6FN9920 ADD 'DE6F + 0723 1 DE6FN9530 • STA DE6F+0591 T*2 DE6FN9340 ADD DE6F+0723 1 DE6FN9350 .ADM DE6F+0710 N DE6FN956Q :STA DE6F + 0604 T*N*3»YI (STARTS AT T*3> DE6FN9570 STA DE6F+0697 T*N+3nYI DE6FN9980 STA DE6F*0646 T*N*3 DE6FN9390 ADM DE6F+0710 N DE6FN9600 :STA DE6F*0606 T*2N*3=YI PRIME (STARTS T*N*3) DE6FN9610 .STA DE6F*0654 DE6FN9620 ADM 'DE6F + 0710 N DE6FN9630 STA 'DE6F*Q616 T*3N*3a2ND 'DERIV. DE6FN9640 STA DE6F+0681 DE6FN965Q .STA DE6F4.Q640 T*3N*3 DE6FN9660 STA DE6F+0692 T*3N*3 DE6FN9670 STA DE6F+0658 T*3N*3 DE6FN9680 STA DE6F+0664 DE6FN9690 STA DE6F*0688 T*3N*3 DE6FN9700

S-110 DE6FN-40

PHILCQ WDL DIVISION WDL-TR2184 - DE6FN CGont'd)

'DE6F*0710 N DE6FN9710 .•STA T*4N*3 DE6FN9720 DE6FN9730 ;STA' .DE6F*0607 DE6FN9740 .STA DE6F*0643 T*4N*3 DE6FN9790 •STA, iDE6F*0674 T*4N*3 DE6FN9760 .ADM iDE6F*0710 N DE6FN9770 •STA •DE6F*0793 T*5N*3 DE6FN978Q .STA 'DE6F*0700 DE6FN979Q :STA DE6F*0678 DE6FN9800 .ADM !DE6F*0710 N DE6FN9810 •STA DE6F*0617 T*6N*3 DE6FN9820 :STA DE6F*0618 •DE6PN9830 STA DE6F*0665 DE6FN9840 ;STA DE6F+0699 T*6N*3 DE6FN98BO -ADM DE6F*0710 N DE6FN9860 .STA' •DE6F*0660 T*7N*3 DE6FN987Q -STA 'DE6F*0672, DE6FN988Q ;STA DE6F*0699 DE6FN989Q ! .'STA- DE6F*0666 DE6FN9900 .STA- DE6F*0682 T*7N*3 DE6FN9910 ADM DE6F*07iO uN DE6FN9920 ;STA DE6F*0605 T*8N*3 DE6FN9950 ;STA DE6F*0645 DE6FN9940 iSTA. •DE6F*0690 DE6FN9950 .ADM 'DE6F*0710 N DE6FN9960 :STA.- •DE6F*0694. T*9N*3 DE6FN9970 :STA DE6F*0698 T*9N*3 DE6FN9980 ,STA DE6F*0794 DE6FN9990

0

S-lll DE6FN-41

IPHILCQ WDL DIVISION WDL-TR2184

DE6FN (Cont'd) :CAL 'DE6F*0710 N DE6FN10QOO 'PAX 0,1 N TO IR1 DE6FN10010 -ADM 'DE6F*0710 •N DE6FN10020 ;STA DE6F*0717 2N TO ADDRe OF^ SAVE-^10 DE6FN10030 STZ 0,1 T*5N*3 (CLEAR' Y PRIMEiL'.S.) DE6FN10040 .STZ 0,1 T*9N*3 (CLEAR y LST, SIQ«> DE6FN10Q50 TIX DE6F*0793,1* DE6FN10060 TSX 0,4 V (FORM '-2ND»DERIV. ) DE6FN10Q70 .LXD 'DE6F*0709»4- RESTORE IRC> DE6FN10080 TXI >DE6F*0704V4, TRA :8r4-TROM- HERE DE6FN10090 SXD DE6F*0504,1 COWELL' SETUP DE6FN101DO -SXD DE6F*0505i2 DE6FN10UO :SXD •DE6F*0506,4 DE6FN10120 CLA 1,4 T.O,V DE6FN10130 • STO DE6F*0805 FIX RUNQE KUTTA (1ST ENTRY) DE6FN1014Q TSX DE6F*0587,4 TR TO SET UP RUNQE KUTTA DE6FN10150 •PZE T»0,V DE6FN10160 .LXD •DE6F*0506>4 RESTORE IR4 AFTER' R.Ke ! DE6FN10170 CAL DE6F*0702 DE6FNI10180 STA DE6F*0107 DE6FN10190 • STA DE6F*0230 DE6FN10200 .STA DE6F*0271 DE6FN102IO :CAL DE6F*0717 '2N DE6FN10220 >STA DE6F-*0526 DE6FN10230 •ADM DE6F*0645 T*8N*3 DE6FN102i«0 ,STA DE6F*Q134 < 7N> DE6FN10250 .STA •DE6F*0066 DE6FN10260 STA DE6F*033l DE6FN10270 ..r ADM DE6F*0710 DE6FNI10280 • STA DE6F*0103 DE6FN10290 ,STA- DE6F*0111 DE6FN10300 ;STA DE6F*0146 T*4N*8 + t' DE6FN10310 •STA DE6F*0068 T*11N*3. DE6FN10320 STA DE6F»032l DE6FN10330 .CAL DE6F*0794 T*9N*3 DE6FN103<40 ;STA DE6F*02B7 DE6FN10350 CAL •DE6F*0700 DE6FN10360 .STA •DE6F*0268. DE6FN10370 CAL 'DE6F*'068l: T*3N*3 DE6FN10380 ;STA DE6F*0049 DE6FN10390 .STA DE6F->0110 DE6FN10400 :STA •DE6F*0239 DE6FN10410 STA- DE6F*0282. DE6FN10420 'CAL DE6F*0606 DE6FN10430 >STA DE6F*0067 DE6FN10440 STA DE6F*0104. DE6FN10450 STA DE6F*0223 DE6FN10460 STA 'DE6F->0265 T*2N*3 DE6FN10470 :CAL DE6F*0697 DE6FN10480 ,STA •DE6F*0065 DE6FN10490 ,STA 'DE6F*0102: DE6FN10500

S-112 DE6FN-42

PHILCQ WDL DIVISION WDL-TR2184

o DK6FN-(Cont'd) STA DE6F+0129 DE6FN105 STA DE6F+0213 DE6FN105 STA DE6F+0254 DE6FN103 STA DE6F+0340 T + N + 3 DE6FN109 CAL DE6F+0629 T + l DE6FN109 STA DE6F+0093 DE6FN105 STA DE6F+0094 DE6FN105 STA DE6F+0097 DE6FN103 STA DE6F+0099 DE6FN105 STA DE6F+0193 DE6FN106 STA DE6F+0200 T*l DE6FN106 CAL DE6F*0&91 DE6FM106 STA DE6F+0032 DE6FN106 iil STA DE6F*0091 DE6FN106 STA DE6F+0923 DE6FN106 STA DE6F*0098 DE6FN106 STA DE6F+0115 DE6FN106 STA DE6F+0192 T + 2 DE6FN106 LDO DE6F+0538 8 DE6FM106 MPY DE6F*0710 N DE6FN107 STQ DE6F*0528 8N DE6FN107 CAL DE6F*0528 u 8N DE6FN107 SBM DE6F+0710 N DE6FN107 STA DE6F*0527 7N 'DE6FN107 ADM DE6F+0536 2N DE6FN107 ADM DE6F*0526 2N DE6FN107 STA DE6F*0529 UN DE6FN107 ADM DE6F+0672 T*7N*3 HE6FN107 STA DE6F*Oc)50 T*18N*3sT*llN*3+(7N) DE6FN107 STA DE6F+C317 DE6FN108 ADM DE6F*0710 N DE6FN108 STA DE6F*0101 T*19N*3«sT*llN*3*(8N) DE6FN108 ADM DE6F+0537 7 DE6FN108 STA DE6F+0530 DE6FN108 CAL DE6F+0101 T*19N*3 DE6FN108 ADM DE6F*0529 UN DE6FN108 STA DE6F*0178 T+30N*3eT*19N*3+(llN) DE6FN108 STA DE6F+0234 DE6FN108 STA DE6F+0278 DE6FN108 STA DE6F+0309 T*30N*3 DE6FN109 ADM DE6F+0537 7 DE6FN109, STA DE6F+0210 DE6FN109 ADM DE6F+0532 DE6FNl09i STA DE6F*0220 DE6FN109 CAL DE6F+0317 7*18N*3 DE6FN109 SBM DE6F*0526 2N DE6FM109! STA DE6F+0149 T*16N+3 DE6FN109! SBM DE6F*0710 N DE6FN109; STA DE6F+0138 T*15N*3 DE6FN10.9: LXA DE6F+0710,! DE6FN11D: SXD DE6F+0389.1 N TO DECR, DE6FN110:

S-113 DE6FN-43

t ipHILCQ WDL DIVISION WDL-TR2184 o PE6FN (Cont'd)

CLA 2,4 PZEsVAR, STEP -SIZE (B,OpR) DE6FN11020 STO DE6F*0501 MZEsFIXED STEP SIZE DE6FN11030 STZ COMMON*000 DE6FN1104Q STA COMMON*000 B (B LESS THAN (OR- =N> DE6FN11050 .STZ DE6F*0516 DE6FN11060 ;STD DE6F*0516 RaTOTAL RcK. LOOPS 'PER D(T) DE6FN11Q70 CLA DE6F*0516 DE6FN11080 ARS 18 DE6FN11090 TNZ DE6F+0903 DE6FN1HOO LXA DE6F*0534,1 DE6FN1H10 •SXD DE6F*0516,1 IF RsQ9 SET Ro4 DE6FN11120 ;CLA DE-6F*0534- 4 DE6FN11130 ADD DE6F*0524 233000000000 DE6FN11140 FAD DE6F*0571 FLOAT FIXED PT= NOS DE6FN11150 STO DE6F*0517 R IN FLOATING- PTo DE6FN1H60 CLA COMMON*000 TEST 8=0 DE6FNllt70 TNZ DE6F*0910 DE6FN11180 CLA DE6F*0710 IF B=0* SET BsN DE6FN11190 STA COMMON*000 N DE6FN11200 CAL DE6F*0710 N u DE6FN11210 SBM COMMON*000 B (OR N, IF BsQ) DE6FN11220 TPL DE6F*0914 PROGRAMMER GOOFEDp 'IFi MINUS DE6FN11230 ,CLM SET BaN IF B TOO LARGE (N«BsO) DE6FN11240 ALS 18 N-B TO 'DECRe DE6FN11250 • STD DE6F*0338 1ST B EONS, TESTED DE6FN11260 •STD DE6F*0312 N-B DE6FN11270 3,4 S DE6FN11280 TNZ DE6F+0920 IF .SBC, SET 8^9 DE6FN11290 CLA DE6F*0954 1E-9 DE6FN11300 ;STO •COMMON*000 S (SEE VMrN»VMAX,WMAX, DE6FN11310 STZ DE6F*0503. *»R0K0, --BOOWELL DE6FN11320 STZ •DE6F*0709 *clST R.K, INTEGRATION. ==2ND, ETC9 DE6FN11330 .CLA T*2=DELTA(T)sH DE6FN11340 STO DE6F*0519 DE6FN113BO :CLA 6p4 A=MIN= Y ALLOWED DE6FN11360 TNZ -DE6F*0928 DE6FN11370 :CLA DE6F*0543 1, (IF ABO, SET ABI.) DE6FN11380 •STO •DE6F*0511 DE6FN11390 •CLA 4,4 MINIMUM' H ALLOWED ( FLOATING' PT , ) DE6FN11400 ,SSP DE6FN11410 ,STO DE6F*0509 DE6FN11420 .'CLA 5,4 MAXIMUM H ALLOWED (FLOATING' PT,) DE6FN11430 • SSP DE6FN11A40 TNZ DE6F*0936 IF HBO, SET HMAXs 1E18 DE6FN11450 .CLA DE6F*0525 1E18 DE6FN11460 •STO DE6F*0510 DE6FN11470 LDO DE6F*0519 DELTA(T)«H DE6FN11480 FMP DE6F*0519 DE6FN1149Q STO DE6F*0520 H SQ, DE6FN11500 CLA COMMON*000 1E-S DE6FN11510 FDP DE6F*0520 H 'SO, DE6FN11520

S-114 DE6FK=44

PHILCQ WDL DIVISION WDL-TR2184

DE6FN (Cont'dj

FMP DE6F+0952 .1 STO DE6F+0512. VMIN =(10)**(-1-S)/H SO, DE6FNlig STO DE6F+0514- WMAX UL6I-N11S FDP DE6F*0953 1E-4 •STQ DE6F+0513 VMAX={10)**(3-S)/H SO, DE6FN115 STZ 'DE6F*0500 SWITCH (PROGRAMMER SETS NON/ZERO) DE6FN115 CLA DE6F+0538 8 (SET UP COUNTER IN- CASE DE6FN11S STO DE6F*0502 OF, CHANGE -IN COORD,) DE6FN116 LXD DE6F+0506,4 RETURN TO PROGRAMMER, (1ST ENTRY)

DEC 1E-4 .0001ME-4 E6FNU6 'DEC 1E-9 1E-9 (IF S=0) BREAK EQU * & * DE6FN1U

•-•~t

s"115 WDL Page Intentionally Left Blank WDL-TR2184

Functions DOT

Purpose; To find the dot product of two three-dimensional vectors.

Calling Sequence; Z = DOT (X. Y) •3 Input and Output

Symbolic Data Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

. J I X 3 First input vector

I Y 3 Second input vector

0 Z Z = X(1)Y(1)+X(2)Y(2)+X(3)Y(3),

J

Common storages used or required: None '

Subroutines required: None

Functions required: None

Approximate number of storages required:

S-117 DOT - 1

WDL DIV5S8ON WDL-TR2184

DOT

* LABEL DOTO * SYMBOL TABLE DOTO FUNCTION DOT(X,Y) DOTOOOO' DIMENSION X(3)»Y(3> DOT0010 DOT = X(1)*Y(1) * X<2)*Y<2) + X(3)*Y(3) DOTOOSflO RETURN DOT0030U END DOTO

3

'.

Q 0

S-118 DOT-2-V.

PHILCQ V^DL DIVISION WDL-TR2184

Subroutine: EARTR

Purposet Subroutine EARTR determines which tracking stations can observe the vehicle at the time EARTR is called. The subroutine then updates the state covariance matrix for the types of observations being performed by the tracking station. The possible types of observations are: range, range rate, azimuth- elevation, and direction cosines. The measurements may be corrupted by the following types of errors: random, bias, time bias, and station location errors. The subroutine input and output quantities are in common storage.

Calling Sequence; CALL EARTR

Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I Quantities obtained from common 0 Quantities placed in common

Common storages used or required: T. S. C. 1C 0 CORRTP, DOT, GHA, INTRI. MATRX, Subroutines required: NUTAIT, SETN, TRAC, TRANSH ARKTNS, ATAN, COS, Functions required: FNORM. SQRT. SIN Approximate number of storages required: 1530

S-119 EARTR - 1

PHBLCQ WDL DIVISION WDL-TR2184 I):

EARTR Partial Derivatives

To perform the covariance matrix updating for earth based tracking observations, a number of partial derivatives are required. The updating of the covaniance matrix for observations requires the partial derivatives relating the types of measurements and the vehicle state. The evaluation of the errors in the measurements due to station location errors and time bias requires the partials which relate the measurements and the station latitude, longitude, altitude, and time.

The following quantities and relationships are used in the derivations of the various partials. Four important vectors are obtained by calling />> /\ /* subroutine TRAC. Three unit vectors, U, E, N, which form a topocentric orthognal coordinate system and the vector XL, are obtained from the center of the earth to tracker.

The unit vectors are the up, east, and north vectors. These vectors may be written as follows:

Ul = cos(LAT) cos(LON) LON = m(t + t ) + LON'

U = cos(LAT) sin(LON) LON1 = STATION LONGITUDE

U3 = sin(LAT) m = EARTH'S ROTATION RATE

tut 0 = GREENWICH'S LONGITUDE AT EI = -sin(LON) EPOCH

E2 = cos(LON)

E, = 0

NL = -sin(LAT) cos(LON)

N2 = -sin(LAT) sin(LON)

N3 = cos(LAT)

S-120 EARTR - 2

PHILCQ WDI_ DIVISION, WDL-TR2184

-

R [- R2 I 1/2 YT = C ~C * *D U2 C = coa2(LAT> + ~2 "^(^T)!

H* -r C ^ + H) U_ R_ - EQUATORIAL RADIUS T v RK_lE(/ X o Ci Rp = POLAR RADIUS

The vehicle's position, X. , and velocity, X , are obtained from common storage.

'X \ / X V\ - / V Xv - {\ Yv I| Xv - y Yv *J X

_J The tracking station velocity is obtained by differentiating X_.

,

F *\ U, 1 A_,--UIV-T: ^. ^~ + Hs) cos(LAT) sin(LON) RE ^ ,i YT -g + Hj cos(LAT) cos(LON)

S-121 EARTR - 3

'PHILCQ WDL DBVBSION WDL-TR2184

The vector from the tracking station to vehicle may then be written as

3x1 3x1 3x1

A relationship which will be used in the derivations is

SPAR dPAR OX dxv

The FORTRAN program names for the above vectors are as follows:

FORTRAN DERIVATION NAME DIMENSION NAME DIMENSION

U (3) U (3)

E (3) E (3)

EN (3) N (3)

X (3) Xv (3) RT (3) XT (3)

Y (3) x = xv - x,. (3) A CD RE (1) B (1) RP (1) RAT (1) |x| (1)

XD X A A_ (3) — V tT — YT* (3)

S-122 EARTR - 4

PHILCO WDL DIVISION WDL-TR2184

The quantities being measured are the following:

R = RANGE • |x| - (X«X)

X-X R = RANGE RATE e 4r |x| _ QC K

AZ = tan < ^Hr EL = 8ln-i J3LS1 l X.N K

Below is a list of partial derivatives which'will be "used in the applica- tion of the chain rule for partial derivatives.

= 0 = N dLAT

= N "SLAT dLAT

e SLAT N SLAT » 0 j cos(LAT) sin(LON) -cos(LON) LON

0 cos(LAT) cos(LON) -sin(LON)

du3 0 dLON

dALT dALT

9E 2 = 0 dALT Su 3 = 0 dALT

S-123 EARTR - 5

iPHILCQ WDL DIVISION V

WDL-TR2184 n Ll dN du -tu sln(LON) cos(LAT) 3

A. -u U) cos(LON) cos(LAT) 0LAT du ;• 3 -u dLAT

dN, = sin(LAT) sin(LON) 3T~ = -OJ cos(LON) dE, 2 = -sin(LAT) cos(LON) •57 — = -U) sin(LON)

dN. = 0 = 0 dLON

dN, dN dT U) sin(LAT) sin(LON)

dN dN -U) sin(LAT) cos(LON) dALT

dN

FORTRAN 3x3 matrix called DRT

1 5LON

2 DRT dLON

Sx3 dLAT dLON

3x3 3x3

S-124 EARTR - 6

PHILCQ WDL Dl VISION' J WDL-TR2184

DRT(l.l) = - - « ( -| + H) ain(LAT) cos(LON) + Uj -| n 2 c U dC = sin(LAT) cos(LAT) f. dLAT C V _R2 E

DRTC2.1) = - ^3L . u2 !| ^ + ( !| + H) sin(LAT) 8in(LON) C'

R2 R2 DRT(3,1) = - -^ = -( -^ + H) cos(LAT) + U3 -~ E REC

= -Ej_ ( -| + H) cog(LAT)

= -E ( ^| + H) cos(LAT)

DRT(3,2) = 0

DRT(1,3) = -IK

U DRT(2,3) n i ! DRT(3,3)

dX,JL «, _d _Jx_ = _(„(_, R£ dLAT dLAT V C

R COS

j dLAT = " dLAT

I s"125 EARTR - 7

IpHSLCQ WDL DIVISION WDL-TR2184 o:

«! dLON C " + COS(LAT) COS(L°N)

T +H C08(LAT) 8in ~dT~' ax ' dy dZ ^ v 1x6 1x6 0

(1) Derivation of partials for range measurement

1/2 R = (X-X)

R '- R '- R •- °0-» 00>- V V 1x6 1x6 1x6

S-126 EARTR - 8

PHILCQ NA/DL DIVISION, J .--> . --..) WDL-TR2184

(2) Derivation of partials for range rate measurement.

0 ; (x }; ( ; "RR ~ W \r dx\*r ^~^ R " DK2. i R " Di2\ V R

R2 ^V R ' R ' R

(3) Derivation of partials for azimuth measurement.

AZ-Tan f I ^ X-N

1

_. i -A *» ^ + Y2J" =

H.ra V ^=ii , ^T* J ~ \. o ~ O i &Z -r, OX ' C" q" Q" x v v ° ° °

E (N-X) E-X(N ) -^— -^_ ; 0; 0; 0

(4) Derivation of partials for elevation measurement.

r 2-1-1/2 ay 3PAl = L1 ' Y J 3p^

! S-127 EARTR - 9

IpHILCQ WDL DIVISION Q WDL-TR2184 a

R S o

CEL U-X) . 2 (U-X) R2S s - R2S

; 0; 0; o) R S

(5) Derivation of partials for direction cosines. The partials for the & and m direction cosines are obtained by combining the azimuth and elevation partials as follows:

m = cos(a..) = cosAZ cosEL

cos(a ) = sinAZ cosEL

PAR - cosAZ sinEL - sinAZ cosEL

- sinAZ sinEL + cosAZ cosEL

S-128 EARTR - 10

PHILCQ WDL DIVISION:,,) WDL-TR2184

-\ /K AZ H af — . zg )=( -cosA Z sinEL -sinAZ cosEL 'x ' m x^v P*Y / x 0^ V(\H "gE HT 1x6 1x6 1x2 ' 2x6

/ HAZ HfJl =v ("dx~ ;~ax^ y) =v T-sinAZ sinEL cosAZ cosEyL JV EL( u, 1x6 1x6 1x2 2x6

B. In order to include errors in the measurements being made due to station location errors and time bias, the partials of the measurements with respect to latitude, longitude, altitude, and time are required. In the program, the station location partials are used as a row vector with FORTRAN name SPART. SPART may be written as follows: »»« -

(1) Derivations of range measurement error partials

3 dxAv aR _ \ sR i dLAT ^JT dLAT

Similarily

?»D V^ ,i) DRT(i,2)

S"129 EARTR - 11

iPHILCQ WDL DIVISION - n WDL-TR2184 )

.1) HRTC1.3)

(2) Derivation of range rate measurement error partials,

oR i _j. oR i dLAT dxT dLAT oxT dLAT i=Zl * *

^ DRT<1'1> i=l Similarly

dR SLON *^ DRT<1«2> 1=1

HRR(l,i)DRT(i,3)+HRR(l,i+3)

SPART = - • _ . SPARTRR V ^LAT ' ^LON » ^ALT

(3) Derivation of azimuth measurement error partials. (=0) _ ^AZ i dLAT /_, ^xT ^LAT l

X (X.E)

S-130 EARTR - 12

PHILCQ W/DL DIVISION WDL-TR2184

J i X.(X.E) dN i) DRT(i.l) - 1 1 dLAT 1=I1 »«<- 0

X E dN V *AZ ° i + dAZ ° 1 + dAZ l LON l_, dlT dLON dTT dLON "dN? "dToN 1=1 * 1 X

i = 1,2,3 0

x dAZ V l - X dN SLoiT 1 HAz(l,i)DRT(i,2)+-f (X. i - -i| (X.E- -) 1=1 S s l

(=0) (=0)

X V dAZ ° 1 +^O=-+^^=- /_, "SIT dALT cJiT dfrwL/ dlT^^M^ 1=1 £ X £ ^

dAZ dALT DRT(i,3) 1=z1 », :J —1.-C&'&*!&)

(4) Derivation of elevation measurement error partials

dEL - "Ai .dEL °U1 dLAT I ± dLAT dU^ dLAT

dEL Xi i = 1,2,3

S-131 EARTR - 13

JPH8LCQ WDL DIVISION WDL-TR2184 a:

HEL(l.t)DRT(i.l)+T

. V |a J- |a i. /_, 0X7 OLON +auT OLON 1=1 X

X OU

1=1

(=0)

1=1

dEL T,Ano, SPARTA

(5) Derivation of direction cosine measurement error partials

SPARTm = Q-cosAZ sinEL - sinAZ cosELj I gpART

1x3 1x2 2x3

SPART. = Q-sinAZ sinEL cosAZ cosELj c PART

1x3 1x2 2x3

S-132 . 14

PHILCQ WDL DIVISION n o WDL-TR2184

(6) Derivations of time derivatives of measurement quantities to permit inclusion of time bias errors.

" R ' X.X

. "557

• . oAZ • y H (1,: E + N 0 l_) «Z i i

_>1 r\ TJ / 1 L-/ i bt?LT V * '

(7) The time partials for the .0 and m direction cosines are obtained by the following combination of azimuth and elevation partials.

= ( -cosAZ sinEL -sinAZ cosEL ) lr

1x1 1x2 2x1

3E -c- sinAZ sinEL cosAZ cosEL

1x1 1x2 2x1

S-133 EARTR - 15

1 ^PHBLCQ WDL DIVISBON WDL-TR2184

The errors in the measurements are computed in the following manner for station location errors and time bias.

'a2LAT 2 / QQS = CSPARTMEASy I CT LON ) Station Location Error cr2ALT 1x1 1x3 3x1

QQDOT { d^ • °TIME } Time Bias Error

The computation of the H matrices and the measurement errors are the primary computations in EARTR. These quantities are input to subroutine CORRTP which does the weighting of the measurement and updating of the state covariance matrix.

S-134 EARTR _ 16

RHILCQ WDL DIVISION, WDL-TR2184

b_ r~i H

•j

IS AZIMU FH IS OIRCC 3 NO f HE LEV ATIDN NO J?\ v ) - • MEASUREM SH.©— MEASUREMENT ~ -€ CONSIDERED T CONSIDER ED YES

-JL\y.

1 1 COMPUTE COMPUTE COMPUTE COMPUTE COMPUTE H MATRIX H MATRIX TRANSFORMATION TRANSFORMATION H MATRIX PARTIALS PARTIALS FROM AZ EL FROM AZ EL PARTIALS FOR AZ FOR EL TO M DIRCOS TO L OIRCOS FOR RR (M) <*> COMPUTE COMPUTE COMPUTE COMPUTE AZ VARIANCE 6L VARIANCE H MATRIX H MATRIX Q DUE TO STATION DUE TO STATION PARTIALS PARTIALS LOCATION ERRORS -OCATION ERRORS FOR M OIRCOS FOR L DIRCOS (M) $ COMPUTE COMPUTE TOTAL AZ TOTAL EL VARIANCE VARIANCE 1 \ COMPUTE COMPUTE TOTAL TOTAL 1 M DIRCOS L OIRCOS VARIANCE VARIANCE CALL TRANSH CALL TRANSH

| I WHAT TYPE OF WHAT TYPE OF MEASUREMENT MEASUREMENT CALL CALL is BEING MADE IS BEING MADE CORRTP CORRTP AZ EL OIRCOS AZ EL DIRCOS 1 _. ^ > ) © 1 <) 4 CALL. 1 CALL ) CORRTP | CORRTP L S-135 EARTR-17 JRHILCQ WDL DIVISION !~ WDL-TR2184 \ <

EARTR

* LA9EL EART ; * .SYMBOL TABLE EART •SUBROUTINE. EARTR EARTOQOO C -SUBROUTINE, .EARTR UPDATES THE COVARIANCC MATRIX USED EARTOOO C IN EARTH TRACKING • COMMON T,S,C,IC EART0010 •DIMENSION PO(-22).VE(22>*XED<3>,1VED('3),ANC3,i3)»RBOP<6),POSM(3), EART002CW lV09M<3)»POVRM(3)iEM<3*3)*ENC3),U<3)» E < 3) • RT ( 3 ) , Y (3 ) , TD (3 ) ,EART003M •2ISTAT(20)»H(6).X(3)»VX(3).T(1360').S(1000)»1C(1000>fIC'(l)»ISA(20), EART004UJ 3IM3TA<4,20)»P<6«6),SPARH3),'DRT(3/3)»XDt3>,SPART2<3),HA(6),HCOS<6 )EART005Q EQUIVALENCE (T,TDUK)« (SpSDUM), (GtfCDUM) EART006 l,(IC(3),NOR)«(C<13).TW),(C(14),TF)f CCt62).-PO').(C(84),VE) EART007t 2. tC(112),RBOP),(C(138),AN), ( C ( 120 ) , EM ) , ( C ( 15 ) » X ) , (C(18)»VX)EART008, 0 3(-S(70).DTS)»(S(71),STD)»(S(72)»DR).<-S(73)»'RD)f (1C(194),IST.AT) EART009fl 4.ClC(10)f ISA).(ICC30).IMSTA), (1C ( 214 ) . NOUT ) , ( C ( 652) , P ) EART010U 5t CC<649),TSECP),(C(30),TSEC)» OS ( 10 ) , W ) , (S (14) , A > , ( S ( 15) , 8 EART0110> " CALL SETN(NIN.NUTS) EARTOJ.15^ EART0121 • DISsl.ElO EART013c.'J u CALL INTR1 (TW,TFeNB,P Opl»VEpDIS) EART0140 :CALL MATRX(AN*X*XED*3,3»1*0) EART015H XALL MATRX(AN»VX»VED»3»3»1»0) EART016'J XEDsVECTOR FROM NB BODY TO VEHICLE', VEDsVELOCITY EQUATOR OP DATE' EART0170 •MSal r'] .IF(RBOP<1>-330000. )10*2»2 EART019! .RBQPo MAGNITUDE OF VECTOR FROM VEHICLE TO BODY EARTOSOb CONTINUE EART0210 IF (NOR-l)3*5p3 EART022' -CONTINUE -1 HERE IF OUTSIDE MOON AND NOT EARTH REFERENCED EART024Q DO -4- 1 = 1,3 EART025R 'POSM(I)sO, EART026(J VOSM(I)cO= EART0270 < •DO 4 -Jal,3 EART028(' :) EART029!-'! XED(I)=XED(I> AN(I, J)*PO(K) EART030V VED*AN(I, J)*(PO(L) PO(K) EART033U VOSM(I)BVOSM(I)*AN(I»J)+(VE(L> VE(K) EART0340 'POSM IS A VECTOR FROM EARTH TO MOON EART03SQ 1CONTINUE EART036[J .GO TO 7 EART0370 CONTINUE EARTOSBA^ IHERE IF OUTSIDE MOON AND EARTH' REFERENCED EART039 'DO 6 1 = 1,3 EART040V 'POSM(I)»0 EART0410 VOSM(I)sO EART042rj DO 6 g=l, 3 EART043U Ks20=J EART0440 POSM(I)BPOSM(I)*AN(I,J)*PO(K) EART045;"\

S-136 EARTR-18 PHILCQ WDL DIVISION WDL-TR2184

VI 1 EARTR (Cont'd) VOSM(I)sVOSM(I)*AN*VE EART04 '6 .CONTINUE EART04) '7 CONTINUE EART04 EART04 >DO 8 1 = 1,3 EART05 'POVRM(I)=XED-POSM(I) EART05 8 CONTINUE EART05 "RADMsFNORM(POVRM) EART05! -DO 9 1 = 1,3 EARTOS- 'POVRM(I>=POVRM(I)/RADM EARTOSi •9 'CONTINUE EART05( 10 -CONTINUE TIMEsTW*TF EARTOSf •CALL - NUTAIT < TIME, OM, CR, DT, EM*EBSIL ) v EARTOS' FSEC»DTS*TF EART06I •CALL GHA(FSEC,TW,GH,EM(2,1), OMEGA) EART06! GHaGH*DR EART06S 'NDUMs783 EART06S •NNsllO EART06. DO 53 111=1^20 EART06! EART06< NNsNN+15 EART06S IF(ISA(III» 53,53,11 EART06( 11 .CONTINUE EART06? ATsS(NN*9)+DR EART07t .QNsS(NN*10)*DR EART07J ,AL»S(NN*il) EART07? EART072 CALL TRAC(ON,AT,AL»GH,U»E,EN,RT,AC<,SL*CLkST,CT.A,B) EARTO?^ C TRAC OBTAINS UNIT VECTORS UP,EAST .AND NORTH, RTs VECTOR C TO TRACK STATION DO 12 Jsi,3 EART07? 'Y('J)=XED(J>-RT(J> EART076 C Y = VECTOR FROM TRACK STATION TO VEHICLE!. TDsUNIT VECTOR IN EART07* C .DIRECTION .OF- Y EART076 12 CONTINUE EART077 'RAT=FNORM(Y) EART07E DO 13 J=l,3 EART07? TD(J)=Y(J)/RAT EART03C 13 CONTINUE EART081 CEsDOK U.TD) EART08S DOT FORMS A DOT PRODUCT OF ELEMENTS IN PARENTHESES EART083 SEC=CE/SQRTF(1,«CE**2) .ELEVsATANFCSEC-) EART085 HORCORsS(NDUM) EART086 •S(NDUM) CONTAINS HORIZON CORRECTION FOR STATION ,IF(ELEV-HORCOR)22,14,14 EART088 14 .CONTINUE EART089 iHERE IF VEHICLE IS ABOVE STATION HORIZON EART090 GO TO (20,15),MS EART091 15 CONTINUE EART092

S-137 EARTR-19

JPHILCQ WDL DIVISION WDL=TR2184 f| ^ '> 1 : ir 1! EARTR (Cont'd) l-

C TO DETERMINE IF MOON OCCULTS VEHICLE EART09Bf] EART094M IF('DOTTD)19,19,16 EART0950 16 .CONTINUE EART096r| IF(DOTTD=(SQRTF(RADM**2 = 1739,**2) )/RADM),l9fil9,17 EART097y 17 WRITE OUTPUT -TAPE 'NUTS, 1B.:SNAME EART0980 18 FORMAT (27HOMOON OCCULTS VEHICLE FROM, A6»8H ' TRACKER) EART099fU • GO TO 22 EART1Q01 19 CONTINUE EARTlQlbJ 20 CONTINUE EART1020 :SECsDOT(TD.EN) EART108P) ,CEnDOT(TD*E) EART104U AZMTH sARKTNS(3600:SEC*CE) EART1050 IF(ISTAT(III»21,21,23 EART106f-i C ISTAT 'IS SET ONE IF 'THE STATION ;SAW VEHICLE ON PREVIOUS TIME EART106«,J C -THROUGH MATSUB EART1066- C 'ZERO IF IT COULD NOT SEE IT EARTlO^n-, 21 -CONTINUE EART1081 C iHERE IF STATION SEES THE VEHICLE EART109tJJ ISTAT(III)al EART1100 ,60 TO 53 EARTHlf") 22 'CONTINUE EART112U ISTATUIIJcO EART1130 C VEHICLE WAS NOT 'OBSERVED BY STATION EARTH4^ i GO TO 53 EART115. •23 CONTINUE EART1160 !OBNO»INTF( (TSEC°TSECP)/S(NN'*'13) ) EARTlt70_ C OBNO IS THE NUMBER OF OBSERVATIONS -SINCE' LAST TIME. IN MATSUB EARTHS, XTU = DOT(Y* .U) EART119t^ XTE«DOT(Y,E-) EART1200 XTNBDOT(Y,EN) EARTlgin TPD2aXTE**2«XTN**2 EART122J TPD3SQRTFUPD2) EART1230 ALLYBXTN/TPD2 EART124A, GAMsXTU*XTE EARTiasH 8ETSXTE/TPD2 EART1261T .'DEL3XTU*XTN EART1270 :Dsi»/RAT**2/TPD EART128ffj :CAaAC/A EART129C* 'BAsB*B/ ( A* A ) EART1300 'GGaCA*(l aBA ) *SL*CL*CA*CA EARTlSin 'DRT(1»1)"A*6Q*U(1>*(AC+AL)*EN(1) EART132[J |DRT(2*QG*Ut3>*BA*

S-138 EARTR-20 ; 1 RHILCQ WDL DIVISION ^ WDL-TR2184

IEARTR (cont'd)

AA«S(10)*CL*(AC*AL) EAPT14S XD(1)=VED(1>-AA*EU) EART142 XD(2)=VED(2>-AA*E(2) EART144 XD(3)=VED(3) EART14E XDTU=DOT(XD/U) EART146 XDTE»DOT .EART148 RDQTsDOT(XD,Y)/RAT EART149 •RDOTaRANGE RATE EART190 ADOTaW*SL=W*CL*ALLY*XTU*ALLY*XDTE-BET*XDTN EART151 ADOTsAZIMUTH RATE EART19E ,EDOT«(1,/TPD)*(W*CL*XTE*XDTU-RDOT*XTU/RAT) EART153 EDOTsELEVATIQN RATE EART15KI .IF25 - _ _ . -EART1SS 25 .CONTINUE EART156 :RDOT2aRDOT*RDOT EART157 •QQRDOT=RDOT2*SQQADOT = AZIMUTH VARIANCE DUE TO TIME BIAS EART162 :EDOT2=EDOT+EDOT EART163 'QQEDOTsEDOT2*SQQADOT = 0. EART169 :QOEDOTsO, EART17D 27 CONTINUE. EART173 •DO 49 '11 = 1*4 EART172 IF DO 32 1 = 1,3 EART182 ,3PART(I) = 0, EART183 3PART=PARTIALS' OF RANGE WRT STATION LOCATION EART184 •DO 31 Ksl,3 EART185 .SPART(I)BSPART(I>«H(K)*DRT

S-139 21 'PHILCO. WDL D WDL-TR2184

EARTR (Cont'd)

'DO 33 I«l»3 EART19101 C' QQSsRANGE VARIANCE DUE TO STATION LOCATION ERRORS EART1920 ,KLesNN*3*I EART1930n *S(KL> EART1940O 33 CONTINUE EART1950 EART2010M C :CORRTP UPDATES OOVARIANCE MATRIX FOR1 PARTICULAR TYPE. EART2015 C 'OF MEASUREMENT EART2016^1 .GO TO 49 EART2020- 35 CONTINUE EART2030" •C, THE FOLLOWING 'CALCULATIONS GIVE 'H MATRIX FOR AZIMUTH EART2040-n DO 36 Jill, 3 EART2050'' (HA(J)BALLY*E-BET*EN=HA(K>*DRT(K,I) EART2120J 37 CONTINUE EART2130 SPARKl)sSPARTU>+BET«XTU C, f\ f\ I £ J^ rr V-STi RLUSaBET + SL*XTE«ALLY*(Ytl> + CT + Y('2)*ST) EART215C | .SRARK2)sSPARK2>+PLUS EART216CH •DO '38 lHl»3 EART2170 >SPART2(I)sSPARKI>*SPART(I) EART2l8f 38 .CONTINUE EART2JL9LJ •QQSAaOo EART2200 'DO 39 lB.1,3 EART221F--5 C QQSAsAZlMUTH VARIANCE -DUE TO' STATION LOCATION ERRORS EART222t'' EART2230" >QQSAaQQSA*SPART2(I)*S(KL> EART2280 39 .CONTINUE EART225i;l >QQaS(NN*l)/OBNO*S(NN*7>*QQSA*QQADOT EART226P 'QQaTQTAL AZIMUTH VARIANCE EART2270 :CALL' TRANSH(HA.l) EART 228n IF(II-2)34»54.40 EART229(J 54 CONTINUE EART2300 :CALL .CORRTPCQQ',HA,-P) EART231FK 40 'CONTINUE EART232H THE FOLLOWING 'CALCULATIONS GIVE H MATRIX'FOR- ELEVATION EART2330 'DO 41 'J3l,3 EART2340 'H(iJ)B U(J)/TPD-Y(J)*XTU*D EART235J' 41 CONTINUE EART236t. 'DO 42 1 = 1*3 EART2370 EART238R .SPARTsPARTIALS OF ELEVATION WRT STATION LOCATION EART239I j

WDL DIVISION PHILjCQ EARTR-22 WDL-TR2184

EARTR (Cont'd)

DO 42 K=l»3 EART240 SPART(I)=SPART(I>=H EART241 42 CONTINUE EART242 .SPART(1)=SPART(1)+XTN/TPD EART243 SPART(2)=SPART'(2)+XTE*CU/TPD EART244 DO -43 Id, 3 EART245 SPART2(I)=SPART EART259 >SlNANG = SQRTF(lv-DIRCCiS**2) EART260 TANANG=SINANQ/DIRCOS EART261 ANGMsATANF(TANANG) EART262 ANGMsANGM*RD EART263 EART264 SAnSINF(AZMTH) EART265 'SEsSINF(ELEV) EART266 CE=COSF(ELEV) EART267 ;Clis»SA*CE EART268 C2=-CA*SE EART269 -ANGMDT=C1*EDOT*C2*ADOT EART270 ANQMDT=ANGMDT*RD EART271 DO 56 1=1,3 EART272 'HCOS(I)5C1*H(I)*C2*HACD EART273 56 CONTINUE EART274 QQSCOScCl*QQS*C2!>QOSA EART273 'QQSCOS IS THE VARIANCE- IN THE M DIRECTION COSINE DUE: TO STATION EART276 .LOCATION ERRORS EART277 'QQCDOT=C1*QQEDOT*C2*QQADOT EART278 .QQnS(NDUM*l)/OBNO*S(NDUM*2)*OQSCOS*QQODOT EART279 'OOnTOTAL VARIANCE 'OF M DIRECTION COSINE EART280 'CALL CORRTP(QQ*HCOS,-P) EART281 57 CONTINUE EART282 EART233 :SINANG = SQRTF(1,-«DIPCOS**,2) EART284I T.ANANG = SINANG/DIROOS EART28f5 ANQLaATANF(TANANG) E.ART286 EART237 • CloCA*CE EART288 C2a°SA*SE EART289 .ANGLDT=C1*EDOT+C2*ADOT EART290

S-141 EARTR-23

PHILCQ DIVISBON WDL-TR21S4 0

EARTR (Cont'd)

ANGLDTsANGLDT*RD EART2910("1 'DO 58 Isl,3- EART2920U 'HCOSXI)«C1*H*C2*HA(D EART29BO 58 CONTINUE EART2940n 'QQSCQSsCl«QQS+C2*QQSA EART2950 4 C QQSCOS IS THE L DIRECTION COSINE' ERROR DUE TO STATION LOCATION EART2960 C ERROR EART2970 :QQCDOTsCl*QQEDOT+C2*QQADOT EART298ofl ;QQsS(NDUM*3)/OBNO-«S -ROOT tTD«S(10)*U<3)*CCN8T*AL>*XTE/RAT EART3096, •SPART«2)aSPART(2>»AA*CTD(2)*Etl>-TD(l>*Ei(2» EART3097LJ :SRART(3)aSPART(3)iS(10)*EN(3)«XTE/RAT EART3098

iQQ<58fl EART3095"!j 'DO 66 lHi,3 EART3100J KLnNN+3*! EART31D1 •QQSBQQS*(SPART(I)**2)*S(KL) EART3tD?-.j 66 CONTINUE EART3103 'QQ«S(-NN*3)/OBNO*QQS EART31D4 • CALL TRANSH(Hp'2) ttrADTTt. w n i v?w j^f f±t U- — j GO TO 34 EART3120>I 49 CONTINUE EART3130-J • NOUTsiNOUT EART314Q •GO TO (52*>50>pNOUT EART315(T] •50 'CONTINUE EART316CJ IF(IMSTA(3»III) )59, 59*60 EART3X70 59 CONTINUE EART3180-) .EDOT»EDOT*RD EART319ff ADQT8ADOT*RD EART320(H •AZMTH nAZMTH*RD EART3210_ ELEVs£LEV*RD EART3220J WRITE OUTPUT 'TAPE NUTS,-51.SNAME,'RAT»RDOTi AZMTH-, ADOT* ELEV.EDOT EART323(fJ 51 FORMAT <17H TRACKER STATION ,A6P'/4H 'RNGE1568,5H RGRE15«8, EART3240 15H AZME15.8,5H AZRE150.8,5H .ELEE15-.8.5H ELRE15.8) EART3250'] GO TO 52 EART326Q'M 60 'CONTINUE EART3270""' WRITE OUTPUT TAPE NUTS, 61,:SNAME,'RAT, ROOT* ANGL» ANQLDTV ANGM.ANGMDT EART3280-J iJ

S-142 , EARTR=24 "] PI^LOQ WDL DIVISION I 1 WDL-TR2184

HEARTR (cont'd)

n 61 FORMAT (17H TRACKER STATION ,A6,/4H RNGE15,8,5H RGRE15.8, EART32 I", 15H .ICSE1508,5H LCRE15i-8,5H MCSE15,8,5H MCRE15.8) EART33 "J' 52 CONTINUE ' EART33 •GO TO 21 EART33 n 53 CONTINUE EART33 LJ 'RETURN EART33 END EART

:.j nA

a•\

S- 143 EARTR-

iPHILCQ WDL D8VIS80N Page Intentionally Left Blank Y t n WDL-TR2184 -I Subroutine! ECLIP

Purpose; To replace each of two 3-dimensional vectors by its product with a given 3x3 matrix. This subroutine is used for transforming position and velocity vectors.

Calling Sequence: GALL ECLIP (X, VX, ECL)

Input and Output

Data Symbolic Program Mathematical I/O Name or Symbol Dimensions Definition Location Dimensions or Units

1-0 X 3 Xout = (ECL) Xin

1-0 VX 3 VXout = (ECL) VXin

I ECL 3,3 TRANSFORMATION MATRIX

Common storages used or required: None Subroutines required: None Functions required: None Approximate number of storages required:

S-1A5 ECLIP - 1

WDL DIVISION ECLIP WDL-TR2184

* LABEL ECLP * .SYMBOL TABLE ECLP f .SUBROUTINE ECLIPCXfVX.TCL) ECLPOOOO( DIMENSION X<3)*VX(3),XP(3),VXP(3)*ECL(;3.3) ECLP0010 DO 1 1-1,3 ECLP0020* XP(I) = Oo ECLP0030 VXP(I) s 0, ECLP00401 :DO 1 -Js.1,3 ECLP0050 XP

ECLIP - 2

S-146

PHIUCQ WDL DIVIS10N WDL-TR2184

Subroutine: ENCKE

Purpose! To perform the calculation of the ENCKE contribution to the acceleration. These are perturbations in acceleration due to deviation from the osculating conic.

Calling Sequence; CALL ENCKE (U. X. D. AE)

Input and Output

Symbolic Data Program Mathematical Name or Dimensions I/O Dimensions Symbol Definition Location or Units 3. 2 I U 1 M- Kvm /sec Gravitational constant

I X 3 X.Y.Z Kni Position on the conic

I D 3 X'.Y'.Z' Km Position deviation from the conic

0 AE 3 Km/sec ENCKE acceleration terms

Common storages used or required: None

Subroutines required: None

Functions required: SQRT, DOT

Approximate number of storages required: 158 DEC

S-147 ENCKE-1

WDL DIVISION WDL-TR2184 0 Equation Being Solved

The perturbation acceleration due to deviation from the reference Q conic is the following

AE = -«=r (R F(Q) - D) R

where R = R + D. The solution, R ,for the position in the two body orbit is provided by STEPC, and is saved from step to step so that a new R is calculated only when the time has changed.

-3/2 F(Q) =!-(!+ 2Q) is calculated from the series expansion

F(Q) = j=0

where

= 3

a]L = -7.5

= 17.5 i

= 39.375

a. = 86.625 4 D = 187.6875

a, = 402.1875 o and

R S-148 ENCKE-2

PHILCQ WDL DIVISION. WDL-TR2184

+ - LABELi „ _____ -* .SYMBOL TABLE CEC2014 SUBROUTINE ENCKE SUBROUTINE ENCKE C'U»X,'D*AE) DIMENSION X(3)»D(3)iAE(3) :R s DOT(X*X) iDD B .DOT(D,D> :RD s .DOT(X,D) Q a s UA*X(I>«UF*D(I) •RETURN .END

0

S-149

JPHBLCQ NA/DL DIVBSOON Page Intentionally Left Blank WDL-TR2L84

Subroutine; ERP

'-' Purpose I To write on the output tape: EPHEMERIS FAILED DUE TO TAPE p, REDUNDANCIES, and then to CALL EXIT. Should this message occur, and the tape U was actually mounted on the correct unit, try again or try a different copy of the ephemeris tape.

Calling Sequence: CALL ERP

Input and Output

None Common storages used or required: n Subroutines required: SETN, EXIT

Functions required: Approximate number of storages required:

S-151 ERP-!

•i • jRHILCQ WDL DBVBSION ERF WBL-TR2184 •'

i—J * LABEL ERPO CEC20GD ERPO SUBROUTINE ERP ERPOOOOt CALL SETN(NIN,NOUT) ERP0010 1 FORMATU2H EPHEMERIS FAILED DUE TO TAPE REDUNDANCIES) ERP0020n WRITE OUTPUT TAPE NOUT,1 ERPOOSOpj CALL EXIT ERP0040 RETURN ERP0050 END ERPO

a

j o a

S-152 ERP-2 0 J

WDL DIVISION PHILCQ ] WDL-TR2184

Subroutine; ERPT

Purpose: To write on the output tape: EPHEMERIS FAILED LOOKING a FOR T = ( ) DAYS SINCE 1950.0, and to call EXIT. The cause of this condition is either incorrect input or not having the ephemeris tape mounted correctly.

Calling Sequence! ERPT(T)

Input and Output

Data Symbolic Program Mathematical I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I T days Time (in days since 1950.0) for which INTR was searching

the tape

Common storages used or required: None

Subroutines required: SETN, EXIT

Functions required: None Approximate number of storages required:

S-153 ERPT - 1

JPHIUCQ WDL DIVISION ERPT WDL-TR2184

* LABEL ERPT CEC20GE ERPT •SUBROUTINE ERPT(T) ERPTOOOO :CALL SETN(NIN,NOUT) ERPT0010 WRITE OUTPUT.TAPE NOUT,2,T ERPTOOSOf-j 2 FORMATC33H EPHEMERIS FAILED LOOKING FOR T «,F20,0, ERPTOQSO" 118H DAYS SINCE 1950,0) ERPT0040 'CALL EXIT ERPTOOSOfl RETURN ERPT0060rj END ERPT

J

ERPT-2

S-154

PHILCQ WDL DIVISION WDL-TR2184

Subroutine: FINP

Identification

RW FINP - Decimal, Octal, BCD, Variable Data Input Q 7090 FAP Subroutine W.J. Stoner, August 24, 1961 r* Aerospace Corporation

~ purpose

Kj To read a set of Hollerith punched data and/or header cards into core with ~) one FORTRAN CALL statement.

7] To convert the data fields to binary and store in core according to their %) associated conversion codes.

-*-\ Restrictions

^ This routine uses (CSH)S to accomplish the BCD card image read. Tape troubles or other errors from this routine are indicated by the printout '"\ of HPR 1,4. „.} This routine uses (EXE) to print HPR 2,4 in case of errors such as non- "\ Hollerith characters, data out of range, illegal format, subscripts too ] large for the array previously defined, etc. Upon detection of any error, control is immediately sent to (EXE) and no more cards are processed.

! Method J > Decimal numbers are converted to binary integers and then scaled to the (j indicated power of ten. :_J Octal numbers are converted to binary integers.

' Hollerith words are stored directly.

I OQ ,-, Range: Decimal to floating binary conversion 10— el (Decimal to fixed binary; 1 to 9 digits* Decimal integer to binary integer; 1 to 5 digits Octal integer to binary integer; 0 to 235 - 1 [ I *the magnitude of the number depends upon the location of the decimal point.

I 1 Usage Format: • ] 1. The data card format, available on keypunch form M-l, consists of j four subfields containing the conversion code, location, number, and exponent, respectively. FINP-1 S-155

JPHILCQ WDL DIV1SBON my. WDL-TR2184

Data Field Data Field Data Field Data Field

Subfield Conversion Code i 19 37 55 Location 2-6 20-24 38-42 56-60 Value 7-16 25-34 43-52 61-70 Exponent 17-18 35-36 53-54 71-72

where conversion code is one of the alphabetic characters defined below which specifies the type of conversion to be used on the value field, the location specifies the cell into which the converted value field is to be stored, the value subfield contains the data to be converted, and the exponent contains the power of ten by which floating data is to be scaled, or the location of the binary point of fixed point data.

2. The header card format consists of a conversion code in column 1, a sequence number in columns 2-6, and any Hollerith information in columns 7-72.

Decimal Points: L: Decimal points may be placed anywhere in the value field except that they may not occur in the same column as a minus sign (11 punch) since this results in a non-Hollerith character. If the decimal point would normally appear at the right of the number punched in the value field, then it is optional. "1 • — i Minus Signs: Minus signs are 11 punches over any digit of the field. If all of the trri available columns of the field are not used, minus signs may be punched as the left character of the field. Values: 0 Values must always be written to the extreme left of a field. It is not necessary that the entire field be filled as the first blank denotes the end of value. Superfluous low order zeros should be omitted as they increase conversion error. The only exception to partial fields is BCK data where the entire field, including blanks, is stored. 0 Location: The location may be specified by either absolute octal, a variable or 0 array name, or the element subscripts in a one or two dimensional array. If the locations contain five digits, it is interpreted as octal. All five columns must be punched for octal locations.

S-156 FINP-2

PHILCQ WDL DIVISION WDL-TR2184

•-' If the location contains at least one non-numeric character, it is interpreted as a variable or array name which must appear exactly as given in the CALL statement (see Calling Sequence below). The contents Q of the number and exponent fields, if they are numeric data, are stored in the cell for the variable or the first cell for the array. This location then becomes the origin for all subscript locations following until another variable or array name is encountered. Caution must be taken to load an array name prior to subscript locations. If the location contains four or fewer digits, it is interpreted as a subscript except for conversion code H explained below. Single dimension array subscripts .mus.t be left- justified with leading zeros optional. Two dimension array subscripts must be denoted by two sub- fields of two columns each containing i and j, respectively. The i and j subf ields must be separated by a comma and must contain two-digit integers. If the location is left blank, then the location counter within the j routine is decreased by 1 and the associated number is stored in the cell immediately preceding the cell where the last number was stored. Thus, an entire array may be read in by specifying the initial location only. Conversion Codes: Blank: Floating decimal The number in the value field tiroes the power of ten in the exponent field is converted to floating binary. Checks are made for overflow and format errors. F: Fixed decimal The number in the value field is converted to fixed point binary and stored with the binary point located at the position specified by the number in the exponent field. An overflow error check is made.

I: Decimal integer The number in the value field is converted to a fixed point binary integer with the binary point following position 17. The exponent field is ignored. A decimal point is considered an error.

B: Octal The value plus exponent fields are converted as a logical ocatal word. It is not necessary to include leading zeros but the first octal digit must always occupy the leftmost position of the field.

S-157 FINP-3

JPHILCQ WDL DIVISION WDL-TR2184

D: BCI Data The contents of the value plus exponent fields are interpreted as two BCI words and stored in two consecutive cells in descending order beginning at the location specified by the location field.

H: Heading Card A card with an H in column 1 is considered a BCI heading card. If the location field is blank, the card is ignored. If the location field contains a left-justified one to four digit positive decimal integer V (octal, negative, or variable locations are not permitted), columns 7-72 of the card are stored directly in 11 consecutive words in descend- ing order. The location of the first of these words is calculated by the routine as HEAD (1+11*(V-1)) where HEAD is defined as the last variable or array named in the CALL statement. Each card may be used as one record of output using FORMAT option A with column 7 of the card — providing the code for printer spacing on output. , I

u A: Variable names as data ... The value plus exponent fields are interpreted in a pseudo FAP instrue- J tion format AAAAA T DDDDD P where the fields to replace are address, tag, ^ decrement, and prefix, respectively. The address and decrement fields are __ defined normally to be 5 characters and the tag and prefix as one octal numeric character each. Any field containing less than the normal number —' of characters must end with a comma while fields of normal length must not. Any address or decrement field containing less than 5 numeric char- acters are converted as octal. Any address or decrement field containing at least one non-numeric character is interpreted as a variable or array name. Variable addresses cause the entire word from the compiler gener- ~j ated calling sequence to be loaded into the location word (i.e., the ] TSX X is stored in the location specified if X is the variable appearing ~ in the address field). Variable decrements cause the right-most 18 bits ... from the compiler generated calling sequence to be loaded into the • ] location word's prefix and decrement. Numeric tags and prefixes are ~* loaded directly into the corresponding parts of the location words. Null fields are not loaded. Since the first blank indicates the end of the r| loading of a word, address only, adress-tag, address-tag-decrement, or !J entire word may be loaded as desired. G: Temporary Origin 0 The value in the first location field on the card is used as a temporary origin for tables. The location is saved and if data cards follow with r*| blank location fields the corresponding data is stored consecutively in 1 I descending order beginning with the cell specified in the location in the G card. Columns 7-72 are ignored and may be used to identify the table. I

S-158 FINP-4

PHILCQ WDL DIVISION WDL-TR2184

The first nonblank location starts a new origin. If this nonblank location is a subscript, it references the last variable or array named, which may or may not have been on the G card.

J[: Transfer The location specified with this prefix must be an octal address and is the only part of the data field that is interpreted. The subroutine causes a transfer to the octal location specified and does not interpret the remaining fields on the card.

L: Two dimension array i , j definition — max max The location field contains the name of the array to be loaded. The value field is defined to consist of 2 subfields, separated by a comma, of 2 columns each containing the two-digit decimal integers for i and j respectively where i and j generally appear in a max Jmax * J max Jmaxe 3 vv DIMENSI0N statement. The i and j values are retained to compute max Jmax v the successive subscripted locations until redefined. Blank address fields may follow this array definition if successive elements of the array are to be loaded.

M: Two dimension array i , i definition max max Conversion is identical to L except the entire array is preset to zero.

E: End Case This defines an end-of-case and control is returned to the FORTRAN object program. The rest of this field and the remaining fields on the card are ignored.

Calling Sequence:

The following two types of CALL statements may be used:

I. CALL FINP (n,X,Y, ZETA, . . ., mHX(Y}Y(T) ZETA(T) . . .) where

A. n is the number of variables and/or arrays in the list, u excluding n itself. B. X, Y, ZETA,... are the names of variables and/or arrays restricted to at most 5 characters each, one character of which is non-numeric. C. m is 6 times n. Hence, mH allows for 6n Hollerith characters to follow.

S-159 FINP-5

JPHBLCQ ' WDL DIVBSION WDL-TR2184

. is a listof the items previously named in exactly the same order with(i ^indicating the number, i, of blanks necessary to provide six Hollerith characters for each item. Since each item name is restricted to 5 characters, the minimum value of i II. CALL FINP (0) where the number of items is given as zero. This CALL statement must be used only. after a CALL statement of type I has been executed. When the subroutine encounters a zero for the number of items, it immediately refers to the last executed CALL FINP with a nonzero number of items for the names of the i£ems to be loaded.

Space Requirements 6.13 cells.

Number of Pages Writeup 6 Listing 12 Total 18

S-160 FINP-6

PHILCQ WDI_ DIVISION. WDL-TR2184

(J * F AP" " ~ FINP LBL FINP FINP TTL FINP INPUT ROUTINE FINP ENTRY FINP FINP01- J 'REM CALL FINP (N,A»B,DATA, , , .,6NHA B DATA FINPOOO REM WHERE N IS NUM OF VARIABLES AND FINPOOO ,REM 6N IS 6 TIMES NUM OF VARIABLES FINPOOO D TXH 0,0,0 FINPOOO SXD GINOO,4 FINPOOO SXD GIN02,1 FINPOOO SXD GIN05,2 FINPOOO SXD STOP1,4 FINPOOO SXD STOP2,4 FINP001 CLA* 1,4 FINP001 - TNZ - INPT1 - _ FINP001 STO COMMON*28 F.LAG TO USE. PREVIO FINP001 TXL INPT2 FINP001 INPT1 STO COMMON*28 FLAG TO USE PRESEN FINP.001 SXD FTNPT,4 FINP001 'NOP FINP001 3 COM FINP001 • STD **1 u FINP001 TXI *+l, 4, 0 FINPOO! SXD GINOO,4' FINP002 INPT2 LXD FINPT,4 . FINP002 CLA* 1,4. FINP002 ARS 18 FINPOQ2 • STO COMMON*29 N FINP002 ALS 18 FINPOO; 'COM FINP002 .STD TBL03 FINPOO: •STD **1 FINPOO: TXI •*+l»4,0 FINPOQ3 XLA 0,4 FINP003 .STA GIN01 ADDRESS. OF iHEADER FINP003 :CLA 1,4. FINP003 ^STA TBL01 ADDRESS OF BCD TAB FINPOO: STO ERROR FINP003 GINA .LXD GINOO,4 FINPOO: •CALL (CSH)S FINPOO; 'PZE COMMON/0*- 1 FINPOO: STOP1 'P2E 1*4 FINPOO; .AXC COMMON,.! FINPOO' 'TXI *+l, 1, -12 FINP004 o • SXD GINC,1 FINP004 SXD GINll*!, 1 FINP004 AXC COMMON,! FINP004 -CLA BLANK' FINP004 GINS CAS 0,1 FINP004 TXL GINC*2 FINP004 TXI **2,1,-1 FINPOQ4

S-161 FINP-7 ;}

ipHILCQ WDL. DIVISION WDL-TR2184

TXL GINC+2 FINP0049 GIIMC TXH GINB.l/** FINPOQ50 j TXL GINA FINP0051 AXC COMMON,! FINP0052 LDQ 0,1 FINPOQ53 GIN01 'PXD ** SAVE PREFIX CODE. FINPOQ54 ' .LGL 6 FINP0055 •STO PREFIX FINP0056 ( STO 0,1 FINJP0057 ! ,SUB ME E FINP0058 TZE GIN13 END FINP0059 i LGL 30 SAVE LAST DIGIT OF ADDRESS FINPOQ60 ; ANA MASK1 FINP0061 -STO ADDIND FINP0062.. STZ 'SUM TEST FOR BLANK ADDRESS FINP0063 « STZ .SIGN FINP0064 '• CLA 0,1 FINP0065 CAS MASK2 FINP0066 r 'TXL FINP0067 ; TXL GIN06 BLANK FINP0068 .LRS 18 TEST FOR 'MATRIX FINP0069 - .ANA MASK1 FINP0070 •SUB MASK4 FINP0071 ' TNZ GIN17-2 FINP0072 TSX MTXQO,4 MATRIX FINP0073 TRA GINER OUTSIDE MATRIX FINP0074 . TRA GIN20 FINP0075 MASK4 'OCT 73 FINIP0076 ,AXT 5,4 FINP0077 LDQ 0,1 FINP0078 GIN17 •PXD FINP0079'. .LGL. 6 FINP0080 'PAX 0,2 FINPOQ81 - GIN18,2,9 FINP0082 TXH GIN19>2«4B FINP0083 ; TXL GIN19,2,47 FINP0084 i. GIN18 TJX GIN17,4,1 FINP0085 TXL GIN16- FINP0086 GIN19 :CLA 0,1 SYMBOLIC FINP0087 n iQRA MASKS. FINP0088 TSX TBLOO,4. FINPOQ89 .LLS 35 FINP0090 >STA GINOO. FINPOQ91 GIN20 :CLA. MASK3. FINP0092 ADDJND FINP0093 TXL GINQ7 GIN16 :CLA ADDIND TEST FOR OCTAL FINP0095 0 .SUB MASK3 FINP0096 TZE GIN04 FINP0097 .LXA •SET-UP OCTAL ADDRESS FINP0098 'TSX -OCTAL, 4' FINP0099

S-162 FINP-8 PHILCQ WDL DIVISION; WDL-TR2184

GIN02 TXH 5,,** FI-NP010 GIN03 TXL -GIN07,*** FINPCUQ GIN04 .LXA 100835,2 SET UP DECIMAL ADDRESS FINP010 CLA 4835 FINP010 'TSX DECIM,4 FINP010 p GINQ5 TXH 6,,** FINP010 XCA FINPOIO y SUB 1B35 FINP010 .XCA FINPOIO TXL GINER,-2,100 FINPOIO TXL GIN07 FINPOU GIN06 .LDO MASK2 FINP011 GINQ7 ,STQ CRDADD FINPOU .LXA PREFIX/4 •SET-UP TRA TO TXH GINER, 4».48 SUB-PROGRAM FINPOJL1 TXL GIN08,4»-47 FINPOU LXD 100835,4 FINPOU TXL GIN09 FINPOU GIN08 "TXH GINER,GINER,4,34 6 FINPOU TXL FINPOU TXI GINQ9,4,-23 FINP012 TXH GINER, 4, 25 FINP012 -i TNX FINP012 IGIN09 TXI GIN09*lil,-l FINP012 'J TRA ^T'"" * FINP012 TXL MCDOO M MATRIX IJ,(ZERO FINP012 TXL MCDOO L- MATRIX .IJ-NO ZERO FINP012 'TXL GINER K FINP012 TRA* CRDADD FINP012 TXL IGINOO I INTEGER FINP012 TXL HGINOO H HEADER FINP013 TXL GGINOO G TABLEi ORIGIN' FINP013 TXL FGINOO F FIXED1FOINT FINP013 TXL .GINER. FINP013 TXL DGINOO D BCD FINP-013 TXL GINER FINP013 TXL BGJNOO B OCTALi FINP013 TXL ACDO A SYMBOLIC FINP013 GIN10 TXL .LGINOO«fl2 BLANK FLOATINS FINP013 •--{GIN11 TXI GINll*l*li TEST END iCARD FINP013 r TXH FINP014 V GIN12 'TXL GINA TO NEXT CARD FJNP014 ,-, GIN13 LXD GINOO>,4 FINP014 .LXD GIN02.1 FIMP014 .LXD GIN05>2 FINP014 TRA 2*4- EXIT FINP014 H GINER PXD FINP014 -LDI ST-OP2- FINP014 -CALL (EXE) FINP014 'PZE 2.4- FINP014 ME •BCI 1,OOOOOE FINP015

S-163 'FINP-9

IPHILCQ WDL DiVBSBOMI o 0 WDL-TR2184

BLANK BCI If FINP0151 .-rj REM FINP0152 i HGINOO -CLA CRDADD FINP0153 CAS MASK2 FINP0154 TXL **2 FINP0155F] TXL 6IN12 BLANK FINP0156 U LDQ CRDADD FIMP0157 MPY 11035- FINP0158 p| STQ COMMON FINPOI59 H CAL GINOl FINP0160 *" •SBM COMMON FINPOl&i n STA HGIN01 FINP0162 i'. LXD 1635,4 FINP0163 .LXA 11835,1 FINP0164 ;CLA COMMON*12,1 FINP0165 H HGIN01 .STO **,4 FINP0166 ill TXI **1»4»1 FINP0167 TIX HGIN01*lilil FINP0168 f'-l TXL 6IN12 FINIP0169! -| GGINOO CLA ADDIND FINP0170 ^SUB MASK3 FINP0171 TZE GGIN01 FINP0172 PXD FINP0173 3 TXL GGIN02 FINP0174 GGINOI :CAL GINOO FINP0175 GG1N02 ADD 1B35 FINP0176 n ADO CRDADD FINP0177 :STA SGIN03 FINP0178 ~i TXL GIN12 FINP03.79 j BGINOO >STZ SUM FINP0180 •STZ SIGN FINP0181 ^ LXA M6B35,2 FINPOJ.82 ! ] TSX OCTAL, 4- FINPOJ.83 J TXI 06IN04.1*-! FINP0184 TXI BGlN01*lt-l FINP0185'!"] BGIN01 LXA M6835,2 FINPOi86lj) TSX OCTAL, 4 FINP0187 TXH 4 FINP0188 BGIN02' TSX SGINOO,4 FINP0189 BGIN03 'TXL •GIN11****- EXIT FOR NEW PREFIX FINP0190 BGIN04 TXH BGIN03,2,5 BLANK FINP0191 TXL BGIN02 FINIP0192 IGINOO 'TSX DECNO,4 INTERGER FORMAT FINP0193 U 'TXH GINER,2,0 ERROR FOR .NON-INTEGER FIN1P0194 LLS 18 FINP0195 TXL BGIN02 FINP0196 DGINOO LDQ 0,1 FINP0197 TSX SGINOO,4 FINP0198 .CLA MASK2 FINP0199 .STO CRDADD FINP0200 LDQ 1,1 FINP0201

3-164 FINP-10

t PHILCQ WDL DIVISION WDL-TR2184

TXl BGIN02*.1>-1 FINP020S DECNO • SXD BGIN03,4 FINP02D3 :CLA 1,1 FINP0204 ALS 24 FINP0205 • SLW COMMON*SO FINP0806 STZ SUM FINP0207 STZ SIGN FINP0208 LXA 100835,2 FINP0205 :CLS M6B35 FINP021D TSX DECIM,4' FINP0211 TXl .END ON BLANK FINP0212 TXl FINP0213 DECN1 CLA 4935 4 FINP0214 "^ TSX DECIM,4 FINP0215 O DECN2 TXH 2,,** TXL DECN4»2*'99 FINP.0217 TXL GIN11,'2»100 FINP0216 M DECN3 .LXD !B35,-2 FINP0315 DECN4 LXD BGIN03*4 FINP022C LXD -8GIN03«4 FINP0223 TRA 1,4 FINP0222 -' DECEN SXD GIN03,4 FINP0223 TSX DECNO»4- FINP022* ,STQ COMMON*13 FINP0225 :SXD DECN2»2 FJNP022f 'CLA DECN2 FINP0227 'STZ SUM FINP0226 STZ SIGN FINP022S LDQ COMMON*20 FINP023C •STQ 0,1 FINP0333 TSX DECIM,4 FINP0232 •TXH FINP0233 LXD GIN03*4 FINP023 TRA 1,4. FINP023E j FGINOO TSX DECEN,4 FIXED -PTi CONVERSION FINP023< STQ COMMON FINP0237 CAL DECN2 FINP023? COM FINP023S .ADD IBI? FINP024C •POX 0,2 FINP02'43 •CLA- COMMON FINP024S SUB. BREF*2 FINP0243 TMI 6INER- FINP024 :STA FGIN01 FINP02'4i fl .LDQ -COMMON*13 •MPY FREF,2 FINP024: FGIN01 LRS ** FINP024J TNZ GINER. FINP02K TXL BGIN02,,** FINP025( LGINOO TSX :DECEN,4 FLTG, 'PT, .'CONVERSION FINP025: •STQ COMMON FINP025J

S-165 FIHP-11

^PHILCQ WDL DIVISION WDL-TR2184 o

LXD DECN2.2 FINP0253""] 'PXD .2 FINP0254JJ ARS 18 FINP0255" •SSM FlNP0256n ADD 'COMMON FINP0257 j LRS 35 FINP02580 •DVP 10B35 FINP0259 .SUB M9B35 FINP0260 PAX ,2 FINP0261 FINP0262 .LLS 35 FlNP0263n ADD 5B35 HIGH DIGIT FINP0264KJ TMI GINER FINP0265 'PAX 04 FINP0266- • SXD FGIN01*2,1 •SAVE ADD REFERENCE FI-NP0267;.;) XREF1*2 : <—t ADD XREF2>4 FINP0269 .ADD 126835 FINP0270; TP.L' .LGINOA FINP0271! ;STZ COMMON+13 FINP0272 LGINOA 'PAX 0,1 FINP0273. LDQ FREF1,2 FINP0274 .MPR FREF2,4 FINP0275' LRS 35 FINP0276 COMMON*13 FINP0277 LLS 2 FINP0278 TZE LGIN03 FINP0279 LGIN01 TZE .LGIN02 FINP0280 .LRS 1 FINP0281 TXI LGIN01«1,1 FINP0282 LGIN02 'PXD ,1 FINP0283! •ARS 18 FINP0284 .LLS 0 FIMP0285 LRS 8 FINP0286 LGIN03. LXD FGIN01*2,1 FINP0287' TNZ GINER FINP0288- TXL BGIN02 EXIT i TO 'STORE FINP0289 SGINOO -CLA CRDADD STORE ROUTINE FINP0290 • SUB MASK2 FINP0291 TZE SGIN01 FINP0292 ADDIND • SUB MASKS FIMP02944 TZE SGINOA FINP0295>J CLA 'CRDADD FINP0296 TXL ' SGIN02 FINP0297f) SGINOA :CAL GINOO FINP0298U :SUB CRDADD FINP0299 TXL SGIN02 FINP0300 SGIN01';CAL SGIN03 ADD 1 TO OLD ADDRESS FINP0301 .SUB 1B35 FINP0302 SGIN02 -STA SGIN03 FINP0303

S-166 FINP-12

PHILCQ WDL DIVISION WDL-TR2184 o : JSGIN03 STO ** FINP030 •TRA 1,4 FINP030 „ OCTAL' LDQ 0,1 :SET-UP OCTAL INTEGER FINP030 UOCTALI 'PXD FINP030 ,LQL 3 FINP030 TNZ OCTAL2 FINP03D • CAL. SUM FINP031 .LGL< 3 FINP031 • SLW .SUM FINP031 TIX OCTAL1,'2,1 FINP031 TXI OCTAL3,4,-1 FINP031 .UQL 3 FINP031 • SUB MASK3 FINP031 Fl 'TNZ GINER FINP031 OCTAL3 ,LDO SUM FINP031 -TRA l-,4- -FINP031 DECIM :SXD DECIM2«4 • GENERATE DECIMAL! INTEGER FINP032 PAX ,4 DECIM1 -CLM FINP032! LOO 0,1 FINP032; .LQL 6 FINP032- :STQ 0,1 FINP032! • SUB 10B35. FINP032< TMI DECIM6 FINP032; ,SUB..17835 FINP032* TNZ DECIM3 FINP032< LXD 10B35,'2 FINP033I JDEC1M2 TXL-'DECIM?,,** FINP033: DECJM3 :SUB 5B35 FINP033J TMI: GINER FINP033; •SUB 10B35 FINP033- •TNZ DECIM4 FINP033? = SUB 10835. FINP033< DECIM4 •TPL"DECIM5 FINP033: • STO SIGN FINP033J 'TXL DECIM6 FINP033< ,ADD M6B35. FINP034{ TNZ GINCR FINP034J LXD. DEC!M2r4 END ON BLANK FINP034S LDQ SUM FINP034; :CLA SIGN FINP034< .LRS 0 . FINP034E TRA 1,4 FINP034< ADD 10B35 FINP0341 :STO COMMON+14 FINP034( .LDQ SUM iMPY 10B35 FINP035C LLS 35 FINP0353 ^ADD COMMON + 14- FINP035S • STO -SUM FINP0355 TXI DECIM7,'2,1 FINIP035-

S-167

WDL DIVISION WDL-TR218*

DECIM7 T1X DECIM1,4,1 FINP0355 LXD DECIM2,4 FINP0356 TXI DECIM8*1,4.-1 END ON DIGIT COUNT FINP03B7 DEC 133 FINP0358 100S35 DEC 100 FINP0359 DEC 67 FINP0360 • DEC 34 FJNP0361 1835 •DEC' 1 FINP0362 ,-DEC =33 FINP0363 'DEC =66 FINP0364 'DEC =99 FINP0365 ••DEC -132 FINP0366- XREF2 DEC =918354961680 FINP0367 DEC =788860905380 FINP0368 DEC =677626357980 FINP0369 -DEC 05820766092BO FINP0370 'DEC =580 FINP0371 •DEC =858993459280 FINP0372 DEC =737869763080 FINP0373 DEC =633825300280 FINP0374 DEC =544451787180 FINP0375 FREF2 • DEC 30 FINP0376 DEC 27 FINP0377 'DEC 24 FINP0378 DEC 20 FINP0379 17B35 'DEC 17 FJNP0380 DEC 14 FINP0381 10B35 DEC 10 FINP0382 DEC 7 FINP0383 4B35 •DEC 4 FINP0384 BREF •DEC 1 FINP0385 -'DEC -3 FINP0386 M6B35 >D£C = 6 FINP0387 M9B35 •DEC = 9 FINP0388 DEC =13 FINP0389 •DEC - = 16 F1NP0390 •DEC =19 FINP0391 'DEC =23 FINP0392 DEC =26 FINP0393 XREF1 DEC =29 FINP0394 •DEC =931322574780 FINP0395 DEC =745058059760 FINP0396 DEC =596046447880 FINP0397 DEC =953674316560 FINP0398 • DEC 07629394531BO FINIP0399 DEC 0610351562580 FINP0400 DEC =976562580 FJNP0401 • DEC c78125bO FINP0402 'DEC 0625BO FINP0403 FREP •DEC c5BO FINP0404 i •DEC =8BO FINP0405

S-168 FINP-14

PHILCQ WDL DIVISION! WDL-TR2184

'DEC .6480 FINP040 -•DEC 0512BO FINP040

""" \ 'DEC .819260 FINP040 'DEC o65536BO FINP040 'j 'DEC ,52428890 FINP041 'DEC :8388608BO FINP041 DEC ,6710886480 FINP041 QFREFI 'DEC ,53687091260 FINP041 5B39 'DEC 5 . FINP041 n 126B35 'PZE ,126 FINP041 ft MASK1 'OCT 000000000077 FINP041 ij MASK2 'OCT 606060606000 FINP041 MASK3 'OCT 000000000060 FINP041 '«•] 1B17 'OCT 1000000 F1NP041 •;) 2835 DEC '2835 FINP042 - 3835 -'PZE 3 FINP042 O 8835 DEC 8835 FINP042 :-J us 35 PZE 11 FINP042 12835 'PZE 12 FINP042 -, MTXOO SXA MTX10,4 TSX.MTXOO,4 FINP042 -I .AXT 2,4 IJ 'RETURN FINP042 *' MTX01 SXA MTX02,4 NORMAL RETURN FINP042 • STZ SIGN FINP042 ] STZ SUM FINP042 J .LXA 100835,2 FJNP043 ;CLA 2835 FINP043 •TSX DECIM,4 F1NP043 1 TXH 0,0,0 FINP043 v-1 TXL GINER,2,100 FINP043 ... MTX02 AXT **,-4 F1NP043 j •STQ 1 + 2,4 FINP043 _./ LDQ' 0,.l REMOVE FINP043. .LGL 6 :COMMA FINP043 •""] STQ 0,1 FINP043 • \ TJX MTXOli4,l FINP044 MTX10 AXT **i-4 FINP044 CLA j FINP044 •fI !I •SUB 1835 FINP044 v.1 XCA FINP044 iMPY IMAX FINP044 w XCA FINP044 i. ^ ADD I FINP044 .LDQ IJ FINP044 TLQ 1*4- LOG GTR MAX FINP044 ;SUB 1B35 FINP045 FINP045 TRA 2,4 FJNP045 : 1 * ^SET UP IJ. WORD FINP045 U MCDOO .SXA MCD02,4 FINP045 -CAL GINOO FINP045 ADD 1835 FINP045

S-169 FINE=15

IPHILCQ NA/DL DIVISION WDL-TR218,, j

STA SGIN03 TSX MTXOO»4 FINP0458 MCD02 iNOP ** FINP0459 .LDQ I FINP0460 .STQ IMAX FlNP046l J •STQ IJ FINP0463 LXA MCD02,4 FlNP0464f| TXL MCD04»4,12 FlNP0465lvl .LXA IJ,4 FINP0466" TXI *+l»4,-l FINP0467n SXD * + 6,4 FINP0468'j CLA GINOO FINP0469J ,STA **2 FINP0470 .LXD 1B35,4 FINP0471? j •STZ **,4 TXI *+l,4,l FINP0473 •TXL *-2»4,t* FINP0474 MCD04 TXI. GINllil*-! FINP0475; FINP0476 ACDO • STZ CTR FINP0477n •STZ PASS FINP0478 j ACD1 STZ PF FINP0479*J AXT 5,2 FINP0480 TSX SYMOO,4 FINP0481 .AXT 0,4 BLANK FINP0482 TXH ACD6,2,1 FINP0483 TXL ACD12,4,0 NULL AND .BLANK FINP0484"] TXL ACD6+1 NULL FINP0485J ACD6 .STQ PF FINP0486 TXL ACD10,4,0 BLANK FIMP0487^ AXT 1,2 FINP0488; f TSX SYMOO,4 FINP0489J .AXT 0,4 BLANK FINP0490 TXL ACD10,2,1 NULL FINP0491|:) XCL FINP0492U ALS 15 FINP0493 • STT PF ACD10 LDQ PF FINP0495 !CLS PASS FJNP0496 • STO PASS FINP0497 'TPL ACD15 FINP0498i" :STQ WORD FINP0499 TXH ACDlp4,0 NOT BLANK FINP0500 ACD12 LXA CTR, 4 FINPOSIOi TXH ACD14,4,6 FINP0902 TXI *+!•!, -1 FINIP0503 TXL. **3,4,1 BLANK FINPOSD4".- ACD14 LDQ WORD FINPOSD5' TSX SGINQO,4 FINP0506" TXL GIN11 FIMP0507

S-170 FINP-16

PHILCQ \A/DL DIVISION WDL-TR21S4

,J ACD15 :RQL 18 ;SLQ WORD ^ 'TXL ACD12 '1* '•~J SYMOO -SXD SYM02V2 LXAUNO .CHARACTERS),2 • SXA SYM14,'4. TSX SYMOQ.4 n .STZ PSYM BALNK Li AXT . 1,2 NORMAL -IR2«1 IF"1 NULL' SYMOI CLA CTR n 'ADD 1835 p| .STO CTR U" .SUB. 10835*1 TNZ **2 5') TXI **1<1*-1 0 .LDQ 0,1 'CAL " " PSYM ' " r-j LQL 6 : i 'SLW PSYM • STQ 0,1 ,n ANA MASK1 .SUB MASKS - TZE SYM20 BLANK SUB 11835 '"} TZE SYM21 COMMA, :J TXI **1#2>1. SYM02 TXL SYM01,'8»** j CAL PSYM j SYM03 TXI **.1,2*=1 SXA SYM06,2 NO .CHARACTERS: .LDQ MASK2 j SYMQ4 .LQL 6 .LEFT JUSTIFY -] .TXI **lp2,l TXLs SYM04»2,5 n ' i-SYMBLw ' 1J :CAL PSYM ANA BLANK r- -TNZ- SYM10 SYMBOLIC '< SYM06 AXT" ***'2 NO CHARACTERS' u .LDQ SYMBL .STZ SUM l'J .STZ SIGN ^ 'TXL ,SYM08,2,4 DECIMAL TSX OCTAL1«4 OCTAL 11 TXL GINER

SYMQ8 'CLA 0,1 .STQ o,r .STO. SYMBL: ,2 TSX DECIM.4 TXL GINER

S-171

JPHILCQ WDL-TR2184 u 'CLA SYMBL FINP0559*-, .STO 0,1 TSX SYM14,2 FINP0561 SYMIO CLA SYMBL: FINP0562 •TSX TBLOO, 4 FINP0563 SYM14 -AXT ** t 4 FINP05640 TRA 2,4 EXIT FINP0965 SYM20 'TXI **1*4»1 BLANK FlNP0566f •SXA SYM14,4 FINP0567J; SYM21 TXL SYM14*1,2,1 NULL FIELD FINPOS68 SYM25 :CAL PSYM >ARS 6 FlNPO§S7oi, •SLW PSYM FINP0971'J TXL SYM03 FINPOS72 TBLOO -LXD TBL01*1>2 TBL01 CAS **«2 FINP0574C TXL * + 2 FINP0375- TXI TBL02#2,-2 FlNP0376f] TXI **1*'2*»1 F1NP0977>" TBL03 TXH TBL01i2i** TXL GINER»0.-i FINP0579; TBL02 .SXA **1, 2 FINPOSBOU .AXC- 0,2 FINP0581-1 .SXA **2, 2 FINP0582 .LXD FINPT,2 FINP0983" .LDQ ** i 2 FINP0584J LXD TBL03*1,2 FINP0585 •TRA 1,4 FINP0586-J IMAX 'PZE FINP0587. 1J. 'PZE COMMON; BSS 31 FINP0369,, 6INOO .SYN COMMON*30 FlNP0590f'i PF . :SYN COMMON*15 FINP0591U PASS .SYN COMMON*16 FINP0592 CTR .EQU COMMON*17 FlNP0593 SYMBL .EQU COMMON*18 PSYM EQU COMMON*19 FINP0595 CRDADD .EQU COMMON*21 FlNP0596n SIGN EQU COMMQN*22 FINP0597L' SUM EQU COMMON*23 FINP0998-J ADDIND -EQU COMMON*B4 FINP0599 PREFIX .EQU COMMON*25 FINPOSOOPJ WORD .SYN COMMON*26 FINP0601U ERROR .SYN COMMON*27 FINP0602 I .SYN PASS FINP0603H J .SYN CTR FINP0604J 1 FINPT .SYN FINP FINP0605 END FINP

FINP-18 S-172

PHILCQ WDL. DIVISION J_VI WDL-TR2184

Function: FNORM

Purpose: To find the magnitude of a 3-dimensional vector.

Calling Sequence; Y = FNORM(X)

Input and Output

Data Symbolic Program Mathematical I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I X 3 xi > xa > Xa 0 FNORM 1 FNORM = (X? + Xl + Xf)*"

Common storages used or required: None

Subroutines required: None

Functions required: SQRTF Approximate number of storages required:

S-173 FNORM - 1

IPHILCQ WDL DIVISION WDL-TR218A FNORM

* SYMBOL TABLt FNOR CLC2018 FUNCTION FNORM FNOR FUNCTION FNORM(X) FNOROOOO DIMENSION X(3) FNOR0010 1 FNORM s SQRTF(X(1)**2+X(2)**2+X(3)**2) FNOR0020 3 RETURN FNOROQ30 END FNOR

0 0

0

S-174 FNORM-2

PHILCQ WDL DIVISION: WDL-TR2184

Subroutine: GHA

Purpose! To determine the Greenwich Hour Angle of the first point of Aries for a given date and time.

Calling Sequence: CALL GHA (TSEC, D, GHAN, DA, OMEGA)

Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Locat ion Dimensions or Units

I TSEC 1 seconds Fractional part of day from D

I D 1 days Whole days from Jan. 1, 1950

0 GHAN 1 degrees Greenwich Hour Angle,

0 £ GHA < 360 •ff I DA 1 Adjustment due to nutation 0 OMEGA 1 We degrees/ sec Rate of rotation of the earth DA = EN(2,1) of EN nutation matrix from NUTATE

Common storages used or required: None Subroutines required: None Functions required: None Approximate number of storages required:

3-175 GHA - 1

ijPHILCQ WDL DIVISION WDL-TR2184

SUBROUTINE GHA

OMEGA =. 0.(XMI78O7«a/fl. 4 5.21 » I0"'3 « D)

TEMI = TEMI + 360. o

( IS TEMI < 0 1

( ISTEMI<360.7 ) N°*Cl) * TEMI = TEMI - 3SO.

YES

GHAN = TEMI t DA * ST. 2937795

PHILCQ WDL DIVISION WDL-TR2184

J GHA D * LABEL CEC20AG SUBROUTINE QHA

L!

0U)

GHA-3

S-177

WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine: GOTOB

Purpose! It is a logic type of subroutine to read input data cards, set up a sequence for calling subroutine MATSUB, interpret types of measure-

ments being made, and control integration package to perform specific operations (read new data, call MATSUB, stop, etc.) at specified times.

Calling Sequencer CALL GOTOB (TSTPD)

Input and Output

Data Symbolic Program Mathematical I/O Name or Symbol Dimensions Definition _J Location Dimensions or Units

I TSTPD 1 time days Desired stop time in days from

start

Common storages used or required: T. S. C. 1C CHNGP, DE6FN, DE6FP, DE6FP3, Subroutines required: DE6FP4, EXIT, MASS, MATSUB, MULT, NUTAIT, OUTC, ROTEQ, Functions required: SPEC, SETN. SHIFTP. TIMED FNORM (FIL)(RTN)(SLI) Approximate number of storages required: 1242 DEC

S-179 GOTOB - 1

IPHILCQ WDL DIVISION WDL-TR2184

SUBROUTINE GOT OB

CALL SETN TO OBTAIN INPUT ft OUTPUT TAPE NUMBERS

SET UP HOLLERITH PRINTOUT

TIME TO STOP CALLING MATSUB, (TSP) » TIME SINCE LAST RECTIFICATION. {TSECO) - I

NEQ = 3N, WHERE N IS NUMBER OF EQUATIONS

TYPE OF OUTPUT. (KTYPE) - I

DISTANCE TO TARGET, (RBOPP) - lO'O

CONVERT FINAL STOP TIME, (TSTP) , TO SECONDS

IS FINAL STOP TIME > 0?

YES

IS TIME SINCE LAST THIS VIOLATES RECTIFICATION, (TSECO) > 07 PROGRAM, CALL EXIT

YES

DOES TSTP = TSECO? YES,

IS TSECO < TSTP

SET SSGN = -1 GO TO 7

1 t

S-180 GOTOB-2

PHILCQ WDL DIVISION WDL-TR2184

U'PDATE TF, (TIME IN 'FRACTIONAL DAYS) , TF - TF » T(2) 86.100

SET TWGN (WHOLE DAYS GONE) , = 0

YES IS TF ^ 07

INCREASE TF BY -REDUCE TWGN-BY

UPDATE TW AND TF -~~) .J

SET RUNNING TIME,

| (n 21 ). - o

CALL OUTC TO FURNISH OUTPUT

i

SET SSGN =

XSO - POSITIONS IN EQUINOX OF 1950, (XP) . VXSO •= VELOCITIES IN EQUINOX OF I9SO, (VXP) .

SET NEW BODY CENTER, (NOR) . d = OLD BODY CENTER (IOR)

U = UM (NOR)

S-181 GOTOB-3

»HILCQ WDL DIVISION WDL-TR2184

SET T(2), (RUNNING TIMEl , = 0

UPDATE TF, TF = TF + T(2) 86400

IS TF > 0?

INCREASE TF BY I, REDUCE TWGN BY I

UPDATE TW, TF, AND TSECO

TIME = WHOLE DAYS FRACTIONAL DAYS

CURRENT TIME FROM ENTRY INTO GOTOB, (TSEC) = TIME SINCE LAST RECTIFICATION, (TSECO)

SET TAN = TANI - TSEC

CALL ROTEO TO OBTAIN TRANSFORMATION FROM 1950 TO MEAN EQUATOR OF DATE

CALL NUTAIT TO OBTAIN TRANSFORMATION FROM EQ. 1950 TO MEAN EQUATOR OF DATE

CALL MULT TO MULTIPLY MATRICES

CALL MASS TO FIND PERTURBING BODIES, AND SET INITIAL INTEGRATION STEP, (ACCP)

S-182 GOTOB-4

PHILCQ WDL DIVISION,. WDL-TR2184

SET T(2) . (RUNNING TIME)= o

SET T(3) = STEP SIZE

NSTEP SET I USED TO INITIALIZE SUBROUTINE STEPC

i. SET POS, VEL, T(4,5,6) T(ZS,26,27) - 0

WRITE OUT "NEW CONIC REFERENCE"

INITIALIZE INTEGRATION SUBROUTINE

DOES IMMSUB = I?

IS 2 (STEP SIZE) (FINAL STOP TIME - CURRENT TIME?) YES

SET STEP SIZE = TSTP - TSEC

CALL INTEGRATION ROUTINE

UPDATE TSEC

UPDATE XP AND VXP ll

WRITE OUT "CONDITIONS LEAVING GOTOB"

IS CURRENT TIME > STOP TIME?

GO TO 75

S-183 GOTOB-5

JPHILCQ WDL DIVISION WDL-TR2184

READ INPUTS FOR STATIONS

SET LAST TIME THROUGH MATSUB, (TSECP) - CURRENT TIME (TSEC)

IS STOP TIME FOR CALLING MATSUB, (TSP) > FINAL STOP TIME (TSTP)T

SET TSP = TSTP

IS INTERVAL OF CALLING MATSUB >0?

CALL EXIT

IS START OF CALLING MATSUB >TSEC? YES B

1 SET TSTRT = TSEC I

SET TSTRT - TSEC + TINV

SET TOUT = TSTRT

GOTOB-6

PHILCQ NA/DL DIVISION WDL-TR2184

CLEAR TLAST ARRAY TO ZERO

CLEAR ISTAT ARRAY TO ZERO

I CLEAR IMOONB ARRAY TO ZERO

I IS TIME TO STOP CALLING MATSUB, (TSP) >TIME TO START CALLING MATSUB, (TSTRT)

YES

REDUCE STATION ARRAY INPUTS TO BINARY DIGITS, EACH REPRESENTING A TYPE OF MEASUREMENT. PRINT OUT STATION INFORMATION. (REPEAT THIS PROCEDURE FOR EARTH-BASED, ON BOARD AND MOON BEACON TRACKING. )

SET TIME TO CAUL MATSUB, (TCM) - TSTRT

I HAS INTEGRATION ROUTINE BEEN TAKING RUNGE-KUTTA STEPS'

SET XXX = 4 TIMES CURRENT STEP SIZE

IS (TCM - TSEC) > XXX

INTEGRATE UP TO TCM

1

UPDATE TSEC

UPDATE POSITION AND VELOCITY VALUES, (XP, VXP)

UPDATE TIME TO CALL MATSUB (TCM)

S-185 GOTOB-7

IRHILCQ WDL DIVISION WDL-TR2184

YEE IS TSP > TCM

NO 1

J SET TCM = TSP

1 r

) CAUL MATSUB

^

i 1 SET CURRENT STEP SIZE. DOES KTEST = 1 0 (T(3)) = STEP SIZE BEFORE ADJUSTMENT TO TCM, (TTT)

YES 1 r

^ET CURRENT STEP SIZE (Tl 3) ) - 4 TIMES STEP SIZE BEFORE ADJUSTMENT TO TCM

s t

SET KTEST = 2 i

INITIALIZE II ^ SUBRCIUTINE

INTEGRATE ONE STEP, RETURN WITH TYPE OF > STEP INDICATION 1

SET KTEST - 1

1 r

TIME =• WHOLE DAYS ••• FRACTIONAL DAVS-f RUNNING TIME/8640O

1 r

IS DISTANCE TO TARGET YES i . I, r,0 TO 175 (RROP)^ 50000O7

NO 1 t

OOES E^RTH CONSTANT YES > (j) -- o' NO

1 r

NO CALL ROTEQ IS I TSEC - TAN EC. OF ' 50 TO EC. OF DATE YES

' ' IS (TSEC - TAN) (SSGN) < 0? NEXT PAGE

YES

GO TO 125 GO TO 129

S-186 GOTOB-8

PHILCQ WDL DIVISIOM WDL-TR2184

UPDATE TANI BY 1350

CALL NUT AIT TO CALCULATE NUTATION MATRIX

UPDATE TAN BY 8640 I CALL MULT TO MULTIPLY MATRICES

I

1 UPDATE POS.ANO VEL VALUES

I

UPDATE CURRENT TIME, (TSEC1

CALL CHNGP TO DETERMINE IF IT IS TIME TO SHIFT BODY CENTER

HOES OLD 8OOY CENTER, (IORI = NEW BODV CENTER, f NORI 7

SET RS a (X + V + 7 >

is (oa'Rs - INPUT QUANTITY) > 07

YES

n SET XSO . POS. IN EQ. OF 1950. (XPl U VXSOo VEL. IN iEO. OF I95O. 'VXP)

CALL SHIFTP TO _J SHIFT BODY CENTER

S-187 GOTOB-9

JPHILCQ WDL DIVISION WDL-TR2184

DOES STOP I'

YES

STOP ON TIME NO ONLY?

GO TO 8

STOP ON IMPACT?

HAS VEHICLE NO HIT TAHGETT

WRITE OUT "TOO NEAR TARGET"

GO TO 5

IS DISTANCE TO TARGET INCREASING?

YES

WRITE OUT "TARGET RADIUS INCREASING"

GO TO 5

SET RBOPP = CURRENT DISTANCE TO TARGET, (RBOP)

TO TO 6 GOTOB-10 S-188

PHILCQ WDL DIVISION WDL-TR2184

1 * -LABEL GOT8 * -SYMBOL TABLE GOTB CEC2004 SUBROUTINE GOTOB GOTB SUBROUTINE GOTOB(TSTPD) GOTBOO •DIMENSION T(1360).S(iOOO),C(lOOO),IC(300)»VX(3) GOTBOO . DIMENSION VXP<3),XP(3),AE<3),AO(3),APC3),PO(22),VE(22),CA<3) GOTBOO 1,X(3).UM<6),RAD(6),RBOP(6), IMOONB(IO) GOT80Q i;VKB(6),RBO(6),AN(3,3),EN(3,3),EA(3,3) GOTBOO 1,XSO(3),VXSO<3) GOTBOO DIMENSION BP<3,3),TLAST(4,6) GOTBOO DIMENSION ISTAT(20),IONB(6),IMB(10),KS(4,20),KONB(4,6),KMB<4,10> GOTBOO 1*ISA(20) GOTBOO DIMENSION SMEAS(4),BNAME(6),BEACNO(10),TOBM(4) GOTBDO •COMMON T.S»C,IC - - GOTBOO EQUIVALENCE (T,TDUH)•tSrSDUM)»(C»CDUM) GOTB01 EQUIVALENCE (S.(1)*UM)* (S (11), V J ), (SC12) .H), (S (13), D), (S (14 ), RE ) GOTB01 1,(S(900),RAD),(C(9),SSGN),(C(10),TW),CC(11),TF),(C<12),TSECO) GOTB01 2,(C(13),TP1),(C(14),TP2),(CC15),XP),(C(18>,VXP),(C<21),AE) GOTB01 3f (C(24),AO)»(C427),CA),(C(30);TSEC>),(C(33)«X)»(Ct36)«VX) GOTB01 5,(C(46),XSO),(C(49),VXSO), (C(55),U)*(C<56),VKB),,PO> GOTB01 6,CC(84),VE),(C(106),UBO)*(C(112),R80P),(C(120),EN),(C(129),£A) GOTBQ1 7,CC(138),AN),(C(171),BP) GOTB01 C' 8« (lC(l)f N)» (IC(2),IOR), (IC<3),:NOR), (1C ( 4), KSTP ), (IC( 5), KTYPE) GOTB01 9,(IC(6),ITARG),(IC(7),KOUT),(IC(220),IMOONB) GOTB03 EQUIVALENCE (1C(10),ISA),(1C(110),IONB),(IC(140>,1MB),(1C(30),KS) GOTB02 1,(IC(116),KONB), (IC(150),KMB),(C('650),'TPRlNn,(IC(9),LPRlNT) GOTB02 •2»('C(651),TSTRT), (1C (190 ) .LSTAT), (10(191) ,LONB> t (IC( 192), LMB ) GOTB02 3,(IC<8),IMMSUB),(Ct622);TLAST), GOTB02 4»(0(647).TOUT) ,(1C(231),NSTEP),(S(485),ENKEO GOTB02 •CALL SETN(NINpNOUT) GOTB02 C' SMEAS MEANS TYPE OF STATION MEASUREMENT GOTB02 •SMEAS(l) * 6HRANGE. GOTB02 SMEAS(2)9 6HAZ-ELE GOTB02 -SMEAS(3)fl 6HDIROOS GOTB03 SMEAS(4) ~ 6HRNGRAT GOTB03 C' BNAME MEANS BODY NAME GOTB03 -BNAME(l) 6HEARTH GOTB03 BNAM.EC2) 6HMOON. GOTB03 BNAME(3) 6HSUN,. GOTB03

S-189 GOTOB-]

iPHBLCQ WDL DIVISION WDL-TR213i

K=I+NEQV GOTB1320 XP(I)sX(I)+T(I*3) GOTB1330 VXp*T(K) GOTB1340 43 CONTINUE GOTB1350 WRITE OUTPUT'TAPE \OUT,39 GOTB136Q 39 FORMAT(25HOCONDITIONS LEAVING GOTOB) GOTB1370 WRITE OUTPUT TAPE NOUT,750 GOTB138Q 750 FORMAT(21H STOPPED ON TIME STOP) GOTB1390 GO TO 5 GOTB1400 10 .CONTINUE GOTB1410 IF TINT, TPRIN GOTB1S20 708 FORMAT(/7HO KTOP=*I1.7H TSTRs.1E17,8;7H> TSPls,1E17,8,7H TINTs GOTB1530 1>.1E1708,8H TPRINs,lEI7r8) GOTB1540 TSECPsTSEC GOTB1S50 C SUBROUTINE TIMED CONVERTS INPUT , TIMES FROM FORMAT GOTB1555 C CDAYS HOURS),(MIN SEC) GOTB1556 .CALL TIMED(TSTR,TSTRT) GOTB1560 C TSTRT =START TIME FOR CALLING .MATSUB GOTB157Q CALL TIMED(TSP1,TSP) GOTB1580 C TSP =STOP TIME AND INDICATOR FOR NEW DATA GOTB1590 STOPoKTOP GOTB1600 IF(TSP-TSTP)101,101*100 GOTB1610 100 TSPsTSTP GOTB1620 101 CONTINUE GOTB1630 CALL TIMED(TINT,TINV) GOTB1640 C TINV =INTERVAL OF CALLING MATSUB GOTB1650 :CALL TIMED(TPRIN,TPRINT) GOTB1660 C TPRINT=PRINT INTERVAL FOR MATSUB GOTB1670 IF(TINV) 52*52*53 GOTB1680 92 WRITE OUTPUT TAPE NOUT*702 GOTB1690 702 FORMAT(26HOYOU BOTCHED UP INPUT DATA) GOTB1700 •CALL EXIT GOTB1710 93 CONTINUE GOT81720 IF(TSTRT-TSEC) 54*54*158 GOTB1730 34 -CONTINUE GOTB1740 GO TO (152,153)*KMAT GOTB1750 152 TSTRTsTSEC GOTB1760 TOUTaTSEC GOTB1770 GO TO 158 GOTB1780

S-192 GOTOB-14

PHILCQ WDL DIVISBOK WDL-TR2184 u GOidB-(Con'tiOrc/B- ) L] 153 TSTRTsTSEC+TlNV GOTB17C TOUTsTSEC+TPRINT GOTB1S( ; I GO TO 151 GOTB183 -I 158 CONTINUE' GOTB18; TOUTsTSTRT GOTB18J pj DO 84 lal,4 U DO -84 J«l,6 GOTB18E TLASTdfJ) =»0. GOTB186 n 84 CONTINUE GOTB137 1 DO 85 Isl,20 GOTB18E u JSTAT(I) =0 GOTB185 85 CONTINUE GOTB190 H DO 86 lsl,10 GOTB191 Lj IMOONB(I)BO, GOTB19S ~ ~ 86 "-OONTINUE- GOTB193 -l 151 CONTINUE GOTB194 «!' IF(TSP-TSTRT) 52,52.55 GOTB195 55 .CONTINUE GOTB196 _ LSTATsl GOTB197 GOTB19I LM8=1 GOTB19' GOTB20 DO 61 Isly20 GOTB20: GOT820 IF GOTB20! 709 FORMAT (17H STATION NUMBER ,I2,'2H ,,A6,2H 10H MEASURES) BBS a ISA(I) LSTATs2 GOT6206 DO 60 J»l»4 CCCsBBB/2. GOTB21C -DDDBINTFCCCC) GOTB213 IFtCCC-DDD) 57,57,58 GOTB21S 57 CONTINUE ^ GOTB212 n C. THE KS, KONB, AND KMB ARRAYS ARE COLUMN WISE ARRANGED IN BINARY GOTB2t

S-193 GOTOB-15

JPHBLCQ WDL DIVISION WDL-TR 84!

E OUTPUT TAPt N-OUT, 704,BMAME { I) GOTB2300 "I 704 FORMAT (28H VEHICLE TO CELESTIAL BODY ,A6,10H MEASURES) GOTB2310 J LONB=»2 GOTB2320 BBB=IONB(I> GOTB2330 n DO 68 Jsl,4 GOTB234Q f CCCsBBB/2, GOTB2350 " DDD«INTF(CCC) GOTB2360' IF(CCC°DDD) 64,64,65 GOTB2370 fjl 64 .CONTINUE GOTB238Q U KONB(J,I)=0 GOTB2390 GO TO 67 GOTB2400 r 65 CONTINUE GOTB2410 h KONB(J,I)sl GOTB2420 *" WRITE OUTPUT TAPE NOUT , 703, TOBM < J ) GOTB2430 _, 67 .CONTINUE GOTB244Q •' BBB=DDD GOTB2450 ''^ 68 CONTINUE GOTB246Q 62 .CONTINUE GOTB2470 'd •DO 74 I = l',10 GOTB2480 U IF (IMB(D) 74,74,69 GOTB2490 69 .CONTINUE GOTB2500 WRITE OUTPUT TAPE NOUT.706,I GOTB2S10 706 FORMAT <33H VEHICLE TO .LUNAR BEACON NUMBER ,I2.10H MEASURES) GOTB2520 0 GOTB2530 BBB=IMB(I) GOT82540 DO 73 J»l,4 GOTB2350 -' CCC=8BB/2e GOTB2560 DDD=INTF(CCC) GOTB2970 "} IF(CCC=DDD) 70.70.71 GOT82580 J 70 • CONTINUE GOTB2590 KMB

S-194 GOTOB-16 ] 11 PHILCQ WDL DIVISION WDL-TR2184

...G(h - (Cont'd)

DO 77 1=1,4 GOTB231 CALL DE6FP3CTT) GOTR232 77 CONTINUt GOTB233 TSEC = IStCO + T(2) GOTB2S4 DO 157 1=1,3 GOTB235 K=I+NLQV GOTH286 XP(I) = x(I)*T(I*3) GOTB237 157 VXP(I) = VX(I)*T(K) GOTB238 TCM=TGM*TINV GOTB239 IF(TCM-TSP) 150,150,149 GOTB290 149 TCM=TSP GOTB291 150 CONTINUt GOTb292 CALL MATSUB GOTB293 IF 127,125,127 127 IF( )142,126,126 GOT33U7 142 IF ( (TbEC-TAN)*SS6N)125,129,129 126 CALL KOTF.U(TIME,EA) GOTB30 TAN1 = TAM*1350. *SSGN GOTH31H GO TO 140 GOTB311 J 129 CALL NUTAIT ( TIME ,CM, CRUD, DDC,EN ,EPSIL) G 0 T R 3 1 2 1 A'N = TANi + 8t>40 , *SSGN G 0 T H 3 1 3 140 CALL MULT(EN,EA, AN,0) GOTB314 125 COMTINUE GOTd315 DS = FNOr?M( T(4) ) G 0 T H 3 1 b CO 11 1=1,3 G Q T B 3 1 7 G 0 T d 3 1 6 XP(I)=x

S-195 GOTOB-]

SPHBLCQ WDL DIVISION WDL-TR2184 0 0

XSO(I)»XP(I) GOTB3300 VXSO(I)sVXP(I> GOTB3310C 16 CONTINUE GOTB3320 GO TO 1 GOTB3330n 12 'CONTINUE GOTB3340|J CALL SHIFTP(IOR»NOR,U»UM»XP,VXPpPO, VE.'TT*TW, T(2) ) 60183350° GO TO 15 GOTB3360 14 'CONTINUE GOTB337of] ITARG = ITARG GOTB3380U IF(.STOP»10 520,83,83 GOTB3390 83 CONTINUE KSTPsKSTP GOTB341'0; iGO TO (17*18,8),KSTP GOTB3420 17 .CONTINUE IF(RBOPCITARG)-RAD(ITARG))19,19,18 GOTB34401,,! 19 CONTINUE idi) WRITE OUTPUT TAPE NOUT.39 GOTB3460 WRITE OUTPUT TAPE NOUT,34,RBOP(ITARG),RAD(ITARG),ITARG GOTB3470 34 FORMAT(21H TOO NEAP TARG RBOPe,1E17,8,5H RAD=,1E17,8,6H TARG=,I1)GOTB3480 KTYPE-2 GOTB3490 •GO TO 5 GOTB3500 --) 18 CONTINUE GOTB3510 , IF

;-i96 GOTOB-18

PHILCQ WDL DIVISION- n Q WDL-TR2184

Subroutine: GOTOR

Purpose: To solve Kepler's equation for incremental excentric anomaly on a conic section given the incremental mean anomaly (time).

f)

Calling Sequence; CALL GOTOR (K, VM, C. F, El)

Input and Output

Symbolic Program Mathematical Data I/O Name or Dimensions Symbol Dimensions Definition Location or Units

-I I K 1 K Orbit type (1) Elliptic (2) Hyperbolic

I VM 1 AM RAD Incremental mean anomaly

I C 2 C1C2 Kepler's equation coefficients

0 F 4 F Trigonometric functions of

incremental eccentric anomaly

I/O 1 AE RAD Incremental eccentric anomaly

Common storages used or required: None Subroutines required: None

Functions required: SIN. COS.EXP

Approximate number of storages required: 476 DEC

3-197 GOTOR - 1

IPHILCQ WDL DIVISION WDL-TR2184

Discussion (See subroutine STEPC)

The incremental eccentric anomaly, 9, is implicitly expressed as a function of incremental mean anomaly, AM, and conic coefficients, C, and C_, by transcendental equations

AM = (cp-sin cp) + C. sin cp - C.(cos cp-1) elliptical

AM = (sinh rp-cp) + C, sinh cp + C (cosh rp-1) hyperbolic

The two equations above may be written as a single equation

AM + C1f3(cp) + C2f4(cp)

if the convention below is adopted.

For the elliptical case, let

= cp-sin cp

f2(9) = 1-cos 9

= sin rp

= cos cp

and for the hyperbolic case, let

= sinh 9-9

f2(9) = cosh

sinh CD

f/(9) = cosh cp S-198 GOTOR - 2

PHILCQ WDL DIVISION WDL-TR2184

When |cp| ^ lf numerical accuracy requires that f,(cp) and f-(cp) be computed by truncated series expansions. Otherwise, the computer functions SINF, COSF and EXPF are used in the computation.

The slope of the function

F(cp) = £1(«p) -I- C1f

at cp is seen to be

F'(cp) - £2(

F(cp) is a monotonically increasing function of cp so that any solution

of the equation F(cp) u= AM is obviously unique. Newton's method of itera- tion is used. That is, letting cp be the nth estimate of cp, the (n+l)st estimate is calculated from

AM-F(cp )

The iteration is halted and cp is said to be cp when

8 cp .,~i~cp : 3. x 10" Li or when n = 20, whichever occurs first. The f .(cp) as well as cp are out- i* I put from GOTOR to avoid their re-computation outside the subroutine.

_GOTOR - 3

JPHILCQ WDL DIVISION WDL-TR2184

GQTOR tJ

* LABEL GOTR "'} CEC2091 NEW GOTOR GOTR |J SUBROUTINE GOTOR(K,VM,CpF,El) GOTR0010 " 'DIMENSION C(2),F<4) GOTR0020n NMAX=20 GOTR0030 U • NSQ GOTR0040 V GO TO (l»2)fK GOTR0050 1 -CONTINUE GOTR0060 fl C FIRST GUESS IS OBTAINED 'FOR ELLIPTICAL CASE 60TR0070U 8 .CONTINUE GOTR0080 IF(El-li>30,31,31 GOTR0090 n 30 CONTINUE GOTR0100 ;J D2a£l*El GOTR0110 F(l)sEl*D2*(Ool6666667E*00-D2*(0,833333333E-02-D2*(Otl98412698E-03GOTR0120 r- l=D2*(Oe275573192E»05«D2*Oo25052!083E-07)))) GOTR0130 t F<2>5> D2+(085-D2+(0641666667E=l-D2*(0,13888889E-2«D2*(Ot24801587E=GOTR0140 ^ 14=D2*0»275573l9E-6)))) GOTR0150 F(3>aEl-F(l) GOTR0160 R F(4)»li"F(2) GOTR0170 B GO TO 3 u GOTR0180 31 CONTINUE GOTR0190 -7 FC3)aSINF(El) GOTR0200"' F(4)=COSF(E1) GOTR0210 F(l)aEl-F(3) GOTR0220 FC2)ai.-F(4) GOTR0230 F] GO TO 3 GOTR0240 *-* 2 .CONTINUE GOTR0250 C FIRST GUESS IS OBTAINED FORHYPERBOLIC ICASE GOTR0260 H 9 CONTINUE GOTR0270 \J IF(Etbl.)32»33«33 GOTR0280 32 '.CONTINUE GOTR0290 ri D2aEl*El GOTR0300 I F(l) sEl*D2*<0.16666667E*00*D2*(Oo83333333E-02*D2*(0,198412698E-03GOTR0310 l*D2*(Oo275573l92E=05*D2*0,25052l083E-07)))) GOTR0320 F(2) 3D2*<0,5*D2*(0.41666667E«=1*D2*(0.13888889E = 2*D2*(0,24801587EGOTR0330 1»4*D2*0927557319E=6)») GOTR0340 F(3)8E1*F(1) GOTR0350 F(4)ale*F(2) GOTR0360 GO TO 3 GOTR0370 33 CONTINUE GOTR0380 EXso5*EXPF(El) GOTR0390 :OX»o'25/EX GOTR0400 F(3)BEX=OX GOTR0410 F(4)=EX*OX GOTR0420 F=El GOTR0430 F(-2)8F(4>-1, GOTR0440 3 CONTINUE GOTR0450 CMnF(l)*C(l)*F(3)*C(2)*F(2) GOTR0460 .DMBF(2>*C(1)*F<4)*CC2)*F(3) GOTR047Q ^DEs(VM=CM)/DM GOTR0480 ERROR=DE GOTR0490

S-200 GOTOR-4 j PHILCQ WDL DIVISION ;-} WDL-TR2184

CGOT6E(Cont" Q fd)_ 1 1 ABsABSF(DL) GOTK050 n IF(AB-l,)10ilOf11 GOTK051 -.-! 11 CEsDE/AB GOTH05P J 10 E2atl*Dt GOTR053 IF(A8SF((E2«El)/(E2+El))-3sE-8)4,4,5 GOTR054 5 CONTINUE GOTR055 IF(N-NMAX)6,7,7 GOTR036 Q 7 CONTINUE GOTR057 GO TO 4 GOTH058 6 CONTINUE GOTR039 N=N+1 GOTR060 ElsE2 GOTR061 GO TO (8,9),K GQTR062 4 CONTINUE ' GOTR063 RETURN " ------GOTR064 END GOTR

S-201 GOTOR-5 r

LJPHILCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine: GUID

Purposet To determine the times when guidance corrections are to be made. Compute the correction to be made and determine the error in the correction being performed. Then the subroutine updates both the state and guidance covariance tnatricies for the correction.

Calling Sequence: CALL GUID Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I Quantities obtained from common

0 Quantities returned to common

Common storages used or required: T, S, C, 1C INV3, MARX, SETN, SQRTF, Subroutines required: TIMED Functions required: (FIL)(STH) Approximate number of storages required: 1022 DEC

S-203 GUID-1

JPHILCQ WDL DIVISION WDL-TR2184

Theory for updating covariance matricies for a guidance correction.

The following quantities will be used in the derivation to follow.

PAR(to) = covariance matrix of errors at injection

x(t) = estimate of state at time t

x(t) ~ error in estimate of state at time t

x(t) = true state at time t ~ ~ T E(x x )= P(t) - covariance matrix of error in estimate at time t

The quantities x, ~, and x are all considered as deviation quantities from the nominal trajectory which arrives at the target in the desired manner.

Using linear theory for the deviations

x(t) = $ X(to)

where $ is the transition matrix relating unit deviations in injection errors to deviations at time t. Then

PAR(t) = E(x(t) x(t)T) = $PAR(to)*T (I)

where PAR(t) is the covariance matrix of deviations from the nominal tra- jectory prior to any midcourse corrections.

Assuming we have a transition matrix which relates the vehicle state at time (t) to some desired conditions at the target, a guidance law may be derived to meet the desired end conditions. The two laws which the program can solve are: (1) Fixed Time of Arrival.and (2) Constant Energy with Respect to the Target.

3-204 GUID-2 'l-

j PHILCQ WDL DIVISION n " WDL-TR2184

C(T) = (Ai Aa)/x(t)> (2)

3x1 3x6 6x1

where C(1) = target conditions at time T

A3) = transition matrix

For Fixed~Time of Arrival:

I /* T \ C(T) =| y(T) j "1 ^z(T) /

3 x 1 U3 x 1 > I For Constant Energy with Respect to the Target:

' ^ B-T(T)\ C(T) = ( 6 B-R(T) j VINF /

The guidance law is derived such that the estimate of £(T), which represents deviations from the nominal trajectory at the target, is zero when the vehicle arrives at the target.

I-f •.J C(T) = A! x(t) + A8 x(t)

3x1 3x3 3x1 3x3 3x1 (3)

1 S-205 GUID-3

*s IPHILCQ WDL DIVISION WDL-TR2184

The velocity correction is selected such that:

C(T) + A3 x - 0 = A! x(t) + Aa x(t) + Aa x (4) 5 S

x is multiplied by Aa because as can be seen in equation (3), Aa is a O matrix of sensitivity partials relating C(T) to velocity deviations at time (t).

Solving equation 4 for x yields O

x = Aa1 C(T) = -A^Ai x(t) - I x(t) (5) _g _ _ _ 0

(6)

We are interested in the covariance matrix PAR at (T), that is, at the time of arrival, since this is the covariance matrix of errors in guidance.

T If we find E (x(t) x(t) ) after a correction, the use of equation (1) will propagate it to the target.

Let subscript (a) define the state after a correction, and subscript (b) define the state before the correction.

Then

x" —a x —a

S-206 GUID.4

PHILCQ WDL DIVISION ;J

WDL-TR2184

where x is the computed velocity correction and q is the error in making g the correction. This is under the assumption of an impulsive correction. Utilising equation (5), and since x = x 4- x" S & &

(7)

and

.'—-\

-AgAj. 0 -A3Aj. 0

6x6 6x6 6x6 6x6 6x6

o\ (o " + CROSS TERMS

6x6 The cross terms are zero because:

1. E (x x ) = 0 because of using an optimum estimation procedure

2. E (x q x) E(S) = 0

E (x q T) = E(x xT) E(U) = 0

for the two types of correction errors described below.

The two types of errors considered in making a guidance correction are shutoff error and pointing.

A. Shutoff Error Let the correction by

GUID-5

JPHILCQ WDL DIVISION WDL-TR2184 [

•v The shutoff error is

I ~t = S x s ~g i"

a where S is a scalar random variable which is gaussian (0, s)- ^

T. B. Pointing Error The pointing error is € = U X x r O ^

where U = (U , Uy , U ) is a three dimensional spherical gaussian f- random variable with sigmas equal to a and mean 0. ! P c,

The two types of expected values of interest in equation (8) for the ',' T T ' error in correction are E (qq ) and E (x q )

! q = e P + e s «

—./ A \ / 2 *^ \ -n f * * * \ I 3—-/»l»\—, E(q q ) = (as - ap ) E(xg xg ) + a? E(xg xg) I

E(x ) = 0

The two remaining expected values in equation (8) may be written as follows:

E(x xT) = E(x - SO (x - "x)T = E(x xT) -E(x 'x'1) + E(^T ^T) -E(7 xT) !

but E(x xT) = E ([5 + x] x1) = E (x xT) I"

since E(x x) = 0 f

/. E(x xT) = E(x xT) -E(x ^) f

E(x xT) = PAR, - P, i b b , t,

S-208 GUID . 6

RHILCQ WDL DIVISION! WDL-TR2184

Finally

"l 0 I 0 PAR PAVPb l i -A3 Ai 0 -AaAi 0

6x6 6x6 6x6 6x6

0 0

0 ECqq1)

- 6x6 ^6x6

The covariance matrix of the knowledge of the state is updated to account for the lack of exact knowledge of the correction.

0 0 P = P, + 6 a b 0 E(qqT)_ u 6x6 6x6 6x6

where 6 indicates the ability to monitor (ON BOARD) the error in correction.

Q

U

3-209 GUID-7.

JPHILCQ WDL DIVISION "DL-TR2184

SUBROUTINE GUID

SET K - L - 1 I HAVE ALL CORRECTIONS BEEN MADE

HOW ARE CORRECTION TIMES DETERMINED TIME D

IS IT TIME FOR CORRECTION 0 3

HAVE 6 CORRECTIONS BEEN MADE SET K = 2

IS OUTPUT DESIRED

SET UP TIME FOR YES NEXT CORRECTION

COMPUTE RMS MISS A RMS KNOWLEDGE OF MISS

TEST L 1_ = L = 2

RMSMIS 0 OR

SET K = Z

10 M-

S-210 GUIU-8

PHILCQ WDL DIVISSON WDL-TR2184

IS OUTPUT DESIRED

TEST K K = 2

COMPUTE EXPECTED VELOCIT1* CORRECTION

TEST TYPE OF GUIDANCE , FT A

WRITE OUTPUT WR TE OUTPUT FIXED TIME CONSTANT ENERGY ARRIVAL GUID DATA GUID DATA

TEST K K = 2

UPDATE PAR MATRIX FOR CORRECTION

0 COMPUTE ERROR IN MAKING CORRECTION

•, J

MODIFY P AND PAR MATRICES FOR ERROR IN CORRECTION

Q TEST TYPE OF GUIDANCE CTE

WRITE OUTPUT FTA WRITE OUTPUT CORRECTION DATA l.T€ CORRECTION DATA I

S-211 GUID-9

IPHILCQ WDL DIVISION WDL-TR2IS4

LABEL GUID • SYMBOL TABLE GUID EC2005 SUBROUTINE GUID GUID SUBROUTINE GUID GUIDOQOO COMMON T.S.C.IC GUID0010 DIMENSION T(1360)»S(1000),C<1000).IC(1) GUTD0020 1,TPAR(3.6).PAR(6»6).P(6«6).DUP<3*.3) GU1D0030 2,TGUID(6).DUM(3,3),DUN(3,3).DUMM<6,6) GUID0040 EQUIVALENCE (T.TDUM), ( S*SDUM ), ( C<, CDUM ) GUIDOOBO l.(IC.ICDUM),(C(568),TPAR),(C(460)*PAR) GUID0060 2,(C(652),P). GUID0070 3,,(S(476),TGUID),tS(483).RATIO) GUTD0090 5,(S(473),QQPT)*(S(471)/QQSO),(S(484).DMONIT> GUID0100 CALL SETN(NlNpNUTS) GUID0105 IGD=NUMBER OF GUIDANCE CORRECTIONS TO BEi MADE GUTD0110 N KEY USED TO TEST NUMBER OF GUIDANCE'lCORRECTIONS WHICH HAVE GUID0120 BEEN M-ADE GUID0130 SU75) 0 = GUIDE ON INPUT TIMES + GUIDE ON A RATIO TEST GUID0140 IGDTP l.FTA 2.CTE 3.MINIMUM FUEL GU1D0150 DMONIT=ACCURACY OF MONITORING THE GUIDANCE CORRECTION GUID0160 NOUTaNOUT GUID0170 GUID0180 GUID0190 GUID0200 1 IF(S<475»3,3,2 GUID0210 2 L = 2 GUID0220 GO TO 7 GUID0230 3 IF(TGUIDE-TSEC)4,4,6 GUID0240 4 CONTINUE GUID0250 GUID0260 GUID0270 IF(N-7)5,6,6 GU1D0280 CALL TIMED(TGUID*DUM(3,3) GUID0340 CALL MATRX(TPAR,PAR,DUNp3,6,6*l) GUID0350 RMSMISsSQRTF(DUN(l,l)*DUN(2«'2>*DUN(3,3) GUID0360 • GO TO (10*8), L GUID0370 8 IF«RMSKMS/RMSMIS>-RATIO>9,9>10 GUID0380 9 GUID0390 GUID0400 10 GO TO (11. 12), NOUT GUID0410 11 GO TO (15,12>SK GUID0420 12 CONTINUE GUID0430 DO 13 1*1.3 GUID044Q DO 13 JR1*3 GUID0450 JJsJ+3 GUTD0460

S-212 GUID-10 ( RHILCQ WDL DIVISION! WDL-TR2184

IGUID (Cont'd)

>DUP(I» J)=~TPAR(I, JJ) GUID047 13 CONTINUE GUID048 :CALL INV3(DUP,3,D£T) GUID04? DO .14 Isl,3 GUIDOSO DO 14 jBl,3 GUID051 •DUM-DUM(I*!J) GUIDOS2 D'^ 14 .CONTINUE GUID053 RMSPAP = SQRTF(PAR(1,1)+PAR('2,)2HPAR(3,3) ) GUIDOS4 RMSPAVsSQRTF(PAR(4,4)+PAR(-5*.5>*PAR(6,6) ) GUID055 CALL MATRX(DUP,DUM,DUM,3,3,3,1> GUID096 DUM IS THE CQVARIANCE MATRIX OF INDICATED VELOCITY CORRECTION GUIDOS7 RMSV2sDUM(l,l)*DUM(2-,2>*DUM<3,3) GUID058 RMSV=SQRTF(RMSV2> GUIDOS9 IGDTP=IGDTP GUID059 GO TO (25,26) ,IGDTP GUID059 25 CONTINUE GUIDOS9 WRITE OUTPUT TAPE NUTS, 800 , RMSMIS,RMSPAP, RMSKMS, RMSPAV, RMSV GUID060 800 FORMATU8HOGUID DATA FOLLOWS,/ GUID061 124H -RMS FTA TARGET ,MlSS»»E15.8, GUID062 3 225H RMS POS DEV FROM GUID065 WRITE OUTPUT' TAPE -NUTS, 802, RMSMIS,RMSPAP',RMSVIN, RMSPAV, RMSKMS.RMSVGUID066 802 FORMAT(18HOGUID DATA FOLLOWS,/ GUID066 124H RMS TARGET 'POS MlSSs,El5.8, GUID066 225H RMS POS. DEV FROM 'NOMs, £15 ,8, / GUID066 „_, 324H RMS VINFINITY MlSSs,E15.8, GUID066 . { 425H RMS VEL DEV FROM NOMs,E15,8,/ GUID06-6 -' 324H RMS KNOW. OF MlSSs,E15.8, GUID066 525H •RMS VEL REQB,E15,8) GUID066 H 27 CONTINUE GUID066 0 GO TO (15,16),K GUID067! 15 RETURN GUID068i n 16 CONTINUE GUID069I !",JC FOLLOWING IS UPDATING 'OF PAR MATRIX FOR GUIDANCE CORRECTION GUID070 DO 17 1=1,6 GUID071 DO 17 Jsl,6 GUID072 }:} •PAR(I.J)spAR(I,J)-P{I,iJ) GUID073 & PAR(J,I)sPAR(I,J) GUID074 17 CONTINUE GUID075 f] CALL MATRX(DUP,TPAR,DUP«3,.3V3,0) GUID076 (J 'DO 19 1 = 1,3 GUTD077 IIaI+3 GUID078, DO 18 J=l,3 GUID079 GUID080 '"* •DUMM(II,J)=DUP(I,J) GUID081

S-213 GUID-1

WDL DIVISION WDL-TR2184

;UID (Cont'dl

DUMMd,JJ) = 0. GUID0320 DUMMdlt JJ)sO. GUID0830 18 DUMMd,J) = 0, GUID0840 19 DUMMd, I)=l, , GUTD0850 CALL MATRX(DUMM,PAR,PARp6p6*6,l) GU1D0860 DO 201 = 1,6 GUID0.870 DO 20 J=I,6 GUID0880 PAR(IfJ)=PAR GUID1070 P(JJ,II)=P(II,JJ) GUID108Q 23 CONTINUE GUID109Q CALL MATRX(TPARpPAR.DUN,3,6,6,l) GUIDUDO RMSPAP=SQRTF(PAR(1,1)+PAR(2,2)*PAR(3,3)) GUID1105 RMSPAP=SQRTF{PAR(1,1)+PAR<2»2)+PAR(3,3>) GUID1110 RMSPAV=SQRTF(PAR(4,4)+PAR(5,5>+PAR(6,6)) GUID1115 GO TO (28,29),IGDTP GUIDH20 28 CONTINUE GUID1125 RMSMIS=SQKTF(DUN(1,1)+DUN(2»2)*DUN(3,3» GUID1130 WRITE OUTPUT,TAPE NUTS,801,RMSERR,RMSPAP,RMSMIS,RMSPAV GUID114Q 601 FORMAT(32H ***GUIDANCE CORRECTION MADE***, GUID1150 1/24H RMS ERROR IN CORR, =,E15,8, GUID1160 225H RMS POS DEV FROM NOM=,E15,8, GUID1170 3/24H RMS MIS AFT CORR.=,E15.8, GUID1180 425H RMS VEL DEV FROM NOM=,E15,8) GUID1190 GO TO 15 GUIU1200 29 CONTINUE GUID1210 RMSMIS=SORTF(DUN(1,1)*DUN(2,2)) GUID1220 RMSVIN=SQRTF(DUN(3,3)) GUID1230 WRITE OUTPUT TAPE NUTSp803,RMSERR,RMSPAP,RMSMIS,RMSPAV,RMSVIN GUID124Q 603 FORMAT(32H ***GUIDANCE CORRECTION MADE***, GUID1250 1/24H RMS ERROR IN CORR.=,E15,8, GUID1260 225H RMS POS DEV FROM NOM=,E15,8,/ GUID1270 3/24H RMS POS MIS AFT CORR. = ,E15 , 8, GUTD128Q

S-21A QUID = 12

WDL DIVISION PHIUCQ u

Pnnt- ' <

425H RMS VEL DEV FROM NOMs,E15,8, GUIU12S 5/24H RMS VINF AFT CORR.s,E15,8) GUID13( fl30 CONTINUE GUTU133 GO TO 15 GUID13J END GUID

ni U

S-215 GUID-13

iPHILCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine; HOUR

Purpose ; To provide a reading of the printer clock in hours since midnight. This is the STL subroutine RW HOUR.

Calling Sequence: CALL HOUR(A)

Input.and Output J Symbolic Data Program Mathematical I/O Name or Dimensions Definition Dimensions Symbol Location or Units

0 A hours Time

Common storages used or required: None

Subroutines required: None Functions required: None Approximate number of storages required: 86 cells

S-217 HOUR-1 'PHILCQ WDL DIVISION WDL-TR2184 i*-

Restrictions

Clock advance is suppressed during readout so that elapsed time will be off .4N seconds where N is the number of times the clock is selected.

HOUR will always provide a floating point number if the printer is available. Thereforeya faulty clock or the wrong board will be indicated.

Use

The main application of HOUR is to time cases through use of the FINP "CLOCK" option.

S-218 HOUR-2

PHILCQ WDL D'vsiON WDL-TR2184

FAP HOUR HOUR SUBROUTINE 10-27-31 HOUROQO ENTRY HOUR HOUR001 VJ HOUR ,CLA 1,4 HOUROQ2 STA SSAM HOUR003 SXA SAMX,4 HOUR004 SXA , SAMX + 1,'2 HOUR005 TCOA * DELAY HOUR006 HOUR007 RPRA ECHO ;CHECK HOUR008 SPRA b READ CLOCK HOUR009 SPRA 9 SUPPRESS --SPACING HOUR01D ,SPRA 10 AND PRINTING HOUR011 AXT - -24_, 4._ _ HOUR012 STZ SAMZ+24,4 HOUR013 TIX *-l»4t 1 HOUR014 RCHA SAMJO TRANSMIT CLOCK READING- HOUR015 TCOA * HOUR016 STZ •SAMZ + 18 HOUR017 STZ SAMZ+20 HOUR018 AXT 18,4 HOUR019 SAM1 :CAL SAMZ+18,4 8-4 LEFT ADD ECHOS HOUR020 ORS SAMZ+18 AND CONVERT TO HOUR021 LDQ SAMZ+18 BCD HOUR022 'PXD HOUR023 AXT 5,2 HQUR024 J SAM3 LGL 1 HOUR025 ALS 5 HOUR026 TIX SAMS, 2,1 HOUR027 LGL 1 HOUR028 ACL SAMZ+20 HOUR029 :SLW SAMZ+20 HOUR03C TIX SAM1,4,2 HOUR031 STZ SAMZ*22 HOUR03 .AXT 6,4 HOUR03 LDQ SAMZ*20 L! SAM4 PXD HOUR03E LQL 6 HOUR03< .SLW SAMZ+23 CLA SAMZ*22 HOUR03J ALS 2 HOUROS? ADD. SAMZ*22 HOUR041 ALS 1 HOUR04! ADD SAMZ*23 HOUR04J •STO SAMZ*22. HOUR04o TIX SAM4,4,1 HOUR04.1 .LDQ SAMZZ HOUR04 •DVP SIX HOUR04 XCL HQUR04 ORA SA HOUR04 FAD SA HOUR04<

S-219 HOUR- JiPHILCQ WDL DIVISION WDL-TR2184 fj O ' HOUR (Cont'd) CAS M24 HOUR0500 FSB M24 MOD 24 HOURS HOUR0510 '") NOP MIDNIGHT ONLY HOUR0520 ;J SSAM STO **0 HOUR0530 '' SAMX AXT **0,4 HOURO§40 AXT **0,2 HOUR0550 id TRA 2,4 EXIT HOUROS60 & SAMIO IOCP SAMZ,2*0;26 NON TRANSMIT 26 COPIES HOUR0570 IOCP SAMZ,0,1 27TH COPY 9L ECHO HQUR0580R IOCP SAMZ + 1,2,3 NON TRANSMIT 9R,12L,12R HOUR0390 (:J IOCD SAMZ*2,0.16 8L TO 1R ECHOS HOUR0600 SA OCT 214000000000 HOUR0610 r-, M?4 DEC 24, . HOUR0620 ! \ SIX DEC 60QOB15 HOUR0630 "* SAMZZ P2E HOUR064Q SAMZ BSS 24 HQUR0650 V/j END HOUR0660 ^ 3 3 3 J 3

0 D

S-220 HOUR-4 ',

PHILCQ WDL DIVISION WDL-TR2184

Subroutine: HPHT

Purpose; To perform the matrix multiplication (RMS) = H-P-H . The square root of (RMS)3 is taken and RMS, which is the standard deviation of the parameter being considered, is output from the subroutine.

Calling Sequence: CALL HPHT (H, P, RMS)

Input and Output

Data Symbolic Program Mathematical I/O Name or Dimensions Definition Location Dimensions Symbol or Units d PAR I H (1,6) ^ STATF; Parameter Partial Matrix I P (6,6) E(X X T) State Covariance Matrix

0 RMS 1 Standard deviation of parameter due to state variance.

Common storages used or required: None Subroutines required: None Functions required: SQRT Approximate number of storages required:

S-221 HPHT - 1

IPHILCQ WDL DIVISION WBL-TR2184

HPHT

LABEL HPHT SYMBOL TABLE HPHT SUBROUTINE HPHT(H,P,RMS> HPHTO 000 DIMENSION H(6),P(6,6),DUM(6) HPHTO 010 DO 1 m.6 HPHTO 020 DUM(I)=0, HPHTO 030 DO 1 J = l,6 HPHTO 040 DUM

t 3 3

S-222 HPHT -2

PHILCQ WDL DIVISION! WDL-TR2184

Subroutine: INPUT

Purpose; To transform input initial conditions of position and velocity in various coordinate systems to Cartesian coordinates with respect to earth's equator and equinox of 1950. Input may be Cartesian referred to (1) mean equator and equinox, 1950; (2) true equator and equinox of date; (3) earth-fixed or spherical; (4) mean equator and equinox of 1950; (5) true equator and equinox of date; (6) earth-fixed.

Calling Sequence: CALL INPUT (K, XOUT, VOUT, TW, TF, AN, XIN, VIN)

Input and Output

Symbolic Data Program Mathematical I/O Name or Dimensions Definition Dimensions Symbol Location or Units

I K 1 Type of input: K=l for (1) above, etc. see fol- 0 XOUT 3 lowing pgs Position, equinox 1950.0

0 VOUT 3 Velocity, equinox 1950.0 I TW - 1 days Whole number of days past 1950. I TF 1 days Fractional number of days past TW

0 AN 3,3 Transformation matrix from system (D to (2) see fol- I XIN 3 lowing pgs Input position vector see fol- I VIN 3 lowingjgs Input velocity vector Common storages used or required: None ROTEQ, NUTAIT, MULT, RVIN, 0 Subroutines required: INV3, GHA, SETN Functions required: SIN, COS

Approximate number of storages required:

S-223 INPUT - 1

PHILCQ WDL DIVISION ,3 WDL-TR2184

Input format: For Cartesian coordinates: rK = 1,2,3~1\ IPl j

XIN(l) = X P XIN(2) = Y L! XIN(3) = Z Q VIN(l) = X CJ VIN(2) = Y VIN(3) = Z Jj

For sperical coordinates: [K = 4,5,6]

XIN(l) = R = magnitude of radius vector XIN(2) = 0 = declination (degrees) XIN(3) = 9 = right ascension (degrees) VIN(l) = V = magnitude of velocity VIN(2) = Y = flight path angle (degrees) VIN(3) = o = azimuth angle (degrees)

Input Transformations:

K = 1 The input is in mean equinox of 1950 and no transformation is required

XOUT5() = XIN5() VOUT50 = VIN5() 3x1 3x1 3x1 3x1

j^ = 2 Subroutines ROTEQ and NUTAIT are called to obtain the trans- formation matrix, AN, from mean equator 1950 to true equator of date

T T 70UT50 = (AN) XINDATE ^OUT5Q = (AN) VW^£ 3x1 3x3 3x1 3x1 3x3 3x1

S-224 INPUT - 2

PHILXTQ WDL D,V,S,ON; I o WDL-TR2184

K q 3 The earth fixed Cantesian coordinate system is assumed to rotate with the earth. The X-Y plane is coincident with the earth's true equator of date, the X axis lying in the Greenwich meridian and the Z axis along the earth's spin axis. Subroutine GHA is called with time,!, to (T) obtain the Greenwich hour angle, y » °f tne true vernal equinox of date. The transformations from earth fixed coordinates to true equator of date are the following:

X, Y, Z'TRUE EQUATOR DATE

x, y, z : EARTH FIXED

Y Y u cos -sin 3 sinY1 cos'Y 3x1 DATE

and

S-225 INPUT - 3

JPHILCQ WDL DIVISION WDL-TR2184

cosV -sinV' v i DATE

3x1 DATE

y V / -sin -cos W I cosV' -sin'V Vo o J\J 1 mn *- *'^

where W = 'jTfv(t)f = earth's rotation rate

Subroutines ROTEQ and NUTAIT are called to obtain the AN transforma- tion which completes the transformation to equator 1950.

T T XOUT = (AN) X_A__ VOUT = (AN) "* 3x1 3x3 3x1 3x1 3x3 3x1 "J J K ° 4. 5, or 6 In each of these cases, subroutine RVIN is called to transform the spherical sets of coordinates to Cartesian coordinates of ; ! the same reference frame. Following this spherical to Cartesian conver- sion, the transformation procedures which are followed for the transforma- tion to 1950 are identical to those described for the corresponding reference frames for K = 1, 2, or 3.

S-22O O£6. INPUT - 4 'i ' t J

PHILCQ WDL DIVISION! WDL-TR2184

SUBROUTINE INPUT

25

COMPUTE MATRIX AN TO ROTATE FROM EQUATOR B EQUINOX OF 1950. O TO DATE

r,;,] OUTPUT SPHERICAL INPUT

OUT PUT t CARTESIAN INPUT

1 ANI- AN

OUTPUT EQUATOR OF 1950

1 I.)

OUTPUT- EARTH FIXED

OUTPUT u. EQUATOR OF DATE COMPUTE GREENWICH HOUR ANGLE GHAN MULTIPLY GHA COORDINATES (CARTESIAN) BY ANI

COMPUTE EARTH' S K > 2? ROTATION EFFECT VPX, VPV ' !

J INCLUDE A ROTATION ADD VPX, VPY THROUGH GHAN TO X, Y IN ANI

S-227 INPUT-5

PHILCQ WDL DIVISION WDL-TR2184 n '

INPUT 0 * LABEL INPT n * SYMBOL TABLE INPT CEC2013 SUBROUTINE INPUT INPT U SUBROUTINE INPUT(K,X,V,TW,TK,AN,XIN.VIN) INPTOOOO XIN AND VIM ARE INPUTS, X AND V ARE OUTPUTS IN EQUINOX 1950 INPT0010 F] K IS TYPE INPUT (1) EQUATOR 1950, (2) EQUATOR OF DATE (3) INPT0015 Lj EARTH-FIXED INPT0016 <4>,<5),(6), ARE SPHERICAL INPUT RESP*» (1)*(2),(3) INPT0020 o DIMENSION X(3),V<3),SP(6),EN<3.3),A(3,3)*AN<3,3),ANI<3,3),B<3,3) INPT0030 M DIMENSION XIN(3),VIN<3) INPT0040 " CALL SETN INPT0230 u K. * K-3 INPT0240 16 DO 12 Isl,3 INPT0250! J » 1 + 3 INPT0260 <- SPd) = X(I) INPT0270 12 SP = V(I) INPT0280 f GO TO (5.7,7), K INPT0290' 5 WRITE OUTPUT TAPE NOUT,18 INPT0300 18 FORMAT(16H EQUATOR OF 1950) INPT0310 r GO TO 13 INPT0320 \- 7 CONTINUE INPT0330t - DO 6 I=l>3 INPT0340 DO 6 J=l,3 INPT0350 f 6 ANld,J) = AN(I.J) INPT0360 I CALL INV3(ANl,3,D) INPT0370 IF (K«2> 10,10,8 INPT0380 r 8 DD = EN(2,1) INPT0390| WRITE OUTPUT TAPE NOUT,20 INPT0400 20 FQRMAT<12H EARTH FIXED) INPT0410 TS = TF*864QO. INPT0420 j CALL GHA(TS,TW,GHAN,DD,OMEGA) INPT0430 l OMEGA = OMEGA*.017453296 INPT0440 • 3 iJ:

S-228 INPUT=6 ," PHIL.CQ WDL DIVISION. WDL-TR2184 { i

INPUT (Cont'd

GHAN = GHAN*.017453296 SPU)=SP<4)-OMEGA*SP<2> SP<5')=SP<5)+OMEGA*SP<1) CALL ROTATE(3,GHAN,B*-1>' CALL MULTCANI»B,£N,-1> DO 9 1=1,3 DO 9 J=l»3 ANKI, J) = EN(I, J) GO TO 21 ^ 10 WRITE OUTPUT TAPE NouT,i9 19 FORMAT<16H £Q OR OF DATE) " 21 DO 11 Ial,3 X(I) = 0. V(I) "= 6. i'l DO 11 .Jal*3 \ X(I) = X(D * ANKI. J)*SP( J) •-->•' 1± V(I) = V(I> 4- ANKI, J)*SP( J + 3) n 13 RETURN '-.I END

U.J

, J

o

S-229

iPHILCQ DIVISION Page Intentionally Left Blank WDL-TR2L84

Subroutine: INTR, INTRI

Purpose: The purpose of INTR is to interpolate as a function of the central body on the coordinates of the other bodies, to the given time, and return the interpolated position values. The purpose of INTRI is the same as INTR, but in addition it numerically differentiates the positions to obtain the velocities and also return them.

Calling Sequence! CALL INTR, INTRI (TW. TF, NB, PO, NV, VE, PIS) J Input and Output

Data Symbolic Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

I TW 1 whole days Time in days since 1950.0 fractional I TF 1 days Time in fractional days since TW I NB 1 Central body

0 PO 22 Km Array of position values 1 .3 I NV 1 Dummy variable 0 VE 22 Km/sec Array of velocity values /: I DIS 1 Km Jupiter included if DIS > 10 Li Common storages used or required:

Subroutines required: FIX, FLOAT

Functions required:

Approximate number of storages required: 2063 OCTAL

3-231 INTR, INTRI - 1

IPHBLCQ WDL DIVISION WDL-TR2184

For interpolation, the following formula is used:

2 y(t/ )s - uy +t. y +.- - 8 .y + .- -!)6 ,2

t

where y = y(T.)

+ h)

h = ephemeris interval T-T,

u = 1-t

T i T < T + h

For the velocity values, the following is used:

tm-l k + y^Hf-^ 'V^f1 «2>

4 2 4 2 5u -15u +4 R4 . 5t -15t +4 .4 5l 6 yo + 5l 6 yl

The locations of variables in the position and velocity arrays are as follows:

P0(5) Z value of Jupiter P0(6) Y value of Jupiter P0(7) X value of Jupiter S-232 INTR, INTRI - 2

PHILCQ WDL DIVISION WDL-TR2184

P0(8) - P0(10) values of Mars PO(ll) - P0(13) values of Venus P0(14) - P0(16) values of the Sun P0(17) - P0(19) values of the Moon P0(20) - P0(22) values of the Earth

The VE array is arranged the same as the PO array with velocity values in place of positions.

,j

INTR, INTRI - 3

PHILCQ WDL DIVISION WDL-TR2184

INTER. INTRI

FAR INTR TTL JPL EPHEMERIS LOOKUP NEW ERP 6/63 INTROQOO L8L INTR INTR0010 L"«J COUNT b30 INTROQ20 ENTRY INTR INTR0030 ENTRY INTRI INTR0040 REM CALL INTR A,B,C,D,E,F,G POSITIONS AND VELOCITIES INTR0050 REM A=ARG INTEGRAL DAYS SINCE 1950,0 INTR0060 REM B=FRACTION OF DAY INTR0070 REM C=CENTRAL BODY 0=EARTH 1=MOON 2»SUN 3=VEN 4«MARS INTROQ80 •REM D = OUTPUT,T ABLE STARTING ADDRESS INTR0090 REM E=IGNORED (VELOCITY OPTION INDICATOR) INTR01DO REM F=ADDRESS OF VELOCITY TABLE INTR0110 REM G=RADIUS FROM CENTRAL BODY INTR0120 REM LPHEMERIS TAPE MUST BE MOUNTED ON A6 INTR0130 :NTH TXL ++3,.*+ INTR0140 :NTRI SXD VEL. 4 INTR0150 TXL *+2,,** INTR0160 STZ VEL INTR0170 .CLA 1,4 INTR0180 STA TAR >• INTR0190 CLA 2,4 FRA INTR0200 STA FRA INTR0210 CLA 3,4 CEN INTR0220 STA CEN INTR0230 CLA 4,4 OUP INTR0240 .STA OUP INTR0250 CLA 6,4 VELOCITY INTR0260 STA XN,V INTR0270 CLA 7,4 INTR0280 STA RADS INTR0290 TAR -CLA ** INTR0300 : :STO TARG INTR0310 RA CLA ** INTR0320 STO TARG+1 INTR0330 :EN CLA ** INTR0340 ARS 18 INTR0350 STO CENTER INTR0360 UDS CLA ** INTR0370 STO H INTR0380 SXD TRAP, 4 INTR0390 SXD TRAP+1,2 INTR0400 SXD HELIO-1,1 INTR0410 CLA VEL INTR0420 TNZ NEU •' MUST INTERPOLATE TO INTR0430 REM OBTAIN VELOCITY INTR0440 CLA CENTER INTR0450 SUB KERNO INTR0460 TNZ NEU MUST 'INTERPOLATE FOR INTR0470 REM NEW CENTRAL BODY INTR048Q CLA TARG INTR049Q

S-234 INTER, INTRIr

PHILCQ WDL DIVISION 1_

INTR. INTRI(Cone V Un SUB TAKQO INTH03( TNZ NEU TIME HAS CHANGED INTR05I CLA TARG+1 SUB TARQO+1 INTR05C TZE FLEE+6 INTR05-! REM ' ANALYZE TABLE INTR05? NEEDS AS A INTR03< REM FUNCTION OF INTR05: REM CENTRAL BODY INTROSf NEU CLA TARG INTR05' FSB TABLE INTR06( TMI LOOKUP POSITION EPHEMERIS TAPE INTR06J STO COM*19 T-TO INTR06J 0 SUB . 20, INTR063 TPL LOOKUP INTR06< CLA COM*19 INTR06B FDH 4. INTR06< STQ COM+18 INTRO&: CLA COM+18 (T-TO)/4. INTR06( CALL FIX INTR06' CALL FLOAT INTR07J STO COM*17 INTR07: CHS INTR07! FAD COM+18 INTR07S STO COM*! I CLA TARG+1 INTR07! FDH 4. INTR07< STQ COM INTR07; CLA COM INTR07( FAD COM + 1 INTR07' STO TARG+2 INTR08C LDQ COM+19 INTROS^ FMP s9, INTROS^ CALL FIX INTR08I ADD KERNO+1 INTR08X R STA GG INTR08! U LDQ COM*17 INTR08( FMP = 54, INTR08: CALL FIX INTR08« ADD KERNO*2 INTR08' STA HH INTR09I AXT 2*S£P,4 MUST INTERPOLATE IIMTR09: STZ XN+2*SEP,4 so CLEAR STORAGE INTR09! TIX *•!» 4» 1 INTR09! AXT BSEP,4 SET GRAVITATIONAL INTR09< STZ KBO*BSEP,4 COEFFICIENTS INTR09! TO ZERO INTR09( LXA CENTERS INTR09; PXD ,4 INTR09I COM INTR091 PDX ,2 INTR10I

S-235 INTR. INTRI= JPHILCQ WDL DIVISION WDL-TR2184 i

NTR. INTRI (Cont'd) o

TXH HEHO.4,1 INTR1010 GEO AXT 3,1 INTR1020 CLA GRAV+3,1 INTR1030 STO KBO+3,1 INTR104Q TIX *-2,l,l INTR1050 STZ KBO-1,2 INTR1060 CLA EWORTO INTR107Q STO EWORT INTR108Q CLA HWORTE INTR1090 STO HWORT INTR1100 TXH GG12,4,0 INTHH10 CLA RJ TEST TOR INTR1120 SUB H INCLUSION OF. INTRH30 TPL GG12 JUPITER IF INTR1140 CLA HWORTJ EARTH IS INTR1150 STO HWORT CENTRAL BODY INTR1160 CLA GRAV+6 INTR1170 STO KB6 INTR1180 TXL GG12, ,** INTR1190 HELIO AXT BSEP,1 INTR1200 CLA GRAV+BSEP,! INTR1210 STO KBO+BSEP.l INTR1220 TIX *-2.1.1 INTR1230 STZ KB2-3,2 INTR124Q ORTHO CLA LWORTO INTR1250 STO EWORT INTR1260 CLA HWOHTO INTR1270 STO HWORT INTR128Q GG12 CLA VEL CHECK INTR1290 TZE GG6 FOR VELOCITY INTR1300 CLA EWORTO OPTIONS INTR1310 STO EWORT INTR1320 CLA HWORTV INTK1330 STO HWORT INTR1340 GG6 CLA EWORT INTR1350 TZE GG*2 INTR136U •CLA EVLL INTR1370 • STO VEL*1 INTR1380 CLA TARG*1 GEOCENTRIC INTR139Q TSX TAB, 4 INTERPOLATION INTR1400 GG PZE *** ,9 INTR1410 PZE XN,,EWO«T+1 INTR1420 CLA HWORT INTR1430 TZE HH + 2 INTR144Q CLA HVEL INTR1450 STO VEL*1 IMTR146Q .CLA TARG*2 HELIOCENTRIC INTR1470 TSX TAB, 4 INTERPOLATION INTR1480 HH •PZE **# ,5* INTR149Q PZE XN*3, ,HWOPT+1 INTR1500 RESET AXT 3,4 PLACE INTR1510

S-236 INTRS INTR1-6 .^ I ' PHILCQ WDL DIVISION! WDL-TR2184

INTR. INTRI (Cont'd) .CLA COORDINATES INTR152( FDH EVEL IN 'OLD INTR1531 STQ XN,-*1B,4 FORMAT INTR154( CLA XN*9,4 INTR195I FDH EVEL INTR156( STQ XN,*12,4 INTR1571 .LDQ XN*S,4 INTR158( STQ INTR1§9( FMP MU INTR160( FSB XN*18-,4 INTR16H STO XN*9*4 POSITION -OF- SUN INTR162( STZ XN*3,4 INTR163( LDQ XN,-*3»4 INTR164( .STQ INTR16BI FMP -INTR166J FSB XNB.*18,4 INTR167I .STO XN,-*9>4- VELOCITY iOF: SUN INTR168I STZ INTR169I TIX RESET+1,4,1 INTR170J .LXA CENTER.4 INTR171 .LXD VEL»2 1X2 NOT ZERO IF VELOCITY OPTION INTR172J TXH GET OOORDINATES FOR' PRINTING INTR173 "1J TXH TESTM*4.0 INTR174 - «NZT KB6 EARTH-CENTERED INTR175 TRA FLEE INTR176 ! AXT INTR177 J CLA XN*21*1 INTR178 FAD XN*9,1 INTR179 -} .STO INTR180 j TIX INTR181 ~; TXL FLEE INTR182 ^JESTM 'TXH RVPRT,4,1 INTR183 I -AXT" MOON-CENTERED INTR184

S-237 INTR8 INTRI-i

1PHILCQ WDL. DIVISION WDL-TR2184

INTR. INTRI (Cont'd)

TZE OUT DO NOT,TRANSFER VELOCITY INTR2030 AXT 21*1 INTR2040 CLA XN,-*21,1 TRANSFER VELOCITIES INTR2050

S-238 INTR, INTRI- PHILCQ WDL DIVISION WDL-TR2184

1. j INTR. INTRI (Cont'i '-' TSX COEPT',4- FORM THE INTR254 AXT 3,4 EK2J) INTR255 n CLA COM*13,4 INTR256 d -STO COM*16,4 INTR297 TIX *-2,4,l INTR258 n ;CLA 1, FORM 'THE INTR2S9 FSB ARG EO('2J) INTR260 UJ -TSX COEFF:*4 INTR261 n LXA TAB29,4 INTR262 lv-1 "Tv• TXTI *A.i. +4 1 ,A 4 ^CC•»' • aD 11 r INTR263 U ,SXA TAB29,4 INTR264 SXD COM*4-,1 INTR26B qTABi AXT 0,3 INTR266 ;•) .LOO VEL + 2 INTR267 „ - — _ -rp yA nU -INTR268 .LQL 2. INTR269 - 'PAX ,4 INTR270 • STQ VEL*2: INTR271 CAL SC3- INTR27.2 •1 'ORS VEL*2. INTR273 d 'TXH END, 4, 2 INTR274 TXH FORT, 4,0 INTR275 •~Ii ' T1 VX TX **!*!± j. 1 4 , _" o1 INTR276 • TXI TAB1*1,2,-1 INTR277 FORT AXT 3,4 INTR278 . ,TABi8 .LDQ **,! X(0) INTR279 7 FMP COM*13,4 INTR280 -•' .STO1 COM INTR281 TABS1 -LDQ * + ,! INTR282 1 TMP COM+16,4 INTR283 -TAD COM INTR284 .STO COM*4,4 INTR285 'TXI **li.li-l INTR286 r i TIX *-8,4,l INTR287 FAD COM*2 INTR288 FAD COM*1 INTR289 :'.|TAB29 .STO **,2 X(T) INTR290 '•-> TXI TABl*l,'2/-l INTR291 END .LXD COM*4.,1 INTR292 ^ TIX' VELOP,lil INTR293 GJ -LXD COM*9',4- INTR294 .LXD COM*8,2 INTR295 n LXD COM*7,1 INTR296 TRA. 3,4 INTR297 UCOEPF :STO COM+10 CALCULATE. INTR298 ^ LDQ :OOM*10 POSITION INTR299 M TMP COM*10 COEFFICIENTS INTR300 LS -STO COM*12 FOR. EVERETT,S INTR301 FSB 1. INTERPOLATION INTR302 •-) FDH, 6. FORMULA INTR303 ! TMP COM*10 INTR304

S-239 INTRS INTRI- 1 JPHILCQ WDL DIVISION WDL-TR2184 o 0 INTR, INTRI (Cont'd)

-STO COM+ll INTR3050 CLA COM*12 INTR3060 FSB 4, INTR3070 FDH 20, INTR3080 FMP COM*11 INTR3090 STO COM+12 INTR3100 TRA 1.4 INTR3110 :OEFF, :STO COM CALCULATE INTR3120- CLS 1. VELOCITY INTR3J.30 FDH VEL + 1 COEFFICIENTS INTR3140 STO COM*10 FOR EVERETT.S INTR3150 .LDQ COM INTERPOLATION INTR3160 FMP COM FORMULA INTR3170 STO COM*12 INTR3180 XCA INTR33.90 FMP 3, INTR3200 FSB 1, INTR3210 FDH 6. INTR3220 FMP COM*10 INTR3230 STO COM*11 INTR3240 CLA COM*12 INTR3250 FSB 3. INTR3260 XCA INTR3270 FMP' 5. INTR3280 XCA INTR3290 FMP COM*12 INTR3300 FAD 4. INTR3310 FDH 120, INTR3320 FMP COM+10 INTR3330 :STO COM+12 INTR3340 TRA 1.4 INTR3350 RVPRT AXT 0.2 EXPRESS, ALL INTR3360 AXT 3,5 BODIES GEOCENTRICALLV INTR3370 •CLA XN*9,2 INTR3380 TAD XN*9,4 INTR3390 • STO XN*9,2 INTR3400 CLA VEL INTR3410 TZE * + 4 INTR3420 CLA XN,*9.2 INTR3430 FAD XN,+9,4 INTR344Q STO' XN,*9,2 INTR3450 TXI * * 1 . 2 , - INTR346Q TIX RVPRT*2 INTR3470 TXH RVPRT*! INTR3480 CLA CENTER BUFFER INTR3490 ALS 1 CENTRAL- INTR3500 ADD CENTER BODY INTR3510 'PAC ,4 INTR3520 .CLA XN,4 INTR3330 STO COM*3,1 INTR354Q CLA XN,,4 INTR3550

S-240 INTRS INTRI-10,.^ WDL DIVISION RHILCQ WDL-TR2184 •3 IINTR. INTRI (cont'd) STO COM*6,1 INTR356 TXI * + l, 4, .1 INTR357 TIX *-5, 1* 1 INTR3S8 RVPRT1 AXT 0,2 EXPRESS1 ALL1 INTR359 AXT 3,4 BODIES IN TERMS INTR360 • CLA XN,2 OF THE CENTRAL INTR361 FSB COM*3.4 BODY INTR362 STO XN, 2 INTR363 CLA VEL INTR364 TZE + *4 INTR365 CLA XN..2 INTR366 rC C3 DD COM*6,4 INTR367 STO XN,,2 INTR368 TXI - ~**1,2,"1 INTR369 TIX RVPRT1*2,4,1 INTR370 T1 VA LHJ RVPRT1*1,'2,-SEP INTR371 TXL FLEE INTR372 LOOKUP CLA TLAST INTR373 FSB TARG INTR374 TNZ **2 INTR375 TRA ERR1 INTR376 TMI *-l INTR377 CLA TARG INTR37B FSB TFJRST INTR379 TPL * + 2 INTR380 TRA £RR1 INTR381 TDH 20, INTR382 XCA INTR383 CALL FIX INTR384 'CALL FLOAT INTR385 XCA INTR386 f* iLji n r n r 20, INTR387 FAD TFIRST INTR388 ,STO COM*1 TIME. ON! RECORD INTR389 •CLA TABLE INTR390 FSB COM*1 INTR391 TMI FINDIT INTR39B FDH 20, INTR393 XCA INTR394 CALL FIX INTR395 ADD IF RECORDS TO INTR396 PAX ,4 BE BACKED INTR397 TEFA **1 INTR398 1 TXL *+3,4,20 OVER INTR399 REWA 6 INTR4QO TRA FINDIT INTR4Q1 BSRA 6 INTR4Q2 TIX +-1,4,1 INTR4Q3 FINDIT AXT 10/2 INTR4Q4 :SDHA 6 INTR4Q5 .RTBA 6 INTR4Q6

S-241 INTR, INTRI-1 PHILCQ WDL DIVISION WDL-TR2184

[NTR. INTRI (Cont'd) RCHA 10 INTR4Q70 TCOA * INTR4Q8Q TEFA ERR1 INTR4090 CLA TABLE INTR4100 SUB COM + 1 INTR4HO TMI INTR43.20 TNZ LOOKUP TAPE NOT POSITIONED PROPERLY INTR4130 TNZ FINDIT INTR41.40 AXT 513,4 INTR4150 CAL TABLE CHECK INTR4160 ACL A+513,4 SUM INTR417Q TIX +-1,4.1 INTR4180 TRCA BSRA INTR4J.90 LAS C INTR4200 TRA * + 2 INTR4210 TRA SCALE INTR4220 3SRA BSRA 6 INTR4230 TJX FINDIT*!, 2,1 INTR424Q CALL ERP INTR4250 10 IQCD TABLE, ,515 INTR4260 CALL ERPT INTR4270 PZE TARG INTR4280 REM SCALING INTR429Q RF.M LOOP INTR4300 SCALE AXT 189,4 INTR4310 LDQ A+189,4 SCALE INTR4320 FMP SCALE1 GEOCENTRIC INTR4330 STO A+189,4 EPHEMERIS INTR434Q TIX *-3,4,l INTR4350 AXT 324,4 INTR436Q LDQ B*324,4 SCALE INTR437Q FMP SCALE2 HELIOCENTRIC INTR4380 STO B*324,4 EPHEMERIS INTR439Q TIX +-3,4,1 INTR4400 CLA GRAV COMPUTE INTR441Q FAD GRAV+1 MASS RATIO INTR4420 STO COM OF MOON INTR4430 CLA TO EARTH-MOON INTR4440 FDH COM BARYCENTER INTR4450 STQ MU FOR POSITION OF EARTH INTR4460 TRA NEU INTR4470 3CAUE1 DEC 6378,150 EARTH RADIUS INTR448Q 5CALE2 DEC 149598500. ASTRONOMICAL UNIT (JPLj. JULY 1961INTR4490 FFIRST DEC 3892.0 0 HR .AUO 28, 1960 JD = 2437174,5 INTR4500 CLAST DEC 7292,0 0 HR DEC 19, 1969 JD e 2440554,5 INTR451Q TRAP PZE INTR4320 PZE INTR4530 DEC lEb JUPITER TEST DISTANCE INTR454Q rt'MPDT DEC 34, E.T.-U.T. INTR4550 •PZE INTR456Q 5RAV DEC 3.98602E5 EARTH INTR457Q

S-242 IKTRS INTRI "-1

WDL DIVISION PHILCO J' I _ WDL-TR2184 "1 INTR, INTRI (Cont'd) i '> DEC 4.8983349E3 MOON INTR458 •DEC 1.3252312E11 SUN INTR459 DEC 3.2429889E5 VENUS INTR460 L.1 DEC 4.2915518E4 MARS INTR461 DEC 0 REMOVE BARYCENTER INTR462 DEC 1.2652701E8 JUPITER INTR463 EVEL DEC 86400, INTR464 HVEL DEC 345600, INTR465 MU PZE MASS 'RATIO OF MOON TO BARYCENTER INTR466 rl OCT 000000520052 MARS, JUPITER VELOCITY INTR467 -'HWORT OCT 0 INTR468 OCT 527777777777 MOON VELOCITY INTR469 7-lEkiORT OCT 0 INTR470 .jHtvORTJ OCT 000000005252 BARYCENTE-R, JUPITER INTR471 HWORTE ocr ~ "000000005200 BARYCENTER - - . . IN T.R 4 7 2 fTiEwORTO OCT 527777777777 INTR473 r /HWORTO OCT 000052525252 INTR474 '"HhORTV OCT 525252525252 INTR475 TARGQ DEC 20, ,0 FORMER TIME INTR476 , JKERNO PZE FORMER CENTER INTR477 L'j PZE A GEOCENTRIC REFERENCE' INTR478 PZE b HELIOCENTRIC REFERENCE INTR479 IARG PZE 0 INTR480 /IF DEC 1 INTR481 1. DEC 1. INTR482 —•j 3 . •DEC 3 . INTR483 }4. DEC 4. INTR484 ~~ 5 . DEC 5. INTR485 _ 6, DEC 6. INTR486 i\\20, DEC 20, INTR487 i-J 120 , DEC 120. INTR488 86400, DEC 86400. INTR489 f-IVEL BSS 3 VELOCITY OPTION,H,SKIP CODE' INTR490 :J* INTR491 TABLE 'DEC 0 RESERVE INTR492 ">Ti " BSS 189 FOR INTR493 324 tM f B BSS WORKING INTR494 BSS 1 EPHEMERIS INTR495 INTR496 ^JTARG PZE INTR497 iji PZE INTR498 PZE INTR499 p CENTER PZE INTR500 ACOM BSS 21 INTR501 VAFLG PZE INTR5Q2 FQFLG BSS 3 INTR503 fiKBO PZE L. j y cj ^ INTR504 ^^ ^ D i PZE INTR505 KB2 PZE INTR506 '' KB3 PZE INTR507 .... KB4 PZE INTR508

S-243 INTR, INTRI-

JPHILCQ WDL DIVISION WDL-TR2184o u IHTR. INTRI (Cont'd) KB5 PZE INTR5090 KB6 PZE INTR5J.OO <- XN BSS 21 INTR5UO XN. BSS 21 INTR5120 T PZE INTR5130 PZE INTR5140 [ R PZE INTR5150 BSEP SYN 7 INTR5160 StP SYN XN.-XN INTR5170 END INTR '"

n L'J

0 0 3

fl

S-244 INTRS INTRI -14

PHILCQ WDL DIVISION; n WDL-TR2184

Subroutine: INV3

Purpose; To invert a matrix of any dimension up to a 6 by 6.

Calling Sequence: CALL INV3 (A. N. DETERM)

Input and Output

Symbolic Data Program Mathematical Definition I/O Name or Symbol Dimensions Location Dimensions or Units

10 A 6,6 A(I) Matrix to be inverted

A(0) Inverse of input matrix

I N 1 Dimension of input matrix J 0 DETERM 1 Matrix determinant -

Common storages used or required: None Subroutines required: None Q Functions required: ABS Approximate number of storages required:

S-245 INV3 - 1

•IPHILCQ WDL DIVISION WDL-TR2184

INV3 0

LABEL INV3 SUBROUTINE FOR INVERTING SQUARE MATRICES WHICH ARE 6 BY 6 OR LESS INV30000 (TO INVERT LARGER MATRICES,SAY M BY M, DIMENSION IPIVOT (M),ACM*M),INV30010 INDEX(M,2),PIVOTCM) AND RECOMPILE) INV30020 A IS THE SQUARE MATRIX TO BE INVERTED INV3003Q N IS THE SIZE OF A (A IS AN N BY N MATRIX) INV3004Q THE SUBROUTINE RETURNS A INVERSE IN PLACE OF A AND THE DETERMINANTINV30050 IN DETERM, INV30060 SUBROUTINE INV3CA,N,DETERM) INV30070 DIMENSION IPIVOTC6),A(36) ,INDEX!6,2),PIVOT(6) INV30080 EQUIVALENCE (IROW,JROU), CICQLUM,JCOLUM),N INV30290 • M 3 N*CL-1) INV30300 Ml = M+ICOLUM INV30310 M = M + IROW INV30320 SWAP = ACM) INV30330 ACM) = ACM1) INV30340 200 ACM1) = SHAP INV30350 260 INDEXdf 1)=IROW INV30360 INDEX(I,2)=ICOLUM INV30370 M 3 N*(ICOLUM°1)*ICOLUM INV30380 -PIVOT(I) = A(M) INV30390 .DETERM=DETERM*PJVOT(I) INV30400 ACM) = 1.0 INV30410 DO 350 L=1»N INV30420 ,M a N*CL-1)*ICOLUM INV30430 350 ACM) = A(M)/PIVOTCI) INV30440 DO 550 L1=1>N INV30450 IF(Ll-ICOLUM) 400,550,400 INV30460 400 'K s N*(ICOLUM»1 INV30470 T a ACM) INV30480 ACM) = 0. INV30490

RHILCQ WDL DIVISION WDL-TR2184

INV3 (Cont'd)

DO 450 LS1.N INV305! 'M s N*(L"D INV30S! Ml s M+ICOLUM INV305! M ;B M + L1 INV305! 490 A(M) •- A(M>-A(M1)+T INV303!( 550 CONTINUE INV30S! >DO 710 1*1, N INV30§( . INV30S1 'IF ( INDEX IL. I) -INDEX INV30S* •JCQLUM»INDEX(L'*2) INV306( 'M •• N*('JROW-1) INV306! _M1 -B N*CJOOUUM-l) INV306S •DO '705 KB!»"N INV306J •M B M + l INV306. :M1 s Ml*l INV306! SWAP a A(M) INV306< A(M) s A(M1) INV306I A

UJ

S-247 INV3-3 >PHILCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine; INVAO

Purpose i To form the inverse of a transition matrix for a linear, conservative dynamic system. If $ is a partionedT Nmatrix such as -! $1 -? $ = then INVAO computes $ =1

Calling Sequence: CALL INVAO (AO, API)

Input and Output

Symbolic Data Program Mathematical I/O Name or Dimensions Definition Dimensions Symbol Location or Units

I AO 6,6 *(t3,tl) Transition Matrix

0 A01 6,6 ^(ta.tO Inverse Transition Matrix

Common storages used or required: None tl Subroutines required: None

Functions required: None Approximate number of storages required:

3-249 INVAO - 1

-% JPHBLCQ WDL DIVISION WDL-TR218&

INVAO * LABEL INVA * SYMBOL TABLE INVA SUBROUTINE INV A0( AO, AOI ) INVAOOOO DIMENSION AO<6,6)»AOI(<6«6) INVA0010 DO 1 1 = 1,3 INVA0020 11*1*3 INVA0030 DO 1 J = l,3 INVA0040 :JJaJ*3 INVA0050 AOI(I»J)aAO(JJ,II) INVA0060 AOI(II,JJ=-AO(JJ,I> INVA0070 AOICII*JJ)=AO(J,I) INVA0080 1 AOK1, JJ)a-AO(Jf II) ' INVA0090 .RETURN INVA01DO END INVA a

,r*! :J

0 tj

0

0

J

S-250 INVAO=2 ; PHILCQ WDL DIVISION WDL-TR2184

Subroutine: LOADO

Purpose; To transfer the transition matrix from its storage in the integration package's T block to the matrix in the call list. 0

Calling Sequence: CALL LOADO (AO)

Input and Output

Symbolic Data Program Mathematical I/O Name or Dimensions Definition Dimensions Symbol Location or Units

0 AO (6,6) $(tsti) Transition Matrix

Common storages used or required:

Subroutines required: None Functions required: None

Approximate number of storages required:

S-251 LOADO - 1

JPHILCQ WDL DIVISION LOADO

LABEL LOAD SYMBOL TABLE LOAD SUBROUTINE LOADO(AC) LOADOOOO COMMON T LOAD0010 DIMENSION T(1360>,AO(6,b) LOAD0020 K=6 LOAD003Q JJe27 LOAD0040 •DOl 1=1,6 LOAD0050 DO 1 Jsl,3 LOAD0060 K=K*1 LOAD0070 KKqJ+3 LOAD0080 JJsJJ+1 ' LOAD0090 AO(KK,I)nT(JJ) LOADOino AO(J,I)aT(K) LOAD0110 CONTINUE LOAD0120 RETURN LOAD0130 END LOAD

PHILCQ WDL D'V|S|ON q.91;? TOAnn-9 n a --• ) r| 'r~' WDL-TR2184 cl n Subroutine: LOADT Purpose! To place unit initial conditions in the T block for the f! variational equations which are being used to generate the transition matrix.

Calling Sequence: CALL LOADT

Input and Output

Common storages used or required:

Subroutines required: None

Functions required: None

Approximate number of storages required:

0

1 S-253 LOADT - 1

jPHJLCQ WDL DIVISION WDL-TR2184

LOADT

* LABEL LOAT * SYMBOL TABLE LOAT SUBROUTINE LOADT LOATO 000 SUBROUTINE LOADT PUTS UNIT ICS ON PERTURBATION EQUATIONS LOATO 010 COMMON T LOATO 020 DIMENSION T(1360),X(3,6),V<3,6) LOATO 030 EQUIVALENCE (T(7>, X),(T(28).V) LOATO 040 DO 2 1=1,3 LOATO 050 LOATO 060 DO 1 J=l,3 LOATO 070 LOATO 080 X(l,J)=0, LOATO 090 V

S-254 LOADT-2- , PHILCQ WDL DIVISION .. ^ WDL-TR2184 cj Subroutine: MASS

Purpose; To find the relevant gravitational constants to be used in computing planetary perturbations for a given central body. MASS also chooses the initial integration step size as a function of central body.

Calling Sequence: CALL MASS (NOR, UM, VKB, X. ACCP)

Input and Output

Symbolic Program Mathematical Data Dimensions Definition I/O Name or Dimensions Symbol Location or Units

I NOR 1 Central Body Indicator.

l=Earth; 2, Moon; 3, Sun; 4,

Venus; 5, Mars; 6, Jupiter 3 2 I UM 6 M-i Km /sec Gravitational constants, arrange as above

0 VKB 6 M"i Km3/sec2 (J.^ for bodies

I X 3 X,Y,Z Km Position coordinates r. 0 ACCP 1 seconds Initial integration step size

Common storages used or required: None

Subroutines required: None

Functions required: FNORM Approximate number of storages required:

S-255 MASS-1

^PHILCQ WDL DIVISION 0 WDL-TR2184

Method of Establishing Integration Step Size and Perturbing Bodies

Central Body Integration Step Size Other Bodies to be Considered

Earth 60.0 Moon, Sun. If |x| ^ 106Km, Jupiter. Moon 60.0 Earth, Sun. Sun 43200.0 All Venus, 9 Mars, Jupiter 60.0 All 3

The bodies which are not to be used in calculation of pertubation 0 accelerations are eliminated from consideration by placing zeros in array VKB(6). For the bodies which are being considered, the appropriate gravitational constant is placed in VKB(6). 0

I

0

; "\

0

S-256 MASS-2

PHILCQ WDL DIVISION WDL-TR2184

-LABEL MASS SYMBOL TABLE MASS SUBROUTINE MASS(NOR,UM,VKB,X,ACCP) MASSOO DIMENSION UM(6),VK6(6),X(3) MASSOO^ IM q NOR MASSOOS DO 1 1=1,6 MASS003 VKB(I) * 0. MASSOO^ GO TO (2*3,6,4*4,4),N MASSOO^ VKBC2) a UM(2) MASSOOi ACCP s 60. MASSOO' DIS s FNOHM(X) MASSOOI VKB(3) = UM(3) MASSOO' "":7 IF (DIS-10,00000. ) 11,10*10 MASSOld 10 -VK8<6) =_UM(6) MASS013 GO TO 12 MASSOl? 11 V.KB<6) B 0, MASS01! 12 RETURN MASSOi- 3 VKB(l) a UM(1) MASSOl VKB<3) • UM(3) MASSOl ACCP s 60, MASS015 RETURN ACCP = 43200, MASS01' GO TO 7 MASS02I ACCP « 60. MASS02: DO 5 1=1.6 MASS02: VKB(I) « UH(I) VKB(N) -= 0. RETURN MASS023 END MASS

S-257 MASS -3

JPHILCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine: MATRX

Purpose: To perform matrix multiplications of matricies with any dimensions up to maximum dimensions of 10 by 10. A zero in the call sequence (J) yields an output matrix C = A-B. A one in the call sequence (J) yields an output matrix C = A-B-AT. The matrix products are obtained in double precision.

Calling Sequence: CALL MATRX (A. B. C. NRA. NCA. NCB. J)

„- Input and Output . /

Data Symbolic Program Mathematical I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I A (10,10) Input Matrix

I B (10,10) Input Matrix

0' C (10,10) Output Matrix

I NRA 1 Number of Rows of A

I NCA 1 Number of Columns of A

I NCB 1 Number of Columns of B

I J 1 Type of multiplication desired

Common storages used or required: None

Subroutines required: None Functions required: None

Approximate number of storages required:

3-259 MATRX - 1

JPHILCO WDL DIVISION a

* LABEL MATX e-A/ * SYMBOL TABLE MATX CEC2000 SUBROUTINE MATRX MATX SUBROUTINE MATRX(A,B,C,NRA,NCA,NCB,J) MATXOOOO C J=0 A*BsC MATX0010 0 C J=l A*B+AT=C T MEANS TRANSPOSE MATX0020 C NRA=NUMBER OF ROWS OF A MATX0030 C NCAsCOLUMNS OF A MATX0040 C tvCB = COLUMNS OF B MATX005Q C ACCUMULATION OF PRODUCTS IN DOUBLE PRECISION MATX0060 •DIMENSION A(100).8(100),C(100),D(100) MATX0080 D DUD=0, MATX0090 D DUM=0. MATX0100 DO 1 1=1,NRA MATX0110 DO 1 Ksl.NCB MATX0120 ,NCaI*(K-l)+NRA MATX0130 D CRUDaO. MATX0140 DO 2 Lsl,NCA MATX0150 MAaI*(L-l)+NRA MATX0160 NBaL*(K-l)+NCA MATX0170 DUD=A(NA) MATX0180 DUMsB(NB) MATX0190 D CRUDaCRUD+DUD+DUM MATX0200 2 CONTINUE MATX0210 D(NC)=CRUU MATX0220 1 CONTINUE MATX0230 IF(J)3,3,4 MATX02'40 71 3 CONTINUE MATX0250 J KKaNCB*NRA MATX026Q DO 5 1=1.KK MATX0270 5 Cd)sD(I) MATX0280 GO TO 10 MATX0290 4 CONTINUE MATX0300 DO 6 1=1,NRA MAfX0310 DO 6 Ksl.NRA MATX0320 NCsI*(K-l)*NRA MATX034Q D CRUDsO. MATX0350 DO 7 Lai,NCA MATX0360 MATX0370 NBaK+(L-l)+NRA MATX0380 DUMsD(NA) MATX03-90 DUDSA(NB) MATX0400 CRUDaCRUD*DUM*DUD MATX041(1 CONTINUE MATX0420 C(NC)=CRUD MATX0430 Q 6 CONTINUE MATX0440 10 .CONTINUE MATX0510 RETURN MATX0520 END MATX 0

S-260 MATRIX -2

PHILCQ WDL DIVISION^ WDL-TR2184

Subroutine; MATSUB

Purpose! The subroutine is primarily logic which controls (1) trajectory and data printout, (2) updating of the state covariance matrix for observations by calling subroutines EARTR, ONBTR, and MONBTR, and (3) updating of the guidance covariance matrix by calling subroutine GUID.

Calling Sequence: CALL MATSUB

Input and Output

Symbolic Mathematical Data Program Dimensions Definition I/O Name or Dimensions Symbol Location or Units

I Quantities obtained from common

0 Quantities returned to common

Common storages used or required: T, S, C, 1C EARTR, GUID, INVAO, LOADO.LOADT, Subroutines required: _ MATRX, MONBTR, ONBTR, OUTC, OUTP

Functions required: _ SQRT (FIL)(STH) Approximate number of storages required: 346 DEC

S-261 MATSUB - 1

PHILCQ WDL DIVISION VJDL-TR2184

SUBROUTINE MATSUB

CALL LOAOO OBTAINS TRANSITION MATRIX

; Al I MATRX. UPDATE TRANSITION L MATRIX FROM INJECTION

CA1 I I OADI II MAI I/.F PERTURBATION EQUATIONS

CALI MATRx UPDATE COVARIANCI- MATRIX FOR TRANSITION IN TIME l-ROM LAST TIME IN MAT«=UB

IS IT TIM6 FOR PRINTOUT

SETUP NEXT PRINTOUT TIME

CAUL OUTPUT SUBROUTINES OUTC OUTP 4: IS EARTH BASED TRACKING BEING USED

YES

CALL EARTR TRACKING STATION SUBROUTINE G

ARE ONBOARD MEASUREMENTS BEING MADE YES

CALL ONBTR ONBOARD MEAS. SUBROUTINE MATSUB -2

S-262

PHILCQ WDL DIVISION WDL-TR2184 II

ARE LUNAR BASED BEACONS USED

CALL MONBTR MOON BEACON TRACKING SUBROUTINE

-IS OUTPUT_OES1REO

YES

. WRITE OUT KNOWLEDGE OF POSITION AND VELOCITY

IS THIS A GUIDANCE RUN

CALL WATRX UPDATE GUIDANCE MATRIX FOR TRANSITION IN TIME

UPDATE PARTIALS TO TARGET FOR TIME TRANSITION

V..J CALL GUIO PERFORM GUIDANCE COMPUTATIONS AND CORRECTIONS

SET TSECP (LAST TIME IN MATSUB) EQUAL TO PRESENT TIME

RETURN/

S-263 MATSUB -3

JPHBLCQ WDL DIVISION * LABEL MATSO "" * SYMBOL TABLE MATS ' "11 :t'C2006 SUBROUTINE MATSUB MATS U SUBROUTINE MATSUB MATSOOOO COMMON T,S,C,IC MATS0010 fl DIMENSION T(1360),S(1000),C(1000),IC(l),AN(3,3),PO(22)pVE(22)t MATS0020 / | 1EM(3,3),XP(3),VXP(3)*EA(3,3),XED(3),VED(3),AO(6,6),P(6,6), MATSOQ30 " 2TFTA(3,6),PFTA(6,6),AOS(6,6),AOI(6,6) MATS0040 ._ EQUIVALENCE (T ,TDUM)*(S *SDUM),(C *CDUM), MATS0050 ¥| ICC (138), AN), (C(13),TP1)«(C(14),TP2). (C(62),PO), (C(84),VE)* MATS0060 U 2(C(120)*EM), (C(650)*TPRINT)*(C(651)*TSTRT), ( C ( 30 ) * TSEC ) , MATS0070 3,VXP)(,(C(1.0>,TW)»(C(11)(,TF) , ( C ( 129 ) * EA ) , MATS0080 tl 4(C(652),P), (CC752) , AOS ) „

; I U S-264 MAT3U3 - 4 - ,

V-.J.

PHILCQ WDL DIVISIONti WDL-TR2184 (Cont'd)

:j GO TO (10,9),1MB MATS045 -' ~v LMB IS SET 2 BY INPUT CARDS IF MOON BASED BEACONS USED MATS046 9 CONTINUE MATS047 CALL MONBTR MATS048 MONBTR UPDATS COV MATRIX P FOR -BEACONS -ON MOON MATS049 10 CONTINUE MATS090 GO TO (20,19), NOUT MATS09,! 19 CONTINUE MATS052 RMSPaSQRTF (P (1,1)+P (2,2>*P (3,3)) MATS05S RMSVP=SQRTF(P (4,4)*P (5,5)*P (6',6)) MATS054 WRITE OUTPUT TAPE :NUTS,700,RMSP,RMSVP MATS055 700 FORMAT(42H KNOWLEDGE OF STATE AFTER ALL OBSERVATIONS,/ MATS056 124H RMS 'POSITIONs;E15.8,'25H . RMS VELOCITY", MATS057 •2E13.8) MATS058 20 CONTINUE - - - ...... - -MATS059 NUMBERS 11-16 RESERVED FOR FUTURE MEASUREMENTS MATS060 IGUID=IGUID MATS061 GO TO (18,17),IGUID MATS062 IGUID IS SET BY .INPUT TO MAIN 'PROGRAM IF' GUIDANCE CALCULATIONS AREMATS063 MADE MATS064 17 CONTINUE MATS065 CALL MATRX(AO,PFTA,PF"TA,6,6,6,1) MATS065 DO 31 1*1,6 MATS066 DO 31 jal,6 MATS066 PFTA(I.J)B(PFTA(I,J)*PFTA(J,I)>/2, MATS067 PFTA(J.I)sPFTA(I. J) MATS067 31 CONTINUE MATS068 CALL INVAO(AO,AOI) MATS068 CALL MATRX(TFTA,A01,TFTA,3, 6,.6,0) MATS069 • CALL GUID MATS071 QUID PERFORMS THE GUIDANCE CALCULATIONS MATS072 18 CONTINUE MATS073 TSECP=TSEC MATS074 RETURN MATS07 END MATS

S-265 MATSUB -5

/'PHILCQ WDL DIVBSBON Page Intentionally Left Blank WDL-TR2184

Subroutine: MNA

Purpose; To provide the rotation matrix EMN which transforms moon centered coordinates in the earth's true equator and equinox to moon centered coordinates in the moon's true equator.

Calling Sequence: CALL MNA (TIME. OM. CR. DT. EPSIL.' RO. G. ~GP. WW. EMN)

Input and Output

Data Symbolic Program Mathematical Dimensions Definition I/O Name or Symbol n Location Dimensions or Units I TIME 1 d days Days since 1S50.0 I OM 1 n Output from NUTAIT: (Arg. De-

cending node) I CR 1 c radians Output from NATAIT: (mean long. of the moon) I DT 1 AY + dY radians Output from NUTAIT: (nutation in nu longitude) I EPSIL 1 e + Ae + de radians Output from NUTAIT: (mean obliqu Lty and nutation in obliquity) (Cont'd Common storages used or required:

Subroutines required: System double precision routines.

Functions required: INTF. SORT. SIN. COSf ACOS Approximate number of storages required:

S-267 MNA-1

IPHILCQ WDL DIVISION WDL-TR2184 ti (Cont'd.)

Symbolic Data a Program Mathematical Definition I/O Name or Symbol Dimensions Location Dimensions or Units

0 RO 1 P Libration term 0 G 1 g radians Mean anomaly of the moon

0 GP 1 g radians Mean anomaly of the sun

0 WW 1 i« radians Argument of the perigee of the

moon

0 EMN 3,3 Rotation matrix

Transformation From Earth's True Equator to Moon's True Equator.

The two rectangular systems are related through A, 0", and i by the rotation:

11 12

21 22

'31 32 MOON EARTH

where 1 1 '11 cos A cos n - sin A sin Q cos i cos A sin Q' + sin A cos Q1 cos i 12 cos A sin i '13 -sin A cos n1 - cos A sin Q' cos i 21

S-268 MNA-2

WDL DIVISION: PHILCQ WDL-TR2184

b = -sin A sin 0' + cos A cos 0" cos i

b = cos A sin i

b _ = sin (V sin i

b_ = -cos 0' sin i

b = cos i

i is the inclination of the moon's true -equator to the earth's equator

Q' is the right ascension of the ascending node of the moon's true equator

A is the anomaly from the node to the X axis

A = A + ((£ +T) - (0 + a)

A is the anomaly from the node to the ascending node of the moon's true equator on the ecliptic

0 is the mean longitude of the descending node of the moon's mean equator on the ecliptic

^ is the mean longitude of the moon

a is the libration in tha node

-f' is the libration in the mean longitude

p is the libration in the inclination.

6Y, e, 0, and £ are input quantities obtained from NUTAIT. The remainder are computed from the following equations.

I = inclination of moon's equator to ecliptic

I = 1.535°

g = mean anomaly of moon

g = 215.54013 + 13.064992 d

S-269 MNA-3

'PHILCQ WDL DIVISION WDL-TR2184 -' Q g* = mean anomaly of sun

g1 • 358.009067 + .9856005 d

ui) = argument of perigee of moon

o) = 196.745632 + .1643586 d

where d = days from 1950.

a sin I = -.0302777 sin g + .0102777 sin (g + 2m) -.00305555 sin (2g + 2to)

T = -.003333 sin g + .0163888 sin g1 + .005 sin 2iu

p = -.0297222 cos g + .0102777 cos (g + 2u>) -.00305555 cos (2g + 2u>)

cos i = cos (Q + a + 6Y) sin e sin (I + p)

+ cos e cos (I + p) 0 < i < 90°

sin n' = -sin (0 + a + 6Y) sin (I + p) esc i -90°< n' < 90°

sin A = -sin (Q + a + 6Y) sin e esc i

cos A = -sin (0 + a + 6Y) sin n1 cos e

-cos (n + a + 6Y) cos n1 0°£ A < 360 °

Reference: JPL Technical Report No. 32-223

S-270 MNA-4

PH1LCQ WDL DIVISION ioi WDL-TR2184

.'MNA

•) * LABEL SMNA j * SYMBOL TABLE SMNA CEC20AH SMNA A SUBROUTINE MNA SMNA017 ;| GPo398.009067*360o+DFC2) SMNA018 WW«196o745632*360o*DF(3) SMNA019 G a G*8Q17453296 SMNA020 GP = GP«,017453296 SMNA021 WW = WW*. 017453296 SMNA022 YN s Io535*»0l7453296 SMNA023 ') RO = -,0297222*COSF(G) * , 01020777*COSF(G*2.*WW) SMNA024 J 1 -=,,00305555*COSF(28*G + 2e*WW) TA = =0003333*SINF(G) * .0163888*SINF(GP) S M N A 0 2 6 1 +,005*S-1NF(2.*WW) SMNA027 J • SG = • = 80302777*SINF(G) *- . 0102777*SlNF(G + 2.*WW) SMNA 028 1 =C00305555*SINF(2.*G*29*WW) SMNA029 SG s (SG*e017453296)/SINF(YN) SMNA030 .RO s RO*.017453296 SMNA031 TA s TA*S017453296 SMNA032 YN = YN + RO SMNA033 RO s OM •*. SG •* DT SMNA034 i_j • CI s COSF(RO)*SINF(EPSIL)*SINF.(YN) SMNA035 1 • + COSF(EPSIL)*COSF(YN) SMNA036 SI * 1. - CI»o2 SMNA037 SI s ;SQRTF(SI) SMNA038 Q .SO = "=SINF(RO)*SINF(YN)/SI SMNA039 • CO a 1. - SO + *2 SMNA040 'CO s SQRTF(CO) SMNA041 SD 9 »SINF(RO)*SINF(EPSIL SMNA042 CD s =SINF(RO)*SO+COSF(EPSIL) COSF(RO)*CO SMNA043 DL = ACOSF(CD) SMNA044 IF

S-271 hix'A •• 5 iPHILCQ WDL DIVISION WDL-TR2184

MNA (Cont'd) o

CA = DL * (CR * TA) - (OM + SG) SMNA048 SA = SINF(CA) SMNA049 CA = COSF(CA) SMNA050 RO = COSF(RO)*SINF(EPSIL)/(SI*CD) SMMA051 EM<1 1) a CA*CO • ,SA*SO*CI SM\'A052 EM d,2) CA*SO SA*CO*CI SMNA053 EMU,3) SA*SI SMNA054 EM(2,1) -SA*CO CA*SO*CI SMNA055 EM(2,2> -SA*SO CA*CO*CI SMNA056 EM(2,3) CA*SI SMNA057 EM(3,1> SO*SI SMNA058 EM(3,2) -CO*SI SMNA059 EM(3,3) CI SMNA060 RETURN SMNA061 END SMMA

«wRJ

3 J

0

S-272 MNA-6

PHILCQ WDL DIVISION | WDL-TR2184

Subroutine; MNAND

Purpose; xo compute the matrix M used to perform the velocity trans- formation corresponding to the position transformation described in MNA.

Calling Sequence: MNAND (TIME, RO, G, GP, WW, EM, DM)

Input and Output

Symbolic Data Program Mathematical I/O Name or Dimensions Definition Dimensions Symbol Location or Units

I TME 1 d days Days since 1950.0

I RO 1 0 radians Output from MNA; see description

I G 1 g radians Output from MNA; see description

I GP 1 g' radians Output from MNA; see description I WW 1 (!) radians Output from MNA; see description

I EM 3,3 M Output from MNA; matrix M

0 EM 3,3 M Matrix M

Common storages used or required: None d Subroutines required: None Functions required: COS Approximate number of storages required:

S-273 MNAND-1

JPHILCQ WDL DIVISION my. o WDL-TR2184

Theory and Equations

In transforming lunacentric position coordinates relative to the earth1! equator and equinox of 1950.0 to coordinates relative to the moon's true equator, three matrices are computed. Matrix A (from ROTEQ) rotates the coordinates to equinox of date, matrix N (from NUTAIT) accounts for the nutation of the earth about its precessing mean equator, and matrix M (from MNA) transforms to the position relative to the moon's true equator.

Then = MNA

moon earth, 1950.0

Assuming that N = A = 0

MNA + MNA

moon earth, 1950 earth, 1950

The M matrix is computed from the equations:

M2/ M23A

M "M13A

0

where M.. are the elements of M, and

S-274 MNAND-2

PHILCQ WDL DIVISION _J

WDL-TR2184 3 A = -p (Cl + a) = 0.266170762 X 10"5 - 0.12499171 X 10~13 T rad/sec; T = d/36525

= -0.1069698435 X 10"7 + 0.23015329 X 10"3 T rad/sec

-0.1535272946 X 10~9 cos g

+0.569494067 X 10"10 cos g

+0.579473484 X 10~U cos 2m rad/sec

CT = -0.520642191 X 10~? cos g

+0.1811774451 X 10"7 cos (g+2<») n j -0.1064057858 X 10"7 cos (2

Reference: JPL Technical Report No. 32-223

,j

U

U Ur*^

S-275 MNAND-3

^ PHILCQ WDL DIVISION Q

MNANI T!

LABEL MNAN = SYMBOL TABLE. MNAN ( SUBROUTINE MNAND ( TIME , R0» G , GP , Wk , EM, DM) MNANOOOO DIMENSION DM<3,3),EM<3,3) MNANOOlOrrj T s TIME/36525. MNANOOSOrl CRD = 6266170762E~5 - . 12499171E-13*T MNAN0030 OMD = -.1069698435E-7 * . 230l5329E-13*T MNAN0040 TAD = =1,535272946*COSF(G> . 569494067*COSF ( GP ) MNAN0050W L * ,0579473484*COSF(2,*WW; MNAN0060--J TAD = ,1E-9*TAD MNAN0070 B SGD °e52Q642191*CQSF(G) , 1811774451*COSF G*2 , *WW MNANOOSOn L •=81064057858*COSF(2,*WW+2 *G) MNAN0090L) SGD B ,1E-6*SGD MNAN01DO DLD = -RO*(OMD * SGD) MNANOJL10,--, CAD = DLD * .CRD •+ TAD OMD - SGD MNAN0120J-4 DM{1,1) = EM(2,1)*CAD MNANOJ.30 DM(1,2) B EM(2,2)*CAD MNAN0140 DM<1,3> B EM(2»3)*CAD MNAN0150H DM(2,1) = '-EMd.DtCAD MNAN0160L3 DM(2,2> = -EM(1,'2)*CAD MNAN0170 DM<2,3) MNANOlBO 0B0 MNAN0190! DM(3,2) 0,0 MNAN0200 DM(3,3) 0,0 RETURN MNAN0220' END MNAN '

0

S-276 MNAND-6 ^ PHILCQ WDL DIVISION I WDL-TR2184

Subroutine: MONBTR

Purposet xo obtain the position and velocity vectors of the vehicle relative to the beacon and determine if the beacon is in view of the vehicle. The station location partials are computed and subroutine CCMPHQ called to update the state covariance matrix for the measurements being made. The types of measurements possible are range, range rate, right ascension, and declination. "7

Calling Sequence; CALL MONBTR Input and Output

Symbolic Data Program Mathematical Name or Definition I/O Dimensions Symbol Dimensions Location or Units

I Quantities obtained from common 6 Quantities placed in common

Ti vJ

u. 1

Common storages used or required: T, S, C, 1C COMPHO, DOT, INTRI, MATRX, Subroutines required: MNAND. MNA. NUTAIT. TRAC ASIN, ATAN, FNORM, SQRT Q Functions required: (FIL)(SLO)(STH) Approximate number of storages required: 495 DEC

S-277 MONBTR-1

iPHILCQ WDL DIVISION WDL-TR2184

MONBTR Partial Derivatives

MONBTR computes two partial matrices which are used in COMPHQ to evaluate station location errors. The matrices are the following:

3LAT dLON dALT ax2 STPARS dLAT dALT

CJLAT dLON dALT

^LAT dLON dALT

STPARD = "5LAT dLON dALT

dLAT iLON dALT

where X + X H XREL (FORTRAN) X2

(„ ] = -X + X_ H VREL (FORTRAN) 21 V B

_ _ dLAT dLAT dLAT ~ dLAT i = 1,2,3

S-278 MONBTR-2

PHILCQ WDL DIVISION. WDL-TR2184

*B

(=0)

(MNAND) X + (MNA)

where subscripts BM indicate beacon moon-fixed coordinates.

The transformations MNA and MNAND are obtained by calling the sub- routines MNA and MNAND.

'cos LAT cos

= (R + ALT) cos LAT sin-LON

sin LAT

3x1 3x3 3 x 1

a PAR

(MNA) dPAR

BM dPAR PAR

dPAR

SS5 =0™°)' ax. a PAR MONBTR-3 " S-279

, PHILCQ DIVISION WDL-TR2184

<-sin LAT cos LON"

£— = (R + ALT) I -sin LAT sin LON

cos LAT

3x1 3x1

/-cos LAT sin LON

\ 0

3x1 3x1

dALT

3 x 1

SIPARS = (MM)1 ^gjg;^;^

3x3 3x3 3x3 p

STPARD = (MNAND)'

3x3 3x3 3x3

Following computation of the matricies,subroutine COMPHQ is called to perform the updating of the state covariance matrix.

S'280 MONBTR-4

RHILCQ WDL DIVISION | WDL-TR2184

I '.URROLITINF. MONBTR

OBI AIN VF_CTCD FROM VI.MICI E TO MOON

IS BEACON STEP THROUGH 10 BEACONS

[ NO

OBTAIN "VECTOR 'FROM MOON CENTER TO BEACON

OBTAIN VECTOR FROM VEHICLT TO BEACON

IS VEHICLE SET IMOONB ~ 0 ABOVE HORI7ON FOR STATION

CHECK IMOONB DII3 VF.HICI I SET IMOONB -- I SEF STATION TOR STATION LAST TIME

COMPUTE PARTIAL? FOR STATION LOCATION ERROR'. f POSITION )

WRITE OUTPUT u STATION DATA OBTAIN RELATIVE VELOCITY VECTOR a STEP THROUGH * TYPES OF u MEASUREMENTS I'- I 1 PE Or MEASUREMENT CONSIDERED

YES

IS THIS A NO s~ RANGE RATE *v CAUL COMPHO MEASUREMENT

1 YES

COMPUTE PARTIALS FOR STATION LOCATION ERRORS (VELOCITY) S-281 MONBTR-5

WDL DSVSSION WDL-TR2184

MONBPR

* LABEL MONB * SYMBOL TABLE MONB CEC2012 SUBROUTINE MQNBTR MONB I SUBROUTINE MON6TK MONBOOOO' COMMON T,S,C,IC MONB0010 DIMENSION MONB00201 11(1360), S11000),C{1000),IC{1).XREL(3).VREL<3) MONB0030 l,PQ<22),Vfc.<22),AN<3,3),EM<3,3) .ISBOON<10).U<3).EN(3) MONB0040 2»RT(3>i.E(3)»eTM(3»3) » IHOONB ( 10) , DM( 3, 3 ) , DUM ( 3* 3 ) MONB005Q 3.RMB<3),TYMEAS(4,10).X(3),VX(3 ),OUTPUT<6) MONB0060 DIMENSION STPARS(3.3)pDUD(3,3)pSTPARD(3,3) MON80065 EQUIVALENCE (TpTDUM), (SpSDUM), ( C>, CDUM ) , ( 1C, ICDUM ) MONB0070 1, MONB0145 CALL SETN(NIN,NUTS) MON80147 DELTT=TSEC°TSECP MONB0150 LSTAT=LSTAT MONB0160 GO TO«1C2)*LSTAT MONB017Q 1 CONTINUE MONB0180 MONB0190 DlS=lcE10 MQNB0200 CALL INTRKTWpTFfNB«PO,l,VE,DIS) MON80210 CONTINUE MONB0220 TlMEIsTW + TF MONB0230 CALL NUTAlT(TIME.OK*CR,DT»EMfEPSIL) MQNB0240 CALL MNA(TIMEfOM,CfipUTsEPSIL,RO,GpGP,WW«ETM) MONB0250 CALL MNANU(llMEpRO,G,GP,WW,ETM(,DM) MONB0260 MON80270 CONTINUE MONB0280 DO 4 1=1,3 MONB0290 J-2G-I MONB0300 XREL(I)=PO( J) X(I) MONB0310 VREL(I)=VE( J) VX(I) MON80320 4 CONTINUE MONB0330 GO TO 7 MONB0340 5 -CONTINUE MONB0350 DO 6 1=1,3 MONB0360 XREL(I)=-X(I) MONB037Q VREL(I)=-VX(I) MONB0380 CONTINUE MONB0390 C XREL POSITION VECTOR FROM VEHICLE TO MOON CENTER 1950 MONB0400 C VREL RELATIVE VELOCITY OF MOON CENTER 1950 MON80410 CONTINUE MONB0420 N N = 4 8 5 MONB0430 DO 18 111=1,10 MON80440

S-282 MONBTR-6 « i WDL DIVISION PHILCQ WDI.-TRV 184 Li

H INTO. INTRI(Cont'd) SUB TAHQO TNZ NEU TIME HAS CHANGED CLA TARG+1 SUB TARGO+1 TZE FLEE+6 REM ANALYZE TABLE REM NEEDS AS A REM FUNCTION OF REM CENTRAL BODY NEU CLA TARQ FSB TABLE TMI LOOKUP POSITION EPHEMERIS TAPE STO COM+19 T-TO .SUB .20, . TPL LOOKUP CLA COM*19 FDH 4. STQ COM + 18 CLA COM*18

S-235 INTR, INTRI-5 JPHILCQ WDL DIVISION WDL-TR2184 O " ;NTR. INTRI (cont'd) fn

TXH HELIO. 4,1 INTR1010 GEO AXT 3,1 INTR1020 ••} CLA GRAV*3,1 INTR1Q30 U .STO KBO*3,1 INTR104Q TJX *-2,l,l INTR1050 „ STZ KBO-1,2 INTR1060 U CLA EWORTO INTR107Q ^3 STO EWORT INTR1080 CLA HWORTE INTR1090 fa STO HWORT INTRliOO !j TXH GG12,4,0 INTR1110 CLA RJ TEST FOR INTR1120 ~] SUB K INCLUSION OF. INTR1130 M TPL GG12 JUPITER IF INTR1140 L CLA HWQRTJ EARTH IS INTR1150 STO HWORT CENTRAL BODY INTR1160 ? CLA GRAV+6 INTRI 170 l- STO KB6 INTRU80 TXL bG12, , *+ INTR1190 r'1 HELIO AXT BSEP,1 INTR1200 ?'l CLA GRAV*BSEP,1 INTR1210 STO KBO*BSEP,1 INTR1220 -'i TIX *-2.1.1 INTR1230 STZ KB2-3.2 INTR124Q UJ ORTHO CLA LWORTO INTR1250 STO EWORT INTR1260 "| CLA HWORTO INTR1270 '<.-> STO HWURT INTR1280 GG12 CLA VEL CHECK INTR1290 -} TZE GG6 FOR VELOCITY INTR1300 J CLA EWORTO OPTIONS INTR1310 STO EWORT INTR13PQ ~, CLA HWORTV INTR1330 , STO HWORT I NTH 13 40 *-* GG6 CLA EWORT INTR1350 TZE GG*2 INTR1360 D •CLA EVLL INTR1370 J STO VEL*1 INTRI 380 CLA TARQ+1 GEOCENTRIC INTRI 390 fl TSX TAB,4 INTERPOLATION INTR1400 •.] GG PZE **, ,9 INTR1410 " PZE XN, ,EWO«T*1 INTR1420 n CLA HWORT INTR143Q i TZE HH*2 INTR144Q ^ CLA HVEL INTR1450 STO VEL*1 INTR1460 fl CLA TARG*2 HELIOCENTRIC INTR1470 U TSX TAB,4 INTERPOLATION INTR1480 HH PZE **p ,54 INTR149Q ;-j PZE XN*3, ,HWQRT*1 INTR1500 ' | RESET AXT 3,4 PLACE INTR1510 '"""

\\

S-236 INTRS INTR1=6 --| PHIL-CO WDL DIVISION < **xs*w££*£$&>r &Btfanpt WDL-TR2184

INTR. INTRI (Cont'd)

CLA XN*6,4 COORDINATES INTR152I FDH EVEL IN :OLD INTR15S STQ XN,*18,4 FORMAT INTR154I CLA XN*9,4 INTR135I FDH EVEL INTR156I STQ XN,+12,4 INTR157I .LDQ XN*3,4 INTR198I STQ XN*6,4 INTR159I FMP MU INTR160I FSB XN*18,4 INTR161I STO XN*9,4 POSITION OF SUN INTR162I STZ XN*3,4 INTR163I LDQ XN,+3,4 INTR164I .STQ XN,*6,4 INTR165I FMP -INTR166I FSB INTR167I • .STO XN,+9>4 VELOCITY .OF SUN INTR168I STZ XN8*3,4 INTR169I TIX RESET*!,4,1 INTR170I .LXA CENTER,4 1NTR171I LXD VEL,2 1X2 NOT ZERO IF.' VELOCITY OPTION INTR172 TXH RVPRT,2,0 ' GET COORDINATES FOR PRINTING INTR173 TXH TESTM,4,0 INTR174 •NZT KB6 EARTH-CENTERED INTR175 TRA FLEE INTR176 AXT 3,1 INTR177 CLA XN*21,1 INTR178 FAD XN*9,1 INTR179 INTR180 TIX INTR181 TXL FLEE INTR182 TESTM TXH RVPRT,4,1 INTR183 3,1 MOON-CENTERED INTR184 CLS XN*6,1 INTR18B .STO INTR186 o .CLA INTR187 XN*6,1 INTR188 ,STO XN*9,1 INTR189 •STZ XN*6,1 INTR190 TIX * = 6,lil' INTR191 CENTER ! INTR192 .STO KERNO INTR193 TARG INTR194 ,STO TARGO = INTR195 :CLA TARG*1 INTR196 TARGO*! INTR197 •2ljl- TRANSFER POSITIONS INTR198 :CLA XN*21>1 INTR199 -,OUP **»! INTR200 TIX OUP-l',.lil INTR201 CLA VEL INTR202

S-237 INTR, iwmi\

1PHILCQ WDl, DIVISION WDL-TR2184

INTR. INTRI (Cont'd)

TZE OUT DO NOT,TRANSFER VELOCITY INTR2030 AXT 21il INTR2040 CLA XN,+21,1 TRANSFER VELOCITIES INTR2050 :STO **..! INTR2060 TIX XN,V-1«1. INTR2070 >UT LXD HELIO-1,1 INTR2080 LXD TRAP+1,2 INTR2Q90 LXD TRAP,4 INTR2100 TRA b,4 INTR2JL10 REM TSX TAB,4 (AC)slNTERPOLATIVE ARGUMENT INTR2120 REM PZE B,,K INTR2130 REM PZE A,,C INTR214Q REM BcSTART-OF DATA BLOCK INTR2150 REM KnWORDS PER SUB BLOCK INTR2160 REM AsSTART OF RESULT BLOCK INTR2170 REM C=SK1P .CODE WORD LOCATION INTR2180 'AH SXD COM+9,4 INTR2190 SXD COM+8,2 INTR2200 SXD COM+7,1 INTR2210 •STO ARG INTR2220 CLA 1,4 INTR2230 STA TAB18 INTR2240 LRS 18 INTR2250 ADD 1,4 INTR2260 L, STA TAB21 INTR2270 CLA 2,4 INTR2280 PAX ,1 INTR2290 TXI *+i,l,SEP INTR2300 SXA TAB29,1 INTR2310 ARS 18 INTR2320 STA VELOP INTR2330 AXT 2,1 INTR2340 CLA VEL INTR2350 TNZ VELOP INTR2360 TXI VELOP,!.-: INTR2370 ELOP CLA * + *! PICK UP, SKIP INTR2380 STO VEL + 2 CODE -WORD INTR2390 TXL POSOP.l.l INTR2400 REM VELOCITY OPTION INTR2410 CLA ARG INTR2420 TSX COEFF, ,4 FORM THE INTR2430 AXT 3,4 EK2J). INTR2440 CLS COM*13,4 INTR2450 .STO COM*16,4 INTR2460 TIX *-2,4,l INTR2470 CLA 1, FORM THE INTR2480 FSB ARG EO(2J>, INTR249Q TSX COEFF.,4 INTR2500 TRA TAB1-1 INTR2510 REM POSITION OPTION INTR2520 OSOP CLA ARG INTR2930

S-238 INTR, INTRI-«X I j PHILCQ WDL DIVISION WDL-TR2184

•v

INI/. INTRI (Cont'd) '1 .J T-9X COEFF',4. FORM THE INTR254 .A XT 3,4 E1C2J) INTR255 ,CLA COM*13,4 INTR256 H .STO COM*16*4 INTR297 TJX +-2,4,1 INTR258 • CLA 1. FORM "THE INTR259 FSB. ARG EOC2J) INTR260 -'TSX COEFF.,4 INTR261 LXA. TABS9.4 INTR262 .'TXI *+l*4,-SEP INTR263 SXA TAB29,4 INTR2&4 •SXD COM*4,1 INTR265 ,'• TAB1 AXT 0,3 INTR2$6 -LDQ VEL?»-2 INTR267 - PXD - - - IN.TR268 .- .LQL 2 INTR269 0 PAX ,4 INTR270 •STQ VEL*2 INTR271 •CAL EQ3 INTR272 "1 'ORS VEL*2 INTR273 •-•j TXH END, 4, 2 INTR274 TXH FORT, 4,0 INTR275 ,— TXI **l»lj-3 INTR276 J T*i TAB1*1>'2,--1 INTR277 FORT AXT 3,4 INTR278 ... TABis .LDQ **,! X(0) INTR279 FMP .COM*13,4 INTR280 - -STO COM' INTR281 TAB21 LDQ * + il INTR282 'FMP- COM*16,4 INTR283 ,._ TAD COM INTR284 .STO COM*4-,4 INTR285 i "TXI * + Uli-l INTR286 i Tix *-8,4,l INTR287 FAD COM*2 INTR288 COM*1' INTR289 F*" FAD ; (TAB29 .STO **,2 X(T) INTR290 ^^ •' TXI TAB1 + 1.-2/-1 INTR291 END -LXD COM*4» 1 INTR292 } TIX VELOP,1>1 INTR293 r\* J .LXD' COM*9,4 INTR294 .LXD COM*8»2 INTR295 i i LXD COM*7,1 INTR296 I TRA- 3,4 INTR297 L.JCOEFF :STO • COM*10 CALCULATE' INTR298 LDQ COM+10 POSITION INTR299 r1 FMP' COM*10 'COEFFICIENTS INTR300 Ll -STO COM*12 FOR!EVERETT,S INTR301 FSB 1. INTERPOLATION INTR302 .' ] 'FDH 6. FORMULA- INTR303 ! 'FMP COM*10 INTR304

S-239 INTRS INTRI-

iPHILCQ WDL DIVISION WDL-TR2184

INTR. INTRI (Cont'd)

STO COM+ll INTR305Q CLA COM+12 INTR3060 FSB 4. INTR3070 FDH 20, INTR3080 FMP COM+ll INTR3090 STO COM+12 INTR31DO TRA 1,4 INTR3110 :OEFF, :STO COM CALCULATE INTR3120 CLS 1. VELOCITY INTR3130 FDH VEL*1 COEFFICIENTS INTR314Q STO COM+10 FOR EVERETT.S INTR3150 LDQ COM INTERPOLATION INTR3160 FMP COM FORMULA INTR3170 STO COM+12 INTR3180 XCA INTR3190 FMP ' 3, INTR3200 FSB 1. INTR3210 FDH 6. INTR3220 FMP COM*10 INTR3230 'STO COM+ll INTR3240 CLA COM+12 INTR3250 FSB 3, INTR3260 XCA INTR3270 FMP 5. INTR3280 XCA INTR3290 FMP COM+12 INTR3300 FAD 4. INTR3310 FDH 120, INTR3320 FMP COM+10 INTR3330 .STO COM+12 INTR3340 TRA 1,4 INTR3350 3VPRT AXT 0,2 EXPRESS ALL' INTR3360 AXT 3.5 BODIES GEOCENTRICALLV INTR3370 .CLA XN+9,2 INTR3380 FAD XN+9,4 INTR3390 • STO XN+9,2 INTR3400 CLA VEL INTR3410 TZE * + 4 INTR3420 CLA XN,+9,2 INTR3430 FAD XN,+9,4 INTR344Q STO XN.+9.2 INTR345Q TXI * + 1 , 2 , •. INTR346Q TIX RVPRT+2 INTR347Q TXH RVPRT+1 INTR3480 CLA CENTER BUFFER INTR349Q ALS 1 CENTRAL INTR3500 ADD CENTER BODY INTR3510 'PAC' ,4 INTR3520 CLA XN,4 INTR3330 STO COM+3, 1 INTR3540 •CLA XN,,4 INTR3550

S-240 INTRS INTRI-10, WDL DIVISION! PHILCQ WDL-TR2184

JINTR. INTRI (Cont'd) STO COM+6,1 INTR356C TXI *+l,4i- INTR357C TIX *-5,l,l INTR358C RVPRT1 AXT 0,2 EXPRESS ALL1 INTR359C AXT 3,4 BODIES IN TERMS INTR360C • CLA XN,2 OF THE CENTRAL INTR361C FSB COM+3,4 BODY INTR362I •STO XNi2 INTR363I 'CLA VEL- INTR364I TZE * + 4 INTR365I CLA XN.,2 INTR366! FSB COM+6,4 INTR367I STO XN, ,2 INTR368I --- TXI- - * + l»2-.- INTR369( TIX RVPRT1* INTR370( TXH RVPRT1+ INTR37K TXL FLEE INTR372I LOOKUP CLA TLAST INTR373I FSB TARG INTR374I TNZ + + 2 INTR375I TRA ERR1 . TMI *-l INTR377! ; CLA TARG INTR378I FSB TFIRST INTR379I TPL **2 INTR380 J TRA ERR1 INTR38ii ! FDH 20, INTR382I XCA INTR383I 1 CALL FIX INTR3841 ! 'CALL FLOAT INTR385I XCA INTR386) TMP 20, INTR387 | FAD TFIRST INTR388 J .STO COM*1 TIME'iON' RECORD INTR389 CLA TABLE INTR390 ] FSB - COM*1 INTR391 j TMI FINDIT INTR392 FDH 20, INTR393 I XCA INTR394 CALL FIX INTR395 ADD IF RECORDS' TO INTR396 , PAX ,4 BE 'BACKED INTR397 TEFA **1 INTR398 J TXL **3,4,2 OVER INTR399 REWA 6 INTR400 } TRA FINDIT INTR401 ] BSRA 6 INTR4Q2 TIX *-.l,4,l INTR4Q3 iFINDIT AXT 10,'2 INTR404 1 :SDHA 6 : INTR405 ,RTBA 6 INTR4Q6

S-241 INTR^ INTRI-1 PHILCQ WDU DIVISION o ' [NTR. INTRI (Cont'd) RCHA 10 INTR407Q TCOA + INTR4Q80 - , TEFA ERR1 INTR4090 j CLA TABLE INTR4100 U SUB COM + 1 INTR4110 TMI * + 2 INTR43.20 [1 TNZ LOOKUP TAPE NOT POSITIONED PROPERLY INTR4130 LJ TNZ FINDIT INTR414Q AXT 513,4 INTR4150 rn CAL TABLE CHECK INTR4160 [J ACL A+513,4 SUM INTR4170 TIX *-l,4,l INTR4180 ._, TRCA BSRA INTR4190 '• LAS C INTR4200 •-' TRA + + 2 INTR4210 TRA SCALE INTR4220 '•, 3SRA BSRA 6 INTR4230 /I TIX FINDIT+1,2,1 INTR4240 CALL E.RP INTR4250 -I 10 IOCD TABLE, ,515 INTR4260 ' j :RRI CALL ERPT INTR4270 PZE TAHG INTR4280 „., REM SCALING INTR429Q REM LOOP INTR4300 ^ SCALE AXT 189,4 INTR4310 LDQ A+189,4 SCALE INTR4320 "j FMP SCALE1 GEOCENTRIC INTR4330 J STO A+189,4 EPHEMERIS INTR434Q TIX *-3,4,l INTR4350 ~] AXT 324,4 INTR4360 .LDQ B+324,4 SCALE INTR437Q FMP SCALE2 HELIOCENTRIC INTR4380 STO B+324,4 EPHEMERIS INTR4390 j TIX +-3,4,1 INTR4400 i-J CLA GRAV COMPUTE. INTR4410 FAD GRAV+1 MASS RATIO INTR4420 H STO COM OF MOON INTR4430 .J CLA GRAV+1 TO EARTH-MOON INTR4440 FDH COM BARYCENTER INTR445Q r, STQ MU FOR POSITION OF EARTH INTR4460 M TRA NEU INTR4470 9CALE1 DEC 6378.150 EARTH RADIUS INTR4480 5CALE2 DEC 149598500, ASTRONOMICAL UNIT

• S-242 INTR, INTRI -1 " i i RHILCQ WDL DIVISION I .^^^S&d^rfSm/aay, WDL-TR2184

i IN1R. INTRI (Cont'd) '- \f • «jj DEC 4.8983349E3 MOON INTR458 DEC 1.3252312EH SUN • INTR459 1 DEC 3.2429889E5 VENUS INTR460 ,J DEC 4.2915518E4 MARS INTR461 DEC 0 REMOVE BARYCENTER INTR462 DEC 1.26527Q1E8 JUPITER' INTR463 EVEL DEC 86400. INTR464 HVEL DEC 345600, INTR465 pnMU PZE MASS 'RATIO OF MOON TO BARYCENTER INTR466 rj OCT 000000520052 MARS, JUPITER VELOCITY INTR467 :~* HKQRT OCT 0 INTR468 OCT 527777777777 MOON VELOCITY INTR469 HEWORT OCT 0 INTR470 JHtvORTJ OCT 000000005252 BARYCENTER, JUPITER INTR471 - HWORTE OCT _ _ .00000000 52 00 BARYCENTER INT R4 7 2 r-jEWORTO OCT 527777777777 INTR473 .HWORTO OCT 000052525252 INTR474 HlNOHTV OCT 525252525252 INTR475 TARGO DEC 20, ,0 FORMER TIME INTR476 ''(KERNO PZE FORMER CENTER INTR477 f I PZE A •GEOCENTRIC REFERENCE- INTR478 PZE b HELIOCENTRIC REFERENCE INTR479 "~JARG PZE 0 INTR480 fir DEC 1 INTR481 *" l. 'DEC 1. INTR482 . 3 DEC 3 , INTR483 DEC 4. INTR484 '7K 5. DEC 5, INTR485 ., 6. DEC 6. INTR486 120, DEC 20, INTR487 Jl20, DEC 120. INTR488 86400, DEC 86400, INTR489 qVEL BSS 3 VELOCITY OPTION,M,SKIP CODE INTR490

!_j * INTR491 '""TABLE 'DEC 0 RESERVE INTR492 A BSS 189 FOR INTR493 '. IB BSS 324 WORKING INTR494 — - c BSS 1 EPHEMER1S INTR495 * INTR496 PZE ,f-TAR i G INTR497 PZE INTR498 •PZE INTR499 nCENTER PZE INTR500 QCOM BSS 21 INTR501 VAFLG PZE INTR502 FQF^G BSS 3 INTR503 QKBO 'PZE INTR504 UKB1 PZE INTR50B KB2 PZE INTR506 "(KB3 PZE INTR50? LJKB4 PZE INTR508

S-243 INTR, INTRI-

JPHILCQ WDL DIVISION WDL-TR2184 o IHTR, INTRI (Cont'd) KB5 PZE INTR5090 KB6 PZE INTR5100 ,- XM BSS 21 INTR5110 ;. XN, ess 21 INTR5120 T PZE INTR53.30 PZE INTR5140 f R PZE INTR5150 BSEP SYN 7 INTR5160 SEP SYN XN.-XN INTR5170 END INTR

0

•] 0 0

S-244 INTR, INTRI-14;'

PHILCQ WDL DIVISION 3 WDL-TR2184

Subroutine: DJV3

Purpose; To invert a matrix of any dimension up to a 6 by 6.

Ca11in^ Sequence: CALL INV3 (A. N. DETERM)

Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Location Dimensions or Units

10 A 6,6 A (I) Matrix to be inverted

A(0) Inverse of input matrix

I N 1 Dimension of input matrix

0 DETERM 1 Matrix determinant

1' 51 Common storages used or required: None Subroutines required: None Functions required: ABS Approximate number of storages required:

S-245 INV3 - 1

JPHILCQ WDL DIVISION WDL-TR2184

INV3

LABEL INV3 SUBROUTINE FOR INVERTING SQUARE MATRICES WHICH ARE 6 BY 6 OR LESS INV30QOO (TO INVERT LARGER MATRICES,SAY M BY M, DIMENSION IPIVOT (M),A(M*M) ,INV30010 INDEX(M,2),PIVOT(M) AND RECOMPILE) INV30020 A IS THE SQUARE MATRIX TO BE INVERTED INV30030 N IS THE SIZE OF A (A IS AN N BY N MATRIX) INV30040 THE SUBROUTINE RETURNS A INVERSE IN PLACE OF A AND THE DETERMINANTINV30050 IN DETERM. INV30060 SUBROUTINE INV3(A,N,DETERM) INV30Q70 DIMENSION IPIVOT(6),A(36) , INDEX ( 6, 2) .'PIVOT ( 6 ) INV30080 EQUIVALENCE *1 INV30260 IF(IROW*ICOLUM) 140,260/140 INV30270 140 DETERM=-DETERM INV30280 DO 200 L = 1,N INV30290 M s N*(L-1) INV30300 Ml = M+ICOLUM INV30310 M = M+IROW INV30320 SWAP = A(M) INV30330 A(M) = A(M1) INV30340 200 A(M1) = SHAP INV30350 260 INDEX(I,1)=IROW INV30360 INDEX(I,2)=ICOLUM INV30370 •M a N*(ICOLUM-1)*ICOLUM INV30380 •PIVOT(I) = A(M> INV30390 DETERM=DETERM*PIVOT(I) INV30400 ACM) = 1.0 INV30410 DO 350 L=1»N INV30420 • M a 'N*(L-1)*ICOLUM INV30430 350 A(M) = A(M)/PIVOT(I) INV30440 DO 550 L1=1*N INV30450 IF(L1»ICOLUM) 400,550,400 INV30460 400 K a N*(ICULUM»1>*L1 INV30470 T s A(M) INV30480 A(M) = 0. INV30490

PHILCQ WDL DIVISION C-O/.A WDL-TR2184 Q INV3 (Cont'd)

DO 450 L=1»N iM s N*(L-D Ml = M+ICOLUM M B M+L1 450 A(M) s A(M>-A(M1)*T 550 'CONTINUE' iDO 710 1*1,N

IF (INDEX (L»i>-INDEX2) -M -• N*('JROW»1) -Ml s N*('JCOLUM-1) 'DO '705 K«»i»N M -a M + l !M1 s .Ml + 1 SWAP •- A(M) —.I, ' i ACM) = A (Ml) ' J

I'J A(M1) = SWAP 705 CONTINUE 710 CONTINUE 740 RETURN .END

LJ

an

S-247 INV3-3 )PHILCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine*. INVAO q Purposet To form the inverse of a transition matrix for a linear, conservative dynamic system. If $ is a partioned matrix such as *,\ ^ /*-i. then INVAO computes $ =1 «T »T \-^3 *I

Calling Sequence: CALL INVAO (AO, API)

Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I AO 6,6 *(t3,t!) Transition Matrix

0 A01 6,6 -S^Cta.t!) Inverse Transition Matrix -, M L.J

n i !

Common storages used or required: None Subroutines required: None

Functions required: None

Approximate number of storages required:

S-249 INVAO - 1

IPHSLCQ WDL DBVISION n WDL-TR2186,. IJ v " j

INVAO * LABEL INVA ','] * SYMBOL TABLE INVA .lj SUBROUTINE INVAO(AO,AOI> INVAOOOO DIMENSION AO(6»6)*AOIC6«6) INVA0010 p DO 1 1=1,3 INVA0020 W IIsI*3 INVA0030 DO 1 J»l,3 INVA0040 JJsJ*3 INVA0050 W AOI(I,J)»AO(JJ,II) INVA0060 ^ AOI(II,J)=-AO(JJ,I) INVA0070 AOI(II,JJ)=AO(J,I) INVA0080 ',") 1 AOI(I,JJ> = -AO(J,II) ' INVA0090 -:\ RETURN INVA01DO END INVA r-i

S-250 INVAO=2 PHILCQ WDL DIVISION '1 WDL-TR2184

Subroutine: LOADO

Purpose! To transfer the transition matrix from its storage in the integration package's T block to the matrix in the call list.

Calling Sequence: CALL LOADO (AO) Input and Output

Data Symbolic Program Mathematical I/O Name or Dimensions Definition Location Dimensions Symbol or Units

0 AO (6,6) $(t2t!) Transition Matrix

I ) I—J

Common storages used or required: Subroutines required: None Functions required: None Approximate number of storages required:

S-251 LOADO - 1

IPHILCQ WDL DIVISION t

WDL-TR218A(

LOADO

* LABEL LOAD * SYMBOL TAbLt. LOAD L SUBROUTINE LOADOUC) LOADOOOO COMMON T LOAD0010 r- DIMENSION T(1360>.AO<6,e>) LOAD0020h K=6 LOAD0030 C JJs27 LOAD0040 ^ D01 1 = 1,6 LOAD005C V DO 1 Jsl*3 LOAD0060 ;-- K=K*1 LOADOQ70 KKaJ*3 LOADOOeo JJaJJ+1 • LOAD0090 .AOCKK.I)nT(JJ) LOADOino AO(J,I)aT(K) LOAD01K) 1 CONTINUE LOAD0120 RETURN LOAD0130 END LOAD

0 •o

PHILCQ WDL DIVISION ' .^~,,5Ert&tor'&>*Va«y, Q_ 9 S? TflAnO-? a;-| "-' WDL-TR2184 Subroutine: LOADT n Purpose: To place unit initial conditions in the T block for the ra variational equations which are being used to generate the transition matrix. n

Calling Sequence: CALL LOADT

Input and Output

Common storages used or required: Subroutines required: None Functions required: None Approximate number of storages required:

D

I ! U 0

! S"253 LOADT - 1 -'S

I JPHILCQ WDL DIVISION n WDL-TR2184 ; •^'""*0v *— LOAD!

LABEL LOAT SYMBOL TABLE LOAT SUBROUTINE LOADT LOATOOOO SUBROUTINE LOADT PITS UNIT ICS ON PERTURBATION EQUATIONS LOAT0010 COMMON T LOAT0020 DIMENSION T(1360),X(3,6),V(3,6) LOAT0030 EQUIVALENCE < T < 7 > , X),(T(28).V) LOAT0040 DO 2 1=1,3 LOAT0050 L = I*3 LOAT0060 DO 1 J=l,3 LOAT0070 K = J*3 LOAT0080 X(I,J)=0, LOAT0090 H V(I,K)=Q. LOAT0100 I] X(I,K)=0. LOATOUO V(I,J)=0. LOAT0120 -^ CONTINUE LOAT0130 I'l LOAT0140 ; LOAT0150 CONTINUE LOAT0160 M RETURN LOAT0170 J END LOAT

S-254 LOADT-2- 1 { PHILCQ WDL DIVISION. I ' "\ WDL-TR2184

Subroutine: MASS

Purpose; To find the relevant gravitational constants to be used in computing planetary perturbations for a given central body. MASS also chooses the initial integration step size as a function of central body.

Calling Sequence: CALL MASS (NOR, UM, VKB, X, ACCP)

Input and Output

Symbolic Data Program Mathematical I/O Name or Dimensions Definition Dimensions Symbol Location or Units

I - NOR 1 Central Body Indicator.

l=Earth; 2, Moon; 3, Sun; 4,

Venus; 5, Mars; 6, Jupiter

\ I UM 6 Hi KV m3 //se c2 Gravitational constants, arrange •• / as above

3 2 0 VKB 6 Hi Kvm //sec M.J for bodies

I X 3 X,Y,Z Km Position coordinates

0 ACCP 1 seconds Initial integration step size

Common storages used or required: None

Subroutines required: None

Functions required: FNORM

Approximate number of storages required:

S-255 MASS-1

JPHILCQ WDL DIVISION WDL-TR2184 o

Method of Establishing Integration Step Size and Perturbing Bodies

Lrj Central Body Integration Step Size Other Bodies to be Considered

Earth 60.0 Moon, Sun. If |x| s 10 Km, Jupiter. Moon 60.0 Earth, Sun. Sun 43200.0 All Venus , Mars, Jupiter 60.0 All

The bodies which are not to be used in calculation of pertubation accelerations are eliminated from consideration by placing zeros in array VKB(6). For the bodies which are being considered, the appropriate gravitational constant is placed in VKB(6).

S-256 MASS-2

PHILCQ WDL DIVISION WDL-TR2184 (pi MASS

LABEL MASS SYMBOL TABLE MASS SUBROUTINE MASS( NQR, UM, VKB, X ACCP ) MASSOQi DIMENSION UM(6),VK6(6),X(3) MASSOOi N q NOR MASSOO! DO 1 1*1,6 MASSOO: VKB(I) = 0. MASSOO' GO TO (2, 3, 6, 4, 4, 4), N MASSOO! VKB<2) * UM(2) MASSOOi ACCP e 60. MASSOOi DIS * FNOKM(X) MASSOOI VKB<3) s UM(3) MASSOO' IF ODIS-1000000. > 11,10*10 , s MASS01! 10 VKB(6) UM (6 MASSOl: GO TO""12" -MASSOI: 11 VKB(6) c 0, MASSOl; 12 RETURN s MASS01* 3 VKB(l) UM U MASSOl! VKB(3) 9 UM (3 MASSOK •ACCP = 60 t MASSOl' RETURN MASS01I 4320 n 6 ACCP = 0. MASSOl! GO TO 7 MASS021 4 ACCP = 60 • MASS02: 7 DO 5 I= 1.6 s MASS02: 5 VKB(I) UM (I MASS02I VKB(N) 5 0. MASS02'< RETURN MASS02? -END MASS

S-257 MASS -3

JPHILCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184 d Subroutine; MATRX

Purpose! To perform matrix multiplications of matricies with any dimensions up to maximum dimensions of 10 by 10. A zero in the call sequence (J) yields an output matrix C = A'B. A one in the call sequence (J) yields an output matrix C = A-B*AT. The matrix products are obtained in double precision.

Calling Sequence: ' ------CALL MATRX (A. B. C. NRA. NCA. NCB. J) n Input and Output

Symbolic u Data Program Mathematical Name or Definition I/O Dimensions Symbol Dimensions Location or Units

I A (10,10) Input Matrix I B (10,10) Input Matrix

0 C (10,10) Output Matrix I NRA 1 Number of Rows of A I NCA 1 Number of Columns of A I NCB 1 Number of Columns of B I J 1 Type of multiplication desired

Common storages used or required: None Q Subroutines required: None Functions required: None

Approximate number of storages required:

5-259 MATRX - 1

WDL DIVISION * LABEL MATX * SYMBOL TABLE MATX CEC2000 SUBROUTINE MATRX MATX SUBROUTINE MATRX(A,B,C,NRA,NCA,NCB, J) MATXOOOO H C J=0 A*B = C MATX0010 C J=l A*B*AT=C T MEANS TRANSPOSE MATX0020 C NRA=NUMBER OF ROWS OF A MATX0030 C N'CAsCOLUMNS OF A MATX0040 C NCBsCOLUMNS OF B MATX0050 C ACCUMULATION OF PRODUCTS IN DOUBLE PRECISION MATX0060 DIMENSION A(100). 8(100), C(100)*D<100) MATX0080 D DUD=0, MATX0090 D MATX0100 DO 1 1=1, NRA MATX0110 DO 1 K=1,NCB MATX0120 NCaI*{K"l)*NRA MATX0130 CRUD=0. MATX0140 DO 2 L=1,NCA MATX0150 NA=I*(L-1)+NRA MATX0160 NBs|_*(K-l)*NCA MATX0170 DUD=A(NA) MATX0180 MATX0190 CRUDsCRUD+DUD*DUM MATX02DO 2 CONTINUE MATX0210 D(NC)=CRUU MATX0220 1 CONTINUE MATX0230 IF

S-260 MATRIX -2

PHILCO. WDL DIVISION WDL-TR2184

Subroutine: MATSUB

Purpose: The subroutine is primarily logic which controls (1) trajectory and data printout, (2) updating of the state covariance matrix for observations by calling subroutines EARTR, ONBTR, and MONBTR, and (3) updating of the guidance covariance matrix by calling subroutine GUID.

Calling Sequence; CALL MATSUB

Input and Output

Symbolic Program Mathematical Data Definition I/O Name or Dimensions Symbol Dimensions Location or Units

I Quantities obtained from common

0 Quantities returned to common

u Common storages used or required: T. S, C, 1C EARTR, GUID, INVAO, LOADO.LOADT, Subroutines required: MATRX, MONBTR. ONBTR, OUTC, OUTP

Functions required: SQRT (FIL)(STH) Approximate number of storages required: 346 DEC

S-261 MATSUB - 1

r i uPHILCQ WDL DIVISION UDL-TR218A

SUBROUTINE MATSUB

CALL LOADO OBTAINS TRANSITION MATRIX

MATRX, UPDATE TRANSITION MATRIX FROM INJECTION

U',' CAI I I OADI I'll MAI I ~.F PERTURBATION EQUATIONS

CALI MATRX UPDATE COVARIANCI- MATRIX FOR TRANSITION IN TIMf t'POM LAST TIME IN MAT?UB

IS IT TIME FOR PRINTOUT

SETUP NEXT PRINTOUT TIME

CALL OUTPUT SUBROUTINES OUTC OUTP

IS EARTH BASED TRACKING BEING USED

CALL EARTR TRACKING STATION SUBROUTINE

ARE ONBOARD MEASUREMENTS BEING MADE

CALL ONBTR ONBOARD MEAS. SUBROUTINE MATSUB -2 G>

S-262

PHILCQ WDL DIVISION WDL-TR2184

ARE LUNAR NO BASED BEACONS USED

CALL MONBTiR MOON BEACON TRACKING SUBROUTINE

(V

IS OUTPUT_OESIRED_

YES

WRITE OUT KNOWLEDGE OF POSITION AND VELOCITY

201*-

:J IS THIS A GUIDANCE RUN

CALL MATHX UPDATE GUIDANCE MATRIX FOR TRANSITION IN TIME

UPDATE PARTIALS TO TARGET FOR TIME TRANSITION

CALL GUIO PERFORM GUIDANCE COMPUTATIONS AND CORRECTIONS »' -1 El

SET TSECP (LAST TIME IN MATSUB) EQUAL TO PRESENT TIME

RETURN/

S-263 MATSUB -3

PHBLCQ WDL DIVISION * LABEL MATS ' .. * 'SYMBOL TABLE MATS CEC2006 SUBROUTINE MATSUB MATS SUBROUTINE MATSUB MATSOOOO COMMON T,S,C,IC MATS0010 DIMENSION T(1360),S(1000),C(1000),IC(1),AN(3,3),PO(22),VE(22>« MATS0020 1EM(3,3),XP(3),VXP(3),EA(3,3),XED(3),VED(3),AO(6,6),P(6,6), MATS0030 2TFTA(3,6),PFTA(6,6),AOS(6,6),AOI<6,6) MATS0040 EQUIVALENCE (T ,TDUM).(S pSDUM),(C ,CDUM), MATS0050 ltC(138)*AN)f(C(13),TPl)«(C(14),TP2).(C(62),PO>,(C(84),VE)» MATS0060 2(C(120),EM),(C(650)pTPRINT),(C(651)pTSTRT),(C(30).TSEC)« MATS0070 3(C(15),XP),(C(18).VXP),(C(10)»TW).(C(11).TF) , (IC(6),ITARG),(IC(9),LPRINT) ,MATSQUO KICU90), LSTAT), <1C(191),LONB). CIC(192),LMB),-(IC<193) , IGUID) . MATS0120 2(IC(214),NOUT),(C(649),TSECP) MATS0130 CALL SETN(NIN,NUTS) MATS0131 MATS014Q CALL LOADU(AO) MATS0145 CALL MATRX(AQ,AOS,AOS,6,6*6,0) MATS0150 CALL LOADT MATS0155 CALL MATRX(AOJP»P,6p6,6»l) MATS0160 DO 30 1=1,6 MATS0165 DO 30 J=I,6 MATS0170 P)/2. MATS0175 P(J,I)=P(I,J) MATS0180 30 CONTINUE. MATS01R5 IF(TOUT"TSEC) 3,3,4 MATS0220 3 CONTINUE MATS0230 TOUT=TOUT*TPRINT MATS024Q NOUT=2 MATS0250 tvOUT IS USED TO INDICATE OTHER OUTPUT 'WANTED WHEN = 2 MATS0260 CALL OUTC MATS0270 CALL OUTP MATS0280 4 CONTINUE MATS0290 LSTAT IS SET 2 BY INPUT CARDS IF ANY EARTH BASED TRACKING MATS0300 LSTAT=LSTAT MATS0310 GO TO (6,b),LSTAT MATS0320 5 CONTINUE MATS0330 CALL EARTR MATS0340 EARTR UDDATS COV MATRIX P FOR EARTH BASED TRACKING MATS0350 6 CONTINUE MATS0360 LONB=LONB MATS0370 GO TO (8,7>,LONB MATS0380 LONB IS SET 2 BY INPUT CARDS IF ANY ONBOARD MEASUREMENTS MADE MATS0390 7 CONTINUE MATS0400 CNRTR UPDATES COV MATRIX P FOR THE ONBOARD MEASUREMENTS MATS0410 CALL ONBTK MATS0420 8 CONTINUE MATS043C LMB=LMB MATS0440

S-264 KATSU3

RHILCQ WDL DIVISION! WDL-TR2184 oC/B (Cont'd)

GO TO (10,9),LMB MATS0450 1MB IS SET 2 BY INPUT CARDS IF MOON BASED BEACONS USED MATS0460 9 CONTINUE MATS0470 CALL MONBTR MATS0480 MCNBTR UPDATS COV MATRIX P FOR BEACONS -ON MOON MATS0490 10 CONTINUE MATS0500 GO TO (20,19), NOUT MATSOS10 19 CONTINUE MATS0320 RMSPaSQRTF (P (1,1)*P (2,2>+P (3,3)) MATS0530 RMSVP=SQRTF(P (4,4)*P (5,5>*P (6,6)) MATS0540 WRITE OUTPUT TAPE NUTS,700,RMSP,RMSVP MATS0550 700 FORMATC42H KNOWLEDGE OF -STATE AFTER ALL OBSERVATIONS,/ MATS0560 124H RMS POSITIONc,C15,8,'25H RMS VELOCITY*, MATS0570 2E15.8) MATS0580 20 .CONTINUE ------_ _ _ __ - MATS0590 : NUMBERS 11-16 RESERVED FOR FUTURE MEASUREMENTS MATS0600 IGUID=IGUID MATS0610 GO TO (18,17),IGUID MATSQ620 : IGUID IS SET BY .INPUT TO MAIN 'PROGRAM IF' GUIDANCE CALCULATIONS AREMATS0630 : MADE MATS0640 17 CONTINUE MATS0650 'CALL MATRX(AO,PFTA,PFTA,6,6,6,1) MATS0655 H DO 31 1*1,6 MATS0660 L) 'DO 31 J«I,6 MATS0665 PFTA(I,J)=(PFTA(I,J)*PFTA(J,I))/2. MATS0670 ,-) PFTA(J.I)=PFTA(I, J) MATS0673 1 31 CONTINUE MATS0680 ,CALL INVAO(AO,AOI) MATS0685 •CALL MATRX(TFTA,AOI,TFTA,3,6,6,0) MATS0690 I .CALL 'QUID MATS0710 •~

S-265 MATSUB -5

>PHILCQ \A/DL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine; MNA

Purpose! To provide the rotation matrix EMN which transforms moon centered coordinates in the earth's true equator and equinox to moon centered coordinates in the moon's true equator.

Calling Sequence: CALL MNA (TIME. CM." CR, DT.'~EPSIL.~ RO". G. GP. WW, EMN)

Input and Output

Data Symbolic Program Mathematical I/O Name or Dimensions Symbol Dimensions Definition Location or Units

I TIME 1 d days Days since 1350.0 I OM 1 Q Output from NUTAIT: (Arg. De- cending node) u I CR 1 c radians Output from NATAIT: (mean long. of the moon) I DT 1 AT + dY radians Output from NUTAIT: (nutation in U longitude) I EPSH 1 e + Ae + de radians Output from NUTAIT: (mean obliqu Lty and nutation in obliquity) (Cont'd Common storages used or required: None.

Subroutines required: System double rr.JHinn

Functions required: INTF. SORT. SINr COS. ACOS Approximate number of storages required: _ ____

S-267 MNA-1

iPHILCQ WDL DIVISION WDL-TR2184

(Cont'd.)

Symbolic Mathematical Data Program Dimensions Definition I/O Name or Symbol Location Dimensions or Units

0 RO 1 P Libration term 0 G 1 g radians Mean anomaly of the moon

0 GP 1 g radians Mean anomaly of the sun

0 WW 1 (H radians Argument of the perigee of the

moon

0 EMN 3,3 Rotation matrix

Transformation From Earth's True Equator to Moon's True Equator.

The two rectangular systems are related through A, Q', and i by the rotation: b b ll !2 b!3X / v' b21 b22 b") b b b (V,"' 31 32 33^ MOON EARTH

where 1 1 11 cos A cos n - sin A sin Q cos i cos A sin n1 + sin A cos Q' cos i cos A sin i '13 -sin A cos Q' - cos A sin Q' cos i 21

S-268 MNA-2

PHILCQ WDL DIVISION Q" -~• \ \'y WDL-TR2184 ft- tj b -sin A sin fi' + cos A cos 0' cos i

><-> b = cos A sin i

b j = sin Q1 sin i

O 1 b = -cos Q sin i

8 b33 = C°S ± f7 ' { i is the inclination of the moon's true -equator to the earth's -'" - - - -- — — _ equator _. ______

'••' l Q' is the right ascension of the ascending node of the moon's true *--' equator u•~) A is the anomaly from the node to the X axis A = A + ((£ d-T) - (Q + a) ••—i LJ A is the anomaly from the node to the ascending node of the moon's true equator on the ecliptic

| Q is the mean longitude of the descending node of the moon's mean ~ equator on the ecliptic

( j (T is the mean longitude of the moon n a is the libration in tha node t,J -P is the libration in the mean longitude

ft p is the libration in the inclination.

6Y, e, 0, and are input quantities obtained from NUTAIT. The remainder are computed from the following equations.

I = inclination of moon's equator to ecliptic

I = 1.535°

g = mean anomaly of moon

g = 215.54013 + 13.064992 d

S-269 MNA-3

RH1LCQ WDL DIVISION WDL-TR2184

g1 ° mean anomaly of sun

g1 = 358.009067 + .9856005 d

U) = argument of perigee of moon

<»> = 196.745632 + .1643586 d

where d = days from 1950.

a sin I = -.0302777 sin g + .0102777 sin (g + 2m) -.00305555 sin (2g + 2u>)

f = -.003333 sin g + .0163888 sin g' + .005 sin 2u)

p = -.0297222 cos g + .0102777 cos (g + 2u>) -.00305555 cos (2g + 2«o)

cos i = cos (Q + a + 6Y) sin e sin (I + p)

+ cos e cos (I + p) 0 < i < 90°

sin n1 = -sin (Q + a + 6Y) sin (I + p) esc i -90°< Q' < 90°

sin A = -sin (d + a + 6¥) sin e esc i

cos A = -sin (Q + a + 6Y) sin n1 cos e

-cos (Q + a + 6Y) cos n1 0°£ A < 360 °

Reference: JPL Technical Report No. 32-223

S-270 MNA-4

PHILCQ WDL DIVISIOK WDL-TR2184

MNA

* LABEL SMNA * SYMBOL TABLE SMNA CEC20AH SMNA SUBROUTINE MNA{TIME,OM,CRpDT,EPSIL.RO,G,GP,HW,EM) SMNAOQQ DIMENSION EM(3,3)»DF(3) SMNA001 D = TIME SMNA002 T a D/36525, SMNA003 T2 = T*T SMNA004 T3 s T2*T SMNA005 Asl3,064992 SMNA006 DO 6 1=1,3 SMNA007 'DDsD SMNA008 D DDaDD*(A/360, ) - -- - SMNAOO-? D -DDaDD°INTF(DD) SMNA01C DF(I)sDD SMNAOU GO TO (4,5,6)fl SMNA012 4 As09856005 SMNA012 GO TO 6 SMNA014 5 .A=01643586 SMNA015 6 .CONTINUE SMNA016 Gs215o54013*3608*DF(l) SMNA017 GPe358,009067*36Oo+DF(2) SMNA01E WWsl96o745632*360,*DF(3) SMNA01S G s G*0017453296 SMNA020 GP = GP*,017453296 SMNA023 ^J ww =•WW*.017453296 SMNA022 YN s 1,535*,017453296 SMNA023 '") RO = =.0297222*COSF(G) • 01020777*COSF *WW SMNA024 1 i L_; SMN1A02E TA s =c003333*S!NF(G) •* . 0163888*'SINF ( GP ) SMNA026 n 1 * ,005*SINF(2»*WtO SMNA027 . \ SG = °00302777*SINF(G) ,0102777*SINF G*2 . *WW SMNA028 ^ 1 - ,00305555*SINF(2.*G*2 *WW) SMNA029 SG (SG+,017453296)/SINF(YN) SMNA030 RO RO*.017453296 SMMA031 a' TA TA*,017453296 SMNA032 YN YN + RO SMNA033 r.i"i :RO OM •+ SG •* DT SMNA034 H • CI COSF(RO)*SINF(EPSIL)*SINF(YN) SMNA035 1 •*COSF(EPSIL)*COSF(YN) SMNA036 • SI si.. CI*«2 S M M A 0 3 7 SI •SQRTF(SI) SMNA038 .SO =SINF(RO)*SINF(YN)/SI SMMA039 • CO 1. - S0**2 SMNA040 • CO SQRTF(CO) SMNA041 SD =SINF(RO)*SINF(EPSIL)/SI SMNA042 CD -SINF(RO)*SO+COSF(EPSIL) COSF(RO)*CO SMNIA043 DL ACOSF(CD) SMNA044 IF

S-271 MM-5 iPHILCQ WDL DIVISION WDL-TR2184 - 9 UNA (Cont'd)

CA s DL + (CR * TA) - (OM •*• SG) SMNA048 SA = SINF(CA) SMNA049 CA = COSF(CA) SMNA050 RO = COSF*SINF(EPSIU/(SI*CD) SMNA051 EM(1,1) a CA*CO • SA*SO*CI SM\iA052 o EM(1,2) 3 CA*SO + SA*CO*CI SMNA053 W EM(1,3) a SA*SI SMNA054 U EM(2,1) = -SA*CO - CA*SO*CI SMNA055 EM(2,2) = -SA*SO * CA*CO*CI SMMA056 fl EM(2,3) B CA*SI SMNA057 J Eh(3,l) s SO*SI SMNA058 EM(3,2) = -CO*SI SMMA059 f-> EM(3,3) = CI • SMNA060 RETURN SMNA061 ' END SMNA

0

0

S-272 MNA-6

PHILCQ >A/DL DIVISION o WDL-TR2184

Subroutine: MNAND

J Purpose; xo compute the matrix M used to perform the velocity trans- formation corresponding to the position transformation described in MNA.

Calling Sequence: Li MNAND (TIME, RO, G, GP, WW, EM, DM) Input and Output

Symbolic Data Program Mathematical I/O Name or Dimensions Definition Dimensions Symbol Location or Units

I TIME 1 d days Days since 1950.0

I RO 1 P radians Output from MNA; see description J .J I G 1 8 radians Output from MNA; see description

/ . I I GP 1 g radians Output from MNA; see description \ u-./ I WW 1 (i) radians Output from MNA; see description

I EM 3,3 M Output from MNA; matrix M

0 DM 3,3 M Matrix M

Common storages used or required: None

Subroutines required: None

Functions required: COS

Approximate number of storages required:

S-273 MNAND-1

IPHILCQ WBL DIVISION 0

WDL-TR2184

Theory and Equations

In transforming lunacentric position coordinates relative to the earth's equator and equinox of 1950.0 to coordinates relative to the moon's true equator, three matrices are computed. Matrix A (from ROTEQ) rotates the coordinates to equinox of date, matrix N (from NUTAIT) accounts for the nutation of the earth about its processing mean equator, and matrix M (from MNA) transforms to the position relative to the moon's true equator.

Then •X' X> Y MNA Y Z Z moon earth, 1950.0

Assuming that N = A = 0

X X • • Y = MNA Y + MNA • • Z Z moon earth, 1950 earth, 1950

The M matrix is computed from the equations:

M =

where M.. are the elements of M, and

- a

S-274 MNAND-2

PHILCQ WDL DIVISION n

WDL-TR2184

A = -p (0 + a)

([ = 0.266170762 X 10"5 - 0.12499171 X 10~13 T rad/sec; T = d/36525

n = -0.1069698435 X 10"7 + 0.23015329 X 10~3 T rad/sec

t = -0.1535272946 X 10~9 cos g

+0.569494067 X 10"10 cos g

+0~.579473484~X 10~U cos 2m rad/sec n a = -0.520642191 X 10"7 cos g +0.1811774451 X 10"7 cos (g+2<»)

"1 -0.1064057858 X 10~7 cos (2«H-2g) rad/sec

Reference: JPL Technical Report No. 32-223 n G

S-275 MNAND-3

JPHILCQ WDL DIVISION i]

MKANI

LABEL MNAN SYMBOL TABLE. MNAN SUBROUTINE MNAND(TIME»RO,GpGPJWH,EM,DM) MNANOOOO DIMENSION DM<3,3),EM(3B3.) MNAN0010Q T a TIME/36525, MNAN002oH CRD = , 12499t71E«13*T MNAN0030 OMD = - e1069698435E . 230 15329E-13*T MNAN0040 TAD a -1,535272946*COSF

TAD B elE=9*TAD MNAN0070 SGD * -•,520642191*COSF(G) , 1811774451*COSF *WW MNAN0080f| .•~01064057858*COSF(2,*WW+2 *G) MNAN0090L) SGD B ,1E=6*SGD MNANOIDO ;DLD = -RO*(OMD * SGD) MNAN0110,—, CAD = OLD * CRD * TAD OMD - SGD MNAN0120»»^Mu DM(lil) « EM(2,1)*CAD DM(1,2) EM(2,2)*CAD MNAN0140 DM<1,3) EM<2*3)iiCAD MNANOlSo DM(2,1) •=EM(lil)*CAD DM<2,2) =EM(1,2)+CAD MNAN0170 DM(2,3) -EM(1,3)*CAD MNANOlBO DM(3,1) 0,0 MNAN0190.: DM(3,2) 0,0 DM(3p3) 0,0 MNAN0210 RETURN MNAN0220' END MNAN

U 0 0 0

i ; :J

S-276 MNAND-6 . RHILCQ WDL DIVISION WDL-TR2184

Subroutine; MONBTR

Purpose ; xo obtain the position and velocity vectors of the vehicle relative to the beacon and determine if the beacon is in view of the vehicle. The station location partials are computed and subroutine COMPHQ called to update the state covariance matrix for the measurements being made. The types of measurements possible are range, range rate, right ascension, and declination.

Calling Sequence; CALL MONBTR n- Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions .Definition Locat ion Dimensions or Units

I Quantities obtained from common 0 Quantities placed in common

Li

Common storages used or required: T, S, C, 1C COMPHO, DOT, INTRI, MATRX, Subroutines required: MNAND. MNA. NUTAIT. TRAC ASIN, ATAN, FNORM, SQRT Functions required: (FIL)(SLO)(STH)

Approximate number of storages required: 495 DEC

5-277 MONBTR-1

IPHILCQ WDL DIVISION o WDL-TR2184

MONBTR Partial Derivatives

MONBTR computes two partial matrir.es which evaluate station location errors. The matrices

X dXj dxt "^ dLAT dLON dALT

"V "\» "\ . dx, dx2 dx2 STPARS = dLAT dLON dALT

8x3 dX3 dX3 dLAT dLON dALT^ *v

*-x X dxi dx1 dLAT dLON dALT

ax2 dX2 dX2 STPARD = dLAT dLON dALT

ai3 dx3 dx3 dLAT dLON dALT l x- f* \ - + - H XREL (FORTRAN) "here ' *2 = -*v *B

H VREL (FORTRAN)

_ _ i = 1,2,3 dLAT dLAT d~LAT ~ dLAT

S-278 MONBTR-2

PHILCO WDL DIVISION' WDL-TR2184

= (MNA) f y (=0) = (MNAND) X + (MNA)

where subscripts BM indicate beacon moon-fixed coordinates.

The transformations MNA and MNAND are obtained by calling the sub- routines MNA and MNAND.

'cos LAT cos LON'

= (R + ALT) cos LAT sin LON

sin LAT

3x1 3x3 3 x 1

1 >PAR a PAR

= (MNA) a PAR n LJ _3_ *PAR

^ dPAR

= QlNAND)

azBM PAR MONBTR-3 S-279

1PHILCQ WDL DIVISION a WDL-TR2184 3

(R + ALT) dLAT

3x1

•cos LAT sin LON

(R + ALT) cos LAT cos LON dLON 0

3x1 3x1

dALT •J

3x1

STPARS = (MNA)

3x3 3x3 3x3

STPAROTDADFDV c= /MMAKir>(MNAND)\

3x3 3x3 3x3 D Following computation of the matricies; subroutine COMPHQ is called to perform the updating of the state covariance matrix. 0

S-280 MONBTR-4

PHILCQ WDL DIVISION: WDL-TR2184

SUBROUTINE MONQTR

OBI AIN VF.CTC" FROM VLMICI-E TO MOON

IS BEACON STEP THROUGH CONSIDERED 10 BEACONS

[ NO

OBTAIN - VECTOR FROM MOON CENTER TO BEACON

OBTAIN VECTOR FROM VEHICLf TO BEACON

IS VEHICLE SET IMOONB ~ 0 ABOVE. HORI7ON ' FOR STATION

CHECK IMOONB DID VE.HICI r SET IMOONB - I SET STATION FOR STATION L AST TIME

r.oMPUTr PARTIAL? FOR STATION LOCATION ERRORS (POSITION)

WRITE OUTPUT STATION DATA

OBTAIN RELATIVE VELOCIT1 VECTOR » i STEP THROUGH , t a TYPES OF o MEASUREMENTS

I1- I V PE OF EASUREMENT CON<5IOEREn

YES

IS THIS A RANGE RATE CALL COMPHO MEASUREMENT

YES

COMPUTE PARTIALS FOR STATION LOCATION ERRORS (VELOCITY) S-281 MONBTR-5

JRHILCQ WDL DBVISION WDL-TR2184 I j Messrs

* LABEL MONB * SYMBOL TABLE. MONB '••) CLC2012 SUBROUTINE MQNBTR MONB f SUBROUTINE. MON8TH MONBOOOO COMMON T,S,C,IC MONB0010 DIMENSION MONB002of| 11(1360), SUOOO),C(10UO).IC<1>. XREL(3),VHEL(3) MONB0030 LJ l,PO(22)«Vt<22),AN(3»3),EM<3*3) .ISBOON<10)»U<3).EN(3) MONB004Q 2,RT(3)^E(3)*ETM(3P3) , IMOONB< 10) , DM< 3p 3 > P DUM ( 3, 3 ) MONB0050F1 3»RMB<3)*TYMEAS{4,10).X(3),VX<3 ),OUTPUT<6-> MONB0060 ['J DIMENSION STPARS(3.3)*DUD(3p3)pSTPARD<3p3) MONB0065 " EQUIVALENCE (TpTDUl*)* (SpSDUM), (C,CDUM), (JC,ICDUM) MONB0070 ,-\ 1,(C<895),XREL).(C(898),VREL)»< C<894).:OBNO),(C(893),XMAG>, MONB0080 > 2(C(892)SDEX), (C ( 891 ) . DEN1 )89 ,0 ( ) C, (DEN2 ) MONB0090 3fl(C(389),DEX2)!,.( C(652)pP)p ( C ( 973 ), OUTPUT ) MONB0100 l»(C(13),TW),(C(14),TF)«(C(62)* PO)p(IC(3)«NOR) MONB0110 Q 2,(lC(190)f LSTAT).CC(138>fAN). (S(24),A), (C(120),EM) MONB0120 '!$ 3, TSEC)p(IC(140),TYMEAS)p(C{l5),'X)»(C(18),VX) MONB0140 Tj EQUIVALENCE ( C ( 800 ) , STPARD () 78. (8 C) . STPARS ) MONB0145 ';'j CALL SETN^NIN MONB0147 " DELTT=TSEC=TSECP MONB0150 -i LSTAT=LSTAT MONB0160 • GO TO(1»2),LSTAT MONB0170 ''" 1 CONTINUE MONB0180 MONB019Q DIS=loE10 MONB0200 CALL INTR1(TW»TF.NB,PO,1,VE»DIS) MONB0210 CONTINUE MONB0220 TIME=TW+TF MONB0230 CALL NUTAIT(TIME»OK.CR,DT»EM,EPSIL) MQNB0240 CALL MNA(TIME,OM,CfipDT,EPSIL.RO«GpGP*WW.ETM) MONB0250 CALL MNANU(TlMEsRO,G,GP,WK,ETMpDM) MONB0260 MONB0270 CONTINUE MONB0280 DO 4 1=1,3 MONB0290 J=2G-I MONB0300 XREL(I)sPl)( J)-X(I) MONB0310 VREL(I)=VE(J)°VX

S-282 WDL MONBTR-DIVISION6 : PHILCO (Cont'd)

NNsNN+15 MON604E nI I IFdSBCOM(III) )18.18.8 CONTINUE MONB04v AT=S(NN*9)*DR MONB04E ON«S(NN*10)*DR MONB049 ALaS(NN*ll) MONB05C SNAME=S(NN*12) MONB053 GHsQ, MONB052 CALL TRAC

S-283

PH8LCQ WDIL DIVISION WDL-TR2184_ ' J

MONETR (Cont'd)

IS CONTINUE MONB0810 RMB ROTATIONAL VELOCITY OF MOON BEACON 1950 MONB0820 DO 16 1=1,3 MONB0830 VREL(I)=VREL(I)*RMB(I) MONB0840 VREL RELATIVE VELOCITY OF MOON BEACON WRT THE VEHICLE MONB0850 16 CONTINUE MONB0860 OBNO-DELTT/S(NN*13) MONB0870 XMAG=FNQRM(XREL> MONB0880 MONB0890 DENl=lo/SQRTF(DEX)/XMAG**2 MONB0900 DEN2=10/DEX MONB0910 DEx2sXMAG*XMAG MONB0920 DEX3=1=/XMAG MONB09SO THE ABOVE QUANTITIES ARE USED IN COMPUTATIONS OF H MATRIX MONB0940 DEC=ASINF(DEX3*XREL(3) > MONB0942 OUTPUT(5)=DEC/DR MQNB0944 RAaATANF(XREL(2i/XREL(l» MONB0946 OUTPUT<3)=RA/DR MONB0948 •OUTPUTd)=XMAG MONB0949 DO 17 JJJ=1.4 MONB0950 IF(TYMEAS(JJJ,III) ) 17*17,19 MONB0960 19 CONTINUE MONB0962 IF< JJJ=4>33, 32.33 MONB0964 32 'CONTINUE MONB0966 DO 34 1=1,3 MONB0968 DO 34 Jci,3 MONB0970 STPARDd, J)sO. MONB0972 DO 34 K=l»3 MONB0974 34 .STPARDd, J)BSTPARD(I» J ) *DUM ( K, I > *DUD ( K , J) MONB0975 33 CONTINUE MQNB0976 CALL COMPHQUJJ.2.NN) MONB0978 17 CONTINUE MONB0980 WRITE OUTPUT TAPE NUTS. 700t III. OUTPUT MONB0982 700 FORMATdSH MOON BEACON ,12, MONB0983 1/4H RNGE15.8,5H RGRE15,<8, MONB0984 25H RAE1508,5H RARE1588,5H DECE15.8.5H DCRE15.8) MONB0985 DO 20 1=1.6 MONB0986 20 OUTPUT(I)=00 MONB09B7 18 CONTINUE MONB0990 RETURN MONB1000 END MONB

S-284 MONBTR-8

PHILCQ WDL DIVISION! WDL-TR2184

Subroutine: MULT

Purpose! To find the product matrix of two 3x3 matrices.

n Call'lng Se'quence: - - - - - CALL MULT (A, B, C)

Input and Output

Symbolic i Data Program Mathematical I/O Name or Dimensions Definition n Dimensions Symbol Location or Units

I A • . 3,3 First input matrix I B 3,3 Second input matrix

0 C 3,3 C = AB

••

LJ

Common storages used or required: None

Subroutines required: None Functions required: None

Approximate number of storages required:

h'ULT - 1

SPHILCQ WDL DIVISION WDL-TR2184_

!/ i-Iff *^ MULT

* LABEL - MULT * .SYMBOL TABLE MULT SUBROUTINE MULT(A,B,C,N ) MULTOOOO DIMENSION A(3,3)«B(3,3)«C(3»3) MULT0010 DO 1 1=1/3 MULT0020 DO 1 J = l,3 MULT0030 C(I»'J) ~ 0, MULT0040 DO 1 K=l,3 MULT0050 l'C(I,J) « C(I,J> * A(I,K)*B(K,J> MULT0060 ! 3 RETURN MULT0070 END MULT

0

J

D

S-286

MULT-2 PMILCQ WDL DIVISION J WDL-TR2184 n Subroutine: NUTAIT

Purpose; xo evaluate the elements of the nutation matrix which i,:) relates the Cartesian coordinates expressed in the true equator and equinox to those in the mean equator and equinox.

Calling Sequence: ._--_._ ^ _ CALL NUTAIT (TIME, OM, CR, DT, EN, EPSIL)

Input and Output

Symbolic u Data Program Mathematical I/O Name or Dimensions Definition Dimensions Symbol Location or Units

I . TIME 1 T days Total number days from ref. epoch

0 OM 1 n radians Argument of moon's descending .J node 0 CR 1 CR radians Mean longitude of moon

0 DT 1 AV + dY radians Nutation in longitude of equinox

0 EN •3,3 N (-) Nutation matrix

u 0 EPSIL 1 ~F. + de radians True obliquity

Common storages used or required: None

Subroutines required: None

Functions required: INTF, SINF, COSF

Approximate number of storages required:

3-287 NUTIAT-1

IPHILCQ WDL DIVISION WDL-TR2184

NUTAIT

Method and Theory

The input time is converted to Julian centuries of 36525 days past the reference epoch (currently, 0 January 1, 1950, E.T.). Where the computed angles are likely to be extremely large, the largest contributing term is reduced to the first revolution by the internal function DF(X). By using double precision arithmetic, this technique also helps to control round-off errors more closely as well as to keep the computed angles reasonable.

The relationship between the Cartesian coordinates expressed in the true equator and equinox and those expressed in the mean equator and equinox is shown in the following sketch:

-TRUE EQUATOR

The nutations are given by the following:

For obliquity f>r = Ae + de For longitude 6T = AY + df

In the above equations, Ae, AY express the long-period contributions and de, dV the short-period contributions.

S-288 NUTAIT-2

PHILjCQ WDL DIVISION, L ^ WDL-TR2184 'x-. s/ e' Both e and Y are computed as functions of 0, CR, P1, L, F where n I 1 21 n = 12.112790 - 360*DF(1) + .0020795T + .002081T + .000002T

II CR = 64.375452 + 360*DF(2) - .001131575T - .00113015T2 - .0000019T3

T' = 208.84399 + 360*DF(3) - .010334T - .010343T2 - .000012T3

}|! T = 282.08053 + .0000470684D + .00045525T + .0004575T2 + .000003T3

2 pr, L = 280.08121 + 360*DF(4) + .000303 (T + T )

. „ ^ T in the above equations is the number of Julian years past the reference I I epoch and the function DF(X) is

[! DF •d 3?0

r| where a = .052953922, 13.176397, .11140408, .98564734 r ] ^ and d is the number of days past the reference epoch. ' 1 iJ Then Ae x 104 = 25.5844 cos 0 - .2511 cos 2 0

- ; + 1.5336 cos 2L + .0666 cos (3L - T) i - .0258 cos (L + T) - .0183 cos (2L - Q)

' ! - .0067 cos (2F' - 0) LJ

["] de x 104 = .2456 cos 2CR + .0508 cos (2CR - Q)

+ .0369 cos (3CR - I"1) - .0139 cos (CR + F1) C) i'j - .0086 cos (CR - T' + 0) + .0083 cos (CR - T1 - 0)

p + .0061 cos (3CR + T1 - 2L) + .0064 cos (3CR - T1 - 0)

AY x 104 = -(47.8927 + .0482T) sin Q

U + .5800 sin 20 - 3.5361 sin 2L - .1378 sin (3L - T)

+ .0594 sin (L + T) + .0344 sin (2L - 0) + .0125 sin (2F1 - 0)

+ .3500 sin (L - T) + .0125 sin (2L - 2F') S-289 NUTAIT-3

I IpHILCQ WDL DIVISION WDL-TR2184 U dT x 104 = -.5658 sin 2CR - .0950 sin (2CR - Q)

- .0725 sin (3CR - T') + .0317 sin (CR + T1)

+ .0161 sin (CR - I" + Q) + .0158 sin (CR - F' - Q)

- .0144 sin (3CR + P - 2L) - .0122 sin (3CR - I*1 - 0)

+ .1875 sin (CR - P) + .0078 sin (2CR - 21")

4- .0414 sin (CR + F1 - 2L) + .0167 sin (2CR - 2L)

- .0089 sin (4CR - 2L).

The mean obliquity is calculated by

"e = 23.4457587 - .01309404T - .00000088T2 + .00000050T3

u and the true obliquity by

e = "e + 6e i The nutation matrix N relates the Cartesian coordinates expressed in the true equator and equinox to those in the mean equator and equinox by

X1 X Y' = N Y o Z1 Z

where the primed system is the true equator and equinox and the unprimed is the mean equator and equinox.

Thus

N11 cos 6Y N -sin 6¥ cos "e 12 / N13 sin 6Y sin I N 21 sin 6¥ cos s

S-290 NUTAIT-4

PHILCQ WDL DIVISION WDL-TR2184

N cos 6Y cos e cos e + sin e sin e 22 N cos 6Y cos e sin T - sin e cos "e 23 N sin 6Y sin e 31 cos &Y sin e cos "e - cos e sin "e '32 N cos 6Y sin e sin "e + cos e cos e" 33

For numerical calculation, the above N matrix is expanded to the first -order in 6Y- and 6e:— _ . ___

1 -6Y cos "e -6Y sin T N 6T cos "e 1 -fie 6Y sin "c 6e 1

Reference: JPL Technical Report No. 32-223

S-291 NUTAIT-5

tPHILCQ WDL DIVISION WDL-TR2184

SUBROUTINE NUTAIT

SET d = TIME

COMPUTE- T =d/ 36523 i T2

1

COMPUTE

FRACTIONAL PART

DF(l) = d a/360

1 = 1. 2, 3, 4

a = a , a . a . a 2 3 d

(SEE EQUATIONS)

(COMPUTE 1 n.cR.r, L. r 1 DEGREES

CONVERT TO RADIANS o. CR. r. u. r'

IOMPUTE A< , d€. Alf-.d^ DEGREES

COMPUTE: 8« .£ RADIANS

COMPUTE MEAN . OBLIQUITY € RADIAN3

COMPUTE'TRUE OBLIGUITY t RADIANS

COMPUTE- NUTATION MATRIX

S-292 NUTAIT - 6

RHILCO. NA/DL DIVISION o NUTAIT WDL-TR2184 * .LABEL * .SYMBOL TABLE SUBROUTINE NUTAIT L •DIMENSION EN(3,3) •D » TIME T 'a 'D/36525, T2 a-T*T •T3 -a T2*T • OH B 12.112790-.092953922*0*.0020795*T+,Q02081«T2*-.000002*T3 CR e 64, 375452* 13 ..176397*0-. 001131575 *T--, 00113 015* T2*-. 0000019 *T3 GP a 208,84399+,11140408*0-,010334*1-,010343*T2-.000012*T3 VL ;a 280,08121+,98564734*D+,000303*(T*'T2) •G.s 282,08053+,0000470684*0*.00045525#T+>0004575*T2+,000003*T3 'OM a. OM*.017453296 CR e:CR*.017453296 - - -- - _ - _ _ . . :GP a GP*.017453296 VL 'a.VL*,017453296 •G ;s -0*. 017453296 DE a.-25,5844*COSF(OM>-.2511*OOSF(2,*OM)*1.5336*COSF<2.*VL) "1 1 •+;0666*COSF(3,*VL-G>^,0258*COSF(VL*G>-,0183*COSF(2,*VL"OM) 2 "?,0067*COSF(2.*GP-OM)

1 •-,Q139*COSF(CR*GP)*,0086*COSF(CR-GP*OM>+.0083*COSF(CR-QP-OM) 2 •*, 0061*COSF(3.*CR + GP-2.*VL>*.0064*COSF(3.*CR-GP-OM> ,DT :s:-=(47,8927+,0482*T)*SINF*.0594*SINF(VL + G) 2 -+,0344*SINF(2,. *VL-OM>+,0125*SINF(2,*GP«OM) + ', 35*SINF'(VL"G) 3 -+,Q125*SINF<2,*VL-2,*GP) •DS « ».5658*SINF(2,*CR>--. 095*SINF(2,*CR-OM>-,0725*SINF(3,*CR-GP) 2 •=,Q144*SINF(3,*CR + GP-2.*VL>*.0122*SINF(3.*CR-GP-OM) 3 •*,1875*SINF(CR-GP)+,0078*SINF<2,*CR-2,*QP) 4 -+,0414*SINF(CR*GP-2,*VL')*-, 0167*SINF(2.*CR-2,*VL) 5 --,0089*SINF(4,*CR-2,*VL) DE -a ,17453296E-5*(DE + DD) DT =B ol7453296E-5+(DT+DS) EB a 23,4457587-,01309404*T'-.00000088#T2*.0000005*T3 EB e EB*,017453296 ERSIL a EB+DE r~I EN(1*1> LJ -DT*COSF(EB) EN(1,3) -DT*SINF(EB) EN(2,1) -EN<1,2) EN(2,2) 1, EN(2,3) -DE EN(3,1) -EN(1»3) :EN(3,'2) DE EN(3,3) 1, •RETURN , 1 END

S-293

JPH8LCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184 n Subroutine: OBLN

Purpose; To compute the perturbing acceleration due to the earth's oblateness. The formula for the earth's potential includes the second, third and fourth spherical harmonics. Part of the input is a rotation matrix to equator and equinox of date, obtained by successive calls to ROTEQ, NUTAIT, and MULT. It also computes the first variation of the perturbing accelera- tion for the variational equations.

Calling Sequence: CALL OBLN (XP, U, A, VJ, H, D, PO, AN, B, NEQ)

Input and Output

Data Symbolic Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

I . XP 3 R Kilometers Position vector „ 3, 2 I U 1 l-l Km /sec Gravitational constant A 1 Kilometers i RE Equatorial radius of the earth i VJ 1 J Coefficient of second harmonic

i H 1 H Coefficient of third harmonic

i D 1 D Coefficient of fourth harmonic

0 PO 3 VU Perturbing acceleration

i AN 3,3 Rotation matrix to equator and equinox of date (Cont'd.) D Common storages used or required: None

Subroutines required: None Functions required: SORT

Approximate number of storages required: 430 DEC

5-295 OBLN - 1

PHILCQ WDL DIVISION WDL-TR2184

(Cont'd.)

Symbolic Program Mathematical Data I/O Name or Dimensions Definition Dimensions Symbol Location or Units

0 B 3,3 dx1/3x1 Derivatives of ^\J

I NEQ 1 Number of differential equations

being integrated

OBLN computes the perturbing acceleration due to the earth's oblate-

L. ness. The oblate potential of the earth is assumed to contain the second, third, and fourth spherical harmonics:

—I (1 - 3 sin20) +—| (3 sin0 - 5 sin30) 3R 5RJ

DR 2 4 1 (3 - 30 sin 0 + 35 sin 0) j 35R

where R_ is the equatorial radius of the earth and 0 is the geocentric E latitude, R = (X,, X», X,) is expressed in the mean equator and equinox of 1950.

The position vector r = (X, Y, Z) expressed in the true equator and equinox of date must be obtained to determine sin0. The proper rotation matrix AN has been computed. Then,

Y = AN R

and sin0 = — K

S-296 OBLN - 2

PHILCQ WDL DIVISION Kj y ,-" WDL-TR2184 The perturbing acceleration is equal to VU: [3 Jui (fi . 5z^ii+ z 4 ^ 2 'R R

n "J R" ""?, •l\ for j = 1,2,3. i.

I If the number of second order differential equations is less than or equal to three, RETURN is called at this point. '~\ ii OBLN also computes the derivatives of the perturbing acceleration '" j for use in the integration package. For this purpose, only the term ' j —' arising from the second harmonic is retained; also, tihe coordinates are ,-, regarded as being expressed in the reference system of the mean equator U and equinox of 1950. n , / Starting with

f Xl X2 X3 f} VUa m(*l F »8 lF ' g2F

Ll where n2 5Z R2

R'

S-297 OBLN - 3

PHILCQ V^DL DBVISION WDL-TR2184 a

yields

dXi Xl (\ X1 3 - & 3x7 = *i F (^- 3x7 - -2 R ' 3xT j J- J K J

x

1 x 8i R Vx ^xT _2 ^x7 y

^ 2 -q R X ,- OX- 1f 10 X3 11^\ OR \ '-J E -ji^^r^CJ - ^)K -^:J}

3

Expanding the dot products and collecting terms gives 2 22

2 3X-X ^ X.X- , X B12 ' - « R

S-298 OBLN - 4

PHILCQ WDL DIVISION WDL-TR2184

,,2

B21 = B12

B 22

Si

B = B 31 13 t

D32 * B23

ak. where E\j = -^

For R > 3R,,, B is set equal to zero. £

S-299 OBLN - 5

IPHILCQ WDL DIVISION WDL-TR218&-

* LABEL OBLN * SYMBOL TABLE OBLN CEC2031 SUBROUTINE OBLN OBLN •SUBROUTINE OBLN ( XP, U* A, V J* H* DP PO, ANp B SNEQ) OBLNOOOO DIMENSION X(3).PO(.3),AN(3p3).XP(3),B C3,3) OBLN0010 RE=;6378015 OBLN0020 DO 2 1=1,3 OBLN0030 X(I) e 0. OBLN004Q DO 2 Jsl,3 OBLN0050 2 X(I) s X(I) * AN(I,J)*XP(J) OBLN0060 R2 s X(1)**2*X(2)*+2*X<3)**2 OBL-N0070 R s SQRTF(R2) OBLN0080 UR2 a U/R2 OBLN0090 AR s A/R OBLN0100 AR2 AR*AR OBLN0110 AR3 AR*AR2 OBLN0120 AR4 AR*AR3 OBLN0130 ZR s X(3)/R OBLN01.40 ZR2 « ZR*ZR OBLN0150 ZR4 a ZR2*ZR2 OBLN0160 TM1 a (l.=5,*ZR2)/R TM2 s 2a*ZR OBLN0180 J u TM3 a (38=7a*ZR2)*ZR/R OBLN0190 T TM4 a -86*38*ZR2 OBLN0200 TM'5 « OBLN0210 I TM6 e (1. 7142857-4 *ZR2)*ZR OBLN0220 TOl s -VJ*UR2*AR2 OBLN0230 T02 » =H*UR2*AR3 OBLN0240 ' T03 = =D*UR2*AR4 OBLN0250 L •DO 1 = 1,3 OBLN0260 PO(I) OBLN0270f *T02**TM4*AN('3JI) ) OBLN0280 • *T03*(TM5*XP(I)*TM6*AN(.3pI)> OBLN0290

CONTINUE 'OBLN0310,'1 j RETURN OBLN0320 " CONTINUE OBLN0330rl IF(R=3.*RE)5,5 OBLN0340U .CONTINUE DO 7 1=1,3 OBLN0360 'DO 7 J = l,3 OBLN0370?;] B(I,J)aO. OBLN0380'J CONTINUE OBLN0390 GO TO 3 OBLN0400n CONTINUE OBLN0410W G5a=TOl/R OBLN0420 G6s5,*ZR2 OBLN0430r, OBLN0440| -Q6) OBLN0460 G8sX(l)/R OBLN0470

S-300 OBLN - 6

PHILCQ WDL DIVISION; n

,LN (cont'd) a WDL-TR2184 .G9aX(2)/R OBLN04fi G1Q=X(3)/R OBLN045 B(ljl)aGl*(ll-3.*G8**2)*2.*G5*G8**2*

Input and Output

Data Symbolic Program Mathematical I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I Quantities obtained from common

0 Quantities placed in common

J

li Common storages used or required: T. S. C. K Subroutines required: COhPHf, INTRI AS IN, ATAN, FNORh, SQRT, 0 Functions required: (FIL)(SLO)(STH) Approximate number of storages required: 267 DEC

3-303 ONBTR - 1

iPHILCQ WDL DIVISION o1 WDL-TR2184

SUBROUTINE ONFTR

TEST LSTAT WAS EARTR -o- CALLED

CALL EPH6MERIS

TEST IPL STEP THROUGH IS BODY OBSERVED 6 BODIES

OBTAIN POSITION (V VELOCITY RELATIVE TO BODY

Vn STEP THROUGH r 1 MEASUREMENTS J

E OF WOT MEASUREMENT STATION DATA CONSIDERED :

IS IT TIME FOR OBSERVATION

CALL COMPHQ

S-304 ONBTR - 2

PHILCQ WDL DIVISION1, WBL-TR2184

LABEL ONBT SYMBOL TABLE ONBT CE C2007 ONBT c SUBROUTINE ONBTR ONBTOOO i SUBROUTINE ONBTR UPDATES CONVARIANCE MATRIX FOR ONBOARD ONBT001 c MEASUREMENTS OF RANGE, RIGHT ASCENSIONS-DECLINATION, AND ONBT002 RANGE RATE RELATIVE TO THE 6 CELESTIAL BODIES ONBTOQ3 COMMON T"pSpC*IC ONBT004 DIMENSION PO(22),VE(22),IMPLAN(4,6)eIRL(6),X<3),VX(3) ONBT005 l,T<1360),S(lQOO).C<1000)plC(l)pXREL<3),VREL<3) ONBT006 2,TLASTC4,6),OBRATE<4,6),H(6),P(6p6)flOUTPUT(6> ON8T007 EQUIVALENCE , , XMAG ) ONBT013 2tC(892)pDEX),(C(891)pDENl>,(C(890),DEN2)p CS(72),DR) ONBT014 3p(C(B89),DEX2),(C(888)SDEX3),(C(652),P)*(C(973),OUTPUT) ONBT015 CALL' SETN(NIN,NUTS) ONBT015 LSTATsLSTAT ONBT016 •GO TO (1.2),LSTAT ON8T017 1 CONTINUE ONBT018 ONBT01.9 ONBT020 CALL INTRKTWpTF>NB,POpl.VE,DIS) ONBT021 • CONTINUE ONPT022 DO 24 JJslp6 ONBT023 --C JJ DETERMINES BODY TO BE OBSERVED 1, EARTH 2, MOON 3, SUN ONBT024 c 4.VENUS SpMARS 6. JUPITER ONBT025 IF(IPL(JJ) >24,24,3 ONBT026 CONTINUE ONBT027 ONBT028 DO 4. 1 = 1,3 ONBT029 ,MMaLM = I ONBT030 XREL(I)*POfMM>-X(I) ONBT031 VREL(I)BVE(MM)-VX(I) ONBT032 CONTINUE ONBT033 Uc XRELsVECTOR FROM VEHICLE TO JJ-TH PLANET, EQUINOX 1950 ONBT034 c VRCL-aRELATIVE VELOCITY VECTOR ONBT035I XMAGsFNORM(XREL) ONBT036I DEX5.XREL(1)**2*XREL(2)**2 ONBT037I DENlJ»l./SQRTF(DEX)/XMAQ**2 ONBT038I •DEN2sl0/DEX ONBT039I .DEX2aXMAG*XMAG' ONBT040I DEX3sl0/XMAG ONBT043.I THE ABOVE QUANTITIES ARE USED IN COMPUTATIONS OF H MATRIX ONBT042I ONPT043I DEC=ASINF(DEX3*XREL(3)) ON8T043; OUTPUT(5')3DEC/DR QNRT043- RAaATANF(XREL(2)/XREL(l)) OMBT043(

S-303

/PHflLCQ WDL DOViSION WDL-TR218

OUTPUT(3)sRA/DR ONBT0438 OUTPUT(1)=XMAG ONBT0439 •DO 23 JJJel,4 ONBT0440 IF(IMPLAN(JJJ,:JJ)>23.23*5 ONBT0450 0 5 CONTINUE ONBT0460 TLAST (JJJ»JJ)sTLAST(JJJ»'JJ>*DELTT ONBT0470 C TLAST STORES TIME .SINCE LAST JJJ TYPE »OF' OBSERVATION OF JJ BODY ONBT0480 C UJJ DETERMINES TYPE OF DBS.1-RANGE,2-RIGHT ASCENSION* ONBT0490 C 3-=DECLINATIONfi4 = RANGE RATE ONBT0500 ,NOBsTLAST« JJJe'JJ)/OBRATE(JJJ, JJ) ONBT0510 'OBNQsNOB ONBT0520 IF(NOB)23i;23,6 ONBT0530 6 CONTINUE ONBT0540 JJjsJJJ ONBT0550 • NNs426 ONBT0560 CALL COMPHQ(JJJpl5NN) ONBT05-70 TLAST UJJ* JJ)sTLAST{ JJJp'JJ)«OBNO*OBRATE('JJJ,'JJ) ONBT0580 23 CONTINUE ONBT059Q WRITE OUTPUT TAPE MUTS,700p JJp-OUTPUT ONBT0591 700 FORMAT(16H CELESTIAL BODY , ONBT0992 1/4H RNGEl5o8(,5H RGRE1508S ONBT0593 25H RAEl5o8,5H RARE15»8,5H DECE15,8P5H DCRE1508) ONBT0594 DO 20 I»l,6 ONBT0995 rl 20 'OUTPUT(I)sO- ONBT0996-J •24 CONTINUE ONBT0600 RETURN ONBT0610 .END ONBT

S-306

ONBTR - 4 \ j

PHILCQ DIVISION WDL-TR2184

Subroutine: ORTC

Purpose: To convert Cartesian coordinates to conic elements for the output subroutines and to provide other auxiliary results used in computa- tions in the output subroutine.

Calling Sequence; CALL ORTC (X. DX, U, SMA, EGG, RCA, OINC, OMG. BEP, B, B2, R2. V2. A. C3. BET, THT) Input and Output

Symbolic Data Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

I X 3 ~R Kni • Position vector I vx 3 ~V KjTi/sec Velocity vector

3 2 I U 1 u Kvm //sec Central body gravitational

constant

0 SMA 1 a Km Semi-Ma }or Axis

0 ECC 1 e Eccentricity

1 0 RCA VD Km Radius of closest approach

0 OINC 1 i RAD Orbital inclination (Cont'd.) Common storages used or required:

Subroutines required:

Functions required:

Approximate number of storages required:

3-307 ORTC-1

WDL DIVISION WDL-TR2184

(Cont'd.)

Symbolic Data Program Mathematical Definition I/O Name or Symbol Dimensions Location Dimensions or Units

0 OMG 1 0 RAD Argument of ascending mode

•^ 0 BEP 1 (« RAD

0 B 3 R X~V Quantities used in output ^ _^_ O 0 B2 1 R X V| ^ subroutine computations 0 R2 I R2 Km2

0 V2 1 . V 2 (Km/sec)2 0 A 1 "1i-~v 2 2U- 2 0 C3 1 u " T (Km/sec) 0 BET 1 T) RAD

0 THT 1 e RAD

The orbital elements determined by the subroutine are the following:

03 - u' - f R X U = h

Semi-Major Axis

a = SMA =

Eccentricity

+ C3 |R" X u|' e = ECC 2 2 V- M-

S-308 ORTC-2

PHILCQ WDL DIVISION WDL-TR2184

Radius of Closest Approach

2 |R x ul Ihl V = RCA P e) e)

Orbital Inclination

2 2 i = OINC = Tan Nh (l) + h (2) h(3)

Argument of the Ascending mode

"1 = OMG = Tan -h(2)

True Anomaly

-1 •1 9 = THT = Tan |h|2 -

Argument of Periapsis plus True Anomaly

X(3) n = BET X(2) h(2)

Argument of Periapsis

= BEP = BET - THT

n U

S-309 ORTC-3 U

^PHBLCQ WDL. DIVISION a ORTC WDL-TR218o4

* LABEL ORTC •SYMBOL TABLE. ORTC * SUBROUTINE ORTC < X ,'DX * Up SMA* ECC* RCA , OINC,

S-310 ORTC - 4 ,

WDL DIVISION PHILCQ WDL-TR2184

Subroutine; OUTC

Purpose! OUTC writes out the trajectory elements in & coordinate system and reference system specified by an input quantity (KOUT). OUTC also writes out the orbital parameters found in ORTC, and writes out the selenographic latitude and longitude if the system is moon-centered.

•J Calling Sequence; CALL OUTC

Input and Output

Symbolic Data Program Mathematical Definition I/O Name or Symbol Dimensions Location Dimensions or Units

KOUT IC(7) 0 for output in date

1 for output in 1950 2 for output in ecliptic coord.

Common storages used or required: T, S. C, 1C Subroutines required: see next page Functions required: see next page Approximate number of storages required: decimal 940; octal 1654

3-311 OUTC-1

^PHILCQ WDL DIVISION WDL-TR2184 '•'")

Subroutines Required Functions Required [J ECLIP ARKTNS

GHA ATAN

INTRI COS

MNAND SIN

NMA • SORT

MULT

NUTAIT

ORTC

OUTDAT

ROTATE

ROTEQ

RVOUT

SETN '"I J

S-312 OUTC-2

PHILCQ WDL DIVISION 0 WDL-TR2184

CALL SETN TO 08TAW» INPUT OUTPUT TAPE NUMBERS

I

SET UP HOLLERITH PRINTOUT

SET OP SUBSCRIPTS FOR TYPE OF OUTPUT"

UPDATE TIME IN WHOLE DAYS, AND TIME IN FRACTIONAL DAYS,

I CALCULATE TIME IN DAYS, HOURS, MINUTES, ft SECONDS FROM START OF RUN

WRITE OUT BODY CENTER

1 r

CALL OUTOAT TO PRINT OUT PRESENT TIME IN YEAR, MONTH, DAY, HOUR. MINUTES, » SECONDS

1 r

WRITE OUT TIME FROM START OF RUN, OUTPUT REFERENCE. JULIAN DATE. » COORDINATE TYPE IDENTIFICATION

T r

SET TIME = WHOLE DAYS (TW1, » FRACTIONAL DAYS (TF) 4 RUNNING TIME fDT) B6400

1r

CALL ROTEO TO OBTAIN TRANSFORMATION FROM EO. 1950 TO EQUINOX OF DATE

i-313 OUTC - 3

^PHILCO. WDL D8VIS9ON WDL-TR2184

••M.I MU1 MT TO OBTAIN Nl IT ATtON MATRIX

CALL MULT TO OBTAIN TRANSITION MATRIX, (AN*

SET TSEC - TIME IN SECONDS

CALL GHA TO OBTAIN GREENWICH HOUR ANGLE

CONVERT ANGLES TO RADIANS

FIND SIN AND COS OF GREENWICH HOUR ANGLE, (SC AND CG)

FORM POS (XOATE) , AND VEL (VDATE) , IN DATE COORDINATES

IS KOUT <^l'

CALL RVOUT TO TRANSFORM WRITE POSITION AND VELOCITY FROM CARTESIAN TO SPHERICAL VALUES IN CARTESIAN COORDINATES COORDINATES ft SPHERICAL COORDINATES

I'1/

DOES KOUT - 17 GO TO II GO TO 102

CALL RVOUT TO TRANSFORM FROM CARTESIAN TO SPHERICAL COORDINATES

S-314 OUTC - 4

PHILCQ WDL DIVISION^ WDL-TR2184

) CALL ROTATE TO OBTAIN S\ TRANSFORMATION FOR I ROTATION ABOUT AN AXIS

i

CALL ECLIP TO PERFORM TRANSFORMATION

1I

CALL RVOUT TO TRANSFORM FROM CARTESIAH TO SPHERICAL COORDINATES

1r

GO TO 12

NO \|oz"x IS KOLIT <07 U

YES

1r

CALL ORTC TO OBTAIN — ORBITAL PARAMETERS REFERENCED TO DATE

DOES K O.JT = ,7 NO

YES

r ^

CALL ORTC TO OBTAIN — ORBITAL PARAMETERS REFERENCED TO 1950

CALL ORTC TO OBTAIN ORBITAL PARAMETERS IN ECLIPTIC COORDINATES *-

f ^ **W CONVERT PARAMETERS

7^\ TO DEGREES FOR OUTPUT

/^ ( 1 f

WRITE OUT ll ORBITAL PARAMETERS OUTC - 5 S-315

JPHBLCQ WDL DBVISION WDL-TR2184

C/\l_L INTRI TO FIND POSITION AND VELOCITY OF EARTH

CALCULATE POSITION AND VELOCITY OF EARTH WITH RESPECT TO THE VEHICLE

CALL RVOUT TO TRANSFORM POSITION AND VELOCITY OF EARTH FROM CARTESIAN TO SPHERICAL COORDINATES

WRITE OUT •SPHERICAL COORDINATES

IS SYSTEM LUNAR CENTERED 3

\ ^OO y CALL MNA AND MNAND vf TO OBTAIN ELEMENTS NECESSARY TO FIND SELENOGRAPHIC LATITUDE AND LONGITUDE

C At CUl ATE SELENOGRAPHIC I ATITUDE AND LONGITUDE n ''• \

WRITE OUT '-,ELENOORAPHIC LATITUDE 1ND I ONGITUDE

CALL ORTC TO SELENOGRAPHIC ORBITAL PARAMETERS

WRITE OUT ORBITAL PARAMETERS

RETURN TO CALLING PROGRAM

S-316 OUTC - 6 u

PHILCQ WDL DIVISION 3 fir outer" WDL-TR2184 * LABEL OUTC * SYMBOL TABLE OUTC CEC2Q15 SUBROUTINE OUTC OUTC SUBROUTINE OUTC OUTCOOO COMMON T,S,C,IC OUTC001 EQUIVALENCE (T,TDUM),(S,SDUM), OUTC003 l,(C(120),EN)j,(C(138),AN),(C(62),PO)»(C (84),VE),(C(10),TW) OUTC004 2,(C(11),TF),(1C(3),NOR),(IC(6),ITARG),(IC(7),KOUT),(C(55),U) OUTC005 3,(S(73),RTD),(C(180),SMA),(C(181),ECC), (C( 182), RCA),

S-317 - 7

PHILCQ WDL DiVISBON OUTC WDL-TR2184

TWGNsTWGN-1. OUTC0470 GO TO 32 OUTC0480 34 CONTINUE OUTC0490 TFP • INTF OUTC0620 TP2P' = TP2+.5-TT OUTC0630 TP1P a TP1 4- TT + 2433282. OUTC0640 WRITE' OUTPUT TAPE NOUT,702,CNAMEHRS . 14, 5H MIN.F7.2»5H SEC4XA6,3X12HJULIANOUTC070, 0 DATE^ F8.0,F8,8,10X2A6,12H COORDINATES) OUTC0710 N = NOR OUTC0720 TIME s TW+TF*DT/86400. OUTC0730 DIS 1.E10 OUTC0740 NR1 N-l OUTC0750 NV a. OUTC0760 CALL ROTEQ(TIME.EA) OUTC0770 CALL NUTAlT(TIMEtWM,CR,DA,EN,EPSID OUTC0780 CALL MULT(EN»EA,AN,0) OUTC0790 TSEC' = 86400. *TP2 OUTC0800 CALL GHA(TSEC,TP1,GHAN,EN(2,1),OMEGA) OUTC0810 GHAN = GHAN*. 017453296 OUTC0820 OMEGA * OMEGA*. 017453296 OUTC0830 SG 8 SlNF(GHAN) OUTC0840 CG a COSF(GHAN) OUTC0850 DO 1 I«l,3 OUTC0860 XDATE(I) = 0, OUTC0870 VDATE(I) = 0. OUTC0880 DO 101 J«l,3 OUTC0890 XDATE(I) = XOATE(I) * AN< I, J) *XP i J) OUTC0900 VDATE(I) = VDATE(I) * AN( I, J) *VXP( J ) OUTC0910 CONTINUE OUTC0920 XED(I)=XDATE(I) OUTC0930 VED(I)avDATEd) OUTC0940 CONTINUE OUTC0950 IF (KOUT-1) 11>10,13 OUTC0960 10 CALL RVOUT(XP,VXP,SPDATE) OUTC0970

S-318 OUTC - 8

PHILCQ WDL DIVISION I WDL-TR2184

WRITE OUTPUT TAPE NOUT,S,XP,VXP,SPDAT OUTC09g -GO TO 102 OUTC099 11 CALL RVQUT R2>V2,RDV,C3,BET,THT> OUTC1K GO TO 97 DUTCH: 106 CALL ORTC(XP,VXP,U* _SMA, ECC, RCA, OINC, OMG» BEP OUTC11! ,RCV,RCV2*R2iV2,RDV,C3,8ET,THT) OUTC11< GO TO 97 OUTC12C 107 CALL- ORTC CALL INTR1(TP1,TP2,NR1,PO,NV,VE,DIS) OUTC126 DO 17 Ial,3 OUTC12< 14=23-1 OUTC13C PEV-XP VEV(I)=\/XP(I>-VE(I4) 17 CONTINUE OUTC13; DO 108 I<=1>3 OUTC13- XDATE(I>=0. OUTC135 VDATE(I)sO. OUTC136 DO 108 jnl>3. OUTC137 XDATE(IinXDATE(D-AN(I,J)+PLV(J) OUTC13? 108 VDATE(I)=VDATE(I)+AN(I, J)*VtV( J) OUTC13< 22 XEARTH(3) = XDATE(3) OUTC14C VEARTH(3> = VDATE(3) OUTC143 XEARTH(l) s XDATE(1)*CG * XUATE(2)*SG OUTC142 XEARTH(2> = -XDATEdUSG * XDATE(2)*CG OUTC14; VEARTH(1')=VDATE(D* OUTC14' OUTC145 CALL RVOUT(XEARTH,VEARTH,SPUATE> OUTC146 WRITE OUTPUT TAPE NOUT, 31, SPDATE OUTC147 31 FORMATUH RTEE15.8,5H LATE15.8, OUTC146

S-319 OBTC - 9

'JPHILCQ WDL DIVISION OUTC WDL-TR218

3. 5H LONE15.8,.5H VEE15.8,5H PTEE15.8.5H AZEE15.8) OUTC1490 29 CONTINUE. OUTC15001 IF550,500,550 OUTC1510 t 500 CALL. MNA(TIME,WM»CR'DA>EPSIL'RR'Q'GP*MVI»BAN) OUTC1520 DO 510 lBl>3 OUTC1540 XDATECD-0. VDATE+BAN LATs»El?.8> OUTC1640Q CALL ORTC(XDATE,VDATE,U,AMS,EPS,RPiORIN*OME6,ApF •OUTC1650rj 1>RCVM,RCVM2;R2W,V2M,RDVM,C3M,BETM,THTM') OUTC1660 OMEGi = OMEG*RTD OUTC1670 ORIN a ORIN*RTD OUTC1680. c GIVES CALENDER DATE FROM TKWHOLE DAYS'FROM 1950) OUTC1690'^ C ANDT2(FRACT OF DAY) OUTC1700 _ APF a APF*RTD OUTCl710f j WRITE OUTPUT TAPE NOUT,4,AMS>EPS,ORIN.OMEG,APF,RP 'OUTC1720U 4 FORMAT (4H SMAE15.8,5H ECCE15.8^5H INCE15.8,5H LA^E15 OUTC1730 1 5H APFE15.8,5H RCAE15.8) OUTC1740-] 550 RETURN OUTC1750- J END OUTC

r~\ a

S-320 OUTC - 10 0

PHILCQ WDL DIVISION 0 • WDL-TR2184 a Subroutine: OUTDAT Purpose: OUTDAT finds and outputs the calendar date and Julian date, given the number of days since 1950.0.

_ Calling Sequence: CALL OUTDAT (Tl, T2)

Input and Output

Data Symbolic Program > Mathematical Dimensions Definition I/O Name or Dimensions Symbol Location or Units

I Tl 1 days Integral number of days from

1950.0.

I T2 1 days < Fraction of day past Tl

u Common storages used or required: None

Subroutines required: SETN

Functions required: XMODF, INTF

Approximate number of storages required: 351 DEC

S-321 OUTDAT - 1

iPHILCQ WDL DIVISION WDL-TR2184

')>INT £ PPO1^ I /!' ^ f ., ^V Tl .,F,,5V ( k f < 0' J

- NO. OF RIODS SINCE I9SO

KK = IHT'O ^ d «• Kl

K2 = NUMBER OF FULL YEARS LEFT

KWN = NUMBER OP DAYS REMAINING

KK = KK • K2

DATE - JANUARY I

IF LEAP YEAR

FIND MONTH AND DAY IN MONTH, MO

CONVERT T2 TO 0 MRS. . MINS. , SECS.

I OUTPUT CALENDAR, JULIAN DATE - JULIAN DATES JO 1930 t Tl « TJ S-322 OUTDAT - 2

PHIIjCQ WDL DIVISION OUTDAT WDL-TR2184 OUTD * LABEL OUTD * SYMBOL TABLE OUTD CEC20DT OUTDOOO SUBROUTINE OUTDAT (T1,T2> OUTD001 C GIVES CALENDER DATE FROM TKWHOLE DAYS FROM 1950) OUTD002 C ANDT2(FRACT OF DAY) OUTD003 CALL SETN(NIN,NOUT> •OUTDOOR MDsO OUTD005 OUTD006 IF(T1)6,6,7 OUTDOOR 6 WRITE OUTPUT .TAPE N'OUT.100 OUTD008 (3 RETURN OUTD009 -100 F_ORMA.T(23H_DATE_IS 1950 -0_R BEFORE) OUTDOtO 7 KlsK/1461 " - -- OUTDOU 10 KKa«l*4*1950 OUTD012 d KlsXMODF(K,1461) OUTD013 K2sKl/365 OUTD010 KWN»XMODF(Kl,365)-K2/3 OUTD015 OUTD016 IF(KWN)12f 11*13 •OUTD017 11 MONTH=1 OUTD018 HDal OUTD01? •GO TO 25 OUTD02C 12 KWN=KWN*366 OUTD023 KKsKK=l 13 N' = XMQDF(KK,4) OUTD02! OUTD02< OUTD025 135 'JjBjJ+1 OUTD02( .IF(12-JJ)23,23,137 OUTD02" 'JsF'»MoA,Mi. J» J*A«S,0*NpMONTHS FOR QO TO OUTD02f n 137 GO TO (14, 15, 14, 16, 14, 16, 14, 14, 16, 14*16, 14),.JJ OUTD02« U 14 -CONTINUE OUTD03C KNW=KNW*31 OUTD03! GO TO 17 OUTD03! 15 CONTINUE- OUTD03 IF(N)18,18,19 OUTD03 18 KNW=KNW*1 OUTD03 19 OUTD03 .GO TO 17 OUTD03 16 KNW=KNW*30 OUTD03! 17 CONTINUE OUTD03 IF(KHN-KNW)20,-21,22 OUTD04 22 CONTINUE OUTD04! MDaKNW OUTD04 'GO TO 135 OUTD04 20 CONTINUE OUTD04 'MONTHeJJ. OUTD04 'MDaKWN-MD + 1 OUTD04 GO TO 25 OUTD04

S-323

IPHILCQ WDL DIVISION o Li OUTDAT (cont'd) WDL-TR2184

21 CONTINUE OUTD0480 OUTD0490 :MDsl OUTDOSOO GO TO 25 OUTD0510 23 MONTH =12 OUTD0520 OUTD0530 25 'CONTINUE: OUTD05'40 THaT2*24, OUTD0550 TMPalNTF(TH) OUTD0560 • NHOURcTHP OUTD0370 T!HPn(TH-THP)*60t OUTD0580 THalNTF(THP) OUTD0990 OUTD0600 D OUTD0610 NSECaTHP OUTD0680 TSECaNSEC OUTD0630 THP=(THP-TSEC)+1000, OUTD0640 NFSEC=THP OUTD0650 TTalNTF(T2*,5) OUTD0660 TP2«T2*,5-TT OUTD06'70 TPlsTl+TT*2433282. OUTD0680 .WRITE OUTPUT TAPE NOUT, 101* KK, MONTH, MDj NHOUR* NMIN* NSEC , NFSEC OUTD0690 1»TP1,TP2 OUTD0700 101 POR!>fAT(6H YEARs, 14, 8H MONTHS, 12, 6H 'DAY = >I2, 7H HOHRc,I2, OUTD0710 1 6H MIN»,I2,6H SEC« ,12, 1H ,, 13, 10X, 12H JULIAN DATEo, OUTD0720 2F8.0,F8,8> OUTD0730 •GO TO 8 OUTD074Q END OUTD

S-324 OUTDAT - 4

RHILCQ WDL DIVISION r 1«lJ WDL-TR2184 0 Subroutine: OUTP

Purpose: Obtain the error data in the desired coordinate system for output purposes. The three coordinate systems available are: (1) Equator of Date, (2) Equator of 1950, and (3) Ecliptic. The coordinate system is determined by an input quantity KOUT.

Calling Sequence; CALL OUTP

Input and Output

-1 Symbolic Data Program Mathematical Definition I/O Name or Symbol Dimensions Location Dimensions or Units

I Quantities obtained from common

0 Quantities printed out

vnJ

Common storages used or required: T. S. C. 1C CROSS, HPHT, INV3, MATRX, Subroutines required: PTRAN Q Functions required: COS, FNORM, SIN, SQRT Approximate number of storages required: 1179 DEC

S-325 OUTP - 1

PHILCQ WDL DBVISDON WDL-TR2184 n A. Derivation of Partials Used in Subroutine In order to determine the RMS error in knowledge of orbital elements, the partials which relate the elements and the vehicle state are required. The derivation of these partials follows. The angular elements are shown below in Fig. 1. 2

I = ORBITAL INCLINATION fl= ARGUMENT OF THE ASCENDING NODE u>: ARGUMENT OF PERIGEE 9 * TRUE ANOMALY h = ANGULAR MOMENTUM VECTOR n = 0

ECLIPTIC PLANE J

ORBIT PLANE J FIG. 1 3 1. Derivation of partial for eccentricity n h2C3 t \

2 2 V e = -~- /C3 Cv T - (r-v) ^] + h » -^r

where V -

C3 2 . 2*.

r x v

S-326 OUTP - 2

RHILCQ XA/DL DIVISION; WDL-TR2184

!"] De = -y- < h2 v + C3 C r2 v" - (r-v) "r] id u, e V. >

where D =

2. Derivation of partials for radius of closest approach

. 2

% -^ (jrrp) * - <**>•?]

3. Derivation of partials for semi-major axis

UJ X —d—a = 2„a 2 —k ,fo r .k = . 1,2,. ,3 i™" * it r , .I Av=:yy=YY=* A Ao ^ A« t7* U . .... da 2 \ X, = X X- = Y X_ = Z ~ 02a — 123 U M. f;';j 4. Derivation of partials for longitude of the ascending node U Tan-1 Ml) ian -h(2)

) T0!>~i = - si.n Q_ ;Z r -vOUr = si.n 0^ Z r ox h sin i ox h si: n i

= cos I! o-ry - = cos 0 h Tsi n :i r dyT ^ ~ ^ hr sin: ir

i 3-327 OUTP - 3 i

IRHBLCQ WDL. DIVIS80N WDL-TR2184 Q dn . z " COS •vr = cos i h sin i h sin i

5. Derivation of partials for inclination

h(2) i = Tan h(3)

sin i cos n for k = 1,2, 6 x. sin n IXk

* • X / "~™~ YA VA f a V1

6. Derivation of partials for argument of periapsis

-1 zh -1 h

= -- - (ff cos n + 0 sin n) ^cr- + —r S(ff sin n - 0 cos n)> OX, , 2 1 I Tc he V ^

«^ oh . cos i . oQ 1 •5— - (o - 4- cos xn) —; h -rr- \ dX, sin n dX, / f K KJ

for k = 1,2,3

^ = - \ (a cos n + 0 sin n) |? + -± (« sin n - 0 cos n)(|| e X he LX

-(or + cos n) -^4 h S- 4- o- cos n

S-328 OUPT - 4

PHILCQ WDL DIVISION n

bn "^ WDL-TR2184

S] |f --- \ (ff cos n + 0 sin n) |? + -\ (o> sin n - 3 cos n) ( y e he L

c n . cos i n °s > ,4, n . /dx h { . ° e he - •a*

f~ ., . . cos i . oH\ h 3 r - v(fv + cos n) — h -ST} r- .' . i: ' sin n ozf 2 sin i

where

e cos «) 0 = e sin

« h sin i cos n dQ = = 11,20 , ...^6 ToXH. — -co s ~,i — si ^ -n n oX"5^.~ '

"" on . dn 1 . _ on . dn •5- = - cos i -5- - — sin n cos \i -3-7 = - cos i -ST ox ox r ox ox

dn , on 1 . . on . dQ ••s1- = - cos i -*r- -- sin n sin nQ •jrr = - cos i -TT

dn = co s x . o+O . 1 cos n 7on co s 1 .5 do TSoz~ " T"oz ""r " ^ -si n7 i T o z~ " "S"" dz

B. Derivation of Transformation from Cartesian x, y, z to Cartesian N. V, W coordinates

The coordinates N, V, and W represent unit vectors shown in Fig. 2 following. OUPT - 5

jPHILCQ WDL DIVISION WDL-TR2184 o 0

A A A N V X W

(PAPER IS ORBIT PLANE)

p* AND V ARE POSITION AND VELOCITY VECTORS FIG. 2 0 0 W is in the direction of the angular momentum vector, V is along the velocity vector, and N forms an orthogonal coordinate system in the A /\ A sense of N = V X W. The three unit vectors may be written as follows:

R X v W

X'v'

Writing the transposed vectors in matrix form yields the desired Jl ** ^ /V A ^ transformation from i, j, k to N, V, W

3x3 OUPT - 6

RHILCQ NA/DL DIVISION 1 WDL-TR2184

SUBROUTINE OUTP Q CHECK TYPE OF ECC OUTPUT DESIRED DATE 9

PUACE TRANSFORM TRANSFORM COVARIANCE COVARIANCE COVARIANCE MATRIX _(P) IN MATRIX (P) TO MATRIX (P) TO DUMMY (PS) EO". DATE" (PS) ECCLIPTIC~(PS)

OBTAIN' OBTAIN OBTAIN POS ft VEL POS a VEL POS a VEL VECTORS VECTORS VECTORS L) ^IN 1950 IN EQ. DATE IN ECCLIPTIC

COMPUTE ECCENTRICITY PARTIALS

3 CALL HPHT OBTAIN RMS ECC

Q COMPUTE RADIUS OF CLOSEST APPROACH PARTIALS 0

CALL HPHT OBTAIN RMSRCA

COMPUTE SEMI MAJOR AXIS n PARTIALS u T

S-331 OUPT - 7

SPHILCO. WDL DIVISION WDL-TR2184

CALL HPHT OBTAIN RMSSMA

COMPUTE PARTI ALS FOR LONGITUDE OP ASCENDING NODE

CALL HPHT OBTAIN RMSLAN

COhi-'UTE PARTI ALS FOR ORBITAL INCLINATION

CALL HPHT OBTAIN RMSINC

COMPUTE PARTIALS FOR ARGUMENT OF PERIAPSIS

CALL HPHT OBTAIN RMSAPF

WRITE OUTPUT RMS VALUES BEFORE OBSERVATIONS POS a VEL

OBTAIN TRANSFORMATION TO N, V, W COORDINATES

S-332 OUPT - 8

PHILCO WDL DIVISION. ' > WDL -TR2184 n

TRANSTORM COVARIANCE MATRIX TO N, V, COORDINATED

NORMALIZE COVARIANCE MATRIX

WRITE OUTPUT RMS VALUES D OF ORBITAL ELEMENTS

WRITE OUTPUT 3 NORMALIZED N, V, W. COVARIANCE MATRIX

OBTAIN DETERMINANT OF COVARIANCE MATRIX

WRITE OUTPUT CONDITION OF COVARIANCE MATRIX

TEST fPROD DIAG DET)

TEST | POS SIGN DET.

WRITE OUTPUT P MATRIX ILLCONDITIONED

S-333 OUPT - 9

IPHILCQ WDL DIVISION 0 OUT? WDL-TR2184

* LABEL OUTP CtC^Ol6 SUBROUTINE OUTP OUTP SUBROUTINE OUTP ouTpoooorj COMMON T,S,C,IC OUTPOOloLJ DIMENSION T(1360),S(1000).C(1000).IC(1).P(6,6),AN(3.3 )«ECL(3.3) OUTP0020 1,ECX(3),ECV(3),XED(3).VEU(3),XP(3),VXP<3).PS(6.6).X(3 ),VX(3) OUTP0030fl 2.DUM(3,3). H (6),DUMC(3,3),DEIH2(3),DEIC3(3),DELECC( 3),DELVH2(3) OUTPOQ40y 3.DELVEC(3).DELRP(3),DELVRP(3).DELSMA(3)»DELySA(3).Q(6 OUTP0050 DIMENSION Q1<6),RCV(3),DAG<6> EQUIVALENCE (T.TDUM).(S.SDUM),(C.CDUM),(IC.ICDUM) OUTP00700 1.(0(652).P ).(C(138),AN),

C FOLLOWING IS COMPUTATION OF ECCENTRICITY PARTIALS * i CONST= l./(ECC+U**2) OUTP0470.J j S-334 OUPT - 10 •->

PHILCQ WDL DIVISION i • usawv tytrTvg^fetor&ntybxny, OUTP (cont'd) WDL-TR2184

CO 11 1=1,3 OUTP048 11=1+3 OUTP049 CELECC=CONST* OUTP053 CONTINUE OUTP054 CALL HPHT OUTP063 CELVSP(I)=CON*DELVH2'- -" ------OUTP064 h(I)=DEl_RP(I) OUTP065 MII)=nELVRPCI) OUTP066 CONTINUE OUTP067 CALL HPHT(H,PS,Ri^SRCA) OUTP068 FOLLOWING FOR PAPTIALS OF SEK1 MAJOR AXIS =SMA OUTP059 0" CONSr= !,/{ ECC-1 . ) OUTP070 CON= KCA*CONST**2 OUTP071 n, DO 13 1=1,3 OUTP072 11=1+3 OUTP073 DELSMA(I)=CONST+DELRP(I)-CON+DELECC OUTP091 CCNS =VX(3)*CONST OUTP092 OUTP093 G(2) =CW *CO'MS OUTP094 C(3) =-CT*CONS/SI OUTP095 CONS =X(o)*CONST OUTP096 C(4) =SW*CONS OUTP0971 =-CW*CONS OUTP098 = CI*CONS/SI OUTP099 CALL HPHT(0,PS,RKS!..Afv) OUTP1QO! 1C THE FOLLOWING FOR INCLINATION OUTP10H OUTP102) h(l)=CONS*("VX(2) *SI OUTP103I

S-335 OUPT - 1!

>HILCQ DIVISION OUTP (cont'd) WDL-T:

M2>=(JOlMS*(VX(l)*SI + VX(3)*SH*CI) OUTP104 M3)=-CONS*CI*(VX(l)*CW + VX(2>*Sto) OUTP1050 OUTP106[ OUTP1071 M6) = COMS*CI+(X(1)*CH * X(2)+SW) OUTP1080 CALL HPhT(H,PS,RI*SINC) OUTP109 THE FOLLOWING ARE PARTIALS OF ARG, OF PERIAPSIS = APF Sf\> =SINF(BET) OUTP1110 CN = COSF(BET) OUTP112JX DO 17 1=1,6 OUTP113M Clfl) = -CI+0(I) OUTP114V 17 CONTINUE OUTP1150 Cl(l> = Q1(1)-SN*CW/R OUTP116 Gl(2) = Q1(2)-SN*SW/R OUTP117[ Cl(3) = Q1(3)+CN/(P*SI) OUTP1180 CP = COSF(APF) OUTP119f' SP = S INF (APF) OUTP120:-; HAGhl = l./SQRTF(RCV2> OUTP12110 CO.v = ECC*CP OUTP122jp. CC\'ST = ECC*SP OUTP123J".. CO\'S = OUTP124v CO\iSl = (CON*SN-CONST*''CN)*RAGHI/(ECC**2) OUTP1250 CCMS2 = CON+CN OUTP126-r COMS2 = CONS2*RAGHI*CI/SM OUTP127( DO Irt I si, 3 OUTP1280 II = 1 + 3 , OUTP129", Ml) = CONS*Q1(I)+CONS1*(RAGHI*DELH2(I)-CONS2*Q(I) ) .OUTP130 MID = CONS*01(II)*CONS1*(RAGHI + DELVH2(I)-CONS2*Q(II) OUTP131F 18 CONTINUE OUTP132.0 CONS = -!./( (RAGHI*U)*(ECC**2) ) OUTP133'; M4>= ri(4)+CONS*CW*CON OUTP134C OUTP1350 h(6) = ri(6)*CONS*CCNST/SI CALL HPhT(H,PS,RKSApF) OUTP137J WHITE OUTPUT TAPE NUTS,700 OUTP1380 700 FORHATC 44X,31H RMS VALUES BEFORE 'OBSERVATIONS) DO 21 1=1,6 OUTP140' ( ) 21 MI) =SURTF(PS(I,I) ) OUTP14l'-X) HKITE OUTPUT TAPE NUTS,701,H OUTP1420 701 FORMAT(4M XEl5,8,5H YE15.8,5H 2E15.8,5H DXE15.8, OUTP143H 15H DYE15.8.5H CZE15.8) OUTP144U R5Q = FNORMVXP) OUTP1580 CALL CROSS(XP,VXP,DUM(1,3) ) OUTP159Q R5l = Fi\iORfi(DUM(l,3) ) OUTP150M DO 22 1=1,3 OUTP161U DUM(I,2)=VXP(I)/R50 OUTP162JL 22 DUM(I,3)= DUM(I,3)/R51 OUTP163! CALL CROSS(DUM(l/2),nUM(l,3).DUM(l,l)) OUTP154U DO 23 1=1,3 OUTP1650 DO 23 J=l,3 ?'6 DUMCd, J)=DUM( J,I) OUTPl67j

S-336

PHILCQ WDL DIVISION! J OUTP (cont'd) WDL-TR2184

CALL PTRAN(P,DUMC,PS»2) OUTP16* DO 30 1=1,6 OUTP16' DAQ(I)sSQRTF OUTP17C 30 CONTINUE OUTP17J DO 31 Isl,6 OUTP17J DO 32 J*I,6 OUTP17! PS(I,J)cPS(I,J)/DAG(I)/DAG(J) OUTP17* 32 .CONTINUE OUTP175 PS(I,I)»1. OUTP17* 31 CONTINUE' OUTP17* n 'RMSINC B RMSINC+RTD OUTP17* RMSAPF e RMSAPF*RTD OUTP17« •RMSLAN * RMSLAN*RTD OUTP181 OWRITE OUTPUT, TAPE NUTS, 702, RMSSMA, RMSECC*, RMSINC, RMSLAN, RMSAPF, OUTP1S3 " •"•- 1RMSRCA - — ------. . _ OUTP183 n 702 PORMAK4H SMAE15.8.5H ECCE1-5,8,5H INCE15.8,5H LANE15.8, OUTP18J J 15H APFE15.8,5H RCAE15.8) OUTP182 WRITE OUTPUT TAPE NUTS,703,DAG OUTP18<< ^ 703 FORMAT(50X,22H RMS N,V,W COORDINATES,V21X,17H RMS POSITION, KM, OUTP18E 142X,20H RMS VELOCITY KM/SEC,/7X/7H NORMAL, 12X,9H VELOCITY,11X, OUTP18« 29H MOMENTUM,12X.7H NORVEL,14X/7H VELVEL»UX,9H MOMENVEL./4H E150UTP183 3,8,(5E20.8)) u OUTP18« 1 WRITE OUTPUT TAPE NUTS,704,((PSCI,J),Jsl,6).1=1,6) OUTP18< J 704 FORMAT(30X,58H' NORMALIZED STATE 'COVARIANCE MATRIX IN N,V,W COORDOUTP191 1INATES,/4H. E15.8,<5E20.8)/19X,(-5E20.8)/39X. (4E?0 ,8)/59X,. OUTP19! -•> 2C3E20.8)/79X,(2E20.8)/99X,E20.8) OUTP19J CON * 1, OUTP19S CALL INV3(PS,6,DETER) OUTP19! 'CONST a CON/DETER OUTP19! , I' WRITE OUTPUT TAPE NUTS, 705, DETER, CON, CONST OUTP19; ^ 705 FORMAT(37H CONDITION OF .STATE COVARIANCE MATRIX,/ OUTP19< 124H DETERMINANT OF MATRIX =,E15,S,3X, OUTP19! "~V 222H 'PRODUCT OF DIAGONAL =,E15,8,1X, OUTP19I Ll' 324H RATIO PROD. DIAG,/DET. =,E15,8) OUTP19' IF (ABSF(CONST)-1.E20> 26,'25>25 OUTP19« n 26 IF (DETER) 25,25,27 , OUTP19 WRITE OUTPUT TAPE NUTS,706 OUTP20I U 706 FORMAT(33H ***P MATRIX IS ILLCONDITIONED***) OUTP20: 27 .CONTINUE OUTP2QS r'i; RETURN • OUTP2Q' LJ- END OUTP

S-337 OUTP _

PHBLCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine; PTRAN

Purpose; To compute the transformation of the state covariance matrix from one inertial coordinate system to another. The transformation which is obtained with KK = 2 is the following:

/ T B1 0 PS By 6x6 6x6 6x6 6x6 If KK is set 1 only, the diagonal 3x3 "s are computed.

Calling Sequence: - - - — - CALL PTRAN (P, B, PS, KK)

Input and Output

Symbolic Program Mathematical Data Definition I/O Name or Dimensions Symbol Dimensions Location or Units

I P (6,6) Covariance Matrix

_J I B (3,3) Transformation Matrix '•J 0 PS (6,6) Transformed Matrix I KK 1 Logic Key

nLJ

Common storages used or required: None

Subroutines required: None

Functions required: None

Approximate number of storages required:

S-339 PTRAN - 1

IPHILCQ WDL D9VISION 0 - 4 PTRAN WDL-TE A

* LABEL PTRN * SYMBOL TABLE PTRN SUBROUTINE PTRAN( P,B,PS,KK) PTRNOOOi DIMENSION P(6,6),B(3,3),PS(6,6),DUM(6,6) PTRN0010 C SUBROUTINE CALCULATES THE 6X6 .MATRIX PS FROM PTRN002A| C P IS SYMMETRIC PS=( B 0 )( P )( BT 0 ) T=TRANSPOSE PTRN003H C ( 0 B >( )( 0 BT) K=l OBTAINS ONLY DIAG 3X3 PTRMOQ3T DO 1 1=1,6 PTRM0040 DO 1 J=l,6 PTRiMOOsfl PSCE, J) = 0. PTRN0060 1 DUM(1,J)=0. PTRN007Q DO 2 1=1,3 PTRNOOSn 13 = 1 + 3 PTRN009'J DO 2 J=l,3 PTRNOiOQ J3sJ + 3 PTRN011/1-, DO 2 K = l,3 PTRN012!" K3 - K + 3 PTRN 03,3 u DUMCI,J)=DUM(I,J>+ B(I,K)*P(K,J) PTRN0140 •DUM *DUM(I3,K3)+B(J,K) PTRN026U GO T0(4,6)T0(4,6) , KK PTRN0270 6 PS(I,J3) =PS(I,J3) +DUM(I ,K3)*B(J,K) PTRN028f- 4 CONTINUE PTRN029I GO TO(5,7),KK PTRN0300' 7 PS(J3,I)=PS(I,J3) PTRN0310 5 CONTINUE PTRN0321i a CONTINUE PTRN033ir~ •RETURN PTRN0340 END PTRN T 0 0

S-340 PTRA& - 2

WDL. DIVISION PHILCQ WDL-TR2184

Subroutine; RETRO

Purpose: To take the P and PAR covariance matricies through a retro maneuver into a circular orbit. n

Calling Sequence: CALL RETRO

Input and Output

Data Symbolic Program Mathematical Definition I/O Name or Dimensions Symbol Dimensions Location or Units

I Quantities obtained from common

0 Quantities returned to common

r'j

Common storages used or required: T, S, C, 1C

Subroutines required: MATRX, SETN

Functions required: DOT, FNORh, SQRT

Approximate number of storages required: 779 DEC

3-341 RETRO-1

1PH1LCQ WDL DIVISION WDL-TR2184

Derivation of Guidance Law Through Retro Maneuver

The vehicle is assumed to be at periapsis at the time the subroutine is called. The maneuver is then carried out such that the vehicle is in circular orbit after retro fire.

The required velocity at periapsis for a circular orbit is: Q 0 u Rr

The required incremental velocity correction along the nominal trajectory is the following

A V u = - 1 n ' n1 (1) ','

where u is the nominal periapsis velocity vector for the incoming trajectory. 0

The guidance law which governs the deviations from the nominal is obtained in the following manner. The deviation from nominal periapsis velocity (assuming linear theory) may be written as:

6 u = X + A X p - - (2) 3x1 3x1(3x3)(3x1)

where du 0 0 D du 0 Tf£ 0

du 0

S-342 RETRO-2

PHILCQ WDL DIVISION n I 1 r~\ WDL-TR2184

ins ^ and X and X are the vehicle deviation state.

• The partial derivatives in matrix A are the following:

l 2 3 2U R3J ' '

The estimate of periapsis velocity deviation from equation (2) is

~ * * --- 6-T?p - =- —X + -A --X --—_._ _ _„ _ - - - _ (3_ )

and the guidance law is obtained as follows:

X = - (A I) / X "1 8 ( - V Y _J \* , 3x1 3x6 6x1 u-1 The total guidance correction is the sum of equations (1) and (4)

U A The guidance law expressed by equation (4) corresponds to equation '-;! (6) in the guidance correction derivation in subroutine GUID. The P and PAR covariance matricies are then updated as shown by the derivation in [ j the GUID subroutine writeup. The additional term, A V, present in the total guidance correction required is treated as being independent of the deviation state. Therefore, the E (X X ) may be written as: 0 gt gt • • T * * T" — _jy «^- ^p E ^/VA AV )\ — ETf? ^AV AY y\ T-J_^ iAi \VJ iAi Vir •^ \ 6^0 So 'J since E(X A~VT) = 0 g ) J S-V-*3 RETRO-3

^H-1!-?0 WDL DIVISION WDL-TR2184

SUBROUTINE RETRO

CH3 TAIN NOMINAL VELOCITY CORRECTION FOR RETRO

COMPUTE PERIAPSIS VELOCITY PARTIALS

COMPUTE 3 E(Xg Xj) EXPECTED CORR.

UPDATE PAR MATRIX FOR CORRECTION ]

COMPUTE ERROR IN CORRECTION :1

MODIFY P AND PAR MATRICES FOR ERROR IN CORRECTION D WRITE OUTPUT MATRICES AFTER RETRO MANEUVER

RETRO - 4 S-344

PHILCQ WDL DIVISION WDL-TR2184

* LAQEL RE.TR * SYMBOL TAbLt RETR CFC2030 SUBROUTINE RETRO RETR SUBROUTINE RETRO RETROQO COMMON T,S,C>IC RETROQ1 DIMENSION T(1360>.S(1000),C(1000),IC(1> RETR002 l,TPAR(3,6),PAR(6,6),P(6i 6),DUP<3,-3) RETR003 2,TGUID(6),DUM(3,3),DUN(3,3),DUMM<6,6) RETR00 A DIMENSION XP(3),VXP(3),CV(3) RETR005 EQUIVALENCE (T,TDUK),(S,SDUM),(C,CDUM) RETR006 1,,(C(568),TPAR),(C(460).PAR) RETR007 2,(CC652),P),

S-345 RETRO -

iPHILCQ \A/DI_ DIVISION RETRO (cont'd)

J)=PAR(I, RETK048\, RETK049Q 17 CONTINUE. RETROD Of] LC 19 1=1,3 RETRO^lL) 11=1+3 RETR0520 CO 18 J = l,3 RETR033/h jJ=J+3 RETR054H CUMMdl, J) = TPAR(I, J) RETR055F ObrtMd, JJ)=0, RETR056D CUMM(II, JJ)=Q, RETR057M t>< DUMMd, J)=0 , RETRO^eU 1-y i:UMMd,I)=l, RETR0590 CALL MATRX(DUMM,PAR,PAP,6,6,6,1) RETR060n CO 201=1,6 RETR061JJ DO 20 J=T,6 RETR0620 J=AR(I, J)=PAR(I, J) + Pd,J) FAR(J,I)=PARd,J> RETRO 64}..: : 20 CONTINUE RETR065 u" Ch!jD = QQPT*RMSV2 RETR0660 GQ=QQSO-QUPT RETR067;H CO 22 1=1,3 RETR068U CO 21 J=I,3 RETR0690 DuNd, J)=(JQ*DUM(I, J) RETR070; UU\'( J,I)=DUN(I, J) RETR071|_ 21 CONTINUE RETRO 720" DUN(I,I)sDUN{I,I)+CRUD RETRO 73.1, 22 CONTINUE RETR074. hHSLRH=SQKTF(DUN(l,l)+DUN(2,2)*DUN(3,3)) RETRO 75VJ DO 23 1=1,3 RETR0760 11 = 1 + 3 RETRO 77'"] DC 23 J=I,3 RETR078U JJ=J+3 RETR0790 PAR(II,JJ)=PAR(II,.JJ)+DUN(I.J> RETRO 80,-] PA^( JJ,II)=PAR(II,JJ) RETR081JJ P(II,JJ)=P(II,JJ)+DMONIT*DUN(I,J) RETR0820 F( JJ,II)=P(II, JJ) RETRO 83rp, 23 CONTINUE R E T R 0 8 4}'1 U'RITE OUTPUT TAPE NUTS. 702, ftMSV, RMSERR RETRO 85^ 702 FORMAT (24H RETRO QUID 'DATA FOLLOWS/ RETR0360 115H RMS VEL REOs , E15 , 8, 10X , 18H RMSERR IN CORR=,E15,8) RETRO 87f] WRITE OUTPUT TAPE NUTS, 703, P RETR038L) 703 FORMAT(9H P MATRIX/ ( 6E17 . 8 )) RETRO 890 WRITE OUTPUT TAPE N'UTS, 704 , PAR 704 FORMATdlH PAR M A TRIX/ ( 6E17 . 8 ) ) RETR091M 15 RETURN RETR092F END RETR S-346 RETRO - £.J

PHILCQ WDL DIVISION WDL-TR2184 Q Subroutine: ROTATE Purpose; To compute a 3 x 3 rotation matrix for a transformation of a coordinates about axis i (i = 1,2,3) through an angle + 9. /I 0 0 For example: rotation about axis 1, matrix = I 0 cos 9 -sin 9 \0 sin 9 cos 9,

"I" Calling Sequence; CALL ROTATE (NCOORD. ANG. "RMTRIX, IROT)

Input and Output

Data Symbolic Program Mathematical I/O Name or Dimensions Definition ! Location Dimensions Symbol or Units

I NCOORD 1 i, i = 1,2,3 Axis of rotation

I ANG 1 9 radians Angle for rotation

0 RMTRIX 3,3 Resulting rotation matrix

I IROT 1 If IROT < 0, use -9. •

Common storages used or required: None Subroutines required: None Functions required: None Approximate number of storages required:

S-347 ROTATE - 1

PHILCQ WDL DIVISION ROTATE WDL-TR2V

* LAREL ROTA * SYMBOL TAoLt. ROTA SUBROUTINE K3TATE(NCOORD,ANG,RMTRIX,IROT) ROT AO 00 0 DIMENSION RHTRIX<3,3> ROTAOQIC SANG = SINF(ANG) ROT A 00203 GANG = COSF(ANG) ROTA0030™ IF (IROT) 1,2,2 ROTA004C '4 1 SANG = -SANG 2 DO 3 1 = 1,5 POTA0060 DO 3- J = l,3 ROTA0070 3 RKTRIXd. J) = 0. ROTA008LJ GO TO (4 5,6), NCOORD ROTA0090 1 = 2 ROTA010(?-i : J = 3 ROTA011( ''.| GO TO 7 ROTA012C'" I B 1 ROTA0130 J = 3 ROTA0141 GO TO 7 ROTA015L-J 1 = 1 ROTA0160 J a 2 ROTA017F-] RMTRIX(NCOORD,NCOORD) = ROT A 0 18 ( J RMTRIX(I,I) = GANG ROTA0190 RMTRIX(I,J) = SANG ROTA020P-J RMTRIX(J,1) = -SANG ROTAOail-1 RMTRIX(J.J) = GANG ROTA022UJJ RETURN ROTA023Q END ROTA

'j 3

S-348 ROTATE - 2

RHILCQ WDL DIVISION 0 WDL-TR2184

Subroutine: ROTEQ B Purpose: ROTEQ evaluates elements of the rotation matrix which relate the general precession of the earth's equator and the consequent retrograde motion of the equinox on the ecliptic. It is used to provide the trans- formation from mean equator and equinox of 1950.0 to mean equator and equinox of date.

Calling Sequence: CALL . ^'

Input and Output

Symbolic Data Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

I TIME 1 T • days Total number days from reference epoch (1950.0)

1 I 0 A 3,3 A Rotation matrix

0 Common storages used or required: None Subroutines required: None 0 Functions required: None Approximate number of storages required:

3-349 ROTEQ - 1

PHBLCQ WDL DOVISION my. WDL-TR2184

Elements of Transformation

The rotation matrix may be represented as

where X, Y, Z are expressed in the mean equator and equinox of 1950.0 and x1, y1, z1 are the coordinates in the mean equator and equinox of date.

ECLIPTIC OF 1950

ECLIPTIC OF DATE f e 1950 MEAN EQUATOR OF I960

'MEAN MEAN EQUATOR OF DATE

n 11) The geometry of the precession has been represented by the three small parameters 6 , z, and 9. ^IQC is the mean equinox of 1950; "S-i en is the mean obliquity of 1950; V is the mean equinox of 195n 0 M J mean M date; "e is the mean obliquity of date. Measured in the mean equator of 1950 from the mean equinox of 1950, 90 - 6 is the right ascension of the ascending node of the mean equator of date on the mean equator of 1950.

S-350 ROTEQ - 2

PHILCQ WDL DIVISION! -J' WDL-TR2184

90° + z is the right ascension of the node measured in the mean equator of date from the mean equinox of date. 9 is the inclination of the mean equator of date to the mean equator of 1950.

In terms of 6 , z, and 9, (a. .) is given by:

D a,, = -sin 6 sin z + cos 6 cos z cos 9 11 o o

J a,., = -cos 6 sin z - sin 6 cos z'cos 9 _ _ 12 _ _ _ J?_ _ o

' I a,_ = -cos z sin 9 t_J 1J

; a = sin 6 cos z + cos 6 sin z cos 9 201 o o

t, ~1 a,.- = cos 6 cos z - sin 6 sin z cos 9 22 o o

- i a._ = -sin z sin 9

a = cos 6 sin 9 nJ1i o .J a_ = - sin 6 sin 9 302 o LJ a = cos 9

2 3 6o '- 2304'! 997T + '.'302T + V0179T

z = 2304'J 997T + 1'J 093T2 + V0192T3

9 = 200V1 298T - ':426T-V0416T3

with T the number of Julian Gentries of 36,525 days past the epoch 1950.0.

j i LJ

I S-351 ROTEQ - 3

.iPHILCQ WDL DIVISION WDL-TR2184 o

The actual computational form of (a..) is obtained by expanding the a. in power series in 6 , z, 0 and replacing the arguments by the above LJ time series. The results are:

'11 1 -.00029697T2 -.00000013T3

-a = -.02234988T -.00000676T2 + .00000221T3 '12

-.00971711T +.00000207T2'+.00000096T3 '13 1 -.00024976T2 -.00000015T3 9 a = -.00010859T2 -.00000003T3 '23

1 -.00004721T2 +.00000002T3 '33

J

J

D 0

3-352 ROTEQ - 4

PHILCQ WDL DIVISION' 'r-^ u.rEQ WDL-TR2184

* LABEL ROTO * .SYMBOL TABLE ROTQ SUBROUTINE' ROTEQ(TIME,A) ROTQOOO DIMENSION A(3,3> ROTQ001 T B TIME/36525. ROTQ002 T2 s T*T ROT0003 13 = T2*T ROTQOQ4 A<1,1) ••!.•- ,00029697*T2 •• .00000013*13 ROTQ005 A(l,2) B. -.02234988*1 •- .00000676*12 * ,00000221*T3 ROTQ006 A(2,1) B -A(1,2) ROTQ007 A(l,3) B -.00971711*1-* .00000207*T2 * ,00000096*T3 ROTQ008 ROTQ009 r~> A (-2-* 2) » 1. • .00024976*12 •-• .00000015*13 ROTQ010 .A(2»3) B ».00010859*T2 - ,00000003*T3 ROTQ011 A~( 3^'2)"" B A (2"~3) "" - - - - — - _ — -ROTQ012 .A(3>3) s 1. - .00004721*12-* ,00000002*T3 ROTQ013 'RETURN ROTQ014 END ROTQ

-.1

V-J J

Li

S-353 ROTEQ - 5

Li

IPHBLCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2184

Subroutine; i'VIM

Purpose; TO transform inertial equatorial spherical to Cartesian coordinates.

Calling Sequence; CALL RVIN (A, B, C)

Input and Output

Symbolic Data Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

I A 5 A(l) = R Magnitude ot Position Vector

A(2) = * deg Declination V(3) = 8 deg uight Ascension

A(4) = V Magnitude ot Velocity Vector

A(5) = r deg Flight Path Angle A(6) = X deft Vzimuth

0 B 3 X , Y , ,Z

0 C 3 X, Y, Z

Common storages used or required: None None Subroutines required:

Functions required: 3 IN, COS

Approximate number of storages required:

S-355 RVIN - 1 ipHSLCO. WDL DiveseoN WDL-TR2184

i'.VIN

The calling sequence consists of

CALL RVIN (XIN, XOUT, VOUT)

where: XIN is a vector with dimension six. The vector contains the spherical set in the following order

>l I|RR | = Magnitude position vector 0 0 = Declination 9 9 = Uight ascension

XIN = I |VIw |1| I 1|v Vv| = Magnitude velocity vector Y V = Flight path angle CT a = Azimuth ) "b 6x1

XQUT is a vector with dimension three. The vector contains the Cartesian components of position

x XOUT = y

3x1

VOUT is a vector with dimension three. The vector contains the Cartesian components of velocity

x VOUT y z•

3x1

S-356 RVIN - 2

RHILCQ WDL DIVISION WDL-TR2184 s J

RVIN TRANSFORMATIONS

The position transformation is obtained as follows (see Fig. 1 below)

0

FIG I

Projecting R on the x-y plane, 9 is the angle from the x axis to the projection measured counterclockwise. The elevation of R above the x-y plane is the angle $. The formulas are

cos § cos 9 XOUT - N cos $ sin 9 (1) u sin $ 3x1 3x1 r'\

The velocity transformation is obtained as follows. The azimuth and flight path angles refer to the tangent plane which is normal to the U vector (see Fig. 2). un

S-357 RVIN - 3

1PHILCQ WDL DIVISION WDL-TR2184

IRI ui • •;

FIG. 2

The unit up, U, east E, and north, N, vectors in terms of xyz are

/cos $ cos 9 U cos $ sin 9 (2) i $

3x1 3x1 3x1

-sin 9 /N k x U cos 9 E i 'M (3) |k x Ul §

3x1 3x1 3x1

-sin $ cos 9 u x "E -sin $ sin 9 (4) cos $ a ••» 3x1 3x1 3x1

The above vectors may be written in matrix form to represent the transforma- tion from the local tangent plane to the xyz coordinate system S-358 RVIN - 4

PHILCQ WDL DIVISION n WDL-TR2184 (j f X r~ „ ^ 0 cos $ cos 9 sin 9 -ain $ cos 9 U y U E N £ cos f sin 9 cos 9 -sin $ sin 9 E (5) z sin f 0 cos W

3x1 3x3 3x1 3x3 3x1

The velocity vector in the tangent plane coordinates (Fig. 2) is

f ^ JJL - - - — V E = IV) cos Y 3 in vj

N COS Y cos d ^ J (6) 3x1 3x1

Substituting equation (6) into (5) yields the desired transformation

•s X sin Y VOUT y |V| U E cos Y sin a z x cos cos o - -/

3x1 3x3 3x1

0

S-359 RVIN - 5

JPHILCQ WDL DOV1SION RVIN WDL-TR2184 o

LABEL RVTN SYMBOL TABLE RVIN SUBROUTINE RVIN(A,B,C) RVINOOOO DIMENSION A(6)«B(3),C(3)»D(3*3),E(3) RVIN0010 A(2> = A(2)*,017453293 RVIN0020 A(3> = A(3)*,017453293 RVIN0030 A(5) = A(5)*,017453293 RVIN004Q A(6) = A(6)«.017453293 RVIN0050 CP = COSF(A('2» RVIN0060 SP = SINF(A(2» RVIN007Q CT = COSF(A(3) ) RVINOQ80 ST = SINF(A(3» RVIN0090 CG * COSF(A(-S» RVIN0100 SG = SINF(A(5)> RVIIM0110 CS - COSF(A(6)) RVIN0120 SS - SINF(A(6» RVIN0130 SPCT = SP*CT RVTN014Q SPST = SP*ST RVIN0150 CGSS = CG+SS RVIN0160 CGCS = CG*CS RVIN0170 CPCT = CP*CT RVIN0180 CPST = CP*ST RVIN019Q D(l,l) » CPCT RVIN0200 D(li2) s "ST RVIN0210 0(1,3) = °SPCT RVIN0220 D(2,l) = CPST RVIN0230 •D(2>2) B CT RVIN0240 D(2*3) = -SPST RVIN0250 D(3.1) - SP RVIN0260 D(3,2) s 0. RVIN0270 J D(3*3) = CP RVIN0280 .8(1) = A(1)*CPCT RVIN0290 B(2) = A(1)*CPST RVIN0300 B(3) = A(1)*SP RVIN0310 E(l) = A(4)*SG RVIN0320 E('2> = A(4)+CGSS RV1N0330 E(3) = A(4)*CGCS RVIN0340 DO 1 1=1,3 RVIN0350 C(I) = 0. RVIN0360 DO 1 Jal,3 RVIN0370 C(I) 3 C(I) * D(I,'J)+E(J) RVTN0380 RETURN RVIN0390 END RVIN

S-360 RVIN - 6

PHILCQ WDL DIVISION ' WDL-TR2184

Subroutine: RVOUT

Purpose: To convert Cartesian position and velocity coordinates to inertial equatorial spherical coordinates.

Calling Sequence;- — - CALL RVOUT (A, B, C)

Input and Output

Symbolic Program L. Mathematical Data Dimensions Definition I/O Name or Dimensions Symbol Location or Units

I A 3 X.Y.Z Position coordinates

I B 3 X,Y,Z Velocity coordinates J- 0 C 6 C(l) = R Magnitude of position vector C(2) = $ degrees Declination w C(3) = 9 degrees Right ascension C(4) = V Magnitude of velocity vector

C(5) = T degrees Flight path angle

C(6) = £ degrees Azimuth

Common storages used or required: None

Subroutines required: CORSS Functions required: ATANF, SORTF, ARKTNS, DOT, ACOS. FNORM Approximate number of storages required:

J-361 RVOUT-1

IPH8LCQ WDL DIVISION WDL-TR2184

RVOUT

The transformations required to convert Cartesian coordinates to inertial equatorial spherical are the inverse of those required by, and described under, RVIN.

For the position coordinates:

? 7 9 R = M X + Y + Z

sin"1 | -90° £ $ * 90° K •1 Y ~^ + 0 f or X > 0 fi = tan X J + 180° for X £ 0

For the velocity coordinates, X1, Y1, Z1 are obtained by applying the /\ ^ /\ inverse of the transformation matrix lU E Nj given in RVIN. Then: 3x3 r.o -2 - = \|x + Y + Z

sin"1 ^ -90° * T £ 90°

, „, ^ + 0 for Z1 > 0

fZ J 4- 180 for Z £ 0

S-362 RVOUT-2

PHILCQ WDL DIVISION! RVOOUT WDL-TR2184 * LABEL RVOT SYMBOL TABLE RVOT ICE C2017 SUBROUTINE RVOUT RVOT SUBROUTINE RVOUT(A,B,C) RVOTOOO DIMENSION A(3),B(3), C ( 6 ) , E ( 3 ) , G ( 3 ) , H( 3 ) RVOT001 ACQSF(X) = ATANF(SORTF(1.-X**2)/X) RVOT002 C(D = FNORMU) RVOT003 C(4) = FNORM(B) RVOT004 C('2) = ATANF(A(3)/SQRTF**2) RVOT005 C(3)3ARKTNS(360,AC1),A<2)) RVOT006 4 F B DOT(A,B) RVOT007 ARQ s F/(C(1)*C(4)) RVOT008 r-i C(5) ~ AC-OSFCARG) RVOT009 _ IF (ARG) 5,6,6 RVOT010 5 C(5>" = -1.5707963-.-C (5) - ~ - — ~ RVOT-OJH GO TO 7 RVOT012 6 .C(5) = 1,5707963 - C(5> RVOT013 •7 .CALL CROSS(A,B,E) RVOT014 ENuFNORM(E) RVOT015 DO 12 I«l,3 RVOT016 12 E(I)=E(I)/EN RVOT017 CALL CROSS(E.A^G) RVOT018 GN s FNORM(G) RVOT019 'DO 8 1 = 1,3 RVOT020 G(I) = G(I)/GN RVOT021 •H(l) = 0. RVOT022 iH(2) = 0, RVOT023 H(3) - 1, RVOT024 'CALL CROSS(H,A, E> RVOT025 ARG B DOT(E,G) RVOT026 EN = FNORM(E) RVOT027 ARG s ARG/EN RVOT028 C(6) = ACOSF(ARG) RVOT029 IF

RVOUT - il S-363

JPHILCQ WDL DIVISION my. Page Intentionally Left Blank WDL-TR2184

0 Subroutine: SDEC

Purpose'• To compute the total perturbation accelerations due to earth's oblateness, perturbing bodies, and Encke perturbations due to deviations from reference conic. These perturbations are obtained by calling OBLN, BODY, and ENCKE and placed in the T block for use in the integration package.

0 - Calling Sequence; CALL

Input and Output

Symbolic Program Data Mathematical Definition I/O Name or Dimensions Symbol Dimensions Location or Units

I Quantities obtained from common

0 Quantities placed in common

Common storages used or required: T, S. C. 1C BODY, ENCKE, INTR, OBLN, Subroutines required: STEPC

Functions required: None

Approximate number of storages required: 195 DEC

S-365 SDEC - 1

PHILCQ WDL DIVISION WDL-TR2184

SUBROUTINE SOEC

CALL STEPC OBTAIN POSITION ALONG REFERENCE CONIC

IS CONIC EARTH CENTERED

IS IT WITHIN 5000000 KM

YES

SET CALL OBLN OBLATENESS OBTAIN ACC. PERTURBATIONS DUE TO EQUAL TO ZERO OBLATENESS

CALL ENCKE OBTAIN ACC. DUE TO DEV. FROM CONIC

.S CONIC EARTH CENTERED

IS IT WITHIN 1000000 KM

NO

SET UP GRAVITATIONAL CONSTANT

-,-1

CALL EPHEMERIS

CALL BODY OBTAIN PERTURBATION ACC. FOR BODIES BEING CONSIDERED

PLACE TOTAL ACCELERATIONS IN T BLOCK

S-366 SDEC - 2

PHILCQ WDL DIVISION WDL-TR2184 j* LABEL SDEC * SYMBOL TABLE SDEC CEC2024 SUBROUTINE SDEC SDEC SUBROUTINE SDEC SDECOOO > DIMENSION T(1360).S(1000),C(1000),IC<1> SDEC001 DIMENSION RAD(3), X { 3) , VX ( 3 ) , XP ( 3 ) * SDEC002 AE(3),AO(3>,AP<3),PO(22),VE<22),CA(3),VKB(6>, SDCC003 2 R80(6),RBOP<6) , UM ( 6 ) , VXP ( 3) , AN< 3, 3 ) , EN ( 3, 3 ) , EA (SDECOQ 3, 3 )4 3,BP(3p3) ,XSO(3),VXSO<3) SDEC005 COMMON TiS.C-.IC SDEC006 EQUIVALENCE (T,TDUM), (:S»SDUM), (C»CDUM) SDEC007 EQUIVALENCE ( S( 11 ) , V J) . ( S ( 12 ) ,'H ) , (SC 13) , D ) , (S (900 ) ,SDEC00 R AD ) 8 EQUIVALENCE ( C( 10 ) . TW ) , ( C ( 11 ) , TF > , ( C ( 13 ) , TP1 ) , ( C< 1SDECOQ4 ) , TP9 2 ) 1,(C<15),XP),{C(18).VXP), SDEC011 4,(C(55)-,U)r(C(56-).VK8)rr ?i 21 CONTINUE SDEC037I IF(TP2)22, 23,23 SDEC038I 22 CONTINUE SDEC039I TP2=TP2*1. - SDEC040I TWQN=TWGN»1, SDEC04H GO TO 21 SDEC042I 23 CONTINUE SDEC043 TFP = INTF(TP2) SDEC044 TP2 = TP2-TFP SDEC045 SDEC046 CALL INTR(TP1,TP2.NR1,'PO.NV*VE»RBOP) SDEC047

S-367 SDEC - 3

i SPHILCQ WDL DDV1SION SPEC (cont'd)

CALL BODY(XP,PO,VKBJ.RBO»RBOP.CA,NURJ,BP,T,NEQ,U) SDEC049•» 7 U0 DO 2 1=1,3 SDECO i o o i 1 KI=KJ+I SDECO 51 oU 2 T(KI) = AOU> + AE(D - SDEC0520 20 RETURN SDEC0530 END SDEC

1

n J 0

3-368 SDZC -

PHILCQ WDL DIVISION WDL-TR2184 ' tJ Subroutine: SETN

Purpose: SETN sets the logical tape numbers for input and output to conform with the system unit table.

L-J Calling-Sequence: CALL SETN (NIN. NOUT)

Input and Output

Symbolic u Data Program Mathematical Name or Dimensions Definition I/O Dimensions Symbol Location or Units

0 NIN 1 Logical input tape unit

0 NOUT 1 Logical output tape unit •"I I

Mu

Common storages used or required: None

Subroutines required: None

Functions required: None Approximate number of storages required:

S-369 SETN - 1

JPHSLCQ WDL DIVISION * LABEL SETM *" CtC;? 023 SET NO 0(1 0 SUBROUTINE SETN(M!V,NUUT) SETNOOlG C CALLING THIS SUBROUTINE RESULTS IN THE USE OF SETN002U C INPUT TAPE 2 AND OUTPUT TAPE 3 SETN0030 C USER MUST HEAD INPLT TAPE NIN, AND WRITE OUTPUT NOUT, SETNOQCl NIN = 2 SF-TNOO^ NOUT=3 SETN0060 RETURN - SLTNOOZa END SETN ]4 wJ

S-370

r PHILCQ WDL DIVISION /l WDL-TR2184

Subroutine; SHIFTP

Purpose: To change position and velocity coordinates from a coordinate system centered at body IOR to one centered at body NOR. SHIFTP also returns the new gravitational constant and the position and velocity of all bodies on the ephemeris tape referenced to the new center. (The latter is done by calling the ephemeris subroutine INTRI)

Calling Sequence; CALL SHIFTP (IQR," U," UM, X, VX. PP. VE,~TP1, "TP2)

Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I IOR 1 Index of old central body

I NOR 1 Index of new central body

0 U 1 H KVm 3 f/se c2 Gravitational constant, body NOR

I UM 6 Array of gravitational constants * w.r.t. body 1-0 X 3 X.Y.Z Km Positions ^input : JQR / w.r.t. body 1-0 • • • vx 3 X.Y.Z Km/sec VelocitiesJoutput: NOR 0 PO 22 Km Positions"V>f bodies on tape w.r.t.

0 VE 22 Km/ sec Velocitied body NOR I TP1 1 seconds Double precision time in sec-

I TP2 1 seconds onds since 1950. a Common storages used or required: None a Subroutines required: INTR Functions required: None

U Approximate number of storages required: * with respect to

S-371 SHIFTP-1

JPHILCQ WDL DIV1S8ON WDL-TR2184 o

The sequence used in shifting centers is the following:

IOR (NOR) CENTRAL BODY

1 Earth 2 Moon 3 Sun 4 Venus 5 Mars 6 Jupiter

S-372 SHIFTP-2

PHILCQ WDL DIVISION WDL-TR2184

+ LABEL SNTP * SYMBOL TABLE SHTP SUBROUTINE SHIFTP(IOR.NOR.U.UM.X,VX*PO.VE»TFiTW,T2) SHTPOOC COMMON TtS.C.IC SHTPOQ1 DIMENSION T(1360),S(1000),C<1000)«IC(1) SHTPOOJ DIMENSION UM(6),X<3),VX<3),PO(22),VE(22> SHTP003 EQUIVALENCE U B UM(N) SHTPOOfi NV a 1 SHTP009 DIS = 1.E10 SHTP01C _'N_Rl B NOR-1 SHTP01J -C~AU INTRl(TPl-;TP2iNRl,PO,-NV.VErDIS-) - -- - - __ _ SHTPOI: •DO 1 1*1,3 SHTP013 g v 26-3*10-1 SHTPOI. X(I) s X(I)*PQ(J) SHTP015 1 VX(I) = VX(I)*VE(J) SHTP016 RETURN SHTP017 • END SHTP •1 y n n il

S-373 SHIFT? -

)PHILCQ DIVISION Page intentionally left blank

Page intentionally left blank WDL-TR2184

Subroutine: STEPC

Purpose; To obtain the state, i.e., radius vector, R, and velocity vector, V, of a probe which is separated by a time increment, t, from a specified state, R and V , assuming an inverse-square central force law with gravitational constant u.

Calling Sequence: CALL STEPC (N. T. R. V. U. RR. W) 0 Input and Output Symbolic Program Mathematical Data Name or Dimensions Definition I/O Dimensions Symbol Location or Units

I N 1 Initializing index

I T 1 At sec Incremental time

l' R 3 "*0 Km Initial Conic position (t )

• Km/sec I V 3 Xo Initial Conic Velocity (t ) V _ 'l 3 2 I U 1 M. Kvm //sec Gravitational constant

0 RR 3 "x Km Position on Conic (to + At_^

0 W 3 X Km/see Velocity on Conic (tn + At) Li Common storages used or required: None

Subroutines required: DOT, GOTOR 0 Functions required: ARKTNS, SQRT Approximate number of storages required: 255 DEC

S-375 STEPC - 1

JPHILCQ WDL DIVISION WDL-TR2184

*Discussipn

The inverse-square central force law is characterized by the equations

v= = --V (1)

1/2 where r is defined to be +(R-R) .

The angular momentum vector, H, defined by the vector cross-product

H = R x V (2)

u is a constant with respect to time, as seen by

H = RxV + RxV = VxV + Rx f—N. j3 — sJ = °» so that H = Ho = Ro x Vo . r Because the magnitude, h , of H is generally nonzero, the plane equations

R-H = R'H =0 o V.H = VH = 0 (3)

which follow from the definition of H, lead to the conclusion that all motion occurs in the plane normal to H . That is, if R and V are non- zero and noncollinear vectors, any other vectors, such as R and V, must lie in the plane formed by R and V . Algebraically, one says that R and V may be expressed as linear combinations of R and V . o o

R - f RQ + g VQ

V = f Ro + g VQ (4)

* Vectors will be denoted by capital letters and scalars by lower-case letters with the single exception of the rather standard symbol, E, for eccentric anomaly.

3-376 STEPC - 2

WDL DIVISION RHILCQ WDL-TR2184

The second of equations (4) follows from (1) and from the fact that R and V are not functions of the time increment, t. The scalars, f, f, g, and g, are functions of R , V , and t. The discussion which follows concerns the o determination of these scalars.

FIG I

The vector (H x R )/h is seen to be perpendicular to R and to have the o o o same magnitude, r , as R . Figure 1 shows that R may be written as the linear combination,

x R cos 6 + sin 6 (5) o

Equation (5) may be rewritten by expanding the vector triple cross-product,

H x R = (R x V ) x R = V (R -R ) - R (R -V ). o o o o o o o o o o o

R -V R = R cos 6 - , sin 6 i -f- V T- sin 6 o V h s o h (5a)

I \

S-377 STEPC - 3

^RHILCQ WDL Divesioisa WDL-TR2184

Comparing equation (5a) with equation (4),

s R -V f = — ( cos 6 — sin 6 r X h o rr g = sin 6. (6)

At this point, the reader should note that while r , R -V , and h are o o o computable directly from R and V , the quantities r and 6 have not been specifically defined in terms of R , V , and t. In order to do so, it is necessary to examine the conic solution to the inverse- square law equations of mof-ion. ,.

FIG 2

Figure 2 shows a conic section with focus at q and pericenter at q. . The point q^ on the conic is specified, in polar coordinates originating at q , by the radius, r, and true anomaly. 9, 9 being measured positive counter-

clockwise from the line q q, . The length q q9 is called the semi-latus rectum and is denoted by p. The parameter specifying the shape of the conic is the eccentricity, e, which may be calculated from the equation

-1. The conic equation in an often-used form is, Vl r = 1+ecosQ (7) S-378 STEPC - 4

PHILCQ WDL DIVISION WDL-TR2184

Conic sections are characterized by eccentricity as follows:

circular if e = 0 elliptical if 0 < e < 1 parabolic if e = 1 hyperbolic if e > 1 n The two cases of great interest here are the elliptical and hyperbolic u cases. Figure 3 below shows an ellipse. y _ Li

•J x, x

FIG. 3

. U The semi-major axis, a, is the distance from the point of symmetry, q,,

to the pericenter, q1. The semi-minor axis, b, is the length q, q,.. The eccentricity is equal to the ratio 0 ' 2 ,2 c/a

S-379 STEPC - 5

JRHILCQ WDL. DIVISION WDL-TR2184

The eccentric anomaly, E, is the argument of the projection of the point, q , from the line q,q, onto a circle of radius, a, concentric with the ellipse. That is, the Cartesian coordinates of q relative to q are

x = a cos E

y = b sin E (8)

Equations (8) give rise to the familiar equation of the ellipse

x2 v2 2- + 2- + sin E = 1. l

Relative to coordinates centered at q , q. is described by i. O j

x1 = rcos9 = acosE-ea

y' = y = rsin9 = bsinE = a N1-e^sinE. (8a)

r = x'2 + y'2 = a(l-ecosE)

FIG 4

3-380 STEPC - 6

PHILCQ WDL. DIVISIONlJ ) WDL-TR2184 0 Figure 4 shows a conic section which is hyperbolic. The lines — - •? = 0 fl D and — + •? = 0 are the asymptotes of the hyperbola. The semi-major axis, a, a b —— is again the distance from the point of symmetry, q,, to the pericenter, q.. The semi-minor axis, b, is defined as the distance from the focus, q , to one of the asymptotes. Eccentricity is given by the ratio

£2. I 1_ 2*• c/a = a + b 2 a The eccentric anomaly, E, (sometimes called F) is too difficult to picture _.to_beto_be_^ included in Fig. 4. EE is defined^ in such a way that q is described in Cartesian coordinates by

x = -a coshE

y = b sinhE, (9) i,

leading to the familiar hyperbolic equation

2 2 ix_ _ JLv . = cosh 2E-sin h 7E = 1 2,2 a b

The Cartesian coordinates of q,. relative to q are given by

x' = rcos0 = ea-acoshE

y1 = rsin9 = bsinhE = a \|e2-! sinhE. (9a)

r = L'2 + y'2 = a(ecoshE-l)

Solution of the differential equations (1) yields p, a, and e as con- stants of the motion.

It is easily verified that

22 2 2* h = ^r v - (R -V ) = r 8 angular momentum magnitude

5-381 STEPC - 7

IPHILCQ WDL DIVISION 0 WDL-TR2184

semi-latus rectum

semi-major axis ro v o 2- u 0 1- eccentricity P/| 0 n = Ju, 3 mean motion N /a

It should be observed that p is non-negative so that a negative semi-major axis corresponds to an eccentricity greater than one; that is, to the hyperbolic case. Some,useful identities are listed as equations (11).

. _ ep9sin9 _ ue r = = sin9 ¥ = £ «•« M+omaA^(l+ecos9)z h

cos9 = T - (cE-e)

sin9 =•? J e' -1 sE nr h sE ^u r

esE R-V \|ua

ecE = 1 4- - — a (11)

The convention has been adopted that when a double sense sign + is used, the upper pertains to the hyperbolic case and the lower to the elliptical.

The symbols sE and cE mean sinE and cosE for the elliptical case, but sinhE and coshE for the hyperbolic case. Hence, if we let

S-382 STEPC - 8

PHILCQ WDL DIVISION WDL-TR2184

E-E , it follows that

sf = sEcE -cEsE o o cf = cEcE +sEsE 0 o o and sE = s$cE o

cE = c*cEo +s$c— Eo (12)

This angle, 6, of equation (5) is seen to represent the incremental true anomaly on the conic section containing R and R. Thus, we can

"l ! <, \

j

/••"i | ;J

FIG. 5

I | find expressions for sin 6 and cos 6 in terms of 9 and 9Q.

/ " '. H sin 6 = sin (9-Q ) = sin9cos9 -cos9sin9 cos 8 = cos (9-9 ) = cps9cos9 +sin9sin9 . (13) § o-o

The incremental true anomaly may now be related to R and V through o o substitution of equations (11) and (12) into (13).

S-383 STEPC - 9

IRHILCQ WDL DIVISION WDL-TR2184

sin 6 = sin9cos8 -cos9sin9 o o

= \|Xl u — —rr (+sEcEo ±esE+es Eo ±cEs Eo ) o

—— (Ts$±esE+esE ) nrr o o

nrr (+s$±ecE os$+es ~ E ocf+es Eo ) o

h_ R .V nrr G-%

cos 6 cos9cos9 +sin9sin9 o u o

3 2 2 rr |_cEc Eo -ecE-ecE o+e —+( e -l)sEsEoj

c$-ecE-ecE +e +e sEsE rr o L o — oJ

ry f\ O 0 - c$-ec$cE -ecE +e +e sE cE s$+e s E rr o o o — o o — o o L 2 " r r R -V r (R -V Y a T ° r* 1 ° ° ° eft 1 i , P i T 0 ,\ O O/ * rr a a yjua — a a — ua o 22 x •* 2 2 " r r R -V r v ("R -V ^ a - o ,_„.., K .000 ti °° .\ooy «$ rr a v ' a \fua — ua — ua vv"' o L ^ 2 2 f r r R -V a \- o , ^ ,, . o oo rr a ' a ^ua 0 f \*- — ua

2 |YR -V ^2 r 1 r R -V r2 a + K_P__O; _ _o Lc$.u H o o o , o rr — L ua a J o ^ a -.

S-384 STEPC - 10

PHILCQ WDL DIVISION WDL-TR2184

The coefficients, f and g, of equation (6) are finally found to be:

R,-V !J f V V . = — ( cos o - —r— sin 0

f(ll -V^ r (R 'V }] r fR -V R -V + La-* __° . V._o_2' (c$.i) +-2 0-2 -^- - I ua a ua -Iv xaL Jua >poa

2l = + — (c$-l) + 1 (U)

rr sin 6

- r R «V I -2 4- -fg n a sf* — \|ua (15)

The velocity coefficients, f and g, are found by noting that

-i

\ ua and therefore f = + r~ (c<$) = - •- Es$ rr (16) o o R -V I r 1° o o n v a xfua

R -V SL •c (17) V ! where

(1-ecE) = + (l-ec$cE +es$sE )

R -V = -I I 1-cf (1 + — o _ \j ua

r R -V -aS (18)

S-385 STEPC - 11

JPHILCQ WDL D1V8SION WDL-TR2184

Kepler's equation presents the incremental time, t, in terms of

nt = + (E-esE) + (E -esE )

+ ($-esE+esE )

($-es$cv E -ecfsEoo +esEo )

R -V o o (j. +-£ *-S* -1) ua

R -V o (19) a

In order to solve equation (19) for $ as a function of R , V and t, an iterative method is required. Any solution obtained is necessarily unique, since the right side of (19) is seen to be monotonically increasing for all *.

Equation (19) may be used to simplify equations (15) and (17)

g = n T -f ••]

t + - ($-s$) — n (15a)

g = 1 + | (1-cl)

a —nr

= 1 +" (c$-l) (17a)

S-386 STEPC - 12

PHILCQ DIVISION, WDL-TR2184

Subroutine Description

The subroutine will calculate

(1) R = R(Ro,Vo,t)

V = V(Ro,Vo,t)

6 -

The first time STEP is called with a given R and V (N=l). those co- 00' efficients which are dependent only on R and V are calculated. There- after, these coefficients are considered to be constants with respect to t.

u Calculation FORTAN Name

r = JR -R RM o \' o o

vo-|V0.Vo VM

r o rv2 I 2- ° ° ' u

n = - |f RAT a

R o -V o = R o -V o RV

h=^ovo-

S-387 STEPC - 13

\A/DL DIVISION WDL-TR2184

STEPC calls Subroutine GOTOR to solve equation (19),

r R -V -r — 8

GOTOR returns a vector F where

Elliptical Hyperbolic

F(D = f - s in f s inh f - $ F(2) = 1-cos $ cosh $-1 F(3) = sin $ sinh $ F(4) = cos $ cosh $

The coefficients, f, g, f and g, are then calculated.

i. Calculation FORTRAN Name r f = - — F (2) + 1 EF 3

+ t GE

r R -V • F<2> + F<4> + 2 F<3> ROA

(r r) f = - anF(3)/— =— EFD fl

g = - - F(2) + 1 GED

6 = tan'1 ** TA fof + Ro'Vog

R = f Ro + 6s oV RR

V = fR + gV W o 6 o

Reference: NASA X-640-63-71, ITEM Program Manual, Goddard Space Flight Center, Greenbelt, Maryland. STEPC - 14 S-388

RHILCQ WDL DIVISION WDL-TR2184

LABEL STPC * SYMBOL TABLE STPC !CEC2023 SUBROUTINE STEPC STPC SUBROUTINE STEPC< N,Tt R» V,U, RR, W> STPCOOO DIMENSION R(3),V(3),RR(3),VV<3),C<2),F(4) STPC001 i GO TO (1,2),N STPC002 ; 1 CONTINUE STPC003 •PIs3.141592654 STPC004 R2aDOT(R,R) STPC005 RMeSQRTF(R2) STPC006 V2»DOT(V,V) STPC007 RVaDOT(R,V) STPC008 VMaSQRTF(V2) STPC009 _A_s_RM/(_2.-RM*V2/U> STPC010 ABABABSFTA) — S_TP_COJL1 RAT=SQRTF(U/ABA)/ABA STPCOJL2 C(l)sRM/ABA STPC013 C(2)cRV/SQRTF(U*ABA) STPC014 IF(A)3,3,4 STPC015 4 CONTINUE' STPC016 K = l STPC017 E1»RAT*T STPC018 GO TO 15 STPC019 3 CONTINUE STPC020 STPC021 ElsO, STPC022 15 CONTINUE STPC023 2 CONTINUE STPC024 T IS THE INCREMENTAL TIME IN ORBIT STPC025 EMQTsRAT*T STPC026 CALL GOT-OR(K,EMDT,C,F,E1) STPC027 EFB-F(2)/C(1)*1. STPC028 GEa=F(l)/RAT+T STPC029 TA«sARKTNS(360,R2*EF*RV + GE, STPC030 ROA=F(2)+C(1)*F(4)*C(2)*F(3) STPC031 .EFD=-ABA*RAT+F(3)/(RK*ROA) STPC032 GEDS"F(2)/ROA*1, STPC033 ij 8 CONTINUE STPC034 DO 10 1*1,3 STPC035 M 1 RR(I)=EF*R(I)*GE*V(I) STPC036 VV(I)=EFD+R(I)*GED*V(I) STPC037 10 CONTINUE STPC038 RETURN STPC039 END STPC

S-389 STEPC -

PHILCQ WDL DIVISION Page Intentionally Left Blank 0 WDL-TR2184

Subroutine: TIMEC

To compute whole days and fractional days since January 1, 1950, from calendar date input. This input is in the form (Years from 1900) x 102 + (Month of Year) + (Day of Month) x 10"2, and (Hour of Day) x 102 + (Minutes of Hour) + (Seconds of Minute) x 10" . fsee examples under input description]. The input date must be 1961 or later.

Calling Sequence; — — — — — — — - CALL TIMEC (Tl. T2. T3. T4)

Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I Tl 1 Year, month, day. Jan. 12, 1965 = 6501.12. I T2 1 Hour, minutes, seconds. 1 FM, 1 min, 30.3 sec = 1301.30: u 0 T3 1 days Whole number of days since 1950. 0 T4 1 days Fractional number of days past Lj T3. a LJ Common storages used or required: None

Subroutines required: EXIT

Functions required: INTF

Q Approximate number of storages required:

, j

S-391 TIMEC - 1

JPHILCQ WDL DIVISION 3 o WDL-TR2184 0

SUBROUTINE TIMEC n

T4 - 0 TA = INTF (TO TYI ' YRS FROM 1900 TV = YRS FROM I960 = IY

OUTPUT - DATE IS IY ^ 07 BEFORE I960 J-K

ND » TOTAL NUMBER OF DAYS IN THE YEARS 1950 - 1960+ IY

IY2 = NUMBER OF MONTHS (0. I FOR INTF)

YES OUTPUT - TIME WRONG

IY2 >I2? J>

ND = ND + NUMBER OF DAYS FROM BEGINNING OF YEAR TOt Y2

TBI = DAY OF MONTH ND = ND + TBI - I T3 = ND

T4 - SECONDS/86,400 TBI = HOUR TBS = MINUTES

TB4 = FRACTIONAL NUMBER OF DAYS

S-392 TIMEC - 2

PHILCQ WDL DIVISION n

WDL-TR2184

LABEL TIMC SYMBOL TABLE TIMC SUBROUTINE TIMECT4) TIMCOOO Tl IS AN INPUT IN FORM (YEARS FROM 19QO)(MONTH OF YEAR) TIMC001 (DAY OF MONTH TIMC002 WRITTEN AS 6501,12 FOR JAN. 12, 1965 TIMC003 T2 IS AN INPUT IN FORM (HOUR OF DAYHMINUTE OF HOUR) TIMC004 (SECOND OF MINUTE) TIMC005 WRITTEN AS 1301,3032 FOR 1PM, 1 MINUTE, 30.32 SECOND TIMC006 T3 IS .WHOLE DAYS FROM 1950 OUTPUT TIMC007 CALL SETN(NIN,NOUT) TIMC007 T4sO. TIMC008 TA=INTF(T1) TIMC009 TA1 = TA/100.-*,01 TIMC010 -T-Yl-s -INT-F<-TA-1") _ _ _T IMC Oil TY= TY1-60. TIMC'01'2" ,IYsTY TIMC013 IF TIMC033 IF (IY2) 10,10,11 TIMC034 11 CONTINUE TIMC035 IF <12-IY2) 10,12,12 TIMC036 10 CONTINUE TIMC037 WRITE OUTPUT TAPE NOUT.13 TIMC038 13 FORMAT(37H INPUT TIME 'IS WRONG. EXIT FROM TIMEC) TIMC039 • CALL EXIT TIMC040 12 CONTINUE TIMC041 DO 4 1=1,IY2 TIMC042 TIMC043 JAN FE8 MAR APRIL MAY JUNE JULY AUG SEPT OCT NOV TIMC044 GO TO (4,6,7,6,8,6,8,6,6,8,6,8),! TIMC045 6 CONTINUE TIMC046 -NDsND * 31 TIMC047

S-3S3 TIMEC - 3

IPHILCQ NA/DL DIVISION 0 TIMEC (cont'd) WBL-TR21P"

GO TO 4 T I w C 0 4 8 0 7 CONTINUE TI"C 0490 IF(KK-1)9,14,9 TIMC 0500 14 C 0 M T IN U f. TIMC 0510 NDsND +29 TIMC 0520 GO TO 4 TIMC 0530Q 9 CONTINUE TIMC 054Q U MD = ND +28 TIMC 0550 GO TO 4 TIMC 0560pj 8 CONTINUE TIMC 0570I--J N' D - i\i D +30 TIMC 0580 ^' 4 CONTINUE TIMC 059Q TBl=(Tl-TA)*10U.+.l TJMC 0600 MDsN'O +XI^TF(TB1) TJMC 0610 NDsND-1 TIMC 0520 T3sND TAsiNTF(T2) TIMC0640 T4«(T2-TA)/864. TIMC0650 TBslA/100,+,1 TIMC066U. TB1=INTF(TB) TIMC067Q1 TB2=TA-TRl*100.+.l TIMC0680 TB3= INTF(TB2) TIMC0690 T4aT4+TBl/24.*TB3/24,/60. TIMC0700H RETURN TIMC0710U END TIMC

S-394 TIMEC -

Q

;i

PHIUCQ WDL DIVISION(J .O WDL-TR2184 Subroutine: TIMED

Purpose; To convert an input time from the format DAYS HOURS-MIN SEC to seconds. If the input is negative, it is assumed to be in seconds, and returned positive.

-Calling-Sequence; — _. _ CALL TIMED (Tl. T2) Input and Output

Symbolic Program Mathematical Data I/O Name or Symbol Dimensions Definition Location Dimensions or Units

I Tl 1 -seconds or (DAYS + 102 + HOURS + MIN

x 10~2 + SEC x 10 )

0 T2 1 seconds

J

Common storages used or required: None

Subroutines required: None Functions required: INTF Approximate number of storages required:

S-395 TIMED - 1

IPHILCO. WDL DIVISION TIMED WDL-TR2 " i LJ LABEL TIMD * SYMBOL TAbuE TIMD ~] SUBROUTINE TIMED (T1,T2) TIMDOQOPJ IF(T1)1*1»2 TIMDOOld" 1 CONTINUE TIMD002ES T2==T1 TIMD003| RETURN TIMD004P C SUBROUTINE ACCEPTS Tl IN SEC IF THE SIGN IS INPUT NEGATIVE AND TI*D0050 C GIVES T2 IN * SEC IF Tl IS + AND ARRANGED AS (DAY6 HOURS.MIN SEC) TIMD006 C IT CONVERTS OUTPUT T2 TO bEC TI^D007L 2 CONTINUE TIMD008Q TDH = INTF(11) TIMD 009 FT] TMS = TI-TLIH • TIMDOIOL'J TMlsTMS + luO , + ,01 TI^DOllO"' TMoINTF(TMl) TIMD012D^ TS5(TMS*100,-TM)*100, + ,01 TIMDOI 3 (. TDsINTF(TiJH/100. + o01) TlMD014bi' THaTDH-rn»iOOo + ,01 TIv D 015 0 TH = lNTFfTH) TIMD016Q T S s IN T F ( T b ) TI M D 0 17 U T2sTD*864uOe +TH+360Utf- +TM*60,*TS TIMD0180 RETURN TIMD019f-| END TIMD J 0

"I

i-396

PHILCQ WDL DIVISION. WDL-TR2184

;j Subroutine: TRAC

Purpose; To obtain the vector from a body center to a tracking station and the unit up, east, and north vectors. The coordinate system is a rotating body fixed system. The body may be treated as an oblate spheroid.

r-\

Calling Sequence: CALL TRAC (TO, AT. H, GHA, U. E, EN, RT, AC, SL, CL, ST, CT, A, B)

Input and Output

Symbolic Data Program Mathematical Definition I/O Name or Symbol Dimensions Location Dimensions or Units

I TO 1 RAD Tracker longitude

I AT 1 RAD Tracker latitude

I H 1 Km Tracker Altitude

I GHA 1 RAD Greenwich hour angle

y\ 0 U 3 U Up unit vector

y\ 0 E 3 E East unit vector

^V 0 EN 3 N North unit vector

0 RT 3 Radius vector to tracker (Cont d.) Common storages used or required: None Subroutines required: None

Functions required: SIN, COS, SORT Approximate number of storages required: 194 DEC

S-397 TRAC - 1

i'PHILCQ WDL DIV8S8ON WDL-TR2184

(Cont'd.)

Data Symbolic Mathematical Program Dimensions I/O Name or Symbol Definition Location Dimensions or Units

0 AC 1 Constant used in program

0 SL 1 Sin LAT 0 CL 1 Cos LAT 0 0 ST 1 Sin LONG

0 CT 1 Cos LONG I A 1 RE Km Body's equatorial radius 0 I B 1 > RP Km Body's polar radius

Derivation of Vectors obtained in TRAC

A. Derivation of Unit U, E, and N

The coordinate system of concern is shown in Fig. 1 below. ]

PLANE TRACKER ON CONTAINING 2 AXIS AND OBLATE TRACKER SPHEROID

/COS(LONG)\ 8 AXIS 4siN( LONG)/ h= STATION o ALTITUDE

FIG I

S-398 TRAC - 2 PHILCQ WDL DIVISION j WDL-TR2184

The unit up vector, U, may be written as:

/"cos(LAT) cos(LONG)\ U = ( cos(LAT) sin(LONG) ] V sin(LAT) /

The unit east vector, E, is: -sin(LONG) \ p = k x " <-• 1 *. /v I ( cos(LONG) ) \ n '

-T* The unit north vector, N, is:

'-sin(LAT)cos(LONG) *. A ^ / \ N = U X E = ( -sin(LAT) sin(LONG) ] \ cos(LAT) /

B. Derivation of Radius Vector, RT, to Tracker.

RT = ~R + h U

/cos(LONG)\ / 0 "R = |Rl cos CY ( sin(LONG) ) + | R| sin a ( 0 0 / \ 1

Equation of ellipse in Z-& plane

dZ _ B^ _6 22 d6 ~ " .2 Z B A

A2 Z Substituting for Z, 6 Tan(LAT) = ^ |

2 R cos cy Tan V 2 BR

S-399 TRAC - 3

IPHILCQ DIVISION WDL-TR2184

AB R R Tan or = — Tan(LAT) 2 2 2 (A sin a + B cos" A

R cos or 2 TW2 R sin or = ^ Tan o- +

Substituting for Tan ry yields

R sin or = R cos CY = 1/2 1/2 -^ Tan2(LAT) + l) (l + ^ cot2(LAT))

RT(1) 172 l^r sin (LAT) + cos2(LAT)j A

RT(2) 72 sin2(LAT) + cos2(LAT)

B RT(3) =< -22 2 2 TT72 + h > U(3) B sin (LAT) + A cos (LAT)

3-400 TRAC - 4

PHILCQ WDL DIVISION WDL-TR2184

* LABEL TRAC * SYMBOL TABLE TRAC CEC2009 TRAC SUBROUTINE TRAC < TO, AT,H,GHA,>U, E,EN, RT , AC , SL, CL> ST, CT, A, B ) TRACOOOC DIMENSION RTC3),U(3),E(3),EN<3) TRAC001C C TO AND LAT MUST BE INPUTED IN RAD,H IS ALTITUDE IN KM TRAC002C SLnSINF( AT) TRAC003C CLsCOSF< AT) TRACOQ4{ TAsTO+GHA TRAC005C C GHA IS GREENWICH HOUR ANGLE,U IS'UP,E IS.EAST, TRAC006C C EN IS NORTH UNIT VECTORS TRAC007( ST = SINF(TA) TRAC008C • CT * COSF(TA) TRAC009C C n .SQRTF(CL*CL*B*B*SL + SL/(A*A) ) TRACOlOt ACoA7C<- . TR_AC_011( U(l) - CL*CT TRAC0121 U(2) = CL*S.T TRAC0131 U(3) - SL TRAC0141 RT<1) ' (A/C*H)+U(1) TRAC015I RT(2) = (A/C*H)*U(2) TRAC016I RT(3) = (B+B/(A*C)*H)*U<3) TRAC017I 4 E(l) = -ST TRAC018I .EC2) = CT TRAC019I E(3) = 0, TRAC020I EN(1) = -SL*CT TRAC021I EN(2) = --SL*ST TRAC022I EN(3) s CL TRAC023I | 'RETURN TRAC024I END TRAC

S-401 TRAC - 5

H l:LCQ WDL DIVISION Page Intentionally Left Blank WDL-TR2JL»u

Subroutine: TRANSH

Purpose: To transform the partial matrix from equator and equinox of date to equator and equinox of 1950. The logic key is used to indicate if the last three partials are zero (LL = 1) or if all six partials have values (LL =2).

Calling Sequence: ~ CALL- -TRANSH

Input and Output

Data Symbolic Program Mathematical I/O Name or Dimensions Definition Location Dimensions Symbol or Units d MEAS 10 H (1.6) b STATE Partials of measurements WRT* the state

I LL 1 Logic key

* With Respect To ! \ u)

Common storages used or required: T. S. C. 1C Subroutines required: None

Functions required: None

Approximate number of storages required:.

S-403 TRANSH - 1

JR 1ILCQ WDfL DIViSM TRANSH

LABEL TRAN L SYMBOL TABU TRAN SUBROUTINE TKANSHCH.LL) TRANOO Oil SUBROUTINE TRANSFORMS H MATRIX TO EQUINOX 1950 TRANOOliJ EQUIVALENCE(T,TDUM), , (C(138),AN) TRAN0020 DIMENSION H(6),Al\i(3,3),DUM(l,6),T,S(1000),C(1000),IC(l) TRANOO COMMON T.S.C.IC TRANOO T R A N 0 0 5*0 DO 1 Jal,3 TRANOQ6A K = I + 3 TRANOQ/H DUM(I)=0, T R A N 0 0 8V DUM(K)=0. TRANOQ90 DO 1 Jel.3 T R A N 01 (fl DUM(I)=DUM(I)*AN( J,D*H< J) TRANOU!;j GO TO(1,2)*LU TRAN0120 CONTINUE TRAN013; L = J*3 T R A N 0 1 <(, DUM(K)=DUM(K)+AN(JJI)+H(L) TRAN015"0 CONTINUE T R A N 0 16 DO 3 1=1,6 TRANOll H

S-404 TRANSH -

n PHILCQ WDL DIVISIONd /-unless National AcrouauUics and S Adr.iiiiistration Gotidarci Space Flight Cente Greenbelt, Maryland Attn: Ur. F. 0. Vonbun

Philco Corporation WDL Division Palo Alto, California '0

100

SHILCQ WDL DIVISION