[Kstars-devel] KDE/kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Sat Mar 17 17:18:39 CET 2007


SVN commit 643494 by harris:

New visual Equinox/Solstice calculator module.  Instead of 
displaying the date/time of the solstice and equinox events 
for a given year, the events are highlighted on a plot of the 
Sun's declinatin as a function of time over the course of the 
given year.

Please have a look and let me know what you think; I may try to 
convert some other modules to this "visual" style as well.

CCMAIL: kstars-devel at kde.org


 M  +3 -2      CMakeLists.txt  
 M  +0 -31     kssun.cpp  
 M  +0 -10     kssun.h  
 M  +1 -1      tools/astrocalc.cpp  
 M  +2 -0      tools/modcalcapcoord.cpp  
 D             tools/modcalcequinox.cpp  
 D             tools/modcalcequinox.h  
 D             tools/modcalcequinox.ui  
 A             tools/modcalcvizequinox.cpp   [License: GPL (v2+)]
 A             tools/modcalcvizequinox.h   [License: GPL (v2+)]
 A             tools/modcalcvizequinox.ui  


--- trunk/KDE/kdeedu/kstars/kstars/CMakeLists.txt #643493:643494
@@ -29,6 +29,7 @@
 set(libkstarstools_SRCS 
 	tools/altvstime.cpp
 	tools/astrocalc.cpp
+	tools/eqplotwidget.cpp
 	tools/jmoontool.cpp
 	tools/lcgenerator.cpp
 	tools/modcalcangdist.cpp
@@ -36,7 +37,7 @@
 	tools/modcalcaltaz.cpp
 	tools/modcalcdaylength.cpp
 	tools/modcalceclipticcoords.cpp
-	tools/modcalcequinox.cpp
+	tools/modcalcvizequinox.cpp
 	tools/modcalcgalcoord.cpp
 	tools/modcalcgeodcoord.cpp
 	tools/modcalcjd.cpp
@@ -95,7 +96,7 @@
 	tools/modcalcaltaz.ui
 	tools/modcalcdaylength.ui
 	tools/modcalceclipticcoords.ui
-	tools/modcalcequinox.ui
+	tools/modcalcvizequinox.ui
 	tools/modcalcgalcoord.ui
 	tools/modcalcgeod.ui
 	tools/modcalcjd.ui
--- trunk/KDE/kdeedu/kstars/kstars/kssun.cpp #643493:643494
@@ -129,34 +129,3 @@
 	return true;
 }
 
-long double KSSun::springEquinox(int year) {
-	return equinox(year, 18, 3, 0.);
-}
-
-long double KSSun::summerSolstice(int year) {
-	return equinox(year, 18, 6, 90.);
-}
-
-long double KSSun::autumnEquinox(int year) {
-	return equinox(year, 19, 9, 180.);
-}
-
-long double KSSun::winterSolstice(int year) {
-	return equinox(year, 18, 12, 270.);
-}
-
-long double KSSun::equinox(int year, int d, int m, double angle) {
-	long double jd0[5];
-	long double eclipticLongitude[5];
-	
-	for(int i = 0; i<5; ++i) {
-		jd0[i] = KStarsDateTime( ExtDate(year,m,d+i), QTime(0,0,0) ).djd();
-		KSNumbers *ksn = new KSNumbers(jd0[i]);
-		//FIXME this is the Earth position
-		findGeocentricPosition( ksn );
-		delete ksn;
-		eclipticLongitude[i] = (long double)ecLong()->Degrees();
-	}
-
-	return KSUtils::lagrangeInterpolation( eclipticLongitude, jd0, 5, angle );
-}
--- trunk/KDE/kdeedu/kstars/kstars/kssun.h #643493:643494
@@ -50,17 +50,7 @@
 	*/
 	virtual bool loadData();
 
-	long double springEquinox(int year);
 
-	long double summerSolstice(int year);
-
-	long double autumnEquinox(int year);
-
-	long double winterSolstice(int year);
-	
-	long double equinox(int year, int d, int m, double angle);
-
-
 protected:
 /**Determine geocentric RA, Dec coordinates for the Epoch given in the argument.
 	*@p Epoch current Julian Date
--- trunk/KDE/kdeedu/kstars/kstars/tools/astrocalc.cpp #643493:643494
@@ -34,7 +34,7 @@
 #include "modcalcplanets.h"
 #include "modcalceclipticcoords.h"
 #include "modcalcangdist.h"
-#include "modcalcequinox.h"
+#include "modcalcvizequinox.h"
 #include "modcalcvlsr.h"
 
 AstroCalc::AstroCalc( QWidget* parent ) :
--- trunk/KDE/kdeedu/kstars/kstars/tools/modcalcapcoord.cpp #643493:643494
@@ -89,6 +89,8 @@
     RACat->showInHours( o->ra0() );
     DecCat->showInDegrees( o->dec0() );
     EpochCat->setValue( 2000.0 );
+
+		slotCompute();
   }
 }
 


More information about the Kstars-devel mailing list