Stellarium  25.3
Public Member Functions | Static Public Member Functions | Protected Member Functions
MinorPlanet Class Reference

#include <MinorPlanet.hpp>

Public Member Functions

 MinorPlanet (const QString &englishName, double equatorialRadius, double oblateness, Vec3f halocolor, float albedo, float roughness, const QString &texMapName, const QString &normalMapName, const QString &horizonMapName, const QString &objModelName, posFuncType _coordFunc, KeplerOrbit *orbitPtr, OsculatingFunctType *osculatingFunc, bool closeOrbit, bool hidden, const QString &pTypeStr)
 
float getVMagnitude (const StelCore *core) const override
 Override for minor planets. More...
 
float getVMagnitude (const StelCore *core, const double eclipseFactor) const override
 Convenience method, necessary override. More...
 
void translateName (const StelTranslator &trans) override
 sets the nameI18 property with the appropriate translation. More...
 
QString getEnglishName (void) const override
 Return object's name in english. More...
 
QString getNameI18n (void) const override
 Return translated object's name For non-default skycultures, this is the user language translation of the english name (which should be native translated to english).
 
QString getIAUDesignation () const override
 gets an IAU provisional designation.
 
QString getCommonEnglishName (void) const
 get english name without the minor planet's number
 
void setMinorPlanetNumber (int number)
 set the minor planet's number, if any. More...
 
void setIAUDesignation (const QString &designation)
 sets an IAU provisional designation.
 
void setAbsoluteMagnitudeAndSlope (const float magnitude, const float slope)
 sets absolute magnitude (H) and slope parameter (G). More...
 
void updateEquatorialRadius (void)
 sets radius based on absolute magnitude and albedo.
 
void setSpectralType (const QString &sT, const QString &sB)
 set values for spectral types
 
void setColorIndexBV (float bv=99.f)
 set value for color index B-V
 
void setDiscoveryData (const QString &date, const QString &name)
 set the discovery circumstances of minor body More...
 
void setExtraDesignations (QStringList codes)
 sets a possible date, discovery and perihelion codes of the minor planets (A/ and I/ objects).
 
QStringList getExtraDesignations () const
 get list of comet codes
 
double getSiderealPeriod () const override
 get sidereal period for minor planet
 
- Public Member Functions inherited from Planet
 Planet (const QString &englishName, double equatorialRadius, double oblateness, Vec3f halocolor, float albedo, float roughness, const QString &texMapName, const QString &normalMapName, const QString &ahorizonMapName, const QString &objModelName, posFuncType _coordFunc, Orbit *anOrbitPtr, OsculatingFunctType *osculFunc, bool closeOrbit, bool hidden, bool hasAtmosphere, bool hasHalo, const QString &pTypeStr)
 
QString getInfoString (const StelCore *core, const InfoStringGroup &flags) const override
 Get a string with data about the Planet. More...
 
QVariantMap getInfoMap (const StelCore *core) const override
 In addition to the entries from StelObject::getInfoMap(), Planet objects provide. More...
 
double getCloseViewFov (const StelCore *core) const override
 Return the best FOV in degree to use for a close view of the object.
 
double getSatellitesFov (const StelCore *core) const override
 Return the best FOV in degree to use for a global view of the object satellite system (if there are satellites)
 
double getParentSatellitesFov (const StelCore *core) const override
 
float getVMagnitude (const StelCore *core) const override
 This actually calls getVMagnitude(core, 1.0); If there is danger the object is partly obscured (eclipsed), prefer to use getVMagnitude(core, eclipseFactor).
 
float getSelectPriority (const StelCore *core) const override
 Return a priority value which is used to discriminate objects by priority As for magnitudes, the lower is the higher priority.
 
Vec3f getInfoColor (void) const override
 Get a color used to display info about the object.
 
QString getType (void) const override
 
QString getObjectType (void) const override
 Get more specific Planet type for scripts. More...
 
QString getObjectTypeI18n (void) const override
 Get more specific Planet type for scripts. More...
 
QString getID (void) const override
 
Vec3d getJ2000EquatorialPos (const StelCore *core) const override
 A Planet's own eclipticPos is in VSOP87 ref. More...
 
QString getEnglishName (void) const override
 Return object's name in english. More...
 
