summaryrefslogtreecommitdiffstats
path: root/kstars/kstars/kspluto.h
blob: b30b5a541eaadef8a7b7b5e12cecbd409b0e46d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/***************************************************************************
                          kspluto.h  -  K Desktop Planetarium
                             -------------------
    begin                : Mon Sep 24 2001
    copyright            : (C) 2001 by Jason Harris
    email                : kstars@30doradus.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KSPLUTO_H
#define KSPLUTO_H

#include "ksasteroid.h"

/**@class KSPluto
	*A subclass of KSAsteroid that represents the planet Pluto.  Now, we 
	*are certainly NOT claiming that Pluto is an asteroid.  However, the 
	*findPosition() routines of KSPlanet do not work properly for Pluto.
	*We had been using a unique polynomial expansion for Pluto, but even
	*this fails spectacularly for dates much more remote than a few 
	*hundred years.  We consider it better to instead treat Pluto's 
	*orbit much more simply, using elliptical orbital elements as we do 
	*for asteroids.  In order to improve the long-term accuracy of Pluto's
	*position, we are also including linear approximations of the evolution
	*of each orbital element with time.
	*
	*The orbital element data (including the time-derivatives) come from 
	*the NASA/JPL website:  http://ssd.jpl.nasa.gov/elem_planets.html
	*
	*@short Provides necessary information about Pluto.
	*@author Jason Harris
	*@version 1.0
	*/

class KStarsData;
class KSPluto : public KSAsteroid  {
public:
/**Constructor.  Calls KSAsteroid constructor with name="Pluto", and fills
	*in orbital element data (which is hard-coded for now).
	*@p kd pointer to the KStarsData object
	*@p fn filename of Pluto's image
	*@p pSize physical diameter of Pluto, in km
	*/
	KSPluto(KStarsData *kd, TQString fn="", double pSize=0);

/**Destructor (empty) */
	virtual ~KSPluto();

protected:
/**A custom findPosition() function for Pluto.  Computes the values of the 
	*orbital elements on the requested date, and calls KSAsteroid::findGeocentricPosition()
	*using those elements.
	*@param num time-dependent values for the desired date
	*@param Earth planet Earth (needed to calculate geocentric coords)
	*@return true if position was successfully calculated.
	*/
	virtual bool findGeocentricPosition( const KSNumbers *num, const KSPlanetBase *Earth=NULL );

private:
	//The base orbital elements for J2000 (these don't change with time)
	double a0, e0;
	dms i0, w0, M0, N0;

	//Rates-of-change for each orbital element
	double a1, e1, i1, w1, M1, N1;
};

#endif