MinorPlanet.cpp   MinorPlanet.cpp 
skipping to change at line 193 skipping to change at line 193
QTextStream oss(&str); QTextStream oss(&str);
if (flags&Name) if (flags&Name)
{ {
oss << "<h2>"; oss << "<h2>";
if (minorPlanetNumber) if (minorPlanetNumber)
oss << QString("(%1) ").arg(minorPlanetNumber); oss << QString("(%1) ").arg(minorPlanetNumber);
if (nameIsProvisionalDesignation) if (nameIsProvisionalDesignation)
oss << provisionalDesignationHtml; oss << provisionalDesignationHtml;
else else
oss << q_(properName); // UI translation can differ from sky translation oss << getNameI18n(); // UI translation can differ 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 (!nameIsProvisionalDesignation && !provisionalDesignation Html.isEmpty()) if (!nameIsProvisionalDesignation && !provisionalDesignation Html.isEmpty())
{ {
oss << QString(q_("Provisional designation: %1")).ar g(provisionalDesignationHtml); oss << QString(q_("Provisional designation: %1")).ar g(provisionalDesignationHtml);
oss << "<br>"; oss << "<br>";
} }
} }
if (flags&ObjectType) 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) if (flags&Magnitude)
{ {
if (core->getSkyDrawer()->getFlagHasAtmosphere()) if (core->getSkyDrawer()->getFlagHasAtmosphere())
oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2</b>)"). arg(QString::number(getVMagnitude(core), 'f', 2), oss << q_("Magnitude: <b>%1</b> (extincted to: <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
skipping to change at line 296 skipping to change at line 296
{ {
//If the H-G system is not used, use the default radius/albedo mecha nism //If the H-G system is not used, use the default radius/albedo mecha nism
if (slopeParameter < 0) if (slopeParameter < 0)
{ {
return Planet::getVMagnitude(core); return Planet::getVMagnitude(core);
} }
//Calculate phase angle //Calculate phase angle
//(Code copied from Planet::getVMagnitude()) //(Code copied from Planet::getVMagnitude())
//(this is actually vector subtraction + the cosine theorem :)) //(this is actually vector subtraction + the cosine theorem :))
// GZ Try now in float... speed difference is negligible, though.
const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipti cPos(); const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipti cPos();
const float observerRq = observerHelioPos.lengthSquared(); const float observerRq = observerHelioPos.lengthSquared();
const Vec3d& planetHelioPos = getHeliocentricEclipticPos(); const Vec3d& planetHelioPos = getHeliocentricEclipticPos();
const float planetRq = planetHelioPos.lengthSquared(); const float planetRq = planetHelioPos.lengthSquared();
const float observerPlanetRq = (observerHelioPos - planetHelioPos).l engthSquared(); const float observerPlanetRq = (observerHelioPos - planetHelioPos).l engthSquared();
const float cos_chi = (observerPlanetRq + planetRq - observerRq)/(2. 0*std::sqrt(observerPlanetRq*planetRq)); const float cos_chi = (observerPlanetRq + planetRq - observerRq)/(2. 0*std::sqrt(observerPlanetRq*planetRq));
const float phaseAngle = std::acos(cos_chi); const float phaseAngle = std::acos(cos_chi);
//Calculate reduced magnitude (magnitude without the influence of di stance) //Calculate reduced magnitude (magnitude without the influence of di stance)
//Source of the formulae: http://www.britastro.org/asteroids/dymock4 .pdf //Source of the formulae: http://www.britastro.org/asteroids/dymock4 .pdf
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 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/