StelCore.cpp   StelCore.cpp 
skipping to change at line 140 skipping to change at line 140
currentProjectorParams.devicePixelsPerPixel = StelApp::getInstance() .getDevicePixelsPerPixel(); currentProjectorParams.devicePixelsPerPixel = StelApp::getInstance() .getDevicePixelsPerPixel();
flagUseNutation=conf->value("astro/flag_nutation", true).toBool(); flagUseNutation=conf->value("astro/flag_nutation", true).toBool();
flagUseTopocentricCoordinates=conf->value("astro/flag_topocentric_co ordinates", true).toBool(); flagUseTopocentricCoordinates=conf->value("astro/flag_topocentric_co ordinates", true).toBool();
flagUseDST=conf->value("localization/flag_dst", true).toBool(); flagUseDST=conf->value("localization/flag_dst", true).toBool();
// Initialize matJ2000ToJ1875 matrix // Initialize matJ2000ToJ1875 matrix
double eps1875, chi1875, omega1875, psi1875; double eps1875, chi1875, omega1875, psi1875;
double jdB1875 = StelUtils::getJDFromBesselianEpoch(1875.0); double jdB1875 = StelUtils::getJDFromBesselianEpoch(1875.0);
getPrecessionAnglesVondrak(jdB1875, &eps1875, &chi1875, &omega1875, &psi1875); getPrecessionAnglesVondrak(jdB1875, &eps1875, &chi1875, &omega1875, &psi1875);
matJ2000ToJ1875= Mat4d::xrotation(84381.406*1./3600.*M_PI/180.) * Ma matJ2000ToJ1875 = Mat4d::xrotation(84381.406*1./3600.*M_PI/180.) * M
t4d::zrotation(-psi1875) * Mat4d::xrotation(-omega1875) * Mat4d::zrotation( at4d::zrotation(-psi1875) * Mat4d::xrotation(-omega1875) * Mat4d::zrotation
chi1875); (chi1875);
matJ2000ToJ1875=matJ2000ToJ1875.transpose(); matJ2000ToJ1875 = matJ2000ToJ1875.transpose();
} }
StelCore::~StelCore() StelCore::~StelCore()
{ {
delete toneReproducer; toneReproducer=Q_NULLPTR; delete toneReproducer; toneReproducer=Q_NULLPTR;
delete geodesicGrid; geodesicGrid=Q_NULLPTR; delete geodesicGrid; geodesicGrid=Q_NULLPTR;
delete skyDrawer; skyDrawer=Q_NULLPTR; delete skyDrawer; skyDrawer=Q_NULLPTR;
delete position; position=Q_NULLPTR; delete position; position=Q_NULLPTR;
} }
skipping to change at line 271 skipping to change at line 271
actionsMgr->addAction("actionReturn_To_Current_Time", timeGroup, N_( "Set time to now"), this, "setTimeNow()", "8"); actionsMgr->addAction("actionReturn_To_Current_Time", timeGroup, N_( "Set time to now"), this, "setTimeNow()", "8");
actionsMgr->addAction("actionAdd_Solar_Minute", timeGroup, N_("Add 1 solar minute"), this, "addMinute()"); actionsMgr->addAction("actionAdd_Solar_Minute", timeGroup, N_("Add 1 solar minute"), this, "addMinute()");
actionsMgr->addAction("actionAdd_Solar_Hour", timeGroup, N_("Add 1 s olar hour"), this, "addHour()", "Ctrl+="); actionsMgr->addAction("actionAdd_Solar_Hour", timeGroup, N_("Add 1 s olar hour"), this, "addHour()", "Ctrl+=");
actionsMgr->addAction("actionAdd_Solar_Day", timeGroup, N_("Add 1 so lar day"), this, "addDay()", "="); actionsMgr->addAction("actionAdd_Solar_Day", timeGroup, N_("Add 1 so lar day"), this, "addDay()", "=");
actionsMgr->addAction("actionAdd_Solar_Week", timeGroup, N_("Add 7 s olar days"), this, "addWeek()", "]"); actionsMgr->addAction("actionAdd_Solar_Week", timeGroup, N_("Add 7 s olar days"), this, "addWeek()", "]");
actionsMgr->addAction("actionSubtract_Solar_Minute", timeGroup, N_(" Subtract 1 solar minute"), this, "subtractMinute()"); actionsMgr->addAction("actionSubtract_Solar_Minute", timeGroup, N_(" Subtract 1 solar minute"), this, "subtractMinute()");
actionsMgr->addAction("actionSubtract_Solar_Hour", timeGroup, N_("Su btract 1 solar hour"), this, "subtractHour()", "Ctrl+-"); actionsMgr->addAction("actionSubtract_Solar_Hour", timeGroup, N_("Su btract 1 solar hour"), this, "subtractHour()", "Ctrl+-");
actionsMgr->addAction("actionSubtract_Solar_Day", timeGroup, N_("Sub tract 1 solar day"), this, "subtractDay()", "-"); actionsMgr->addAction("actionSubtract_Solar_Day", timeGroup, N_("Sub tract 1 solar day"), this, "subtractDay()", "-");
actionsMgr->addAction("actionSubtract_Solar_Week", timeGroup, N_("Su btract 7 solar days"), this, "subtractWeek()", "["); actionsMgr->addAction("actionSubtract_Solar_Week", timeGroup, N_("Su btract 7 solar days"), this, "subtractWeek()", "[");
actionsMgr->addAction("actionAdd_Sidereal_Day", timeGroup, N_("Add 1 sidereal day"), this, "addSiderealDay()", "Alt+="); actionsMgr->addAction("actionAdd_Sidereal_Day", timeGroup, N_("Add 1 sidereal day"), this, "addSiderealDay()", "Alt+=");
actionsMgr->addAction("actionAdd_Sidereal_Week", timeGroup, N_("Add 7 sidereal days"), this, "addSiderealWeek()");
actionsMgr->addAction("actionAdd_Sidereal_Year", timeGroup, N_("Add 1 sidereal year"), this, "addSiderealYear()", "Ctrl+Alt+Shift+]"); actionsMgr->addAction("actionAdd_Sidereal_Year", timeGroup, N_("Add 1 sidereal year"), this, "addSiderealYear()", "Ctrl+Alt+Shift+]");
actionsMgr->addAction("actionAdd_Sidereal_Century", timeGroup, N_("A dd 100 sidereal years"), this, "addSiderealYears()"); actionsMgr->addAction("actionAdd_Sidereal_Century", timeGroup, N_("A dd 100 sidereal years"), this, "addSiderealYears()");
actionsMgr->addAction("actionAdd_Synodic_Month", timeGroup, N_("Add 1 synodic month"), this, "addSynodicMonth()"); actionsMgr->addAction("actionAdd_Synodic_Month", timeGroup, N_("Add 1 synodic month"), this, "addSynodicMonth()");
actionsMgr->addAction("actionAdd_Saros", timeGroup, N_("Add 1 saros" ), this, "addSaros()");
actionsMgr->addAction("actionAdd_Draconic_Month", timeGroup, N_("Add 1 draconic month"), this, "addDraconicMonth()"); actionsMgr->addAction("actionAdd_Draconic_Month", timeGroup, N_("Add 1 draconic month"), this, "addDraconicMonth()");
actionsMgr->addAction("actionAdd_Draconic_Year", timeGroup, N_("Add 1 draconic year"), this, "addDraconicYear()"); actionsMgr->addAction("actionAdd_Draconic_Year", timeGroup, N_("Add 1 draconic year"), this, "addDraconicYear()");
actionsMgr->addAction("actionAdd_Anomalistic_Month", timeGroup, N_(" Add 1 anomalistic month"), this, "addAnomalisticMonth()"); actionsMgr->addAction("actionAdd_Anomalistic_Month", timeGroup, N_(" Add 1 anomalistic month"), this, "addAnomalisticMonth()");
actionsMgr->addAction("actionAdd_Anomalistic_Year", timeGroup, N_("A dd 1 anomalistic year"), this, "addAnomalisticYear()"); actionsMgr->addAction("actionAdd_Anomalistic_Year", timeGroup, N_("A dd 1 anomalistic year"), this, "addAnomalisticYear()");
actionsMgr->addAction("actionAdd_Anomalistic_Century", timeGroup, N_ ("Add 100 anomalistic years"), this, "addAnomalisticYears()"); actionsMgr->addAction("actionAdd_Anomalistic_Century", timeGroup, N_ ("Add 100 anomalistic years"), this, "addAnomalisticYears()");
actionsMgr->addAction("actionAdd_Mean_Tropical_Month", timeGroup, N_ ("Add 1 mean tropical month"), this, "addMeanTropicalMonth()"); actionsMgr->addAction("actionAdd_Mean_Tropical_Month", timeGroup, N_ ("Add 1 mean tropical month"), this, "addMeanTropicalMonth()");
actionsMgr->addAction("actionAdd_Mean_Tropical_Year", timeGroup, N_( "Add 1 mean tropical year"), this, "addMeanTropicalYear()"); actionsMgr->addAction("actionAdd_Mean_Tropical_Year", timeGroup, N_( "Add 1 mean tropical year"), this, "addMeanTropicalYear()");
actionsMgr->addAction("actionAdd_Mean_Tropical_Century", timeGroup, N_("Add 100 mean tropical years"), this, "addMeanTropicalYears()"); actionsMgr->addAction("actionAdd_Mean_Tropical_Century", timeGroup, N_("Add 100 mean tropical years"), this, "addMeanTropicalYears()");
actionsMgr->addAction("actionAdd_Tropical_Year", timeGroup, N_("Add 1 tropical year"), this, "addTropicalYear()"); actionsMgr->addAction("actionAdd_Tropical_Year", timeGroup, N_("Add 1 tropical year"), this, "addTropicalYear()");
actionsMgr->addAction("actionAdd_Julian_Year", timeGroup, N_("Add 1 Julian year"), this, "addJulianYear()"); actionsMgr->addAction("actionAdd_Julian_Year", timeGroup, N_("Add 1 Julian year"), this, "addJulianYear()");
actionsMgr->addAction("actionAdd_Julian_Century", timeGroup, N_("Add 1 Julian century"), this, "addJulianYears()"); actionsMgr->addAction("actionAdd_Julian_Century", timeGroup, N_("Add 1 Julian century"), this, "addJulianYears()");
actionsMgr->addAction("actionAdd_Gaussian_Year", timeGroup, N_("Add 1 Gaussian year"), this, "addGaussianYear()"); actionsMgr->addAction("actionAdd_Gaussian_Year", timeGroup, N_("Add 1 Gaussian year"), this, "addGaussianYear()");
actionsMgr->addAction("actionSubtract_Sidereal_Day", timeGroup, N_(" Subtract 1 sidereal day"), this, "subtractSiderealDay()", "Alt+-"); actionsMgr->addAction("actionSubtract_Sidereal_Day", timeGroup, N_(" Subtract 1 sidereal day"), this, "subtractSiderealDay()", "Alt+-");
actionsMgr->addAction("actionSubtract_Sidereal_Week", timeGroup, N_( "Subtract 7 sidereal days"), this, "subtractSiderealWeek()");
actionsMgr->addAction("actionSubtract_Sidereal_Year", timeGroup, N_( "Subtract 1 sidereal year"), this, "subtractSiderealYear()", "Ctrl+Alt+Shif t+["); actionsMgr->addAction("actionSubtract_Sidereal_Year", timeGroup, N_( "Subtract 1 sidereal year"), this, "subtractSiderealYear()", "Ctrl+Alt+Shif t+[");
actionsMgr->addAction("actionSubtract_Sidereal_Century", timeGroup, N_("Subtract 100 sidereal years"), this, "subtractSiderealYears()"); actionsMgr->addAction("actionSubtract_Sidereal_Century", timeGroup, N_("Subtract 100 sidereal years"), this, "subtractSiderealYears()");
actionsMgr->addAction("actionSubtract_Synodic_Month", timeGroup, N_( "Subtract 1 synodic month"), this, "subtractSynodicMonth()"); actionsMgr->addAction("actionSubtract_Synodic_Month", timeGroup, N_( "Subtract 1 synodic month"), this, "subtractSynodicMonth()");
actionsMgr->addAction("actionSubtract_Saros", timeGroup, N_("Subtrac t 1 saros"), this, "subtractSaros()");
actionsMgr->addAction("actionSubtract_Draconic_Month", timeGroup, N_ ("Subtract 1 draconic month"), this, "subtractDraconicMonth()"); actionsMgr->addAction("actionSubtract_Draconic_Month", timeGroup, N_ ("Subtract 1 draconic month"), this, "subtractDraconicMonth()");
actionsMgr->addAction("actionSubtract_Draconic_Year", timeGroup, N_( "Subtract 1 draconic year"), this, "subtractDraconicYear()"); actionsMgr->addAction("actionSubtract_Draconic_Year", timeGroup, N_( "Subtract 1 draconic year"), this, "subtractDraconicYear()");
actionsMgr->addAction("actionSubtract_Anomalistic_Month", timeGroup, N_("Subtract 1 anomalistic month"), this, "subtractAnomalisticMonth()"); actionsMgr->addAction("actionSubtract_Anomalistic_Month", timeGroup, N_("Subtract 1 anomalistic month"), this, "subtractAnomalisticMonth()");
actionsMgr->addAction("actionSubtract_Anomalistic_Year", timeGroup, N_("Subtract 1 anomalistic year"), this, "subtractAnomalisticYear()"); actionsMgr->addAction("actionSubtract_Anomalistic_Year", timeGroup, N_("Subtract 1 anomalistic year"), this, "subtractAnomalisticYear()");
actionsMgr->addAction("actionSubtract_Anomalistic_Century", timeGrou p, N_("Subtract 100 anomalistic years"), this, "subtractAnomalisticYears()" ); actionsMgr->addAction("actionSubtract_Anomalistic_Century", timeGrou p, N_("Subtract 100 anomalistic years"), this, "subtractAnomalisticYears()" );
actionsMgr->addAction("actionSubtract_Mean_Tropical_Month", timeGrou p, N_("Subtract 1 mean tropical month"), this, "subtractMeanTropicalMonth() "); actionsMgr->addAction("actionSubtract_Mean_Tropical_Month", timeGrou p, N_("Subtract 1 mean tropical month"), this, "subtractMeanTropicalMonth() ");
actionsMgr->addAction("actionSubtract_Mean_Tropical_Year", timeGroup , N_("Subtract 1 mean tropical year"), this, "subtractMeanTropicalYear()"); actionsMgr->addAction("actionSubtract_Mean_Tropical_Year", timeGroup , N_("Subtract 1 mean tropical year"), this, "subtractMeanTropicalYear()");
actionsMgr->addAction("actionSubtract_Mean_Tropical_Century", timeGr oup, N_("Subtract 100 mean tropical years"), this, "subtractMeanTropicalYea rs()"); actionsMgr->addAction("actionSubtract_Mean_Tropical_Century", timeGr oup, N_("Subtract 100 mean tropical years"), this, "subtractMeanTropicalYea rs()");
actionsMgr->addAction("actionSubtract_Tropical_Year", timeGroup, N_( "Subtract 1 tropical year"), this, "subtractTropicalYear()"); actionsMgr->addAction("actionSubtract_Tropical_Year", timeGroup, N_( "Subtract 1 tropical year"), this, "subtractTropicalYear()");
actionsMgr->addAction("actionSubtract_Julian_Year", timeGroup, N_("S ubtract 1 Julian year"), this, "subtractJulianYear()"); actionsMgr->addAction("actionSubtract_Julian_Year", timeGroup, N_("S ubtract 1 Julian year"), this, "subtractJulianYear()");
skipping to change at line 1425 skipping to change at line 1429
void StelCore::addWeek() void StelCore::addWeek()
{ {
addSolarDays(7.0); addSolarDays(7.0);
} }
void StelCore::addSiderealDay() void StelCore::addSiderealDay()
{ {
addSiderealDays(1.0); addSiderealDays(1.0);
} }
void StelCore::addSiderealWeek()
{
addSiderealDays(7.0);
}
void StelCore::addSiderealYear() void StelCore::addSiderealYear()
{ {
double days = 365.256363004; double days = 365.256363004;
const PlanetP& home = position->getHomePlanet(); const PlanetP& home = position->getHomePlanet();
if (!home->getEnglishName().contains("Observer", Qt::CaseInsensitive ) && (home->getSiderealPeriod()>0)) if (!home->getEnglishName().contains("Observer", Qt::CaseInsensitive ) && (home->getSiderealPeriod()>0))
days = home->getSiderealPeriod(); days = home->getSiderealPeriod();
addSolarDays(days); addSolarDays(days);
} }
skipping to change at line 1450 skipping to change at line 1459
days = home->getSiderealPeriod(); days = home->getSiderealPeriod();
addSolarDays(days*n); addSolarDays(days*n);
} }
void StelCore::addSynodicMonth() void StelCore::addSynodicMonth()
{ {
addSolarDays(29.530588853); addSolarDays(29.530588853);
} }
void StelCore::addSaros()
{
// 223 synodic months
addSolarDays(6585.321314219);
}
void StelCore::addDraconicMonth() void StelCore::addDraconicMonth()
{ {
addSolarDays(27.212220817); addSolarDays(27.212220817);
} }
void StelCore::addMeanTropicalMonth() void StelCore::addMeanTropicalMonth()
{ {
addSolarDays(27.321582241); addSolarDays(27.321582241);
} }
skipping to change at line 1537 skipping to change at line 1552
void StelCore::subtractWeek() void StelCore::subtractWeek()
{ {
addSolarDays(-7.0); addSolarDays(-7.0);
} }
void StelCore::subtractSiderealDay() void StelCore::subtractSiderealDay()
{ {
addSiderealDays(-1.0); addSiderealDays(-1.0);
} }
void StelCore::subtractSiderealWeek()
{
addSiderealDays(-7.0);
}
void StelCore::subtractSiderealYear() void StelCore::subtractSiderealYear()
{ {
double days = 365.256363004; double days = 365.256363004;
const PlanetP& home = position->getHomePlanet(); const PlanetP& home = position->getHomePlanet();
if (!home->getEnglishName().contains("Observer", Qt::CaseInsensitive ) && (home->getSiderealPeriod()>0)) if (!home->getEnglishName().contains("Observer", Qt::CaseInsensitive ) && (home->getSiderealPeriod()>0))
days = home->getSiderealPeriod(); days = home->getSiderealPeriod();
addSolarDays(-days); addSolarDays(-days);
} }
skipping to change at line 1562 skipping to change at line 1582
days = home->getSiderealPeriod(); days = home->getSiderealPeriod();
addSolarDays(-days*n); addSolarDays(-days*n);
} }
void StelCore::subtractSynodicMonth() void StelCore::subtractSynodicMonth()
{ {
addSolarDays(-29.530588853); addSolarDays(-29.530588853);
} }
void StelCore::subtractSaros()
{
// 223 synodic months
addSolarDays(-6585.321314219);
}
void StelCore::subtractDraconicMonth() void StelCore::subtractDraconicMonth()
{ {
addSolarDays(-27.212220817); addSolarDays(-27.212220817);
} }
void StelCore::subtractMeanTropicalMonth() void StelCore::subtractMeanTropicalMonth()
{ {
addSolarDays(-27.321582241); addSolarDays(-27.321582241);
} }
skipping to change at line 1769 skipping to change at line 1795
delete position; delete position;
position = newObs; position = newObs;
} }
if (position->update(deltaTime)) if (position->update(deltaTime))
emit(locationChanged(getCurrentLocation())); emit(locationChanged(getCurrentLocation()));
// Position of sun and all the satellites (ie planets) // Position of sun and all the satellites (ie planets)
// GZ maybe setting this static can speedup a bit? // GZ maybe setting this static can speedup a bit?
static SolarSystem* solsystem = (SolarSystem*)StelApp::getInstance() .getModuleMgr().getModule("SolarSystem"); static SolarSystem* solsystem = (SolarSystem*)StelApp::getInstance() .getModuleMgr().getModule("SolarSystem");
// Likely the most important location where we need JDE: // Likely the most important location where we need JDE:
solsystem->computePositions(getJDE(), position->getHomePlanet()->get HeliocentricEclipticPos()); solsystem->computePositions(getJDE(), position->getHomePlanet());
} }
void StelCore::resetSync() void StelCore::resetSync()
{ {
jdOfLastJDUpdate = getJD(); jdOfLastJDUpdate = getJD();
//use currentMsecsSinceEpoch directly instead of StelApp::getTotalRu ntime, //use currentMsecsSinceEpoch directly instead of StelApp::getTotalRu ntime,
//because the StelApp::startMSecs gets subtracted anyways in update( ) //because the StelApp::startMSecs gets subtracted anyways in update( )
//also changed to qint64 to increase precision //also changed to qint64 to increase precision
milliSecondsOfLastJDUpdate = QDateTime::currentMSecsSinceEpoch(); milliSecondsOfLastJDUpdate = QDateTime::currentMSecsSinceEpoch();
emit timeSyncOccurred(jdOfLastJDUpdate); emit timeSyncOccurred(jdOfLastJDUpdate);
 End of changes. 10 change blocks. 
5 lines changed or deleted 31 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/