moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / kssun.h
blobed5a302335a472c61672b246b537d200a7f5e7e8
1 /***************************************************************************
2 kssun.h - K Desktop Planetarium
3 -------------------
4 begin : Sun Jan 29 2002
5 copyright : (C) 2002 by Mark Hollomon
6 email : mhh@mindspring.com
7 ***************************************************************************/
9 /***************************************************************************
10 * *
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. *
15 * *
16 ***************************************************************************/
18 #ifndef KSSUN_H
19 #define KSSUN_H
21 #include <qstring.h>
22 #include "ksplanet.h"
24 /**@class KSSun
25 *Child class of KSPlanetBase; encapsulates information about the Sun.
26 *@short Provides necessary information about the Sun.
27 *@author Mark Hollomon
28 *@version 1.0
31 class KStarsData;
33 class KSSun : public KSPlanet {
34 public:
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 );
43 /**Destructor (empty)
45 virtual ~KSSun() {}
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);
66 protected:
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);
75 #endif