File indexing completed on 2024-03-24 15:17:53
0001 /* 0002 SPDX-FileCopyrightText: 2002 Mark Hollomon <mhh@mindspring.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "ksplanet.h" 0010 0011 #include <QString> 0012 0013 /** 0014 * @class KSSun 0015 * 0016 * Child class of KSPlanetBase; encapsulates information about the Sun. 0017 * 0018 * @short Provides necessary information about the Sun. 0019 * 0020 * @author Mark Hollomon 0021 * @version 1.0 0022 */ 0023 class KSSun : public KSPlanet 0024 { 0025 public: 0026 /** 0027 * Constructor. 0028 * 0029 * Defines constants needed by findPosition(). Sets Ecliptic coordinates appropriate for J2000. 0030 */ 0031 KSSun(); 0032 0033 KSSun *clone() const override; 0034 SkyObject::UID getUID() const override; 0035 0036 virtual ~KSSun() override = default; 0037 0038 /** 0039 * Read orbital data from disk 0040 * 0041 * @note reimplemented from KSPlanet 0042 * @note we actually read Earth's orbital data. The Sun's geocentric 0043 * ecliptic coordinates are by definition exactly the opposite of the 0044 * Earth's heliocentric ecliptic coordinates. 0045 */ 0046 bool loadData() override; 0047 0048 protected: 0049 /** 0050 * Determine geocentric RA, Dec coordinates for the Epoch given in the argument. 0051 * 0052 * @p Epoch current Julian Date 0053 * @p Earth pointer to earth object 0054 */ 0055 bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *Earth = nullptr) override; 0056 0057 private: 0058 void findMagnitude(const KSNumbers *) override; 0059 }; 0060 0061 long double equinox(int year, int d, int m, int angle);