StarWrapper.cpp   StarWrapper.cpp 
skipping to change at line 47 skipping to change at line 47
template<typename T> inline bool isInf(T value) template<typename T> inline bool isInf(T value)
{ {
return std::numeric_limits<T>::has_infinity && value == std::numeric _limits<T>::infinity(); return std::numeric_limits<T>::has_infinity && value == std::numeric _limits<T>::infinity();
} }
QString StarWrapperBase::getInfoString(const StelCore *core, const InfoStri ngGroup& flags) const QString StarWrapperBase::getInfoString(const StelCore *core, const InfoStri ngGroup& flags) const
{ {
QString str; QString str;
QTextStream oss(&str); QTextStream oss(&str);
double az_app, alt_app;
StelUtils::rectToSphe(&az_app,&alt_app,getAltAzPosApparent(core));
Q_UNUSED(az_app);
if (flags&ObjectType) if (flags&ObjectType)
{ {
oss << q_("Type: <b>%1</b>").arg(q_("star")) << "<br />"; oss << q_("Type: <b>%1</b>").arg(q_("star")) << "<br />";
} }
if (flags&Magnitude) if (flags&Magnitude)
{ {
if (core->getSkyDrawer()->getFlagHasAtmosphere()) 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>)") oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2 </b>)")
.arg(QString::number(getVMagnitude(core), 'f' , 2)) .arg(QString::number(getVMagnitude(core), 'f' , 2))
.arg(QString::number(getVMagnitudeWithExtinct ion(core), 'f', 2)) << "<br>"; .arg(QString::number(getVMagnitudeWithExtinct ion(core), 'f', 2)) << "<br>";
else else
oss << q_("Magnitude: <b>%1</b>").arg(QString::numbe r(getVMagnitude(core), 'f', 2)) << "<br>"; oss << q_("Magnitude: <b>%1</b>").arg(QString::numbe r(getVMagnitude(core), 'f', 2)) << "<br>";
} }
if (flags&Extra) if (flags&Extra)
{ {
oss << q_("Color Index (B-V): <b>%1</b>").arg(QString::numbe r(getBV(), 'f', 2)) << "<br>"; oss << q_("Color Index (B-V): <b>%1</b>").arg(QString::numbe r(getBV(), 'f', 2)) << "<br>";
skipping to change at line 105 skipping to change at line 108
const int vMm = StarMgr::getGcvsMM(s->getHip()); const int vMm = StarMgr::getGcvsMM(s->getHip());
if (s->getHip()) if (s->getHip())
{ {
if ((flags&Name) || (flags&CatalogNumber)) if ((flags&Name) || (flags&CatalogNumber))
oss << "<h2>"; oss << "<h2>";
const QString commonNameI18 = StarMgr::getCommonName(s->getH ip()); const QString commonNameI18 = StarMgr::getCommonName(s->getH ip());
const QString sciName = StarMgr::getSciName(s->getHip()); const QString sciName = StarMgr::getSciName(s->getHip());
const QString addSciName = StarMgr::getSciAdditionalName(s-> getHip()); const QString addSciName = StarMgr::getSciAdditionalName(s-> getHip());
const QString varSciName = StarMgr::getGcvsName(s->getHip()) ; const QString varSciName = StarMgr::getGcvsName(s->getHip()) ;
QStringList sciNames; const QString crossIndexData = StarMgr::getCrossIndexDesigna
tions(s->getHip());
QStringList designations;
if (!sciName.isEmpty()) if (!sciName.isEmpty())
sciNames.append(sciName); designations.append(sciName);
if (!addSciName.isEmpty()) if (!addSciName.isEmpty())
sciNames.append(addSciName); designations.append(addSciName);
if (!varSciName.isEmpty() && varSciName!=addSciName && varSc iName!=sciName) if (!varSciName.isEmpty() && varSciName!=addSciName && varSc iName!=sciName)
sciNames.append(varSciName); designations.append(varSciName);
const QString sciNamesList = sciNames.join(" - ");
bool nameWasEmpty=true; QString hip;
if (flags&Name) if (s->getComponentIds())
{ hip = QString("HIP %1 %2").arg(s->getHip()).arg(Star
if (!commonNameI18.isEmpty() || !sciNamesList.isEmpt Mgr::convertToComponentIds(s->getComponentIds()));
y()) else
{ hip = QString("HIP %1").arg(s->getHip());
if (!commonNameI18.isEmpty())
oss << commonNameI18;
if (!commonNameI18.isEmpty() && !sciNamesLis designations.append(hip);
t.isEmpty())
oss << " (" << sciNamesList << ")";
if (commonNameI18.isEmpty() && !sciNamesList if (!crossIndexData.isEmpty())
.isEmpty()) designations.append(crossIndexData);
oss << sciNamesList;
nameWasEmpty=false; const QString designationsList = designations.join(" - ");
}
if (flags&Name)
{
if (!commonNameI18.isEmpty())
oss << commonNameI18;
if (!commonNameI18.isEmpty() && !designationsList.is
Empty() && flags&CatalogNumber)
oss << "<br>";
} }
if ((flags&CatalogNumber) && (flags&Name) && !nameWasEmpty)
oss << " - ";
if (flags&CatalogNumber || (nameWasEmpty && (flags&Name))) if (flags&CatalogNumber)
oss << "HIP " << s->getHip(); oss << designationsList;
if (s->getComponentIds())
oss << " " << StarMgr::convertToComponentIds(s->getC
omponentIds());
if ((flags&Name) || (flags&CatalogNumber)) if ((flags&Name) || (flags&CatalogNumber))
oss << "</h2>"; oss << "</h2>";
} }
bool ebsFlag = false; bool ebsFlag = false;
if (flags&ObjectType) if (flags&ObjectType)
{ {
QString varstartype = ""; QString varstartype = "";
QString startype = ""; QString startype = "";
skipping to change at line 213 skipping to change at line 216
if (!varType.isEmpty()) if (!varType.isEmpty())
{ {
float minimumM1 = minVMag; float minimumM1 = minVMag;
float minimumM2 = min2VMag; float minimumM2 = min2VMag;
if (magFlag==1) // Amplitude if (magFlag==1) // Amplitude
{ {
minimumM1 += maxVMag; minimumM1 += maxVMag;
minimumM2 += maxVMag; minimumM2 += maxVMag;
} }
if (min2VMag==99.f) if (maxVMag!=99.f) // seems it is not eruptive varia
oss << q_("Magnitude range: <b>%1</b>%2<b>%3 ble star
</b> (Photometric system: %4)").arg(QString::number(maxVMag, 'f', 2)).arg(Q {
Char(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(photoVSys) << "<b if (min2VMag==99.f)
r />"; oss << q_("Magnitude range: <b>%1</b
else >%2<b>%3</b> (Photometric system: %4)").arg(QString::number(maxVMag, 'f', 2
oss << q_("Magnitude range: <b>%1</b>%2<b>%3 )).arg(QChar(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(photoVSys
/%4</b> (Photometric system: %5)").arg(QString::number(maxVMag, 'f', 2)).ar ) << "<br />";
g(QChar(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(QString::numbe else
r(minimumM2, 'f', 2)).arg(photoVSys) << "<br />"; oss << q_("Magnitude range: <b>%1</b
>%2<b>%3/%4</b> (Photometric system: %5)").arg(QString::number(maxVMag, 'f'
, 2)).arg(QChar(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(QStrin
g::number(minimumM2, 'f', 2)).arg(photoVSys) << "<br />";
}
} }
} }
oss << getPositionInfoString(core, flags); oss << getPositionInfoString(core, flags);
if ((flags&Distance) && s->getPlx ()&& !isNan(s->getPlx()) && !isInf (s->getPlx())) if ((flags&Distance) && s->getPlx ()&& !isNan(s->getPlx()) && !isInf (s->getPlx()))
{ {
//TRANSLATORS: Unit of measure for distance - Light Years //TRANSLATORS: Unit of measure for distance - Light Years
oss << q_("Distance: %1 ly").arg((AU/(SPEED_OF_LIGHT*86400*3 65.25)) / (s->getPlx()*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br>"; oss << q_("Distance: %1 ly").arg((AU/(SPEED_OF_LIGHT*86400*3 65.25)) / (s->getPlx()*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br>";
} }
skipping to change at line 243 skipping to change at line 249
if (s->getPlx()) if (s->getPlx())
oss << q_("Parallax: %1\"").arg(0.00001*s->getPlx(), 0, 'f', 5) << "<br />"; oss << q_("Parallax: %1\"").arg(0.00001*s->getPlx(), 0, 'f', 5) << "<br />";
if (vPeriod>0) if (vPeriod>0)
oss << q_("Period: %1 days").arg(vPeriod) << "<br /> "; oss << q_("Period: %1 days").arg(vPeriod) << "<br /> ";
if (vEpoch>0 && vPeriod>0) if (vEpoch>0 && vPeriod>0)
{ {
// Calculate next minimum or maximum light // Calculate next minimum or maximum light
double vsEpoch = 2400000+vEpoch; double vsEpoch = 2400000+vEpoch;
double npDate = vsEpoch + vPeriod * ::floor(1.0 + (c ore->getJDay() - vsEpoch)/vPeriod); double npDate = vsEpoch + vPeriod * ::floor(1.0 + (c ore->getJDE() - vsEpoch)/vPeriod);
QString nextDate = StelUtils::julianDayToISO8601Stri ng(npDate).replace("T", " "); QString nextDate = StelUtils::julianDayToISO8601Stri ng(npDate).replace("T", " ");
if (ebsFlag) if (ebsFlag)
oss << q_("Next minimum light: %1 UTC").arg( nextDate) << "<br />"; oss << q_("Next minimum light: %1 UTC").arg( nextDate) << "<br />";
else else
oss << q_("Next maximum light: %1 UTC").arg( nextDate) << "<br />"; oss << q_("Next maximum light: %1 UTC").arg( nextDate) << "<br />";
} }
if (vMm>0) if (vMm>0)
{ {
 End of changes. 14 change blocks. 
40 lines changed or deleted 46 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/