Commit a5cb86c8 authored by Jasem Mutlaq's avatar Jasem Mutlaq

BUGS:327474

REVIEW:113409

Merge branch 'KDE/4.12'
parents c4b7bbf1 b2a51420
......@@ -221,6 +221,14 @@ bool KSComet::findGeocentricPosition( const KSNumbers *num, const KSPlanetBase *
double yh = r * ( sinN * cosvw + cosN * sinvw * cosi );
double zh = r * ( sinvw * sini );
//the spherical ecliptic coordinates:
double ELongRad = atan2( yh, xh );
double ELatRad = atan2( zh, r );
helEcPos.longitude.setRadians( ELongRad );
helEcPos.latitude.setRadians( ELatRad );
setRsun( r );
//xe, ye, ze are the Earth's heliocentric cartesian coords
double cosBe, sinBe, cosLe, sinLe;
Earth->ecLong().SinCos( sinLe, cosLe );
......@@ -236,13 +244,12 @@ bool KSComet::findGeocentricPosition( const KSNumbers *num, const KSPlanetBase *
zh -= ze;
//Finally, the spherical ecliptic coordinates:
double ELongRad = atan2( yh, xh );
ELongRad = atan2( yh, xh );
double rr = sqrt( xh*xh + yh*yh );
double ELatRad = atan2( zh, rr );
ELatRad = atan2( zh, rr );
ep.longitude.setRadians( ELongRad );
ep.latitude.setRadians( ELatRad );
setRsun( r );
setRearth( Earth );
EclipticToEquatorial( num->obliquity() );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment