moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / kscomet.h
blob62a26458b38b7b641438e1746927f2a0db32519b
1 /***************************************************************************
2 kscomet.h - K Desktop Planetarium
3 -------------------
4 begin : Wed 19 Feb 2003
5 copyright : (C) 2001 by Jason Harris
6 email : jharris@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef KSCOMET_H
19 #define KSCOMET_H
21 #include "ksplanetbase.h"
23 /**@class KSComet
24 *@short A subclass of KSPlanetBase that implements comets.
26 *The orbital elements are stored as private member variables, and
27 *it provides methods to compute the ecliptic coordinates for any
28 *time from the orbital elements.
30 *The orbital elements are:
31 *@li JD Epoch of element values
32 *@li q perihelion distance (AU)
33 *@li e eccentricity of orbit
34 *@li i inclination angle (with respect to J2000.0 ecliptic plane)
35 *@li w argument of perihelion (w.r.t. J2000.0 ecliptic plane)
36 *@li N longitude of ascending node (J2000.0 ecliptic)
37 *@li Tp time of perihelion passage (YYYYMMDD.DDD)
39 *@author Jason Harris
40 *@version 1.0
43 class KStarsData;
44 class KSNumbers;
45 class dms;
47 class KSComet : public KSPlanetBase
49 public:
50 /**Constructor.
51 *@p kd pointer to the KStarsData object
52 *@p s the name of the comet
53 *@p image_file the filename for an image of the comet
54 *@p JD the Julian Day for the orbital elements
55 *@p q the perihelion distance of the comet's orbit (AU)
56 *@p e the eccentricity of the comet's orbit
57 *@p i the inclination angle of the comet's orbit
58 *@p w the argument of the orbit's perihelion
59 *@p N the longitude of the orbit's ascending node
60 *@p M the mean anomaly for the Julian Day
61 *@p Tp The date of the most proximate perihelion passage (YYYYMMDD.DDD)
63 KSComet( KStarsData *kd, QString s, QString image_file,
64 long double JD, double q, double e, dms i, dms w, dms N, double Tp );
66 /**Destructor (empty)*/
67 virtual ~KSComet() {}
69 /**Unused virtual function inherited from KSPlanetBase,
70 *so it's simply empty here.
72 virtual bool loadData();
75 protected:
76 /**Calculate the geocentric RA, Dec coordinates of the Comet.
77 *@note reimplemented from KSPlanetBase
78 *@param num time-dependent values for the desired date
79 *@param Earth planet Earth (needed to calculate geocentric coords)
80 *@return true if position was successfully calculated.
82 virtual bool findGeocentricPosition( const KSNumbers *num, const KSPlanetBase *Earth=NULL );
84 private:
85 KStarsData *kd;
86 long double JD, JDp;
87 double q, e, a, P;
88 dms i, w, N;
92 #endif