source: Sophya/trunk/SophyaExt/XephemAstroLib/obliq.c@ 1895

Last change on this file since 1895 was 1719, checked in by cmv, 24 years ago

Adapted to version 3.5 xephem cmv 22/10/2001

File size: 774 bytes
Line 
1#include <stdio.h>
2
3#include "P_.h"
4#include "astro.h"
5
6/* given the modified Julian date, mjd, find the mean obliquity of the
7 * ecliptic, *eps, in radians.
8 *
9 * IAU expression (see e.g. Astron. Almanac 1984); stern
10 */
11void
12obliquity (mjd, eps)
13double mjd;
14double *eps;
15{
16 static double lastmjd = -16347, lasteps;
17
18 if (mjd != lastmjd) {
19 double t = (mjd - J2000)/36525.; /* centuries from J2000 */
20 lasteps = degrad(23.4392911 + /* 23^ 26' 21".448 */
21 t * (-46.8150 +
22 t * ( -0.00059 +
23 t * ( 0.001813 )))/3600.0);
24 lastmjd = mjd;
25 }
26 *eps = lasteps;
27}
28
29/* For RCS Only -- Do Not Edit */
30static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: obliq.c,v $ $Date: 2001-10-22 12:08:27 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Note: See TracBrowser for help on using the repository browser.