summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Zotti <Georg.Zotti@univie.ac.at>2022-01-19 22:02:53 +0100
committerGeorg Zotti <Georg.Zotti@univie.ac.at>2022-01-19 22:02:53 +0100
commitb3d12ee0d600936d20e096d8d4a4f15cd4c3035e (patch)
tree6d6dac9b59d19f895fa8319a1ebaee89ceb6949b
parent0b92131ed8ba269852bcae600bcf5d412877d88c (diff)
Rename the affected variables
- remove the "custom" part - cleanup
-rw-r--r--src/core/modules/RotationElements.cpp12
-rw-r--r--src/core/modules/RotationElements.hpp7
-rw-r--r--src/core/modules/SolarSystem.cpp50
-rw-r--r--src/core/modules/SolarSystem.hpp31
-rw-r--r--src/gui/GreatRedSpotDialog.cpp8
-rw-r--r--src/gui/ViewDialog.cpp1
6 files changed, 43 insertions, 66 deletions
diff --git a/src/core/modules/RotationElements.cpp b/src/core/modules/RotationElements.cpp
index 5957dacc4b..73cd6fdd22 100644
--- a/src/core/modules/RotationElements.cpp
+++ b/src/core/modules/RotationElements.cpp
@@ -28,9 +28,9 @@
// Also include the GRS corrections here
//bool RotationElements::flagCustomGrsSettings = false; // OF COURSE this must become true forever...
-double RotationElements::customGrsJD = 2456901.5;
-double RotationElements::customGrsLongitude = 216.;
-double RotationElements::customGrsDrift = 15.;
+double RotationElements::grsJD = 2456901.5;
+double RotationElements::grsLongitude = 216.;
+double RotationElements::grsDrift = 15.;
RotationElements::PlanetCorrections RotationElements::planetCorrections;
@@ -284,9 +284,9 @@ double RotationElements::corrWJupiter(const double d, const double T)
// than that used in this tool or 1 2/3 minutes early for every 1° less than the longitude in this tool.
// GRS longitude was at 2014-09-08 216d with a drift of 1.25d every month
// Updated 01/2021 noting LII=349 and drift 1.75 degrees/month.
- double longitudeGRS = // (flagCustomGrsSettings ?
- customGrsLongitude + customGrsDrift*(JDE - customGrsJD)/365.25; // :
- // 349+1.75*(JDE - 2459216.)/30.);
+ double longitudeGRS =
+ // 349 + 1.75 *(JDE - 2459216.)/30.); // old fixed solution
+ grsLongitude + grsDrift*(JDE - grsJD )/365.25;
return - longitudeGRS + ((187./512.)*360.-90.); // Last term is pixel position of GRS in texture, and a spherical coordinate offset for the texture.
// To verify:
// GRS at 2015-02-26 23:07 UT on picture at https://maximusphotography.files.wordpress.com/2015/03/jupiter-febr-26-2015.jpg
diff --git a/src/core/modules/RotationElements.hpp b/src/core/modules/RotationElements.hpp
index bd6412e279..af37c7c5a3 100644
--- a/src/core/modules/RotationElements.hpp
+++ b/src/core/modules/RotationElements.hpp
@@ -284,10 +284,9 @@ public:
static void corrOriLarissa(const double d, const double T, double* J2000NPoleRA, double* J2000NPoleDE);
static void corrOriProteus(const double d, const double T, double* J2000NPoleRA, double* J2000NPoleDE);
- static bool flagCustomGrsSettings; //!< Use custom settings for calculation of position of Great Red Spot?
- static double customGrsJD; //!< Initial JD (epoch) for calculation of position of Great Red Spot
- static double customGrsLongitude; //!< Longitude of Great Red Spot at customGrsJD (System II, degrees)
- static double customGrsDrift; //!< Annual drift of Great Red Spot position (degrees)
+ static double grsJD; //!< JD (epoch) for calculation of position of Great Red Spot
+ static double grsLongitude; //!< Longitude of Great Red Spot at grsJD (System II, degrees)
+ static double grsDrift; //!< Annual drift of Great Red Spot position (degrees)
//! Retrieve magnitude variation depending on angle Ls [radians].
//! Source: A. Mallama: The magnitude and albedo of Mars. Icarus 192(2007) 404-416.
diff --git a/src/core/modules/SolarSystem.cpp b/src/core/modules/SolarSystem.cpp
index 3fa1e6f49a..88e2b3b7ed 100644
--- a/src/core/modules/SolarSystem.cpp
+++ b/src/core/modules/SolarSystem.cpp
@@ -219,9 +219,9 @@ void SolarSystem::init()
// Settings for calculation of position of Great Red Spot on Jupiter
// setFlagCustomGrsSettings(conf->value("astro/flag_grs_custom", false).toBool());
- setCustomGrsLongitude(conf->value("astro/grs_longitude", 216).toInt());
- setCustomGrsDrift(conf->value("astro/grs_drift", 15.).toDouble());
- setCustomGrsJD(conf->value("astro/grs_jd", 2456901.5).toDouble());
+ setGrsLongitude(conf->value("astro/grs_longitude", 216).toInt());
+ setGrsDrift(conf->value("astro/grs_drift", 15.).toDouble());
+ setGrsJD(conf->value("astro/grs_jd", 2456901.5).toDouble());
setFlagEarthShadowEnlargementDanjon(conf->value("astro/shadow_enlargement_danjon", false).toBool());
setFlagPermanentSolarCorona(conf->value("viewing/flag_draw_sun_corona", true).toBool());
@@ -3080,57 +3080,43 @@ int SolarSystem::getOrbitsThickness() const
return Planet::orbitsThickness;
}
-
-//void SolarSystem::setFlagCustomGrsSettings(bool b)
-//{
-// RotationElements::flagCustomGrsSettings=b;
-// // automatic saving of the setting
-// conf->setValue("astro/flag_grs_custom", b);
-// emit flagCustomGrsSettingsChanged(b);
-//}
-//
-//bool SolarSystem::getFlagCustomGrsSettings() const
-//{
-// return RotationElements::flagCustomGrsSettings;
-//}
-
-void SolarSystem::setCustomGrsLongitude(int longitude)
+void SolarSystem::setGrsLongitude(int longitude)
{
- RotationElements::customGrsLongitude = longitude;
+ RotationElements::grsLongitude = longitude;
// automatic saving of the setting
conf->setValue("astro/grs_longitude", longitude);
- emit customGrsLongitudeChanged(longitude);
+ emit grsLongitudeChanged(longitude);
}
-int SolarSystem::getCustomGrsLongitude() const
+int SolarSystem::getGrsLongitude() const
{
- return static_cast<int>(RotationElements::customGrsLongitude);
+ return static_cast<int>(RotationElements::grsLongitude);
}
-void SolarSystem::setCustomGrsDrift(double drift)
+void SolarSystem::setGrsDrift(double drift)
{
- RotationElements::customGrsDrift = drift;
+ RotationElements::grsDrift = drift;
// automatic saving of the setting
conf->setValue("astro/grs_drift", drift);
- emit customGrsDriftChanged(drift);
+ emit grsDriftChanged(drift);
}
-double SolarSystem::getCustomGrsDrift() const
+double SolarSystem::getGrsDrift() const
{
- return RotationElements::customGrsDrift;
+ return RotationElements::grsDrift;
}
-void SolarSystem::setCustomGrsJD(double JD)
+void SolarSystem::setGrsJD(double JD)
{
- RotationElements::customGrsJD = JD;
+ RotationElements::grsJD = JD;
// automatic saving of the setting
conf->setValue("astro/grs_jd", JD);
- emit customGrsJDChanged(JD);
+ emit grsJDChanged(JD);
}
-double SolarSystem::getCustomGrsJD()
+double SolarSystem::getGrsJD()
{
- return RotationElements::customGrsJD;
+ return RotationElements::grsJD;
}
void SolarSystem::setFlagEarthShadowEnlargementDanjon(bool b)
diff --git a/src/core/modules/SolarSystem.hpp b/src/core/modules/SolarSystem.hpp
index 13f7c619aa..b735e8250d 100644
--- a/src/core/modules/SolarSystem.hpp
+++ b/src/core/modules/SolarSystem.hpp
@@ -100,10 +100,9 @@ class SolarSystem : public StelObjectModule
Q_PROPERTY(bool ephemerisScaleMarkersDisplayed READ getFlagEphemerisScaleMarkers WRITE setFlagEphemerisScaleMarkers NOTIFY ephemerisScaleMarkersChanged)
Q_PROPERTY(bool ephemerisAlwaysOn READ getFlagEphemerisAlwaysOn WRITE setFlagEphemerisAlwaysOn NOTIFY ephemerisAlwaysOnChanged)
// Great Red Spot (GRS) properties
-// Q_PROPERTY(bool flagCustomGrsSettings READ getFlagCustomGrsSettings WRITE setFlagCustomGrsSettings NOTIFY flagCustomGrsSettingsChanged)
- Q_PROPERTY(int customGrsLongitude READ getCustomGrsLongitude WRITE setCustomGrsLongitude NOTIFY customGrsLongitudeChanged)
- Q_PROPERTY(double customGrsDrift READ getCustomGrsDrift WRITE setCustomGrsDrift NOTIFY customGrsDriftChanged)
- Q_PROPERTY(double customGrsJD READ getCustomGrsJD WRITE setCustomGrsJD NOTIFY customGrsJDChanged)
+ Q_PROPERTY(int grsLongitude READ getGrsLongitude WRITE setGrsLongitude NOTIFY grsLongitudeChanged)
+ Q_PROPERTY(double grsDrift READ getGrsDrift WRITE setGrsDrift NOTIFY grsDriftChanged)
+ Q_PROPERTY(double grsJD READ getGrsJD WRITE setGrsJD NOTIFY grsJDChanged)
// Eclipse algorithm properties
Q_PROPERTY(bool earthShadowEnlargementDanjon READ getFlagEarthShadowEnlargementDanjon WRITE setFlagEarthShadowEnlargementDanjon NOTIFY earthShadowEnlargementDanjonChanged)
// Colors
@@ -676,30 +675,25 @@ public slots:
//! Get the current value of the flag which enables showing of solar corona when atmosphere is disabled or when total solar eclipses is happened only.
bool getFlagPermanentSolarCorona(void) const { return flagPermanentSolarCorona; }
-// //! Set flag which determines if custom settings is using for Great Red Spot on Jupiter
-// void setFlagCustomGrsSettings(bool b);
-// //! Get the current value of the flag which determines if custom settings for Great Red Spot on Jupiter is used or not.
-// bool getFlagCustomGrsSettings() const;
-
//! Set longitude of Great Red Spot (System II is used)
//! @param longitude (degrees)
- void setCustomGrsLongitude(int longitude);
+ void setGrsLongitude(int longitude);
//! Get longitude of Great Red Spot (System II is used)
//! @return a longitude (degrees)
- int getCustomGrsLongitude() const;
+ int getGrsLongitude() const;
//! Set speed of annual drift for Great Red Spot (System II is used)
//! @param annual drift (degrees)
- void setCustomGrsDrift(double drift);
+ void setGrsDrift(double drift);
//! Get speed of annual drift for Great Red Spot (System II is used)
- double getCustomGrsDrift() const;
+ double getGrsDrift() const;
//! Set initial JD for calculation of position of Great Red Spot
//! @param JD
// TODO (GZ): Clarify whether this is JD or rather JDE?
- void setCustomGrsJD(double JD);
+ void setGrsJD(double JD);
//! Get initial JD for calculation of position of Great Red Spot
- double getCustomGrsJD();
+ double getGrsJD();
//! Set whether earth shadow should be enlarged following Danjon's method
void setFlagEarthShadowEnlargementDanjon(bool b);
@@ -786,10 +780,9 @@ signals:
void ephemerisDataLimitChanged(int s);
void ephemerisSmartDatesChanged(bool b);
void ephemerisScaleMarkersChanged(bool b);
-// void flagCustomGrsSettingsChanged(bool b);
- void customGrsLongitudeChanged(int l);
- void customGrsDriftChanged(double drift);
- void customGrsJDChanged(double JD);
+ void grsLongitudeChanged(int l);
+ void grsDriftChanged(double drift);
+ void grsJDChanged(double JD);
void earthShadowEnlargementDanjonChanged(bool b);
void flagPermanentSolarCoronaChanged(bool b);
diff --git a/src/gui/GreatRedSpotDialog.cpp b/src/gui/GreatRedSpotDialog.cpp
index 9b191bb876..21b3eab381 100644
--- a/src/gui/GreatRedSpotDialog.cpp
+++ b/src/gui/GreatRedSpotDialog.cpp
@@ -55,13 +55,13 @@ void GreatRedSpotDialog::createDialogContent()
connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));
SolarSystem* ss = GETSTELMODULE(SolarSystem);
- connectIntProperty(ui->longitudeSpinBox, "SolarSystem.customGrsLongitude");
- connectDoubleProperty(ui->driftDoubleSpinBox, "SolarSystem.customGrsDrift");
+ connectIntProperty(ui->longitudeSpinBox, "SolarSystem.grsLongitude");
+ connectDoubleProperty(ui->driftDoubleSpinBox, "SolarSystem.grsDrift");
const StelLocaleMgr& locmgr = StelApp::getInstance().getLocaleMgr();
QString fmt = QString("%1 hh:mm").arg(locmgr.getQtDateFormatStr());
ui->jdDateTimeEdit->setDisplayFormat(fmt);
- ui->jdDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(ss->getCustomGrsJD()));
+ ui->jdDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(ss->getGrsJD()));
connect(ui->jdDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(setGrsJD(QDateTime)));
connect(ui->recentGrsMeasurementPushButton, SIGNAL(clicked(bool)), this, SLOT(openRecentGrsMeasurement()));
@@ -69,7 +69,7 @@ void GreatRedSpotDialog::createDialogContent()
void GreatRedSpotDialog::setGrsJD(QDateTime dt)
{
- GETSTELMODULE(SolarSystem)->setCustomGrsJD(StelUtils::qDateTimeToJd(dt));
+ GETSTELMODULE(SolarSystem)->setGrsJD(StelUtils::qDateTimeToJd(dt));
}
void GreatRedSpotDialog::openRecentGrsMeasurement()
diff --git a/src/gui/ViewDialog.cpp b/src/gui/ViewDialog.cpp
index bffdb14e4f..a5a14fcb60 100644
--- a/src/gui/ViewDialog.cpp
+++ b/src/gui/ViewDialog.cpp
@@ -274,7 +274,6 @@ void ViewDialog::createDialogContent()
populatePlanetMagnitudeAlgorithmDescription();
// GreatRedSpot (Jupiter)
- connect(ssmgr, SIGNAL(flagCustomGrsSettingsChanged(bool)), ui->pushButtonGrsDetails, SLOT(setEnabled(bool)));
connect(ui->pushButtonGrsDetails, SIGNAL(clicked()), this, SLOT(showGreatRedSpotDialog()));
// Link Solar System Editor button if available...