StelCore.hpp   StelCore.hpp 
/* /*
* Copyright (C) 2003 Fabien Chereau * Copyright (C) 2003 Fabien Chereau
* Copyright (C) 2012 Matthew Gates
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
skipping to change at line 118 skipping to change at line 119
//! Get a new instance of projector using a modelview transformation corresponding to the the given frame. //! Get a new instance of projector using a modelview transformation corresponding to the the given frame.
//! If not specified the refraction effect is included if atmosphere is on. //! If not specified the refraction effect is included if atmosphere is on.
StelProjectorP getProjection(FrameType frameType, RefractionMode ref ractionMode=RefractionAuto) const; StelProjectorP getProjection(FrameType frameType, RefractionMode ref ractionMode=RefractionAuto) const;
//! Get a new instance of projector using the given modelview transf ormatione. //! Get a new instance of projector using the given modelview transf ormatione.
//! If not specified the projection used is the one currently used a s default. //! If not specified the projection used is the one currently used a s default.
StelProjectorP getProjection(StelProjector::ModelViewTranformP model ViewTransform, ProjectionType projType=(ProjectionType)1000) const; StelProjectorP getProjection(StelProjector::ModelViewTranformP model ViewTransform, ProjectionType projType=(ProjectionType)1000) const;
//! Get the current tone reproducer used in the core. //! Get the current tone reproducer used in the core.
StelToneReproducer* getToneReproducer() {return toneConverter;} StelToneReproducer* getToneReproducer();
//! Get the current tone reproducer used in the core. //! Get the current tone reproducer used in the core.
const StelToneReproducer* getToneReproducer() const {return toneConv erter;} const StelToneReproducer* getToneReproducer() const;
//! Get the current StelSkyDrawer used in the core. //! Get the current StelSkyDrawer used in the core.
StelSkyDrawer* getSkyDrawer() {return skyDrawer;} StelSkyDrawer* getSkyDrawer();
//! Get the current StelSkyDrawer used in the core. //! Get the current StelSkyDrawer used in the core.
const StelSkyDrawer* getSkyDrawer() const {return skyDrawer;} const StelSkyDrawer* getSkyDrawer() const;
//! Get an instance of StelGeodesicGrid which is garanteed to allow for at least maxLevel levels //! Get an instance of StelGeodesicGrid which is garanteed to allow for at least maxLevel levels
const StelGeodesicGrid* getGeodesicGrid(int maxLevel) const; const StelGeodesicGrid* getGeodesicGrid(int maxLevel) const;
//! Get the instance of movement manager. //! Get the instance of movement manager.
StelMovementMgr* getMovementMgr() {return movementMgr;} StelMovementMgr* getMovementMgr();
//! Get the const instance of movement manager. //! Get the const instance of movement manager.
const StelMovementMgr* getMovementMgr() const {return movementMgr;} const StelMovementMgr* getMovementMgr() const;
//! Set the near and far clipping planes. //! Set the near and far clipping planes.
void setClippingPlanes(double znear, double zfar) {currentProjectorP arams.zNear=znear;currentProjectorParams.zFar=zfar;} void setClippingPlanes(double znear, double zfar);
//! Get the near and far clipping planes. //! Get the near and far clipping planes.
void getClippingPlanes(double* zn, double* zf) const {*zn = currentP rojectorParams.zNear; *zf = currentProjectorParams.zFar;} void getClippingPlanes(double* zn, double* zf) const;
//! Get the translated projection name from its TypeKey for the curr ent locale. //! Get the translated projection name from its TypeKey for the curr ent locale.
QString projectionTypeKeyToNameI18n(const QString& key) const; QString projectionTypeKeyToNameI18n(const QString& key) const;
//! Get the projection TypeKey from its translated name for the curr ent locale. //! Get the projection TypeKey from its translated name for the curr ent locale.
QString projectionNameI18nToTypeKey(const QString& nameI18n) const; QString projectionNameI18nToTypeKey(const QString& nameI18n) const;
//! Get the current set of parameters to use when creating a new Ste lProjector. //! Get the current set of parameters to use when creating a new Ste lProjector.
StelProjector::StelProjectorParams getCurrentStelProjectorParams() c onst {return currentProjectorParams;} StelProjector::StelProjectorParams getCurrentStelProjectorParams() c onst;
//! Set the set of parameters to use when creating a new StelProject or. //! Set the set of parameters to use when creating a new StelProject or.
void setCurrentStelProjectorParams(const StelProjector::StelProjecto rParams& newParams) {currentProjectorParams=newParams;} void setCurrentStelProjectorParams(const StelProjector::StelProjecto rParams& newParams);
//! Get vision direction //! Set vision direction
void lookAtJ2000(const Vec3d& pos, const Vec3d& up); void lookAtJ2000(const Vec3d& pos, const Vec3d& up);
Vec3d altAzToEquinoxEqu(const Vec3d& v, RefractionMode refMode=Refra Vec3d altAzToEquinoxEqu(const Vec3d& v, RefractionMode refMode=Refra
ctionAuto) const ctionAuto) const;
{ Vec3d equinoxEquToAltAz(const Vec3d& v, RefractionMode refMode=Refra
if (refMode==RefractionOff || skyDrawer==false || (refMode== ctionAuto) const;
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false)) Vec3d altAzToJ2000(const Vec3d& v, RefractionMode refMode=Refraction
return matAltAzToEquinoxEqu*v; Auto) const;
Vec3d r(v); Vec3d j2000ToAltAz(const Vec3d& v, RefractionMode refMode=Refraction
skyDrawer->getRefraction().backward(r); Auto) const;
r.transfo4d(matAltAzToEquinoxEqu); Vec3d galacticToJ2000(const Vec3d& v) const;
return r; Vec3d equinoxEquToJ2000(const Vec3d& v) const;
} Vec3d j2000ToEquinoxEqu(const Vec3d& v) const;
Vec3d equinoxEquToAltAz(const Vec3d& v, RefractionMode refMode=Refra Vec3d j2000ToGalactic(const Vec3d& v) const;
ctionAuto) const
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return matEquinoxEquToAltAz*v;
Vec3d r(v);
r.transfo4d(matEquinoxEquToAltAz);
skyDrawer->getRefraction().forward(r);
return r;
}
Vec3d altAzToJ2000(const Vec3d& v, RefractionMode refMode=Refraction
Auto) const
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return matEquinoxEquToJ2000*matAltAzToEquinoxEqu*v;
Vec3d r(v);
skyDrawer->getRefraction().backward(r);
r.transfo4d(matEquinoxEquToJ2000*matAltAzToEquinoxEqu);
return r;
}
Vec3d j2000ToAltAz(const Vec3d& v, RefractionMode refMode=Refraction
Auto) const
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return matJ2000ToAltAz*v;
Vec3d r(v);
r.transfo4d(matJ2000ToAltAz);
skyDrawer->getRefraction().forward(r);
return r;
}
Vec3d galacticToJ2000(const Vec3d& v) const {return matGalacticToJ20
00*v;}
Vec3d equinoxEquToJ2000(const Vec3d& v) const {return matEquinoxEquT
oJ2000*v;}
Vec3d j2000ToEquinoxEqu(const Vec3d& v) const {return matJ2000ToEqui
noxEqu*v;}
Vec3d j2000ToGalactic(const Vec3d& v) const {return matJ2000ToGalact
ic*v;}
//! Transform vector from heliocentric ecliptic coordinate to altazi muthal //! Transform vector from heliocentric ecliptic coordinate to altazi muthal
Vec3d heliocentricEclipticToAltAz(const Vec3d& v, RefractionMode ref Vec3d heliocentricEclipticToAltAz(const Vec3d& v, RefractionMode ref
Mode=RefractionAuto) const Mode=RefractionAuto) const;
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return matHeliocentricEclipticToAltAz*v;
Vec3d r(v);
r.transfo4d(matHeliocentricEclipticToAltAz);
skyDrawer->getRefraction().forward(r);
return r;
}
//! Transform from heliocentric coordinate to equatorial at current equinox (for the planet where the observer stands) //! Transform from heliocentric coordinate to equatorial at current equinox (for the planet where the observer stands)
Vec3d heliocentricEclipticToEquinoxEqu(const Vec3d& v) const {return matHeliocentricEclipticToEquinoxEqu*v;} Vec3d heliocentricEclipticToEquinoxEqu(const Vec3d& v) const;
//! Transform vector from heliocentric coordinate to false equatoria l : equatorial //! Transform vector from heliocentric coordinate to false equatoria l : equatorial
//! coordinate but centered on the observer position (usefull for ob jects close to earth) //! coordinate but centered on the observer position (usefull for ob jects close to earth)
Vec3d heliocentricEclipticToEarthPosEquinoxEqu(const Vec3d& v) const {return matAltAzToEquinoxEqu*matHeliocentricEclipticToAltAz*v;} Vec3d heliocentricEclipticToEarthPosEquinoxEqu(const Vec3d& v) const ;
//! Get the modelview matrix for heliocentric ecliptic (Vsop87) draw ing //! Get the modelview matrix for heliocentric ecliptic (Vsop87) draw ing
StelProjector::ModelViewTranformP getHeliocentricEclipticModelViewTr StelProjector::ModelViewTranformP getHeliocentricEclipticModelViewTr
ansform(RefractionMode refMode=RefractionAuto) const ansform(RefractionMode refMode=RefractionAuto) const;
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return StelProjector::ModelViewTranformP(new StelPro
jector::Mat4dTransform(matAltAzModelView*matHeliocentricEclipticToAltAz));
Refraction* refr = new Refraction(skyDrawer->getRefraction()
);
// The pretransform matrix will convert from input coordinat
es to AltAz needed by the refraction function.
refr->setPreTransfoMat(matHeliocentricEclipticToAltAz);
refr->setPostTransfoMat(matAltAzModelView);
return StelProjector::ModelViewTranformP(refr);
}
//! Get the modelview matrix for observer-centric ecliptic (Vsop87) drawing //! Get the modelview matrix for observer-centric ecliptic (Vsop87) drawing
StelProjector::ModelViewTranformP getObservercentricEclipticModelVie StelProjector::ModelViewTranformP getObservercentricEclipticModelVie
wTransform(RefractionMode refMode=RefractionAuto) const wTransform(RefractionMode refMode=RefractionAuto) const;
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return StelProjector::ModelViewTranformP(new StelPro
jector::Mat4dTransform(matAltAzModelView*matJ2000ToAltAz*matVsop87ToJ2000))
;
Refraction* refr = new Refraction(skyDrawer->getRefraction()
);
// The pretransform matrix will convert from input coordinat
es to AltAz needed by the refraction function.
refr->setPreTransfoMat(matJ2000ToAltAz*matVsop87ToJ2000);
refr->setPostTransfoMat(matAltAzModelView);
return StelProjector::ModelViewTranformP(refr);
}
//! Get the modelview matrix for observer-centric equatorial at equi nox drawing //! Get the modelview matrix for observer-centric equatorial at equi nox drawing
StelProjector::ModelViewTranformP getEquinoxEquModelViewTransform(Re StelProjector::ModelViewTranformP getEquinoxEquModelViewTransform(Re
fractionMode refMode=RefractionAuto) const fractionMode refMode=RefractionAuto) const;
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return StelProjector::ModelViewTranformP(new StelPro
jector::Mat4dTransform(matAltAzModelView*matEquinoxEquToAltAz));
Refraction* refr = new Refraction(skyDrawer->getRefraction()
);
// The pretransform matrix will convert from input coordinat
es to AltAz needed by the refraction function.
refr->setPreTransfoMat(matEquinoxEquToAltAz);
refr->setPostTransfoMat(matAltAzModelView);
return StelProjector::ModelViewTranformP(refr);
}
//! Get the modelview matrix for observer-centric altazimuthal drawi ng //! Get the modelview matrix for observer-centric altazimuthal drawi ng
StelProjector::ModelViewTranformP getAltAzModelViewTransform(Refract StelProjector::ModelViewTranformP getAltAzModelViewTransform(Refract
ionMode refMode=RefractionAuto) const ionMode refMode=RefractionAuto) const;
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return StelProjector::ModelViewTranformP(new StelPro
jector::Mat4dTransform(matAltAzModelView));
Refraction* refr = new Refraction(skyDrawer->getRefraction()
);
// The pretransform matrix will convert from input coordinat
es to AltAz needed by the refraction function.
refr->setPostTransfoMat(matAltAzModelView);
return StelProjector::ModelViewTranformP(refr);
}
//! Get the modelview matrix for observer-centric J2000 equatorial d rawing //! Get the modelview matrix for observer-centric J2000 equatorial d rawing
StelProjector::ModelViewTranformP getJ2000ModelViewTransform(Refract StelProjector::ModelViewTranformP getJ2000ModelViewTransform(Refract
ionMode refMode=RefractionAuto) const ionMode refMode=RefractionAuto) const;
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return StelProjector::ModelViewTranformP(new StelPro
jector::Mat4dTransform(matAltAzModelView*matEquinoxEquToAltAz*matJ2000ToEqu
inoxEqu));
Refraction* refr = new Refraction(skyDrawer->getRefraction()
);
// The pretransform matrix will convert from input coordinat
es to AltAz needed by the refraction function.
refr->setPreTransfoMat(matEquinoxEquToAltAz*matJ2000ToEquino
xEqu);
refr->setPostTransfoMat(matAltAzModelView);
return StelProjector::ModelViewTranformP(refr);
}
//! Get the modelview matrix for observer-centric Galactic equatoria l drawing //! Get the modelview matrix for observer-centric Galactic equatoria l drawing
StelProjector::ModelViewTranformP getGalacticModelViewTransform(Refr StelProjector::ModelViewTranformP getGalacticModelViewTransform(Refr
actionMode refMode=RefractionAuto) const actionMode refMode=RefractionAuto) const;
{
if (refMode==RefractionOff || skyDrawer==false || (refMode==
RefractionAuto && skyDrawer->getFlagHasAtmosphere()==false))
return StelProjector::ModelViewTranformP(new StelPro
jector::Mat4dTransform(matAltAzModelView*matEquinoxEquToAltAz*matJ2000ToEqu
inoxEqu*matGalacticToJ2000));
Refraction* refr = new Refraction(skyDrawer->getRefraction()
);
// The pretransform matrix will convert from input coordinat
es to AltAz needed by the refraction function.
refr->setPreTransfoMat(matEquinoxEquToAltAz*matJ2000ToEquino
xEqu*matGalacticToJ2000);
refr->setPostTransfoMat(matAltAzModelView);
return StelProjector::ModelViewTranformP(refr);
}
//! Rotation matrix from equatorial J2000 to ecliptic (Vsop87) //! Rotation matrix from equatorial J2000 to ecliptic (Vsop87)
static const Mat4d matJ2000ToVsop87; static const Mat4d matJ2000ToVsop87;
//! Rotation matrix from ecliptic (Vsop87) to equatorial J2000 //! Rotation matrix from ecliptic (Vsop87) to equatorial J2000
static const Mat4d matVsop87ToJ2000; static const Mat4d matVsop87ToJ2000;
//! Rotation matrix from J2000 to Galactic reference frame, using FI TS convention. //! Rotation matrix from J2000 to Galactic reference frame, using FI TS convention.
static const Mat4d matJ2000ToGalactic; static const Mat4d matJ2000ToGalactic;
//! Rotation matrix from J2000 to Galactic reference frame, using FI TS convention. //! Rotation matrix from J2000 to Galactic reference frame, using FI TS convention.
static const Mat4d matGalacticToJ2000; static const Mat4d matGalacticToJ2000;
skipping to change at line 319 skipping to change at line 227
static const double JD_DAY; static const double JD_DAY;
//! Get the sideral time shifted by the observer longitude //! Get the sideral time shifted by the observer longitude
//! @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() {return startupTimeMode;} QString getStartupTimeMode();
void setStartupTimeMode(const QString& s); void setStartupTimeMode(const QString& s);
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 {return currentProje ctionType;} 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 mask type. //! Set the mask type.
void setMaskType(StelProjector::StelProjectorMaskType m) {currentPro jectorParams.maskType = 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) { currentProjectorParams.gra vityLabels = 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) { currentProjectorParams. defautAngleForGravityText = 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).
void setFlipHorz(bool flip) {currentProjectorParams.flipHorz = flip; } void setFlipHorz(bool flip);
//! 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) {currentProjectorParams.flipVert = 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 {return currentProjectorParams.flipHorz ;} 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 {return currentProjectorParams.flipVert ;} bool getFlipVert(void) const;
//! Get the location used by default at startup //! Get the location used by default at startup
QString getDefaultLocationID() const {return defaultLocationID;} 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);
//! Set the current date in Julian Day //! Set the current date in Julian Day
void setJDay(double JD) {JDay=JD;} void setJDay(double JD);
//! Get the current date in Julian Day //! Get the current date in Julian Day
double getJDay() const {return JDay;} double getJDay() const;
//! Return the preset sky time in JD //! Return the preset sky time in JD
double getPresetSkyTime() const {return presetSkyTime;} double getPresetSkyTime() const;
//! Set the preset sky time from a JD //! Set the preset sky time from a JD
void setPresetSkyTime(double d) {presetSkyTime=d;} void setPresetSkyTime(double d);
//! Set time speed in JDay/sec //! Set time speed in JDay/sec
void setTimeRate(double ts) {timeSpeed=ts; emit timeRateChanged(time Speed);} void setTimeRate(double ts);
//! Get time speed in JDay/sec //! Get time speed in JDay/sec
double getTimeRate() const {return timeSpeed;} double getTimeRate() const;
//! Increase the time speed //! Increase the time speed
void increaseTimeSpeed(); void increaseTimeSpeed();
//! Decrease the time speed //! Decrease the time speed
void decreaseTimeSpeed(); void decreaseTimeSpeed();
//! Increase the time speed, but not as much as with increaseTimeSpe ed() //! Increase the time speed, but not as much as with increaseTimeSpe ed()
void increaseTimeSpeedLess(); void increaseTimeSpeedLess();
//! Decrease the time speed but not as much as with decreaseTimeSpee d() //! Decrease the time speed but not as much as with decreaseTimeSpee d()
void decreaseTimeSpeedLess(); void decreaseTimeSpeedLess();
//! Set time speed to 0, i.e. freeze the passage of simulation time //! Set time speed to 0, i.e. freeze the passage of simulation time
void setZeroTimeSpeed() {setTimeRate(0);} void setZeroTimeSpeed();
//! Set real time speed, i.e. 1 sec/sec //! Set real time speed, i.e. 1 sec/sec
void setRealTimeSpeed() {setTimeRate(JD_SECOND);} void setRealTimeSpeed();
//! Set real time speed or pause simulation if we are already in rea ltime speed. //! Set real time speed or pause simulation if we are already in rea ltime speed.
void toggleRealTimeSpeed() {(!getRealTimeSpeed()) ? setRealTimeSpeed () : setZeroTimeSpeed();} void toggleRealTimeSpeed();
//! Get whether it is real time speed, i.e. 1 sec/sec //! Get whether it is real time speed, i.e. 1 sec/sec
bool getRealTimeSpeed() const {return (fabs(timeSpeed-JD_SECOND)<0.0 000001);} bool getRealTimeSpeed() const;
//! Set stellarium time to current real world time //! Set stellarium time to current real world time
void setTimeNow(); void setTimeNow();
//! Set the time to some value, leaving the day the same. //! Set the time to some value, leaving the day the same.
void setTodayTime(const QTime& target); void setTodayTime(const QTime& target);
//! Get whether the current stellarium time is the real world time //! Get whether the current stellarium time is the real world time
bool getIsTimeNow() const; bool getIsTimeNow() const;
//! get the initial "today time" from the config file //! get the initial "today time" from the config file
QTime getInitTodayTime(void) {return initTodayTime;} QTime getInitTodayTime(void);
//! set the initial "today time" from the config file //! set the initial "today time" from the config file
void setInitTodayTime(const QTime& t) {initTodayTime=t;} void setInitTodayTime(const QTime& t);
//! Set the preset sky time from a QDateTime //! Set the preset sky time from a QDateTime
void setPresetSkyTime(QDateTime dt); void setPresetSkyTime(QDateTime dt);
//! Add one [Earth, solar] hour to the current simulation time. //! Add one [Earth, solar] hour to the current simulation time.
void addHour() {addSolarDays(0.04166666666666666667);} void addHour();
//! Add one [Earth, solar] day to the current simulation time. //! Add one [Earth, solar] day to the current simulation time.
void addDay() {addSolarDays(1.0);} void addDay();
//! Add one [Earth, solar] week to the current simulation time. //! Add one [Earth, solar] week to the current simulation time.
void addWeek() {addSolarDays(7.0);} void addWeek();
//! Add one sidereal day to the simulation time. The length of time depends //! Add one sidereal day to the simulation time. The length of time depends
//! on the current planetary body on which the observer is located. //! on the current planetary body on which the observer is located.
void addSiderealDay() {addSiderealDays(1.0);} void addSiderealDay();
//! Add one sidereal week to the simulation time. The length of time depends //! Add one sidereal week to the simulation time. The length of time depends
//! on the current planetary body on which the observer is located. //! on the current planetary body on which the observer is located.
void addSiderealWeek() {addSiderealDays(7.0);} void addSiderealWeek();
//! Add one sidereal month to the simulation time. The length of tim
e depends
//! on the current planetary body on which the observer is located.
void addSiderealMonth();
//! Add one sidereal year to the simulation time. The length of time
depends
//! on the current planetary body on which the observer is located.
void addSiderealYear();
//! Subtract one [Earth, solar] hour to the current simulation time. //! Subtract one [Earth, solar] hour to the current simulation time.
void subtractHour() {addSolarDays(-0.04166666666666666667);} void subtractHour();
//! Subtract one [Earth, solar] day to the current simulation time. //! Subtract one [Earth, solar] day to the current simulation time.
void subtractDay() {addSolarDays(-1.0);} void subtractDay();
//! Subtract one [Earth, solar] week to the current simulation time. //! Subtract one [Earth, solar] week to the current simulation time.
void subtractWeek() {addSolarDays(-7.0);} void subtractWeek();
//! Subtract one sidereal week to the simulation time. The length of time depends //! Subtract one sidereal day to the simulation time. The length of time depends
//! on the current planetary body on which the observer is located. //! on the current planetary body on which the observer is located.
void subtractSiderealDay() {addSiderealDays(-1.0);} void subtractSiderealDay();
//! Subtract one sidereal week to the simulation time. The length of time depends //! Subtract one sidereal week to the simulation time. The length of time depends
//! on the current planetary body on which the observer is located. //! on the current planetary body on which the observer is located.
void subtractSiderealWeek() {addSiderealDays(-7.0);} void subtractSiderealWeek();
//! Subtract one sidereal month to the simulation time. The length o
f time depends
//! on the current planetary body on which the observer is located.
void subtractSiderealMonth();
//! Subtract one sidereal year to the simulation time. The length of
time depends
//! on the current planetary body on which the observer is located.
void subtractSiderealYear();
//! Add a number of Earth Solar days to the current simulation time //! Add a number of Earth Solar days to the current simulation time
//! @param d the decimal number of days to add (use negative values to subtract) //! @param d the decimal number of days to add (use negative values to subtract)
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
skipping to change at line 472 skipping to change at line 392
// The currently used projection type // The currently used projection type
ProjectionType currentProjectionType; ProjectionType currentProjectionType;
// 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 heliocentr Mat4d matHeliocentricEclipticToAltAz; // Transform from helioce
ic ecliptic (Vsop87) to observer-centric altazimuthal coordinate ntric ecliptic (Vsop87) to observer-centric altazimuthal coordinate
Mat4d matAltAzToHeliocentricEcliptic; // Transform from observer-c Mat4d matAltAzToHeliocentricEcliptic; // Transform from observe
entric altazimuthal coordinate to heliocentric ecliptic (Vsop87) r-centric altazimuthal coordinate to heliocentric ecliptic (Vsop87)
Mat4d matAltAzToEquinoxEqu; // Transform Mat4d matAltAzToEquinoxEqu; // Transform from observe
from observer-centric altazimuthal coordinate to Earth Equatorial r-centric altazimuthal coordinate to Earth Equatorial
Mat4d matEquinoxEquToAltAz; // Transform Mat4d matEquinoxEquToAltAz; // Transform from observe
from observer-centric altazimuthal coordinate to Earth Equatorial r-centric altazimuthal coordinate to Earth Equatorial
Mat4d matHeliocentricEclipticToEquinoxEqu;// Transform from heliocen Mat4d matHeliocentricEclipticToEquinoxEqu; // Transform from helioce
tric ecliptic (Vsop87) to earth equatorial coordinate ntric ecliptic (Vsop87) to earth equatorial coordinate
Mat4d matEquinoxEquToJ2000; Mat4d matEquinoxEquToJ2000;
Mat4d matJ2000ToEquinoxEqu; Mat4d matJ2000ToEquinoxEqu;
Mat4d matJ2000ToAltAz; Mat4d matJ2000ToAltAz;
Mat4d matAltAzModelView; // Modelview Mat4d matAltAzModelView; // Modelview matrix for observer-
matrix for observer-centric altazimuthal drawing centric altazimuthal drawing
Mat4d invertMatAltAzModelView; // Inverted modelvie Mat4d invertMatAltAzModelView; // Inverted modelview matrix for
w matrix for observer-centric altazimuthal drawing observer-centric altazimuthal drawing
// Position variables // Position variables
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, Negat double timeSpeed; // Positive : forward, Negative :
ive : Backward, 1 = 1sec/sec 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;
}; };
#endif // _STELCORE_HPP_ #endif // _STELCORE_HPP_
 End of changes. 58 change blocks. 
220 lines changed or deleted 106 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/