[Kstars-devel] KDE_3_2_BRANCH: kdeedu/kstars/kstars
Pablo de Vicente
p.devicente at wanadoo.es
Thu Apr 22 12:17:22 CEST 2004
CVS commit by pvicente:
These changes are necessary to fix a bug in the Solar system viewer which shows in wrong
position the planets, mainly the inner ones, since they are depicted according to their
ecliptic geocentric coordinates and not according to their heliocentric ones.
- Added a private member called HelEcPos which stores the Helicentric ecliptic coordinates
of the planets.
- Added six methods to retrieve and set the heliocentric ecliptic coordinates of the planets:
helEcLong() and helEcLat() return the Heliocentric ecliptic longitude and latitude
respectively referred to the mean equinox of the date. setHelEcLong() and setHelEcLat()
set the Heliocentric ecliptic longitude and latitude respectively and are overloaded to
accept a double or a dms.
The heliocentric ecliptic coordinates are set in KSPlanet class when calling the
findGeocentricPosition function.
This fix is for the BRANCH
CCMAIL: kstars-devel at kde.org
M +41 -4 ksplanetbase.h 1.18.2.1
--- kdeedu/kstars/kstars/ksplanetbase.h #1.18:1.18.2.1
@@ -91,10 +92,10 @@ public:
const dms* ecLat( void ) const { return &ep.latitude; };
-/**@short Set Ecliptic Longitude according to argument.
+/**@short Set Ecliptic Geocentric Longitude according to argument.
*@param elong Ecliptic Longitude
*/
void setEcLong( dms elong ) { ep.longitude = elong; }
-/**@short Set Ecliptic Longitude according to argument.
+/**@short Set Ecliptic Geocentric Longitude according to argument.
*Differs from above function only in argument type.
*@param elong Ecliptic Longitude
@@ -102,10 +103,10 @@ public:
void setEcLong( double elong ) { ep.longitude.setD( elong ); }
-/**@short Set Ecliptic Latitude according to argument.
+/**@short Set Ecliptic Geocentric Latitude according to argument.
*@param elat Ecliptic Latitude
*/
void setEcLat( dms elat ) { ep.latitude = elat; }
-/**@short Set Ecliptic Latitude according to argument.
+/**@short Set Ecliptic Geocentric Latitude according to argument.
*Differs from above function only in argument type.
*@param elat Ecliptic Latitude
@@ -113,4 +114,35 @@ public:
void setEcLat( double elat ) { ep.latitude.setD( elat ); }
+ /**@return pointer to Ecliptic Heliocentric Longitude coordinate
+ */
+ const dms* helEcLong( void ) const { return &helEcPos.longitude; };
+
+/**
+ *@return pointer to Ecliptic Heliocentric Latitude coordinate
+ */
+ const dms* helEcLat( void ) const { return &helEcPos.latitude; };
+
+/**@short Set Ecliptic Heliocentric Longitude according to argument.
+ *@param elong Ecliptic Longitude
+ */
+ void setHelEcLong( dms elong ) { helEcPos.longitude = elong; }
+
+/**@short Set Ecliptic Heliocentric Longitude according to argument.
+ *Differs from above function only in argument type.
+ *@param elong Ecliptic Longitude
+ */
+ void setHelEcLong( double elong ) { helEcPos.longitude.setD( elong ); }
+
+/**@short Set Ecliptic Heliocentric Latitude according to argument.
+ *@param elat Ecliptic Latitude
+ */
+ void setHelEcLat( dms elat ) { helEcPos.latitude = elat; }
+
+/**@short Set Ecliptic Heliocentric Latitude according to argument.
+ *Differs from above function only in argument type.
+ *@param elat Ecliptic Latitude
+ */
+ void setHelEcLat( double elat ) { helEcPos.latitude.setD( elat ); }
+
/**@short Load the planet's orbital data from disk.
*@return true if data successfully loaded
@@ -250,5 +282,10 @@ protected:
void findPA( const KSNumbers *num );
+ // Geocentric ecliptic position, but distance to the Sun
EclipticPosition ep;
+
+ // Heliocentric ecliptic position referred to the equinox of the epoch
+ // as obtained from VSOP.
+ EclipticPosition helEcPos;
QPtrList<SkyPoint> Trail;
double Rearth;
More information about the Kstars-devel
mailing list