OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
setthd.f
Go to the documentation of this file.
1  SUBROUTINE setthd(X,Y)
2 C VERSION OF 1/27/85
3 C PURPOSE
4 C COMPUTES ROTATION MATRIX FOR CONVERSION FROM ORBITAL
5 C ELEMENTS TO CARTESIAN COORDINATES
6 C INPUT
7 C X = 7-D ORBITAL ELEMENT SET OF THIRD BODY
8 C (1) = SEMI-MAJOR AXIS (KM)
9 C (2) = ECCENTRICITY
10 C (3) = INCLINATION (RAD)
11 C (4) = LONGGITUDE OF ASCENDING NODE (RAD)
12 C (5) = ARGUMENT OF PERIAPSIS (RAD)
13 C (6) = MEAN ANOMALY OF THE THIRD BODY AT TR (RAD)
14 C (7) = MEAN MOTION (RAD/SEC)
15 C Y = 7-D ELEMENTS TO TRANFORM ORBITAL ELEMENTS TO CART.
16 C COORD
17 C (1) = L1, COS(NODE)*COS(W) - SIN(NODE)*SIN(W)*COS(I)
18 C (2) = M1, SIN(NODE)*COS(W) + COS(NODE)*SIN(W)*COS(I)
19 C (3) = N1, SIN(W)*SIN(I)
20 C (4) = L2, -COS(NODE)*SIN(W) - SIN(NODE)*COS(W)*COS(I)
21 C (5) = M2, -SIN(NODE)*SIN(W) + COS(NODE)*COS(W)*COS(I)
22 C (6) = N2, COS(W)*SIN(I)
23 C (7) = SEMI-MINOR AXIS, A*SQRT(1-E*E)
24 C REFENENCES
25 C JPL EM 312/87-153, 20 APRIL 1987
26 C ORBITAL MOTION, A. E. ROY, 1978, P.102
27 C ANALYSIS
28 C J. H. KWOK - JPL
29 C PROGRAMMER
30 C J. H. KWOK - JPL
31 C PROGRAM MODIFICATION
32 C NONE
33 C COMMENTS
34 C NONE
35 C
36  IMPLICIT DOUBLE PRECISION (a-h,o-z)
37  dimension x(7),y(7)
38  ci=dcos(x(3))
39  si=dsin(x(3))
40  cc=dcos(x(4))
41  sc=dsin(x(4))
42  cw=dcos(x(5))
43  sw=dsin(x(5))
44  y(1)=cc*cw-sc*sw*ci
45  y(2)=sc*cw+cc*sw*ci
46  y(3)=sw*si
47  y(4)=-cc*sw-sc*cw*ci
48  y(5)=-sc*sw+cc*cw*ci
49  y(6)=cw*si
50  y(7)=dsqrt(1.d0-x(2)**2)*x(1)
51  RETURN
52  END
subroutine setthd(X, Y)
Definition: setthd.f:2