QString getNameI18n (void) const override
 Return translated object's name For non-default skycultures, this is the user language translation of the english name (which should be native translated to english).
 
QString getNameNative (void) const override
 Return object's native name in the glyphs as written in skyculture descriptions (index.json). More...
 
QString getNameNativeI18n (void) const
 
QString getNamePronounce () const override
 retrieve pronunciation from the first of the cultural names
 
QString getScreenLabel () const override
 Combine screen label from various components, depending on settings in SkyCultureMgr.
 
QString getInfoLabel () const override
 Combine InfoString label from various components, depending on settings in SkyCultureMgr.
 
QStringList getCultureLabels (StelObject::CulturalDisplayStyle style) const
 Underlying worker that processes the culturalNames.
 
void removeAllCulturalNames ()
 
void addCulturalName (StelObject::CulturalName culturalName)
 Add a name for the currently set skyculture.
 
double getAngularRadius (const StelCore *core) const override
 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)
 
bool hasValidPositionalData (const double JDE, const PositionQuality purpose) const
 Returns whether planet positions are valid and useful for the current simulation time. More...
 
Vec2d getValidPositionalDataRange (const PositionQuality purpose) const
 Returns JDE dates of presumably valid data for positional calculation or acceptable range for graphics. More...
 
float getAxisRotation (void)
 
virtual void draw (StelCore *core, float maxMagLabels, const QFont &planetNameFont, const double eclipseFactor)
 
double getEquatorialRadius (void) const
 Get the equator radius of the planet in AU. More...
 
double getOneMinusOblateness (void) const
 Get the value (1-f) for oblateness f=polarRadius/equatorialRadius.
 
double getPolarRadius (void) const
 Get the polar radius of the planet in AU. More...
 
double getSiderealDay (void) const
 Get duration of sidereal day (earth days, may come from rot_periode or orbit_period (for moons) from ssystem_*.ini)
 
void setSiderealPeriod (const double siderealPeriod)
 set duration of sidereal year. More...
 
double getMeanSolarDay (void) const
 Get duration of mean solar day, in earth days.
 
double getAlbedo (void) const
 Get albedo.
 
const QString & getTextMapName () const
 
PlanetType getPlanetType () const
 
OrbitgetOrbit () const
 
void setIAUMoonNumber (const QString &designation)
 set the IAU moon number (designation of the moon), if any.
 
void setColorIndexBV (float bv=99.f)
 set value for color index B-V
 
void setDiscoveryData (const QString &date, const QString &name)
 set the discovery circumstances of celestial body More...
 
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.
 
double getMass () const
 Return the mass in kg.
 
double getSiderealTime (double JD, double JDE) const
 Compute the axial z rotation (daily rotation around the polar axis) [degrees] to use from equatorial to hour angle based coordinates. More...
 
Mat4d getRotEquatorialToVsop87 (void) const
 return a rotation matrix from the planet's equatorial coordinate frame to the VSOP87 (ecliptical J2000) frame. More...
 
void setRotEquatorialToVsop87 (const Mat4d &m)
 set a rotation matrix from the planet's equatorial coordinate frame to the VSOP87 (ecliptical J2000) frame. More...
 
const RotationElementsgetRotationElements (void) const
 
void setRotationElements (const QString name, const double _period, const double _offset, const double _epoch, const double _obliquity, const double _ascendingNode, const double _ra0, const double _ra1, const double _de0, const double _de1, const double _w0, const double _w1)
 Set the rotational elements. More...
 
double getRotAscendingNode (void) const
 Note: The only place where this is used is to build up orbits for planet moons w.r.t. the parent planet orientation.
 
double getRotObliquity (double JDE) const
 return angle between axis and normal of ecliptic plane (or, for a moon, equatorial/reference plane defined by parent). More...
 
virtual void computePosition (const StelObserver *observer, const double dateJDE, const Vec3d &aberrationPush)
 Compute the position and orbital velocity in the parent Planet coordinate system and set aberrationPush In case of the Sun, it is the heliocentric position and velocity so zeros are set Does not compute new position when dateJDE is less than deltaJDE away from lastJDE You can add the aberrationPush value according to Edot*lightTime in Explanatory Supplement (2013) formula 7.55.
 
