Stellarium 0.13.3
List of all members | Public Slots | Public Member Functions | Properties
SolarSystem Class Reference

This StelObjectModule derivative is used to model SolarSystem bodies. More...

#include <SolarSystem.hpp>

Public Slots

void setFlagPlanets (bool b)
 Set flag which determines if planets are drawn or hidden. More...
 
bool getFlagPlanets () const
 Get the current value of the flag which determines if planet are drawn or hidden. More...
 
void setFlagTrails (bool b)
 Set flag which determines if planet trails are drawn or hidden. More...
 
bool getFlagTrails () const
 Get the current value of the flag which determines if planet trails are drawn or hidden. More...
 
void setFlagHints (bool b)
 Set flag which determines if planet hints are drawn or hidden along labels. More...
 
bool getFlagHints () const
 Get the current value of the flag which determines if planet hints are drawn or hidden along labels. More...
 
void setFlagLabels (bool b)
 Set flag which determines if planet labels are drawn or hidden. More...
 
bool getFlagLabels () const
 Get the current value of the flag which determines if planet labels are drawn or hidden. More...
 
void setLabelsAmount (float a)
 Set the amount of planet labels. More...
 
float getLabelsAmount (void) const
 Get the amount of planet labels. More...
 
void setFlagOrbits (bool b)
 Set flag which determines if planet orbits are drawn or hidden. More...
 
bool getFlagOrbits () const
 Get the current value of the flag which determines if planet orbits are drawn or hidden. More...
 
void setFlagMarkers (bool b)
 Set flag which determines if planet markers are drawn or hidden. More...
 
bool getFlagMarkers () const
 Get the current value of the flag which determines if planet markers are drawn or hidden. More...
 
void setFlagLightTravelTime (bool b)
 Set flag which determines if the light travel time calculation is used or not. More...
 
bool getFlagLightTravelTime (void) const
 Get the current value of the flag which determines if light travel time calculation is used or not. More...
 
void setFontSize (float newFontSize)
 Set planet names font size. More...
 
void setLabelsColor (const Vec3f &c)
 Set the color used to draw planet labels. More...
 
const Vec3fgetLabelsColor (void) const
 Get the current color used to draw planet labels. More...
 
void setOrbitsColor (const Vec3f &c)
 Set the color used to draw planet orbit lines. More...
 
Vec3f getOrbitsColor (void) const
 Get the current color used to draw planet orbit lines. More...
 
void setTrailsColor (const Vec3f &c)
 Set the color used to draw planet trails lines. More...
 
Vec3f getTrailsColor () const
 Get the current color used to draw planet trails lines. More...
 
void setPointersColor (const Vec3f &c)
 Set the color used to draw planet pointers. More...
 
Vec3f getPointersColor () const
 Get the current color used to draw planet pointers. More...
 
void setFlagMoonScale (bool b)
 Set flag which determines if Earth's moon is scaled or not. More...
 
bool getFlagMoonScale (void) const
 Get the current value of the flag which determines if Earth's moon is scaled or not. More...
 
void setMoonScale (double f)
 Set the display scaling factor for Earth's moon. More...
 
float getMoonScale (void) const
 Get the display scaling factor for Earth's oon. More...
 
void updateI18n ()
 Translate names. (public so that SolarSystemEditor can call it). More...
 
float getPlanetVMagnitude (QString planetName, bool withExtinction=false) const
 Get the V magnitude for Solar system bodies from scripts. More...
 
QString getPlanetType (QString planetName) const
 Get type for Solar system bodies from scripts. More...
 
double getDistanceToPlanet (QString planetName) const
 Get distance to Solar system bodies from scripts. More...
 
double getElongationForPlanet (QString planetName) const
 Get elongation for Solar system bodies from scripts. More...
 
double getPhaseAngleForPlanet (QString planetName) const
 Get phase angle for Solar system bodies from scripts. More...
 
float getPhaseForPlanet (QString planetName) const
 Get phase for Solar system bodies from scripts. More...
 
void setApparentMagnitudeAlgorithmOnEarth (QString algorithm)
 Set the algorithm for computation of apparent magnitudes for planets in case observer on the Earth. More...
 
QString getApparentMagnitudeAlgorithmOnEarth () const
 Get the algorithm used for computation of apparent magnitudes for planets in case observer on the Earth. More...
 
void setFlagNativeNames (bool b)
 Set flag which enable use native names for planets or not. More...
 
bool getFlagNativeNames (void) const
 Get the current value of the flag which enables showing native names for planets or not. More...
 
void setFlagTranslatedNames (bool b)
 Set flag which enable use translated names for planets or not. More...
 
