20 #ifndef _STELCORE_HPP_
21 #define _STELCORE_HPP_
23 #include "StelProjector.hpp"
25 #include "StelLocation.hpp"
26 #include "StelSkyDrawer.hpp"
28 #include <QStringList>
49 Q_ENUMS(ProjectionType)
50 Q_ENUMS(DeltaTAlgorithm)
61 FrameHeliocentricEcliptic,
62 FrameObservercentricEcliptic,
74 ProjectionPerspective,
76 ProjectionStereographic,
81 ProjectionOrthographic
101 AstronomicalEphemeris,
106 MorrisonStephenson1982,
107 StephensonMorrison1984,
113 StephensonMorrison1995,
120 MorrisonStephenson2004,
137 void update(
double deltaTime);
140 void windowHasBeenResized(
float x,
float y,
float width,
float height);
154 StelProjectorP getProjection(FrameType frameType, RefractionMode refractionMode=RefractionAuto)
const;
179 void setClippingPlanes(
double znear,
double zfar);
181 void getClippingPlanes(
double* zn,
double* zf)
const;
184 QString projectionTypeKeyToNameI18n(
const QString& key)
const;
187 QString projectionNameI18nToTypeKey(
const QString& nameI18n)
const;
195 void lookAtJ2000(
const Vec3d& pos,
const Vec3d& up);
197 Vec3d altAzToEquinoxEqu(
const Vec3d& v, RefractionMode refMode=RefractionAuto)
const;
198 Vec3d equinoxEquToAltAz(
const Vec3d& v, RefractionMode refMode=RefractionAuto)
const;
199 Vec3d altAzToJ2000(
const Vec3d& v, RefractionMode refMode=RefractionAuto)
const;
200 Vec3d j2000ToAltAz(
const Vec3d& v, RefractionMode refMode=RefractionAuto)
const;
201 void j2000ToAltAzInPlaceNoRefraction(
Vec3f* v)
const {v->transfo4d(matJ2000ToAltAz);}
203 Vec3d equinoxEquToJ2000(
const Vec3d& v)
const;
204 Vec3d j2000ToEquinoxEqu(
const Vec3d& v)
const;
208 Vec3d heliocentricEclipticToAltAz(
const Vec3d& v, RefractionMode refMode=RefractionAuto)
const;
211 Vec3d heliocentricEclipticToEquinoxEqu(
const Vec3d& v)
const;
214 Vec3d heliocentricEclipticToEarthPosEquinoxEqu(
const Vec3d& v)
const;
235 static const Mat4d matJ2000ToVsop87;
237 static const Mat4d matVsop87ToJ2000;
239 static const Mat4d matJ2000ToGalactic;
241 static const Mat4d matGalacticToJ2000;
244 Vec3d getObserverHeliocentricEclipticPos()
const;
249 const QSharedPointer<class Planet> getCurrentPlanet()
const;
258 void moveObserverTo(
const StelLocation& target,
double duration=1.,
double durationIfPlanetChange=1.);
261 static const double JD_SECOND;
262 static const double JD_MINUTE;
263 static const double JD_HOUR;
264 static const double JD_DAY;
265 static const double ONE_OVER_JD_SECOND;
269 double getLocalSiderealTime()
const;
272 double getLocalSiderealDayLength()
const;
275 double getLocalSiderealYearLength()
const;
278 QString getStartupTimeMode();
279 void setStartupTimeMode(
const QString& s);
285 double getDeltaT(
double jDay)
const;
291 QString getCurrentDeltaTAlgorithmValidRange(
double jDay, QString* marker)
const;
297 double getCurrentEpoch()
const;
300 QString getDefaultProjectionTypeKey(
void)
const;
305 ProjectionType getCurrentProjectionType()
const;
540 ProjectionType currentProjectionType;
543 DeltaTAlgorithm currentDeltaTAlgorithm;
548 void updateTransformMatrices();
549 void updateTime(
double deltaTime);
553 Mat4d matHeliocentricEclipticToAltAz;
554 Mat4d matAltAzToHeliocentricEcliptic;
555 Mat4d matAltAzToEquinoxEqu;
556 Mat4d matEquinoxEquToAltAz;
557 Mat4d matHeliocentricEclipticToEquinoxEqu;
558 Mat4d matEquinoxEquToJ2000;
559 Mat4d matJ2000ToEquinoxEqu;
560 Mat4d matJ2000ToAltAz;
562 Mat4d matAltAzModelView;
563 Mat4d invertMatAltAzModelView;
568 QString defaultLocationID;
573 double presetSkyTime;
575 QString startupTimeMode;
576 double secondsOfLastJDayUpdate;
577 double JDayOfLastJDayUpdate;
580 Vec3f deltaTCustomEquationCoeff;
581 float deltaTCustomNDot;
582 float deltaTCustomYear;
586 #endif // _STELCORE_HPP_
void setTimeRate(double ts)
Set time speed in JDay/sec.
Store the informations for a location on a planet.
void setPresetSkyTime(double d)
Set the preset sky time from a JD.
void subtractSiderealYear()
Subtract one sidereal year to the simulation time.
void setCurrentProjectionType(ProjectionType type)
Set the current ProjectionType to use.
double getJDay() const
Get the current date in Julian Day.
void subtractTropicalYear()
Subtract one mean tropical year to the simulation time.
void timeRateChanged(double rate)
This signal is emitted when the time rate has changed.
void addWeek()
Add one [Earth, solar] week to the current simulation time.
DeltaTAlgorithm getCurrentDeltaTAlgorithm() const
Get the current algorithm for time correction (DeltaT)
Provide a set of methods used to draw sky objects taking into account eyes adaptation, zoom level, instrument model and artificially set magnitude limits.
void addSiderealDay()
Add one sidereal day to the simulation time.
QStringList getAllProjectionTypeKeys() const
Get the list of all the available projections.
void returnToDefaultLocation()
Return to the default location.
StelProjectorMaskType
Define viewport mask types.
void setInitTodayTime(const QTime &t)
set the initial "today time" from the config file
bool getFlipHorz(void) const
Get the state of the horizontal flip.
Vec3f getDeltaTCustomEquationCoefficients() const
Get coefficients for custom equation for calculation of Delta-T.
void decreaseTimeSpeed()
Decrease the time speed.
void addSiderealWeek()
Add one sidereal week (7 sidereal days) to the simulation time.
void subtractDraconicMonth()
Subtract one draconic month to the simulation time.
void subtractDay()
Subtract one [Earth, solar] day to the current simulation time.
double getMJDay() const
Get the current date in Modified Julian Day.
void setFlipVert(bool flip)
Set the vertical flip status.
void subtractTropicalCentury()
Subtract one mean tropical century to the simulation time.
A SphericalCap is defined by a direction and an aperture.
void subtractSiderealMonth()
Subtract one sidereal month (1/12 of sidereal year) to the simulation time.
QString getCurrentDeltaTAlgorithmDescription(void) const
Get description of the current algorithm for time correction.
void addDay()
Add one [Earth, solar] day to the current simulation time.
void setCurrentDeltaTAlgorithmKey(QString type)
Set the current algorithm to use from its key.
void addTropicalCentury()
Add one mean tropical century to the simulation time.
void setCurrentDeltaTAlgorithm(DeltaTAlgorithm algorithm)
Set the current algorithm for time correction (DeltaT)
void setRealTimeSpeed()
Set real time speed, i.e. 1 sec/sec.
Main class for Stellarium core processing.
void setDefautAngleForGravityText(float a)
Set the offset rotation angle in degree to apply to gravity text (only if gravityLabels is set to fal...
void addSynodicMonth()
Add one synodic month to the simulation time.
Grid of triangles (zones) on the sphere with radius 1, generated by subdividing the icosahedron...
void addHour()
Add one [Earth, solar] hour to the current simulation time.
float getDeltaTCustomNDot() const
Get n-dot for custom equation for calculation of Delta-T.
void addTropicalYear()
Add one mean tropical year to the simulation time.
QSharedPointer< StelProjector > StelProjectorP
Shared pointer on a StelProjector instance (implement reference counting)
void setFlagGravityLabels(bool gravity)
Set the flag with decides whether to arrage labels so that they are aligned with the bottom of a 2d s...
void subtractSynodicMonth()
Subtract one synodic month to the simulation time.
QString getCurrentDeltaTAlgorithmKey(void) const
Get the current algorithm used by the DeltaT.
Manages the head movements and zoom operations.
Converts tones in function of the eye adaptation to luminance.
void addSiderealYear()
Add one sidereal year to the simulation time.
void decreaseTimeSpeedLess()
Decrease the time speed but not as much as with decreaseTimeSpeed()
float getDeltaTCustomYear() const
Get year for custom equation for calculation of Delta-T.
void addDraconicYear()
Add one draconic year to the simulation time.
void toggleRealTimeSpeed()
Set real time speed or pause simulation if we are already in realtime speed.
void setTodayTime(const QTime &target)
Set the time to some value, leaving the day the same.
Should be renamed as PlanetBasedObserver and derive from a more generical StelObserver class...
bool getFlipVert(void) const
Get the state of the vertical flip.
void returnToHome()
Return to the default location and set default landscape with atmosphere and fog effects.
void subtractWeek()
Subtract one [Earth, solar] week to the current simulation time.
void moveObserverToSelected()
Move the observer to the selected object.
double getPresetSkyTime() const
Return the preset sky time in JD.
void setFlipHorz(bool flip)
Set the horizontal flip status.
void setMaskType(StelProjector::StelProjectorMaskType m)
Set the mask type.
void setJDay(double JD)
Set the current date in Julian Day.
void addSiderealDays(double d)
Add a number of sidereal days to the current simulation time, based on the observer body's rotational...
void setZeroTimeSpeed()
Set time speed to 0, i.e. freeze the passage of simulation time.
bool getIsTimeNow() const
Get whether the current stellarium time is the real world time.
void setTimeNow()
Set stellarium time to current real world time.
void addAnomalisticMonth()
Add one anomalistic month to the simulation time.
void subtractSiderealWeek()
Subtract one sidereal week (7 sidereal days) to the simulation time.
void addTropicalMonth()
Add one mean tropical month to the simulation time.
void subtractAnomalisticMonth()
Subtract one anomalistic month to the simulation time.
void setDeltaTCustomEquationCoefficients(Vec3f c)
Set coefficients for custom equation for calculation of Delta-T.
QSharedPointer< ModelViewTranform > ModelViewTranformP
Shared pointer on a ModelViewTranform instance (implement reference counting)
QTime getInitTodayTime(void)
get the initial "today time" from the config file
void addDraconicMonth()
Add one draconic month to the simulation time.
void addSiderealCentury()
Add one sidereal century (100 sidereal years) to the simulation time.
void subtractTropicalMonth()
Subtract one mean tropical month to the simulation time.
void addSiderealMonth()
Add one sidereal month (1/12 of sidereal year) to the simulation time.
void subtractDraconicYear()
Subtract one draconic year to the simulation time.
void setDeltaTCustomYear(float y)
Set year for custom equation for calculation of Delta-T.
double getTimeRate() const
Get time speed in JDay/sec.
Define the StelProjectorP type.
Contains all the param needed to initialize a StelProjector.
QString getCurrentProjectionTypeKey(void) const
Get the current Mapping used by the Projection.
void subtractSiderealCentury()
Subtract one sidereal century (100 sidereal years) to the simulation time.
void increaseTimeSpeed()
Increase the time speed.
void addSolarDays(double d)
Add a number of Earth Solar days to the current simulation time.
void setCurrentProjectionTypeKey(QString type)
Set the current ProjectionType to use from its key.
void setDefaultLocationID(const QString &id)
Set the location to use by default at startup.
void setMJDay(double MJD)
Set the current date in Modified Julian Day.
void setDeltaTCustomNDot(float v)
Set n-dot for custom equation for calculation of Delta-T.
void increaseTimeSpeedLess()
Increase the time speed, but not as much as with increaseTimeSpeed()
void subtractSiderealDay()
Subtract one sidereal day to the simulation time.
void locationChanged(StelLocation)
This signal is emitted when the observer location has changed.
void subtractHour()
Subtract one [Earth, solar] hour to the current simulation time.
bool getRealTimeSpeed() const
Get whether it is real time speed, i.e. 1 sec/sec.
QString getDefaultLocationID() const
Get the location used by default at startup.