virtual void computePosition (const double dateJDE, Vec3d &eclPosition, Vec3d &eclVelocity) const
 Compute the position and orbital velocity in the parent Planet coordinate system, and return them in eclPosition and eclVelocity In case of the Sun, it is the heliocentric position and velocity so zeros are set These may be preferred when we want to avoid setting the actual position (e.g., RTS computation)
 
void computeTransMatrix (double JD, double JDE)
 Compute the transformation matrix from the local Planet coordinate to the parent Planet coordinate. More...
 
Vec4d getRectangularCoordinates (const double longDeg, const double latDeg, const double altMetres=0.) const
 Retrieve planetocentric rectangular coordinates of a location on the ellipsoid surface, or with altitude altMetres above the ellipsoid surface. More...
 
Vec4d getHourlyProperMotion (const StelCore *core) const
 Retrieve the hourly proper motion of Solar system bodies. More...
 
double getPhaseAngle (const Vec3d &obsPos) const
 Get the phase angle (radians) for an observer at pos obsPos in heliocentric coordinates (in AU)
 
bool isWaning (const Vec3d &observerPosition, const Vec3d &observerVelocity) const
 Check whether the planet is in a waning phase, i.e. its phase angle is increasing.
 
double getElongation (const Vec3d &obsPos) const
 Get the elongation angle (angular distance, radians, 0<e<2pi) for an observer at pos obsPos in heliocentric coordinates (in AU)
 
double getElongationDLambda () const
 Get the elongation angle from the Sun in terms of difference in ecliptical longitude (radians) from the Sun. More...
 
double getSpheroidAngularRadius (const StelCore *core) const
 Get the angular radius (degrees) of the planet spheroid (i.e. without the rings)
 
float getPhase (const Vec3d &obsPos) const
 Get the planet phase (illuminated fraction of the planet disk, [0=dark..1=full]) for an observer at pos obsPos in heliocentric coordinates (in AU)
 
QPair< Vec4d, Vec3dgetSubSolarObserverPoints (const StelCore *core, bool jupiterGraphical=false) const
 Get planetographic coordinates of subsolar and sub-observer points. More...
 
bool isRotatingRetrograde () const
 returns if planet has retrograde rotation
 
Vec3d getEclipticPos (double dateJDE) const
 Get the Planet position in the parent Planet ecliptic coordinate in AU.
 
Vec3d getEclipticPos () const
 Get the last computed Planet position in the parent Planet ecliptic coordinate in AU.
 
Vec3d getHeliocentricEclipticPos () const
 Return the heliocentric ecliptical position.
 
Vec3d getHeliocentricEclipticPos (double dateJDE) const
 
Vec3d getBarycentricEclipticPos (double dateJDE) const
 Return the barycentric ecliptical position.
 
Vec3d getHeliocentricPos (Vec3d p) const
 Return the heliocentric transformation for local (parentocentric) coordinate. More...
 
void setHeliocentricEclipticPos (const Vec3d &pos)
 Propagate the heliocentric coordinates to parentocentric coordinates. More...
 
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.
 
Vec3d getBarycentricEclipticVelocity (double dateJDE) const
 Return the barycentric ecliptical velocity in the solar system in ecliptical coordinates in AU/d. Required for aberration!
 
double computeDistance (const Vec3d &obsHelioPos)
 Compute and return the distance to the given position in heliocentric ecliptical (J2000) coordinates (in AU) Preserves result for later retrieval by getDistance() As side effect, improve fps by juggling update frequency (deltaJDE) for asteroids and other minor bodies. More...
 
double getDistance (void) const
 Return the last computed distance to the given position in heliocentric ecliptical (J2000) coordinates (in AU)
 
void setRings (Ring *r)
 
void setSphereScale (double s)
 
double getSphereScale () 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 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.
 
Vec3d getAberrationPush () const
 
virtual Vec4d getClosestRTSTime (const StelCore *core, const double altitude=0.) const
 Compute times of nearest rise, transit and set for a solar system object for current location. More...
 
Vec4d getRTSTime (const StelCore *core, const double altitude=0.) const override
 Adaptation of getClosestRTSTime() to compute times of rise, transit and set for a solar system object for current location and date. More...
 
void resetTextures ()
 Reset planet textures to those defined at start time. (You may load other textures with replaceTexture()
 
void replaceTexture (const QString &texName)
 Use texture from. More...
 
void setSurvey (const HipsSurveyP &colors, const HipsSurveyP &normals, const HipsSurveyP &horizons)
 
- Public Member Functions inherited from StelObject
SphericalRegionP getRegion () const override
 Default implementation of the getRegion method. More...
 
Vec3d getPointInRegion () const override
 Default implementation of the getPointInRegion method. More...
 
virtual QString getNameTransliteration () const
 Return a secondary scientific transliteration of the native name. More...
 
virtual QString getNameIPA () const
 Return native name in International Phonetic Alphabet. Optional.
 
virtual QString getByname () const
 Return byname. Optional.
 
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...
 
float getParallacticAngle (const StelCore *core) const
 Get parallactic angle, which is the deviation between zenith angle and north angle. [radians].
 
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...
 
float getVMagnitudeWithExtinction (const StelCore *core, const float knownVMag=-1000.f, const float &magOffset=0.f) const
 Return object's apparent V magnitude as seen from observer including extinction. More...
 
virtual float getAirmass (const StelCore *core) const
 Return airmass value for the object (for atmosphere-dependent calculations) More...
 

Static Public Member Functions

static QString renderIAUDesignationinHtml (const QString &plainText)
 renders the subscript in a minor planet IAU provisional designation with HTML.
 
- Static Public Member Functions inherited from Planet
static void init ()
 Initializes static vars. Must be called before creating first planet.
 
static ApparentMagnitudeAlgorithm getApparentMagnitudeAlgorithm ()
 
static void setApparentMagnitudeAlgorithm (ApparentMagnitudeAlgorithm algorithm)
 
static float getPAsun (const Vec3d &sunPos, const Vec3d &objPos)
 Get the position angle of the illuminated limb of a planet The result depends on the arguments' coordinate system which must be identical. 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 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 ()
 

Protected Member Functions

QString getInfoStringName (const StelCore *core, const InfoStringGroup &flags) const override
 
QString getInfoStringExtra (const StelCore *core, const InfoStringGroup &flags) const override
 Any flag=Extra information to be displayed at the end.
 
- Protected Member Functions inherited from Planet
virtual QString getInfoStringAbsoluteMagnitude (const StelCore *core, const InfoStringGroup &flags) const
 
virtual QString getInfoStringExtraMag (const StelCore *core, const InfoStringGroup &flags) const
 Any flag=Extra information to be displayed after the magnitude strings.
 
virtual QString getInfoStringSize (const StelCore *core, const InfoStringGroup &flags) const
 Any flag=Size information to be displayed.
 
virtual QString getInfoStringEloPhase (const StelCore *core, const InfoStringGroup &flags, const bool withIllum) const
 Return elongation and phase angle when flags=Elongation.
 
virtual QString getInfoStringPeriods (const StelCore *core, const InfoStringGroup &flags) const
 Return sidereal and synodic periods when flags=Extra.
 
virtual QString getDiscoveryCircumstances () const
 
void computeModelMatrix (Mat4d &result, bool solarEclipseCase) const
 Used in drawSphere() to compute shadows, and inside a function to derive eclipse sizes. More...
 
void computeOrbit ()
 Update the orbit position values.
 
Vec3f getCurrentOrbitColor () const
 
QString getPlanetLabel () const
 Return the information string "ready to print".
 
void draw3dModel (StelCore *core, StelProjector::ModelViewTranformP transfo, float screenRd, double solarEclipseFactor, bool drawOnlyRing=false)
 Draw the 3d model. More...
 
bool drawObjModel (StelPainter *painter, float screenRd)
 Draws the OBJ model, assuming it is available. More...
 
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 screenRd, bool drawOnlyRing=false)
 Draw the 3D sphere.
 
void drawSurvey (StelCore *core, StelPainter *painter)
 Draw the Hips survey.
 
void drawHints (const StelCore *core, StelPainter &sPainter, const QFont &planetNameFont)
 Draw the circle and name of the Planet.
 
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. More...
 
virtual QString getMagnitudeInfoString (const StelCore *core, const InfoStringGroup &flags, const int decimals=1, const float &magOffset=0.f) const
 Format the magnitude info string for the object. More...
 