bool getFlagTranslatedNames (void) const
 Get the current value of the flag which enables showing translated names for planets or not. More...
 
void setFlagIsolatedTrails (bool b)
 Set flag which enabled the showing of isolated trails for selected objects only or not. More...
 
bool getFlagIsolatedTrails (void) const
 Get the current value of the flag which enables showing of isolated trails for selected objects only or not. More...
 

Public Member Functions

virtual void init ()
 Initialize the SolarSystem. More...
 
virtual void deinit ()
 Called before the module will be delete, and before the openGL context is suppressed. More...
 
virtual void draw (StelCore *core)
 Draw SolarSystem objects (planets). More...
 
virtual void update (double deltaTime)
 Update time-varying components. More...
 
virtual double getCallOrder (StelModuleActionName actionName) const
 Used to determine what order to draw the various StelModules. More...
 
virtual QList< StelObjectPsearchAround (const Vec3d &v, double limitFov, const StelCore *core) const
 Search for SolarSystem objects in some area around a point. More...
 
virtual StelObjectP searchByNameI18n (const QString &nameI18n) const
 Search for a SolarSystem object based on the localised name. More...
 
virtual StelObjectP searchByName (const QString &name) const
 Search for a SolarSystem object based on the English name. More...
 
virtual QStringList listMatchingObjectsI18n (const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false) const
 Find objects by translated name prefix. More...
 
virtual QStringList listMatchingObjects (const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false) const
 Find objects by translated name prefix. More...
 
virtual QStringList listAllObjects (bool inEnglish) const
 
virtual QStringList listAllObjectsByType (const QString &objType, bool inEnglish) const
 
virtual QString getName () const
 
PlanetP searchByEnglishName (QString planetEnglishName) const
 Get a pointer to a Planet object. More...
 
PlanetP getSun () const
 Get the Planet object pointer for the Sun. More...
 
PlanetP getEarth () const
 Get the Planet object pointer for the Earth. More...
 
PlanetP getMoon () const
 Get the Planet object pointer for Earth's moon. More...
 
bool nearLunarEclipse ()
 Determine if a lunar eclipse is close at hand? More...
 
QStringList getAllPlanetEnglishNames () const
 Get the list of all the planet english names. More...
 
QStringList getAllPlanetLocalizedNames () const
 Get the list of all the planet localized names. More...
 
void reloadPlanets ()
 Reload the planets. More...
 
QString getPlanetHashString ()
 Get a hash of locale and ssystem.ini names for use with the TUI. More...
 
void computePositions (double date, const Vec3d &observerPos=Vec3d(0.))
 Compute the position and transform matrix for every element of the solar system. More...
 
const QList< PlanetP > & getAllPlanets () const
 Get the list of all the bodies of the solar system. More...
 
- Public Member Functions inherited from StelModule
virtual QString getModuleVersion () const
 Get the version of the module, default is stellarium main version. More...
 
virtual QString getAuthorName () const
 Get the name of the module author. More...
 
virtual QString getAuthorEmail () const
 Get the email adress of the module author. More...
 
virtual void handleMouseClicks (class QMouseEvent *)
 Handle mouse clicks. More...
 
virtual void handleMouseWheel (class QWheelEvent *)
 Handle mouse wheel. More...
 
virtual bool handleMouseMoves (int x, int y, Qt::MouseButtons b)
 Handle mouse moves. More...
 
virtual void handleKeys (class QKeyEvent *e)
 Handle key events. More...
 
virtual bool handlePinch (qreal scale, bool started)
 Handle pinch gesture events. More...
 
virtual bool configureGui (bool show=true)
 Detect or show the configuration GUI elements for the module. More...
 

Properties

bool labelsDisplayed
 
bool orbitsDisplayed
 
bool trailsDisplayed
 
bool planetsDisplayed
 

Additional Inherited Members

- Public Types inherited from StelModule
enum  StelModuleSelectAction { AddToSelection, ReplaceSelection, RemoveFromSelection }
 Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More...
 
enum  StelModuleActionName {
  ActionDraw, ActionUpdate, ActionHandleMouseClicks, ActionHandleMouseMoves,
  ActionHandleKeys
}
 Define the possible action for which an order is defined. More...
 
- Protected Member Functions inherited from StelModule
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action to the StelActionMgr object. More...
 
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action to the StelActionMgr object. More...
 

Detailed Description

This StelObjectModule derivative is used to model SolarSystem bodies.

This includes the Major Planets, Minor Planets and Comets.

Definition at line 46 of file SolarSystem.hpp.

Member Function Documentation

