Stellarium  0.21.3
Public Types | Public Slots | Signals | Public Member Functions | Static Public Attributes | Properties
StelCore Class Reference

#include <StelCore.hpp>

Public Types

enum  FrameType {
  FrameUninitialized, FrameAltAz, FrameHeliocentricEclipticJ2000, FrameObservercentricEclipticJ2000,
  FrameObservercentricEclipticOfDate, FrameEquinoxEqu, FrameJ2000, FrameGalactic,
  FrameSupergalactic
}
 
enum  ProjectionType {
  ProjectionPerspective, ProjectionStereographic, ProjectionFisheye, ProjectionOrthographic,
  ProjectionEqualArea, ProjectionHammer, ProjectionSinusoidal, ProjectionMercator,
  ProjectionMiller, ProjectionCylinder
}
 
enum  RefractionMode { RefractionAuto, RefractionOn, RefractionOff }
 
enum  DeltaTAlgorithm {
  WithoutCorrection, Schoch, Clemence, IAU,
  AstronomicalEphemeris, TuckermanGoldstine, MullerStephenson, Stephenson1978,
  SchmadelZech1979, MorrisonStephenson1982, StephensonMorrison1984, StephensonHoulden,
  Espenak, Borkowski, SchmadelZech1988, ChaprontTouze,
  StephensonMorrison1995, Stephenson1997, ChaprontMeeus, JPLHorizons,
  MeeusSimons, MontenbruckPfleger, ReingoldDershowitz, MorrisonStephenson2004,
  Reijs, EspenakMeeus, EspenakMeeusZeroMoonAccel, Banjevic,
  IslamSadiqQureshi, KhalidSultanaZaidi, StephensonMorrisonHohenkerk2016, Henriksson2017,
  Custom
}
 

Public Slots

void moveObserverTo (const StelLocation &target, double duration=1., double durationIfPlanetChange=1.)
 Smoothly move the observer to the given location. More...
 
void setCurrentProjectionType (ProjectionType type)
 Set the current ProjectionType to use.
 
ProjectionType getCurrentProjectionType () const
 
QString getCurrentProjectionTypeKey (void) const
 Get the current Mapping used by the Projection.
 
void setCurrentProjectionTypeKey (QString type)
 Set the current ProjectionType to use from its key.
 
QString getCurrentProjectionNameI18n () const
 
QStringList getAllProjectionTypeKeys () const
 Get the list of all the available projections.
 
void setCurrentDeltaTAlgorithm (DeltaTAlgorithm algorithm)
 Set the current algorithm and nDot used therein for time correction (DeltaT)
 
DeltaTAlgorithm getCurrentDeltaTAlgorithm () const
 Get the current algorithm for time correction (DeltaT)
 
QString getCurrentDeltaTAlgorithmDescription (void) const
 Get description of the current algorithm for time correction.
 
QString getCurrentDeltaTAlgorithmKey (void) const
 Get the current algorithm used by the DeltaT.
 
void setCurrentDeltaTAlgorithmKey (QString type)
 Set the current algorithm to use from its key.
 
void setMaskType (StelProjector::StelProjectorMaskType m)
 Set the mask type.
 
void setFlagGravityLabels (bool gravity)
 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.
 
bool getFlagGravityLabels () const
 return whether dome-aligned labels are in use
 
void setDefaultAngleForGravityText (float a)
 Set the offset rotation angle in degree to apply to gravity text (only if gravityLabels is set to false).
 
void setFlipHorz (bool flip)
 Set the horizontal flip status. More...
 
void setFlipVert (bool flip)
 Set the vertical flip status. More...
 
bool getFlipHorz (void) const
 Get the state of the horizontal flip. More...
 
bool getFlipVert (void) const
 Get the state of the vertical flip. More...
 
double getViewportHorizontalOffset (void) const
 Get current value for horizontal viewport offset [-50...50] An offset of 50 percent means projective image center is on the right screen border.
 
void setViewportHorizontalOffset (double newOffsetPct)
 Set horizontal viewport offset. More...
 
double getViewportVerticalOffset (void) const
 Get current value for vertical viewport offset [-50...50] An offset of 50 percent means projective image center is on the upper screen border.
 
void setViewportVerticalOffset (double newOffsetPct)
 Set vertical viewport offset. More...
 
void setViewportOffset (double newHorizontalOffsetPct, double newVerticalOffsetPct)
 
void setViewportStretch (float stretch)
 Can be used in specialized setups, intended e.g. More...
 
QString getDefaultLocationID () const
 Get the location used by default at startup.
 
void setDefaultLocationID (const QString &id)
 Set the location to use by default at startup.
 
void returnToDefaultLocation ()
 Return to the default location.
 
void returnToHome ()
 Return to the default location and set default landscape with atmosphere and fog effects.
 
double getJDOfLastJDUpdate () const
 Returns the JD of the last time resetSync() was called.
 
void setMilliSecondsOfLastJDUpdate (qint64 millis)
 Sets the system date which corresponds to the jdOfLastJDUpdate. More...
 
qint64 getMilliSecondsOfLastJDUpdate () const
 Returns the system date of the last time resetSync() was called.
 
void setJD (double newJD)
 Set the current date in Julian Day (UT)
 
