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 =3D 1 January 2000, noon Terrestrial Time (11:58:55.816 UTC) -const int J2000 =3D 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 =3D 2415035.297; -const qreal MOON_SYNODIC_PERIOD =3D 29.530588; - // emit updateSun() every update_interval ms const int update_interval =3D 60000; = @@ -122,10 +113,11 @@ qreal SunLocator::shading(qreal lon, qreal a, qreal c= ) const = qreal twilightZone =3D 0.0; = - if ( d->m_planet->id() =3D=3D "earth" || d->m_planet->id() =3D=3D "ven= us" ) { + QString planetId =3D d->m_planet->id(); + if ( planetId =3D=3D "earth" || planetId =3D=3D "venus") { twilightZone =3D 0.1; // this equals 18 deg astronomical twilight. } - else if ( d->m_planet->id() =3D=3D "mars" ) { + else if ( planetId =3D=3D "mars" ) { twilightZone =3D 0.05; } =20