Stellarium  0.18.3
Public Member Functions | Friends
Comet Class Reference

#include <Comet.hpp>

Public Member Functions

 Comet (const QString &englishName, double radius, double oblateness, Vec3f halocolor, float albedo, float roughness, float outgas_intensity, float outgas_falloff, const QString &texMapName, const QString &objModelName, posFuncType _coordFunc, void *orbitPtr, OsculatingFunctType *osculatingFunc, bool closeOrbit, bool hidden, const QString &pTypeStr, float dustTailWidthFact=1.5f, float dustTailLengthFact=0.4f, float dustTailBrightnessFact=1.5f)
 
virtual QString getInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Get a string with data about the Comet. More...
 
virtual QVariantMap getInfoMap (const StelCore *core) const
 In addition to Planet::getInfoMap(), Comets provides estimates for. More...
 
virtual float getVMagnitude (const StelCore *core) const
 
virtual void translateName (const StelTranslator &trans)
 sets the nameI18 property with the appropriate translation. More...
 
virtual QString getEnglishName (void) const
 Return object's name in english.
 
virtual QString getNameI18n (void) const
 Return translated object's name.
 
QString getCommonEnglishName (void) const
 
QString getCommonNameI18n (void) const
 
void setAbsoluteMagnitudeAndSlope (const float magnitude, const float slope)
 sets absolute magnitude and slope parameter. More...
 
void setSemiMajorAxis (const double value)
 set value for semi-major axis in AU
 
virtual double getSiderealPeriod () const
 get sidereal period for comet, days, or returns 0 if not possible (paraboloid, hyperboloid orbit)
 
virtual void draw (StelCore *core, float maxMagLabels, const QFont &planetNameFont)
 re-implementation of Planet's draw()
 
virtual void update (int deltaTime)
 
- Public Member Functions inherited from Planet
 Planet (const QString &englishName, double radius, double oblateness, Vec3f halocolor, float albedo, float roughness, const QString &texMapName, const QString &normalMapName, const QString &objModelName, posFuncType _coordFunc, void *anOrbitPtr, 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.
 
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)
 
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.
 
virtual Vec3f getInfoColor (void) const
 Get a color used to display info about the object.
 
virtual QString getType (void) const
 Return object's type. It should be the name of the class.
 
virtual QString getID (void) const
 Returns a unique identifier for this object. More...
 
virtual Vec3d getJ2000EquatorialPos (const StelCore *core) const
 Get observer-centered equatorial coordinates at equinox J2000.
 
QString getCommonEnglishName (void) const
 
QString getCommonNameI18n (void) const
 
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.
 
virtual bool hasAtmosphere (void)
 
virtual bool hasHalo (void)
 
float getAxisRotation (void)
 
double getRadius (void) const
 Get the equator radius of the planet in AU. More...
 
double getOneMinusOblateness (void) const
 Get the value (1-f) for oblateness f.
 
double getSiderealDay (void) const
 Get duration of sidereal day.
 
double getMeanSolarDay (void) const
 Get duration of mean solar day.
 
double getAlbedo (void) const
 Get albedo.
 
const QString & getTextMapName () const
 
const QString getPlanetTypeString () const
 
PlanetType getPlanetType () const
 
void setNativeName (QString planet)
 
void setIAUMoonNumber (QString designation)
 set the IAU moon number (designation of the moon), if any.
 
float getAbsoluteMagnitude () const
 Return the absolute magnitude (read from file ssystem.ini)
 
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...
 
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.
 
virtual 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)
 
double getElongation (const Vec3d &obsPos) const
 Get the elongation angle (rad) for an observer at pos obsPos in heliocentric coordinates (in AU)
 
double getSpheroidAngularSize (const StelCore *core) const
 Get the angular size of the spheroid of the planet (i.e. without the rings)
 
float getPhase (const Vec3d &obsPos) const
 Get the planet phase [0=dark..1=full] for an observer at pos obsPos in heliocentric coordinates (in AU)
 
Vec3d getEclipticPos () const
 Get the Planet position in the parent Planet ecliptic coordinate in AU.
 