void setJDE (double newJDE)
 Set the current date in Julian Day (TT). More...
 
double getJD () const
 Get the current date in Julian Day (UT).
 
double getJDE () const
 Get the current date in Julian Day (TT). More...
 
double getSolutionEquationOfTime (const double JDE) const
 Get solution of equation of time Source: J. More...
 
bool getUseDST () const
 
void setUseDST (const bool b)
 
bool getUseCustomTimeZone (void) const
 
void setUseCustomTimeZone (const bool b)
 
void setMJDay (double MJD)
 Set the current date in Modified Julian Day (UT). More...
 
double getMJDay () const
 Get the current date in Modified Julian Day (UT)
 
double computeDeltaT (const double JD)
 Compute DeltaT estimation for a given date. More...
 
double getDeltaT () const
 Get current DeltaT in seconds.
 
bool getUseNutation () const
 
void setUseNutation (bool use)
 Set whether you want computation and simulation of nutation (a slight wobble of Earth's axis, just a few arcseconds).
 
bool getUseAberration () const
 
void setUseAberration (bool use)
 Set whether you want computation and simulation of aberration (a slight wobble of stellar positions due to finite speed of light, about 20 arcseconds when observing from earth).
 
double getAberrationFactor () const
 
void setAberrationFactor (double factor)
 Set aberration factor. Values are clamped to 0...5. (Values above 5 cause graphical problems.)
 
bool getUseTopocentricCoordinates () const
 
void setUseTopocentricCoordinates (bool use)
 Set whether you want computation and simulation of nutation (a slight wobble of Earth's axis, just a few arcseconds).
 
double getPresetSkyTime () const
 Return the preset sky time in JD.
 
void setPresetSkyTime (double d)
 Set the preset sky time from a JD.
 
void setTimeRate (double ts)
 Set time speed in JDay/sec.
 
double getTimeRate () const
 Get time speed in JDay/sec.
 
void revertTimeDirection (void)
 
void increaseTimeSpeed ()
 Increase the time speed.
 
void decreaseTimeSpeed ()
 Decrease the time speed.
 
void increaseTimeSpeedLess ()
 Increase the time speed, but not as much as with increaseTimeSpeed()
 
void decreaseTimeSpeedLess ()
 Decrease the time speed but not as much as with decreaseTimeSpeed()
 
void setZeroTimeSpeed ()
 Set time speed to 0, i.e. freeze the passage of simulation time.
 
void setRealTimeSpeed ()
 Set real time speed, i.e. 1 sec/sec.
 
void toggleRealTimeSpeed ()
 Set real time speed or pause simulation if we are already in realtime speed.
 
bool getRealTimeSpeed () const
 Get whether it is real time speed, i.e. 1 sec/sec.
 
void setTimeNow ()
 Set stellarium time to current real world time.
 
void setTodayTime (const QTime &target)
 Set the time to some value, leaving the day the same.
 
bool getIsTimeNow () const
 Get whether the current stellarium time is the real world time.
 
QTime getInitTodayTime (void) const
 get the initial "today time" from the config file
 
void setInitTodayTime (const QTime &time)
 set the initial "today time" from the config file
 
void setPresetSkyTime (QDateTime dateTime)
 Set the preset sky time from a QDateTime.
 
void addMinute ()
 Add one [Earth, solar] minute to the current simulation time.
 
void addHour ()
 Add one [Earth, solar] hour to the current simulation time.
 
void addDay ()
 Add one [Earth, solar] day to the current simulation time.
 
void addWeek ()
 Add one [Earth, solar] week to the current simulation time.
 
void addSiderealDay ()
 Add one sidereal day to the simulation time. More...
 
void addSiderealWeek ()
 Add seven sidereal days to the simulation time. More...
 
void addSiderealYear ()
 Add one sidereal year to the simulation time. More...
 
void addSiderealYears (double n=100.)
 Add n sidereal years to the simulation time. More...
 
void subtractMinute ()
 Subtract one [Earth, solar] minute to the current simulation time.
 
void subtractHour ()
 Subtract one [Earth, solar] hour to the current simulation time.
 
void subtractDay ()
 Subtract one [Earth, solar] day to the current simulation time.
 
void subtractWeek ()
 Subtract one [Earth, solar] week to the current simulation time.
 
void subtractSiderealDay ()
 Subtract one sidereal day to the simulation time. More...
 
void subtractSiderealWeek ()
 Subtract seven sidereal days to the simulation time. More...
 
void subtractSiderealYear ()
 Subtract one sidereal year to the simulation time. More...
 
void subtractSiderealYears (double n=100.)
 Subtract n sidereal years to the simulation time. More...
 
void addSynodicMonth ()
 Add one synodic month to the simulation time.
 
void addSaros ()
 Add one saros (223 synodic months) to the simulation time.
 
void addDraconicYear ()
 Add one draconic year to the simulation time.
 
void addDraconicMonth ()
 Add one draconic month to the simulation time.
 
void addAnomalisticMonth ()
 Add one anomalistic month to the simulation time.
 
void addAnomalisticYear ()
 Add one anomalistic year to the simulation time.
 
void addAnomalisticYears (double n=100.)
 Add n anomalistic years to the simulation time.
 
void addMeanTropicalMonth ()
 Add one mean tropical month to the simulation time.
 
void addMeanTropicalYear ()
 Add one mean tropical year to the simulation time.
 
void addMeanTropicalYears (double n=100.)
 Add n mean tropical years to the simulation time.
 
void addTropicalYear ()
 Add one tropical year to the simulation time.
 
void addCalendricMonth ()
 Add one calendric month to the simulation time.
 
void addJulianYear ()
 Add one Julian year to the simulation time.
 
void addJulianYears (double n=100.)
 Add n Julian years to the simulation time.
 
void addGaussianYear ()
 Add one Gaussian year to the simulation time. More...
 
void subtractSynodicMonth ()
 Subtract one synodic month to the simulation time.
 
void subtractSaros ()
 Subtract one saros (223 synodic months) to the simulation time.
 
void subtractDraconicYear ()
 Subtract one draconic year to the simulation time.
 
void subtractDraconicMonth ()
 Subtract one draconic month to the simulation time.
 
void subtractAnomalisticMonth ()
 Subtract one anomalistic month to the simulation time.
 
void subtractAnomalisticYear ()
 Subtract one anomalistic year to the simulation time.
 
void subtractAnomalisticYears (double n=100.)
 Subtract n anomalistic years to the simulation time.
 
void subtractMeanTropicalMonth ()
 Subtract one mean tropical month to the simulation time.
 
void subtractMeanTropicalYear ()
 Subtract one mean tropical year to the simulation time.
 
void subtractMeanTropicalYears (double n=100.)
 Subtract n mean tropical years to the simulation time.
 
void subtractTropicalYear ()
 Subtract one tropical year to the simulation time.
 
void subtractCalendricMonth ()
 Subtract one calendric month to the simulation time.
 
void subtractJulianYear ()
 Subtract one Julian year to the simulation time.
 
void subtractJulianYears (double n=100.)
 Subtract n Julian years to the simulation time.
 
void subtractGaussianYear ()
 Subtract one Gaussian year to the simulation time.
 
void addSolarDays (double d)
 Add a number of Earth Solar days to the current simulation time. More...
 
void addSiderealDays (double d)
 Add a number of sidereal days to the current simulation time, based on the observer body's rotational period. More...
 
void moveObserverToSelected ()
 Move the observer to the selected object. More...
 
void setDeltaTCustomYear (double y)
 Set central year for custom equation for calculation of DeltaT. More...
 
void setDeltaTCustomNDot (double v)
 Set n-dot for custom equation for calculation of DeltaT. More...
 
void setDeltaTCustomEquationCoefficients (Vec3d c)
 Set coefficients for custom equation for calculation of DeltaT. More...
 
double getDeltaTCustomYear () const
 Get central year for custom equation for calculation of DeltaT.
 
double getDeltaTCustomNDot () const
 Get n-dot for custom equation for calculation of DeltaT.
 
double getDeltaTnDot () const
 Get n-dot for current DeltaT algorithm.
 
Vec3d getDeltaTCustomEquationCoefficients () const
 Get coefficients for custom equation for calculation of DeltaT.
 
void initEphemeridesFunctions ()
 initialize ephemerides calculation functions
 
bool de430IsAvailable ()
 true if DE430 ephemeris file has been found
 
bool de431IsAvailable ()
 true if DE431 ephemeris file 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 More...
 
void setDe431Active (bool status)
 switch DE431 use to More...
 
bool de440IsAvailable ()
 true if DE440 ephemeris file has been found
 
bool de441IsAvailable ()
 true if DE441 ephemeris file has been found
 
bool de440IsActive ()
 true if DE440 ephemeris is in use
 
bool de441IsActive ()
 true if DE441 ephemeris is in use
 
void setDe440Active (bool status)
 switch DE440 use to More...
 
void setDe441Active (bool status)
 switch DE441 use to More...
 
QString getIAUConstellation (const Vec3d positionEqJnow) const
 Return 3-letter abbreviation of IAU constellation name for position in equatorial coordinates on the current epoch. More...
 

Signals

void locationChanged (const StelLocation &)
 This signal is emitted when the observer location has changed.
 
void targetLocationChanged (const StelLocation &)
 This signal is emitted whenever the targetted location changes.
 
void currentTimeZoneChanged (const QString &tz)
 This signal is emitted when the current timezone name is changed.
 
void useCustomTimeZoneChanged (const bool b)
 This signal is emitted when custom timezone use is activated (true) or deactivated (false).
 
void flagUseDSTChanged (const bool b)
 This signal is emitted when daylight saving time is enabled or disabled.
 
void timeRateChanged (double rate)
 This signal is emitted when the time rate has changed.
 
void timeSyncOccurred (double jDay)
 This signal is emitted whenever the time is re-synced. More...
 
void dateChanged ()
 This signal is emitted when the date has changed.
 
void dateChangedForTrails ()
 This signal can be emitted when e.g. More...
 
void dateChangedForMonth ()
 This signal is emitted when the date has changed for a month.
 
void dateChangedByYear ()
 This signal is emitted when the date has changed by one year.
 
void flipHorzChanged (bool b)
 This signal indicates a horizontal display flip.
 
void flipVertChanged (bool b)
 This signal indicates a vertical display flip.
 
void flagUseNutationChanged (bool b)
 This signal indicates a switch in use of nutation.
 
void flagUseAberrationChanged (bool b)
 This signal indicates a switch in use of aberration.
 
void aberrationFactorChanged (double val)
 This signal indicates a change in aberration exaggeration factor.
 
void flagUseTopocentricCoordinatesChanged (bool b)
 This signal indicates a switch in use of topocentric coordinates.
 
void currentProjectionTypeChanged (StelCore::ProjectionType newType)
 Emitted whenever the projection type changes.
 
void currentProjectionTypeKeyChanged (const QString &newValue)
 Emitted whenever the projection type changes.
 
void currentProjectionNameI18nChanged (const QString &newValue)
 Emitted whenever the projection type changes.
 
void flagGravityLabelsChanged (bool gravity)
 Emitted when gravity label use is changed.
 
void configurationDataSaved ()
 Emitted when button "Save settings" is pushed.
 
void updateSearchLists ()
 

Public Member Functions

void init ()
 Init and load all main core components.
 
void update (double deltaTime)
 Update all the objects with respect to the time. More...
 
void windowHasBeenResized (qreal x, qreal y, qreal width, qreal height)
 Handle the resizing of the window.
 
void preDraw ()
 Update core state before drawing modules.
 
void postDraw ()
 Update core state after drawing modules.
 
StelProjectorP getProjection2d () const
 Get a new instance of a simple 2d projection. More...
 
StelProjectorP getProjection (FrameType frameType, RefractionMode refractionMode=RefractionAuto) const
 Get a new instance of projector using a modelview transformation corresponding to the given frame. More...
 
StelProjectorP getProjection (StelProjector::ModelViewTranformP modelViewTransform, ProjectionType projType=static_cast< ProjectionType >(1000)) const
 Get a new instance of projector using the given modelview transformation. More...
 
StelToneReproducergetToneReproducer ()
 Get the current tone reproducer used in the core.
 
const StelToneReproducergetToneReproducer () const
 Get the current tone reproducer used in the core.
 
StelSkyDrawergetSkyDrawer ()
 Get the current StelSkyDrawer used in the core.
 
const StelSkyDrawergetSkyDrawer () const
 Get the current StelSkyDrawer used in the core.
 
const StelGeodesicGridgetGeodesicGrid (int maxLevel) const
 Get an instance of StelGeodesicGrid which is garanteed to allow for at least maxLevel levels.
 
StelMovementMgrgetMovementMgr ()
 Get the instance of movement manager.
 
const StelMovementMgrgetMovementMgr () const
 Get the const instance of movement manager.
 
void setClippingPlanes (double znear, double zfar)
 Set the near and far clipping planes.
 
void getClippingPlanes (double *zn, double *zf) const
 Get the near and far clipping planes.
 
QString projectionTypeKeyToNameI18n (const QString &key) const
 Get the translated projection name from its TypeKey for the current locale.
 
QString projectionNameI18nToTypeKey (const QString &nameI18n) const
 Get the projection TypeKey from its translated name for the current locale.
 
StelProjector::StelProjectorParams getCurrentStelProjectorParams () const
 Get the current set of parameters.
 
void setCurrentStelProjectorParams (const StelProjector::StelProjectorParams &newParams)
 Set the set of parameters to use when creating a new StelProjector.
 
void lookAtJ2000 (const Vec3d &pos, const Vec3d &up)
 Set vision direction.
 
void setMatAltAzModelView (const Mat4d &mat)
 
Vec3d altAzToEquinoxEqu (const Vec3d &v, RefractionMode refMode=RefractionAuto) const
 
Vec3d equinoxEquToAltAz (const Vec3d &v, RefractionMode refMode=RefractionAuto) const
 
Vec3d altAzToJ2000 (const Vec3d &v, RefractionMode refMode=RefractionAuto) const
 
Vec3d j2000ToAltAz (const Vec3d &v, RefractionMode refMode=RefractionAuto) const
 
void j2000ToAltAzInPlaceNoRefraction (Vec3f *v) const
 
Vec3d galacticToJ2000 (const Vec3d &v) const
 
Vec3d supergalacticToJ2000 (const Vec3d &v) const
 
Vec3d equinoxEquToJ2000 (const Vec3d &v, RefractionMode refMode=RefractionAuto) const
 Transform position vector v from equatorial coordinates of date (which may also include atmospheric refraction) to those of J2000. More...
 
Vec3d j2000ToJ1875 (const Vec3d &v) const
 Use fixed matrix to allow fast transformation of positions related to the IAU constellation borders.
 
Vec3d j2000ToEquinoxEqu (const Vec3d &v, RefractionMode refMode=RefractionAuto) const
 Transform position vector v from equatorial coordinates J2000 to those of date (optionally corrected by refraction). More...
 
Vec3d j2000ToGalactic (const Vec3d &v) const
 
Vec3d j2000ToSupergalactic (const Vec3d &v) const
 
Vec3d heliocentricEclipticToAltAz (const Vec3d &v, RefractionMode refMode=RefractionAuto) const
 Transform vector from heliocentric ecliptic coordinate to altazimuthal.
 
Vec3d heliocentricEclipticToEquinoxEqu (const Vec3d &v) const
 Transform from heliocentric coordinate to equatorial at current equinox (for the planet where the observer stands)
 
StelProjector::ModelViewTranformP getHeliocentricEclipticModelViewTransform (RefractionMode refMode=RefractionAuto) const
 Get the modelview matrix for heliocentric ecliptic (Vsop87) drawing.
 
StelProjector::ModelViewTranformP getObservercentricEclipticJ2000ModelViewTransform (RefractionMode refMode=RefractionAuto) const
 Get the modelview matrix for observer-centric ecliptic (Vsop87) drawing.
 
StelProjector::ModelViewTranformP getObservercentricEclipticOfDateModelViewTransform (RefractionMode refMode=RefractionAuto) const
 Get the modelview matrix for observer-centric ecliptic of Date drawing.
 
StelProjector::ModelViewTranformP getEquinoxEquModelViewTransform (RefractionMode refMode=RefractionAuto) const
 Get the modelview matrix for observer-centric equatorial at equinox drawing.
 
StelProjector::ModelViewTranformP getAltAzModelViewTransform (RefractionMode refMode=RefractionAuto) const
 Get the modelview matrix for observer-centric altazimuthal drawing.
 
StelProjector::ModelViewTranformP getJ2000ModelViewTransform (RefractionMode refMode=RefractionAuto) const
 Get the modelview matrix for observer-centric J2000 equatorial drawing.
 
StelProjector::ModelViewTranformP getGalacticModelViewTransform (RefractionMode refMode=RefractionAuto) const
 Get the modelview matrix for observer-centric Galactic equatorial drawing.
 
StelProjector::ModelViewTranformP getSupergalacticModelViewTransform (RefractionMode refMode=RefractionAuto) const
 Get the modelview matrix for observer-centric Supergalactic equatorial drawing.
 
Vec3d getObserverHeliocentricEclipticPos () const
 Return the observer heliocentric ecliptic position (GZ: presumably J2000)
 
const StelLocationgetCurrentLocation () const
 Get the information on the current location.
 
double getUTCOffset (const double JD) const
 Get the UTC offset on the current location (in hours)
 
QString getCurrentTimeZone () const
 
void setCurrentTimeZone (const QString &tz)
 
const QSharedPointer< class PlanetgetCurrentPlanet () const
 
const StelObservergetCurrentObserver () const
 Unfortunately we also need this. More...
 
void setObserver (StelObserver *obs)
 Replaces the current observer. StelCore assumes ownership of the observer.
 
SphericalCap getVisibleSkyArea () const
 
double getLocalSiderealTime () const
 Get the sidereal time shifted by the observer longitude. More...
 
double getLocalSiderealDayLength () const
 Get the duration of a sidereal day for the current observer in day.
 
double getLocalSiderealYearLength () const
 Get the duration of a sidereal year for the current observer in days.
 
QString getStartupTimeMode () const
 Return the startup mode, can be "actual" (i.e. More...
 
void setStartupTimeMode (const QString &s)
 
QString getCurrentDeltaTAlgorithmValidRangeDescription (const double JD, QString *marker) const
 Get info about valid range for current algorithm for calculation of Delta-T. More...
 
bool isBrightDaylight () const
 Checks for altitude of the Sun - is it night or day? More...
 
double getCurrentEpoch () const
 Get value of the current Julian epoch (i.e. current year with decimal fraction, e.g. 2012.34567)
 
QString getDefaultProjectionTypeKey (void) const
 Get the default Mapping used by the Projection.
 
Vec3d getMouseJ2000Pos (void) const
 

Static Public Attributes

static const Mat4d matJ2000ToVsop87
 Rotation matrix from equatorial J2000 to ecliptic (VSOP87A).
 
static const Mat4d matVsop87ToJ2000
 Rotation matrix from ecliptic (VSOP87A) to equatorial J2000.
 
static const Mat4d matJ2000ToGalactic
 Rotation matrix from J2000 to Galactic reference frame, using FITS convention.
 
static const Mat4d matGalacticToJ2000
 Rotation matrix from Galactic to J2000 reference frame, using FITS convention.
 
static const Mat4d matJ2000ToSupergalactic
 Rotation matrix from J2000 to Supergalactic reference frame.
 
static const Mat4d matSupergalacticToJ2000
 Rotation matrix from Supergalactic to J2000 reference frame.
 
static const double JD_SECOND
 
static const double JD_MINUTE
 
static const double JD_HOUR
 
static const double JD_DAY
 
static const double ONE_OVER_JD_SECOND
 
static const double TZ_ERA_BEGINNING
 

Properties

bool flipHorz
 
bool flipVert
 
bool flagUseNutation
 
bool flagUseAberration
 
double aberrationFactor
 
bool flagUseTopocentricCoordinates
 
ProjectionType currentProjectionType
 
QString currentProjectionTypeKey
 This is just another way to access the projection type, by string instead of enum.
 
QString currentProjectionNameI18n
 Read-only property returning the localized projection name.
 
bool flagGravityLabels
 
QString currentTimeZone
 
bool flagUseCTZ
 
bool flagUseDST
 

Detailed Description

Main class for Stellarium core processing. This class provides services like management of sky projections, tone conversion, or reference frame conversion. It is used by the various StelModules to update and display themselves. There is currently only one StelCore instance in Stellarium, but in the future they may be more, allowing for example to display several independent views of the sky at the same time.

Author
Fabien Chereau, Matthew Gates, Georg Zotti

Member Enumeration Documentation

◆ DeltaTAlgorithm

Available DeltaT algorithms

Enumerator
WithoutCorrection 

Without correction, DeltaT is Zero. Like Stellarium versions before 0.12.

Schoch 

Schoch (1931) algorithm for DeltaT.

Clemence 

Clemence (1948) algorithm for DeltaT.

IAU 

IAU (1952) algorithm for 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 (1975) algorithm for DeltaT.

Stephenson1978 

Stephenson (1978) algorithm 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 (1986) algorithm for DeltaT.

Espenak 

Espenak (1987, 1989) algorithm for DeltaT.

Borkowski 

Borkowski (1988) algorithm for DeltaT.

SchmadelZech1988 

Schmadel & Zech (1988) algorithm for DeltaT.

ChaprontTouze 

Chapront-Touzé & Chapront (1991) algorithm for DeltaT.

StephensonMorrison1995 

Stephenson & Morrison (1995) algorithm for DeltaT.

Stephenson1997 

Stephenson (1997) algorithm for DeltaT.

ChaprontMeeus 

Chapront, Chapront-Touze & Francou (1997) & Meeus (1998) algorithm for DeltaT.

JPLHorizons 

JPL Horizons algorithm for DeltaT.

MeeusSimons 

Meeus & Simons (2000) algorithm 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)

EspenakMeeusZeroMoonAccel 

Espenak & Meeus (2006) algorithm for DeltaT (but without additional Lunar acceleration. FOR TESTING ONLY, NONPUBLIC)

Banjevic 

Banjevic (2006) algorithm for DeltaT.

IslamSadiqQureshi 

Islam, Sadiq & Qureshi (2008 + revisited 2013) algorithm for DeltaT (6 polynomials)

KhalidSultanaZaidi 

M. Khalid, Mariam Sultana and Faheem Zaidi polynomial approximation of time period 1620-2013 (2014)

StephensonMorrisonHohenkerk2016 

Stephenson, Morrison, Hohenkerk (2016) RSPA paper provides spline fit to observations for -720..2016 and else parabolic fit.

Henriksson2017 

Henriksson (2017) algorithm for DeltaT (The solution for Schoch formula for DeltaT (1931), but with ndot=-30.128"/cy^2)

Custom 

User defined coefficients for quadratic equation for DeltaT.

◆ FrameType

Supported reference frame types

Enumerator
FrameUninitialized 

Reference frame is not set (FMajerech: Added to avoid condition on uninitialized value in StelSkyLayerMgr::draw())

FrameAltAz 

Altazimuthal reference frame centered on observer.

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!

FrameObservercentricEclipticOfDate 

Moving ecliptic reference frame centered on the Observer. GZ new for V0.14: Ecliptic of date, i.e. includes the precession of the ecliptic.

FrameEquinoxEqu 

Equatorial reference frame at the current equinox centered on the observer.

The north pole follows the precession of the planet on which the observer is located. On Earth, this may include nutation if so configured. Has been corrected for V0.14 to really properly reflect ecliptical motion and precession (Vondrak 2011 model) and nutation.

FrameJ2000 

Equatorial reference frame at the J2000 equinox centered on the observer. This is also the ICRS reference frame.

FrameGalactic 

Galactic reference frame centered on observer.

FrameSupergalactic 

Supergalactic reference frame centered on observer.

◆ ProjectionType

Available projection types. A value of 1000 indicates the default projection

Enumerator
ProjectionPerspective 

Perspective projection.

ProjectionStereographic 

Stereographic projection.

ProjectionFisheye 

Fisheye projection.

ProjectionOrthographic 

Orthographic projection.

ProjectionEqualArea 

Equal Area projection.

ProjectionHammer 

Hammer-Aitoff projection.

ProjectionSinusoidal 

Sinusoidal projection.

ProjectionMercator 

Mercator projection.

ProjectionMiller 

Miller cylindrical projection.

ProjectionCylinder 

Cylinder projection.

◆ RefractionMode

Available refraction mode.

Enumerator
RefractionAuto 

Automatically decide to add refraction if atmosphere is activated.

RefractionOn 

Always add refraction (i.e. apparent coordinates)

RefractionOff 

Never add refraction (i.e. geometric coordinates)

Member Function Documentation

◆ addGaussianYear

void StelCore::addGaussianYear ( )
slot

The Gaussian Year is 365.2568983 days, and is C.F.Gauss's value for the Sidereal Year. Note that 1 GaussY=2 π/k where k is the Gaussian gravitational constant. A massless body orbits one solar mass in 1AU distance in a Gaussian Year.

◆ addSiderealDay

void StelCore::addSiderealDay ( )
slot

The length of time depends on the current planetary body on which the observer is located.

◆ addSiderealDays

void StelCore::addSiderealDays ( double  d)
slot
Parameters
dthe decimal number of sidereal days to add (use negative values to subtract)

◆ addSiderealWeek

void StelCore::addSiderealWeek ( )
slot

The length of time depends on the current planetary body on which the observer is located.

◆ addSiderealYear

void StelCore::addSiderealYear ( )
slot

The length of time depends on the current planetary body on which the observer is located. Sidereal year connected to orbital period of planets.

◆ addSiderealYears

void StelCore::addSiderealYears ( double  n = 100.)
slot

The length of time depends on the current planetary body on which the observer is located. Sidereal year connected to orbital period of planets.

◆ addSolarDays

void StelCore::addSolarDays ( double  d)
slot
Parameters
dthe decimal number of days to add (use negative values to subtract)

◆ computeDeltaT

double StelCore::computeDeltaT ( const double  JD)
slot

DeltaT is the accumulated effect of earth's rotation slowly getting 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. 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 are short-lived and (2) must follow paths over earth ground. (Note that we make no further difference between TT and DT, those might differ by milliseconds at best but are regarded equivalent for our purpose.)

Parameters
JDthe date and time expressed as a Julian Day
Returns
DeltaT in seconds
Note
Thanks to Rob van Gent who created a collection from many formulas for calculation of DeltaT: http://www.staff.science.uu.nl/~gent0113/deltat/deltat.htm
Use this only if needed, prefer calling getDeltaT() for access to the current value.
Up to V0.15.1, if the requested year was outside validity range, we returned zero or some useless value. Starting with V0.15.2 the value from the edge of the defined range is returned instead if not explicitly zero is given in the source. Limits can be queried with getCurrentDeltaTAlgorithmValidRangeDescription()

◆ dateChangedForTrails

void StelCore::dateChangedForTrails ( )
signal

the date has changed in a way that planet trails or similar things should better be reset. TODO: Currently the signal is not used. Think of the proper way to apply it.

◆ equinoxEquToJ2000()

Vec3d StelCore::equinoxEquToJ2000 ( const Vec3d v,
RefractionMode  refMode = RefractionAuto 
) const

Use refMode=StelCore::RefractionOff if you don't want any atmosphere correction. Use refMode=StelCore::RefractionOn to create observed (apparent) coordinates (which are subject to refraction). Use refMode=StelCore::RefractionAuto to correct coordinates for refraction only when atmosphere is active.

◆ getAberrationFactor

double StelCore::getAberrationFactor ( ) const
inlineslot
Returns
aberration factor. 1 is realistic simulation, but higher values may be useful for didactic purposes.

◆ getCurrentDeltaTAlgorithmValidRangeDescription()

QString StelCore::getCurrentDeltaTAlgorithmValidRangeDescription ( const double  JD,
QString *  marker 
) const
Parameters
JDthe Julian Day number to test.
markerreceives a string: "*" if jDay is outside valid range, or "?" if range unknown, else an empty string.
Returns
valid range as explanatory string.

◆ getCurrentObserver()

const StelObserver* StelCore::getCurrentObserver ( ) const

Returns the current observer. Note that the observer object may be deleted at any time when control returns to StelCore.

◆ getFlipHorz

bool StelCore::getFlipHorz ( void  ) const
slot
Returns
True if flipped horizontally, else false.

◆ getFlipVert

bool StelCore::getFlipVert ( void  ) const
slot
Returns
True if flipped vertically, else false.

◆ getIAUConstellation

QString StelCore::getIAUConstellation ( const Vec3d  positionEqJnow) const
slot

Follows 1987PASP...99..695R: Nancy Roman: Identification of a Constellation from a Position Data file from ADC catalog VI/42 with its amendment from 1999-12-30.

Parameters
positionEqJnowposition vector in rectangular equatorial coordinates of current epoch&equinox.

◆ getJDE

double StelCore::getJDE ( ) const
slot

The name is derived from the classical name "Ephemeris Time", of which TT is the successor. It is still frequently used in the literature.

◆ getLocalSiderealTime()

double StelCore::getLocalSiderealTime ( ) const
Returns
the local sidereal time in radian

◆ getProjection() [1/2]

StelProjectorP StelCore::getProjection ( FrameType  frameType,
RefractionMode  refractionMode = RefractionAuto 
) const

If not specified the refraction effect is included if atmosphere is on.

◆ getProjection() [2/2]

StelProjectorP StelCore::getProjection ( StelProjector::ModelViewTranformP  modelViewTransform,
ProjectionType  projType = static_cast< ProjectionType >(1000) 
) const

If not specified the projection used is the one currently used as default.

◆ getProjection2d()

StelProjectorP StelCore::getProjection2d ( ) const

This projection cannot be used to project or unproject but only for 2d painting

◆ getSolutionEquationOfTime

double StelCore::getSolutionEquationOfTime ( const double  JDE) const
slot

Meeus "Astronomical Algorithms" (2nd ed., with corrections as of August 10, 2009) p.183-187.

Parameters
JDEJD in Dynamical Time (previously called Ephemeris Time)
Returns
time in minutes

◆ getStartupTimeMode()

QString StelCore::getStartupTimeMode ( ) const

take current time from system), "today" (take some time e.g. on the evening of today) or "preset" (completely preconfigured).

◆ getUseAberration

bool StelCore::getUseAberration ( ) const
inlineslot
Returns
whether aberration is currently used.

◆ getUseNutation

bool StelCore::getUseNutation ( ) const
inlineslot
Returns
whether nutation is currently used.

◆ getUseTopocentricCoordinates

bool StelCore::getUseTopocentricCoordinates ( ) const
inlineslot
Returns
whether topocentric coordinates are currently used.

◆ isBrightDaylight()

bool StelCore::isBrightDaylight ( ) const
Returns
true if sun higher than about -6 degrees, i.e. "day" includes civil twilight.
Note
Useful mostly for brightness-controlled GUI decisions like font colors.

◆ j2000ToEquinoxEqu()

Vec3d StelCore::j2000ToEquinoxEqu ( const Vec3d v,
RefractionMode  refMode = RefractionAuto 
) const

Use refMode=StelCore::RefractionOff if you don't want any atmosphere correction. Use refMode=StelCore::RefractionOn to correct observed (apparent) coordinates (which are subject to refraction). Use refMode=StelCore::RefractionAuto to correct coordinates for refraction only when atmosphere is active.

◆ moveObserverTo

void StelCore::moveObserverTo ( const StelLocation target,
double  duration = 1.,
double  durationIfPlanetChange = 1. 
)
slot
Parameters
targetthe target location
durationdirection of view move duration in s
durationIfPlanetChangedirection of view + planet travel move duration in s. This is used only if the destination planet is different from the starting one.

◆ moveObserverToSelected

void StelCore::moveObserverToSelected ( )
slot

This will only do something if the selected object is of the correct type - i.e. a planet.

◆ setDe430Active

void StelCore::setDe430Active ( bool  status)
slot
Parameters
status(if de430IsAvailable()). DE430 is only used if date is within range of DE430.

◆ setDe431Active

void StelCore::setDe431Active ( bool  status)
slot
Parameters
status(if de431IsAvailable()). DE431 is only used if DE430 is not used and the date is within range of DE431.

◆ setDe440Active

void StelCore::setDe440Active ( bool  status)
slot
Parameters
status(if de440IsAvailable()). DE440 is only used if date is within range of DE440.

◆ setDe441Active

void StelCore::setDe441Active ( bool  status)
slot
Parameters
status(if de441IsAvailable()). DE441 is only used if DE440 is not used and the date is within range of DE441.

◆ setDeltaTCustomEquationCoefficients

void StelCore::setDeltaTCustomEquationCoefficients ( Vec3d  c)
inlineslot
Parameters
cthe coefficients, e.g. -20,0,32

◆ setDeltaTCustomNDot

void StelCore::setDeltaTCustomNDot ( double  v)
inlineslot
Parameters
vthe n-dot value, e.g. -26.0

◆ setDeltaTCustomYear

void StelCore::setDeltaTCustomYear ( double  y)
inlineslot
Parameters
ythe year, e.g. 1820

◆ setFlipHorz

void StelCore::setFlipHorz ( bool  flip)
slot
Parameters
flipThe new value (true = flipped, false = unflipped).

◆ setFlipVert

void StelCore::setFlipVert ( bool  flip)
slot
Parameters
flipThe new value (true = flipped, false = unflipped).

◆ setJDE

void StelCore::setJDE ( double  newJDE)
slot

The name is derived from the classical name "Ephemeris Time", of which TT is the successor. It is still frequently used in the literature.

◆ setMilliSecondsOfLastJDUpdate

void StelCore::setMilliSecondsOfLastJDUpdate ( qint64  millis)
slot

Usually, you do NOT want to call this method. This method is used by the RemoteSync plugin.

◆ setMJDay

void StelCore::setMJDay ( double  MJD)
slot

MJD is simply JD-2400000.5, getting rid of large numbers and starting days at midnight. It is mostly used in satellite contexts.

◆ setViewportHorizontalOffset

void StelCore::setViewportHorizontalOffset ( double  newOffsetPct)
slot

Argument will be clamped to be inside [-50...50] An offset of 50 percent means projective image center is on the right screen border Animation is available via StelMovementMgr::moveViewport()

◆ setViewportStretch

void StelCore::setViewportStretch ( float  stretch)
slot

for multi-projector installations with edge blending.

Parameters
stretch[default 1] enlarge to stretch image to non-square pixels. A minimum value of 0.001 is enforced.
Note
This only influences the projected content. Things like ScreenImages keep square pixels.

◆ setViewportVerticalOffset

void StelCore::setViewportVerticalOffset ( double  newOffsetPct)
slot

Argument will be clamped to be inside [-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()

◆ subtractSiderealDay

void StelCore::subtractSiderealDay ( )
slot

The length of time depends on the current planetary body on which the observer is located.

◆ subtractSiderealWeek

void StelCore::subtractSiderealWeek ( )
slot

The length of time depends on the current planetary body on which the observer is located.

◆ subtractSiderealYear

void StelCore::subtractSiderealYear ( )
slot

The length of time depends on the current planetary body on which the observer is located. Sidereal year connected to orbital period of planets.

◆ subtractSiderealYears

void StelCore::subtractSiderealYears ( double  n = 100.)
slot

The length of time depends on the current planetary body on which the observer is located. Sidereal year connected to orbital period of planets.

◆ timeSyncOccurred

void StelCore::timeSyncOccurred ( double  jDay)
signal

This happens whenever the internal jDay is changed through setJDay/setMJDay and similar, and whenever the time rate changes.

◆ update()

void StelCore::update ( double  deltaTime)
Parameters
deltaTimethe time increment in sec.