Stellarium 0.11.4
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

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
 Get a string with data about the MinorPlanet.
virtual float getVMagnitude (const StelCore *core, bool withExtinction=false) const
 Return object's apparent V magnitude as seen from observer.
virtual void translateName (StelTranslator &trans)
 sets the nameI18 property with the appropriate translation.
void setMinorPlanetNumber (int number)
 set the minor planet's number, if any.
void setProvisionalDesignation (QString designation)
 sets a provisional designation.
void setAbsoluteMagnitudeAndSlope (double magnitude, double slope)
 sets absolute magnitude (H) and slope parameter (G).
void setSemiMajorAxis (double value)
 set value for semi-major axis in AU

Static Public Member Functions

static QString renderProvisionalDesignationinHtml (QString plainText)
 renders the subscript in a minor planet provisional designation with HTML.

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:
    core the StelCore object
    flags a set of InfoStringGroup items to include in the return value.
    Returns:
    a QString containing an HMTL encoded description of the MinorPlanet.

Reimplemented from Planet.

virtual float MinorPlanet::getVMagnitude ( const StelCore core,
bool  withExtinction = false 
) const [virtual]

Return object's apparent V magnitude as seen from observer.

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 ( StelTranslator trans  )  [virtual]

sets the nameI18 property with the appropriate translation.

Function overriden to handle the problem with name conflicts.

Reimplemented from Planet.

Generated on Sat Aug 25 22:13:31 2012 for Stellarium by  doxygen 1.6.3