Planet.cpp   Planet.cpp 
skipping to change at line 50 skipping to change at line 50
#include <iomanip> #include <iomanip>
#include <limits> #include <limits>
#include <QTextStream> #include <QTextStream>
#include <QString> #include <QString>
#include <QDebug> #include <QDebug>
#include <QVarLengthArray> #include <QVarLengthArray>
#include <QOpenGLContext> #include <QOpenGLContext>
#include <QOpenGLShader> #include <QOpenGLShader>
Vec3f Planet::labelColor = Vec3f(0.4,0.4,0.8); Vec3f Planet::labelColor = Vec3f(0.4f,0.4f,0.8f);
Vec3f Planet::orbitColor = Vec3f(1,0.6,1); Vec3f Planet::orbitColor = Vec3f(1.0f,0.6f,1.0f);
StelTextureSP Planet::hintCircleTex; StelTextureSP Planet::hintCircleTex;
StelTextureSP Planet::texEarthShadow; StelTextureSP Planet::texEarthShadow;
bool Planet::permanentDrawingOrbits = false; bool Planet::permanentDrawingOrbits = false;
bool Planet::flagCustomGrsSettings = false;
double Planet::customGrsJD = 2456901.5;
double Planet::customGrsDrift = 15.;
int Planet::customGrsLongitude = 216;
QOpenGLShaderProgram* Planet::planetShaderProgram=NULL; QOpenGLShaderProgram* Planet::planetShaderProgram=NULL;
Planet::PlanetShaderVars Planet::planetShaderVars; Planet::PlanetShaderVars Planet::planetShaderVars;
QOpenGLShaderProgram* Planet::ringPlanetShaderProgram=NULL; QOpenGLShaderProgram* Planet::ringPlanetShaderProgram=NULL;
Planet::RingPlanetShaderVars Planet::ringPlanetShaderVars; Planet::RingPlanetShaderVars Planet::ringPlanetShaderVars;
QOpenGLShaderProgram* Planet::moonShaderProgram=NULL; QOpenGLShaderProgram* Planet::moonShaderProgram=NULL;
Planet::MoonShaderVars Planet::moonShaderVars; Planet::MoonShaderVars Planet::moonShaderVars;
QMap<Planet::PlanetType, QString> Planet::pTypeMap; QMap<Planet::PlanetType, QString> Planet::pTypeMap;
QMap<Planet::ApparentMagnitudeAlgorithm, QString> Planet::vMagAlgorithmMap; QMap<Planet::ApparentMagnitudeAlgorithm, QString> Planet::vMagAlgorithmMap;
skipping to change at line 206 skipping to change at line 211
} }
// Return the information string "ready to print" :) // Return the information string "ready to print" :)
QString Planet::getInfoString(const StelCore* core, const InfoStringGroup& flags) const QString Planet::getInfoString(const StelCore* core, const InfoStringGroup& flags) const
{ {
QString str; QString str;
QTextStream oss(&str); QTextStream oss(&str);
double az_app, alt_app; double az_app, alt_app;
StelUtils::rectToSphe(&az_app,&alt_app,getAltAzPosApparent(core)); StelUtils::rectToSphe(&az_app,&alt_app,getAltAzPosApparent(core));
bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDe grees(); bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDe grees();
double distanceAu = getJ2000EquatorialPos(core).length();
Q_UNUSED(az_app); Q_UNUSED(az_app);
if (flags&Name) if (flags&Name)
{ {
oss << "<h2>" << getNameI18n(); // UI translation can diffe r from sky translation oss << "<h2>" << getNameI18n(); // UI translation can diffe r from sky translation
oss.setRealNumberNotation(QTextStream::FixedNotation); oss.setRealNumberNotation(QTextStream::FixedNotation);
oss.setRealNumberPrecision(1); oss.setRealNumberPrecision(1);
if (sphereScale != 1.f) if (sphereScale != 1.f)
oss << QString::fromUtf8(" (\xC3\x97") << sphereScal e << ")"; oss << QString::fromUtf8(" (\xC3\x97") << sphereScal e << ")";
oss << "</h2>"; oss << "</h2>";
} }
if (flags&ObjectType && getPlanetType()!=isUNDEFINED) if (flags&ObjectType && getPlanetType()!=isUNDEFINED)
{ {
oss << q_("Type: <b>%1</b>").arg(q_(getPlanetTypeString())) << "<br />"; oss << q_("Type: <b>%1</b>").arg(q_(getPlanetTypeString())) << "<br />";
} }
if (flags&Magnitude && getVMagnitude(core)!=std::numeric_limits<floa t>::infinity()) if (flags&Magnitude && getVMagnitude(core)!=std::numeric_limits<floa t>::infinity())
{ {
if (core->getSkyDrawer()->getFlagHasAtmosphere() && (alt_app >-3.0*M_PI/180.0)) // Don't show extincted magnitude much below horizon whe re model is meaningless. if (core->getSkyDrawer()->getFlagHasAtmosphere() && (alt_app >-3.0*M_PI/180.0)) // Don't show extincted magnitude much below horizon whe re model is meaningless.
oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2 </b>)").arg(QString::number(getVMagnitude(core), 'f', 2), oss << q_("Magnitude: <b>%1</b> (after extinction: < b>%2</b>)").arg(QString::number(getVMagnitude(core), 'f', 2),
QString::number(getVMagnitudeWithExtinction(core), 'f', 2)) << "<br>"; QString::number(getVMagnitudeWithExtinction(core), 'f', 2)) << "<br>";
else else
oss << q_("Magnitude: <b>%1</b>").arg(getVMagnitude( core), 0, 'f', 2) << "<br>"; oss << q_("Magnitude: <b>%1</b>").arg(getVMagnitude( core), 0, 'f', 2) << "<br>";
} }
if (flags&AbsoluteMagnitude && getVMagnitude(core)!=std::numeric_lim its<float>::infinity()) if (flags&AbsoluteMagnitude && getVMagnitude(core)!=std::numeric_lim its<float>::infinity())
oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core)- 5.*(std::log10(getJ2000EquatorialPos(core).length()*AU/PARSEC)-1.), 0, 'f', 2) << "<br>"; oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core)- 5.*(std::log10(distanceAu*AU/PARSEC)-1.), 0, 'f', 2) << "<br>";
oss << getPositionInfoString(core, flags); oss << getPositionInfoString(core, flags);
// GZ This is mostly for debugging. Maybe also useful for letting pe ople use our results to cross-check theirs, but we should not act as refere nce, currently... // GZ This is mostly for debugging. Maybe also useful for letting pe ople use our results to cross-check theirs, but we should not act as refere nce, currently...
// TODO: maybe separate this out into: // TODO: maybe separate this out into:
//if (flags&EclipticCoordXYZ) //if (flags&EclipticCoordXYZ)
// For now: add to EclipticCoord // For now: add to EclipticCoord
//if (flags&EclipticCoord) //if (flags&EclipticCoord)
// oss << q_("Ecliptical XYZ (VSOP87A): %1/%2/%3").arg(QString: :number(eclipticPos[0], 'f', 3), QString::number(eclipticPos[1], 'f', 3), Q String::number(eclipticPos[2], 'f', 3)) << "<br>"; // oss << q_("Ecliptical XYZ (VSOP87A): %1/%2/%3").arg(QString: :number(eclipticPos[0], 'f', 3), QString::number(eclipticPos[1], 'f', 3), Q String::number(eclipticPos[2], 'f', 3)) << "<br>";
if (flags&Distance) if (flags&Distance)
{ {
double distanceAu = getJ2000EquatorialPos(core).length(); double hdistanceAu = getHeliocentricEclipticPos().length();
double hdistanceKm = AU * hdistanceAu;
if (englishName!="Sun")
{
if (hdistanceAu < 0.1)
{
// xgettext:no-c-format
oss << QString(q_("Distance from Sun: %1AU (
%2 km)"))
.arg(hdistanceAu, 0, 'f', 6)
.arg(hdistanceKm, 0, 'f', 3);
}
else
{
// xgettext:no-c-format
oss << QString(q_("Distance from Sun: %1AU (
%2 Mio km)"))
.arg(hdistanceAu, 0, 'f', 3)
.arg(hdistanceKm / 1.0e6, 0, 'f', 3);
}
oss << "<br>";
}
double distanceKm = AU * distanceAu; double distanceKm = AU * distanceAu;
if (distanceAu < 0.1) if (distanceAu < 0.1)
{ {
// xgettext:no-c-format // xgettext:no-c-format
oss << QString(q_("Distance: %1AU (%2 km)")) oss << QString(q_("Distance: %1AU (%2 km)"))
.arg(distanceAu, 0, 'f', 6) .arg(distanceAu, 0, 'f', 6)
.arg(distanceKm, 0, 'f', 3); .arg(distanceKm, 0, 'f', 3);
} }
else else
{ {
skipping to change at line 485 skipping to change at line 510
if (this==sun || (parent.data()==sun && satellites.empty())) if (this==sun || (parent.data()==sun && satellites.empty()))
return res; return res;
foreach (const PlanetP& planet, satellites) foreach (const PlanetP& planet, satellites)
{ {
if (willCastShadow(this, planet.data())) if (willCastShadow(this, planet.data()))
res.append(planet.data()); res.append(planet.data());
} }
if (willCastShadow(this, parent.data())) if (willCastShadow(this, parent.data()))
res.append(parent.data()); res.append(parent.data());
// Test satellites mutual occultations.
if (parent.data() != sun) {
foreach (const PlanetP& planet, parent.data()->satellites)
{
//skip self-shadowing
if(planet.data() == this )
continue;
if (willCastShadow(this, planet.data()))
res.append(planet.data());
}
}
return res; return res;
} }
void Planet::computePosition(const double dateJDE) void Planet::computePosition(const double dateJDE)
{ {
// Make sure the parent position is computed for the dateJDE, otherw ise // Make sure the parent position is computed for the dateJDE, otherw ise
// getHeliocentricPos() would return incorrect values. // getHeliocentricPos() would return incorrect values.
if (parent) if (parent)
parent->computePositionWithoutOrbits(dateJDE); parent->computePositionWithoutOrbits(dateJDE);
skipping to change at line 521 skipping to change at line 557
} }
double new_date = lastOrbitJDE + delta_points*deltaOrbitJDE; double new_date = lastOrbitJDE + delta_points*deltaOrbitJDE;
// qDebug( "Updating orbit coordinates for %s (delta %f) (%d points)\n", getEnglishName().toUtf8().data(), deltaOrbitJDE, delta_points) ; // qDebug( "Updating orbit coordinates for %s (delta %f) (%d points)\n", getEnglishName().toUtf8().data(), deltaOrbitJDE, delta_points) ;
if( delta_points > 0 && delta_points < ORBIT_SEGMENTS && orb itCached) if( delta_points > 0 && delta_points < ORBIT_SEGMENTS && orb itCached)
{ {
for( int d=0; d<ORBIT_SEGMENTS; d++ ) for( int d=0; d<ORBIT_SEGMENTS; d++ )
{ {
if(d + delta_points >= ORBIT_SEGMENTS ) if(d + delta_points >= ORBIT_SEGMENTS-1 )
{ {
// calculate new points // calculate new points
calc_date = new_date + (d-ORBIT_SEGM ENTS/2)*deltaOrbitJDE; calc_date = new_date + (d-ORBIT_SEGM ENTS/2)*deltaOrbitJDE;
// date increments between points wi ll not be completely constant though // date increments between points wi ll not be completely constant though
computeTransMatrix(calc_date-core->c omputeDeltaT(calc_date)/86400.0, calc_date); computeTransMatrix(calc_date-core->c omputeDeltaT(calc_date)/86400.0, calc_date);
if (osculatingFunc) if (osculatingFunc)
{ {
(*osculatingFunc)(dateJDE,ca lc_date,eclipticPos); (*osculatingFunc)(dateJDE,ca lc_date,eclipticPos);
} }
skipping to change at line 613 skipping to change at line 649
// calculate actual Planet position // calculate actual Planet position
coordFunc(dateJDE, eclipticPos, userDataPtr); coordFunc(dateJDE, eclipticPos, userDataPtr);
lastJDE = dateJDE; lastJDE = dateJDE;
} }
else if (fabs(lastJDE-dateJDE)>deltaJDE) else if (fabs(lastJDE-dateJDE)>deltaJDE)
{ {
// calculate actual Planet position // calculate actual Planet position
coordFunc(dateJDE, eclipticPos, userDataPtr); coordFunc(dateJDE, eclipticPos, userDataPtr);
// XXX: do we need to do that even when the orbit is not vis if (orbitFader.getInterstate()>0.000001)
ible? for( int d=0; d<ORBIT_SEGMENTS; d++ )
for( int d=0; d<ORBIT_SEGMENTS; d++ ) orbit[d]=getHeliocentricPos(orbitP[d]);
orbit[d]=getHeliocentricPos(orbitP[d]);
lastJDE = dateJDE; lastJDE = dateJDE;
} }
} }
// Compute the transformation matrix from the local Planet coordinate syste m to the parent Planet coordinate system. // Compute the transformation matrix from the local Planet coordinate syste m to the parent Planet coordinate system.
// In case of the planets, this makes the axis point to their respective ce lestial poles. // In case of the planets, this makes the axis point to their respective ce lestial poles.
// TODO: Verify for the other planets if their axes are relative to J2000 e cliptic (VSOP87A XY plane) or relative to (precessed) ecliptic of date? // TODO: Verify for the other planets if their axes are relative to J2000 e cliptic (VSOP87A XY plane) or relative to (precessed) ecliptic of date?
void Planet::computeTransMatrix(double JD, double JDE) void Planet::computeTransMatrix(double JD, double JDE)
{ {
skipping to change at line 710 skipping to change at line 746
double rotations = 1.f; // NOTE: Maybe 1e-3 will be better? double rotations = 1.f; // NOTE: Maybe 1e-3 will be better?
if (re.period!=0.) // OK, it's not a moon with chaotic period of rot ation :) if (re.period!=0.) // OK, it's not a moon with chaotic period of rot ation :)
{ {
rotations = t / (double) re.period; rotations = t / (double) re.period;
} }
double wholeRotations = floor(rotations); double wholeRotations = floor(rotations);
double remainder = rotations - wholeRotations; double remainder = rotations - wholeRotations;
if (englishName=="Jupiter") if (englishName=="Jupiter")
{ {
if( re.offset >= 0.0 ) // http://www.projectpluto.com/grs_form.htm
{ // CM( System II) = 181.62 + 870.1869147 * jd + correction
// use semi-empirical coefficient for GRS drift [870d rotation every day]
// qDebug() << "Jupiter: offset = " << re.offset << const double rad = M_PI/180.;
" --> rotation = " << (remainder * 360. + re.offset - 0.2483 * qAbs(jd - 24 double jup_mean = (JDE - 2455636.938) * 360. / 4332.89709;
56172)); double eqn_center = 5.55 * sin( rad*jup_mean);
return remainder * 360. + re.offset - 0.2483 * qAbs( double angle = (JDE - 2451870.628) * 360. / 398.884 - eqn_ce
JDE - 2456172); nter;
} //double correction = 11 * sin( rad*angle) + 5 * cos( rad*an
gle)- 1.25 * cos( rad*jup_mean) - eqn_center; // original correction
double correction = 25.8 + 11 * sin( rad*angle) - 2.5 * cos(
rad*jup_mean) - eqn_center; // light speed correction not used because in
stellarium the jd is manipulated for that
double cm2=181.62 + 870.1869147 * JDE + correction; // Centr
al Meridian II
cm2=cm2 - 360.0*(int)(cm2/360.);
// http://www.skyandtelescope.com/observing/transit-times-of
-jupiters-great-red-spot/ writes:
// The predictions assume the Red Spot was at Jovian System
II longitude 216° in September 2014 and continues to drift 1.25° per month,
based on historical trends noted by JUPOS.
// GRS longitude was at 2014-09-08 216d with a drift of 1.25
d every month
double longitudeGRS = 0.;
if (flagCustomGrsSettings)
longitudeGRS = customGrsLongitude + customGrsDrift*(
JDE - customGrsJD)/365.25;
else else
{ longitudeGRS=216+1.25*( JDE - 2456908)/30;
// http://www.projectpluto.com/grs_form.htm // qDebug() << "Jupiter: CM2 = " << cm2 << " longitudeGRS =
// CM( System II) = 181.62 + 870.1869147 * jd + cor " << longitudeGRS << " --> rotation = " << (cm2 - longitudeGRS);
rection [870d rotation every day] return cm2 - longitudeGRS + 50.; // Jupiter Texture not 0d
const double rad = M_PI/180.; // To verify:
double jup_mean = (JDE - 2455636.938) * 360. / 4332. // GRS at 2015-02-26 23:07 UT on picture at https://maximusp
89709; hotography.files.wordpress.com/2015/03/jupiter-febr-26-2015.jpg
double eqn_center = 5.55 * sin( rad*jup_mean); // 2014-02-25 19:03 UT http://www.damianpeach.com/
double angle = (JDE - 2451870.628) * 360. / 398.884 jup1314/2014_02_25rgb0305.jpg
- eqn_center; // 2013-05-01 10:29 UT http://astro.christone.net/
//double correction = 11 * sin( rad*angle) + 5 * cos jupiter/jupiter2012/jupiter20130501.jpg
( rad*angle)- 1.25 * cos( rad*jup_mean) - eqn_center; // original correctio // 2012-10-26 00:12 UT at http://www.lunar-captures.c
n om//jupiter2012_files/121026_JupiterGRS_Tar.jpg
double correction = 25.8 + 11 * sin( rad*angle) - 2. // 2011-08-28 02:29 UT at http://www.damianpeach.com/
5 * cos( rad*jup_mean) - eqn_center; // light speed correction not used bec jup1112/2011_08_28rgb.jpg
ause in stellarium the jd is manipulated for that // stellarium 2h too early: 2010-09-21 23:37 UT http://www.d
double cm2=181.62 + 870.1869147 * JDE + correction; igitalsky.org.uk/Jupiter/2010-09-21_23-37-30_R-G-B_800.jpg
// Central Meridian II
cm2=cm2 - 360.0*(int)(cm2/360.);
// http://www.skyandtelescope.com/observing/transit-
times-of-jupiters-great-red-spot/ writes:
// The predictions assume the Red Spot was at Jovian
System II longitude 216° in September 2014 and continues to drift 1.25° pe
r month, based on historical trends noted by JUPOS.
// GRS longitude was at 2014-09-08 216d with a drift
of 1.25d every month
double longitudeGRS=216+1.25*( JDE - 2456908)/30;
// qDebug() << "Jupiter: CM2 = " << cm2 << " longitu
deGRS = " << longitudeGRS << " --> rotation = " << (cm2 - longitudeGRS);
return cm2 - longitudeGRS + 25.; // + 25 = Jupiter T
exture not 0d
// To verify:
// GRS at 2015-02-26 23:07 UT on picture at https://
maximusphotography.files.wordpress.com/2015/03/jupiter-febr-26-2015.jpg
// 2014-02-25 19:03 UT http://www.damianpe
ach.com/jup1314/2014_02_25rgb0305.jpg
// 2013-05-01 10:29 UT http://astro.christ
one.net/jupiter/jupiter2012/jupiter20130501.jpg
// 2012-10-26 00:12 UT at http://www.lunar-ca
ptures.com//jupiter2012_files/121026_JupiterGRS_Tar.jpg
// 2011-08-28 02:29 UT at http://www.damianpe
ach.com/jup1112/2011_08_28rgb.jpg
// stellarium 2h too early: 2010-09-21 23:37 UT http
://www.digitalsky.org.uk/Jupiter/2010-09-21_23-37-30_R-G-B_800.jpg
}
} }
else else
return remainder * 360. + re.offset; return remainder * 360. + re.offset;
} }
double Planet::getMeanSolarDay() const double Planet::getMeanSolarDay() const
{ {
double msd = 0.; double msd = 0.;
if (englishName=="Sun") if (englishName=="Sun")
skipping to change at line 779 skipping to change at line 810
return msd; return msd;
} }
// Get the Planet position in the parent Planet ecliptic coordinate in AU // Get the Planet position in the parent Planet ecliptic coordinate in AU
Vec3d Planet::getEclipticPos() const Vec3d Planet::getEclipticPos() const
{ {
return eclipticPos; return eclipticPos;
} }
// Return the heliocentric ecliptical position (Vsop87)
Vec3d Planet::getHeliocentricEclipticPos() const
{
Vec3d pos = eclipticPos;
PlanetP pp = parent;
if (pp)
{
while (pp->parent)
{
pos += pp->eclipticPos;
pp = pp->parent;
}
}
return pos;
}
// Return heliocentric coordinate of p // Return heliocentric coordinate of p
Vec3d Planet::getHeliocentricPos(Vec3d p) const Vec3d Planet::getHeliocentricPos(Vec3d p) const
{ {
// Note: using shared copies is too slow here. So we use direct acc ess // Note: using shared copies is too slow here. So we use direct acc ess
// instead. // instead.
Vec3d pos = p; Vec3d pos = p;
const Planet* pp = parent.data(); const Planet* pp = parent.data();
if (pp) if (pp)
{ {
while (pp->parent.data()) while (pp->parent.data())
skipping to change at line 1145 skipping to change at line 1160
if (rings) if (rings)
{ {
draw3dModel(core, transfo, 1024, true); draw3dModel(core, transfo, 1024, true);
} }
return; return;
} }
// Compute the 2D position and check if in the screen // Compute the 2D position and check if in the screen
const StelProjectorP prj = core->getProjection(transfo); const StelProjectorP prj = core->getProjection(transfo);
float screenSz = getAngularSize(core)*M_PI/180.*prj->getPixelPerRadA tCenter(); float screenSz = getAngularSize(core)*M_PI/180.*prj->getPixelPerRadA tCenter();
float viewportBufferSz=screenSz;
// enlarge if this is sun with its huge halo.
if (englishName=="Sun")
viewportBufferSz+=125.f;
float viewport_left = prj->getViewportPosX(); float viewport_left = prj->getViewportPosX();
float viewport_bottom = prj->getViewportPosY(); float viewport_bottom = prj->getViewportPosY();
if ((prj->project(Vec3d(0), screenPos) if ((prj->project(Vec3d(0), screenPos)
&& screenPos[1]>viewport_bottom - screenSz && screenPos[1] < vi && screenPos[1]>viewport_bottom - viewportBufferSz && screenPos
ewport_bottom + prj->getViewportHeight()+screenSz [1] < viewport_bottom + prj->getViewportHeight()+viewportBufferSz
&& screenPos[0]>viewport_left - screenSz && screenPos[0] < view && screenPos[0]>viewport_left - viewportBufferSz && screenPos[0
port_left + prj->getViewportWidth() + screenSz) ] < viewport_left + prj->getViewportWidth() + viewportBufferSz)
|| permanentDrawingOrbits) || permanentDrawingOrbits)
{ {
// Draw the name, and the circle if it's not too close from the body it's turning around // Draw the name, and the circle if it's not too close from the body it's turning around
// this prevents name overlapping (e.g. for Jupiter's satell ites) // this prevents name overlapping (e.g. for Jupiter's satell ites)
float ang_dist = 300.f*atan(getEclipticPos().length()/getEqu inoxEquatorialPos(core).length())/core->getMovementMgr()->getCurrentFov(); float ang_dist = 300.f*atan(getEclipticPos().length()/getEqu inoxEquatorialPos(core).length())/core->getMovementMgr()->getCurrentFov();
if (ang_dist==0.f) if (ang_dist==0.f)
ang_dist = 1.f; // if ang_dist == 0, the Planet is s un.. ang_dist = 1.f; // if ang_dist == 0, the Planet is s un..
// by putting here, only draw orbit if Planet is visible for clarity // by putting here, only draw orbit if Planet is visible for clarity
drawOrbit(core); // TODO - fade in here also... drawOrbit(core); // TODO - fade in here also...
skipping to change at line 1547 skipping to change at line 1566
else else
{ {
// Normal planet // Normal planet
drawSphere(sPainter, screenSz); drawSphere(sPainter, screenSz);
} }
delete sPainter; delete sPainter;
sPainter=NULL; sPainter=NULL;
} }
bool allowDrawHalo = true; bool allowDrawHalo = true;
if (this!=ssm->getSun()) if ((this!=ssm->getSun()) && ((this !=ssm->getMoon() && core->getCur rentLocation().planetName=="Earth" )))
{ {
// Let's hide halo when inner planet between Sun and observe // Let's hide halo when inner planet between Sun and observe
r (or moon between planet and observer) r (or moon between planet and observer).
// Do not hide Earth's moon's halo below ~-45degrees when ob
serving from earth.
Vec3d obj = getJ2000EquatorialPos(core); Vec3d obj = getJ2000EquatorialPos(core);
Vec3d par = getParent()->getJ2000EquatorialPos(core); Vec3d par = getParent()->getJ2000EquatorialPos(core);
double angle = obj.angle(par)*180.f/M_PI; double angle = obj.angle(par)*180.f/M_PI;
double asize = getParent()->getSpheroidAngularSize(core); double asize = getParent()->getSpheroidAngularSize(core);
if (angle<=asize) if (angle<=asize)
allowDrawHalo = false; allowDrawHalo = false;
} }
// Draw the halo if it enabled in the ssystem.ini file (+ special ca se for backward compatible for the Sun) // Draw the halo if it enabled in the ssystem.ini file (+ special ca se for backward compatible for the Sun)
if ((hasHalo() || this==ssm->getSun()) && allowDrawHalo) if ((hasHalo() || this==ssm->getSun()) && allowDrawHalo)
 End of changes. 16 change blocks. 
87 lines changed or deleted 104 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/