[Kstars-devel] KDE/kdeedu/kstars/kstars/skyobjects
Alexey Khudyakov
alexey.skladnoy at gmail.com
Mon Mar 7 10:59:30 CET 2011
SVN commit 1224034 by khudyakov:
Remove quaternion from sky point.
CCMAIL: kstars-devel at kde.org
M +0 -9 skypoint.cpp
M +7 -16 skypoint.h
--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/skypoint.cpp #1224033:1224034
@@ -49,18 +49,11 @@
Dec0.setD( d );
RA.setH( r );
Dec.setD( d );
- //Quaternion
- syncQuaternion();
}
SkyPoint::~SkyPoint(){
}
-//Quaternion
-void SkyPoint::syncQuaternion() {
- m_q = Quaternion( RA.radians(), Dec.radians() );
-}
-
void SkyPoint::EquatorialToHorizontal( const dms *LST, const dms *lat ) {
//Uncomment for spherical trig version
double AltRad, AzRad;
@@ -141,8 +134,6 @@
RA.setRadians( LST->radians() - HARad );
RA.setD( RA.reduce().Degrees() ); // 0 <= RA < 24
-
- syncQuaternion();
}
void SkyPoint::findEcliptic( const dms *Obliquity, dms &EcLong, dms &EcLat ) {
--- trunk/KDE/kdeedu/kstars/kstars/skyobjects/skypoint.h #1224033:1224034
@@ -24,7 +24,6 @@
#include <QList>
#include "dms.h"
-#include "quaternion.h"
#include "kstarsdatetime.h"
class KSNumbers;
@@ -58,10 +57,9 @@
SkyPoint( const dms& r, const dms& d ) :
RA0(r), Dec0(d),
RA(r), Dec(d)
- {
- syncQuaternion();
- }
+ {}
+
/**Alternate constructor using double arguments, for convenience.
*It behaves essentially like the default constructor.
*@param r Right Ascension, expressed as a double
@@ -70,9 +68,7 @@
//FIXME: this (*15.0) thing is somewhat hacky.
explicit SkyPoint( double r, double d ) :
RA0(r*15.0), Dec0(d), RA(r*15.0), Dec(d)
- {
- syncQuaternion();
- }
+ {}
/**
*@short Default constructor. Sets nonsense values for RA, Dec etc
@@ -127,24 +123,24 @@
/**Sets RA, the current Right Ascension.
*@param r Right Ascension.
*/
- inline void setRA( dms r ) { RA = r; syncQuaternion(); }
+ inline void setRA( dms r ) { RA = r; }
/**Overloaded member function, provided for convenience.
*It behaves essentially like the above function.
*@param r Right Ascension, expressed as a double.
*/
- inline void setRA( double r ) { RA.setH( r ); syncQuaternion(); }
+ inline void setRA( double r ) { RA.setH( r ); }
/**Sets Dec, the current Declination
*@param d Declination.
*/
- inline void setDec( dms d ) { Dec = d; syncQuaternion(); }
+ inline void setDec( dms d ) { Dec = d; }
/**Overloaded member function, provided for convenience.
*It behaves essentially like the above function.
*@param d Declination, expressed as a double.
*/
- inline void setDec( double d ) { Dec.setD( d ); syncQuaternion(); }
+ inline void setDec( double d ) { Dec.setD( d ); }
/**Sets Alt, the Altitude.
*@param alt Altitude.
@@ -217,10 +213,6 @@
* correction should be aplied */
dms altRefracted() const;
- //XYZ
- inline const Quaternion& quat() const { return m_q; }
- void syncQuaternion();
-
////
//// 3. Coordinate conversions.
//// ==========================
@@ -509,7 +501,6 @@
mutable dms RA0, Dec0; //catalog coordinates
dms RA, Dec; //current true sky coordinates
dms Alt, Az;
- Quaternion m_q; //quaternion representation of the point
};
#endif
More information about the Kstars-devel
mailing list