Stellarium 0.11.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure
Public Member Functions | Static Public Member Functions

MinorPlanet Class Reference

#include <MinorPlanet.hpp>

List of all members.

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)
virtual QString getInfoString (const StelCore *core, const InfoStringGroup &flags) const
virtual float getVMagnitude (const StelCore *core) const
virtual void translateName (StelTranslator &trans)
void setMinorPlanetNumber (int number)
void setProvisionalDesignation (QString designation)
void setAbsoluteMagnitudeAndSlope (double magnitude, double slope)

Static Public Member Functions

static QString renderProvisionalDesignationinHtml (QString plainText)

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.


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.

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.

virtual void MinorPlanet::translateName ( StelTranslator trans) [virtual]

sets the nameI18 property with the appropriate translation.

Function overriden to handle the problem with name conflicts.

Reimplemented from Planet.