void SolarSystem::computePositions ( double  date,
const Vec3d observerPos = Vec3d(0.) 
)

Compute the position and transform matrix for every element of the solar system.

Parameters
observerPosPosition of the observer in heliocentric ecliptic frame (Required for light travel time computation).
datethe date in JDay
Deprecated:
??? In the "deprecated" section, but used in SolarSystem::init()
virtual void SolarSystem::deinit ( )
virtual

Called before the module will be delete, and before the openGL context is suppressed.

Deinitialize all openGL texture in this method.

Reimplemented from StelModule.

virtual void SolarSystem::draw ( StelCore core)
virtual

Draw SolarSystem objects (planets).

Parameters
coreThe StelCore object.
Returns
The maximum squared distance in pixels that any SolarSystem object has travelled since the last update.

Reimplemented from StelModule.

QStringList SolarSystem::getAllPlanetEnglishNames ( ) const

Get the list of all the planet english names.

QStringList SolarSystem::getAllPlanetLocalizedNames ( ) const

Get the list of all the planet localized names.

const QList<PlanetP>& SolarSystem::getAllPlanets ( ) const
inline

Get the list of all the bodies of the solar system.

Deprecated:
Used in LandscapeMgr::update(), but commented out.

Definition at line 346 of file SolarSystem.hpp.

QString SolarSystem::getApparentMagnitudeAlgorithmOnEarth ( ) const
slot

Get the algorithm used for computation of apparent magnitudes for planets in case observer on the Earth.

virtual double SolarSystem::getCallOrder ( StelModuleActionName  actionName) const
virtual

Used to determine what order to draw the various StelModules.

Reimplemented from StelModule.

double SolarSystem::getDistanceToPlanet ( QString  planetName) const
slot

Get distance to Solar system bodies from scripts.

Parameters
planetNamethe case in-sensistive English planet name.
Returns
a distance (in AU)
PlanetP SolarSystem::getEarth ( ) const
inline

Get the Planet object pointer for the Earth.

Definition at line 312 of file SolarSystem.hpp.

double SolarSystem::getElongationForPlanet ( QString  planetName) const
slot

Get elongation for Solar system bodies from scripts.

Parameters
planetNamethe case in-sensistive English planet name.
Returns
a elongation (in radians)
bool SolarSystem::getFlagHints ( ) const
slot

Get the current value of the flag which determines if planet hints are drawn or hidden along labels.

bool SolarSystem::getFlagIsolatedTrails ( void  ) const
slot

Get the current value of the flag which enables showing of isolated trails for selected objects only or not.

bool SolarSystem::getFlagLabels ( ) const
slot

Get the current value of the flag which determines if planet labels are drawn or hidden.

bool SolarSystem::getFlagLightTravelTime ( void  ) const
inlineslot

Get the current value of the flag which determines if light travel time calculation is used or not.

Definition at line 178 of file SolarSystem.hpp.

bool SolarSystem::getFlagMarkers ( ) const
inlineslot

Get the current value of the flag which determines if planet markers are drawn or hidden.

Definition at line 172 of file SolarSystem.hpp.

bool SolarSystem::getFlagMoonScale ( void  ) const
inlineslot

Get the current value of the flag which determines if Earth's moon is scaled or not.

Definition at line 226 of file SolarSystem.hpp.

bool SolarSystem::getFlagNativeNames ( void  ) const
slot

Get the current value of the flag which enables showing native names for planets or not.

bool SolarSystem::getFlagOrbits ( void  ) const
inlineslot

Get the current value of the flag which determines if planet orbits are drawn or hidden.

Definition at line 167 of file SolarSystem.hpp.

bool SolarSystem::getFlagPlanets ( ) const
slot

Get the current value of the flag which determines if planet are drawn or hidden.

bool SolarSystem::getFlagTrails ( ) const
slot

Get the current value of the flag which determines if planet trails are drawn or hidden.

bool SolarSystem::getFlagTranslatedNames ( void  ) const
slot

Get the current value of the flag which enables showing translated names for planets or not.

float SolarSystem::getLabelsAmount ( void  ) const
inlineslot

Get the amount of planet labels.

The real amount is also proportional with FOV.

Returns
the amount between 0 and 10. 0 is no labels, 10 is maximum of labels

Definition at line 162 of file SolarSystem.hpp.

const Vec3f& SolarSystem::getLabelsColor ( void  ) const
slot

Get the current color used to draw planet labels.

PlanetP SolarSystem::getMoon ( ) const
inline

Get the Planet object pointer for Earth's moon.

Definition at line 315 of file SolarSystem.hpp.

