21 #ifndef _SOLARSYSTEM_HPP_ 22 #define _SOLARSYSTEM_HPP_ 28 #include "StelObjectModule.hpp" 31 #include "StelGui.hpp" 42 typedef QSharedPointer<Planet> PlanetP;
50 Q_PROPERTY(
bool labelsDisplayed
53 NOTIFY labelsDisplayedChanged)
54 Q_PROPERTY(
bool flagOrbits
57 NOTIFY flagOrbitsChanged)
58 Q_PROPERTY(
bool trailsDisplayed
61 NOTIFY trailsDisplayedChanged)
62 Q_PROPERTY(
bool flagHints
65 NOTIFY flagHintsChanged)
66 Q_PROPERTY(
bool flagPointer
69 NOTIFY flagPointerChanged)
70 Q_PROPERTY(
bool flagNativePlanetNames
73 NOTIFY flagNativePlanetNamesChanged)
74 Q_PROPERTY(
bool flagTranslatedNames
77 NOTIFY flagTranslatedNamesChanged)
80 Q_PROPERTY(
bool planetsDisplayed
83 NOTIFY flagPlanetsDisplayedChanged
85 Q_PROPERTY(
bool flagIsolatedOrbits
88 NOTIFY flagIsolatedOrbitsChanged
90 Q_PROPERTY(
bool flagIsolatedTrails
93 NOTIFY flagIsolatedTrailsChanged
95 Q_PROPERTY(
bool flagLightTravelTime
98 NOTIFY flagLightTravelTimeChanged
100 Q_PROPERTY(
bool flagMoonScale
103 NOTIFY flagMoonScaleChanged
105 Q_PROPERTY(
double moonScale
108 NOTIFY moonScaleChanged
113 NOTIFY labelsAmountChanged
115 Q_PROPERTY(
bool ephemerisMarkersDisplayed
116 READ getFlagEphemerisMarkers
117 WRITE setFlagEphemerisMarkers
118 NOTIFY ephemerisMarkersChanged
120 Q_PROPERTY(
bool ephemerisDatesDisplayed
121 READ getFlagEphemerisDates
122 WRITE setFlagEphemerisDates
123 NOTIFY ephemerisDatesChanged
126 Q_PROPERTY(
bool flagCustomGrsSettings
129 NOTIFY flagCustomGrsSettingsChanged
131 Q_PROPERTY(
int customGrsLongitude
134 NOTIFY customGrsLongitudeChanged
136 Q_PROPERTY(
double customGrsDrift
139 NOTIFY customGrsDriftChanged
141 Q_PROPERTY(
double customGrsJD
144 NOTIFY customGrsJDChanged
148 Q_PROPERTY(
Vec3f orbitsColor
151 NOTIFY orbitsColorChanged
153 Q_PROPERTY(
Vec3f majorPlanetsOrbitsColor
156 NOTIFY majorPlanetsOrbitsColorChanged
158 Q_PROPERTY(
Vec3f minorPlanetsOrbitsColor
161 NOTIFY minorPlanetsOrbitsColorChanged
163 Q_PROPERTY(
Vec3f dwarfPlanetsOrbitsColor
166 NOTIFY dwarfPlanetsOrbitsColorChanged
168 Q_PROPERTY(
Vec3f moonsOrbitsColor
171 NOTIFY moonsOrbitsColorChanged
173 Q_PROPERTY(
Vec3f cubewanosOrbitsColor
176 NOTIFY cubewanosOrbitsColorChanged
178 Q_PROPERTY(
Vec3f plutinosOrbitsColor
181 NOTIFY plutinosOrbitsColorChanged
183 Q_PROPERTY(
Vec3f scatteredDiskObjectsOrbitsColor
186 NOTIFY scatteredDiskObjectsOrbitsColorChanged
188 Q_PROPERTY(
Vec3f oortCloudObjectsOrbitsColor
191 NOTIFY oortCloudObjectsOrbitsColorChanged
193 Q_PROPERTY(
Vec3f cometsOrbitsColor
196 NOTIFY cometsOrbitsColorChanged
198 Q_PROPERTY(
Vec3f sednoidsOrbitsColor
201 NOTIFY sednoidsOrbitsColorChanged
203 Q_PROPERTY(
Vec3f mercuryOrbitColor
206 NOTIFY mercuryOrbitColorChanged
208 Q_PROPERTY(
Vec3f venusOrbitColor
211 NOTIFY venusOrbitColorChanged
213 Q_PROPERTY(
Vec3f earthOrbitColor
216 NOTIFY earthOrbitColorChanged
218 Q_PROPERTY(
Vec3f marsOrbitColor
221 NOTIFY marsOrbitColorChanged
223 Q_PROPERTY(
Vec3f jupiterOrbitColor
226 NOTIFY jupiterOrbitColorChanged
228 Q_PROPERTY(
Vec3f saturnOrbitColor
231 NOTIFY saturnOrbitColorChanged
233 Q_PROPERTY(
Vec3f uranusOrbitColor
236 NOTIFY uranusOrbitColorChanged
238 Q_PROPERTY(
Vec3f neptuneOrbitColor
241 NOTIFY neptuneOrbitColorChanged
245 Q_PROPERTY(QString orbitColorStyle
248 NOTIFY orbitColorStyleChanged
253 virtual ~SolarSystem();
274 virtual
void update(
double deltaTime);
303 virtual QString getName()
const {
return "Solar System"; }
343 void setFlagPointer(
bool b) {
if (b!=flagPointer) { flagPointer=b; emit flagPointerChanged(b); }}
717 void labelsDisplayedChanged(
bool b);
718 void flagOrbitsChanged(
bool b);
719 void flagHintsChanged(
bool b);
720 void trailsDisplayedChanged(
bool b);
721 void flagPointerChanged(
bool b);
722 void flagNativePlanetNamesChanged(
bool b);
723 void flagTranslatedNamesChanged(
bool b);
724 void flagPlanetsDisplayedChanged(
bool b);
725 void flagIsolatedOrbitsChanged(
bool b);
726 void flagIsolatedTrailsChanged(
bool b);
727 void flagLightTravelTimeChanged(
bool b);
728 void flagMoonScaleChanged(
bool b);
729 void moonScaleChanged(
double f);
730 void labelsAmountChanged(
double f);
731 void ephemerisMarkersChanged(
bool b);
732 void ephemerisDatesChanged(
bool b);
733 void flagCustomGrsSettingsChanged(
bool b);
734 void customGrsLongitudeChanged(
int l);
735 void customGrsDriftChanged(
double drift);
736 void customGrsJDChanged(
double JD);
738 void orbitsColorChanged(
const Vec3f & color)
const;
739 void majorPlanetsOrbitsColorChanged(
const Vec3f & color)
const;
740 void minorPlanetsOrbitsColorChanged(
const Vec3f & color)
const;
741 void dwarfPlanetsOrbitsColorChanged(
const Vec3f & color)
const;
742 void moonsOrbitsColorChanged(
const Vec3f & color)
const;
743 void cubewanosOrbitsColorChanged(
const Vec3f & color)
const;
744 void plutinosOrbitsColorChanged(
const Vec3f & color)
const;
745 void scatteredDiskObjectsOrbitsColorChanged(
const Vec3f & color)
const;
746 void oortCloudObjectsOrbitsColorChanged(
const Vec3f & color)
const;
747 void cometsOrbitsColorChanged(
const Vec3f & color)
const;
748 void sednoidsOrbitsColorChanged(
const Vec3f & color)
const;
749 void mercuryOrbitColorChanged(
const Vec3f & color)
const;
750 void venusOrbitColorChanged(
const Vec3f & color)
const;
751 void earthOrbitColorChanged(
const Vec3f & color)
const;
752 void marsOrbitColorChanged(
const Vec3f & color)
const;
753 void jupiterOrbitColorChanged(
const Vec3f & color)
const;
754 void saturnOrbitColorChanged(
const Vec3f & color)
const;
755 void uranusOrbitColorChanged(
const Vec3f & color)
const;
756 void neptuneOrbitColorChanged(
const Vec3f & color)
const;
758 void orbitColorStyleChanged(QString style)
const;
760 void solarSystemDataReloaded();
809 void updateSkyCulture(
const QString& skyCultureDir);
811 void setFlagEphemerisMarkers(
bool b);
812 bool getFlagEphemerisMarkers()
const;
814 void setFlagEphemerisDates(
bool b);
815 bool getFlagEphemerisDates()
const;
827 void computeTransMatrices(
double dateJDE,
const Vec3d& observerPos =
Vec3d(0.));
830 void drawPointer(
const StelCore* core);
839 bool loadPlanets(
const QString& filePath);
841 void recreateTrails();
844 void setFlagPermanentOrbits(
bool b);
847 int shadowPlanetCount;
854 void setSelected(
const QString& englishName);
856 void setSelected(PlanetP obj);
858 PlanetP getSelected(
void)
const {
return selected;}
866 QFont planetNameFont;
872 QList<PlanetP> systemPlanets;
876 bool flagLightTravelTime;
884 bool flagNativePlanetNames;
885 bool flagTranslatedNames;
886 bool flagIsolatedTrails;
887 bool flagIsolatedOrbits;
888 bool ephemerisMarkersDisplayed;
889 bool ephemerisDatesDisplayed;
898 QHash<QString, QString> planetNativeNamesMap;
900 QList<Orbit*> orbits;
904 #endif // _SOLARSYSTEM_HPP_ double getElongationForPlanet(QString planetName) const
Get elongation for Solar system bodies from scripts.
void setPointerColor(const Vec3f &c)
Set the color used to draw planet pointers.
float getPhaseForPlanet(QString planetName) const
Get phase for Solar system bodies from scripts.
bool getFlagTranslatedNames(void) const
Get the current value of the flag which enables showing translated names for planets or not...
virtual void update(double deltaTime)
Update time-varying components.
QStringList getAllPlanetEnglishNames() const
Get the list of all the planet english names.
void setFlagOrbits(bool b)
Set flag which determines if planet orbits are drawn or hidden.
bool getFlagMoonScale(void) const
Get the current value of the flag which determines if Earth's moon is scaled or not.
Vec3f getDwarfPlanetsOrbitsColor(void) const
Get the current color used to draw orbits lines of the dwarf planets.
QString getApparentMagnitudeAlgorithmOnEarth() const
Get the algorithm used for computation of apparent magnitudes for planets in case observer on the Ear...
virtual double getCallOrder(StelModuleActionName actionName) const
Used to determine what order to draw the various StelModules.
void setFlagMoonScale(bool b)
Set flag which determines if Earth's moon is scaled or not.
Vec3f getPointerColor() const
Get the current color used to draw planet pointers.
void setFlagIsolatedOrbits(bool b)
Set flag which enabled the showing of isolated orbits for selected objects only or not...
PlanetP getSun() const
Get the Planet object pointer for the Sun.
PlanetP getEarth() const
Get the Planet object pointer for the Earth.
Class used to translate strings to any language.
Implementation of StelFader which implements a linear transition.
double getCustomGrsDrift()
Get speed of annual drift for Great Red Spot (System II is used)
double getLabelsAmount(void) const
Get the amount of planet labels.
The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
Vec3f getPlutinosOrbitsColor(void) const
Get the current color used to draw orbits lines of plutinos.
void reloadPlanets()
Reload the planets.
Define the StelTextureSP type.
Vec3f getNeptuneOrbitColor(void) const
Get the current color used to draw Neptune orbit line.
bool getFlagCustomGrsSettings()
Get the current value of the flag which determines if custom settings for Great Red Spot on Jupiter i...
void setMinorPlanetsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of the minor planets.
bool nearLunarEclipse()
Determine if a lunar eclipse is close at hand?
double getCustomGrsJD()
Get initial JD for calculation of position of Great Red Spot.
void setCubewanosOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of cubewanos.
Vec3f getMoonsOrbitsColor(void) const
Get the current color used to draw orbits lines of moons of planets.
Vec3f getOortCloudObjectsOrbitsColor(void) const
Get the current color used to draw orbits lines of Oort cloud objects.
Vec3f getSaturnOrbitColor(void) const
Get the current color used to draw Saturn orbit line.
int getCustomGrsLongitude()
Get longitude of Great Red Spot (System II is used)
void setEarthOrbitColor(const Vec3f &c)
Set the color used to draw Earth orbit line.
Main class for Stellarium core processing.
PlanetP getMoon() const
Get the Planet object pointer for Earth's moon.
void computePositions(double dateJDE, const Vec3d &observerPos=Vec3d(0.))
Compute the position and transform matrix for every element of the solar system.
void setOortCloudObjectsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of Oort cloud objects.
bool getFlagTrails() const
Get the current value of the flag which determines if planet trails are drawn or hidden.
void setFlagHints(bool b)
Set flag which determines if planet hints are drawn or hidden along labels.
void setCustomGrsLongitude(int longitude)
Set longitude of Great Red Spot (System II is used)
bool getFlagLightTravelTime(void) const
Get the current value of the flag which determines if light travel time calculation is used or not...
void setFlagLabels(bool b)
Set flag which determines if planet labels are drawn or hidden.
Vec3f getUranusOrbitColor(void) const
Get the current color used to draw Uranus orbit line.
void setScatteredDiskObjectsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of scattered disk objects.
void setApparentMagnitudeAlgorithmOnEarth(QString algorithm)
Set the algorithm for computation of apparent magnitudes for planets in case observer on the Earth...
Vec3f getMercuryOrbitColor(void) const
Get the current color used to draw Mercury orbit line.
bool getFlagLabels() const
Get the current value of the flag which determines if planet labels are drawn or hidden.
bool getFlagPlanets() const
Get the current value of the flag which determines if planet are drawn or hidden. ...
Vec3f getCometsOrbitsColor(void) const
Get the current color used to draw comet orbit lines.
Specialization of StelModule which manages a collection of StelObject.
virtual QList< StelObjectP > searchAround(const Vec3d &v, double limitFov, const StelCore *core) const
Search for SolarSystem objects in some area around a point.
const QList< PlanetP > & getAllPlanets() const
Get the list of all the bodies of the solar system.
void setVenusOrbitColor(const Vec3f &c)
Set the color used to draw Venus orbit line.
QStringList getObjectsList(QString objType="all") const
Get list of objects by type.
void setJupiterOrbitColor(const Vec3f &c)
Set the color used to draw Jupiter orbit line.
void setOrbitsColor(const Vec3f &c)
Set the color used to draw solar system object orbit lines.
This StelObjectModule derivative is used to model SolarSystem bodies.
void setFlagPointer(bool b)
Set flag which determines if the planet pointer (red cross) is drawn or hidden on a selected planet...
virtual QStringList listAllObjects(bool inEnglish) const
List all StelObjects.
void setNeptuneOrbitColor(const Vec3f &c)
Set the color used to draw Neptune orbit line.
Vec3f getSednoidsOrbitsColor(void) const
Get the current color used to draw sednoid orbit lines.
void setFlagIsolatedTrails(bool b)
Set flag which enabled the showing of isolated trails for selected objects only or not...
Vec3f getTrailsColor() const
Get the current color used to draw planet trails lines.
void setFlagCustomGrsSettings(bool b)
Set flag which determines if custom settings is using for Great Red Spot on Jupiter.
Vec3f getJupiterOrbitColor(void) const
Get the current color used to draw Jupiter orbit line.
void setSednoidsOrbitsColor(const Vec3f &c)
Set the color used to draw sednoid orbit lines.
double getEclipseFactor(const StelCore *core) const
Determines relative amount of sun visible from the observer's position.
Provide the main interface to all operations of projecting coordinates from sky to screen...
bool getFlagIsolatedTrails(void) const
Get the current value of the flag which enables showing of isolated trails for selected objects only ...
double getMoonScale(void) const
Get the display scaling factor for Earth's moon.
bool getFlagIsolatedOrbits(void) const
Get the current value of the flag which enables showing of isolated orbits for selected objects only ...
void setFlagTranslatedNames(bool b)
Set flag which enable use translated names for planets or not.
double getDistanceToPlanet(QString planetName) const
Get distance to Solar system bodies from scripts.
Vec3f getMinorPlanetsOrbitsColor(void) const
Get the current color used to draw orbits lines of the minor planets.
void setPlutinosOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of plutinos.
QStringList getAllPlanetLocalizedNames() const
Get the list of all the planet localized names.
Vec3f getOrbitsColor(void) const
Get the current color used to draw solar system object orbit lines.
Vec3f getMajorPlanetsOrbitsColor(void) const
Get the current color used to draw orbits lines of the major planets.
void setFlagNativePlanetNames(bool b)
Set flag which enable use native names for planets or not.
double getPhaseAngleForPlanet(QString planetName) const
Get phase angle for Solar system bodies from scripts.
virtual void init()
Initialize the SolarSystem.
StelModuleActionName
Define the possible action for which an order is defined.
Vec3f getVenusOrbitColor(void) const
Get the current color used to draw Venus orbit line.
Vec3f getScatteredDiskObjectsOrbitsColor(void) const
Get the current color used to draw orbits lines of scattered disk objects.
void setMarsOrbitColor(const Vec3f &c)
Set the color used to draw Mars orbit line.
virtual StelObjectP searchByNameI18n(const QString &nameI18n) const
Search for a SolarSystem object based on the localised name.
Vec3f getCubewanosOrbitsColor(void) const
Get the current color used to draw orbits lines of cubewanos.
void setMajorPlanetsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of the major planets.
Vec3f getMarsOrbitColor(void) const
Get the current color used to draw Mars orbit line.
void setLabelsColor(const Vec3f &c)
Set the color used to draw planet labels.
void setOrbitColorStyle(QString style)
Set style of colors of orbits for Solar system bodies.
StelModuleSelectAction
Enum used when selecting objects to define whether to add to, replace, or remove from the existing se...
double labelsAmount
The amount of planets labels (between 0 and 10).
void setTrailsColor(const Vec3f &c)
Set the color used to draw planet trails lines.
void setLabelsAmount(double a)
Set the amount of planet labels.
void setFontSize(float newFontSize)
Set planet names font size.
bool getFlagOrbits() const
Get the current value of the flag which determines if planet orbits are drawn or hidden.
void setSaturnOrbitColor(const Vec3f &c)
Set the color used to draw Saturn orbit line.
void setMoonsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of moons of planets.
void setMoonScale(double f)
Set the display scaling factor for Earth's moon.
void updateI18n()
Translate names. (public so that SolarSystemEditor can call it).
QString getOrbitColorStyle() const
Get style of colors of orbits for Solar system bodies.
virtual void deinit()
Called before the module will be delete, and before the openGL context is suppressed.
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
void setMercuryOrbitColor(const Vec3f &c)
Set the color used to draw Mercury orbit line.
bool getFlagHints() const
Get the current value of the flag which determines if planet hints are drawn or hidden along labels...
virtual QStringList listAllObjectsByType(const QString &objType, bool inEnglish) const
List all StelObjects by type.
Main class for the GUI based on QGraphicView.
void setCometsOrbitsColor(const Vec3f &c)
Set the color used to draw comet orbit lines.
void setFlagPlanets(bool b)
Set flag which determines if planets are drawn or hidden.
QString getPlanetType(QString planetName) const
Get type for Solar system bodies from scripts.
float getPlanetVMagnitude(QString planetName, bool withExtinction=false) const
Get the V magnitude for Solar system bodies from scripts.
void setCustomGrsDrift(double drift)
Set speed of annual drift for Great Red Spot (System II is used)
bool getFlagPointer() const
Get the current value of the flag which determines if planet pointers are drawn or hidden...
bool getFlagNativePlanetNames(void) const
Get the current value of the flag which enables showing native names for planets or not...
void setCustomGrsJD(double JD)
Set initial JD for calculation of position of Great Red Spot.
const Vec3f & getLabelsColor(void) const
Get the current color used to draw planet labels.
Vec3f getEarthOrbitColor(void) const
Get the current color used to draw Earth orbit line.
void setUranusOrbitColor(const Vec3f &c)
Set the color used to draw Uranus orbit line.
void setFlagTrails(bool b)
Set flag which determines if planet trails are drawn or hidden.
void setDwarfPlanetsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of the dwarf planets.
void setFlagLightTravelTime(bool b)
Set flag which determines if the light travel time calculation is used or not.
PlanetP searchByEnglishName(QString planetEnglishName) const
Get a pointer to a Planet object.
virtual void draw(StelCore *core)
Draw SolarSystem objects (planets).
virtual StelObjectP searchByName(const QString &name) const
Search for a SolarSystem object based on the English name.