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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
/***************************************************************************
kscomet.h - K Desktop Planetarium
-------------------
begin : Wed 19 Feb 2003
copyright : (C) 2001 by Jason Harris
email : jharris@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 KSCOMET_H
#define KSCOMET_H
#include "ksplanetbase.h"
/**@class KSComet
*@short A subclass of KSPlanetBase that implements comets.
*
*The orbital elements are stored as private member variables, and
*it provides methods to compute the ecliptic coordinates for any
*time from the orbital elements.
*
*The orbital elements are:
*@li JD Epoch of element values
*@li q perihelion distance (AU)
*@li e eccentricity of orbit
*@li i inclination angle (with respect to J2000.0 ecliptic plane)
*@li w argument of perihelion (w.r.t. J2000.0 ecliptic plane)
*@li N longitude of ascending node (J2000.0 ecliptic)
*@li Tp time of perihelion passage (YYYYMMDD.DDD)
*
*@author Jason Harris
*@version 1.0
*/
class KStarsData;
class KSNumbers;
class dms;
class KSComet : public KSPlanetBase
{
public:
/**Constructor.
*@p kd pointer to the KStarsData object
*@p s the name of the comet
*@p image_file the filename for an image of the comet
*@p JD the Julian Day for the orbital elements
*@p q the perihelion distance of the comet's orbit (AU)
*@p e the eccentricity of the comet's orbit
*@p i the inclination angle of the comet's orbit
*@p w the argument of the orbit's perihelion
*@p N the longitude of the orbit's ascending node
*@p M the mean anomaly for the Julian Day
*@p Tp The date of the most proximate perihelion passage (YYYYMMDD.DDD)
*/
KSComet( KStarsData *kd, QString s, QString image_file,
long double JD, double q, double e, dms i, dms w, dms N, double Tp );
/**Destructor (empty)*/
virtual ~KSComet() {}
/**Unused virtual function inherited from KSPlanetBase,
*so it's simply empty here.
*/
virtual bool loadData();
protected:
/**Calculate the geocentric RA, Dec coordinates of the Comet.
*@note reimplemented from KSPlanetBase
*@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:
KStarsData *kd;
long double JD, JDp;
double q, e, a, P;
dms i, w, N;
};
#endif
|