Kstars

kssun.h
1 /*
2  SPDX-FileCopyrightText: 2002 Mark Hollomon <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "ksplanet.h"
10 
11 #include <QString>
12 
13 /**
14  * @class KSSun
15  *
16  * Child class of KSPlanetBase; encapsulates information about the Sun.
17  *
18  * @short Provides necessary information about the Sun.
19  *
20  * @author Mark Hollomon
21  * @version 1.0
22  */
23 class KSSun : public KSPlanet
24 {
25  public:
26  /**
27  * Constructor.
28  *
29  * Defines constants needed by findPosition(). Sets Ecliptic coordinates appropriate for J2000.
30  */
31  KSSun();
32 
33  KSSun *clone() const override;
34  SkyObject::UID getUID() const override;
35 
36  virtual ~KSSun() override = default;
37 
38  /**
39  * Read orbital data from disk
40  *
41  * @note reimplemented from KSPlanet
42  * @note we actually read Earth's orbital data. The Sun's geocentric
43  * ecliptic coordinates are by definition exactly the opposite of the
44  * Earth's heliocentric ecliptic coordinates.
45  */
46  bool loadData() override;
47 
48  protected:
49  /**
50  * Determine geocentric RA, Dec coordinates for the Epoch given in the argument.
51  *
52  * @p Epoch current Julian Date
53  * @p Earth pointer to earth object
54  */
55  bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *Earth = nullptr) override;
56 
57  private:
58  void findMagnitude(const KSNumbers *) override;
59 };
60 
61 long double equinox(int year, int d, int m, int angle);
bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *Earth=nullptr) override
Determine geocentric RA, Dec coordinates for the Epoch given in the argument.
Definition: kssun.cpp:39
KSSun()
Constructor.
Definition: kssun.cpp:17
KSSun * clone() const override
Create copy of object.
Definition: kssun.cpp:22
qint64 UID
Type for Unique object IDenticator.
Definition: skyobject.h:49
Provides necessary information about the Sun.
Definition: kssun.h:23
Store several time-dependent astronomical quantities.
Definition: ksnumbers.h:42
SkyObject::UID getUID() const override
Return UID for object.
Definition: kssun.cpp:152
Provides necessary information about objects in the solar system.
Definition: ksplanet.h:32
bool loadData() override
Read orbital data from disk.
Definition: kssun.cpp:28
Provides necessary information about objects in the solar system.
Definition: ksplanetbase.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 9 2022 04:06:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.