StelCore.cpp   StelCore.cpp 
skipping to change at line 184 skipping to change at line 184
updateTransformMatrices(); updateTransformMatrices();
movementMgr = new StelMovementMgr(this); movementMgr = new StelMovementMgr(this);
movementMgr->init(); movementMgr->init();
currentProjectorParams.fov = movementMgr->getInitFov(); currentProjectorParams.fov = movementMgr->getInitFov();
StelApp::getInstance().getModuleMgr().registerModule(movementMgr); StelApp::getInstance().getModuleMgr().registerModule(movementMgr);
skyDrawer = new StelSkyDrawer(this); skyDrawer = new StelSkyDrawer(this);
skyDrawer->init(); skyDrawer->init();
QString tmpstr = conf->value("projection/type", "ProjectionStereogra setCurrentProjectionTypeKey(getDefaultProjectionTypeKey());
phic").toString();
setCurrentProjectionTypeKey(tmpstr);
// Register all the core actions. // Register all the core actions.
QString timeGroup = N_("Date and Time"); QString timeGroup = N_("Date and Time");
QString movementGroup = N_("Movement and Selection"); QString movementGroup = N_("Movement and Selection");
QString displayGroup = N_("Display Options"); QString displayGroup = N_("Display Options");
StelActionMgr* actionsMgr = StelApp::getInstance().getStelActionMana ger(); StelActionMgr* actionsMgr = StelApp::getInstance().getStelActionMana ger();
actionsMgr->addAction("actionIncrease_Time_Speed", timeGroup, N_("In crease time speed"), this, "increaseTimeSpeed()", "L"); actionsMgr->addAction("actionIncrease_Time_Speed", timeGroup, N_("In crease time speed"), this, "increaseTimeSpeed()", "L");
actionsMgr->addAction("actionDecrease_Time_Speed", timeGroup, N_("De crease time speed"), this, "decreaseTimeSpeed()", "J"); actionsMgr->addAction("actionDecrease_Time_Speed", timeGroup, N_("De crease time speed"), this, "decreaseTimeSpeed()", "J");
actionsMgr->addAction("actionIncrease_Time_Speed_Less", timeGroup, N _("Increase time speed (a little)"), this, "increaseTimeSpeedLess()", "Shif t+L"); actionsMgr->addAction("actionIncrease_Time_Speed_Less", timeGroup, N _("Increase time speed (a little)"), this, "increaseTimeSpeedLess()", "Shif t+L");
actionsMgr->addAction("actionDecrease_Time_Speed_Less", timeGroup, N _("Decrease time speed (a little)"), this, "decreaseTimeSpeedLess()", "Shif t+J"); actionsMgr->addAction("actionDecrease_Time_Speed_Less", timeGroup, N _("Decrease time speed (a little)"), this, "decreaseTimeSpeedLess()", "Shif t+J");
skipping to change at line 237 skipping to change at line 236
actionsMgr->addAction("actionSubtract_Tropical_Year", timeGroup, N_( "Subtract 1 mean tropical year"), this, "subtractTropicalYear()"); actionsMgr->addAction("actionSubtract_Tropical_Year", timeGroup, N_( "Subtract 1 mean tropical year"), this, "subtractTropicalYear()");
actionsMgr->addAction("actionSubtract_Tropical_Century", timeGroup, N_("Subtract 1 mean tropical century"), this, "subtractTropicalCentury()"); actionsMgr->addAction("actionSubtract_Tropical_Century", timeGroup, N_("Subtract 1 mean tropical century"), this, "subtractTropicalCentury()");
actionsMgr->addAction("actionSet_Home_Planet_To_Selected", movementG roup, N_("Set home planet to selected planet"), this, "moveObserverToSelect ed()", "Ctrl+G"); actionsMgr->addAction("actionSet_Home_Planet_To_Selected", movementG roup, N_("Set home planet to selected planet"), this, "moveObserverToSelect ed()", "Ctrl+G");
actionsMgr->addAction("actionGo_Home_Global", movementGroup, N_("Go to home"), this, "returnToHome()", "Ctrl+H"); actionsMgr->addAction("actionGo_Home_Global", movementGroup, N_("Go to home"), this, "returnToHome()", "Ctrl+H");
actionsMgr->addAction("actionHorizontal_Flip", displayGroup, N_("Fli p scene horizontally"), this, "flipHorz", "Ctrl+Shift+H", "", true); actionsMgr->addAction("actionHorizontal_Flip", displayGroup, N_("Fli p scene horizontally"), this, "flipHorz", "Ctrl+Shift+H", "", true);
actionsMgr->addAction("actionVertical_Flip", displayGroup, N_("Flip scene vertically"), this, "flipVert", "Ctrl+Shift+V", "", true); actionsMgr->addAction("actionVertical_Flip", displayGroup, N_("Flip scene vertically"), this, "flipVert", "Ctrl+Shift+V", "", true);
} }
QString StelCore::getDefaultProjectionTypeKey() const
{
QSettings* conf = StelApp::getInstance().getSettings();
return conf->value("projection/type", "ProjectionStereographic").toS
tring();
}
// Get the shared instance of StelGeodesicGrid. // Get the shared instance of StelGeodesicGrid.
// The returned instance is garanteed to allow for at least maxLevel levels // The returned instance is garanteed to allow for at least maxLevel levels
const StelGeodesicGrid* StelCore::getGeodesicGrid(int maxLevel) const const StelGeodesicGrid* StelCore::getGeodesicGrid(int maxLevel) const
{ {
if (geodesicGrid==NULL) if (geodesicGrid==NULL)
{ {
geodesicGrid = new StelGeodesicGrid(maxLevel); geodesicGrid = new StelGeodesicGrid(maxLevel);
} }
else if (maxLevel>geodesicGrid->getMaxLevel()) else if (maxLevel>geodesicGrid->getMaxLevel())
{ {
skipping to change at line 414 skipping to change at line 419
skyDrawer->update(deltaTime); skyDrawer->update(deltaTime);
} }
/************************************************************************* /*************************************************************************
Execute all the pre-drawing functions Execute all the pre-drawing functions
*************************************************************************/ *************************************************************************/
void StelCore::preDraw() void StelCore::preDraw()
{ {
// Init openGL viewing with fov, screen size and clip planes // Init openGL viewing with fov, screen size and clip planes
currentProjectorParams.zNear = 0.000001; currentProjectorParams.zNear = 0.000001;
currentProjectorParams.zFar = 50.; currentProjectorParams.zFar = 500.;
skyDrawer->preDraw(); skyDrawer->preDraw();
// Clear areas not redrawn by main viewport (i.e. fisheye square vie wport) // Clear areas not redrawn by main viewport (i.e. fisheye square vie wport)
glClearColor(0,0,0,0); glClearColor(0,0,0,0);
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
} }
/************************************************************************* /*************************************************************************
Update core state after drawing modules Update core state after drawing modules
skipping to change at line 1461 skipping to change at line 1466
break; break;
case Banjevic: case Banjevic:
// Banjevic (2006) algorithm for DeltaT // Banjevic (2006) algorithm for DeltaT
ndot = -26.0; // n.dot = -26.0 "/cy/cy ndot = -26.0; // n.dot = -26.0 "/cy/cy
DeltaT = StelUtils::getDeltaTByBanjevic(jDay); DeltaT = StelUtils::getDeltaTByBanjevic(jDay);
break; break;
case IslamSadiqQureshi: case IslamSadiqQureshi:
// Islam, Sadiq & Qureshi (2008 + revisited 2013) al gorithm for DeltaT (6 polynomials) // Islam, Sadiq & Qureshi (2008 + revisited 2013) al gorithm for DeltaT (6 polynomials)
ndot = -26.0; // n.dot = -26.0 "/cy/cy ndot = -26.0; // n.dot = -26.0 "/cy/cy
DeltaT = StelUtils::getDeltaTByIslamSadiqQureshi(jDa y); DeltaT = StelUtils::getDeltaTByIslamSadiqQureshi(jDa y);
dontUseMoon = true; // Seems this solutions doesn't
use value of secular acceleration of the Moon
break;
case KhalidSultanaZaidi:
// M. Khalid, Mariam Sultana and Faheem Zaidi polino
mial approximation of time period 1620-2013 (2014)
ndot = -26.0; // n.dot = -26.0 "/cy/cy
DeltaT = StelUtils::getDeltaTByKhalidSultanaZaidi(jD
ay);
dontUseMoon = true; // Seems this solutions doesn't
use value of secular acceleration of the Moon
break; break;
case Custom: case Custom:
// User defined coefficients for quadratic equation for DeltaT // User defined coefficients for quadratic equation for DeltaT
ndot = getDeltaTCustomNDot(); // n.dot = custom valu e "/cy/cy ndot = getDeltaTCustomNDot(); // n.dot = custom valu e "/cy/cy
int year, month, day; int year, month, day;
Vec3f coeff = getDeltaTCustomEquationCoefficients(); Vec3f coeff = getDeltaTCustomEquationCoefficients();
StelUtils::getDateFromJulianDay(jDay, &year, &month, &day); StelUtils::getDateFromJulianDay(jDay, &year, &month, &day);
double yeardec=year+((month-1)*30.5+day/31*30.5)/366 double u = (StelUtils::getDecYear(year,month,day)-ge
; tDeltaTCustomYear())/100;
double u = (yeardec-getDeltaTCustomYear())/100; DeltaT = coeff[0] + u*(coeff[1] + u*coeff[2]);
DeltaT = coeff[0] + coeff[1]*u + coeff[2]*std::pow(u
,2);
break; break;
} }
if (!dontUseMoon) if (!dontUseMoon)
DeltaT += StelUtils::getMoonSecularAcceleration(jDay, ndot); DeltaT += StelUtils::getMoonSecularAcceleration(jDay, ndot);
return DeltaT; return DeltaT;
} }
//! Set the current algorithm for time correction to use //! Set the current algorithm for time correction to use
skipping to change at line 1595 skipping to change at line 1606
break; break;
case EspenakMeeus: // GENERAL SOLUTION case EspenakMeeus: // GENERAL SOLUTION
description = q_("This solution by F. Espenak and J. Meeus, based on Morrison & Stephenson (2004) and a polynomial fit through tabulated values for 1600-2000, is used for the %1NASA Eclipse Web Site%2 a nd in their <em>Five Millennium Canon of Solar Eclipses: -1900 to +3000</em > (2006). This formula is also used in the solar, lunar and planetary ephem eris program SOLEX.").arg("<a href='http://eclipse.gsfc.nasa.gov/eclipse.ht ml'>").arg("</a>").append(getCurrentDeltaTAlgorithmValidRange(jd, &marker)) .append(" <em>").append(q_("Used by default.")).append("</em>"); description = q_("This solution by F. Espenak and J. Meeus, based on Morrison & Stephenson (2004) and a polynomial fit through tabulated values for 1600-2000, is used for the %1NASA Eclipse Web Site%2 a nd in their <em>Five Millennium Canon of Solar Eclipses: -1900 to +3000</em > (2006). This formula is also used in the solar, lunar and planetary ephem eris program SOLEX.").arg("<a href='http://eclipse.gsfc.nasa.gov/eclipse.ht ml'>").arg("</a>").append(getCurrentDeltaTAlgorithmValidRange(jd, &marker)) .append(" <em>").append(q_("Used by default.")).append("</em>");
break; break;
case Banjevic: case Banjevic:
description = q_("This solution by B. Banjevic, base d on Stephenson & Morrison (1984), was published in article <em>Ancient ecl ipses and dating the fall of Babylon</em> (%1).").arg("<a href='http://adsa bs.harvard.edu/abs/2006POBeo..80..251B'>2006</a>").append(getCurrentDeltaTA lgorithmValidRange(jd, &marker)); description = q_("This solution by B. Banjevic, base d on Stephenson & Morrison (1984), was published in article <em>Ancient ecl ipses and dating the fall of Babylon</em> (%1).").arg("<a href='http://adsa bs.harvard.edu/abs/2006POBeo..80..251B'>2006</a>").append(getCurrentDeltaTA lgorithmValidRange(jd, &marker));
break; break;
case IslamSadiqQureshi: case IslamSadiqQureshi:
description = q_("This solution by S. Islam, M. Sadi q and M. S. Qureshi, based on Meeus & Simons (2000), was published in artic le <em>Error Minimization of Polynomial Approximation of DeltaT</em> (%1) a nd revisited by Sana Islam in 2013.").arg("<a href='http://www.ias.ac.in/ja a/dec2008/JAA610.pdf'>2008</a>").append(getCurrentDeltaTAlgorithmValidRange (jd, &marker)); description = q_("This solution by S. Islam, M. Sadi q and M. S. Qureshi, based on Meeus & Simons (2000), was published in artic le <em>Error Minimization of Polynomial Approximation of DeltaT</em> (%1) a nd revisited by Sana Islam in 2013.").arg("<a href='http://www.ias.ac.in/ja a/dec2008/JAA610.pdf'>2008</a>").append(getCurrentDeltaTAlgorithmValidRange (jd, &marker));
break; break;
case KhalidSultanaZaidi:
description = q_("This polynomial approximation with
0.6 seconds of accuracy by M. Khalid, Mariam Sultana and Faheem Zaidi was
published in <em>Delta T: Polynomial Approximation of Time Period 1620-2013
</em> (%1).").arg("<a href='http://dx.doi.org/10.1155/2014/480964'>2014</a>
").append(getCurrentDeltaTAlgorithmValidRange(jd, &marker));
break;
case Custom: case Custom:
description = q_("This is a quadratic formula for ca lculation of %1T with coefficients defined by the user.").arg(QChar(0x0394) ); description = q_("This is a quadratic formula for ca lculation of %1T with coefficients defined by the user.").arg(QChar(0x0394) );
break; break;
default: default:
description = q_("Error"); description = q_("Error");
} }
return description; return description;
} }
QString StelCore::getCurrentDeltaTAlgorithmValidRange(double jDay, QString *marker) const QString StelCore::getCurrentDeltaTAlgorithmValidRange(double jDay, QString *marker) const
skipping to change at line 1736 skipping to change at line 1750
case Banjevic: case Banjevic:
start = -2020; start = -2020;
finish = 1620; finish = 1620;
validRangeAppendix = q_("with zero values outside th is range"); validRangeAppendix = q_("with zero values outside th is range");
break; break;
case IslamSadiqQureshi: case IslamSadiqQureshi:
start = 1620; start = 1620;
finish = 2007; finish = 2007;
validRangeAppendix = q_("with zero values outside th is range"); validRangeAppendix = q_("with zero values outside th is range");
break; break;
case KhalidSultanaZaidi:
start = 1620;
finish = 2013;
validRangeAppendix = q_("with zero values outside th
is range");
break;
case Custom: case Custom:
// Valid range unknown // Valid range unknown
break; break;
} }
if (start!=finish) if (start!=finish)
{ {
if (validRangeAppendix!="") if (validRangeAppendix!="")
validRange = q_("Valid range of usage: between years %1 and %2, %3.").arg(start).arg(finish).arg(validRangeAppendix); validRange = q_("Valid range of usage: between years %1 and %2, %3.").arg(start).arg(finish).arg(validRangeAppendix);
else else
 End of changes. 7 change blocks. 
9 lines changed or deleted 36 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/