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>

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.
- Version:
- 1.0
Definition at line 49 of file planetcatalog.h.
Constructor & Destructor Documentation
PlanetCatalog::PlanetCatalog | ( | KStarsData * | dat | ) |
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.
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.
- 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 nearr
the maximum angular search radius
Definition at line 159 of file planetcatalog.cpp.
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 |
Definition at line 121 of file planetcatalog.cpp.
const KSSun* PlanetCatalog::planetSun | ( | ) | const [inline] |
The documentation for this class was generated from the following files: