Stellarium 0.13.2
List of all members | Public Member Functions | Static Public Member Functions
MinorPlanet Class Reference

#include <MinorPlanet.hpp>

Public Member Functions

 MinorPlanet (const QString &englishName, int flagLighting, double radius, double oblateness, Vec3f color, float albedo, const QString &texMapName, posFuncType _coordFunc, void *userDataPtr, OsculatingFunctType *osculatingFunc, bool closeOrbit, bool hidden, const QString &pTypeStr)
 
virtual QString getInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Get a string with data about the MinorPlanet. More...
 
virtual float getVMagnitude (const StelCore *core) const
 Return object's apparent V magnitude as seen from observer, without including extinction. More...
 
virtual void translateName (const StelTranslator &trans)
 sets the nameI18 property with the appropriate translation. More...
 
void setMinorPlanetNumber (int number)
 set the minor planet's number, if any. More...
 
void setProvisionalDesignation (QString designation)
 sets a provisional designation. More...
 
void setAbsoluteMagnitudeAndSlope (double magnitude, double slope)
 sets absolute magnitude (H) and slope parameter (G). More...
 
void setSemiMajorAxis (double value)
 set value for semi-major axis in AU More...
 
double getSiderealPeriod () const
 get sidereal period for minor planet More...
 
- Public Member Functions inherited from Planet
 Q_ENUMS (PlanetType) enum PlanetType
 numeric typecodes for the type descriptions in ssystem.ini More...
 
 Planet (const QString &englishName, int flagLighting, double radius, double oblateness, Vec3f color, 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 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 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
 Return the angular radius of a circle containing the object as seen from the observer with the circle center assumed to be at getJ2000EquatorialPos(). More...
 
virtual bool hasAtmosphere (void)
 
virtual bool hasHalo (void)
 
virtual void draw (StelCore *core, float maxMagLabels, const QFont &planetNameFont)
 
double getRadius (void) const
 Get the radius of the planet in AU. More...
 
double getSiderealDay (void) const
 Get duration of sidereal day. More...
 
double getMeanSolarDay (void) const
 Get duration of mean solar day. More...
 
const QString & getTextMapName () const
 
const QString getPlanetTypeString () const
 
PlanetType getPlanetType () const
 
double getSiderealTime (double jd) const
 
Mat4d getRotEquatorialToVsop87 (void) const
 
void setRotEquatorialToVsop87 (const Mat4d &m)
 
const RotationElementsgetRotationElements (void) const
 
void computePositionWithoutOrbits (const double dateJD)
 
virtual void computePosition (const double dateJD)
 
void computeTransMatrix (double date)
 
double getPhaseAngle (const Vec3d &obsPos) const
 
double getElongation (const Vec3d &obsPos) const
 
double getSpheroidAngularSize (const StelCore *core) const
 
float getPhase (const Vec3d &obsPos) const
 
void setRotationElements (float _period, float _offset, double _epoch, float _obliquity, float _ascendingNode, float _precessionRate, double _siderealPeriod)
 
double getRotAscendingnode (void) const
 
double getRotObliquity (double JDay) const
 
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
 
void update (int deltaTime)
 
void setFlagHints (bool b)
 
bool getFlagHints (void) const
 
void setFlagLabels (bool b)
 
bool getFlagLabels (void) const
 
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
 Q_FLAGS (InfoStringGroup) static const InfoStringGroupFlags AllInfo
 A pre-defined set of specifiers for the getInfoString flags argument to getInfoString. More...
 
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 it's 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 getGalacticPos (const StelCore *core) const
 Get observer-centered galactic 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 QString renderProvisionalDesignationinHtml (QString plainText)
 renders the subscript in a minor planet provisional designation with HTML. More...
 
- Static Public Member Functions inherited from Planet
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 ()
 

Additional Inherited Members

- 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,
  ObjectType = 0x00001000, EclipticCoord = 0x00002000, PlainText = 0x00004000
}
 
typedef QFlags
< InfoStringGroupFlags
InfoStringGroup
 
- Public Attributes inherited from Planet
LinearFader orbitFader
 
Vec3d orbit [ORBIT_SEGMENTS+1]
 
Vec3d orbitP [ORBIT_SEGMENTS+1]
 
double lastOrbitJD
 
double deltaJD
 
double deltaOrbitJD
 
bool orbitCached
 
bool closeOrbit
 
- Static Public Attributes inherited from Planet
static Vec3f orbitColor
 
- Static Public Attributes inherited from StelObject
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 inherited from Planet
void computeModelMatrix (Mat4d &result) const
 
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 inherited from Planet
static void initShader ()
 
static void deinitShader ()
 
- Protected Attributes inherited from Planet
QString englishName
 
QString nameI18
 
QString texMapName
 
QString normalMapName
 
int flagLighting
 
RotationElements re
 
double radius
 
double oneMinusOblateness
 
Vec3d eclipticPos
 
Vec3d screenPos
 
Vec3d previousScreenPos
 
Vec3f color
 
float albedo
 
Mat4d rotLocalToParent
 
float axisRotation
 
StelTextureSP texMap
 
StelTextureSP normalMap
 
Ringrings
 
double distance
 
float sphereScale
 
double lastJD
 
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
 
- Static Protected Attributes inherited from Planet
static StelTextureSP texEarthShadow
 
static Vec3f labelColor
 
static StelTextureSP hintCircleTex
 
static QMap< PlanetType, QString > pTypeMap
 
static PlanetShaderVars planetShaderVars
 
static QOpenGLShaderProgram * planetShaderProgram
 
static RingPlanetShaderVars ringPlanetShaderVars
 
static QOpenGLShaderProgram * ringPlanetShaderProgram
 
static MoonShaderVars moonShaderVars
 
static QOpenGLShaderProgram * moonShaderProgram
 

Detailed Description

Author
Bogdan Marinov

This class implements a minor planet (an asteroid).

There are two main reasons for having a separate class from Planet:

Some of the code in this class is re-used from the parent Planet class.

Definition at line 38 of file MinorPlanet.hpp.

Member Function Documentation

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

Get a string with data about the MinorPlanet.

Asteroids support the following InfoStringGroup flags:

  • Name
  • Magnitude
  • RaDec
  • AltAzi
  • Distance
  • Size
  • PlainText
    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 MinorPlanet.

Reimplemented from Planet.

double MinorPlanet::getSiderealPeriod ( ) const
virtual

get sidereal period for minor planet

Reimplemented from Planet.

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

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

Reimplemented from Planet.

static QString MinorPlanet::renderProvisionalDesignationinHtml ( QString  plainText)
static

renders the subscript in a minor planet provisional designation with HTML.

Returns
an emtpy string if the source string is not a provisional designation.
void MinorPlanet::setAbsoluteMagnitudeAndSlope ( double  magnitude,
double  slope 
)

sets absolute magnitude (H) and slope parameter (G).

These are the parameters in the IAU's two-parameter magnitude system for minor planets. They are used to calculate the apparent magnitude at different phase angles.

void MinorPlanet::setMinorPlanetNumber ( int  number)

set the minor planet's number, if any.

The number should be specified as an additional parameter, as englishName is passed as a constant to Planet's constructor. The number can be set only once. Any further calls of this function will have no result.

void MinorPlanet::setProvisionalDesignation ( QString  designation)

sets a provisional designation.

At the moment, the only role is for it to be displayed in the info field.

void MinorPlanet::setSemiMajorAxis ( double  value)

set value for semi-major axis in AU

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

sets the nameI18 property with the appropriate translation.

Function overriden to handle the problem with name conflicts.

Reimplemented from Planet.


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