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

kstars

PlanetCatalog Class Reference

This class contains a QPtrList of the eight major planets, as well as pointers to objects representing the Earth and Sun. More...

#include <planetcatalog.h>

Inheritance diagram for PlanetCatalog:

Inheritance graph
[legend]

List of all members.


Public Member Functions

void addObject (ObjectNameList &ObjNames) const
KSPlanet * earth ()
void EquatorialToHorizontal (dms *LST, const dms *lat)
KSPlanetBase * findByName (const QString n) const
SkyObject * findClosest (const SkyPoint *p, double &r) const
void findPosition (const KSNumbers *num, const dms *lat, const dms *LST)
bool initialize ()
bool isPlanet (SkyObject *so) const
 PlanetCatalog (KStarsData *dat)
const KSSun * planetSun () const
 ~PlanetCatalog ()

Detailed Description

This class contains a QPtrList of the eight major planets, as well as pointers to objects representing the Earth and Sun.

Note that the Sun also exists in the QPtrList, the external pointer is just for convenience. There are methods to search the collection by name, identify if a given object pointer is a planet, find the coordinates of a planet, and find the planet closest to a given SkyPoint. the collection of planet objects.

Author:
Mark Hollomon
Version:
1.0

Definition at line 49 of file planetcatalog.h.


Constructor & Destructor Documentation

PlanetCatalog::PlanetCatalog ( KStarsData *  dat  ) 

Constructor.

Definition at line 32 of file planetcatalog.cpp.

PlanetCatalog::~PlanetCatalog (  ) 

Destructor.

Delete the Earth object (all others auto-deleted by QPtrList)

Definition at line 36 of file planetcatalog.cpp.


Member Function Documentation

void PlanetCatalog::addObject ( ObjectNameList &  ObjNames  )  const

Add pointers to the planetary objects to the ObjNames list.

ObjNames the list of all named objects to which we will add the planets.

Definition at line 99 of file planetcatalog.cpp.

KSPlanet* PlanetCatalog::earth (  )  [inline]

Returns:
pointer to the Earth. (must not be const because we call findPosition on it in KSPlanetBase::updateCoords() )

Definition at line 78 of file planetcatalog.h.

void PlanetCatalog::EquatorialToHorizontal ( dms *  LST,
const dms *  lat 
)

Compute the present Horizontal coordinates of all planets.

LST pointer to the current local sidereal time lat pointer to the current geographic latitude

Definition at line 114 of file planetcatalog.cpp.

KSPlanetBase * PlanetCatalog::findByName ( const QString  n  )  const

Returns:
a pointer to the KSPlanetBase of the planet named in the argument. n the name of the planet to point to
Note:
if no planet with this name is found, return the NULL pointer.

Definition at line 135 of file planetcatalog.cpp.

SkyObject * PlanetCatalog::findClosest ( const SkyPoint *  p,
double &  r 
) const

Returns:
a pointer to the planet closest to the given SkyPoint (within a maximum angular search radius) p the Sky point to find a planet near r the maximum angular search radius

Definition at line 159 of file planetcatalog.cpp.

void PlanetCatalog::findPosition ( const KSNumbers *  num,
const dms *  lat,
const dms *  LST 
)

Determine the coordinates for all of the planets.

Parameters:
num pointer to a ksnumbers object for the target date/time
lat pointer to the geographic latitude
LST pointer to the local sidereal time

Definition at line 107 of file planetcatalog.cpp.

bool PlanetCatalog::initialize (  ) 

Loads all planetary data from files on disk into the appropriate objects.

Definition at line 46 of file planetcatalog.cpp.

bool PlanetCatalog::isPlanet ( SkyObject *  so  )  const

Returns:
true if the SkyObject argument is a planet. so pointer to the SkyObject to be tested

Definition at line 121 of file planetcatalog.cpp.

const KSSun* PlanetCatalog::planetSun (  )  const [inline]

Returns:
pointer to the Sun.

Definition at line 75 of file planetcatalog.h.


The documentation for this class was generated from the following files:
  • planetcatalog.h
  • planetcatalog.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