[Kstars-devel] KDE/kdeedu/kstars/kstars/skyobjects
Alexey Khudyakov
alexey.skladnoy at gmail.com
Sat Jul 25 17:19:40 CEST 2009
SVN commit 1002276 by khudyakov:
Hide MagArray in anonymous namespace in ksmoon.cpp. It's needed only for
calculstions of Moon's magnitude so there is no need to expose it in
the header.
CCMAIL: kstars-devel at kde.org
M +20 -5 ksmoon.cpp
M +0 -18 ksmoon.h
--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/ksmoon.cpp #1002275:1002276
@@ -37,6 +37,25 @@
while( x < 0.0 ) x += 360.0;
return x * dms::DegToRad;
}
+
+ /*
+ * Data used to calculate moon magnitude.
+ *
+ * Formula and data were obtained from SkyChart v3.x Beta
+ *
+ */
+ // intensities in Table 1 of M. Minnaert (1961),
+ // Phase Frac. Phase Frac. Phase Frac.
+ // angle ill. Mag angle ill. Mag angle ill. Mag
+ // 0 1.00 -12.7 60 0.75 -11.0 120 0.25 -8.7
+ // 10 0.99 -12.4 70 0.67 -10.8 130 0.18 -8.2
+ // 20 0.97 -12.1 80 0.59 -10.4 140 0.12 -7.6
+ // 30 0.93 -11.8 90 0.50 -10.0 150 0.07 -6.7
+ // 40 0.88 -11.5 100 0.41 -9.6 160 0.03 -3.4
+ // 50 0.82 -11.2 110 0.33 -9.2
+ static const double MagArray[19] = {
+ -12.7, -12.4, -12.1, -11.8, -11.5, -11.2, -11.0, -10.8, -10.4, -10.0,
+ -9.6, -9.2, -8.7, -8.2, -7.6, -6.7, -3.4, 0, 0};
}
KSMoon::KSMoon()
@@ -72,11 +91,7 @@
QList<KSMoon::MoonLRData*> KSMoon::LRData;
QList<KSMoon::MoonBData*> KSMoon::BData;
-const double KSMoon::MagArray[19] = {-12.7,-12.4,-12.1,-11.8,-11.5,-11.2,
- -11.0,-10.8,-10.4,-10.0,-9.6,-9.2,
- -8.7,-8.2,-7.6,-6.7,-3.4,0,0};
-
bool KSMoon::loadData() {
if (data_loaded) return true;
@@ -216,7 +231,7 @@
int j = (i + 1 > 18) ? 18 : i + 1;
i = 18 - abs(i);
j = 18 - abs(j);
- setMag( KSMoon::MagArray[ i ] + ( ( KSMoon::MagArray[ j ] - KSMoon::MagArray[ i ] ) * k / 10 ) );
+ setMag( MagArray[i] + (MagArray[j] - MagArray[i]) * k / 10 );
}
void KSMoon::findPhase() {
--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/ksmoon.h #1002275:1002276
@@ -64,24 +64,6 @@
*/
virtual bool loadData();
- /*
- * Data used to calculate moon magnitude
- *
- * Formula and data were obtained from SkyChart v3.x Beta
- *
- */
- // intensities in Table 1 of M. Minnaert (1961),
- // Phase Frac. Phase Frac. Phase Frac.
- // angle ill. Mag angle ill. Mag angle ill. Mag
- // 0 1.00 -12.7 60 0.75 -11.0 120 0.25 -8.7
- // 10 0.99 -12.4 70 0.67 -10.8 130 0.18 -8.2
- // 20 0.97 -12.1 80 0.59 -10.4 140 0.12 -7.6
- // 30 0.93 -11.8 90 0.50 -10.0 150 0.07 -6.7
- // 40 0.88 -11.5 100 0.41 -9.6 160 0.03 -3.4
- // 50 0.82 -11.2 110 0.33 -9.2
- static const double MagArray[19];
-
-
protected:
/**Reimplemented from KSPlanetBase, this function employs unique algorithms for
*estimating the lunar coordinates. Finding the position of the moon is
More information about the Kstars-devel
mailing list