OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
obliq.c
Go to the documentation of this file.
1 /*
2  *----------------------------------------------------------------------
3  * @(#) obliq.c 1.0 20 Oct 93 <shc>
4  * Copyright (c) 1993, CSIRO Division of Oceanography
5  *----------------------------------------------------------------------
6  *
7  * obliq --
8  *
9  * Calculate mean obliquity of date.
10  *
11  * Results:
12  *
13  * Given a modified Julian dynamical time TJD, this function
14  * returns the mean obliquity of date of the ecliptic and its
15  * time derivative in radians per second. Each value pointer
16  * can be NULL if the particular value is not required.
17  *
18  * Side effects:
19  * None.
20  *
21  * References:
22  * "Astronomical Algorithms", Jean Meeus, Willmann-Bell Inc, 1991,
23  * Chapter 45.
24  *
25  * History:
26  * 1.0 20 Oct 93 <shc>
27  * Initial version.
28  *
29  *----------------------------------------------------------------------
30  */
31 
32 #include "orbit.h"
33 
34 void
35 obliq(tjd, mood, dmood)
36 double tjd;
37 double *mood, *dmood;
38 {
39  double t, a0, a1;
40 
41  /* Julian centuries from 2000 Jan 1.5 TDB */
42  t = (tjd - J2000) / 36525.0;
43 
44  if (mood != (double *) NULL) {
45  a0 = ((1.813e-3 * t - 5.9e-4) * t - 46.8150) * t + 84381.4119;
46  *mood = DTOR(a0 / 3600.0);
47  }
48 
49  if (dmood != (double *) NULL) {
50  a1 = (3 * 1.813e-3 * t - 2 * 5.9e-4) * t - 46.8150;
51  *dmood = DTOR(a1 / 3600.0) / 36525.0;
52  }
53 
54  return;
55 }
data_t t[NROOTS+1]
Definition: decode_rs.h:77
#define NULL
Definition: decode_rs.h:63
#define DTOR(X)
Definition: orbit.h:51
void obliq(double tjd, double *mood, double *dmood)
Definition: obliq.c:35
#define J2000
Definition: orbit.h:72