Kstars

kspluto.h
1/*
2 SPDX-FileCopyrightText: 2001 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#ifndef KSPLUTO_H_
8#define KSPLUTO_H_
9
10#include "ksasteroid.h"
11
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 */
31
32class 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);
41
42 KSPluto *clone() const override;
43
44 /**Destructor (empty) */
45 ~KSPluto() override;
46
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;
56
57 private:
58 void findMagnitude(const KSNumbers *) override;
59
60 //The base orbital elements for J2000 (these don't change with time)
61 double a0, e0;
62 dms i0, w0, M0, N0;
63
64 //Rates-of-change for each orbital element
65 double a1, e1, i1, w1, M1, N1;
66};
67
68#endif
A subclass of KSPlanetBase that implements asteroids.
Definition ksasteroid.h:42
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 KSAsteroid that represents the planet Pluto.
Definition kspluto.h:33
KSPluto(const QString &fn=QString(), double pSize=0)
Constructor.
Definition kspluto.cpp:25
bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *Earth=nullptr) override
A custom findPosition() function for Pluto.
Definition kspluto.cpp:60
~KSPluto() override
Destructor (empty)
Definition kspluto.cpp:54
KSPluto * clone() const override
Create copy of object.
Definition kspluto.cpp:48
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.