Kstars

kssun.h
1/*
2 SPDX-FileCopyrightText: 2002 Mark Hollomon <mhh@mindspring.com>
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 */
23class 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 double nightFraction();
49
50 protected:
51 /**
52 * Determine geocentric RA, Dec coordinates for the Epoch given in the argument.
53 *
54 * @p Epoch current Julian Date
55 * @p Earth pointer to earth object
56 */
57 bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *Earth = nullptr) override;
58
59 private:
60 void findMagnitude(const KSNumbers *) override;
61};
62
63long double equinox(int year, int d, int m, int angle);
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition ksnumbers.h:43
A subclass of TrailObject that provides additional information needed for most solar system objects.
A subclass of KSPlanetBase for seven of the major planets in the solar system (Earth and Pluto have t...
Definition ksplanet.h:33
Child class of KSPlanetBase; encapsulates information about the Sun.
Definition kssun.h:24
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
bool loadData() override
Read orbital data from disk.
Definition kssun.cpp:28
KSSun * clone() const override
Create copy of object.
Definition kssun.cpp:22
SkyObject::UID getUID() const override
Return UID for object.
Definition kssun.cpp:168
qint64 UID
Type for Unique object IDenticator.
Definition skyobject.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:11:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.