[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [marble] src/lib/marble: A little bit of a cleanup in SunLocator.
From: Torsten Rahn <torsten.rahn () lge ! com>
Date: 2013-12-31 22:47:00
Message-ID: E1Vy85U-0001tc-K2 () scm ! kde ! org
[Download RAW message or body]
Git commit b159ac1b985e7d5b2463772e858715bacbf41bbd by Torsten Rahn.
Committed on 31/12/2013 at 22:45.
Pushed by rahn into branch 'master'.
A little bit of a cleanup in SunLocator.
M +3 -11 src/lib/marble/SunLocator.cpp
http://commits.kde.org/marble/b159ac1b985e7d5b2463772e858715bacbf41bbd
diff --git a/src/lib/marble/SunLocator.cpp b/src/lib/marble/SunLocator.cpp
index 52d7c98..559fbae 100644
--- a/src/lib/marble/SunLocator.cpp
+++ b/src/lib/marble/SunLocator.cpp
@@ -38,15 +38,6 @@ using std::cos;
using std::asin;
using std::abs;
-
-// epoch J2000 = 1 January 2000, noon Terrestrial Time (11:58:55.816 UTC)
-const int J2000 = 2451545;
-
-// taking the full moon of 15 January 1900 19:07 UTC as the epoch for the moon
-// value from http://home.hiwaay.net/~krcool/Astro/moon/fullmoon.htm
-const qreal MOON_EPOCH = 2415035.297;
-const qreal MOON_SYNODIC_PERIOD = 29.530588;
-
// emit updateSun() every update_interval ms
const int update_interval = 60000;
@@ -122,10 +113,11 @@ qreal SunLocator::shading(qreal lon, qreal a, qreal c) const
qreal twilightZone = 0.0;
- if ( d->m_planet->id() == "earth" || d->m_planet->id() == "venus" ) {
+ QString planetId = d->m_planet->id();
+ if ( planetId == "earth" || planetId == "venus") {
twilightZone = 0.1; // this equals 18 deg astronomical twilight.
}
- else if ( d->m_planet->id() == "mars" ) {
+ else if ( planetId == "mars" ) {
twilightZone = 0.05;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic