kstars
KSPlanetBase Class Reference
A subclass of SkyObject that provides additional information needed for solar system objects. More...
#include <ksplanetbase.h>

Public Member Functions | |
void | addToTrail () |
double | angSize () const |
void | clearTrail () |
void | clipTrail () |
const dms * | ecLat (void) const |
void | EclipticToEquatorial (const dms *Obliquity) |
const dms * | ecLong (void) const |
void | EquatorialToEcliptic (const dms *Obliquity) |
void | findPosition (const KSNumbers *num, const dms *lat=0, const dms *LST=0, const KSPlanetBase *Earth=0) |
bool | hasTrail () const |
const dms * | helEcLat (void) const |
const dms * | helEcLong (void) const |
QImage * | image (void) |
QImage * | image0 (void) |
bool | isMajorPlanet () const |
KSPlanetBase (KStarsData *kd, QString s=i18n("unnamed"), QString image_file="", double pSize=0) | |
virtual bool | loadData ()=0 |
virtual double | pa () const |
double | physicalSize () const |
double | rearth () const |
void | rotateImage (double imageAngle) |
double | rsun (void) const |
void | scaleRotateImage (int scale, double imageAngle) |
void | setAngularSize (double size) |
void | setEcLat (double elat) |
void | setEcLat (dms elat) |
void | setEcLong (double elong) |
void | setEcLong (dms elong) |
void | setHelEcLat (double elat) |
void | setHelEcLat (dms elat) |
void | setHelEcLong (double elong) |
void | setHelEcLong (dms elong) |
void | setPA (double p) |
void | setPhysicalSize (double size) |
void | setRearth (const KSPlanetBase *Earth) |
void | setRearth (double r) |
void | setRsun (double r) |
virtual void | showPopupMenu (KSPopupMenu *pmenu, QPoint pos) |
QPtrList< SkyPoint > * | trail () |
virtual void | updateCoords (KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0) |
void | updateTrail (dms *LST, const dms *lat) |
virtual | ~KSPlanetBase () |
Protected Member Functions | |
virtual bool | findGeocentricPosition (const KSNumbers *num, const KSPlanetBase *Earth=NULL)=0 |
void | findPA (const KSNumbers *num) |
virtual bool | loadData (QString n) |
Protected Attributes | |
EclipticPosition | ep |
EclipticPosition | helEcPos |
double | Rearth |
QPtrList< SkyPoint > | Trail |
Detailed Description
A subclass of SkyObject that provides additional information needed for solar system objects.This is a base class for KSPlanet, KSPluto, KSSun and KSMoon. Provides necessary information about objects in the solar system.
- Version:
- 1.0
Definition at line 71 of file ksplanetbase.h.
Constructor & Destructor Documentation
KSPlanetBase::KSPlanetBase | ( | KStarsData * | kd, | |
QString | s = i18n("unnamed") , |
|||
QString | image_file = "" , |
|||
double | pSize = 0 | |||
) |
Constructor.
Calls SkyObject constructor with type=2 (planet), coordinates=0.0, mag=0.0, primary name s, and all other QStrings empty.
- Parameters:
-
kd Some kind of data s Name of planet image_file filename of the planet's image pSize the planet's physical size, in km
- Todo:
- Figure out what
kd
does.
Definition at line 32 of file ksplanetbase.cpp.
virtual KSPlanetBase::~KSPlanetBase | ( | ) | [inline, virtual] |
Member Function Documentation
void KSPlanetBase::addToTrail | ( | ) | [inline] |
double KSPlanetBase::angSize | ( | ) | const [inline] |
void KSPlanetBase::clearTrail | ( | ) | [inline] |
void KSPlanetBase::clipTrail | ( | ) | [inline] |
const dms* KSPlanetBase::ecLat | ( | void | ) | const [inline] |
void KSPlanetBase::EclipticToEquatorial | ( | const dms * | Obliquity | ) |
Convert Ecliptic logitude/latitude to Right Ascension/Declination.
- Parameters:
-
Obliquity current Obliquity of the Ecliptic (angle from Equator)
Definition at line 55 of file ksplanetbase.cpp.
const dms* KSPlanetBase::ecLong | ( | void | ) | const [inline] |
void KSPlanetBase::EquatorialToEcliptic | ( | const dms * | Obliquity | ) |
Convert Right Ascension/Declination to Ecliptic logitude/latitude.
- Parameters:
-
Obliquity current Obliquity of the Ecliptic (angle from Equator)
Definition at line 51 of file ksplanetbase.cpp.
virtual bool KSPlanetBase::findGeocentricPosition | ( | const KSNumbers * | num, | |
const KSPlanetBase * | Earth = NULL | |||
) | [protected, pure 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 KSAsteroid, KSComet, KSMoon, KSPlanet, KSPluto, and KSSun.
void KSPlanetBase::findPA | ( | const KSNumbers * | num | ) | [protected] |
Determine the position angle of the planet for a given date (used internally by findPosition() ).
Definition at line 167 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 72 of file ksplanetbase.cpp.
bool KSPlanetBase::hasTrail | ( | ) | const [inline] |
const dms* KSPlanetBase::helEcLat | ( | void | ) | const [inline] |
- Returns:
- pointer to Ecliptic Heliocentric Latitude coordinate
Definition at line 128 of file ksplanetbase.h.
const dms* KSPlanetBase::helEcLong | ( | void | ) | const [inline] |
- Returns:
- pointer to Ecliptic Heliocentric Longitude coordinate
Definition at line 123 of file ksplanetbase.h.
QImage* KSPlanetBase::image | ( | void | ) | [inline] |
QImage* KSPlanetBase::image0 | ( | void | ) | [inline] |
bool KSPlanetBase::isMajorPlanet | ( | ) | const |
- Returns:
- true if the KSPlanet is one of the eight major planets
Definition at line 89 of file ksplanetbase.cpp.
virtual bool KSPlanetBase::loadData | ( | QString | n | ) | [inline, protected, virtual] |
Definition at line 289 of file ksplanetbase.h.
virtual bool KSPlanetBase::loadData | ( | ) | [pure virtual] |
Load the planet's orbital data from disk.
- Returns:
- true if data successfully loaded
Implemented in KSAsteroid, KSComet, KSMoon, KSPlanet, and KSSun.
virtual double KSPlanetBase::pa | ( | ) | const [inline, virtual] |
- Returns:
- the Planet's position angle.
Reimplemented from SkyObject.
Definition at line 217 of file ksplanetbase.h.
double KSPlanetBase::physicalSize | ( | ) | const [inline] |
double KSPlanetBase::rearth | ( | ) | const [inline] |
- Returns:
- distance from Earth, in Astronomical Units (1 AU is Earth-Sun distance)
Definition at line 186 of file ksplanetbase.h.
void KSPlanetBase::rotateImage | ( | double | imageAngle | ) |
rotate Planet image
- Parameters:
-
imageAngle the new angle of rotation for the image
Definition at line 186 of file ksplanetbase.cpp.
double KSPlanetBase::rsun | ( | void | ) | const [inline] |
- Returns:
- distance from Sun, in Astronomical Units (1 AU is Earth-Sun distance)
Definition at line 177 of file ksplanetbase.h.
void KSPlanetBase::scaleRotateImage | ( | int | scale, | |
double | imageAngle | |||
) |
scale and rotate Planet image
- Parameters:
-
scale the scaling factor imageAngle the new angle of rotation for the image
Definition at line 193 of file ksplanetbase.cpp.
void KSPlanetBase::setAngularSize | ( | double | size | ) | [inline] |
set the planet's angular size, in km.
size
the planet's size, in km
Definition at line 231 of file ksplanetbase.h.
void KSPlanetBase::setEcLat | ( | double | elat | ) | [inline] |
Set Ecliptic Geocentric Latitude according to argument.
Differs from above function only in argument type.
- Parameters:
-
elat Ecliptic Latitude
Definition at line 119 of file ksplanetbase.h.
void KSPlanetBase::setEcLat | ( | dms | elat | ) | [inline] |
Set Ecliptic Geocentric Latitude according to argument.
- Parameters:
-
elat Ecliptic Latitude
Definition at line 113 of file ksplanetbase.h.
void KSPlanetBase::setEcLong | ( | double | elong | ) | [inline] |
Set Ecliptic Geocentric Longitude according to argument.
Differs from above function only in argument type.
- Parameters:
-
elong Ecliptic Longitude
Definition at line 108 of file ksplanetbase.h.
void KSPlanetBase::setEcLong | ( | dms | elong | ) | [inline] |
Set Ecliptic Geocentric Longitude according to argument.
- Parameters:
-
elong Ecliptic Longitude
Definition at line 102 of file ksplanetbase.h.
void KSPlanetBase::setHelEcLat | ( | double | elat | ) | [inline] |
Set Ecliptic Heliocentric Latitude according to argument.
Differs from above function only in argument type.
- Parameters:
-
elat Ecliptic Latitude
Definition at line 150 of file ksplanetbase.h.
void KSPlanetBase::setHelEcLat | ( | dms | elat | ) | [inline] |
Set Ecliptic Heliocentric Latitude according to argument.
- Parameters:
-
elat Ecliptic Latitude
Definition at line 144 of file ksplanetbase.h.
void KSPlanetBase::setHelEcLong | ( | double | elong | ) | [inline] |
Set Ecliptic Heliocentric Longitude according to argument.
Differs from above function only in argument type.
- Parameters:
-
elong Ecliptic Longitude
Definition at line 139 of file ksplanetbase.h.
void KSPlanetBase::setHelEcLong | ( | dms | elong | ) | [inline] |
Set Ecliptic Heliocentric Longitude according to argument.
- Parameters:
-
elong Ecliptic Longitude
Definition at line 133 of file ksplanetbase.h.
void KSPlanetBase::setPA | ( | double | p | ) | [inline] |
Set the Planet's position angle.
- Parameters:
-
p the new position angle
Definition at line 222 of file ksplanetbase.h.
void KSPlanetBase::setPhysicalSize | ( | double | size | ) | [inline] |
set the planet's physical size, in km.
size
the planet's size, in km
Definition at line 240 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 123 of file ksplanetbase.cpp.
void KSPlanetBase::setRearth | ( | double | r | ) | [inline] |
Set the distance from Earth, in AU.
- Parameters:
-
r the new earth-distance in AU
Definition at line 191 of file ksplanetbase.h.
void KSPlanetBase::setRsun | ( | double | r | ) | [inline] |
Set the solar distance in AU.
- Parameters:
-
r the new solar distance in AU
Definition at line 182 of file ksplanetbase.h.
virtual void KSPlanetBase::showPopupMenu | ( | KSPopupMenu * | pmenu, | |
QPoint | pos | |||
) | [inline, virtual] |
Show Solar System object popup menu.
Overloaded from virtual SkyObject::showPopupMenu()
- Parameters:
-
pmenu pointer to the KSPopupMenu object pos QPojnt holding the x,y coordinates for the menu
Reimplemented from SkyObject.
Definition at line 286 of file ksplanetbase.h.
void KSPlanetBase::updateCoords | ( | KSNumbers * | num, | |
bool | includePlanets = true , |
|||
const dms * | lat = 0 , |
|||
const dms * | LST = 0 | |||
) | [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 59 of file ksplanetbase.cpp.
Member Data Documentation
EclipticPosition KSPlanetBase::ep [protected] |
Definition at line 309 of file ksplanetbase.h.
EclipticPosition KSPlanetBase::helEcPos [protected] |
Definition at line 313 of file ksplanetbase.h.
double KSPlanetBase::Rearth [protected] |
Definition at line 315 of file ksplanetbase.h.
QPtrList<SkyPoint> KSPlanetBase::Trail [protected] |
Definition at line 314 of file ksplanetbase.h.
The documentation for this class was generated from the following files: