Stellarium  0.16.1
SolarSystem.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2002 Fabien Chereau
4  * Copyright (c) 2010 Bogdan Marinov
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
19  */
20 
21 #ifndef _SOLARSYSTEM_HPP_
22 #define _SOLARSYSTEM_HPP_
23 //sun is already defined in Sun C/Solaris
24 #if defined(sun)
25 #undef sun
26 #endif
27 
28 #include "StelObjectModule.hpp"
29 #include "StelTextureTypes.hpp"
30 #include "Planet.hpp"
31 #include "StelGui.hpp"
32 
33 #include <QFont>
34 
35 class Orbit;
36 class StelTranslator;
37 class StelObject;
38 class StelCore;
39 class StelProjector;
40 class QSettings;
41 
42 typedef QSharedPointer<Planet> PlanetP;
43 
48 {
49  Q_OBJECT
50  Q_PROPERTY(bool labelsDisplayed // This is a "forwarding property" which sets labeling into all planets.
51  READ getFlagLabels
52  WRITE setFlagLabels
53  NOTIFY labelsDisplayedChanged)
54  Q_PROPERTY(bool flagOrbits // was bool orbitsDisplayed
55  READ getFlagOrbits
56  WRITE setFlagOrbits
57  NOTIFY flagOrbitsChanged)
58  Q_PROPERTY(bool trailsDisplayed
59  READ getFlagTrails
60  WRITE setFlagTrails
61  NOTIFY trailsDisplayedChanged)
62  Q_PROPERTY(bool flagHints // was bool hintsDisplayed. This is a "forwarding property" only, without own variable.
63  READ getFlagHints
64  WRITE setFlagHints
65  NOTIFY flagHintsChanged)
66  Q_PROPERTY(bool flagPointer // was bool pointersDisplayed
67  READ getFlagPointer
68  WRITE setFlagPointer
69  NOTIFY flagPointerChanged)
70  Q_PROPERTY(bool flagNativePlanetNames // was bool nativeNamesDisplayed
73  NOTIFY flagNativePlanetNamesChanged)
74  Q_PROPERTY(bool flagTranslatedNames
77  NOTIFY flagTranslatedNamesChanged)
78  Q_PROPERTY(bool planetsDisplayed
79  READ getFlagPlanets
80  WRITE setFlagPlanets
81  NOTIFY flagPlanetsDisplayedChanged
82  )
83  Q_PROPERTY(bool flagIsolatedOrbits
86  NOTIFY flagIsolatedOrbitsChanged
87  )
88  Q_PROPERTY(bool flagIsolatedTrails
91  NOTIFY flagIsolatedTrailsChanged
92  )
93  Q_PROPERTY(bool flagLightTravelTime
96  NOTIFY flagLightTravelTimeChanged
97  )
98  Q_PROPERTY(bool flagUseObjModels
100  WRITE setFlagUseObjModels
101  NOTIFY flagUseObjModelsChanged
102  )
103  Q_PROPERTY(bool flagShowObjSelfShadows
106  NOTIFY flagShowObjSelfShadowsChanged
107  )
108  Q_PROPERTY(bool flagMoonScale
109  READ getFlagMoonScale
110  WRITE setFlagMoonScale
111  NOTIFY flagMoonScaleChanged
112  )
113  Q_PROPERTY(double moonScale
114  READ getMoonScale
115  WRITE setMoonScale
116  NOTIFY moonScaleChanged
117  )
118  Q_PROPERTY(bool flagMinorBodyScale
121  NOTIFY flagMinorBodyScaleChanged
122  )
123  Q_PROPERTY(double minorBodyScale
124  READ getMinorBodyScale
125  WRITE setMinorBodyScale
126  NOTIFY minorBodyScaleChanged
127  )
128  Q_PROPERTY(double labelsAmount
129  READ getLabelsAmount
130  WRITE setLabelsAmount
131  NOTIFY labelsAmountChanged
132  )
133  Q_PROPERTY(bool ephemerisMarkersDisplayed
134  READ getFlagEphemerisMarkers
135  WRITE setFlagEphemerisMarkers
136  NOTIFY ephemerisMarkersChanged
137  )
138  Q_PROPERTY(bool ephemerisHorizontalCoordinates
139  READ getFlagEphemerisHorizontalCoordinates
140  WRITE setFlagEphemerisHorizontalCoordinates
141  NOTIFY ephemerisHorizontalCoordinatesChanged
142  )
143  Q_PROPERTY(bool ephemerisDatesDisplayed
144  READ getFlagEphemerisDates
145  WRITE setFlagEphemerisDates
146  NOTIFY ephemerisDatesChanged
147  )
148  Q_PROPERTY(bool ephemerisMagnitudesDisplayed
149  READ getFlagEphemerisMagnitudes
150  WRITE setFlagEphemerisMagnitudes
151  NOTIFY ephemerisMagnitudesChanged
152  )
153 
154  Q_PROPERTY(bool flagCustomGrsSettings
157  NOTIFY flagCustomGrsSettingsChanged
158  )
159  Q_PROPERTY(int customGrsLongitude
162  NOTIFY customGrsLongitudeChanged
163  )
164  Q_PROPERTY(double customGrsDrift
165  READ getCustomGrsDrift
166  WRITE setCustomGrsDrift
167  NOTIFY customGrsDriftChanged
168  )
169  Q_PROPERTY(double customGrsJD
170  READ getCustomGrsJD
171  WRITE setCustomGrsJD
172  NOTIFY customGrsJDChanged
173  )
174 
175  // Colors
176  Q_PROPERTY(Vec3f orbitsColor
177  READ getOrbitsColor
178  WRITE setOrbitsColor
179  NOTIFY orbitsColorChanged
180  )
181  Q_PROPERTY(Vec3f majorPlanetsOrbitsColor
184  NOTIFY majorPlanetsOrbitsColorChanged
185  )
186  Q_PROPERTY(Vec3f minorPlanetsOrbitsColor
189  NOTIFY minorPlanetsOrbitsColorChanged
190  )
191  Q_PROPERTY(Vec3f dwarfPlanetsOrbitsColor
194  NOTIFY dwarfPlanetsOrbitsColorChanged
195  )
196  Q_PROPERTY(Vec3f moonsOrbitsColor
198  WRITE setMoonsOrbitsColor
199  NOTIFY moonsOrbitsColorChanged
200  )
201  Q_PROPERTY(Vec3f cubewanosOrbitsColor
204  NOTIFY cubewanosOrbitsColorChanged
205  )
206  Q_PROPERTY(Vec3f plutinosOrbitsColor
209  NOTIFY plutinosOrbitsColorChanged
210  )
211  Q_PROPERTY(Vec3f scatteredDiskObjectsOrbitsColor
214  NOTIFY scatteredDiskObjectsOrbitsColorChanged
215  )
216  Q_PROPERTY(Vec3f oortCloudObjectsOrbitsColor
219  NOTIFY oortCloudObjectsOrbitsColorChanged
220  )
221  Q_PROPERTY(Vec3f cometsOrbitsColor
224  NOTIFY cometsOrbitsColorChanged
225  )
226  Q_PROPERTY(Vec3f sednoidsOrbitsColor
229  NOTIFY sednoidsOrbitsColorChanged
230  )
231  Q_PROPERTY(Vec3f mercuryOrbitColor
234  NOTIFY mercuryOrbitColorChanged
235  )
236  Q_PROPERTY(Vec3f venusOrbitColor
237  READ getVenusOrbitColor
238  WRITE setVenusOrbitColor
239  NOTIFY venusOrbitColorChanged
240  )
241  Q_PROPERTY(Vec3f earthOrbitColor
242  READ getEarthOrbitColor
243  WRITE setEarthOrbitColor
244  NOTIFY earthOrbitColorChanged
245  )
246  Q_PROPERTY(Vec3f marsOrbitColor
247  READ getMarsOrbitColor
248  WRITE setMarsOrbitColor
249  NOTIFY marsOrbitColorChanged
250  )
251  Q_PROPERTY(Vec3f jupiterOrbitColor
254  NOTIFY jupiterOrbitColorChanged
255  )
256  Q_PROPERTY(Vec3f saturnOrbitColor
258  WRITE setSaturnOrbitColor
259  NOTIFY saturnOrbitColorChanged
260  )
261  Q_PROPERTY(Vec3f uranusOrbitColor
263  WRITE setUranusOrbitColor
264  NOTIFY uranusOrbitColorChanged
265  )
266  Q_PROPERTY(Vec3f neptuneOrbitColor
269  NOTIFY neptuneOrbitColorChanged
270  )
271 
272  // Color style
273  Q_PROPERTY(QString orbitColorStyle
274  READ getOrbitColorStyle
275  WRITE setOrbitColorStyle
276  NOTIFY orbitColorStyleChanged
277  )
278 
279 public:
280  SolarSystem();
281  virtual ~SolarSystem();
282 
284  // Methods defined in the StelModule class
290  virtual void init();
291 
292  virtual void deinit();
293 
298  virtual void draw(StelCore *core);
299 
302  virtual void update(double deltaTime);
303 
305  virtual double getCallOrder(StelModuleActionName actionName) const;
306 
308  // Methods defined in StelObjectManager class
317  virtual QList<StelObjectP> searchAround(const Vec3d& v, double limitFov, const StelCore* core) const;
318 
322  virtual StelObjectP searchByNameI18n(const QString& nameI18n) const;
323 
327  virtual StelObjectP searchByName(const QString& name) const;
328 
329  virtual StelObjectP searchByID(const QString &id) const
330  {
331  return searchByName(id);
332  }
333 
334  virtual QStringList listAllObjects(bool inEnglish) const;
335  virtual QStringList listAllObjectsByType(const QString& objType, bool inEnglish) const;
336  virtual QString getName() const { return "Solar System"; }
337  virtual QString getStelObjectType() const { return Planet::PLANET_TYPE; }
338 
339 public slots:
341  // Method callable from script and GUI
342  // Properties setters and getters
344  void setFlagPlanets(bool b);
346  bool getFlagPlanets() const;
347 
349  void setFlagTrails(bool b);
351  bool getFlagTrails() const;
352 
354  void setFlagHints(bool b);
356  bool getFlagHints() const;
357 
359  void setFlagLabels(bool b);
361  bool getFlagLabels() const;
362 
366  void setLabelsAmount(double a) {if(a!=labelsAmount) {labelsAmount=a; emit labelsAmountChanged(a);}}
369  double getLabelsAmount(void) const {return labelsAmount;}
370 
372  void setFlagOrbits(bool b);
374  bool getFlagOrbits() const {return flagOrbits;}
375 
377  void setFlagPointer(bool b) { if (b!=flagPointer) { flagPointer=b; emit flagPointerChanged(b); }}
379  bool getFlagPointer() const { return flagPointer;}
380 
382  void setFlagLightTravelTime(bool b);
385  bool getFlagLightTravelTime(void) const {return flagLightTravelTime;}
386 
388  void setFlagUseObjModels(bool b) { if(b!=flagUseObjModels) { flagUseObjModels = b; emit flagUseObjModelsChanged(b); } }
390  bool getFlagUseObjModels(void) const { return flagUseObjModels; }
391 
393  void setFlagShowObjSelfShadows(bool b);
395  bool getFlagShowObjSelfShadows(void) const { return flagShowObjSelfShadows; }
396 
399  void setFontSize(float newFontSize);
400 
407  void setLabelsColor(const Vec3f& c);
410  const Vec3f& getLabelsColor(void) const;
411 
418  void setOrbitsColor(const Vec3f& c);
421  Vec3f getOrbitsColor(void) const;
422 
429  void setMajorPlanetsOrbitsColor(const Vec3f& c);
432  Vec3f getMajorPlanetsOrbitsColor(void) const;
433 
440  void setMoonsOrbitsColor(const Vec3f& c);
443  Vec3f getMoonsOrbitsColor(void) const;
444 
451  void setMinorPlanetsOrbitsColor(const Vec3f& c);
454  Vec3f getMinorPlanetsOrbitsColor(void) const;
455 
462  void setDwarfPlanetsOrbitsColor(const Vec3f& c);
465  Vec3f getDwarfPlanetsOrbitsColor(void) const;
466 
473  void setCubewanosOrbitsColor(const Vec3f& c);
476  Vec3f getCubewanosOrbitsColor(void) const;
477 
484  void setPlutinosOrbitsColor(const Vec3f& c);
487  Vec3f getPlutinosOrbitsColor(void) const;
488 
499 
506  void setOortCloudObjectsOrbitsColor(const Vec3f& c);
510 
517  void setCometsOrbitsColor(const Vec3f& c);
520  Vec3f getCometsOrbitsColor(void) const;
521 
528  void setSednoidsOrbitsColor(const Vec3f& c);
531  Vec3f getSednoidsOrbitsColor(void) const;
532 
539  void setMercuryOrbitColor(const Vec3f& c);
542  Vec3f getMercuryOrbitColor(void) const;
543 
550  void setVenusOrbitColor(const Vec3f& c);
553  Vec3f getVenusOrbitColor(void) const;
554 
561  void setEarthOrbitColor(const Vec3f& c);
564  Vec3f getEarthOrbitColor(void) const;
565 
572  void setMarsOrbitColor(const Vec3f& c);
575  Vec3f getMarsOrbitColor(void) const;
576 
583  void setJupiterOrbitColor(const Vec3f& c);
586  Vec3f getJupiterOrbitColor(void) const;
587 
594  void setSaturnOrbitColor(const Vec3f& c);
597  Vec3f getSaturnOrbitColor(void) const;
598 
605  void setUranusOrbitColor(const Vec3f& c);
608  Vec3f getUranusOrbitColor(void) const;
609 
616  void setNeptuneOrbitColor(const Vec3f& c);
619  Vec3f getNeptuneOrbitColor(void) const;
620 
627  void setTrailsColor(const Vec3f& c) {trailColor=c;}
630  Vec3f getTrailsColor() const {return trailColor;}
631 
638  void setPointerColor(const Vec3f& c) {pointerColor=c;}
641  Vec3f getPointerColor() const {return pointerColor;}
642 
644  void setFlagMoonScale(bool b);
646  bool getFlagMoonScale(void) const {return flagMoonScale;}
647 
649  void setMoonScale(double f);
651  double getMoonScale(void) const {return moonScale;}
652 
654  void setFlagMinorBodyScale(bool b);
656  bool getFlagMinorBodyScale(void) const {return flagMinorBodyScale;}
657 
659  void setMinorBodyScale(double f);
661  double getMinorBodyScale(void) const {return minorBodyScale;}
662 
664  void updateI18n();
665 
670  float getPlanetVMagnitude(QString planetName, bool withExtinction=false) const;
671 
675  QString getPlanetType(QString planetName) const;
676 
680  double getDistanceToPlanet(QString planetName) const;
681 
685  double getElongationForPlanet(QString planetName) const;
686 
690  double getPhaseAngleForPlanet(QString planetName) const;
691 
695  float getPhaseForPlanet(QString planetName) const;
696 
713  void setApparentMagnitudeAlgorithmOnEarth(QString algorithm);
714 
717  QString getApparentMagnitudeAlgorithmOnEarth() const;
718 
720  void setFlagNativePlanetNames(bool b);
722  bool getFlagNativePlanetNames(void) const;
723 
725  void setFlagTranslatedNames(bool b);
727  bool getFlagTranslatedNames(void) const;
728 
730  void setFlagIsolatedTrails(bool b);
732  bool getFlagIsolatedTrails(void) const;
733 
735  void setFlagIsolatedOrbits(bool b);
737  bool getFlagIsolatedOrbits(void) const;
738 
740  void setFlagCustomGrsSettings(bool b);
743 
746  void setCustomGrsLongitude(int longitude);
749  int getCustomGrsLongitude();
750 
753  void setCustomGrsDrift(double drift);
755  double getCustomGrsDrift();
756 
759  // TODO (GZ): Clarify whether this is JD or rather JDE?
760  void setCustomGrsJD(double JD);
762  double getCustomGrsJD();
763 
765  void setOrbitColorStyle(QString style);
767  QString getOrbitColorStyle() const;
768 
771  QStringList getObjectsList(QString objType="all") const;
772 
773 signals:
774  void labelsDisplayedChanged(bool b);
775  void flagOrbitsChanged(bool b);
776  void flagHintsChanged(bool b);
777  void trailsDisplayedChanged(bool b);
778  void flagPointerChanged(bool b);
779  void flagNativePlanetNamesChanged(bool b);
780  void flagTranslatedNamesChanged(bool b);
781  void flagPlanetsDisplayedChanged(bool b);
782  void flagIsolatedOrbitsChanged(bool b);
783  void flagIsolatedTrailsChanged(bool b);
784  void flagLightTravelTimeChanged(bool b);
785  void flagUseObjModelsChanged(bool b);
786  void flagShowObjSelfShadowsChanged(bool b);
787  void flagMoonScaleChanged(bool b);
788  void moonScaleChanged(double f);
789  void flagMinorBodyScaleChanged(bool b);
790  void minorBodyScaleChanged(double f);
791  void labelsAmountChanged(double f);
792  void ephemerisMarkersChanged(bool b);
793  void ephemerisHorizontalCoordinatesChanged(bool b);
794  void ephemerisDatesChanged(bool b);
795  void ephemerisMagnitudesChanged(bool b);
796  void flagCustomGrsSettingsChanged(bool b);
797  void customGrsLongitudeChanged(int l);
798  void customGrsDriftChanged(double drift);
799  void customGrsJDChanged(double JD);
800 
801  void orbitsColorChanged(const Vec3f & color) const;
802  void majorPlanetsOrbitsColorChanged(const Vec3f & color) const;
803  void minorPlanetsOrbitsColorChanged(const Vec3f & color) const;
804  void dwarfPlanetsOrbitsColorChanged(const Vec3f & color) const;
805  void moonsOrbitsColorChanged(const Vec3f & color) const;
806  void cubewanosOrbitsColorChanged(const Vec3f & color) const;
807  void plutinosOrbitsColorChanged(const Vec3f & color) const;
808  void scatteredDiskObjectsOrbitsColorChanged(const Vec3f & color) const;
809  void oortCloudObjectsOrbitsColorChanged(const Vec3f & color) const;
810  void cometsOrbitsColorChanged(const Vec3f & color) const;
811  void sednoidsOrbitsColorChanged(const Vec3f & color) const;
812  void mercuryOrbitColorChanged(const Vec3f & color) const;
813  void venusOrbitColorChanged(const Vec3f & color) const;
814  void earthOrbitColorChanged(const Vec3f & color) const;
815  void marsOrbitColorChanged(const Vec3f & color) const;
816  void jupiterOrbitColorChanged(const Vec3f & color) const;
817  void saturnOrbitColorChanged(const Vec3f & color) const;
818  void uranusOrbitColorChanged(const Vec3f & color) const;
819  void neptuneOrbitColorChanged(const Vec3f & color) const;
820 
821  void orbitColorStyleChanged(QString style) const;
822 
823  void solarSystemDataReloaded();
824 
825 public:
827  // Other public methods
831  PlanetP searchByEnglishName(QString planetEnglishName) const;
832 
833  PlanetP searchMinorPlanetByEnglishName(QString planetEnglishName) const;
834 
836  PlanetP getSun() const {return sun;}
837 
839  PlanetP getEarth() const {return earth;}
840 
842  PlanetP getMoon() const {return moon;}
843 
845  bool nearLunarEclipse();
846 
848  QStringList getAllPlanetEnglishNames() const;
849 
851  QStringList getAllPlanetLocalizedNames() const;
852 
854  QStringList getAllMinorPlanetCommonEnglishNames() const;
855 
857  void reloadPlanets();
858 
860  bool removeMinorPlanet(QString name);
861 
863  double getEclipseFactor(const StelCore *core) const;
864 
868  void computePositions(double dateJDE, PlanetP observerPlanet);
869 
871  const QList<PlanetP>& getAllPlanets() const {return systemPlanets;}
873  const QList<PlanetP>& getAllMinorBodies() const {return systemMinorBodies;}
875  const QStringList getMinorBodiesList() const { return minorBodies; }
876 
878  const Vec3d getLightTimeSunPosition() const { return lightTimeSunPosition; }
879 
880 private slots:
882  void selectedObjectChange(StelModule::StelModuleSelectAction action);
883 
887  void updateSkyCulture(const QString& skyCultureDir);
888 
890  void reloadShaders();
891 
892  void setFlagEphemerisMarkers(bool b);
893  bool getFlagEphemerisMarkers() const;
894 
895  void setFlagEphemerisHorizontalCoordinates(bool b);
896  bool getFlagEphemerisHorizontalCoordinates() const;
897 
898  void setFlagEphemerisDates(bool b);
899  bool getFlagEphemerisDates() const;
900 
901  void setFlagEphemerisMagnitudes(bool b);
902  bool getFlagEphemerisMagnitudes() const;
903 
904 private:
910  StelObjectP search(Vec3d v, const StelCore* core) const;
911 
914  void computeTransMatrices(double dateJDE, const Vec3d& observerPos = Vec3d(0.));
915 
917  void drawPointer(const StelCore* core);
918 
923  void loadPlanets();
924 
926  bool loadPlanets(const QString& filePath);
927 
928  void recreateTrails();
929 
932  unsigned char BvToColorIndex(float bV);
933 
935  void setFlagPermanentOrbits(bool b);
936 
938  int shadowPlanetCount;
939  PlanetP sun;
940  PlanetP moon;
941  PlanetP earth;
942 
945  void setSelected(const QString& englishName);
947  void setSelected(PlanetP obj);
949  PlanetP getSelected(void) const {return selected;}
951  PlanetP selected;
952 
953  // Separate Moon and minor body scale values. The latter make sense to zoom up and observe irregularly formed 3D objects like minor moons of the outer planets.
954  // TBD: It may be wise to remove the sphereScale value from the Planet class: that is only used by the Moon.
955  bool flagMoonScale;
956  double moonScale;
957  bool flagMinorBodyScale;
958  double minorBodyScale;
959 
960  QFont planetNameFont;
961 
963  double labelsAmount;
964 
966  QList<PlanetP> systemPlanets;
968  QList<PlanetP> systemMinorBodies;
969 
970  // Master settings
971  bool flagOrbits;
972  bool flagLightTravelTime;
973  bool flagUseObjModels;
974  bool flagShowObjSelfShadows;
975 
977  StelTextureSP texPointer;
978  StelTextureSP texCircle; // The symbolic circle texture
979 
980  bool flagShow;
981  bool flagPointer; // show red cross selection pointer?
982  bool flagNativePlanetNames; // show native names for planets?
983  bool flagTranslatedNames; // show translated names?
984  bool flagIsolatedTrails;
985  bool flagIsolatedOrbits;
986  bool ephemerisMarkersDisplayed;
987  bool ephemerisDatesDisplayed;
988  bool ephemerisMagnitudesDisplayed;
989  bool ephemerisHorizontalCoordinates;
990 
991  class TrailGroup* allTrails;
992  StelGui* gui;
993  QSettings* conf;
994  LinearFader trailFader;
995  Vec3f trailColor;
996  Vec3f pointerColor;
997 
998  QHash<QString, QString> planetNativeNamesMap;
999  QStringList minorBodies;
1000 
1001  Vec3d lightTimeSunPosition; // when observing a solar eclipse, we need solar position 8 minutes ago.
1002  // Direct shift caused problems (LP:#1699648), circumvented with this construction.
1003  // 0.16pre observation GZ: this list contains pointers to all orbit objects,
1004  // while the planets don't own their orbit objects.
1005  // Would it not be better to hand over the orbit object ownership to the Planet object?
1006  // This list could then be removed.
1007  // In case this was originally intended to provide some fast access for time-dependent computation with the same JD,
1008  // note that we must also always compensate to light time travel, so likely each computation has to be done twice,
1009  // with current JDE and JDE-lightTime(distance).
1010  QList<Orbit*> orbits; // Pointers on created elliptical orbits. 0.16pre: WHY DO WE NEED THIS???
1011 };
1012 
1013 
1014 #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...
Definition: Orbit.hpp:22
virtual void update(double deltaTime)
Update time-varying components.
QStringList getAllPlanetEnglishNames() const
Get the list of all the planet english names.
void setFlagUseObjModels(bool b)
Set flag whether to use OBJ models for rendering, where available.
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&#39;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&#39;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.
void setMinorBodyScale(double f)
Set the display scaling factor for minor bodies.
Implementation of StelFader which implements a linear transition.
Definition: StelFader.hpp:77
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...
Definition: StelObject.hpp:36
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.
double getMinorBodyScale(void) const
Get the display scaling factor for minor bodies.
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.
Definition: StelCore.hpp:48
PlanetP getMoon() const
Get the Planet object pointer for Earth&#39;s moon.
void setOortCloudObjectsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of Oort cloud objects.
virtual QString getName() const
Gets a user-displayable name of the object category.
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.
QStringList getAllMinorPlanetCommonEnglishNames() const
Get the list of all the minor planet common english names.
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.
Definition: SolarSystem.hpp:47
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.
bool getFlagMinorBodyScale(void) const
Get the current value of the flag which determines if minor bodies (everything except the 8 planets) ...
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...
const QList< PlanetP > & getAllMinorBodies() const
Get the list of all the bodies of the solar system.
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.
virtual QString getStelObjectType() const
Returns the name that will be returned by StelObject::getType() for the objects this module manages...
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&#39;s position.
bool getFlagUseObjModels(void) const
Get the current value of the flag which determines wether to use OBJ models for rendering, where available.
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 ...
const QStringList getMinorBodiesList() const
Get the list of all minor bodies names.
bool removeMinorPlanet(QString name)
New 0.16: delete a planet from the solar system. Writes a warning to log if this is not a minor objec...
virtual StelObjectP searchByID(const QString &id) const
Return the StelObject with the given ID if exists or the empty StelObject if not found.
double getMoonScale(void) const
Get the display scaling factor for Earth&#39;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.
bool getFlagShowObjSelfShadows(void) const
Get the current value of the flag which determines whether OBJ models should render self-shadowing (u...
virtual void init()
Initialize the SolarSystem.
StelModuleActionName
Define the possible action for which an order is defined.
Definition: StelModule.hpp:121
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 computePositions(double dateJDE, PlanetP observerPlanet)
Compute the position and transform matrix for every element of the solar system.
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...
Definition: StelModule.hpp:111
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 setFlagMinorBodyScale(bool b)
Set flag which determines if minor bodies (everything except the 8 planets) are drawn scaled or not...
void setMoonScale(double f)
Set the display scaling factor for Earth&#39;s moon.
void setFlagShowObjSelfShadows(bool b)
Set flag whether OBJ models should render self-shadowing (using a shadow map)
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.
Definition: StelGui.hpp:53
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.
const Vec3d getLightTimeSunPosition() const
Get lighttime corrected solar position (essential to draw the sun during solar eclipse and compute th...
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.