kstars
#include <ksplanetbase.h>

Public Types | |
enum | Planets { MERCURY =0, VENUS =1, MARS =2, JUPITER =3, SATURN =4, URANUS =5, NEPTUNE =6, PLUTO =7, SUN =8, MOON =9, UNKNOWN_PLANET } |
![]() | |
enum | TYPE { STAR =0, CATALOG_STAR =1, PLANET =2, OPEN_CLUSTER =3, GLOBULAR_CLUSTER =4, GASEOUS_NEBULA =5, PLANETARY_NEBULA =6, SUPERNOVA_REMNANT =7, GALAXY =8, COMET =9, ASTEROID =10, CONSTELLATION =11, MOON =12, ASTERISM =13, GALAXY_CLUSTER =14, DARK_NEBULA =15, QUASAR =16, MULT_STAR =17, RADIO_SOURCE =18, SATELLITE =19, SUPERNOVA =20, TYPE_UNKNOWN } |
typedef qint64 | UID |
Public Member Functions | |
KSPlanetBase (const QString &s=i18n("unnamed"), const QString &image_file=QString(), const QColor &c=Qt::white, double pSize=0) | |
virtual | ~KSPlanetBase () |
double | angSize () const |
QColor & | color () |
const dms & | ecLat () const |
void | EclipticToEquatorial (const dms *Obliquity) |
const dms & | ecLong () const |
void | EquatorialToEcliptic (const dms *Obliquity) |
void | findPosition (const KSNumbers *num, const dms *lat=0, const dms *LST=0, const KSPlanetBase *Earth=0) |
const dms & | helEcLat () const |
const dms & | helEcLong () const |
const QImage & | image () |
void | init (const QString &s, const QString &image_file, const QColor &c, double pSize) |
bool | isMajorPlanet () const |
virtual double | labelOffset () const |
virtual bool | loadData ()=0 |
virtual double | pa () const |
dms | phase () |
double | physicalSize () const |
double | rearth () const |
double | rsun () const |
void | setAngularSize (double size) |
void | setColor (const QColor &c) |
void | setEcLat (dms elat) |
void | setEcLong (dms elong) |
void | setPA (double p) |
void | setPhysicalSize (double size) |
void | setRearth (double r) |
void | setRearth (const KSPlanetBase *Earth) |
void | setRsun (double r) |
virtual void | updateCoords (KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0, bool forceRecompute=false) |
![]() | |
TrailObject (int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString()) | |
TrailObject (int t, double r, double d, float m=0.0, const QString &n=QString()) | |
virtual | ~TrailObject () |
void | addToTrail () |
void | clearTrail () |
void | clipTrail () |
virtual TrailObject * | clone () const |
void | drawTrail (SkyPainter *skyp) const |
bool | hasTrail () const |
const QList< SkyPoint > & | trail () const |
void | updateTrail (dms *LST, const dms *lat) |
![]() | |
SkyObject (int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString(), const QString &n2=QString(), const QString &lname=QString()) | |
SkyObject (int t, double r, double d, float m=0.0, const QString &n=QString(), const QString &n2=QString(), const QString &lname=QString()) | |
virtual | ~SkyObject () |
virtual UID | getUID () const |
bool | hasAuxInfo () |
bool | hasLongName () const |
bool | hasName () const |
bool | hasName2 () const |
QStringList & | ImageList () |
QStringList & | ImageTitle () |
QStringList & | InfoList () |
QStringList & | InfoTitle () |
bool | isSolarSystem () const |
virtual QString | labelString () const |
virtual QString | longname (void) const |
float | mag (void) const |
float | mag (const QString &band) const |
QString | messageFromTitle (const QString &imageTitle) |
virtual QString | name (void) const |
QString | name2 (void) const |
QString & | notes () |
SkyPoint | recomputeCoords (const KStarsDateTime &dt, const GeoLocation *geo=0) |
QTime | riseSetTime (const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true) |
dms | riseSetTimeAz (const KStarsDateTime &dt, const GeoLocation *geo, bool rst) |
QTime | riseSetTimeUT (const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true) |
void | saveUserLog (const QString &newLog) |
void | setLongName (const QString &longname=QString()) |
void | setNotes (QString _notes) |
void | setType (int t) |
void | showPopupMenu (KSPopupMenu *pmenu, const QPoint &pos) |
dms | transitAltitude (const KStarsDateTime &dt, const GeoLocation *geo) |
QTime | transitTime (const KStarsDateTime &dt, const GeoLocation *geo) |
QTime | transitTimeUT (const KStarsDateTime &dt, const GeoLocation *geo) |
QString | translatedLongName () const |
QString | translatedName () const |
QString | translatedName2 () const |
int | type (void) const |
QString | typeName () const |
QString & | userLog () |
![]() | |
SkyPoint (const dms &r, const dms &d) | |
SkyPoint (double r, double d) | |
SkyPoint () | |
virtual | ~SkyPoint () |
void | aberrate (const KSNumbers *num) |
void | addEterms (void) |
const dms & | alt () const |
dms | altRefracted () const |
dms | angularDistanceTo (const SkyPoint *sp, double *const positionAngle=0) const |
void | apparentCoord (long double jd0, long double jdf) |
const dms & | az () const |
void | B1950ToJ2000 (void) |
bool | bendlight () |
bool | checkBendLight () |
bool | checkCircumpolar (const dms *gLat) |
const dms & | dec () const |
const dms & | dec0 () const |
SkyPoint | deprecess (const KSNumbers *num, long double epoch=J2000) |
void | Equatorial1950ToGalactic (dms &galLong, dms &galLat) |
void | EquatorialToHorizontal (const dms *LST, const dms *lat) |
SkyPoint | Eterms (void) |
void | findEcliptic (const dms *Obliquity, dms &EcLong, dms &EcLat) |
void | GalacticToEquatorial1950 (const dms *galLong, const dms *galLat) |
void | HorizontalToEquatorial (const dms *LST, const dms *lat) |
void | J2000ToB1950 (void) |
SkyPoint | moveAway (const SkyPoint &from, double dist) |
void | nutate (const KSNumbers *num) |
bool | operator== (SkyPoint &p) |
void | precessFromAnyEpoch (long double jd0, long double jdf) |
const dms & | ra () const |
const dms & | ra0 () const |
void | set (const dms &r, const dms &d) |
void | setAlt (dms alt) |
void | setAlt (double alt) |
void | setAz (dms az) |
void | setAz (double az) |
void | setDec (dms d) |
void | setDec (double d) |
void | setDec0 (dms d) |
void | setDec0 (double d) |
void | setFromEcliptic (const dms *Obliquity, const dms &EcLong, const dms &EcLat) |
void | setRA (dms r) |
void | setRA (double r) |
void | setRA0 (dms r) |
void | setRA0 (double r) |
void | subtractEterms (void) |
double | vGeocentric (double vhelio, long double jd) |
double | vGeoToVHelio (double vgeo, long double jd) |
double | vHeliocentric (double vlsr, long double jd) |
double | vHelioToVlsr (double vhelio, long double jd) |
double | vREarth (long double jd0) |
double | vRSite (double vsite[3]) |
double | vRSun (long double jd) |
double | vTopocentric (double vgeo, double vsite[3]) |
double | vTopoToVGeo (double vtopo, double vsite[3]) |
Static Public Member Functions | |
static KSPlanetBase * | createPlanet (int n) |
![]() | |
static void | clearTrailsExcept (SkyObject *o) |
![]() | |
static QString | typeName (const int t) |
![]() | |
static double | refract (const double alt) |
static dms | refract (const dms alt) |
static double | refractionCorr (double alt) |
static double | unrefract (const double alt) |
static dms | unrefract (const dms alt) |
Static Public Attributes | |
static QVector< QColor > | planetColor |
![]() | |
static const int | MaxTrail = 400 |
![]() | |
static const UID | invalidUID = ~0 |
static const UID | UID_DEEPSKY = 2 |
static const UID | UID_GALAXY = 1 |
static const UID | UID_SOLARSYS = 3 |
static const UID | UID_STAR = 0 |
![]() | |
static const double | altCrit = -1.0 |
Protected Member Functions | |
virtual bool | findGeocentricPosition (const KSNumbers *num, const KSPlanetBase *Earth=NULL)=0 |
virtual void | findMagnitude (const KSNumbers *num)=0 |
void | findPA (const KSNumbers *num) |
virtual void | findPhase () |
UID | solarsysUID (UID type) const |
![]() | |
void | setMag (float m) |
void | setMag (const QString &band, const double mag) |
void | setName (const QString &name) |
void | setName2 (const QString &name2=QString()) |
![]() | |
void | precess (const KSNumbers *num) |
Protected Attributes | |
EclipticPosition | ep |
EclipticPosition | helEcPos |
QImage | m_image |
double | Phase |
double | Rearth |
![]() | |
QList< SkyPoint > | Trail |
![]() | |
QSharedDataPointer< AuxInfo > | info |
QString | LongName |
QString | Name |
QString | Name2 |
![]() | |
long double | lastPrecessJD |
Static Protected Attributes | |
static const UID | UID_SOL_ASTEROID = 1 |
static const UID | UID_SOL_BIGOBJ = 0 |
static const UID | UID_SOL_COMET = 2 |
![]() | |
static QSet< TrailObject * > | trailObjects |
![]() | |
static QString | emptyString |
static QString | starString = QString("star") |
static QString | unnamedObjectString = QString(I18N_NOOP("unnamed object")) |
static QString | unnamedString = QString(I18N_NOOP("unnamed")) |
Detailed Description
A subclass of TrailObject that provides additional information needed for most solar system objects.
This is a base class for KSSun, KSMoon, KSPlanet, KSAsteroid, and KSComet. Those classes cover all solar system objects except planetary moons, which are derived directly from TrailObject Provides necessary information about objects in the solar system.
- Version
- 1.0
Definition at line 63 of file ksplanetbase.h.
Member Enumeration Documentation
Enumerator | |
---|---|
MERCURY | |
VENUS | |
MARS | |
JUPITER | |
SATURN | |
URANUS | |
NEPTUNE | |
PLUTO | |
SUN | |
MOON | |
UNKNOWN_PLANET |
Definition at line 82 of file ksplanetbase.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
Calls SkyObject constructor with type=2 (planet), coordinates=0.0, mag=0.0, primary name s, and all other QStrings empty.
- Parameters
-
s Name of planet image_file filename of the planet's image c color of the symbol to use for this planet pSize the planet's physical size, in km
Definition at line 57 of file ksplanetbase.cpp.
|
inlinevirtual |
Destructor (empty)
Definition at line 78 of file ksplanetbase.h.
Member Function Documentation
|
inline |
- Returns
- the Planet's angular size, in arcminutes
Definition at line 171 of file ksplanetbase.h.
|
inline |
- Returns
- the color for the planet symbol
Definition at line 190 of file ksplanetbase.h.
|
static |
Definition at line 73 of file ksplanetbase.cpp.
|
inline |
- Returns
- pointer to Ecliptic Latitude coordinate
Definition at line 94 of file ksplanetbase.h.
void KSPlanetBase::EclipticToEquatorial | ( | const dms * | Obliquity | ) |
Convert Ecliptic logitude/latitude to Right Ascension/Declination.
Definition at line 101 of file ksplanetbase.cpp.
|
inline |
- Returns
- pointer to Ecliptic Longitude coordinate
Definition at line 91 of file ksplanetbase.h.
void KSPlanetBase::EquatorialToEcliptic | ( | const dms * | Obliquity | ) |
Convert Right Ascension/Declination to Ecliptic logitude/latitude.
Definition at line 97 of file ksplanetbase.cpp.
|
protectedpure virtual |
find the object's current geocentric equatorial coordinates (RA and Dec) This function is pure virtual; it must be overloaded by subclasses.
This function is private; it is called by the public function findPosition() which also includes the figure-of-the-earth correction, localizeCoords().
- Parameters
-
num pointer to current KSNumbers object Earth pointer to planet Earth (needed to calculate geocentric coords)
- Returns
- true if position was successfully calculated.
Implemented in KSComet, KSAsteroid, KSPlanet, KSMoon, KSPluto, and KSSun.
|
protectedpure virtual |
Computes the visual magnitude for the major planets.
- Parameters
-
num pointer to a ksnumbers object. Needed for the saturn rings contribution to saturn's magnitude.
|
protected |
Determine the position angle of the planet for a given date (used internally by findPosition() )
Definition at line 240 of file ksplanetbase.cpp.
|
protectedvirtual |
Determine the phase of the planet.
Definition at line 277 of file ksplanetbase.cpp.
void KSPlanetBase::findPosition | ( | const KSNumbers * | num, |
const dms * | lat = 0 , |
||
const dms * | LST = 0 , |
||
const KSPlanetBase * | Earth = 0 |
||
) |
Find position, including correction for Figure-of-the-Earth.
- Parameters
-
num KSNumbers pointer for the target date/time lat pointer to the geographic latitude; if NULL, we skip localizeCoords() LST pointer to the local sidereal time; if NULL, we skip localizeCoords() Earth pointer to the Earth (not used for the Moon)
Definition at line 122 of file ksplanetbase.cpp.
|
inline |
- Returns
- pointer to Ecliptic Heliocentric Latitude coordinate
Definition at line 110 of file ksplanetbase.h.
|
inline |
- Returns
- pointer to Ecliptic Heliocentric Longitude coordinate
Definition at line 107 of file ksplanetbase.h.
|
inline |
- Returns
- pointer to this planet's texture
Definition at line 123 of file ksplanetbase.h.
void KSPlanetBase::init | ( | const QString & | s, |
const QString & | image_file, | ||
const QColor & | c, | ||
double | pSize | ||
) |
Definition at line 64 of file ksplanetbase.cpp.
bool KSPlanetBase::isMajorPlanet | ( | ) | const |
- Returns
- true if the KSPlanet is one of the eight major planets
Definition at line 151 of file ksplanetbase.cpp.
|
virtual |
- Returns
- the pixel distance for offseting the object's name label
Reimplemented from SkyObject.
Definition at line 258 of file ksplanetbase.cpp.
|
pure virtual |
Implemented in KSComet, KSAsteroid, KSPlanet, KSMoon, and KSSun.
|
inlinevirtual |
- Returns
- the Planet's position angle.
Reimplemented from SkyObject.
Definition at line 163 of file ksplanetbase.h.
|
inline |
- Returns
- the phase angle of this planet
Definition at line 187 of file ksplanetbase.h.
|
inline |
- Returns
- the Planet's physical size, in km
Definition at line 179 of file ksplanetbase.h.
|
inline |
- Returns
- distance from Earth, in Astronomical Units (1 AU is Earth-Sun distance)
Definition at line 134 of file ksplanetbase.h.
|
inline |
- Returns
- distance from Sun, in Astronomical Units (1 AU is Earth-Sun distance)
Definition at line 126 of file ksplanetbase.h.
|
inline |
set the planet's angular size, in km.
- Parameters
-
size the planet's size, in km
Definition at line 176 of file ksplanetbase.h.
|
inline |
Set the color for the planet symbol.
Definition at line 193 of file ksplanetbase.h.
|
inline |
Set Ecliptic Geocentric Latitude according to argument.
- Parameters
-
elat Ecliptic Latitude
Definition at line 104 of file ksplanetbase.h.
|
inline |
Set Ecliptic Geocentric Longitude according to argument.
- Parameters
-
elong Ecliptic Longitude
Definition at line 99 of file ksplanetbase.h.
|
inline |
Set the Planet's position angle.
- Parameters
-
p the new position angle
Definition at line 168 of file ksplanetbase.h.
|
inline |
set the planet's physical size, in km.
- Parameters
-
size the planet's size, in km
Definition at line 184 of file ksplanetbase.h.
|
inline |
Set the distance from Earth, in AU.
- Parameters
-
r the new earth-distance in AU
Definition at line 139 of file ksplanetbase.h.
void KSPlanetBase::setRearth | ( | const KSPlanetBase * | Earth | ) |
compute and set the distance from Earth, in AU.
- Parameters
-
Earth pointer to the Earth from which to calculate the distance.
Definition at line 201 of file ksplanetbase.cpp.
|
inline |
Set the solar distance in AU.
- Parameters
-
r the new solar distance in AU
Definition at line 131 of file ksplanetbase.h.
Compute high 32-bits of UID.
Definition at line 210 of file ksplanetbase.h.
|
virtual |
Update position of the planet (reimplemented from SkyPoint)
- Parameters
-
num current KSNumbers object includePlanets this function does nothing if includePlanets=false lat pointer to the geographic latitude; if NULL, we skip localizeCoords() LST pointer to the local sidereal time; if NULL, we skip localizeCoords()
Reimplemented from SkyPoint.
Definition at line 105 of file ksplanetbase.cpp.
Member Data Documentation
|
protected |
Definition at line 238 of file ksplanetbase.h.
|
protected |
Definition at line 242 of file ksplanetbase.h.
|
protected |
Definition at line 245 of file ksplanetbase.h.
|
protected |
Definition at line 244 of file ksplanetbase.h.
|
static |
Definition at line 86 of file ksplanetbase.h.
|
protected |
Definition at line 243 of file ksplanetbase.h.
|
staticprotected |
Asteroids.
Definition at line 205 of file ksplanetbase.h.
|
staticprotected |
|
staticprotected |
Comets.
Definition at line 207 of file ksplanetbase.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.