float SolarSystem::getMoonScale ( void  ) const
inlineslot

Get the display scaling factor for Earth's oon.

Definition at line 231 of file SolarSystem.hpp.

Vec3f SolarSystem::getOrbitsColor ( void  ) const
slot

Get the current color used to draw planet orbit lines.

double SolarSystem::getPhaseAngleForPlanet ( QString  planetName) const
slot

Get phase angle for Solar system bodies from scripts.

Parameters
planetNamethe case in-sensistive English planet name.
Returns
a phase angle (in radians)
float SolarSystem::getPhaseForPlanet ( QString  planetName) const
slot

Get phase for Solar system bodies from scripts.

Parameters
planetNamethe case in-sensistive English planet name.
Returns
a phase
QString SolarSystem::getPlanetHashString ( )

Get a hash of locale and ssystem.ini names for use with the TUI.

Returns
A newline delimited hash of localized:standard planet names. Planet translated name is PARENT : NAME
Deprecated:
???
QString SolarSystem::getPlanetType ( QString  planetName) const
slot

Get type for Solar system bodies from scripts.

Parameters
planetNamethe case in-sensistive English planet name.
Returns
a type of planet (planet, moon, asteroid, comet, plutoid)
float SolarSystem::getPlanetVMagnitude ( QString  planetName,
bool  withExtinction = false 
) const
slot

Get the V magnitude for Solar system bodies from scripts.

Parameters
planetNamethe case in-sensistive English planet name.
withExtinctionthe flag for use extinction effect for magnitudes (default not use)
Returns
a magnitude
Vec3f SolarSystem::getPointersColor ( ) const
inlineslot

Get the current color used to draw planet pointers.

Definition at line 221 of file SolarSystem.hpp.

PlanetP SolarSystem::getSun ( ) const
inline

Get the Planet object pointer for the Sun.

Definition at line 309 of file SolarSystem.hpp.

Vec3f SolarSystem::getTrailsColor ( ) const
inlineslot

Get the current color used to draw planet trails lines.

Definition at line 211 of file SolarSystem.hpp.

virtual void SolarSystem::init ( )
virtual

Initialize the SolarSystem.

Includes:

  • loading planetary body orbital and model data from data/ssystem.ini
  • perform initial planet position calculation
  • set display options from application settings

Implements StelModule.

virtual QStringList SolarSystem::listMatchingObjects ( const QString &  objPrefix,
int  maxNbItem = 5,
bool  useStartOfWords = false 
) const
virtual

Find objects by translated name prefix.

Find and return the list of at most maxNbItem objects auto-completing the passed object English name.

Parameters
objPrefixthe case insensitive first letters of the searched object.
maxNbItemthe maximum number of returned object names.
useStartOfWordsthe autofill mode for returned objects names.
Returns
a list of matching object name by order of relevance, or an empty list if nothing matches.

Implements StelObjectModule.

virtual QStringList SolarSystem::listMatchingObjectsI18n ( const QString &  objPrefix,
int  maxNbItem = 5,
bool  useStartOfWords = false 
) const
virtual

Find objects by translated name prefix.

Find and return the list of at most maxNbItem objects auto-completing the passed object I18n name.

Parameters
objPrefixthe case insensitive first letters of the searched object.
maxNbItemthe maximum number of returned object names.
useStartOfWordsthe autofill mode for returned objects names.
Returns
a list of matching object name by order of relevance, or an empty list if nothing matches.

Implements StelObjectModule.

bool SolarSystem::nearLunarEclipse ( )

Determine if a lunar eclipse is close at hand?

void SolarSystem::reloadPlanets ( )

Reload the planets.

virtual QList<StelObjectP> SolarSystem::searchAround ( const Vec3d v,
double  limitFov,
const StelCore core 
) const
virtual

Search for SolarSystem objects in some area around a point.

Parameters
vA vector representing a point in the sky.
limitFovThe radius of the circle around the point v which defines the size of the area to search.
corethe core object
Returns
A STL vector of StelObjectP (pointers) containing all SolarSystem objects found in the specified area. This vector is not sorted by distance from v.

Implements StelObjectModule.

PlanetP SolarSystem::searchByEnglishName ( QString  planetEnglishName) const

Get a pointer to a Planet object.

Parameters
planetEnglishNamethe English name of the desired planet.
Returns
The matching planet pointer if exists or NULL.
virtual StelObjectP SolarSystem::searchByName ( const QString &  name) const
virtual

Search for a SolarSystem object based on the English name.

Parameters
namethe case in-sensistive English planet name.
Returns
a StelObjectP for the object if found, else NULL.

Implements StelObjectModule.

