OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
xthird.f
Go to the documentation of this file.
1  SUBROUTINE xthird(T,TR,ES,ET,XS)
2 C VERSION OF 4/1/85
3 C PURPOSE
4 C COMPUTES POSITION OF PERTURBING THIRD BODY
5 C INPUT
6 C T = CURRENT TIME (SEC)
7 C TR = REFERENCE TIME FOR INITIAL SETTING OF THE
8 C GREENWICH HOUR ANGLE, AND THE MEAN ANOMALIES OF
9 C THE ANALYTICAL LUNI-SOLAR EPHEMERIDES (SEC)
10 C ES = 7-D ORBITAL ELEMENT SET OF THIRD BODY
11 C (1) = SEMI-MAJOR AXIS (KM)
12 C (2) = ECCENTRICITY OF THE THIRD BODY
13 C (3) = INCLINATION OF THE THIRD BODY RELATIVE TO THE PLANET (RAD)
14 C (4) = LONGITUDE OF ASCENDING NODE OF THE THIRD BODY (RAD)
15 C (5) = AGRUMENT OF PERIAPSIS OF THE THIRD BODY (RAD)
16 C (6) = MEAN ANOMALY OF THE THIRD BODY AT TR (RAD)
17 C (7) = MEAN MOTION (RAD/SEC)
18 C ET = 8-D ELEMENTS TO TRANFORM ORBITAL ELEMENTS TO CART.
19 C COORD, THIS IS SET UP BY SETTHD ROUTINE
20 C (1) = L1, COS(NODE)*COS(W) - SIN(NODE)*SIN(W)*COS(I)
21 C (2) = M1, SIN(NODE)*COS(W) + COS(NODE)*SIN(W)*COS(I)
22 C (3) = N1, SIN(W)*SIN(I)
23 C (4) = L2, -COS(NODE)*SIN(W) - SIN(NODE)*COS(W)*COS(I)
24 C (5) = M2, -SIN(NODE)*SIN(W) + COS(NODE)*COS(W)*COS(I)
25 C (6) = N2, COS(W)*SIN(I)
26 C (7) = SEMI-MINOR AXIS, A*SQRT(1-E*E)
27 C OUTPUT
28 C XS = 3-D CARTESIAN STATE OF 3RD BODY (KM)
29 C CALLED BY SUBROUTINES
30 C DER
31 C CALL SUBROUTINES
32 C KEPLER
33 C REFERENCES
34 C JPL EM 312/87-153, 20 APRIL 1987
35 C ORBITAL MOTION, A. E. ROY, 1978, P.102
36 C ANALYSIS
37 C J. H. KWOK - JPL
38 C PROGRAMMER
39 C J. H. KWOK - JPL
40 C PROGRAM MODIFICATION
41 C NONE
42 C COMMENTS
43 C NONE
44 C
45  IMPLICIT DOUBLE PRECISION (a-h,o-z)
46  dimension es(7),et(7),xs(3)
47  DATA tpi/6.283185307179586d0/
48  am=dmod(es(6)+es(7)*(t-tr),tpi)
49  CALL kepler(am,es(2),ea,se,ce)
50  DO 10 i=1,3
51  10 xs(i)=es(1)*et(i)*(ce-es(2))+et(7)*et(i+3)*se
52  RETURN
53  END
subroutine kepler(AM, E, EA, SE, CE)
Definition: kepler.f:2
subroutine xthird(T, TR, ES, ET, XS)
Definition: xthird.f:2