StelObject.cpp   StelObject.cpp 
skipping to change at line 102 skipping to change at line 102
if (extMag>15.f) if (extMag>15.f)
extMag=15.f; extMag=15.f;
return extMag; return extMag;
} }
float StelObject::getVMagnitudeWithExtinction(const StelCore* core) const float StelObject::getVMagnitudeWithExtinction(const StelCore* core) const
{ {
Vec3d altAzPos = getAltAzPosGeometric(core); Vec3d altAzPos = getAltAzPosGeometric(core);
altAzPos.normalize(); altAzPos.normalize();
float vMag = getVMagnitude(core); float vMag = getVMagnitude(core);
// GZ 2014-01-02: without the test, planets flicker stupidly in full sky atmosphere-less view. // without the test, planets flicker stupidly in fullsky atmosphere- less view.
if (core->getSkyDrawer()->getFlagHasAtmosphere()) if (core->getSkyDrawer()->getFlagHasAtmosphere())
core->getSkyDrawer()->getExtinction().forward(altAzPos, &vMa g); core->getSkyDrawer()->getExtinction().forward(altAzPos, &vMa g);
return vMag; return vMag;
} }
// Format the positional info string contain J2000/of date/altaz/hour angle positions for the object // Format the positional info string contain J2000/of date/altaz/hour angle positions for the object
QString StelObject::getPositionInfoString(const StelCore *core, const InfoS tringGroup& flags) const QString StelObject::getPositionInfoString(const StelCore *core, const InfoS tringGroup& flags) const
{ {
bool withAtmosphere = core->getSkyDrawer()->getFlagHasAtmosphere(); bool withAtmosphere = core->getSkyDrawer()->getFlagHasAtmosphere();
bool withDecimalDegree = dynamic_cast<StelGui*>(StelApp::getInstance ().getGui())->getFlagShowDecimalDegrees(); bool withDecimalDegree = dynamic_cast<StelGui*>(StelApp::getInstance ().getGui())->getFlagShowDecimalDegrees();
double currentEpoch = core->getCurrentEpoch(); double currentEpoch = core->getCurrentEpoch();
QString cepoch = qc_("on date", "coordinates for current epoch");
if (currentEpoch>0 && currentEpoch<9000.)
{
// OK, we can show epoch in format YYYY.F
cepoch = QString("J%1").arg(QString::number(currentEpoch, 'f
', 1));
}
QString res; QString res;
if (flags&RaDecJ2000) if (flags&RaDecJ2000)
{ {
double dec_j2000, ra_j2000; double dec_j2000, ra_j2000;
StelUtils::rectToSphe(&ra_j2000,&dec_j2000,getJ2000Equatoria lPos(core)); StelUtils::rectToSphe(&ra_j2000,&dec_j2000,getJ2000Equatoria lPos(core));
if (withDecimalDegree) if (withDecimalDegree)
res += q_("RA/Dec") + QString(" (J%1): %2/%3").arg(Q String::number(2000.f, 'f', 1), StelUtils::radToDecDegStr(ra_j2000,false,tr ue), StelUtils::radToDecDegStr(dec_j2000)) + "<br>"; res += q_("RA/Dec") + QString(" (J%1): %2/%3").arg(Q String::number(2000.f, 'f', 1), StelUtils::radToDecDegStr(ra_j2000,5,false, true), StelUtils::radToDecDegStr(dec_j2000)) + "<br>";
else else
res += q_("RA/Dec") + QString(" (J%1): %2/%3").arg(Q String::number(2000.f, 'f', 1), StelUtils::radToHmsStr(ra_j2000,true), Stel Utils::radToDmsStr(dec_j2000,true)) + "<br>"; res += q_("RA/Dec") + QString(" (J%1): %2/%3").arg(Q String::number(2000.f, 'f', 1), StelUtils::radToHmsStr(ra_j2000,true), Stel Utils::radToDmsStr(dec_j2000,true)) + "<br>";
} }
if (flags&RaDecOfDate) if (flags&RaDecOfDate)
{ {
double dec_equ, ra_equ; double dec_equ, ra_equ;
StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEquatorialP os(core)); StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEquatorialP os(core));
if (withDecimalDegree) if (withDecimalDegree)
res += q_("RA/Dec") + QString(" (J%1): %2/%3").arg(Q String::number(currentEpoch, 'f', 1), StelUtils::radToDecDegStr(ra_equ,fals e,true), StelUtils::radToDecDegStr(dec_equ)) + "<br>"; res += q_("RA/Dec") + QString(" (%1): %2/%3").arg(ce poch, StelUtils::radToDecDegStr(ra_equ,5,false,true), StelUtils::radToDecDe gStr(dec_equ)) + "<br>";
else else
res += q_("RA/Dec") + QString(" (J%1): %2/%3").arg(Q String::number(currentEpoch, 'f', 1), StelUtils::radToHmsStr(ra_equ,true), StelUtils::radToDmsStr(dec_equ,true)) + "<br>"; res += q_("RA/Dec") + QString(" (%1): %2/%3").arg(ce poch, StelUtils::radToHmsStr(ra_equ,true), StelUtils::radToDmsStr(dec_equ,t rue)) + "<br>";
} }
if (flags&HourAngle) if (flags&HourAngle)
{ {
double dec_sidereal, ra_sidereal; double dec_sidereal, ra_sidereal;
StelUtils::rectToSphe(&ra_sidereal,&dec_sidereal,getSidereal PosGeometric(core)); StelUtils::rectToSphe(&ra_sidereal,&dec_sidereal,getSidereal PosGeometric(core));
ra_sidereal = 2.*M_PI-ra_sidereal; ra_sidereal = 2.*M_PI-ra_sidereal;
if (withAtmosphere) if (withAtmosphere)
{ {
StelUtils::rectToSphe(&ra_sidereal,&dec_sidereal,get SiderealPosApparent(core)); StelUtils::rectToSphe(&ra_sidereal,&dec_sidereal,get SiderealPosApparent(core));
skipping to change at line 174 skipping to change at line 180
if (az > M_PI*2) if (az > M_PI*2)
az -= M_PI*2; az -= M_PI*2;
if (withDecimalDegree) if (withDecimalDegree)
res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDecDegStr(az), StelUtils::radToDecDegStr(alt)) + " " + q_("(apparent)") + "<br>"; res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDecDegStr(az), StelUtils::radToDecDegStr(alt)) + " " + q_("(apparent)") + "<br>";
else else
res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDmsStr(az,true), StelUtils::radToDmsStr(alt,true)) + " " + q_("(apparent )") + "<br>"; res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDmsStr(az,true), StelUtils::radToDmsStr(alt,true)) + " " + q_("(apparent )") + "<br>";
} }
else else
{ {
if (withDecimalDegree) if (withDecimalDegree)
res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDecDegStr(az,false,true), StelUtils::radToDecDegStr(alt)) + " " + "<br>" ; res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDecDegStr(az), StelUtils::radToDecDegStr(alt)) + " " + "<br>";
else else
res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDmsStr(az,true), StelUtils::radToDmsStr(alt,true)) + " " + "<br>"; res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDmsStr(az,true), StelUtils::radToDmsStr(alt,true)) + " " + "<br>";
} }
} }
if ((flags&EclipticCoord) && (core->getCurrentLocation().planetName= ="Earth")) if ((flags&EclipticCoord) && (core->getCurrentLocation().planetName= ="Earth"))
{ {
static SolarSystem *ssystem=GETSTELMODULE(SolarSystem); static SolarSystem *ssystem=GETSTELMODULE(SolarSystem);
double ecl= ssystem->getEarth()->getRotObliquity(2451545.0); double ecl= ssystem->getEarth()->getRotObliquity(2451545.0);
double ra_equ, dec_equ, lambda, beta; double ra_equ, dec_equ, lambda, beta;
skipping to change at line 197 skipping to change at line 203
if (lambda<0) lambda+=2.0*M_PI; if (lambda<0) lambda+=2.0*M_PI;
if (withDecimalDegree) if (withDecimalDegree)
res += q_("Ecliptic longitude/latitude") + QString(" (J%1): %2/%3").arg(QString::number(2000.f, 'f', 1), StelUtils::radToDecDeg Str(lambda), StelUtils::radToDecDegStr(beta)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString(" (J%1): %2/%3").arg(QString::number(2000.f, 'f', 1), StelUtils::radToDecDeg Str(lambda), StelUtils::radToDecDegStr(beta)) + "<br>";
else else
res += q_("Ecliptic longitude/latitude") + QString(" (J%1): %2/%3").arg(QString::number(2000.f, 'f', 1), StelUtils::radToDmsStr (lambda, true), StelUtils::radToDmsStr(beta, true)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString(" (J%1): %2/%3").arg(QString::number(2000.f, 'f', 1), StelUtils::radToDmsStr (lambda, true), StelUtils::radToDmsStr(beta, true)) + "<br>";
ecl= ssystem->getEarth()->getRotObliquity(core->getJDay()); ecl= ssystem->getEarth()->getRotObliquity(core->getJDay());
StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEquatorialP os(core)); StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEquatorialP os(core));
StelUtils::ctRadec2Ecl(ra_equ, dec_equ, ecl, &lambda, &beta) ; StelUtils::ctRadec2Ecl(ra_equ, dec_equ, ecl, &lambda, &beta) ;
if (lambda<0) lambda+=2.0*M_PI; if (lambda<0) lambda+=2.0*M_PI;
if (withDecimalDegree) if (withDecimalDegree)
res += q_("Ecliptic longitude/latitude") + QString(" (J%1): %2/%3").arg(QString::number(currentEpoch, 'f', 1), StelUtils::radTo DecDegStr(lambda), StelUtils::radToDecDegStr(beta)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString(" (%1): %2/%3").arg(cepoch, StelUtils::radToDecDegStr(lambda), StelUtils::ra dToDecDegStr(beta)) + "<br>";
else else
res += q_("Ecliptic longitude/latitude") + QString(" (J%1): %2/%3").arg(QString::number(currentEpoch, 'f', 1), StelUtils::radTo DmsStr(lambda, true), StelUtils::radToDmsStr(beta, true)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString(" (%1): %2/%3").arg(cepoch, StelUtils::radToDmsStr(lambda, true), StelUtils: :radToDmsStr(beta, true)) + "<br>";
} }
if (flags&GalacticCoord) if (flags&GalacticCoord)
{ {
double glong, glat; double glong, glat;
StelUtils::rectToSphe(&glong, &glat, getGalacticPos(core)); StelUtils::rectToSphe(&glong, &glat, getGalacticPos(core));
if (withDecimalDegree) if (withDecimalDegree)
res += q_("Galactic longitude/latitude: %1/%2").arg( StelUtils::radToDecDegStr(glong), StelUtils::radToDecDegStr(glat)) + "<br>" ; res += q_("Galactic longitude/latitude: %1/%2").arg( StelUtils::radToDecDegStr(glong), StelUtils::radToDecDegStr(glat)) + "<br>" ;
else else
res += q_("Galactic longitude/latitude: %1/%2").arg( StelUtils::radToDmsStr(glong,true), StelUtils::radToDmsStr(glat,true)) + "< br>"; res += q_("Galactic longitude/latitude: %1/%2").arg( StelUtils::radToDmsStr(glong,true), StelUtils::radToDmsStr(glat,true)) + "< br>";
 End of changes. 8 change blocks. 
7 lines changed or deleted 14 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/