1 /***************************************************************************
2 kssun.h - K Desktop Planetarium
4 begin : Sun Jan 29 2002
5 copyright : (C) 2002 by Mark Hollomon
6 email : mhh@mindspring.com
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
25 *Child class of KSPlanetBase; encapsulates information about the Sun.
26 *@short Provides necessary information about the Sun.
27 *@author Mark Hollomon
33 class KSSun
: public KSPlanet
{
35 /**Constructor. Defines constants needed by findPosition().
36 *Sets Ecliptic coordinates appropriate for J2000.
37 *@param kd pointer to KStarsData object
38 *@param fn filename of Sun image
39 *@param pSize physical diameter of the Sun, in km
41 KSSun(KStarsData
*kd
, QString fn
= "", double pSize
=0 );
47 /**Read orbital data from disk
48 *@note reimplemented from KSPlanet
49 *@note we actually read Earth's orbital data. The Sun's geocentric
50 *ecliptic coordinates are by definition exactly the opposite of the
51 *Earth's heliocentric ecliptic coordinates.
53 virtual bool loadData();
55 long double springEquinox(int year
);
57 long double summerSolstice(int year
);
59 long double autumnEquinox(int year
);
61 long double winterSolstice(int year
);
63 long double equinox(int year
, int d
, int m
, double angle
);
67 /**Determine geocentric RA, Dec coordinates for the Epoch given in the argument.
68 *@p Epoch current Julian Date
69 *@p Earth pointer to earth object
71 virtual bool findGeocentricPosition( const KSNumbers
*num
, const KSPlanetBase
*Earth
=NULL
);
73 long double equinox(int year
, int d
, int m
, int angle
);