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

Pablo de Vicente p.devicente at wanadoo.es
Thu Jan 13 19:04:36 CET 2005


CVS commit by pvicente: 

Localized version of the planet viewer tool. The previous commit contained code for an 
additional feature which I have not completed. Reverting back and suppressing that 
piece of code. 
CCMAIL:kstars-devel at kde.org


  M +4 -13     planetviewer.cpp   1.20


--- kdeedu/kstars/kstars/tools/planetviewer.cpp  #1.19:1.20
@@ -46,6 +46,4 @@ PlanetViewer::PlanetViewer(QWidget *pare
         pw->timeStep->tsbox()->setMinValue( 21 );
         pw->timeStep->tsbox()->setValue( 21 );
-        pw->inclinationSpinBox->setValue(0);
-        setInclination(0);
         pw->RunButton->setPixmap( KGlobal::iconLoader()->loadIcon( "1rightarrow", KIcon::Toolbar ) );
         pw->dateBox->setDate( ExtDate::currentDate() );
@@ -89,5 +87,4 @@ PlanetViewer::PlanetViewer(QWidget *pare
         connect( &tmr, SIGNAL( timeout() ), SLOT( tick() ) );
         connect( pw->timeStep, SIGNAL( scaleChanged(float) ), SLOT( setTimeScale(float) ) );
-        connect( pw->inclinationSpinBox, SIGNAL( valueChanged(int) ), SLOT( setInclination(int) ) );
         connect( pw->RunButton, SIGNAL( clicked() ), SLOT( slotRunClock() ) );
         connect( pw->dateBox, SIGNAL( valueChanged( const ExtDate & ) ), SLOT( slotChangeDate( const ExtDate & ) ) );
@@ -110,10 +107,4 @@ void PlanetViewer::setTimeScale(float f)
 }
 
-void PlanetViewer::setInclination(int incl) {
-        dms inclination = dms(incl);
-        double sinInclination;
-        inclination.SinCos(sinInclination,cosInclination);
-}
-
 void PlanetViewer::slotRunClock() {
         isClockRunning = !isClockRunning;
@@ -152,5 +143,5 @@ void PlanetViewer::updatePlanets() {
                         p->helEcLong()->SinCos( s, c );
                         planet[i]->point(0)->setX( p->rsun()*c );
-                        planet[i]->point(0)->setY( p->rsun()*s*cosInclination );
+                        planet[i]->point(0)->setY( p->rsun()*s );
                         planetLabel[i]->point(0)->setX( p->rsun()*c );
                         planetLabel[i]->point(0)->setY( p->rsun()*s );
@@ -208,5 +199,5 @@ void PlanetViewer::initPlotObjects() {
                         while ( !orbitStream.eof() ) {
                                 orbitStream >> x >> y >> z;
-                                orbit[i]->addPoint( new DPoint( x, y*cosInclination ) );
+                                orbit[i]->addPoint( new DPoint( x, y ) );
                         }
                 }
@@ -223,6 +214,6 @@ void PlanetViewer::initPlotObjects() {
                 p->helEcLong()->SinCos( s, c );
                 
-                planet[i]->addPoint( new DPoint( p->rsun()*c, p->rsun()*s*cosInclination ) );
-                planetLabel[i]->addPoint( new DPoint( p->rsun()*c, p->rsun()*s*cosInclination ) );
+                planet[i]->addPoint( new DPoint( p->rsun()*c, p->rsun()*s ) );
+                planetLabel[i]->addPoint( new DPoint( p->rsun()*c, p->rsun()*s ) );
                 pw->map->addObject( planet[i] );
                 pw->map->addObject( planetLabel[i] );




More information about the Kstars-devel mailing list