StelCore.hpp   StelCore.hpp 
skipping to change at line 51 skipping to change at line 51
//! This class provides services like management of sky projections, //! This class provides services like management of sky projections,
//! tone conversion, or reference frame conversion. It is used by the //! tone conversion, or reference frame conversion. It is used by the
//! various StelModules to update and display themselves. //! various StelModules to update and display themselves.
//! There is currently only one StelCore instance in Stellarium, but //! There is currently only one StelCore instance in Stellarium, but
//! in the future they may be more, allowing for example to display //! in the future they may be more, allowing for example to display
//! several independent views of the sky at the same time. //! several independent views of the sky at the same time.
//! @author Fabien Chereau, Matthew Gates, Georg Zotti //! @author Fabien Chereau, Matthew Gates, Georg Zotti
class StelCore : public QObject class StelCore : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(FrameType)
Q_ENUMS(ProjectionType) Q_ENUMS(ProjectionType)
Q_ENUMS(RefractionMode)
Q_ENUMS(DeltaTAlgorithm) Q_ENUMS(DeltaTAlgorithm)
Q_PROPERTY(bool flipHorz READ getFlipHorz WRITE setFlipHorz) Q_PROPERTY(bool flipHorz READ getFlipHorz WRITE setFlipHorz NOTIFY f
Q_PROPERTY(bool flipVert READ getFlipVert WRITE setFlipVert) lipHorzChanged)
Q_PROPERTY(bool flagUseNutation READ getUseNutation WRITE setUseNuta Q_PROPERTY(bool flipVert READ getFlipVert WRITE setFlipVert NOTIFY f
tion) lipVertChanged)
Q_PROPERTY(bool flagUseTopocentricCoordinates READ getUseTopocentric Q_PROPERTY(bool flagUseNutation READ getUseNutation WRITE setUseNuta
Coordinates WRITE setUseTopocentricCoordinates) tion NOTIFY flagUseNutationChanged)
Q_PROPERTY(bool flagUseTopocentricCoordinates READ getUseTopocentric
Coordinates WRITE setUseTopocentricCoordinates NOTIFY flagUseTopocentricCoo
rdinatesChanged)
Q_PROPERTY(ProjectionType currentProjectionType READ getCurrentProje
ctionType WRITE setCurrentProjectionType NOTIFY currentProjectionTypeChange
d)
//! This is just another way to access the projection type, by strin
g instead of enum
Q_PROPERTY(QString currentProjectionTypeKey READ getCurrentProjectio
nTypeKey WRITE setCurrentProjectionTypeKey NOTIFY currentProjectionTypeKeyC
hanged STORED false)
public: public:
//! @enum FrameType //! @enum FrameType
//! Supported reference frame types //! Supported reference frame types
enum FrameType enum FrameType
{ {
FrameUninitialized, //!< Reference frame is not set (FMajerech: Added to avoid condition on uninitialized value in StelSkyLayerMgr::draw()) FrameUninitialized, //!< Reference frame is not set (FMajerech: Added to avoid condition on uninitialized value in StelSkyLayerMgr::draw())
FrameAltAz, //!< Altazimuthal re ference frame centered on observer. FrameAltAz, //!< Altazimuthal re ference frame centered on observer.
FrameHeliocentricEclipticJ2000, //!< Fixed-ecliptic reference frame centered on the Sun. GZ: This is J2000 ecliptical / almost VSOP87. FrameHeliocentricEclipticJ2000, //!< Fixed-ecliptic reference frame centered on the Sun. GZ: This is J2000 ecliptical / almost VSOP87.
FrameObservercentricEclipticJ2000, //!< Fixed-ecliptic reference frame centered on the Observer. GZ: was ObservercentricEcliptic, but renamed because it is Ecliptic of J2000! FrameObservercentricEclipticJ2000, //!< Fixed-ecliptic reference frame centered on the Observer. GZ: was ObservercentricEcliptic, but renamed because it is Ecliptic of J2000!
FrameObservercentricEclipticOfDate, //!< Moving ecliptic reference frame centered on the Observer. GZ new for V0.14: Ecliptic of da te, i.e. includes the precession of the ecliptic. FrameObservercentricEclipticOfDate, //!< Moving ecliptic reference frame centered on the Observer. GZ new for V0.14: Ecliptic of da te, i.e. includes the precession of the ecliptic.
FrameEquinoxEqu, //!< Equatorial refe rence frame at the current equinox centered on the observer. FrameEquinoxEqu, //!< Equatorial refe rence frame at the current equinox centered on the observer.
//!< The north pole //!< The north pole
follows the precession of the planet on which the observer is located. On E follows the precession of the planet on which the observer is located.
arth, this may include nutation if so configured. //!< On Earth, this
//!< Has been correc may include nutation if so configured. Has been corrected for V0.14 to real
ted for V0.14 to really properly reflect ecliptical motion and precession ( ly properly reflect ecliptical motion and precession (Vondrak 2011 model) a
Vondrak 2011 model) and nutation. nd nutation.
FrameJ2000, //!< Equatorial refe FrameJ2000, //!< Equatorial refe
rence frame at the J2000 equinox centered on the observer. rence frame at the J2000 equinox centered on the observer. This is also the
//!< This is also th ICRS reference frame.
e ICRS reference frame.
FrameGalactic //!< Galactic refere nce frame centered on observer. FrameGalactic //!< Galactic refere nce frame centered on observer.
}; };
//! @enum ProjectionType //! @enum ProjectionType
//! Available projection types. A value of 1000 indicate the default projection //! Available projection types. A value of 1000 indicates the defaul t projection
enum ProjectionType enum ProjectionType
{ {
ProjectionPerspective, //!< Perspective projection ProjectionPerspective, //!< Perspective project
ProjectionEqualArea, //!< Equal Area projection ion
ProjectionStereographic, //!< Stereograhic projection ProjectionStereographic, //!< Stereographic proje
ProjectionFisheye, //!< Fisheye projection ction
ProjectionHammer, //!< Hammer-Aitoff projectio ProjectionFisheye, //!< Fisheye projection
n ProjectionOrthographic, //!< Orthographic projec
ProjectionCylinder, //!< Cylinder projection tion
ProjectionMercator, //!< Mercator projection ProjectionEqualArea, //!< Equal Area projecti
ProjectionOrthographic, //!< Orthographic projection on
ProjectionSinusoidal //!< Sinusoidal projection ProjectionHammer, //!< Hammer-Aitoff proje
ction
ProjectionSinusoidal, //!< Sinusoidal projecti
on
ProjectionMercator, //!< Mercator projection
ProjectionMiller, //!< Miller cylindrical
projection
ProjectionCylinder //!< Cylinder projection
}; };
//! @enum RefractionMode //! @enum RefractionMode
//! Available refraction mode. //! Available refraction mode.
enum RefractionMode enum RefractionMode
{ {
RefractionAuto, //!< Automatically decide to RefractionAuto, //!< Automatically decid
add refraction if atmosphere is activated e to add refraction if atmosphere is activated
RefractionOn, //!< Always add refraction ( RefractionOn, //!< Always add refracti
i.e. apparent coordinates) on (i.e. apparent coordinates)
RefractionOff //!< Never add refraction (i RefractionOff //!< Never add refractio
.e. geometric coordinates) n (i.e. geometric coordinates)
}; };
//! @enum DeltaTAlgorithm //! @enum DeltaTAlgorithm
//! Available DeltaT algorithms //! Available DeltaT algorithms
enum DeltaTAlgorithm enum DeltaTAlgorithm
{ {
WithoutCorrection, //!< Without correction, Del WithoutCorrection, //!< Without correction,
taT is Zero. Like Stellarium versions before 0.12. DeltaT is Zero. Like Stellarium versions before 0.12.
Schoch, //!< Schoch (1931) algorithm Schoch, //!< Schoch (1931) algor
for DeltaT ithm for DeltaT
Clemence, //!< Clemence (1948) algorit Clemence, //!< Clemence (1948) alg
hm for DeltaT orithm for DeltaT
IAU, //!< IAU (1952) algorithm fo IAU, //!< IAU (1952) algorith
r DeltaT (based on observations by Spencer Jones (1939)) m for DeltaT (based on observations by Spencer Jones (1939))
AstronomicalEphemeris, //!< Astronomical Ephemeris AstronomicalEphemeris, //!< Astronomical Epheme
(1960) algorithm for DeltaT ris (1960) algorithm for DeltaT
TuckermanGoldstine, //!< Tuckerman (1962, 1964) TuckermanGoldstine, //!< Tuckerman (1962, 19
& Goldstine (1973) algorithm for DeltaT 64) & Goldstine (1973) algorithm for DeltaT
MullerStephenson, //!< Muller & Stephenson (19 MullerStephenson, //!< Muller & Stephenson
75) algorithm for DeltaT (1975) algorithm for DeltaT
Stephenson1978, //!< Stephenson (1978) algor Stephenson1978, //!< Stephenson (1978) a
ithm for DeltaT lgorithm for DeltaT
SchmadelZech1979, //!< Schmadel & Zech (1979) SchmadelZech1979, //!< Schmadel & Zech (19
algorithm for DeltaT 79) algorithm for DeltaT
MorrisonStephenson1982, //!< Morrison & Stephenson ( MorrisonStephenson1982, //!< Morrison & Stephens
1982) algorithm for DeltaT (used by RedShift) on (1982) algorithm for DeltaT (used by RedShift)
StephensonMorrison1984, //!< Stephenson & Morrison ( StephensonMorrison1984, //!< Stephenson & Morris
1984) algorithm for DeltaT on (1984) algorithm for DeltaT
StephensonHoulden, //!< Stephenson & Houlden (1 StephensonHoulden, //!< Stephenson & Houlde
986) algorithm for DeltaT n (1986) algorithm for DeltaT
Espenak, //!< Espenak (1987, 1989) al Espenak, //!< Espenak (1987, 1989
gorithm for DeltaT ) algorithm for DeltaT
Borkowski, //!< Borkowski (1988) algori Borkowski, //!< Borkowski (1988) al
thm for DeltaT gorithm for DeltaT
SchmadelZech1988, //!< Schmadel & Zech (1988) SchmadelZech1988, //!< Schmadel & Zech (19
algorithm for DeltaT 88) algorithm for DeltaT
ChaprontTouze, //!< Chapront-Touzé & Chapro ChaprontTouze, //!< Chapront-Touzé & Ch
nt (1991) algorithm for DeltaT apront (1991) algorithm for DeltaT
StephensonMorrison1995, //!< Stephenson & Morrison ( StephensonMorrison1995, //!< Stephenson & Morris
1995) algorithm for DeltaT on (1995) algorithm for DeltaT
Stephenson1997, //!< Stephenson (1997) algor Stephenson1997, //!< Stephenson (1997) a
ithm for DeltaT lgorithm for DeltaT
ChaprontMeeus, //!< Chapront, Chapront-Touz ChaprontMeeus, //!< Chapront, Chapront-
e & Francou (1997) & Meeus (1998) algorithm for DeltaT Touze & Francou (1997) & Meeus (1998) algorithm for DeltaT
JPLHorizons, //!< JPL Horizons algorithm JPLHorizons, //!< JPL Horizons algori
for DeltaT thm for DeltaT
MeeusSimons, //!< Meeus & Simons (2000) a MeeusSimons, //!< Meeus & Simons (200
lgorithm for DeltaT 0) algorithm for DeltaT
MontenbruckPfleger, //!< Montenbruck & Pfleger ( MontenbruckPfleger, //!< Montenbruck & Pfleg
2000) algorithm for DeltaT er (2000) algorithm for DeltaT
ReingoldDershowitz, //!< Reingold & Dershowitz ( ReingoldDershowitz, //!< Reingold & Dershowi
2002, 2007) algorithm for DeltaT tz (2002, 2007) algorithm for DeltaT
MorrisonStephenson2004, //!< Morrison & Stephenson ( MorrisonStephenson2004, //!< Morrison & Stephens
2004, 2005) algorithm for DeltaT on (2004, 2005) algorithm for DeltaT
Reijs, //!< Reijs (2006) algorithm Reijs, //!< Reijs (2006) algori
for DeltaT thm for DeltaT
EspenakMeeus, //!< Espenak & Meeus (2006) EspenakMeeus, //!< Espenak & Meeus (20
algorithm for DeltaT (Recommended, default) 06) algorithm for DeltaT (Recommended, default)
EspenakMeeusZeroMoonAccel, // Espenak & Meeus (2006) EspenakMeeusZeroMoonAccel, //!< Espenak & Meeus (20
algorithm for DeltaT (but without additional Lunar acceleration. FOR TESTIN 06) algorithm for DeltaT (but without additional Lunar acceleration. FOR TE
G ONLY, NONPUBLIC) STING ONLY, NONPUBLIC)
Banjevic, //!< Banjevic (2006) algorit Banjevic, //!< Banjevic (2006) alg
hm for DeltaT orithm for DeltaT
IslamSadiqQureshi, //!< Islam, Sadiq & Qureshi IslamSadiqQureshi, //!< Islam, Sadiq & Qure
(2008 + revisited 2013) algorithm for DeltaT (6 polynomials) shi (2008 + revisited 2013) algorithm for DeltaT (6 polynomials)
KhalidSultanaZaidi, //!< M. Khalid, Mariam Sulta KhalidSultanaZaidi, //!< M. Khalid, Mariam S
na and Faheem Zaidi polinomial approximation of time period 1620-2013 (2014 ultana and Faheem Zaidi polinomial approximation of time period 1620-2013 (
) 2014)
Custom //!< User defined coefficien Custom //!< User defined coeffi
ts for quadratic equation for DeltaT cients for quadratic equation for DeltaT
}; };
StelCore(); StelCore();
virtual ~StelCore(); virtual ~StelCore();
//! Init and load all main core components. //! Init and load all main core components.
void init(); void init();
//! Update all the objects with respect to the time. //! Update all the objects with respect to the time.
//! @param deltaTime the time increment in sec. //! @param deltaTime the time increment in sec.
skipping to change at line 264 skipping to change at line 270
//! Return the observer heliocentric ecliptic position //! Return the observer heliocentric ecliptic position
Vec3d getObserverHeliocentricEclipticPos() const; Vec3d getObserverHeliocentricEclipticPos() const;
//! Get the informations on the current location //! Get the informations on the current location
const StelLocation& getCurrentLocation() const; const StelLocation& getCurrentLocation() const;
const QSharedPointer<class Planet> getCurrentPlanet() const; const QSharedPointer<class Planet> getCurrentPlanet() const;
//! Unfortunately we also need this. //! Unfortunately we also need this.
//! Returns the current observer.
//! Note that the observer object may be deleted at any time when co
ntrol returns to StelCore.
const StelObserver* getCurrentObserver() const; const StelObserver* getCurrentObserver() const;
SphericalCap getVisibleSkyArea() const; //! Replaces the current observer. StelCore assumes ownership of the
observer.
void setObserver(StelObserver* obs);
//! Smoothly move the observer to the given location SphericalCap getVisibleSkyArea() const;
//! @param target the target location
//! @param duration direction of view move duration in s
//! @param durationIfPlanetChange direction of view + planet travel
move duration in s.
//! This is used only if the destination planet is different from th
e starting one.
void moveObserverTo(const StelLocation& target, double duration=1.,
double durationIfPlanetChange=1.);
// Conversion in standard Julian time format // Conversion in standard Julian time format
static const double JD_SECOND; static const double JD_SECOND;
static const double JD_MINUTE; static const double JD_MINUTE;
static const double JD_HOUR; static const double JD_HOUR;
static const double JD_DAY; static const double JD_DAY;
static const double ONE_OVER_JD_SECOND; static const double ONE_OVER_JD_SECOND;
//! Get the sidereal time shifted by the observer longitude //! Get the sidereal time shifted by the observer longitude
//! @return the local sidereal time in radian //! @return the local sidereal time in radian
skipping to change at line 315 skipping to change at line 319
//! @note Useful mostly for brightness-controlled GUI decisions like font colors. //! @note Useful mostly for brightness-controlled GUI decisions like font colors.
bool isBrightDaylight() const; bool isBrightDaylight() const;
//! Get value of the current Julian epoch (i.e. current year with de cimal fraction, e.g. 2012.34567) //! Get value of the current Julian epoch (i.e. current year with de cimal fraction, e.g. 2012.34567)
double getCurrentEpoch() const; double getCurrentEpoch() const;
//! Get the default Mapping used by the Projection //! Get the default Mapping used by the Projection
QString getDefaultProjectionTypeKey(void) const; QString getDefaultProjectionTypeKey(void) const;
public slots: public slots:
//! Smoothly move the observer to the given location
//! @param target the target location
//! @param duration direction of view move duration in s
//! @param durationIfPlanetChange direction of view + planet travel
move duration in s.
//! This is used only if the destination planet is different from th
e starting one.
void moveObserverTo(const StelLocation& target, double duration=1.,
double durationIfPlanetChange=1.);
//! Set the current ProjectionType to use //! Set the current ProjectionType to use
void setCurrentProjectionType(ProjectionType type); void setCurrentProjectionType(ProjectionType type);
ProjectionType getCurrentProjectionType() const; ProjectionType getCurrentProjectionType() const;
//! Get the current Mapping used by the Projection //! Get the current Mapping used by the Projection
QString getCurrentProjectionTypeKey(void) const; QString getCurrentProjectionTypeKey(void) const;
//! Set the current ProjectionType to use from its key //! Set the current ProjectionType to use from its key
void setCurrentProjectionTypeKey(QString type); void setCurrentProjectionTypeKey(QString type);
//! Get the list of all the available projections //! Get the list of all the available projections
skipping to change at line 359 skipping to change at line 370
//! Set the vertical flip status. //! Set the vertical flip status.
//! @param flip The new value (true = flipped, false = unflipped). //! @param flip The new value (true = flipped, false = unflipped).
void setFlipVert(bool flip); void setFlipVert(bool flip);
//! Get the state of the horizontal flip. //! Get the state of the horizontal flip.
//! @return True if flipped horizontally, else false. //! @return True if flipped horizontally, else false.
bool getFlipHorz(void) const; bool getFlipHorz(void) const;
//! Get the state of the vertical flip. //! Get the state of the vertical flip.
//! @return True if flipped vertically, else false. //! @return True if flipped vertically, else false.
bool getFlipVert(void) const; bool getFlipVert(void) const;
//New for 0.15: Vertical offset should even be available for animati
on, so at last with property mechanism.
//! Get current value for horizontal viewport offset [-50...50]
//! An offset of 50 percent means projective image center is on the
right screen border
double getViewportHorizontalOffset(void);
//! Set horizontal viewport offset. Argument will be clamped to be i
nside [-50...50]
//! An offset of 50 percent means projective image center is on the
right screen border
//! Animation is available via StelMovementMgr::moveViewport()
void setViewportHorizontalOffset(double newOffsetPct);
//! Get current value for vertical viewport offset [-50...50]
//! An offset of 50 percent means projective image center is on the
upper screen border
double getViewportVerticalOffset(void);
//! Set vertical viewport offset. Argument will be clamped to be ins
ide [-50...50]
//! An offset of 50 percent means projective image center is on the
upper screen border
//! Setting to a negative value will move the visible horizon down,
this may be desired esp. in cylindrical projection.
//! Animation is available via StelMovementMgr::moveViewport()
void setViewportVerticalOffset(double newOffsetPct);
//! Can be used in specialized setups, intended e.g. for multi-proje
ctor installations with edge blending.
//! @param stretch [default 1] enlarge to stretch image to non-squar
e pixels. A minimum value of 0.001 is enforced.
//! @note This only influences the projected content. Things like Sc
reenImages keep square pixels.
void setViewportStretch(float stretch);
//! Get the location used by default at startup //! Get the location used by default at startup
QString getDefaultLocationID() const; QString getDefaultLocationID() const;
//! Set the location to use by default at startup //! Set the location to use by default at startup
void setDefaultLocationID(const QString& id); void setDefaultLocationID(const QString& id);
//! Return to the default location. //! Return to the default location.
void returnToDefaultLocation(); void returnToDefaultLocation();
//! Return to the default location and set default landscape with at mosphere and fog effects //! Return to the default location and set default landscape with at mosphere and fog effects
void returnToHome(); void returnToHome();
//! Returns the JD of the last time resetSync() was called
double getJDOfLastJDUpdate() const;
//! Sets the system date which corresponds to the jdOfLastJDUpdate.
//! Usually, you do NOT want to call this method.
//! This method is used by the RemoteSync plugin.
void setMilliSecondsOfLastJDUpdate(qint64 millis);
//! Returns the system date of the last time resetSync() was called
qint64 getMilliSecondsOfLastJDUpdate() const;
//! Set the current date in Julian Day (UT) //! Set the current date in Julian Day (UT)
void setJD(double newJD); void setJD(double newJD);
//! Set the current date in Julian Day (TT). //! Set the current date in Julian Day (TT).
//! The name is derived from the classical name "Ephemeris Time", of which TT is the successor. //! The name is derived from the classical name "Ephemeris Time", of which TT is the successor.
//! It is still frequently used in the literature. //! It is still frequently used in the literature.
void setJDE(double newJDE); void setJDE(double newJDE);
//! Get the current date in Julian Day (UT). //! Get the current date in Julian Day (UT).
double getJD() const; double getJD() const;
//! Get the current date in Julian Day (TT). //! Get the current date in Julian Day (TT).
//! The name is derived from the classical name "Ephemeris Time", of which TT is the successor. //! The name is derived from the classical name "Ephemeris Time", of which TT is the successor.
skipping to change at line 394 skipping to change at line 436
void setMJDay(double MJD); void setMJDay(double MJD);
//! Get the current date in Modified Julian Day (UT) //! Get the current date in Modified Julian Day (UT)
double getMJDay() const; double getMJDay() const;
//! Compute Delta-T estimation for a given date. //! Compute Delta-T estimation for a given date.
//! DeltaT is the accumulated effect of earth's rotation slowly gett ing slower, mostly caused by tidal braking by the Moon. //! DeltaT is the accumulated effect of earth's rotation slowly gett ing slower, mostly caused by tidal braking by the Moon.
//! For accurate positioning of objects in the sky, we must compute earth-based clock-dependent things like earth rotation, hour angles etc. //! For accurate positioning of objects in the sky, we must compute earth-based clock-dependent things like earth rotation, hour angles etc.
//! using plain UT, but all orbital motions or rotation of the other planets must be computed in TT, which is a regular time frame. //! using plain UT, but all orbital motions or rotation of the other planets must be computed in TT, which is a regular time frame.
//! Also satellites are computed in the UT frame because (1) they ar e short-lived and (2) must follow paths over earth ground. //! Also satellites are computed in the UT frame because (1) they ar e short-lived and (2) must follow paths over earth ground.
//! (Note that we make no further difference between TT and DT, thos e are regarded equivalent for our purpose.) //! (Note that we make no further difference between TT and DT, thos e are regarded equivalent for our purpose.)
//!
//! @param JD the date and time expressed as a Julian Day //! @param JD the date and time expressed as a Julian Day
//! @return DeltaT in seconds //! @return DeltaT in seconds
//! @note Thanks to Rob van Gent which create a collection from many formulas for calculation of Delta-T: http://www.staff.science.uu.nl/~gent0 113/deltat/deltat.htm //! @note Thanks to Rob van Gent which create a collection from many formulas for calculation of Delta-T: http://www.staff.science.uu.nl/~gent0 113/deltat/deltat.htm
//! @note Use this only if needed, prefer calling getDeltaT() for ac cess to the current value. //! @note Use this only if needed, prefer calling getDeltaT() for ac cess to the current value.
double computeDeltaT(const double JD) const; double computeDeltaT(const double JD) const;
//! Get current DeltaT. //! Get current DeltaT.
double getDeltaT() const; double getDeltaT() const;
//! @return whether nutation is currently used. //! @return whether nutation is currently used.
bool getUseNutation() const {return flagUseNutation;} bool getUseNutation() const {return flagUseNutation;}
//! Set whether you want computation and simulation of nutation (a s light wobble of Earth's axis, just a few arcseconds). //! Set whether you want computation and simulation of nutation (a s light wobble of Earth's axis, just a few arcseconds).
void setUseNutation(bool useNutation) { flagUseNutation=useNutation; } void setUseNutation(bool use) { if (flagUseNutation != use) { flagUs eNutation=use; emit flagUseNutationChanged(use); }}
//! @return whether topocentric coordinates are currently used. //! @return whether topocentric coordinates are currently used.
bool getUseTopocentricCoordinates() const {return flagUseTopocentric Coordinates;} bool getUseTopocentricCoordinates() const {return flagUseTopocentric Coordinates;}
//! Set whether you want computation and simulation of nutation (a s light wobble of Earth's axis, just a few arcseconds). //! Set whether you want computation and simulation of nutation (a s light wobble of Earth's axis, just a few arcseconds).
void setUseTopocentricCoordinates(bool use) { flagUseTopocentricCoor dinates=use;} void setUseTopocentricCoordinates(bool use) { if (flagUseTopocentric Coordinates!= use) { flagUseTopocentricCoordinates=use; emit flagUseTopocen tricCoordinatesChanged(use); }}
//! Return the preset sky time in JD //! Return the preset sky time in JD
double getPresetSkyTime() const; double getPresetSkyTime() const;
//! Set the preset sky time from a JD //! Set the preset sky time from a JD
void setPresetSkyTime(double d); void setPresetSkyTime(double d);
//! Set time speed in JDay/sec //! Set time speed in JDay/sec
void setTimeRate(double ts); void setTimeRate(double ts);
//! Get time speed in JDay/sec //! Get time speed in JDay/sec
double getTimeRate() const; double getTimeRate() const;
skipping to change at line 522 skipping to change at line 563
//! Add n mean tropical years to the simulation time. //! Add n mean tropical years to the simulation time.
void addMeanTropicalYears(float n=100.f); void addMeanTropicalYears(float n=100.f);
//! Add one tropical year to the simulation time. //! Add one tropical year to the simulation time.
void addTropicalYear(); void addTropicalYear();
//! Add one Julian year to the simulation time. //! Add one Julian year to the simulation time.
void addJulianYear(); void addJulianYear();
//! Add n Julian years to the simulation time. //! Add n Julian years to the simulation time.
void addJulianYears(float n=100.f); void addJulianYears(float n=100.f);
//! Add one Gaussian year to the simulation time. //! Add one Gaussian year to the simulation time. The Gaussian Year
is 365.2568983 days, and is C.F.Gauss's value for the Sidereal Year.
//! Note that 1 GaussY=2 &pi;/k where k is the Gaussian gravitationa
l constant. A massless body orbits one solar mass in 1AU distance in a Gaus
sian Year.
void addGaussianYear(); void addGaussianYear();
//! Subtract one synodic month to the simulation time. //! Subtract one synodic month to the simulation time.
void subtractSynodicMonth(); void subtractSynodicMonth();
//! Subtract one draconic year to the simulation time. //! Subtract one draconic year to the simulation time.
void subtractDraconicYear(); void subtractDraconicYear();
//! Subtract one draconic month to the simulation time. //! Subtract one draconic month to the simulation time.
void subtractDraconicMonth(); void subtractDraconicMonth();
skipping to change at line 586 skipping to change at line 628
//! @param y the coefficients, e.g. -20,0,32 //! @param y the coefficients, e.g. -20,0,32
void setDeltaTCustomEquationCoefficients(Vec3f c) { deltaTCustomEqua tionCoeff=c; } void setDeltaTCustomEquationCoefficients(Vec3f c) { deltaTCustomEqua tionCoeff=c; }
//! Get central year for custom equation for calculation of Delta-T //! Get central year for custom equation for calculation of Delta-T
float getDeltaTCustomYear() const { return deltaTCustomYear; } float getDeltaTCustomYear() const { return deltaTCustomYear; }
//! Get n-dot for custom equation for calculation of Delta-T //! Get n-dot for custom equation for calculation of Delta-T
float getDeltaTCustomNDot() const { return deltaTCustomNDot; } float getDeltaTCustomNDot() const { return deltaTCustomNDot; }
//! Get coefficients for custom equation for calculation of Delta-T //! Get coefficients for custom equation for calculation of Delta-T
Vec3f getDeltaTCustomEquationCoefficients() const { return deltaTCus tomEquationCoeff; } Vec3f getDeltaTCustomEquationCoefficients() const { return deltaTCus tomEquationCoeff; }
//! initialize ephemerides calculation functions
void initEphemeridesFunctions();
bool de430IsAvailable(); //!< true if DE430 ephemeris fil
e has been found
bool de431IsAvailable(); //!< true if DE431 ephemeris fil
e has been found
bool de430IsActive(); //!< true if DE430 ephemeris is
in use
bool de431IsActive(); //!< true if DE431 ephemeris is
in use
void setDe430Active(bool status); //!< switch DE430 use to @param
status (if de430IsAvailable()) DE430 is only used if date is within range o
f DE430.
void setDe431Active(bool status); //!< switch DE431 use to @param
status (if de431IsAvailable()). DE431 is only used if DE430 is not used and
the date is within range of DE431.
signals: signals:
//! This signal is emitted when the observer location has changed. //! This signal is emitted when the observer location has changed.
void locationChanged(StelLocation); void locationChanged(StelLocation);
//! This signal is emitted when the time rate has changed //! This signal is emitted when the time rate has changed
void timeRateChanged(double rate); void timeRateChanged(double rate);
//! This signal is emitted whenever the time is re-synced.
//! This happens whenever the internal jDay is changed through setJD
ay/setMJDay and similar,
//! and whenever the time rate changes.
void timeSyncOccurred(double jDay);
//! This signal indicates a horizontal display flip
void flipHorzChanged(bool b);
//! This signal indicates a vertical display flip
void flipVertChanged(bool b);
//! This signal indicates a switch in use of nutation
void flagUseNutationChanged(bool b);
//! This signal indicates a switch in use of topocentric coordinates
void flagUseTopocentricCoordinatesChanged(bool b);
//! Emitted whenever the projection type changes
void currentProjectionTypeChanged(StelCore::ProjectionType newType);
//! Emitted whenever the projection type changes
void currentProjectionTypeKeyChanged(const QString& newValue);
private: private:
StelToneReproducer* toneConverter; // Tones conversion between stellarium world and display device StelToneReproducer* toneReproducer; // Tones conversion between stellarium world and display device
StelSkyDrawer* skyDrawer; StelSkyDrawer* skyDrawer;
StelMovementMgr* movementMgr; // Manage vision movements StelMovementMgr* movementMgr; // Manage vision movements
// Manage geodesic grid // Manage geodesic grid
mutable StelGeodesicGrid* geodesicGrid; mutable StelGeodesicGrid* geodesicGrid;
// The currently used projection type // The currently used projection type
ProjectionType currentProjectionType; ProjectionType currentProjectionType;
// The currentrly used time correction (DeltaT) // The currentrly used time correction (DeltaT)
DeltaTAlgorithm currentDeltaTAlgorithm; DeltaTAlgorithm currentDeltaTAlgorithm;
// Parameters to use when creating new instances of StelProjector // Parameters to use when creating new instances of StelProjector
StelProjector::StelProjectorParams currentProjectorParams; StelProjector::StelProjectorParams currentProjectorParams;
void updateTransformMatrices(); void updateTransformMatrices();
void updateTime(double deltaTime); void updateTime(double deltaTime);
void updateMaximumFov();
void resetSync(); void resetSync();
void registerMathMetaTypes();
// Matrices used for every coordinate transfo // Matrices used for every coordinate transfo
Mat4d matHeliocentricEclipticJ2000ToAltAz; // Transform from helioce ntric ecliptic Cartesian (VSOP87A) to topocentric (StelObserver) altazimuth al coordinate Mat4d matHeliocentricEclipticJ2000ToAltAz; // Transform from helioce ntric ecliptic Cartesian (VSOP87A) to topocentric (StelObserver) altazimuth al coordinate
Mat4d matAltAzToHeliocentricEclipticJ2000; // Transform from topocen tric (StelObserver) altazimuthal coordinate to heliocentric ecliptic Cartes ian (VSOP87A) Mat4d matAltAzToHeliocentricEclipticJ2000; // Transform from topocen tric (StelObserver) altazimuthal coordinate to heliocentric ecliptic Cartes ian (VSOP87A)
Mat4d matAltAzToEquinoxEqu; // Transform from topocen tric altazimuthal coordinate to Earth Equatorial Mat4d matAltAzToEquinoxEqu; // Transform from topocen tric altazimuthal coordinate to Earth Equatorial
Mat4d matEquinoxEquToAltAz; // Transform from Earth E quatorial to topocentric (StelObserver) altazimuthal coordinate Mat4d matEquinoxEquToAltAz; // Transform from Earth E quatorial to topocentric (StelObserver) altazimuthal coordinate
Mat4d matHeliocentricEclipticToEquinoxEqu; // Transform from helioce ntric ecliptic Cartesian (VSOP87A) to earth equatorial coordinate Mat4d matHeliocentricEclipticToEquinoxEqu; // Transform from helioce ntric ecliptic Cartesian (VSOP87A) to earth equatorial coordinate
Mat4d matEquinoxEquToJ2000; // For Earth, this is alm ost the inverse precession matrix, =Rz(VSOPbias)Rx(eps0)Rz(-psiA)Rx(-omA)Rz (chiA) Mat4d matEquinoxEquToJ2000; // For Earth, this is alm ost the inverse precession matrix, =Rz(VSOPbias)Rx(eps0)Rz(-psiA)Rx(-omA)Rz (chiA)
Mat4d matJ2000ToEquinoxEqu; // precession matrix Mat4d matJ2000ToEquinoxEqu; // precession matrix
Mat4d matJ2000ToAltAz; Mat4d matJ2000ToAltAz;
skipping to change at line 638 skipping to change at line 709
StelObserver* position; StelObserver* position;
// The ID of the default startup location // The ID of the default startup location
QString defaultLocationID; QString defaultLocationID;
// flag to indicate we want to use nutation (the small-scale wobble of earth's axis) // flag to indicate we want to use nutation (the small-scale wobble of earth's axis)
bool flagUseNutation; bool flagUseNutation;
// flag to indicate that we show topocentrically corrected coordinat es. (Switching to false for planetocentric coordinates is new for 0.14) // flag to indicate that we show topocentrically corrected coordinat es. (Switching to false for planetocentric coordinates is new for 0.14)
bool flagUseTopocentricCoordinates; bool flagUseTopocentricCoordinates;
// Time variables // Time variables
double timeSpeed; // Positive : forward, Negative : double timeSpeed; // Positive : forward, Negative : Backwa
Backward, 1 = 1sec/sec rd, 1 = 1sec/sec
//double JDay; // Current time in Julian day. IN //double JDay; // Current time in Julian day. IN V0.12
V0.12 TO V0.14, this was JD in TT, and all places where UT was required ha TO V0.14, this was JD in TT, and all places where UT was required had to su
d to subtract getDeltaT() explicitly. btract getDeltaT() explicitly.
QPair<double,double> JD; // From 0.14 on: JD.first=JD_UT, QPair<double,double> JD; // From 0.14 on: JD.first=JD_UT, JD.seco
JD.second=DeltaT=TT-UT. To gain JD_TT, compute JDE=JD.first+JD.second or be nd=DeltaT=TT-UT. To gain JD_TT, compute JDE=JD.first+JD.second or better ju
tter just call getJDE() st call getJDE()
// Use is best with calls getJD() // Use is best with calls getJD()/setJD() an
/setJD() and getJDE()/setJDE() to explicitly state which flavour of JD you d getJDE()/setJDE() to explicitly state which flavour of JD you need.
need.
double presetSkyTime; double presetSkyTime;
QTime initTodayTime; QTime initTodayTime;
QString startupTimeMode; QString startupTimeMode;
double secondsOfLastJDUpdate; // Time in seconds when the time ra te or time last changed double milliSecondsOfLastJDUpdate; // Time in seconds when the ti me rate or time last changed
double jdOfLastJDUpdate; // JD when the time rate or time la st changed double jdOfLastJDUpdate; // JD when the time rate or time la st changed
// Variables for custom equation of Delta-T // Variables for custom equation of Delta-T
Vec3f deltaTCustomEquationCoeff; Vec3f deltaTCustomEquationCoeff;
float deltaTCustomNDot; float deltaTCustomNDot;
float deltaTCustomYear; float deltaTCustomYear;
// Variables for DE430/431 ephem calculation
bool de430Available; // ephem file found
bool de431Available; // ephem file found
bool de430Active; // available and user-activated.
bool de431Active; // available and user-activated.
}; };
#endif // _STELCORE_HPP_ #endif // _STELCORE_HPP_
 End of changes. 27 change blocks. 
124 lines changed or deleted 238 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/