QString getSolarLunarInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Add a section to the InfoString with just horizontal data for the Sun and Moon, when observed from Earth. More...
 
void postProcessInfoString (QString &str, const InfoStringGroup &flags) const
 Apply post processing on the info string. More...
 

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 , ocsMajorPlanetsMinorTypes }
 
enum  ApparentMagnitudeAlgorithm {
  Mueller_1893 , AstronomicalAlmanac_1984 , ExplanatorySupplement_1992 , ExplanatorySupplement_2013 ,
  MallamaHilton_2018 , UndefinedAlgorithm , Generic
}
 
enum  PositionQuality { Position , OrbitPlotting }
 enums to indicate for which purpose we check positional quality. More...
 
- Public Types inherited from StelObject
enum  InfoStringGroupFlags {
  None = 0x00000000 , Name = 0x00000001 , CatalogNumber = 0x00000002 , Magnitude = 0x00000004 ,
  RaDecJ2000 = 0x00000008 , RaDecOfDate = 0x00000010 , AltAzi = 0x00000020 , Distance = 0x00000040 ,
  Elongation = 0x00000080 , Size = 0x00000100 , Velocity = 0x00000200 , ProperMotion = 0x00000400 ,
  Extra = 0x00000800 , HourAngle = 0x00001000 , AbsoluteMagnitude = 0x00002000 , GalacticCoord = 0x00004000 ,
  SupergalacticCoord = 0x00008000 , OtherCoord = 0x00010000 , ObjectType = 0x00020000 , EclipticCoordJ2000 = 0x00040000 ,
  EclipticCoordOfDate = 0x00080000 , IAUConstellation = 0x00100000 , SiderealTime = 0x00200000 , RTSTime = 0x00400000 ,
  SolarLunarPosition = 0x00800000 , Script = 0x01000000 , DebugAid = 0x02000000 , NoFont = 0x04000000 ,
  PlainText = 0x08000000
}
 Used as named bitfield flags as specifiers to filter results of getInfoString. More...
 
enum class  CulturalDisplayStyle {
  NONE = 0x00 , Modern = 0x01 , IPA = 0x02 , IPA_Modern = 0x03 ,
  Translated = 0x04 , Translated_Modern = 0x05 , Translated_IPA = 0x06 , Translated_IPA_Modern = 0x07 ,
  Translit = 0x08 , Translit_Modern = 0x09 , Translit_IPA = 0x0A , Translit_IPA_Modern = 0x0B ,
  Translit_Translated = 0x0C , Translit_Translated_Modern = 0x0D , Translit_Translated_IPA = 0x0E , Translit_Translated_IPA_Modern = 0x0F ,
  Pronounce = 0x10 , Pronounce_Modern = 0x11 , Pronounce_IPA = 0x12 , Pronounce_IPA_Modern = 0x13 ,
  Pronounce_Translated = 0x14 , Pronounce_Translated_Modern = 0x15 , Pronounce_Translated_IPA = 0x16 , Pronounce_Translated_IPA_Modern = 0x17 ,
  Pronounce_Translit = 0x18 , Pronounce_Translit_Modern = 0x19 , Pronounce_Translit_IPA = 0x1A , Pronounce_Translit_IPA_Modern = 0x1B ,
  Pronounce_Translit_Translated = 0x1C , Pronounce_Translit_Translated_Modern = 0x1D , Pronounce_Translit_Translated_IPA = 0x1E , Pronounce_Translit_Translated_IPA_Modern = 0x1F ,
  Native = 0x20 , Native_Modern = 0x21 , Native_IPA = 0x22 , Native_IPA_Modern = 0x23 ,
  Native_Translated = 0x24 , Native_Translated_Modern = 0x25 , Native_Translated_IPA = 0x26 , Native_Translated_IPA_Modern = 0x27 ,
  Native_Translit = 0x28 , Native_Translit_Modern = 0x29 , Native_Translit_IPA = 0x2A , Native_Translit_IPA_Modern = 0x2B ,
  Native_Translit_Translated = 0x2C , Native_Translit_Translated_Modern = 0x2D , Native_Translit_Translated_IPA = 0x2E , Native_Translit_Translated_IPA_Modern = 0x2F ,
  Native_Pronounce = 0x30 , Native_Pronounce_Modern = 0x31 , Native_Pronounce_IPA = 0x32 , Native_Pronounce_IPA_Modern = 0x33 ,
  Native_Pronounce_Translated = 0x34 , Native_Pronounce_Translated_Modern = 0x35 , Native_Pronounce_Translated_IPA = 0x36 , Native_Pronounce_Translated_IPA_Modern = 0x37 ,
  Native_Pronounce_Translit = 0x38 , Native_Pronounce_Translit_Modern = 0x39 , Native_Pronounce_Translit_IPA = 0x3A , Native_Pronounce_Translit_IPA_Modern = 0x3B ,
  Native_Pronounce_Translit_Translated = 0x3C , Native_Pronounce_Translit_Translated_Modern = 0x3D , Native_Pronounce_Translit_Translated_IPA = 0x3E , Native_Pronounce_Translit_Translated_IPA_Modern = 0x3F ,
  Byname = 0x40 , Byname_Modern = 0x41 , IPA_Byname = 0x42 , IPA_Byname_Modern = 0x43 ,
  Translated_Byname = 0x44 , Translated_Byname_Modern = 0x45 , Translated_IPA_Byname = 0x46 , Translated_IPA_Byname_Modern = 0x47 ,
  Translit_Byname = 0x48 , Translit_Byname_Modern = 0x49 , Translit_IPA_Byname = 0x4A , Translit_IPA_Byname_Modern = 0x4B ,
  Translit_Translated_Byname = 0x4C , Translit_Translated_Byname_Modern = 0x4D , Translit_Translated_IPA_Byname = 0x4E , Translit_Translated_IPA_Byname_Modern = 0x4F ,
  Pronounce_Byname = 0x50 , Pronounce_Byname_Modern = 0x51 , Pronounce_IPA_Byname = 0x52 , Pronounce_IPA_Byname_Modern = 0x53 ,
  Pronounce_Translated_Byname = 0x54 , Pronounce_Translated_Byname_Modern = 0x55 , Pronounce_Translated_IPA_Byname = 0x56 , Pronounce_Translated_IPA_Byname_Modern = 0x57 ,
  Pronounce_Translit_Byname = 0x58 , Pronounce_Translit_Byname_Modern = 0x59 , Pronounce_Translit_IPA_Byname = 0x5A , Pronounce_Translit_IPA_Byname_Modern = 0x5B ,
  Pronounce_Translit_Translated_Byname = 0x5C , Pronounce_Translit_Translated_Byname_Modern = 0x5D , Pronounce_Translit_Translated_IPA_Byname = 0x5E , Pronounce_Translit_Translated_IPA_Byname_Modern = 0x5F ,
  Native_Byname = 0x60 , Native_Byname_Modern = 0x61 , Native_IPA_Byname = 0x62 , Native_IPA_Byname_Modern = 0x63 ,
  Native_Translated_Byname = 0x64 , Native_Translated_Byname_Modern = 0x65 , Native_Translated_IPA_Byname = 0x66 , Native_Translated_IPA_Byname_Modern = 0x67 ,
  Native_Translit_Byname = 0x68 , Native_Translit_Byname_Modern = 0x69 , Native_Translit_IPA_Byname = 0x6A , Native_Translit_IPA_Byname_Modern = 0x6B ,
  Native_Translit_Translated_Byname = 0x6C , Native_Translit_Translated_Byname_Modern = 0x6D , Native_Translit_Translated_IPA_Byname = 0x6E , Native_Translit_Translated_IPA_Byname_Modern = 0x6F ,
  Native_Pronounce_Byname = 0x70 , Native_Pronounce_Byname_Modern = 0x71 , Native_Pronounce_IPA_Byname = 0x72 , Native_Pronounce_IPA_Byname_Modern = 0x73 ,
  Native_Pronounce_Translated_Byname = 0x74 , Native_Pronounce_Translated_Byname_Modern = 0x75 , Native_Pronounce_Translated_IPA_Byname = 0x76 , Native_Pronounce_Translated_IPA_Byname_Modern = 0x77 ,
  Native_Pronounce_Translit_Byname = 0x78 , Native_Pronounce_Translit_Byname_Modern = 0x79 , Native_Pronounce_Translit_IPA_Byname = 0x7A , Native_Pronounce_Translit_IPA_Byname_Modern = 0x7B ,
  Native_Pronounce_Translit_Translated_Byname = 0x7C , Native_Pronounce_Translit_Translated_Byname_Modern = 0x7D , Native_Pronounce_Translit_Translated_IPA_Byname = 0x7E , Native_Pronounce_Translit_Translated_IPA_Byname_Modern = 0x7F
}
 A 7-bit code with all options for displaying relevant CulturalName parts. More...
 
enum class  CulturalNameSpecial { None = 0 , Morning = 1 , Evening = 2 }
 
- Public Slots inherited from StelObject
virtual void setExtraInfoString (const InfoStringGroup &flags, const QString &str)
 Allow additions to the Info String. More...
 
virtual void addToExtraInfoString (const StelObject::InfoStringGroup &flags, const QString &str)
 Add str to the extra string. More...
 
QStringList getExtraInfoStrings (const InfoStringGroup &flags) const
 Retrieve an (unsorted) QStringList of all extra info strings that match flags. More...
 
void removeExtraInfoStrings (const InfoStringGroup &flags)
 Remove the extraInfoStrings with the given flags. More...
 
- Data Fields inherited from Planet
LinearFader orbitFader
 
Vec3d orbit [ORBIT_SEGMENTS+1]
 
double deltaJDE
 
double deltaOrbitJDE
 
bool closeOrbit
 
- Static Public Attributes inherited from Planet
static const QString PLANET_TYPE
 
static constexpr double J2000 = 2451545.0
 
static constexpr int ORBIT_SEGMENTS = 360
 
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 PlanetOrbitColorStyle orbitColorStyle
 
- Static Public Attributes inherited from StelObject
static constexpr InfoStringGroup AllInfo
 A pre-defined "all available" set of specifiers for the getInfoString flags argument to getInfoString. More...
 
static constexpr InfoStringGroup DefaultInfo
 A pre-defined "default" set of specifiers for the getInfoString flags argument to getInfoString It appears useful to propose this set as post-install settings and let users configure more on demand. More...
 
static constexpr InfoStringGroup ShortInfo = static_cast<InfoStringGroup>(Name|CatalogNumber|Magnitude|RaDecJ2000)
 A pre-defined "shortest useful" set of specifiers for the getInfoString flags argument to getInfoString.
 
- Protected Attributes inherited from Planet
QString englishName
 english planet name
 
QString nameI18
 International translated name.
 
QString texMapName
 Texture file path.
 
QString normalMapName
 Texture file path.
 
QString horizonMapName
 Texture file path.
 
RotationElements re
 Rotation and axis orientation parameters.
 
