StelObject.cpp   StelObject.cpp 
skipping to change at line 81 skipping to change at line 81
{ {
return core->j2000ToAltAz(getJ2000EquatorialPos(core)); return core->j2000ToAltAz(getJ2000EquatorialPos(core));
} }
// Get observer-centered galactic position // Get observer-centered galactic position
Vec3d StelObject::getGalacticPos(const StelCore *core) const Vec3d StelObject::getGalacticPos(const StelCore *core) const
{ {
return core->j2000ToGalactic(getJ2000EquatorialPos(core)); return core->j2000ToGalactic(getJ2000EquatorialPos(core));
} }
// Get observer-centered supergalactic position
Vec3d StelObject::getSupergalacticPos(const StelCore *core) const
{
return core->j2000ToSupergalactic(getJ2000EquatorialPos(core));
}
float StelObject::getVMagnitude(const StelCore* core) const float StelObject::getVMagnitude(const StelCore* core) const
{ {
Q_UNUSED(core); Q_UNUSED(core);
return 99; return 99;
} }
float StelObject::getSelectPriority(const StelCore* core) const float StelObject::getSelectPriority(const StelCore* core) const
{ {
float extMag = getVMagnitudeWithExtinction(core); float extMag = getVMagnitudeWithExtinction(core);
if (extMag>15.f) if (extMag>15.f)
skipping to change at line 117 skipping to change at line 123
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 = StelApp::getInstance().getFlagShowDecimalDe grees(); bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDe grees();
bool useSouthAzimuth = StelApp::getInstance().getFlagSouthAzimuthUsa ge(); bool useSouthAzimuth = StelApp::getInstance().getFlagSouthAzimuthUsa ge();
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));
Q_UNUSED(az_app); Q_UNUSED(az_app);
QString cepoch = qc_("on date", "coordinates for current epoch"); QString cepoch = qc_("on date", "coordinates for current epoch");
QString res; QString res;
QString currentPlanet = core->getCurrentPlanet()->getEnglishName();
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(" (J2000.0): %1/%2").a rg(StelUtils::radToDecDegStr(ra_j2000,5,false,true), StelUtils::radToDecDeg Str(dec_j2000)) + "<br>"; res += q_("RA/Dec") + QString(" (J2000.0): %1/%2").a rg(StelUtils::radToDecDegStr(ra_j2000,5,false,true), StelUtils::radToDecDeg Str(dec_j2000)) + "<br>";
else else
res += q_("RA/Dec") + QString(" (J2000.0): %1/%2").a rg(StelUtils::radToHmsStr(ra_j2000,true), StelUtils::radToDmsStr(dec_j2000, true)) + "<br>"; res += q_("RA/Dec") + QString(" (J2000.0): %1/%2").a rg(StelUtils::radToHmsStr(ra_j2000,true), StelUtils::radToDmsStr(dec_j2000, true)) + "<br>";
} }
skipping to change at line 200 skipping to change at line 207
} }
else else
{ {
if (withDecimalDegree) if (withDecimalDegree)
res += q_("Az/Alt: %1/%2").arg(StelUtils::ra dToDecDegStr(az), 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) // N.B. Ecliptical coordinates are particularly earth-bound.
{ // It may be OK to have terrestrial ecliptical coordinates of J2000.
// N.B. Ecliptical coordinates are particularly earth-bound. 0 (standard epoch) because those are in practice linked with VSOP XY plane,
// It may be OK to have terrestrial ecliptical coordinates o // and because the ecliptical grid of J2000 is also shown for observ
f J2000.0 (standard epoch) because those are in practice linked with VSOP X ers on other planets.
Y plane, // The formulation here has never computed the true position of any
// and because the ecliptical grid of J2000 is also shown fo observer planet's orbital plane except for Earth,
r observers on other planets. // or ever displayed the coordinates in the observer planet's equiva
// The formulation here has never computed the true position lent to Earth's ecliptical coordinates.
of any observer planet's orbital plane except for Earth, // As quick test you can observe if in any "Ecliptic coordinate" as
// or ever displayed the coordinates in the observer planet' seen from e.g. Mars or Jupiter the Sun was ever close to beta=0 (except if
s equivalent to Earth's ecliptical coordinates. crossing the node...).
// As quick test you can observe if in any "Ecliptic coordin
ate" as seen from e.g. Mars or Jupiter the Sun was ever close to beta=0 (ex
cept if crossing the node...).
if (flags&EclipticCoordJ2000)
{
double ecl=GETSTELMODULE(SolarSystem)->getEarth()->getRotObl iquity(2451545.0); double ecl=GETSTELMODULE(SolarSystem)->getEarth()->getRotObl iquity(2451545.0);
double ra_equ, dec_equ, lambda, beta; double ra_equ, dec_equ, lambda, beta;
StelUtils::rectToSphe(&ra_equ,&dec_equ,getJ2000EquatorialPos (core)); StelUtils::rectToSphe(&ra_equ,&dec_equ,getJ2000EquatorialPos (core));
StelUtils::equToEcl(ra_equ, dec_equ, ecl, &lambda, &beta); StelUtils::equToEcl(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(" (J2000.0): %1/%2").arg(StelUtils::radToDecDegStr(lambda), StelUtils::radTo DecDegStr(beta)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString(" (J2000.0): %1/%2").arg(StelUtils::radToDecDegStr(lambda), StelUtils::radTo DecDegStr(beta)) + "<br>";
else else
res += q_("Ecliptic longitude/latitude") + QString(" (J2000.0): %1/%2").arg(StelUtils::radToDmsStr(lambda, true), StelUtils::ra dToDmsStr(beta, true)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString(" (J2000.0): %1/%2").arg(StelUtils::radToDmsStr(lambda, true), StelUtils::ra dToDmsStr(beta, true)) + "<br>";
if (core->getCurrentPlanet()->getEnglishName()=="Earth") }
{
ecl = GETSTELMODULE(SolarSystem)->getEarth()->getRot
Obliquity(core->getJDE());
StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEqu if ((flags&EclipticCoordOfDate) && (QString("Earth Sun").contains(cu
atorialPos(core)); rrentPlanet)))
StelUtils::equToEcl(ra_equ, dec_equ, ecl, &lambda, & {
beta); double eclJDE = GETSTELMODULE(SolarSystem)->getEarth()->getR
if (lambda<0) lambda+=2.0*M_PI; otObliquity(core->getJDE());
if (withDecimalDegree) double ra_equ, dec_equ, lambdaJDE, betaJDE;
res += q_("Ecliptic longitude/latitude") + Q
String(" (%1): %2/%3").arg(cepoch, StelUtils::radToDecDegStr(lambda), StelU StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEquatorialP
tils::radToDecDegStr(beta)) + "<br>"; os(core));
else StelUtils::equToEcl(ra_equ, dec_equ, eclJDE, &lambdaJDE, &be
res += q_("Ecliptic longitude/latitude") + Q taJDE);
String(" (%1): %2/%3").arg(cepoch, StelUtils::radToDmsStr(lambda, true), St if (lambdaJDE<0) lambdaJDE+=2.0*M_PI;
elUtils::radToDmsStr(beta, true)) + "<br>"; if (withDecimalDegree)
// GZ Only for now: display epsilon_A, angle between res += q_("Ecliptic longitude/latitude") + QString("
Earth's Axis and ecl. of date. (%1): %2/%3").arg(cepoch, StelUtils::radToDecDegStr(lambdaJDE), StelUtils:
if (withDecimalDegree) :radToDecDegStr(betaJDE)) + "<br>";
res += q_("Ecliptic obliquity") + QString(" else
(%1): %2").arg(cepoch, StelUtils::radToDecDegStr(ecl)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString("
else (%1): %2/%3").arg(cepoch, StelUtils::radToDmsStr(lambdaJDE, true), StelUti
res += q_("Ecliptic obliquity") + QString(" ls::radToDmsStr(betaJDE, true)) + "<br>";
(%1): %2").arg(cepoch, StelUtils::radToDmsStr(ecl)) + "<br>"; // GZ Only for now: display epsilon_A, angle between Earth's
} Axis and ecl. of date.
if (withDecimalDegree)
res += q_("Ecliptic obliquity") + QString(" (%1): %2
").arg(cepoch, StelUtils::radToDecDegStr(eclJDE)) + "<br>";
else
res += q_("Ecliptic obliquity") + QString(" (%1): %2
").arg(cepoch, StelUtils::radToDmsStr(eclJDE, 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>";
} }
if ((flags&Extra) && core->getCurrentPlanet()->getEnglishName()=="Ea if (flags&SupergalacticCoord)
rth") {
double sglong, sglat;
StelUtils::rectToSphe(&sglong, &sglat, getSupergalacticPos(c
ore));
if (withDecimalDegree)
res += q_("Supergalactic longitude/latitude: %1/%2")
.arg(StelUtils::radToDecDegStr(sglong), StelUtils::radToDecDegStr(sglat)) +
"<br>";
else
res += q_("Supergalactic longitude/latitude: %1/%2")
.arg(StelUtils::radToDmsStr(sglong,true), StelUtils::radToDmsStr(sglat,true
)) + "<br>";
}
if (flags&IAUConstellation)
{
QString constel=core->getIAUConstellation(getJ2000Equatorial
Pos(core));
res += q_("IAU Constellation: %1").arg(constel) + "<br>";
}
if ((flags&Extra) && (currentPlanet=="Earth"))
{ {
double longitude=core->getCurrentLocation().longitude; double longitude=core->getCurrentLocation().longitude;
double sidereal=(get_mean_sidereal_time(core->getJD(), core- >getJDE()) + longitude) / 15.; double sidereal=(get_mean_sidereal_time(core->getJD(), core- >getJDE()) + longitude) / 15.;
sidereal=fmod(sidereal, 24.); sidereal=fmod(sidereal, 24.);
if (sidereal < 0.) sidereal+=24.; if (sidereal < 0.) sidereal+=24.;
res += q_("Mean Sidereal Time: %1").arg(StelUtils::hoursToHm sStr(sidereal)) + "<br>"; res += q_("Mean Sidereal Time: %1").arg(StelUtils::hoursToHm sStr(sidereal)) + "<br>";
if (core->getUseNutation()) if (core->getUseNutation())
{ {
sidereal=(get_apparent_sidereal_time(core->getJD(), core->getJDE()) + longitude) / 15.; sidereal=(get_apparent_sidereal_time(core->getJD(), core->getJDE()) + longitude) / 15.;
sidereal=fmod(sidereal, 24.); sidereal=fmod(sidereal, 24.);
 End of changes. 7 change blocks. 
43 lines changed or deleted 73 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/