Vec3d getHeliocentricEclipticPos () const
 Return the heliocentric ecliptical position.
 
Vec3d getHeliocentricPos (Vec3d) const
 Return the heliocentric transformation for local coordinate.
 
void setHeliocentricEclipticPos (const Vec3d &pos)
 
Vec3d getEclipticVelocity () const
 Get the planet velocity around the parent planet in ecliptical coordinates in AU/d.
 
Vec3d getHeliocentricEclipticVelocity () const
 Get the planet's heliocentric velocity in the solar system in ecliptical coordinates in AU/d. Required for aberration!
 
double computeDistance (const Vec3d &obsHelioPos)
 Compute the distance to the given position in heliocentric coordinates (in AU)
 
double getDistance (void) const
 
void setRings (Ring *r)
 
void setSphereScale (float s)
 
float getSphereScale () const
 
const QSharedPointer< PlanetgetParent (void) const
 
void setFlagHints (bool b)
 
bool getFlagHints (void) const
 
void setFlagLabels (bool b)
 
bool getFlagLabels (void) const
 
void setFlagNativeName (bool b)
 
bool getFlagNativeName (void) const
 
void setFlagTranslatedName (bool b)
 
bool getFlagTranslatedName (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.
 
- 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.
 
Vec3d getEquinoxEquatorialPosApparent (const StelCore *core) const
 Like getEquinoxEquatorialPos(core), but always adds refraction correction to the position.
 
Vec3d getEquinoxEquatorialPosAuto (const StelCore *core) const
 Like getEquinoxEquatorialPos(core), but adds refraction correction to the position if atmosphere is active.
 
Vec3d getGalacticPos (const StelCore *core) const
 Get observer-centered galactic coordinates.
 
Vec3d getSupergalacticPos (const StelCore *core) const
 Get observer-centered supergalactic coordinates.
 
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...
 
bool isAboveHorizon (const StelCore *core) const
 Checking position an object above mathematical horizon for current location. More...
 
bool isAboveRealHorizon (const StelCore *core) const
 Checking position an object above real horizon for current location. More...
 
Vec3f getRTSTime (StelCore *core) const
 Get today's time of rise, transit and set for celestial object for current location. More...
 
float getVMagnitudeWithExtinction (const StelCore *core) const
 Return object's apparent V magnitude as seen from observer including extinction. More...
 

Friends

class SolarSystem
 

Additional Inherited Members

- Public Types inherited from Planet
enum  PlanetType {
  isStar, isPlanet, isMoon, isObserver,
  isArtificial, isAsteroid, isPlutino, isComet,
  isDwarfPlanet, isCubewano, isSDO, isOCO,
  isSednoid, isInterstellar, isUNDEFINED
}
 numeric typecodes for the type descriptions in ssystem.ini
 
enum  PlanetOrbitColorStyle { ocsOneColor, ocsGroups, ocsMajorPlanets }
 
enum  ApparentMagnitudeAlgorithm {
  Mueller_1893, AstronomicalAlmanac_1984, ExplanatorySupplement_1992, ExplanatorySupplement_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,
  Velocity = 0x00000100, Extra = 0x00000200, HourAngle = 0x00000400, AbsoluteMagnitude = 0x00000800,
  GalacticCoord = 0x00001000, SupergalacticCoord = 0x00002000, ObjectType = 0x00004000, EclipticCoordJ2000 = 0x00008000,
  EclipticCoordOfDate = 0x00010000, IAUConstellation = 0x00020000, SiderealTime = 0x00040000, RTSTime = 0x00080000,
  NoFont = 0x00100000, PlainText = 0x00200000
}
 Used as named bitfield flags as specifiers to filter results of getInfoString. More...
 
- Static Public Member Functions inherited from Planet
static void init ()
 Initializes static vars. Must be called before creating first planet.
 
static ApparentMagnitudeAlgorithm getApparentMagnitudeAlgorithm ()
 
static const QString getApparentMagnitudeAlgorithmString ()
 
static void setApparentMagnitudeAlgorithm (QString algorithm)
 
static void setApparentMagnitudeAlgorithm (ApparentMagnitudeAlgorithm algorithm)
 
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 setInterstellarOrbitColor (const Vec3f &oc)
 
static const Vec3fgetInterstellarOrbitColor ()
 
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 ()
 
- Data Fields inherited from Planet
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 inherited from Planet
static const QString PLANET_TYPE
 
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 orbitInterstellarColor
 
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.
 
- Protected Member Functions inherited from Planet
void computeModelMatrix (Mat4d &result) const
 
Vec3f getCurrentOrbitColor () const
 
QString getSkyLabel (const StelCore *core) const
 
void draw3dModel (StelCore *core, StelProjector::ModelViewTranformP transfo, float screenSz, bool drawOnlyRing=false)
 
bool drawObjModel (StelPainter *painter, float screenSz)
 
bool drawObjShadowMap (StelPainter *painter, QMatrix4x4 &shadowMatrix)
 
bool ensureObjLoaded ()
 Starts the OBJ loading process, if it has not been done yet. More...
 
void drawSphere (StelPainter *painter, float screenSz, bool drawOnlyRing=false)
 
void drawSurvey (StelCore *core, StelPainter *painter)
 
void drawHints (const StelCore *core, const QFont &planetNameFont)
 
PlanetOBJModelloadObjModel () const
 
- Protected Member Functions inherited from StelObject
QString getCommonInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Format the positional info string containing J2000/of date/altaz/hour angle positions and constellation, sidereal time, etc. for the object.
 
virtual QString getMagnitudeInfoString (const StelCore *core, const InfoStringGroup &flags, const double alt_app, const int decimals=1) const
 Format the magnitude info string for the object. More...
 
void postProcessInfoString (QString &str, const InfoStringGroup &flags) const
 Apply post processing on the info string.
 
- Protected Attributes inherited from Planet
QString englishName
 
QString nameI18
 
QString nativeName
 
QString texMapName
 
QString normalMapName
 
RotationElements re
 
double radius
 
double oneMinusOblateness
 
Vec3d eclipticPos
 
Vec3d eclipticVelocity
 
Vec3d screenPos
 
Vec3f haloColor
 
float absoluteMagnitude
 
float albedo
 
float roughness
 
float outgas_intensity
 
float outgas_falloff
 
Mat4d rotLocalToParent
 
float axisRotation
 
StelTextureSP texMap
 
StelTextureSP normalMap
 
PlanetOBJModelobjModel
 
QFuture< PlanetOBJModel * > * objModelLoader
 
QString objModelPath
 
HipsSurveyP survey
 
Ringrings
 
double distance
 
float sphereScale
 
double lastJDE
 
posFuncType coordFunc
 
void * orbitPtr
 
OsculatingFunctType *const osculatingFunc
 
QSharedPointer< Planetparent
 
QList< QSharedPointer< Planet > > satellites
 
LinearFader hintFader
 
LinearFader labelsFader
 
bool flagLabels
 
bool hidden
 
bool atmosphere
 
bool halo
 
PlanetType pType
 
QOpenGLFunctions * gl
 
- Static Protected Attributes inherited from Planet
static StelTextureSP texEarthShadow
 
static ApparentMagnitudeAlgorithm vMagAlgorithm
 
static bool shaderError
 
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
 

Detailed Description

Author
Bogdan Marinov, Georg Zotti (orbit computation enhancements, tails)

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

Member Function Documentation

◆ getInfoMap()

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

Reimplemented from Planet.

◆ getInfoString()

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

Comets support the following InfoStringGroup flags:

  • Name
  • Magnitude
  • RaDec
  • AltAzi
  • Distance
  • 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 Comet.

Reimplemented from Planet.

◆ getVMagnitude()

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

Reimplemented from Planet.

◆ setAbsoluteMagnitudeAndSlope()

void Comet::setAbsoluteMagnitudeAndSlope ( const float  magnitude,
const float  slope 
)

These are the parameters in the IAU's two-parameter magnitude system for comets. They are used to calculate the apparent magnitude at different distances from the Sun. They are not used in the same way as the same parameters in MinorPlanet.

◆ translateName()

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

Function overriden to handle the problem with name conflicts.

Reimplemented from Planet.