1 /***************************************************************************
2 ksasteroid.h - K Desktop Planetarium
4 begin : Wed 19 Feb 2003
5 copyright : (C) 2001 by Jason Harris
6 email : jharris@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
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. *
16 ***************************************************************************/
21 #include "ksplanetbase.h"
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
48 class KSAsteroid
: public KSPlanetBase
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,
73 virtual bool loadData();
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
);