1 /*
2  SPDX-FileCopyrightText: 2001 Jason Harris <[email protected]>
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
7 #ifndef KSPLUTO_H_
8 #define KSPLUTO_H_
10 #include "ksasteroid.h"
12 /** @class KSPluto
13  *A subclass of KSAsteroid that represents the planet Pluto. Now, we
14  *are certainly NOT claiming that Pluto is an asteroid. However, the
15  *findPosition() routines of KSPlanet do not work properly for Pluto.
16  *We had been using a unique polynomial expansion for Pluto, but even
17  *this fails spectacularly for dates much more remote than a few
18  *hundred years. We consider it better to instead treat Pluto's
19  *orbit much more simply, using elliptical orbital elements as we do
20  *for asteroids. In order to improve the long-term accuracy of Pluto's
21  *position, we are also including linear approximations of the evolution
22  *of each orbital element with time.
23  *
24  *The orbital element data (including the time-derivatives) come from
25  *the NASA/JPL website: https://ssd.jpl.nasa.gov/?planets#elem
26  *
27  *@short Provides necessary information about Pluto.
28  *@author Jason Harris
29  *@version 1.0
30  */
32 class KSPluto : public KSAsteroid
33 {
34  public:
35  /** Constructor. Calls KSAsteroid constructor with name="Pluto", and fills
36  *in orbital element data (which is hard-coded for now).
37  *@param fn filename of Pluto's image
38  *@param pSize physical diameter of Pluto, in km
39  */
40  explicit KSPluto(const QString &fn = QString(), double pSize = 0);
42  KSPluto *clone() const override;
44  /**Destructor (empty) */
45  ~KSPluto() override;
47  protected:
48  /** A custom findPosition() function for Pluto. Computes the values of the
49  *orbital elements on the requested date, and calls KSAsteroid::findGeocentricPosition()
50  *using those elements.
51  *@param num time-dependent values for the desired date
52  *@param Earth planet Earth (needed to calculate geocentric coords)
53  *@return true if position was successfully calculated.
54  */
55  bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *Earth = nullptr) override;
57  private:
58  void findMagnitude(const KSNumbers *) override;
60  //The base orbital elements for J2000 (these don't change with time)
61  double a0, e0;
62  dms i0, w0, M0, N0;
64  //Rates-of-change for each orbital element
65  double a1, e1, i1, w1, M1, N1;
66 };
68 #endif
Provides necessary information about Pluto.
Definition: kspluto.h:32
A subclass of KSPlanetBase that implements asteroids.
Definition: ksasteroid.h:41
KSPluto * clone() const override
Create copy of object.
Definition: kspluto.cpp:48
KSPluto(const QString &fn=QString(), double pSize=0)
Definition: kspluto.cpp:25
Store several time-dependent astronomical quantities.
Definition: ksnumbers.h:42
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:37
~KSPluto() override
Destructor (empty)
Definition: kspluto.cpp:54
bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *Earth=nullptr) override
A custom findPosition() function for Pluto.
Definition: kspluto.cpp:60
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.