Comet.cpp   Comet.cpp 
skipping to change at line 169 skipping to change at line 169
} }
if (flags&ObjectType && getPlanetType()!=isUNDEFINED) if (flags&ObjectType && getPlanetType()!=isUNDEFINED)
{ {
QString cometType = qc_("non-periodic", "type of comet"); QString cometType = qc_("non-periodic", "type of comet");
if (semiMajorAxis>0.0) if (semiMajorAxis>0.0)
{ {
// Parabolic and hyperbolic comets doesn't have semi -major axis of the orbit. We have comet with elliptic orbit. // Parabolic and hyperbolic comets doesn't have semi -major axis of the orbit. We have comet with elliptic orbit.
cometType = qc_("periodic", "type of comet"); cometType = qc_("periodic", "type of comet");
} }
oss << q_("Type: <b>%1</b> (%2)").arg(q_(getPlanetTypeString ())).arg(cometType) << "<br />"; oss << QString("%1: <b>%2</b> (%3)").arg(q_("Type"), q_(getP lanetTypeString()), cometType) << "<br />";
} }
if (flags&Magnitude) if (flags&Magnitude)
{ {
QString emag = "";
if (core->getSkyDrawer()->getFlagHasAtmosphere() && (alt_app>-3. 0*M_PI/180.0)) // Don't show extincted magnitude much below horizon where m odel is meaningless. if (core->getSkyDrawer()->getFlagHasAtmosphere() && (alt_app>-3. 0*M_PI/180.0)) // Don't show extincted magnitude much below horizon where m odel is meaningless.
oss << q_("Magnitude: <b>%1</b> (after extinction: <b>%2</b> emag = QString(" (%1: <b>%2</b>)").arg(q_("extincted to"
)").arg(QString::number(getVMagnitude(core), 'f', 2), ), QString::number(getVMagnitudeWithExtinction(core), 'f', 2));
QString::number(getVMagnitudeWithExtinction(core), 'f', 2)) << "<br>"; oss << QString("%1: <b>%2</b>%3").arg(q_("Magnitude"), QString::
else number(getVMagnitude(core), 'f', 2), emag) << "<br />";
oss << q_("Magnitude: <b>%1</b>").arg(getVMagnitude(core), 0
, 'f', 2) << "<br>";
} }
if (flags&AbsoluteMagnitude) if (flags&AbsoluteMagnitude)
{ {
//TODO: Make sure absolute magnitude is a sane value //TODO: Make sure absolute magnitude is a sane value
//If the two parameter magnitude system is not use, don't di splay this //If the two parameter magnitude system is not use, don't di splay this
//value. (Using radius/albedo doesn't make any sense for com ets.) //value. (Using radius/albedo doesn't make any sense for com ets.)
if (slopeParameter >= 0) if (slopeParameter >= 0)
oss << q_("Absolute Magnitude: %1").arg(absoluteMagn itude, 0, 'f', 2) << "<br>"; oss << QString("%1: %2").arg(q_("Absolute Magnitude" )).arg(absoluteMagnitude, 0, 'f', 2) << "<br>";
} }
oss << getPositionInfoString(core, flags); oss << getCommonInfoString(core, flags);
// TRANSLATORS: Unit of measure for distance - kilometers
QString km = qc_("km", "distance");
// TRANSLATORS: Unit of measure for distance - milliones kilometers
QString Mkm = qc_("Mio km", "distance");
QString distAU, distKM;
if (flags&Distance) if (flags&Distance)
{ {
double distanceAu = getHeliocentricEclipticPos().length(); double hdistanceAu = getHeliocentricEclipticPos().length();
double distanceKm = AU * distanceAu; double hdistanceKm = AU * hdistanceAu;
if (distanceAu < 0.1) // TRANSLATORS: Unit of measure for distance - astronomical
unit
QString au = qc_("AU", "distance, astronomical unit");
bool useKM = true;
if (hdistanceAu < 0.1)
{ {
// xgettext:no-c-format distAU = QString::number(hdistanceAu, 'f', 6);
oss << QString(q_("Distance from Sun: %1AU (%2 km)") distKM = QString::number(hdistanceKm, 'f', 3);
)
.arg(distanceAu, 0, 'f', 6)
.arg(distanceKm, 0, 'f', 3);
} }
else else
{ {
// xgettext:no-c-format distAU = QString::number(hdistanceAu, 'f', 3);
oss << QString(q_("Distance from Sun: %1AU (%2 Mio k distKM = QString::number(hdistanceKm / 1.0e6, 'f', 3
m)")) );
.arg(distanceAu, 0, 'f', 3) useKM = false;
.arg(distanceKm / 1.0e6, 0, 'f', 3); }
} oss << QString("%1: %2%3 (%4 %5)").arg(q_("Distance from Sun
oss << "<br>"; "), distAU, au, distKM, useKM ? km : Mkm) << "<br />";
distanceAu = getJ2000EquatorialPos(core).length();
distanceKm = AU * distanceAu; double distanceAu = getJ2000EquatorialPos(core).length();
double distanceKm = AU * distanceAu;
if (distanceAu < 0.1) if (distanceAu < 0.1)
{ {
// xgettext:no-c-format distAU = QString::number(distanceAu, 'f', 6);
oss << QString(q_("Distance: %1AU (%2 km)")) distKM = QString::number(distanceKm, 'f', 3);
.arg(distanceAu, 0, 'f', 6) useKM = true;
.arg(distanceKm, 0, 'f', 3);
} }
else else
{ {
// xgettext:no-c-format distAU = QString::number(distanceAu, 'f', 3);
oss << QString(q_("Distance: %1AU (%2 Mio km)")) distKM = QString::number(distanceKm / 1.0e6, 'f', 3)
.arg(distanceAu, 0, 'f', 3) ;
.arg(distanceKm / 1.0e6, 0, 'f', 3); useKM = false;
} }
oss << "<br>"; oss << QString("%1: %2%3 (%4 %5)").arg(q_("Distance"), distA U, au, distKM, useKM ? km : Mkm) << "<br />";
} }
if (flags&Extra) if (flags&Extra)
{ {
// If semi-major axis not zero then calculate and display or bital period for comet in days // If semi-major axis not zero then calculate and display or bital period for comet in days
double siderealPeriod = getSiderealPeriod(); double siderealPeriod = getSiderealPeriod();
if (siderealPeriod>0) if (siderealPeriod>0)
{ {
// TRANSLATORS: Sidereal (orbital) period for comets // Sidereal (orbital) period for comets in Julian ye
in Julian years (symbol: a) ars (symbol: a)
oss << q_("Sidereal period: %1 a").arg(QString::numb oss << QString("%1: %2 a").arg(q_("Sidereal period")
er(siderealPeriod/365.25, 'f', 3)) << "<br>"; , QString::number(siderealPeriod/365.25, 'f', 3)) << "<br />";
} }
// TRANSLATORS: Unit of measure for speed - kilometers per s
econd
QString kms = qc_("km/s", "speed");
// GZ: Add speed. I don't know where else to place that bit of information. // GZ: Add speed. I don't know where else to place that bit of information.
// xgettext:no-c-format oss << QString("%1: %2 %3").arg(q_("Speed"), QString::number
oss << QString(q_("Speed: %1 km/s")) (((CometOrbit*)orbitPtr)->getVelocity().length()*AU/86400.0, 'f', 3), kms)
.arg(((CometOrbit*)orbitPtr)->getVelocity().lengt << "<br />";
h()*AU/86400.0, 0, 'f', 3);
oss << "<br>";
const Vec3d& observerHelioPos = core->getObserverHeliocentri cEclipticPos(); const Vec3d& observerHelioPos = core->getObserverHeliocentri cEclipticPos();
const double elongation = getElongation(observerHelioPos); const double elongation = getElongation(observerHelioPos);
QString pha, elo;
if (withDecimalDegree) if (withDecimalDegree)
{ {
oss << QString(q_("Phase Angle: %1")).arg(StelUtils: pha = StelUtils::radToDecDegStr(getPhaseAngle(observ
:radToDecDegStr(getPhaseAngle(observerHelioPos),4,false,true)) << "<br>"; erHelioPos),4,false,true);
oss << QString(q_("Elongation: %1")).arg(StelUtils:: elo = StelUtils::radToDecDegStr(elongation,4,false,t
radToDecDegStr(elongation,4,false,true)) << "<br>"; rue);
} }
else else
{ {
oss << QString(q_("Phase Angle: %1")).arg(StelUtils: pha = StelUtils::radToDmsStr(getPhaseAngle(observerH
:radToDmsStr(getPhaseAngle(observerHelioPos), true)) << "<br>"; elioPos), true);
oss << QString(q_("Elongation: %1")).arg(StelUtils:: elo = StelUtils::radToDmsStr(elongation, true);
radToDmsStr(elongation, true)) << "<br>";
} }
oss << QString("%1: %2").arg(q_("Phase angle"), pha) << "<br
/>";
oss << QString("%1: %2").arg(q_("Elongation"), elo) << "<br
/>";
} }
if ((flags&Size) && (tailFactors[0]>0.0f)) if ((flags&Size) && (tailFactors[0]>0.0f))
{ {
// GZ: Add estimates for coma diameter and tail length. // GZ: Add estimates for coma diameter and tail length.
// xgettext:no-c-format oss << QString("%1: %2 %3").arg(q_("Coma diameter (estimate)
oss << QString(q_("Coma diameter (estimate): %1 km")) "), QString::number(floor(tailFactors[0]*AU/1000.0f)*1000.0f, 'f', 0), km)
.arg(floor(tailFactors[0]*AU/1000.0f)*1000.0f, 0, << "<br />";
'f', 0); oss << QString("%1: %2 %3").arg(q_("Gas tail length (estimat
oss << "<br>"; e)"), QString::number(tailFactors[1]*AU*1e-6, 'G', 3), Mkm) << "<br />";
// xgettext:no-c-format
oss << QString(q_("Gas tail length (estimate): %1 Mio km"))
.arg(tailFactors[1]*AU*1e-6, 0, 'G', 3);
oss << "<br>";
} }
postProcessInfoString(str, flags); postProcessInfoString(str, flags);
return str; return str;
} }
QVariantMap Comet::getInfoMap(const StelCore *core) const QVariantMap Comet::getInfoMap(const StelCore *core) const
{ {
QVariantMap map = Planet::getInfoMap(core); QVariantMap map = Planet::getInfoMap(core);
 End of changes. 21 change blocks. 
62 lines changed or deleted 70 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/