OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
anomly.f
Go to the documentation of this file.
1  SUBROUTINE anomly(NFLG,AIN,E,AOUT)
2 C VERSION 6/30/86
3 C PURPOSE
4 C TO CONVERT AMONG MEAN, ECCENTRIC AND TRUE ANOMALY
5 C INPUT ARGUMENTS
6 C NFLG = 1, MEAN TO ECCENTRIC
7 C 2, MEAN TO TRUE
8 C 3, ECCENTRIC TO MEAN
9 C 4, ECCENTRIC TO TRUE
10 C 5, TRUE TO MEAN
11 C 6, TRUE TO ECCENTRIC
12 C AIN = INPUT ANGLE (RAD)
13 C E = ECCENTRICITY
14 C OUTPUT ARGUMENT
15 C AOUT = OUTPUT ANGLE (RAD)
16 C CALL SUBROUTINES
17 C KEPLER
18 C REFERENCE
19 C JPL EM 312/87-153, 20 APRIL 1987
20 C ANALYSIS
21 C JOHNNY H. KWOK
22 C PROGRAMMER
23 C JOHNNY H. KWOK
24 C MODIFICATIONS
25 C NONE
26 C COMMENTS
27 C NONE
28 C
29  IMPLICIT DOUBLE PRECISION (a-h,o-z)
30  DATA one,two/1.d0,2.d0/
31  GO TO (11,11,12,12,13,13) nflg
32  11 am=ain
33  GO TO 14
34  12 ea=ain
35  GO TO 14
36  13 f=ain
37  14 CONTINUE
38  IF (nflg.EQ.1.OR.nflg.EQ.2) CALL kepler(am,e,ea,se,ce)
39  IF (nflg.EQ.1) GO TO 900
40  IF (nflg.EQ.2.OR.nflg.EQ.4) THEN
41  f=two*datan(dsqrt((one+e)/(one-e))*dtan(ea/two))
42  GO TO 900
43  ENDIF
44  IF (nflg.EQ.5.OR.nflg.EQ.6)
45  1 ea=two*datan(dsqrt((one-e)/(one+e))*dtan(f/two))
46  IF (nflg.EQ.6) GO TO 900
47  IF (nflg.EQ.5.OR.nflg.EQ.3) THEN
48  am=ea-e*dsin(ea)
49  GO TO 900
50  ENDIF
51  900 CONTINUE
52  GO TO (21,22,23,22,23,21) nflg
53  21 aout=ea
54  GO TO 24
55  22 aout=f
56  GO TO 24
57  23 aout=am
58  24 CONTINUE
59  RETURN
60  END
subroutine anomly(NFLG, AIN, E, AOUT)
Definition: anomly.f:2
subroutine kepler(AM, E, EA, SE, CE)
Definition: kepler.f:2
#define f
Definition: l1_czcs_hdf.c:702