• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Public Member Functions | Protected Attributes | List of all members
PlanetMoons Class Referenceabstract

#include <planetmoons.h>

Inheritance diagram for PlanetMoons:
Inheritance graph
[legend]

Public Member Functions

 PlanetMoons ()
 
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.

Author
Vipul Kumar Singh
Version
1.0

Definition at line 39 of file planetmoons.h.

Constructor & Destructor Documentation

PlanetMoons::PlanetMoons ( )

Constructor.

Assign the name of each moon, and initialize their XYZ positions to zero.

Definition at line 27 of file planetmoons.cpp.

PlanetMoons::~PlanetMoons ( )
virtual

Destructor.

Delete moon objects.

Definition at line 30 of file planetmoons.cpp.

Member Function Documentation

void PlanetMoons::EquatorialToHorizontal ( const dms *  LSTh,
const dms *  lat 
)

Convert the RA,Dec coordinates of each moon to Az,Alt.

Parameters
LSThpointer to the current local sidereal time
latpointer to the geographic latitude

Definition at line 38 of file planetmoons.cpp.

virtual void PlanetMoons::findPosition ( const KSNumbers *  num,
const KSPlanetBase *  pla,
const KSSun *  sunptr 
)
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
numpointer to the KSNumbers object describing the date/time at which to find the positions.
plapointer to the planet object
sunptrpointer to the Sun object

Implemented in JupiterMoons.

bool PlanetMoons::inFront ( int  id) const
inline
Returns
true if the Moon is nearer to Earth than Saturn.
Parameters
idwhich moon? 0=Mimas,1=Enceladus,2=Tethys,3=Dione,4=Rhea,5=Titan,6=Hyperion,7=Lapetus

Definition at line 95 of file planetmoons.h.

TrailObject* PlanetMoons::moon ( int  id)
inline
Returns
pointer to a moon given the ID number.
Parameters
idwhich moon?

Definition at line 56 of file planetmoons.h.

QString PlanetMoons::name ( int  id) const
Returns
the name of a moon.
Parameters
idwhich moon?

Definition at line 34 of file planetmoons.cpp.

int PlanetMoons::nMoons ( ) const
inline
Returns
the number of moons around the planet

Definition at line 118 of file planetmoons.h.

double PlanetMoons::x ( int  i) const
inline
Returns
the X-coordinate in the planet-centered coord. system.
Parameters
iwhich moon?

Definition at line 101 of file planetmoons.h.

double PlanetMoons::y ( int  i) const
inline
Returns
the Y-coordinate in the planet-centered coord. system.
Parameters
iwhich moon?

Definition at line 107 of file planetmoons.h.

double PlanetMoons::z ( int  i) const
inline
Returns
the Z-coordinate in the Planet-centered coord. system.
Parameters
iwhich moon?

Definition at line 113 of file planetmoons.h.

Member Data Documentation

QVector<bool> PlanetMoons::InFront
protected

Definition at line 122 of file planetmoons.h.

QVector<TrailObject*> PlanetMoons::Moon
protected

Definition at line 121 of file planetmoons.h.

QVector<double> PlanetMoons::XP
protected

Definition at line 124 of file planetmoons.h.

QVector<double> PlanetMoons::YP
protected

Definition at line 124 of file planetmoons.h.

QVector<double> PlanetMoons::ZP
protected

Definition at line 124 of file planetmoons.h.


The documentation for this class was generated from the following files:
  • planetmoons.h
  • planetmoons.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal