• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

KSPlanetBase Class Reference

A subclass of SkyObject that provides additional information needed for solar system objects. More...

#include <ksplanetbase.h>

Inheritance diagram for KSPlanetBase:

Inheritance graph
[legend]

List of all members.


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.

Author:
Mark Hollomon
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]

Destructor (empty).

Definition at line 88 of file ksplanetbase.h.


Member Function Documentation

void KSPlanetBase::addToTrail (  )  [inline]

adds a point to the planet's trail

Definition at line 256 of file ksplanetbase.h.

double KSPlanetBase::angSize (  )  const [inline]

Returns:
the Planet's angular size, in arcminutes

Definition at line 226 of file ksplanetbase.h.

void KSPlanetBase::clearTrail (  )  [inline]

clear the Trail

Definition at line 264 of file ksplanetbase.h.

void KSPlanetBase::clipTrail (  )  [inline]

removes the oldest point from the trail

Definition at line 260 of file ksplanetbase.h.

const dms* KSPlanetBase::ecLat ( void   )  const [inline]

Returns:
pointer to Ecliptic Latitude coordinate

Definition at line 97 of file ksplanetbase.h.

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]

Returns:
pointer to Ecliptic Longitude coordinate

Definition at line 92 of file ksplanetbase.h.

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]

Returns:
whether the planet has a trail

Definition at line 248 of file ksplanetbase.h.

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]

Returns:
pointer to image of planet

Definition at line 169 of file ksplanetbase.h.

QImage* KSPlanetBase::image0 ( void   )  [inline]

Returns:
pointer to unrotated image of planet

Definition at line 173 of file ksplanetbase.h.

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]

Returns:
the Planet's physical size, in km

Definition at line 235 of file ksplanetbase.h.

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.

QPtrList<SkyPoint>* KSPlanetBase::trail (  )  [inline]

Returns:
a reference to the planet's trail

Definition at line 252 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.

void KSPlanetBase::updateTrail ( dms *  LST,
const dms *  lat 
)

update Horizontal coords of the trail

Definition at line 162 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:
  • ksplanetbase.h
  • ksplanetbase.cpp

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal