[Kstars-devel] kdeedu/kstars/kstars
Pablo de Vicente
p.devicente at wanadoo.es
Wed Apr 21 23:34:17 CEST 2004
CVS commit by pvicente:
These changes are necessary to fix a bug in the Solar system view 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.
Function findGeocentricPosition() stores now the heliocentric ecliptic coordinates taking
profit of the new defined private member in KSPlanetBase
CCMAIL: kstars-devel at kde.org
M +9 -0 ksplanet.cpp 1.22
--- kdeedu/kstars/kstars/ksplanet.cpp #1.21:1.22
@@ -240,6 +240,14 @@ bool KSPlanet::findGeocentricPosition( c
double eZ = Earth->rsun()*sinB0;
+ bool once=true;
while (fabs(dst - olddst) > .001) {
calcEcliptic(jm, trialpos);
+
+ // We store the heliocentric ecliptic coordinates the first time they are computed.
+ if(once){
+ helEcPos = trialpos;
+ once=false;
+ }
+
olddst = dst;
@@ -274,4 +282,5 @@ bool KSPlanet::findGeocentricPosition( c
calcEcliptic(num->julianMillenia(), ep);
+ helEcPos = ep;
}
More information about the Kstars-devel
mailing list