24 #include <QVariantMap> 26 #include "StelFader.hpp" 27 #include "StelObjectModule.hpp" 40 static const int RCMAG_TABLE_SIZE = 4096;
73 typedef QMap<StelObjectP, float> StelACStarData;
101 Q_PROPERTY(
bool flagStarsDisplayed
104 NOTIFY starsDisplayedChanged)
105 Q_PROPERTY(
bool flagLabelsDisplayed
108 NOTIFY starLabelsDisplayedChanged)
109 Q_PROPERTY(
double labelsAmount
112 NOTIFY labelsAmountChanged)
134 virtual void update(
double deltaTime) {labelsFader.update((
int)(deltaTime*1000)); starsFader.update((
int)(deltaTime*1000));}
160 virtual QStringList
listMatchingObjects(
const QString& objPrefix,
int maxNbItem=5,
bool useStartOfWords=
false,
bool inEnglish=
false)
const;
164 virtual QString
getName()
const {
return "Stars"; }
181 void setFlagStars(
bool b) {starsFader=b; emit starsDisplayedChanged(b);}
186 void setFlagLabels(
bool b) {labelsFader=b; emit starLabelsDisplayedChanged(b);}
193 void setLabelsAmount(
double a) {
if(a!=labelsAmount){ labelsAmount=a; emit labelsAmountChanged(a);}}
203 static bool getFlagSciNames(
void) {
return flagSciNames;}
335 static QString convertToSpectralType(
int index);
336 static QString convertToComponentIds(
int index);
338 QVariantList getCatalogsDescription()
const {
return catalogsDescription;}
347 const QList<QMap<StelObjectP, float>>& getHipparcosHighPMStars()
const {
return hipStarsHighPM; }
348 const QList<QMap<StelObjectP, float>>& getHipparcosDoubleStars()
const {
return doubleHipStars; }
349 const QList<QMap<StelObjectP, float>>& getHipparcosVariableStars()
const {
return variableHipStars; }
358 void updateSkyCulture(
const QString& skyCultureDir);
361 void starLabelsDisplayedChanged(
const bool displayed);
362 void starsDisplayedChanged(
const bool displayed);
363 void labelsAmountChanged(
float a);
366 void setCheckFlag(
const QString& catalogId,
bool b);
368 void copyDefaultConfigFile();
374 int loadCommonNames(
const QString& commonNameFile);
379 void loadSciNames(
const QString& sciNameFile);
383 void loadGcvs(
const QString& GcvsFile);
387 void loadWds(
const QString& WdsFile);
391 void loadCrossIdentificationData(
const QString& crossIdFile);
395 int getMaxSearchLevel()
const;
398 void loadData(QVariantMap starsConfigFile);
403 void populateHipparcosLists();
404 void populateStarsDesignations();
407 QList<StelObjectP> hipparcosStars;
408 QList<QMap<StelObjectP, float>> doubleHipStars, variableHipStars, hipStarsHighPM;
417 int maxGeodesicGridLevel;
418 int lastMaxSearchLevel;
421 QVector<ZoneArray*> gridLevels;
422 static void initTriangleFunc(
int lev,
int index,
428 reinterpret_cast<StarMgr*
>(context)->initTriangle(lev, index, c0, c1, c2);
431 void initTriangle(
int lev,
int index,
438 static QHash<int, QString> commonNamesMap;
439 static QHash<int, QString> commonNamesMapI18n;
440 static QMap<QString, int> commonNamesIndexI18n;
441 static QMap<QString, int> commonNamesIndex;
443 static QHash<int, QString> additionalNamesMap;
444 static QHash<int, QString> additionalNamesMapI18n;
445 static QMap<QString, int> additionalNamesIndex;
446 static QMap<QString, int> additionalNamesIndexI18n;
448 static QHash<int, QString> sciNamesMapI18n;
449 static QMap<QString, int> sciNamesIndexI18n;
451 static QHash<int, QString> sciAdditionalNamesMapI18n;
452 static QMap<QString, int> sciAdditionalNamesIndexI18n;
454 static QHash<int, varstar> varStarsMapI18n;
455 static QMap<QString, int> varStarsIndexI18n;
457 static QHash<int, wds> wdsStarsMapI18n;
458 static QMap<QString, int> wdsStarsIndexI18n;
460 static QMap<QString, crossid> crossIdMap;
461 static QMap<int, int> saoStarsIndex;
462 static QMap<int, int> hdStarsIndex;
463 static QMap<int, int> hrStarsIndex;
465 static QHash<int, QString> referenceMap;
468 static bool flagSciNames;
475 QString starConfigFileFullPath;
476 QVariantMap starSettings;
477 QVariantList catalogsDescription;
481 #endif // _STARMGR_HPP_ static QString getSciName(int hip)
Get the (translated) scientific name for a star with a specified Hipparcos catalogue number...
static double getGcvsEpoch(int hip)
Get Epoch for maximum light for a variable star with a specified Hipparcos catalogue number...
bool getFlagStars(void) const
Get display flag for Stars.
float separation
Position Angle at date of last satisfactory observation, deg.
static int getGcvsMM(int hip)
Get the rising time or duration of eclipse for a variable star with a specified Hipparcos catalogue n...
int Mm
Period of the variable star (days)
static QString getCrossIdentificationDesignations(QString hip)
Get the cross-identification designations for a star with a specified Hipparcos catalogue number...
StelObjectP searchHP(int hip) const
Search by Hipparcos catalogue number.
double epoch
The photometric system for magnitudes.
Container for Hipparcos information.
virtual void init()
Initialize the StarMgr.
double getLabelsAmount(void) const
Get the amount of star labels.
float min2mag
First minimum magnitude or amplitude.
float min1mag
Magnitude flag code.
virtual StelObjectP searchByName(const QString &name) const
Return the matching star if exists or Q_NULLPTR.
int observation
WDS designation.
void setLabelsAmount(double a)
Set the amount of star labels.
Implementation of StelFader which implements a linear transition.
float maxmag
Type of variability.
const QList< StelObjectP > & getHipparcosStars() const
Get the list of all Hipparcos stars.
The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
static QString getSciAdditionalName(int hip)
Get the (translated) additional scientific name for a star with a specified Hipparcos catalogue numbe...
Define the StelTextureSP type.
virtual QStringList listAllObjectsByType(const QString &objType, bool inEnglish) const
List all StelObjects by type.
Vec3f getLabelColor(void) const
Get the current color used to label bright stars.
double period
Epoch for maximum light (Julian days)
QString vtype
GCVS designation.
Manages all ZoneData structures of a given StelGeodesicGrid level.
static float getGcvsMaxMagnitude(int hip)
Get the magnitude at maximum brightness for a variable star with a specified Hipparcos catalogue numb...
static double getGcvsPeriod(int hip)
Get the period for a variable star with a specified Hipparcos catalogue number.
void setLabelColor(const Vec3f &c)
Set the color used to label bright stars.
QString stype
Rising time or duration of eclipse (%)
Main class for Stellarium core processing.
bool getFlagLabels(void) const
Get display flag for Star names (labels).
void setFlagStars(bool b)
Set display flag for Stars.
float positionAngle
Date of last satisfactory observation, yr.
static int getGcvsMagnitudeFlag(int hip)
Get the magnitude flag code for a variable star with a specified Hipparcos catalogue number...
Specialization of StelModule which manages a collection of StelObject.
virtual void draw(StelCore *core)
Draw the stars and the star selection indicator if necessary.
virtual QString getName() const
Gets a user-displayable name of the object category.
void setFontSize(float newFontSize)
Define font size to use for star names display.
bool checkAndLoadCatalog(const QVariantMap &m)
Try to load the given catalog, even if it is marched as unchecked.
Converts tones in function of the eye adaptation to luminance.
virtual StelObjectP searchByID(const QString &id) const
Return the StelObject with the given ID if exists or the empty StelObject if not found.
static QString getAdditionalEnglishNames(int hip)
Get the English additional names for a star with a specified Hipparcos catalogue number.
Provides functions for performing openGL drawing operations.
Provide the main interface to all operations of projecting coordinates from sky to screen...
virtual QList< StelObjectP > searchAround(const Vec3d &v, double limitFov, const StelCore *core) const
Return a list containing the stars located inside the limFov circle around position v...
static QString getAdditionalNames(int hip)
Get the (translated) additional names for a star with a specified Hipparcos catalogue number...
virtual void update(double deltaTime)
Update any time-dependent features.
Stores the star catalogue data.
static QString getGcvsVariabilityType(int hip)
Get the type of variability for a variable star with a specified Hipparcos catalogue number...
static int getWdsLastPositionAngle(int hip)
Get position angle at date of last satisfactory observation of double star with a Hipparcos catalogue...
Manage the selection and queries on one or more StelObjects.
StelModuleActionName
Define the possible action for which an order is defined.
static float getGcvsMinMagnitude(int hip, bool firstMinimumFlag=true)
Get the minimum magnitude or amplitude for a variable star with a specified Hipparcos catalogue numbe...
virtual QStringList listAllObjects(bool inEnglish) const
static float getWdsLastSeparation(int hip)
Get separation angle at date of last satisfactory observation of double star with a Hipparcos catalog...
virtual QString getStelObjectType() const
Returns the name that will be returned by StelObject::getType() for the objects this module manages...
static int getWdsLastObservation(int hip)
Get year of last satisfactory observation of double star with a Hipparcos catalogue number...
static QString getGcvsName(int hip)
Get the (translated) scientific name for a variable star with a specified Hipparcos catalogue number...
int mflag
Magnitude at maximum brightness.
static QString getCommonName(int hip)
Get the (translated) common name for a star with a specified Hipparcos catalogue number.
Define the StelProjectorP type.
static QString getWdsName(int hip)
Get the (translated) scientific name for a double star with a specified Hipparcos catalogue number...
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
void setFlagLabels(bool b)
Set display flag for Star names (labels).
virtual QStringList listMatchingObjects(const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const
Find and return the list of at most maxNbItem objects auto-completing the passed object English name...
virtual double getCallOrder(StelModuleActionName actionName) const
Used to determine the order in which the various StelModules are drawn.
static void setFlagSciNames(bool f)
Show scientific or catalog names on stars without common names.
virtual StelObjectP searchByNameI18n(const QString &nameI18n) const
Return the matching Stars object's pointer if exists or Q_NULLPTR.
QString photosys
Second minimum magnitude or amplitude.
static QString getCommonEnglishName(int hip)
Get the (English) common name for a star with a specified Hipparcos catalogue number.
static QString getGcvsPhotometricSystem(int hip)
Get the photometric system for a variable star with a specified Hipparcos catalogue number...