PlanetMoons
#include <planetmoons.h>
Public Member Functions | |
PlanetMoons ()=default | |
virtual | ~PlanetMoons () |
void | EquatorialToHorizontal (const dms *LSTh, const dms *lat) |
virtual void | findPosition (const KSNumbers *num, const KSPlanetBase *pla, const KSSun *sunptr)=0 |
bool | inFront (int id) const |
TrailObject * | moon (int id) |
QString | name (int id) const |
int | nMoons () const |
double | x (int i) const |
double | y (int i) const |
double | z (int i) const |
Protected Attributes | |
QVector< bool > | InFront |
QVector< TrailObject * > | Moon |
QVector< double > | XP |
QVector< double > | YP |
QVector< double > | ZP |
Detailed Description
Implements the moons of a planet.
TODO: make the moons SkyObjects, rather than just points.
- Version
- 1.0
Definition at line 29 of file planetmoons.h.
Constructor & Destructor Documentation
◆ PlanetMoons()
|
default |
Constructor.
Assign the name of each moon, and initialize their XYZ positions to zero.
◆ ~PlanetMoons()
|
virtual |
Member Function Documentation
◆ EquatorialToHorizontal()
Convert the RA,Dec coordinates of each moon to Az,Alt.
- Parameters
-
LSTh pointer to the current local sidereal time lat pointer to the geographic latitude
Definition at line 27 of file planetmoons.cpp.
◆ findPosition()
|
pure virtual |
Find the positions of each Moon, relative to the planet.
We use an XYZ coordinate system, centered on the planet, where the X-axis corresponds to the planet's Equator, the Y-Axis is parallel to the planet's Poles, and the Z-axis points along the line joining the Earth and the planet. Once the XYZ positions are known, this function also computes the RA, Dec positions of each Moon, and sets the inFront bool variable to indicate whether the Moon is nearer to us than the planet or not (this information is used to determine whether the Moon should be drawn on top of the planet, or vice versa).
- Parameters
-
num pointer to the KSNumbers object describing the date/time at which to find the positions. pla pointer to the planet object sunptr pointer to the Sun object
Implemented in JupiterMoons.
◆ inFront()
|
inline |
- Returns
- true if the Moon is nearer to Earth than Saturn.
- Parameters
-
id which moon? 0=Mimas,1=Enceladus,2=Tethys,3=Dione,4=Rhea,5=Titan,6=Hyperion,7=Lapetus
Definition at line 86 of file planetmoons.h.
◆ moon()
|
inline |
- Returns
- pointer to a moon given the ID number.
- Parameters
-
id which moon?
Definition at line 45 of file planetmoons.h.
◆ name()
QString PlanetMoons::name | ( | int | id | ) | const |
◆ nMoons()
|
inline |
- Returns
- the number of moons around the planet
Definition at line 107 of file planetmoons.h.
◆ x()
|
inline |
- Returns
- the X-coordinate in the planet-centered coord. system.
- Parameters
-
i which moon?
Definition at line 92 of file planetmoons.h.
◆ y()
|
inline |
- Returns
- the Y-coordinate in the planet-centered coord. system.
- Parameters
-
i which moon?
Definition at line 98 of file planetmoons.h.
◆ z()
|
inline |
- Returns
- the Z-coordinate in the Planet-centered coord. system.
- Parameters
-
i which moon?
Definition at line 104 of file planetmoons.h.
Member Data Documentation
◆ InFront
|
protected |
Definition at line 111 of file planetmoons.h.
◆ Moon
|
protected |
Definition at line 110 of file planetmoons.h.
◆ XP
|
protected |
Definition at line 113 of file planetmoons.h.
◆ YP
|
protected |
Definition at line 113 of file planetmoons.h.
◆ ZP
|
protected |
Definition at line 113 of file planetmoons.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.