Stellarium 0.15.2
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
Planet Class Reference
+ Inheritance diagram for Planet:
+ Collaboration diagram for Planet:

Classes

struct  MoonShaderVars
 
struct  PlanetShaderVars
 
struct  RingPlanetShaderVars
 

Public Types

enum  PlanetType {
  isStar, isPlanet, isMoon, isAsteroid,
  isPlutino, isComet, isDwarfPlanet, isCubewano,
  isSDO, isOCO, isSednoid, isUNDEFINED
}
 numeric typecodes for the type descriptions in ssystem.ini More...
 
enum  PlanetOrbitColorStyle { ocsOneColor, ocsGroups, ocsMajorPlanets }
 
enum  ApparentMagnitudeAlgorithm {
  Mueller_1893, Astr_Alm_1984, Expl_Sup_1992, Expl_Sup_2013,
  UndefinedAlgorithm, Generic
}
 
- Public Types inherited from StelObject
enum  InfoStringGroupFlags {
  Name = 0x00000001, CatalogNumber = 0x00000002, Magnitude = 0x00000004, RaDecJ2000 = 0x00000008,
  RaDecOfDate = 0x00000010, AltAzi = 0x00000020, Distance = 0x00000040, Size = 0x00000080,
  Extra = 0x00000100, HourAngle = 0x00000200, AbsoluteMagnitude = 0x00000400, GalacticCoord = 0x00000800,
  SupergalacticCoord = 0x00001000, ObjectType = 0x00002000, EclipticCoordJ2000 = 0x00004000, EclipticCoordOfDate = 0x00008000,
  IAUConstellation = 0x00010000, SiderealTime = 0x00020000, NoFont = 0x00040000, PlainText = 0x00080000
}
 Used as named bitfield flags as specifiers to filter results of getInfoString. More...
 

Public Member Functions

 Planet (const QString &englishName, int flagLighting, double radius, double oblateness, Vec3f halocolor, float albedo, const QString &texMapName, const QString &normalMapName, posFuncType _coordFunc, void *userDataPtr, OsculatingFunctType *osculatingFunc, bool closeOrbit, bool hidden, bool hasAtmosphere, bool hasHalo, const QString &pTypeStr)
 
virtual QString getInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Get a string with data about the Planet. More...
 
virtual QVariantMap getInfoMap (const StelCore *core) const
 In addition to the entries from StelObject::getInfoMap(), Planet objects provide. More...
 
virtual double getCloseViewFov (const StelCore *core) const
 Return the best FOV in degree to use for a close view of the object. More...
 
virtual double getSatellitesFov (const StelCore *core) const
 Return the best FOV in degree to use for a global view of the object satellite system (if there are satellites) More...
 
virtual double getParentSatellitesFov (const StelCore *core) const
 
virtual float getVMagnitude (const StelCore *core) const
 Return object's apparent V magnitude as seen from observer, without including extinction. More...
 
virtual float getSelectPriority (const StelCore *core) const
 Return a priority value which is used to discriminate objects by priority As for magnitudes, the lower is the higher priority. More...
 
virtual Vec3f getInfoColor (void) const
 Get a color used to display info about the object. More...
 
virtual QString getType (void) const
 Return object's type. It should be the name of the class. More...
 
virtual Vec3d getJ2000EquatorialPos (const StelCore *core) const
 Get observer-centered equatorial coordinates at equinox J2000. More...
 
virtual QString getEnglishName (void) const
 Return object's name in english. More...
 
virtual QString getNameI18n (void) const
 Return translated object's name. More...
 
virtual double getAngularSize (const StelCore *core) const
 Get angular semidiameter, degrees. If planet display is artificially enlarged (e.g. Moon upscale), value will also be increased. More...
 
virtual bool hasAtmosphere (void)
 
virtual bool hasHalo (void)
 
virtual void translateName (const StelTranslator &trans)
 Translate planet name using the passed translator. More...
 
virtual void draw (StelCore *core, float maxMagLabels, const QFont &planetNameFont)
 
double getRadius (void) const
 Get the radius of the planet in AU. More...
 
double getOneMinusOblateness (void) const
 Get the value (1-f) for oblateness f. More...
 
double getSiderealDay (void) const
 Get duration of sidereal day. More...
 
virtual double getSiderealPeriod (void) const
 Get duration of sidereal year. More...
 
double getMeanSolarDay (void) const
 Get duration of mean solar day. More...
 
double getAlbedo (void) const
 Get albedo. More...
 
const QString & getTextMapName () const
 
const QString getPlanetTypeString () const
 
PlanetType getPlanetType () const
 
void setNativeName (QString planet)
 
float getAbsoluteMagnitude () const
 Return the absolute magnitude (read from file ssystem.ini) More...
 
float getMeanOppositionMagnitude () const
 Return the mean opposition magnitude, defined as V(1,0)+5log10(a(a-1)) A return value of 100 signals invalid result. More...
 
ApparentMagnitudeAlgorithm getApparentMagnitudeAlgorithm () const
 
const QString getApparentMagnitudeAlgorithmString () const
 
void setApparentMagnitudeAlgorithm (QString algorithm)
 
double getSiderealTime (double JD, double JDE) const
 Compute the z rotation to use from equatorial to geographic coordinates. More...
 
Mat4d getRotEquatorialToVsop87 (void) const
 
void setRotEquatorialToVsop87 (const Mat4d &m)
 
const RotationElementsgetRotationElements (void) const
 
void setRotationElements (float _period, float _offset, double _epoch, float _obliquity, float _ascendingNode, float _precessionRate, double _siderealPeriod)
 
double getRotAscendingnode (void) const
 
double getRotObliquity (double JDE) const
 
void computePositionWithoutOrbits (const double dateJDE)
 Compute the position in the parent Planet coordinate system. More...
 
void computePosition (const double dateJDE)
 
void computeTransMatrix (double JD, double JDE)
 Compute the transformation matrix from the local Planet coordinate to the parent Planet coordinate. More...
 
double getPhaseAngle (const Vec3d &obsPos) const
 Get the phase angle (rad) for an observer at pos obsPos in heliocentric coordinates (in AU) More...
 
double getElongation (const Vec3d &obsPos) const
 Get the elongation angle (rad) for an observer at pos obsPos in heliocentric coordinates (in AU) More...
 
double getSpheroidAngularSize (const StelCore *core) const
 Get the angular size of the spheroid of the planet (i.e. without the rings) More...
 
float getPhase (const Vec3d &obsPos) const
 Get the planet phase for an observer at pos obsPos in heliocentric coordinates (in AU) More...
 
Vec3d getEclipticPos () const
 Get the Planet position in the parent Planet ecliptic coordinate in AU. More...
 
Vec3d getHeliocentricEclipticPos () const
 
Vec3d getHeliocentricPos (Vec3d) const
 
void setHeliocentricEclipticPos (const Vec3d &pos)
 
double computeDistance (const Vec3d &obsHelioPos)
 
double getDistance (void) const
 
void setRings (Ring *r)
 
void setSphereScale (float s)
 
float getSphereScale (void) const
 
const QSharedPointer< PlanetgetParent (void) const
 
virtual void update (int deltaTime)
 
void setFlagHints (bool b)
 
bool getFlagHints (void) const
 
void setFlagLabels (bool b)
 
bool getFlagLabels (void) const
 
void setFlagNativeName (bool b)
 
bool getFlagNativeName (void)
 
void setFlagTranslatedName (bool b)
 
bool getFlagTranslatedName (void)
 
void setFlagOrbits (bool b)
 
bool getFlagOrbits (void) const
 
void drawOrbit (const StelCore *)
 
QVector< const Planet * > getCandidatesForShadow () const
 Return the list of planets which project some shadow on this planet. More...
 
- Public Member Functions inherited from StelObject
virtual SphericalRegionP getRegion () const
 Default implementation of the getRegion method. More...
 
virtual Vec3d getPointInRegion () const
 Default implementation of the getPointInRegion method. More...
 
Vec3d getEquinoxEquatorialPos (const StelCore *core) const
 Get observer-centered equatorial coordinate at the current equinox The frame has its Z axis at the planet's current rotation axis At time 2000-01-01 this frame is almost the same as J2000, but ONLY if the observer is on earth. More...
 
Vec3d getEquinoxEquatorialPosApparent (const StelCore *core) const
 Like getEquinoxEquatorialPos(core), but always adds refraction correction to the position. More...
 
Vec3d getEquinoxEquatorialPosAuto (const StelCore *core) const
 Like getEquinoxEquatorialPos(core), but adds refraction correction to the position if atmosphere is active. More...
 
Vec3d getGalacticPos (const StelCore *core) const
 Get observer-centered galactic coordinates. More...
 
Vec3d getSupergalacticPos (const StelCore *core) const
 Get observer-centered supergalactic coordinates. More...
 
Vec3d getSiderealPosGeometric (const StelCore *core) const
 Get observer-centered hour angle + declination (at current equinox) It is the geometric position, i.e. More...
 
Vec3d getSiderealPosApparent (const StelCore *core) const
 Get observer-centered hour angle + declination (at current equinox) It is the apparent position, i.e. More...
 
Vec3d getAltAzPosGeometric (const StelCore *core) const
 Get observer-centered alt/az position It is the geometric position, i.e. More...
 
Vec3d getAltAzPosApparent (const StelCore *core) const
 Get observer-centered alt/az position It is the apparent position, i.e. More...
 
Vec3d getAltAzPosAuto (const StelCore *core) const
 Get observer-centered alt/az position It is the automatic position, i.e. More...
 
float getVMagnitudeWithExtinction (const StelCore *core) const
 Return object's apparent V magnitude as seen from observer including extinction. More...
 

Static Public Member Functions

static void init ()
 Initializes static vars. Must be called before creating first planet. More...
 
static void setLabelColor (const Vec3f &lc)
 
static const Vec3fgetLabelColor (void)
 
static void setOrbitColor (const Vec3f &oc)
 
static const Vec3fgetOrbitColor ()
 
static void setMajorPlanetOrbitColor (const Vec3f &oc)
 
static const Vec3fgetMajorPlanetOrbitColor ()
 
static void setMoonOrbitColor (const Vec3f &oc)
 
static const Vec3fgetMoonOrbitColor ()
 
static void setMinorPlanetOrbitColor (const Vec3f &oc)
 
static const Vec3fgetMinorPlanetOrbitColor ()
 
static void setDwarfPlanetOrbitColor (const Vec3f &oc)
 
static const Vec3fgetDwarfPlanetOrbitColor ()
 
static void setCubewanoOrbitColor (const Vec3f &oc)
 
static const Vec3fgetCubewanoOrbitColor ()
 
static void setPlutinoOrbitColor (const Vec3f &oc)
 
static const Vec3fgetPlutinoOrbitColor ()
 
static void setScatteredDiscObjectOrbitColor (const Vec3f &oc)
 
static const Vec3fgetScatteredDiscObjectOrbitColor ()
 
static void setOortCloudObjectOrbitColor (const Vec3f &oc)
 
static const Vec3fgetOortCloudObjectOrbitColor ()
 
static void setCometOrbitColor (const Vec3f &oc)
 
static const Vec3fgetCometOrbitColor ()
 
static void setSednoidOrbitColor (const Vec3f &oc)
 
static const Vec3fgetSednoidOrbitColor ()
 
static void setMercuryOrbitColor (const Vec3f &oc)
 
static const Vec3fgetMercuryOrbitColor ()
 
static void setVenusOrbitColor (const Vec3f &oc)
 
static const Vec3fgetVenusOrbitColor ()
 
static void setEarthOrbitColor (const Vec3f &oc)
 
static const Vec3fgetEarthOrbitColor ()
 
static void setMarsOrbitColor (const Vec3f &oc)
 
static const Vec3fgetMarsOrbitColor ()
 
static void setJupiterOrbitColor (const Vec3f &oc)
 
static const Vec3fgetJupiterOrbitColor ()
 
static void setSaturnOrbitColor (const Vec3f &oc)
 
static const Vec3fgetSaturnOrbitColor ()
 
static void setUranusOrbitColor (const Vec3f &oc)
 
static const Vec3fgetUranusOrbitColor ()
 
static void setNeptuneOrbitColor (const Vec3f &oc)
 
static const Vec3fgetNeptuneOrbitColor ()
 

Public Attributes

bool flagNativeName
 
bool flagTranslatedName
 
LinearFader orbitFader
 
Vec3d orbit [ORBIT_SEGMENTS+1]
 
Vec3d orbitP [ORBIT_SEGMENTS+1]
 
double lastOrbitJDE
 
double deltaJDE
 
double deltaOrbitJDE
 
bool orbitCached
 
bool closeOrbit
 

Static Public Attributes

static Vec3f orbitColor
 
static Vec3f orbitMajorPlanetsColor
 
static Vec3f orbitMoonsColor
 
static Vec3f orbitMinorPlanetsColor
 
static Vec3f orbitDwarfPlanetsColor
 
static Vec3f orbitCubewanosColor
 
static Vec3f orbitPlutinosColor
 
static Vec3f orbitScatteredDiscObjectsColor
 
static Vec3f orbitOortCloudObjectsColor
 
static Vec3f orbitCometsColor
 
static Vec3f orbitSednoidsColor
 
static Vec3f orbitMercuryColor
 
static Vec3f orbitVenusColor
 
static Vec3f orbitEarthColor
 
static Vec3f orbitMarsColor
 
static Vec3f orbitJupiterColor
 
static Vec3f orbitSaturnColor
 
static Vec3f orbitUranusColor
 
static Vec3f orbitNeptuneColor
 
static bool permanentDrawingOrbits
 
static PlanetOrbitColorStyle orbitColorStyle
 
- Static Public Attributes inherited from StelObject
static const InfoStringGroupFlags AllInfo
 A pre-defined set of specifiers for the getInfoString flags argument to getInfoString. More...
 
static const InfoStringGroupFlags ShortInfo = (InfoStringGroupFlags)(Name|CatalogNumber|Magnitude|RaDecJ2000)
 A pre-defined set of specifiers for the getInfoString flags argument to getInfoString. More...
 

Protected Member Functions

void computeModelMatrix (Mat4d &result) const
 
Vec3f getCurrentOrbitColor ()
 
QString getSkyLabel (const StelCore *core) const
 
void draw3dModel (StelCore *core, StelProjector::ModelViewTranformP transfo, float screenSz, bool drawOnlyRing=false)
 
void drawSphere (StelPainter *painter, float screenSz, bool drawOnlyRing=false)
 
void drawHints (const StelCore *core, const QFont &planetNameFont)
 
- Protected Member Functions inherited from StelObject
QString getPositionInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Format the positional info string contain J2000/of date/altaz/hour angle positions for the object. More...
 
void postProcessInfoString (QString &str, const InfoStringGroup &flags) const
 Apply post processing on the info string. More...
 

Static Protected Member Functions

static void initShader ()
 
static void deinitShader ()
 

Protected Attributes

QString englishName
 
QString nameI18
 
QString nativeName
 
QString texMapName
 
QString normalMapName
 
int flagLighting
 
RotationElements re
 
double radius
 
double oneMinusOblateness
 
Vec3d eclipticPos
 
Vec3d screenPos
 
Vec3d previousScreenPos
 
Vec3f haloColor
 
float albedo
 
float absoluteMagnitude
 
Mat4d rotLocalToParent
 
float axisRotation
 
StelTextureSP texMap
 
StelTextureSP normalMap
 
Ringrings
 
double distance
 
float sphereScale
 
double lastJDE
 
posFuncType coordFunc
 
void * userDataPtr
 
OsculatingFunctType *const osculatingFunc
 
QSharedPointer< Planetparent
 
QList< QSharedPointer< Planet > > satellites
 
LinearFader hintFader
 
LinearFader labelsFader
 
bool flagLabels
 
bool hidden
 
bool atmosphere
 
bool halo
 
PlanetType pType
 
ApparentMagnitudeAlgorithm vMagAlgorithm
 

Static Protected Attributes

static StelTextureSP texEarthShadow
 
static Vec3f labelColor
 
static StelTextureSP hintCircleTex
 
static QMap< PlanetType, QString > pTypeMap
 
static QMap< ApparentMagnitudeAlgorithm, QString > vMagAlgorithmMap
 
static bool flagCustomGrsSettings
 
static double customGrsJD
 
static int customGrsLongitude
 
static double customGrsDrift
 
static PlanetShaderVars planetShaderVars
 
static QOpenGLShaderProgram * planetShaderProgram
 
static RingPlanetShaderVars ringPlanetShaderVars
 
static QOpenGLShaderProgram * ringPlanetShaderProgram
 
static MoonShaderVars moonShaderVars
 
static QOpenGLShaderProgram * moonShaderProgram
 

Friends

class SolarSystem
 

Detailed Description

Definition at line 73 of file Planet.hpp.

Member Enumeration Documentation

numeric typecodes for the type descriptions in ssystem.ini

Definition at line 85 of file Planet.hpp.

Member Function Documentation

void Planet::computePositionWithoutOrbits ( const double  dateJDE)

Compute the position in the parent Planet coordinate system.

void Planet::computeTransMatrix ( double  JD,
double  JDE 
)

Compute the transformation matrix from the local Planet coordinate to the parent Planet coordinate.

This requires both flavours of JD in cases involving Earth.

float Planet::getAbsoluteMagnitude ( ) const
inline

Return the absolute magnitude (read from file ssystem.ini)

Definition at line 230 of file Planet.hpp.

double Planet::getAlbedo ( void  ) const
inline

Get albedo.

Definition at line 221 of file Planet.hpp.

virtual double Planet::getAngularSize ( const StelCore core) const
virtual

Get angular semidiameter, degrees. If planet display is artificially enlarged (e.g. Moon upscale), value will also be increased.

Implements StelObject.

QVector<const Planet*> Planet::getCandidatesForShadow ( ) const

Return the list of planets which project some shadow on this planet.

virtual double Planet::getCloseViewFov ( const StelCore ) const
virtual

Return the best FOV in degree to use for a close view of the object.

Reimplemented from StelObject.

Vec3d Planet::getEclipticPos ( ) const

Get the Planet position in the parent Planet ecliptic coordinate in AU.

double Planet::getElongation ( const Vec3d obsPos) const

Get the elongation angle (rad) for an observer at pos obsPos in heliocentric coordinates (in AU)

virtual QString Planet::getEnglishName ( void  ) const
virtual

Return object's name in english.

Implements StelObject.

Reimplemented in Comet, and MinorPlanet.

virtual Vec3f Planet::getInfoColor ( void  ) const
virtual

Get a color used to display info about the object.

Reimplemented from StelObject.

virtual QVariantMap Planet::getInfoMap ( const StelCore core) const
virtual

In addition to the entries from StelObject::getInfoMap(), Planet objects provide.

  • distance
  • phase (result of getPhase)
  • illumination (=100*phase)
  • phase-angle
  • phase-angle-dms (formatted string)
  • phase-angle-deg (formatted string)
  • elongation
  • elongation-dms (formatted string)
  • elongation-deg (formatted string)
  • type (object type description)

Reimplemented from StelObject.

Reimplemented in Comet.

virtual QString Planet::getInfoString ( const StelCore core,
const InfoStringGroup &  flags 
) const
virtual

Get a string with data about the Planet.

Planets support the following InfoStringGroup flags:

  • Name
  • Magnitude
  • RaDec
  • AltAzi
  • Distance
  • Size
  • PlainText
  • Extra: Heliocentric Ecliptical Coordinates & Observer-planetocentric Ecliptical Coordinates, Phase, illumination, phase angle & elongation from the Sun
    Parameters
    corethe StelCore object
    flagsa set of InfoStringGroup items to include in the return value.
    Returns
    a QString containing an HMTL encoded description of the Planet.

Implements StelObject.

Reimplemented in Comet, and MinorPlanet.

virtual Vec3d Planet::getJ2000EquatorialPos ( const StelCore core) const
virtual

Get observer-centered equatorial coordinates at equinox J2000.

Implements StelObject.

float Planet::getMeanOppositionMagnitude ( ) const

Return the mean opposition magnitude, defined as V(1,0)+5log10(a(a-1)) A return value of 100 signals invalid result.

double Planet::getMeanSolarDay ( void  ) const

Get duration of mean solar day.

virtual QString Planet::getNameI18n ( void  ) const
virtual

Return translated object's name.

Implements StelObject.

Reimplemented in Comet, and MinorPlanet.

double Planet::getOneMinusOblateness ( void  ) const
inline

Get the value (1-f) for oblateness f.

Definition at line 212 of file Planet.hpp.

float Planet::getPhase ( const Vec3d obsPos) const

Get the planet phase for an observer at pos obsPos in heliocentric coordinates (in AU)

double Planet::getPhaseAngle ( const Vec3d obsPos) const

Get the phase angle (rad) for an observer at pos obsPos in heliocentric coordinates (in AU)

double Planet::getRadius ( void  ) const
inline

Get the radius of the planet in AU.

Returns
the radius of the planet in astronomical units.

Definition at line 210 of file Planet.hpp.

virtual double Planet::getSatellitesFov ( const StelCore ) const
virtual

Return the best FOV in degree to use for a global view of the object satellite system (if there are satellites)

Reimplemented from StelObject.

virtual float Planet::getSelectPriority ( const StelCore ) const
virtual

Return a priority value which is used to discriminate objects by priority As for magnitudes, the lower is the higher priority.

Reimplemented from StelObject.

double Planet::getSiderealDay ( void  ) const
inline

Get duration of sidereal day.

Definition at line 214 of file Planet.hpp.

virtual double Planet::getSiderealPeriod ( void  ) const
inlinevirtual

Get duration of sidereal year.

Reimplemented in MinorPlanet, and Comet.

Definition at line 217 of file Planet.hpp.

double Planet::getSiderealTime ( double  JD,
double  JDE 
) const

Compute the z rotation to use from equatorial to geographic coordinates.

For general applicability we need both time flavours:

Parameters
JDis JD(UT) for Earth
JDEis used for other locations
double Planet::getSpheroidAngularSize ( const StelCore core) const

Get the angular size of the spheroid of the planet (i.e. without the rings)

virtual QString Planet::getType ( void  ) const
inlinevirtual

Return object's type. It should be the name of the class.

Implements StelObject.

Definition at line 188 of file Planet.hpp.

virtual float Planet::getVMagnitude ( const StelCore core) const
virtual

Return object's apparent V magnitude as seen from observer, without including extinction.

Reimplemented from StelObject.

Reimplemented in Comet, and MinorPlanet.

static void Planet::init ( )
static

Initializes static vars. Must be called before creating first planet.

virtual void Planet::translateName ( const StelTranslator trans)
virtual

Translate planet name using the passed translator.

Reimplemented in Comet, and MinorPlanet.


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