1 /***************************************************************************
2 ksnumbers.h - description
4 begin : Sun Jan 13 2002
5 copyright : (C) 2002-2005 by Jason Harris
6 email : kstars@30doradus.org
7 copyright : (C) 2004-2005 by Pablo de Vicente
8 email : p.devicente@wanadoo.es
9 ***************************************************************************/
11 /***************************************************************************
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
18 ***************************************************************************/
29 *There are several time-dependent values used in position calculations,
30 *that are not specific to an object. This class provides
31 *storage for these values, and methods for calculating them for a given date.
32 *The numbers include solar data like the true/mean solar anomalies
33 *and longitudes, the longitude of the Earth's perihelion, the
34 *eccentricity of Earth's orbit, the
35 *constant of aberration, the obliquity of the Ecliptic, the effects of
36 *Nutation (delta Obliquity and delta Ecliptic longitude),
37 *the Julian Day/Century/Millenium, and arrays for computing the precession.
38 *@short Store several time-dependent astronomical quantities.
46 KSNumbers( long double jd
);
47 /**Destructor (empty). */
50 /**@return the current Obliquity (the angle of inclination between
51 *the celestial equator and the ecliptic)
53 const dms
* obliquity() const { return &Obliquity
; }
55 /**@return the constant of aberration (20.49 arcsec). */
56 dms
constAberr() const { return K
; }
58 /**@return the mean solar anomaly. */
59 dms
sunMeanAnomaly() const { return M
; }
61 /**@return the mean solar longitude. */
62 dms
sunMeanLongitude() const { return L
; }
64 /**@return the true solar anomaly. */
65 dms
sunTrueAnomaly() const { return M0
; }
67 /**@return the true solar longitude. */
68 dms
sunTrueLongitude() const { return L0
; }
70 /**@return the longitude of the Earth's perihelion point. */
71 dms
earthPerihelionLongitude() const { return P
; }
73 /**@return eccentricity of Earth's orbit.*/
74 double earthEccentricity() const { return e
; }
76 /**@return the change in obliquity due to the nutation of
77 * Earth's orbit. Value is in degrees */
78 double dObliq() const { return deltaObliquity
; }
80 /**@return the change in Ecliptic Longitude due to nutation.
81 * Value is in degrees. */
82 double dEcLong() const { return deltaEcLong
; }
84 /**@return Julian centuries since J2000*/
85 double julianCenturies() const { return T
; }
87 /**@return Julian Day*/
88 long double julianDay() const { return days
; }
90 /**@return Julian Millenia since J2000*/
91 double julianMillenia() const { return jm
; }
93 /**@return element of P1 precession array at position [i1][i2] */
94 double p1( int i1
, int i2
) const { return P1
[i1
][i2
]; }
96 /**@return element of P2 precession array at position [i1][i2] */
97 double p2( int i1
, int i2
) const { return P2
[i1
][i2
]; }
99 /**@return element of P1B precession array at position [i1][i2] */
100 double p1b( int i1
, int i2
) const { return P1B
[i1
][i2
]; }
102 /**@return element of P2B precession array at position [i1][i2] */
103 double p2b( int i1
, int i2
) const { return P2B
[i1
][i2
]; }
105 /**@short update all values for the date given as an argument.
106 *@param jd the Julian date for which to compute values
108 void updateValues( long double jd
);
110 double vEarth(int i
) const {return vearth
[i
];}
113 dms Obliquity
, K
, L
, L0
, LM
, M
, M0
, O
, P
, D
, MM
, F
;
114 dms XP
, YP
, ZP
, XB
, YB
, ZB
;
115 double CX
, SX
, CY
, SY
, CZ
, SZ
;
116 double CXB
, SXB
, CYB
, SYB
, CZB
, SZB
;
117 double P1
[3][3], P2
[3][3], P1B
[3][3], P2B
[3][3];
118 double deltaObliquity
, deltaEcLong
;
122 static const int arguments
[NUTTERMS
][5];
123 static const int amp
[NUTTERMS
][4];