virtual StelObjectP SolarSystem::searchByNameI18n ( const QString &  nameI18n) const
virtual

Search for a SolarSystem object based on the localised name.

Parameters
nameI18nthe case in-sensistive translated planet name.
Returns
a StelObjectP for the object if found, else NULL.

Implements StelObjectModule.

void SolarSystem::setApparentMagnitudeAlgorithmOnEarth ( QString  algorithm)
slot

Set the algorithm for computation of apparent magnitudes for planets in case observer on the Earth.

Possible values:

  • Planesas (algorithm provided by Pere Planesas (Observatorio Astronomico Nacional))
  • Mueller (G. Mueller, based on visual observations 1877-91. [Expl.Suppl.1961])
  • Harris (Astronomical Almanac 1984 and later. These give V (instrumental) magnitudes) Details: J. Meeus "Astronomical Algorithms" (2nd ed., with corrections as of August 10, 2009) p.283-286. O. Montenbruck, T. Pfleger "Astronomy on the Personal Computer" (4th ed.) p.143-145. Daniel L. Harris "Photometry and Colorimetry of Planets and Satellites" http://adsabs.harvard.edu/abs/1961plsa.book..272H Hint: Default option in config.ini: astro/apparent_magnitude_algorithm = Harris
    Parameters
    algorithmthe case in-sensitive algorithm name
    Note
    : The structure of algorithms is almost identical, just the numbers are different! You should activate Mueller's algorithm for simulate the eye's impression. (Esp. Venus!)
void SolarSystem::setFlagHints ( bool  b)
slot

Set flag which determines if planet hints are drawn or hidden along labels.

void SolarSystem::setFlagIsolatedTrails ( bool  b)
slot

Set flag which enabled the showing of isolated trails for selected objects only or not.

void SolarSystem::setFlagLabels ( bool  b)
slot

Set flag which determines if planet labels are drawn or hidden.

void SolarSystem::setFlagLightTravelTime ( bool  b)
slot

Set flag which determines if the light travel time calculation is used or not.

void SolarSystem::setFlagMarkers ( bool  b)
inlineslot

Set flag which determines if planet markers are drawn or hidden.

Definition at line 170 of file SolarSystem.hpp.

void SolarSystem::setFlagMoonScale ( bool  b)
slot

Set flag which determines if Earth's moon is scaled or not.

void SolarSystem::setFlagNativeNames ( bool  b)
slot

Set flag which enable use native names for planets or not.

void SolarSystem::setFlagOrbits ( bool  b)
slot

Set flag which determines if planet orbits are drawn or hidden.

void SolarSystem::setFlagPlanets ( bool  b)
slot

Set flag which determines if planets are drawn or hidden.

void SolarSystem::setFlagTrails ( bool  b)
slot

Set flag which determines if planet trails are drawn or hidden.

void SolarSystem::setFlagTranslatedNames ( bool  b)
slot

Set flag which enable use translated names for planets or not.

void SolarSystem::setFontSize ( float  newFontSize)
slot

Set planet names font size.

void SolarSystem::setLabelsAmount ( float  a)
inlineslot

Set the amount of planet labels.

The real amount is also proportional with FOV. The limit is set in function of the planets magnitude

Parameters
athe amount between 0 and 10. 0 is no labels, 10 is maximum of labels

Definition at line 159 of file SolarSystem.hpp.

void SolarSystem::setLabelsColor ( const Vec3f c)
slot

Set the color used to draw planet labels.

Parameters
cThe color of the planet labels
// example of usage in scripts
void SolarSystem::setMoonScale ( double  f)
slot

Set the display scaling factor for Earth's moon.

void SolarSystem::setOrbitsColor ( const Vec3f c)
slot

Set the color used to draw planet orbit lines.

Parameters
cThe color of the planet orbit lines
// example of usage in scripts
void SolarSystem::setPointersColor ( const Vec3f c)
inlineslot

Set the color used to draw planet pointers.

Parameters
cThe color of the planet pointers
// example of usage in scripts

Definition at line 219 of file SolarSystem.hpp.

void SolarSystem::setTrailsColor ( const Vec3f c)
inlineslot

Set the color used to draw planet trails lines.

Parameters
cThe color of the planet trails lines
// example of usage in scripts

Definition at line 209 of file SolarSystem.hpp.

virtual void SolarSystem::update ( double  deltaTime)
virtual

Update time-varying components.

This includes planet motion trails.

Implements StelModule.

void SolarSystem::updateI18n ( )
slot

Translate names. (public so that SolarSystemEditor can call it).


The documentation for this class was generated from the following file: