File indexing completed on 2024-05-05 12:01:03
0001 /* 0002 SPDX-FileCopyrightText: 2001 Jason Harris <kstars@30doradus.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KSPLUTO_H_ 0008 #define KSPLUTO_H_ 0009 0010 #include "ksasteroid.h" 0011 0012 /** @class KSPluto 0013 *A subclass of KSAsteroid that represents the planet Pluto. Now, we 0014 *are certainly NOT claiming that Pluto is an asteroid. However, the 0015 *findPosition() routines of KSPlanet do not work properly for Pluto. 0016 *We had been using a unique polynomial expansion for Pluto, but even 0017 *this fails spectacularly for dates much more remote than a few 0018 *hundred years. We consider it better to instead treat Pluto's 0019 *orbit much more simply, using elliptical orbital elements as we do 0020 *for asteroids. In order to improve the long-term accuracy of Pluto's 0021 *position, we are also including linear approximations of the evolution 0022 *of each orbital element with time. 0023 * 0024 *The orbital element data (including the time-derivatives) come from 0025 *the NASA/JPL website: https://ssd.jpl.nasa.gov/?planets#elem 0026 * 0027 *@short Provides necessary information about Pluto. 0028 *@author Jason Harris 0029 *@version 1.0 0030 */ 0031 0032 class KSPluto : public KSAsteroid 0033 { 0034 public: 0035 /** Constructor. Calls KSAsteroid constructor with name="Pluto", and fills 0036 *in orbital element data (which is hard-coded for now). 0037 *@param fn filename of Pluto's image 0038 *@param pSize physical diameter of Pluto, in km 0039 */ 0040 explicit KSPluto(const QString &fn = QString(), double pSize = 0); 0041 0042 KSPluto *clone() const override; 0043 0044 /**Destructor (empty) */ 0045 ~KSPluto() override; 0046 0047 protected: 0048 /** A custom findPosition() function for Pluto. Computes the values of the 0049 *orbital elements on the requested date, and calls KSAsteroid::findGeocentricPosition() 0050 *using those elements. 0051 *@param num time-dependent values for the desired date 0052 *@param Earth planet Earth (needed to calculate geocentric coords) 0053 *@return true if position was successfully calculated. 0054 */ 0055 bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *Earth = nullptr) override; 0056 0057 private: 0058 void findMagnitude(const KSNumbers *) override; 0059 0060 //The base orbital elements for J2000 (these don't change with time) 0061 double a0, e0; 0062 dms i0, w0, M0, N0; 0063 0064 //Rates-of-change for each orbital element 0065 double a1, e1, i1, w1, M1, N1; 0066 }; 0067 0068 #endif