double siderealPeriod
 sidereal period (Planet year or a moon's sidereal month) [earth days]
 
double equatorialRadius
 Planet's equatorial radius in AU.
 
double oneMinusOblateness
 OneMinusOblateness=(polar radius)/(equatorial radius). Geometric flattening f=1-oneMinusOblateness (ExplanSup2013 10.1)
 
Vec3d eclipticPos
 Position in AU in the rectangular ecliptic coordinate system (J2000) centered on the parent body. More...
 
Vec3d eclipticVelocity
 Speed in AU/d in the rectangular ecliptic coordinate system (J2000) around the parent body. More...
 
Vec3d aberrationPush
 0.21.2+: a small displacement to be applied if aberred positions are requested.
 
Vec3d screenPos
 Used to store temporarily the 2D position on screen. We need double for moons. Observe Styx from Pluto w/o atmosphere to see that.
 
Vec3f haloColor
 used for drawing the planet halo. Also, when non-spherical (OBJ) model without texture is used, its color is derived from haloColour*albedo.
 
float absoluteMagnitude
 since 2017 this moved to the Planet class: V(1,0) from Explanatory Supplement or WGCCRE2009 paper for the planets, H in the H,G magnitude system for Minor planets, H10 for comets. More...
 
double massKg
 23.1+: mass of the planet in kg
 
float albedo
 Planet albedo. Used for magnitude computation when no other formula in use. Also, when non-spherical (OBJ) model without texture is used, its color is derived from haloColour*albedo.
 
float roughness
 Oren-Nayar roughness for Moon and OBJ-based models.
 
float outgas_intensity
 The intensity of a pseudo-outgas effect, based on an inverse exponential Lambert shading, with the light at the viewing position. More...
 
float outgas_falloff
 Exponent for falloff of outgas effect, should probably be < 1. More...
 
Mat4d rotLocalToParent
 retro-documented: More...
 
float axisRotation
 Rotation angle of the Planet on its axis, degrees. More...
 
StelTextureSP texMap
 Planet map texture.
 
StelTextureSP normalMap
 Planet normal map texture.
 
StelTextureSP horizonMap
 Planet horizon map texture.
 
PlanetOBJModelobjModel
 Planet model (when it has been loaded)
 
QFuture< PlanetOBJModel * > * objModelLoader
 For async loading of the OBJ file.
 
QString objModelPath
 
SurveyPack survey
 
Ringrings
 Planet rings.
 
double distance
 Temporary variable used to store the distance to a given point. More...
 
double sphereScale
 Artificial scaling for better viewing.
 
double lastJDE
 caches JDE of last positional computation
 
posFuncType coordFunc
 callback for the calculation of the equatorial rectangular heliocentric position at time JDE.
 
OrbitorbitPtr
 Usually a KeplerOrbit for positional computations of Minor Planets, Comets and Moons. More...
 
OsculatingFunctType *const osculatingFunc
 
QSharedPointer< Planetparent
 Planet parent i.e. sun for earth.
 
QList< QSharedPointer< Planet > > satellites
 satellites of the Planet
 
LinearFader hintFader
 
LinearFader labelsFader
 Store the current state of the label for this planet.
 
bool flagLabels
 Define whether labels should be displayed.
 
bool hidden
 useful for fake planets used as observation positions - not drawn or labeled
 
bool atmosphere
 Does the planet have an atmosphere?
 
bool halo
 Does the planet have a halo?
 
PlanetType pType
 Type of body.
 
bool multisamplingEnabled_
 
bool planetShadowsSupersampEnabled_
 
QOpenGLFunctions * gl
 
QString discoverer
 Discovery data.
 
QString discoveryDate
 Discovery data.
 
- Static Protected Attributes inherited from Planet
static StelTextureSP texEarthShadow
 
static ApparentMagnitudeAlgorithm vMagAlgorithm
 
static Vec3f labelColor
 
static StelTextureSP hintCircleTex
 The circle around an SSO.
 
static const QMap< PlanetType, QString > pTypeMap
 Maps fast type to english name.
 
static const QMap< QString, QString > nPlanetMap
 Maps fast IAU number to IAU designation.
 
static bool drawMoonHalo
 
static bool drawSunHalo
 
static bool permanentDrawingOrbits
 If true, planet orbits will be drawn even if planet is off screen.
 
static int orbitsThickness
 

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

◆ getEnglishName()

QString MinorPlanet::getEnglishName ( void  ) const
overridevirtual

Return object's name in english.

For non-default skycultures, this is the english translation of the native name.

Implements StelObject.

◆ getVMagnitude() [1/2]

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

Override for minor planets.

When observer is on an "Observer" planet, the magnitude reported is heliocentric (seen from the Sun). This allows observing the asteroid belt freom the side without nearer objects being obscured by phase angle.

Reimplemented from StelObject.

◆ getVMagnitude() [2/2]

float MinorPlanet::getVMagnitude ( const StelCore core,
const double  eclipseFactor 
) const
overridevirtual

Convenience method, necessary override.

Parameters
eclipseFactoris ignored.

Reimplemented from Planet.

◆ setAbsoluteMagnitudeAndSlope()

void MinorPlanet::setAbsoluteMagnitudeAndSlope ( const float  magnitude,
const float  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.

Parameters
magnitudeAbsolute magnitude H
slopeSlope parameter G. This is usually [0..1], sometimes slightly outside. Allowed here [-1..2].

◆ setDiscoveryData()

void MinorPlanet::setDiscoveryData ( const QString &  date,
const QString &  name 
)
inline

set the discovery circumstances of minor body

Parameters
dateof discovery
nameof discoverer

◆ setMinorPlanetNumber()

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.

◆ translateName()

void MinorPlanet::translateName ( const StelTranslator trans)
overridevirtual

sets the nameI18 property with the appropriate translation.

Function overridden to handle the problem with name conflicts.

Reimplemented from Planet.