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 ***************************************************************************/
8
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 ***************************************************************************/
17
18#ifndef KSSUN_H_
19#define KSSUN_H_
20
21#include <QString>
22#include "ksplanet.h"
23
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
29 */
30
31class KSSun : public KSPlanet {
32public:
33 /**Constructor. Defines constants needed by findPosition().
34 *Sets Ecliptic coordinates appropriate for J2000.
35 *@param kd pointer to KStarsData object
36 */
37 KSSun();
38
39 virtual KSSun* clone() const;
40 virtual SkyObject::UID getUID() const;
41
42 /**Destructor (empty)
43 */
44 virtual ~KSSun() {}
45
46 /**Read orbital data from disk
47 *@note reimplemented from KSPlanet
48 *@note we actually read Earth's orbital data. The Sun's geocentric
49 *ecliptic coordinates are by definition exactly the opposite of the
50 *Earth's heliocentric ecliptic coordinates.
51 */
52 virtual bool loadData();
53
54
55protected:
56 /**Determine geocentric RA, Dec coordinates for the Epoch given in the argument.
57 *@p Epoch current Julian Date
58 *@p Earth pointer to earth object
59 */
60 virtual bool findGeocentricPosition( const KSNumbers *num, const KSPlanetBase *Earth=NULL );
61private:
62 virtual void findMagnitude(const KSNumbers*);
63};
64long double equinox(int year, int d, int m, int angle);
65
66#endif
67