moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / ksasteroid.h
blob85e6abcf92d1fdd7cc2b20f215ea37585604e766
1 /***************************************************************************
2 ksasteroid.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 KSASTEROID_H
19 #define KSASTEROID_H
21 #include "ksplanetbase.h"
23 /**@class KSAsteroid
24 *@short A subclass of KSPlanetBase that implements asteroids.
26 *The orbital elements are stored as private member variables, and it
27 *provides methods to compute the ecliptic coordinates for any time
28 *from the orbital elements.
30 *The orbital elements are:
31 *@li JD Epoch of element values
32 *@li a semi-major axis length (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 M mean anomaly at epoch JD
38 *@li H absolute magnitude
40 *@author Jason Harris
41 *@version 1.0
44 class KStarsData;
45 class KSNumbers;
46 class dms;
48 class KSAsteroid : public KSPlanetBase
50 public:
51 /**Constructor.
52 *@p kd pointer to the KStarsData object
53 *@p s the name of the asteroid
54 *@p image_file the filename for an image of the asteroid
55 *@p JD the Julian Day for the orbital elements
56 *@p a the semi-major axis of the asteroid's orbit (AU)
57 *@p e the eccentricity of the asteroid's orbit
58 *@p i the inclination angle of the asteroid's orbit
59 *@p w the argument of the orbit's perihelion
60 *@p N the longitude of the orbit's ascending node
61 *@p M the mean anomaly for the Julian Day
62 *@p H absolute magnitude
64 KSAsteroid( KStarsData *kd, QString s, QString image_file,
65 long double JD, double a, double e, dms i, dms w, dms N, dms M, double H );
67 /**Destructor (empty)*/
68 virtual ~KSAsteroid() {}
70 /**This is inherited from KSPlanetBase. We don't use it in this class,
71 *so it is empty.
73 virtual bool loadData();
75 protected:
76 /**Calculate the geocentric RA, Dec coordinates of the Asteroid.
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;
87 double a, e, H, P;
88 dms i, w, M, N;
91 #endif