StelCore.hpp   StelCore.hpp 
skipping to change at line 50 skipping to change at line 50
//! 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 themself. //! various StelModules to update and display themself.
//! 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 //! @author Fabien Chereau
class StelCore : public QObject class StelCore : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_ENUMS(ProjectionType) Q_ENUMS(ProjectionType)
Q_ENUMS(DeltaTAlgorithm)
public: public:
//! @enum FrameType //! @enum FrameType
//! Supported reference frame types //! Supported reference frame types
enum FrameType enum FrameType
{ {
FrameUninitialized, //!< Reference frame is not se FrameUninitialized, //!< Reference frame is not
t (FMajerech: Added to avoid condition on uninitialized value in StelSkyLay set (FMajerech: Added to avoid condition on uninitialized value in StelSkyL
erMgr::draw()) ayerMgr::draw())
FrameAltAz, //!< Altazimuthal reference fr FrameAltAz, //!< Altazimuthal reference
ame centered on observer. frame centered on observer.
FrameHeliocentricEcliptic, //!< Ecliptic reference frame FrameHeliocentricEcliptic, //!< Ecliptic reference fram
centered on the Sun e centered on the Sun
FrameObservercentricEcliptic, //!< Ecliptic reference frame FrameObservercentricEcliptic, //!< Ecliptic reference fram
centered on the Observer e centered on the Observer
FrameEquinoxEqu, //!< Equatorial reference fram FrameEquinoxEqu, //!< Equatorial reference fr
e at the current equinox centered on the observer. ame at the current equinox centered on the observer.
// //! The north pole follows t
! The north pole follows the precession of the planet on which the observer he precession of the planet on which the observer is located.
is located. FrameJ2000, //!< Equatorial reference fr
FrameJ2000, //!< Equatorial reference fram ame at the J2000 equinox centered on the observer.
e at the J2000 equinox centered on the observer. //! This is also the ICRS re
// ference frame.
! This is also the ICRS reference frame. FrameGalactic //! Galactic reference frame
FrameGalactic //! Galactic reference frame c centered on observer.
entered on observer.
}; };
//! Available projection types. A value of 1000 indicate the default projection //! Available projection types. A value of 1000 indicate the default projection
enum ProjectionType enum ProjectionType
{ {
ProjectionPerspective, //!< Perspective projection ProjectionPerspective, //!< Perspective projection
ProjectionEqualArea, //!< Equal Area projection ProjectionEqualArea, //!< Equal Area projection
ProjectionStereographic, //!< Stereograhic projection ProjectionStereographic, //!< Stereograhic projection
ProjectionFisheye, //!< Fisheye projection ProjectionFisheye, //!< Fisheye projection
ProjectionHammer, //!< Hammer-Aitoff projection ProjectionHammer, //!< Hammer-Aitoff projectio
ProjectionCylinder, //!< Cylinder projection n
ProjectionMercator, //!< Mercator projection ProjectionCylinder, //!< Cylinder projection
ProjectionOrthographic //!< Orthographic projection ProjectionMercator, //!< Mercator projection
ProjectionOrthographic //!< Orthographic projection
}; };
//! Available refraction mode. //! Available refraction mode.
enum RefractionMode enum RefractionMode
{ {
RefractionAuto, //!< Automatically decide to add refraction if atmosphere is activated RefractionAuto, //!< Automatically decide to add refraction if atmosphere is activated
RefractionOn, //!< Always add refraction ( i.e. apparent coordinates) RefractionOn, //!< Always add refraction ( i.e. apparent coordinates)
RefractionOff //!< Never add refraction (i .e. geometric coordinates) RefractionOff //!< Never add refraction (i .e. geometric coordinates)
}; };
//! @enum DeltaTAlgorithm
//! Available DeltaT algorithms
enum DeltaTAlgorithm
{
WithoutCorrection, //!< Without correction, Del
taT is Zero. Like Stellarium versions before 0.12.
Schoch, //!< Schoch (1931) algorithm
for DeltaT
Clemence, //!< Clemence (1948) algorit
hm for DeltaT
IAU, //!< IAU (1952) algorithm fo
r DeltaT (based on observations by Spencer Jones (1939))
AstronomicalEphemeris, //!< Astronomical Ephemeris
(1960) algorithm for DeltaT
TuckermanGoldstine, //!< Tuckerman (1962, 1964)
& Goldstine (1973) algorithm for DeltaT
MullerStephenson, //!< Muller & Stephenson (19
75) algorithm for DeltaT
Stephenson1978, //!< Stephenson (1978) algor
ithm for DeltaT
SchmadelZech1979, //!< Schmadel & Zech (1979)
algorithm for DeltaT
MorrisonStephenson1982, //!< Morrison & Stephenson (
1982) algorithm for DeltaT (used by RedShift)
StephensonMorrison1984, //!< Stephenson & Morrison (
1984) algorithm for DeltaT
StephensonHoulden, //!< Stephenson & Houlden (1
986) algorithm for DeltaT
Espenak, //!< Espenak (1987, 1989) al
gorithm for DeltaT
Borkowski, //!< Borkowski (1988) algori
thm for DeltaT
SchmadelZech1988, //!< Schmadel & Zech (1988)
algorithm for DeltaT
ChaprontTouze, //!< Chapront-Touzé & Chapro
nt (1991) algorithm for DeltaT
StephensonMorrison1995, //!< Stephenson & Morrison (
1995) algorithm for DeltaT
Stephenson1997, //!< Stephenson (1997) algor
ithm for DeltaT
ChaprontMeeus, //!< Chapront, Chapront-Touz
e & Francou (1997) & Meeus (1998) algorithm for DeltaT
JPLHorizons, //!< JPL Horizons algorithm
for DeltaT
MeeusSimons, //!< Meeus & Simons (2000) a
lgorithm for DeltaT
MontenbruckPfleger, //!< Montenbruck & Pfleger (
2000) algorithm for DeltaT
ReingoldDershowitz, //!< Reingold & Dershowitz (
2002, 2007) algorithm for DeltaT
MorrisonStephenson2004, //!< Morrison & Stephenson (
2004, 2005) algorithm for DeltaT
Reijs, //!< Reijs (2006) algorithm
for DeltaT
EspenakMeeus, //!< Espenak & Meeus (2006)
algorithm for DeltaT (Recommended, default)
Custom //!< User defined coefficien
ts 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(class StelRenderer* renderer); void init(class StelRenderer* renderer);
//! 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.
void update(double deltaTime); void update(double deltaTime);
skipping to change at line 233 skipping to change at line 267
//! @return the locale sideral time in radian //! @return the locale sideral time in radian
double getLocalSideralTime() const; double getLocalSideralTime() const;
//! Get the duration of a sideral day for the current observer in da y. //! Get the duration of a sideral day for the current observer in da y.
double getLocalSideralDayLength() const; double getLocalSideralDayLength() const;
//! Return the startup mode, can be preset|Preset or anything else //! Return the startup mode, can be preset|Preset or anything else
QString getStartupTimeMode(); QString getStartupTimeMode();
void setStartupTimeMode(const QString& s); void setStartupTimeMode(const QString& s);
//! Get Delta-T estimation for a given date.
//! @param jDay the date and time expressed as a julian day
//! @return Delta-T 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
double getDeltaT(double jDay) const;
//! Get info about valid range for current algorithm for calculation
of Delta-T
//! @param jDay the JD
//! @param marker the marker for valid range
//! @return valid range
QString getCurrentDeltaTAlgorithmValidRange(double jDay, QString* ma
rker) const;
public slots: public slots:
//! 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
QStringList getAllProjectionTypeKeys() const; QStringList getAllProjectionTypeKeys() const;
//! Set the current algorithm for time correction (DeltaT)
void setCurrentDeltaTAlgorithm(DeltaTAlgorithm algorithm) { currentD
eltaTAlgorithm=algorithm; }
//! Get the current algorithm for time correction (DeltaT)
DeltaTAlgorithm getCurrentDeltaTAlgorithm() const { return currentDe
ltaTAlgorithm; }
//! Get description of the current algorithm for time correction
QString getCurrentDeltaTAlgorithmDescription(void) const;
//! Get the current algorithm used by the DeltaT
QString getCurrentDeltaTAlgorithmKey(void) const;
//! Set the current algorithm to use from its key
void setCurrentDeltaTAlgorithmKey(QString type);
//! Set the mask type. //! Set the mask type.
void setMaskType(StelProjector::StelProjectorMaskType m); void setMaskType(StelProjector::StelProjectorMaskType m);
//! Set the flag with decides whether to arrage labels so that //! Set the flag with decides whether to arrage labels so that
//! they are aligned with the bottom of a 2d screen, or a 3d dome. //! they are aligned with the bottom of a 2d screen, or a 3d dome.
void setFlagGravityLabels(bool gravity); void setFlagGravityLabels(bool gravity);
//! Set the offset rotation angle in degree to apply to gravity text (only if gravityLabels is set to false). //! Set the offset rotation angle in degree to apply to gravity text (only if gravityLabels is set to false).
void setDefautAngleForGravityText(float a); void setDefautAngleForGravityText(float a);
//! Set the horizontal flip status. //! Set the horizontal flip status.
//! @param flip The new value (true = flipped, false = unflipped). //! @param flip The new value (true = flipped, false = unflipped).
skipping to change at line 281 skipping to change at line 338
//! 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();
//! Set the current date in Julian Day //! Set the current date in Julian Day
void setJDay(double JD); void setJDay(double JD);
//! Get the current date in Julian Day //! Get the current date in Julian Day
double getJDay() const; double getJDay() const;
//! Set the current date in Modified Julian Day
void setMJDay(double MJD);
//! Get the current date in Modified Julian Day
double getMJDay() const;
//! 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 423 skipping to change at line 485
void addSolarDays(double d); void addSolarDays(double d);
//! Add a number of sidereal days to the current simulation time, //! Add a number of sidereal days to the current simulation time,
//! based on the observer body's rotational period. //! based on the observer body's rotational period.
//! @param d the decimal number of sidereal days to add (use negativ e values to subtract) //! @param d the decimal number of sidereal days to add (use negativ e values to subtract)
void addSiderealDays(double d); void addSiderealDays(double d);
//! Move the observer to the selected object. This will only do some thing if //! Move the observer to the selected object. This will only do some thing if
//! the selected object is of the correct type - i.e. a planet. //! the selected object is of the correct type - i.e. a planet.
void moveObserverToSelected(); void moveObserverToSelected();
//! Set year for custom equation for calculation of Delta-T
//! @param y the year, e.g. 1820
void setCustomYear(float y) { customYear=y; }
//! Set n-dot for custom equation for calculation of Delta-T
//! @param y the n-dot value, e.g. -26.0
void setCustomNDot(float v) { customNDot=v; }
//! Set coefficients for custom equation for calculation of Delta-T
//! @param y the coefficients, e.g. -20,0,32
void setCustomEquationCoefficients(Vec3f c) { customEquationCoeff=c;
}
//! Get year for custom equation for calculation of Delta-T
float getCustomYear() const { return customYear; }
//! Get n-dot for custom equation for calculation of Delta-T
float getCustomNDot() const { return customNDot; }
//! Get coefficients for custom equation for calculation of Delta-T
Vec3f getCustomEquationCoefficients() const { return customEquationC
oeff; }
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);
private: private:
StelToneReproducer* toneConverter; // Tones conversion between stellarium world and display device StelToneReproducer* toneConverter; // 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)
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);
// Matrices used for every coordinate transfo // Matrices used for every coordinate transfo
Mat4d matHeliocentricEclipticToAltAz; // Transform from helioce ntric ecliptic (Vsop87) to observer-centric altazimuthal coordinate Mat4d matHeliocentricEclipticToAltAz; // Transform from helioce ntric ecliptic (Vsop87) to observer-centric altazimuthal coordinate
Mat4d matAltAzToHeliocentricEcliptic; // Transform from observe r-centric altazimuthal coordinate to heliocentric ecliptic (Vsop87) Mat4d matAltAzToHeliocentricEcliptic; // Transform from observe r-centric altazimuthal coordinate to heliocentric ecliptic (Vsop87)
Mat4d matAltAzToEquinoxEqu; // Transform from observe r-centric altazimuthal coordinate to Earth Equatorial Mat4d matAltAzToEquinoxEqu; // Transform from observe r-centric altazimuthal coordinate to Earth Equatorial
skipping to change at line 470 skipping to change at line 552
StelObserver* position; StelObserver* position;
// The ID of the default startup location // The ID of the default startup location
QString defaultLocationID; QString defaultLocationID;
// Time variables // Time variables
double timeSpeed; // Positive : forward, Negative : Backward, 1 = 1sec/sec double timeSpeed; // Positive : forward, Negative : Backward, 1 = 1sec/sec
double JDay; // Curent time in Julian day double JDay; // Curent time in Julian day
double presetSkyTime; double presetSkyTime;
QTime initTodayTime; QTime initTodayTime;
QString startupTimeMode; QString startupTimeMode;
// Variables for custom equation of Delta-T
Vec3f customEquationCoeff;
float customNDot;
float customYear;
}; };
#endif // _STELCORE_HPP_ #endif // _STELCORE_HPP_
 End of changes. 10 change blocks. 
28 lines changed or deleted 151 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/