StelObject.cpp   StelObject.cpp 
skipping to change at line 31 skipping to change at line 31
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "RefractionExtinction.hpp" #include "RefractionExtinction.hpp"
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "LandscapeMgr.hpp"
#include "planetsephems/sidereal_time.h" #include "planetsephems/sidereal_time.h"
#include "planetsephems/precession.h"
#include <QRegExp> #include <QRegExp>
#include <QDebug> #include <QDebug>
#include <QSettings> #include <QSettings>
int StelObject::stelObjectPMetaTypeID = qRegisterMetaType<StelObjectP>(); int StelObject::stelObjectPMetaTypeID = qRegisterMetaType<StelObjectP>();
Vec3d StelObject::getEquinoxEquatorialPos(const StelCore* core) const Vec3d StelObject::getEquinoxEquatorialPos(const StelCore* core) const
{ {
return core->j2000ToEquinoxEqu(getJ2000EquatorialPos(core), StelCore ::RefractionOff); return core->j2000ToEquinoxEqu(getJ2000EquatorialPos(core), StelCore ::RefractionOff);
skipping to change at line 97 skipping to change at line 99
{ {
return core->j2000ToGalactic(getJ2000EquatorialPos(core)); return core->j2000ToGalactic(getJ2000EquatorialPos(core));
} }
// Get observer-centered supergalactic position // Get observer-centered supergalactic position
Vec3d StelObject::getSupergalacticPos(const StelCore *core) const Vec3d StelObject::getSupergalacticPos(const StelCore *core) const
{ {
return core->j2000ToSupergalactic(getJ2000EquatorialPos(core)); return core->j2000ToSupergalactic(getJ2000EquatorialPos(core));
} }
// Checking position an object above mathematical horizon for current locat
ion
bool StelObject::isAboveHorizon(const StelCore *core) const
{
bool r = true;
float az, alt;
StelUtils::rectToSphe(&az, &alt, getAltAzPosAuto(core));
if (alt < 0.f)
r = false;
return r;
}
// Checking position an object above real horizon for current location
bool StelObject::isAboveRealHorizon(const StelCore *core) const
{
bool r = true;
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
if (lmgr->getFlagLandscape())
{
if (lmgr->getLandscapeOpacity(getAltAzPosAuto(core))>0.85f)
// landscape displayed
r = false;
}
else
r = isAboveHorizon(core); // check object is below mathemati
cal horizon
return r;
}
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 240 skipping to change at line 270
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 ((flags&EclipticCoordOfDate) && (QString("Earth Sun").contains(cu rrentPlanet))) if ((flags&EclipticCoordOfDate) && (QString("Earth Sun").contains(cu rrentPlanet)))
{ {
double eclJDE = GETSTELMODULE(SolarSystem)->getEarth()->getR double jde=core->getJDE();
otObliquity(core->getJDE()); double eclJDE = GETSTELMODULE(SolarSystem)->getEarth()->getR
otObliquity(jde);
if (StelApp::getInstance().getCore()->getUseNutation())
{
double deltaEps, deltaPsi;
getNutationAngles(jde, &deltaPsi, &deltaEps);
eclJDE+=deltaEps;
}
double ra_equ, dec_equ, lambdaJDE, betaJDE; double ra_equ, dec_equ, lambdaJDE, betaJDE;
StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEquatorialP os(core)); StelUtils::rectToSphe(&ra_equ,&dec_equ,getEquinoxEquatorialP os(core));
StelUtils::equToEcl(ra_equ, dec_equ, eclJDE, &lambdaJDE, &be taJDE); StelUtils::equToEcl(ra_equ, dec_equ, eclJDE, &lambdaJDE, &be taJDE);
if (lambdaJDE<0) lambdaJDE+=2.0*M_PI; if (lambdaJDE<0) lambdaJDE+=2.0*M_PI;
if (withDecimalDegree) if (withDecimalDegree)
res += q_("Ecliptic longitude/latitude") + QString(" (%1): %2/%3").arg(cepoch, StelUtils::radToDecDegStr(lambdaJDE), StelUtils: :radToDecDegStr(betaJDE)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString(" (%1): %2/%3").arg(cepoch, StelUtils::radToDecDegStr(lambdaJDE), StelUtils: :radToDecDegStr(betaJDE)) + "<br>";
else else
res += q_("Ecliptic longitude/latitude") + QString(" (%1): %2/%3").arg(cepoch, StelUtils::radToDmsStr(lambdaJDE, true), StelUti ls::radToDmsStr(betaJDE, true)) + "<br>"; res += q_("Ecliptic longitude/latitude") + QString(" (%1): %2/%3").arg(cepoch, StelUtils::radToDmsStr(lambdaJDE, true), StelUti ls::radToDmsStr(betaJDE, true)) + "<br>";
// GZ Only for now: display epsilon_A, angle between Earth's Axis and ecl. of date. // GZ Only for now: display epsilon_A, angle between Earth's Axis and ecl. of date.
skipping to change at line 279 skipping to change at line 316
double sglong, sglat; double sglong, sglat;
StelUtils::rectToSphe(&sglong, &sglat, getSupergalacticPos(c ore)); StelUtils::rectToSphe(&sglong, &sglat, getSupergalacticPos(c ore));
if (withDecimalDegree) if (withDecimalDegree)
res += q_("Supergalactic longitude/latitude: %1/%2") .arg(StelUtils::radToDecDegStr(sglong), StelUtils::radToDecDegStr(sglat)) + "<br>"; res += q_("Supergalactic longitude/latitude: %1/%2") .arg(StelUtils::radToDecDegStr(sglong), StelUtils::radToDecDegStr(sglat)) + "<br>";
else else
res += q_("Supergalactic longitude/latitude: %1/%2") .arg(StelUtils::radToDmsStr(sglong,true), StelUtils::radToDmsStr(sglat,true )) + "<br>"; res += q_("Supergalactic longitude/latitude: %1/%2") .arg(StelUtils::radToDmsStr(sglong,true), StelUtils::radToDmsStr(sglat,true )) + "<br>";
} }
if (flags&IAUConstellation) if (flags&IAUConstellation)
{ {
QString constel=core->getIAUConstellation(getJ2000Equatorial Pos(core)); QString constel=core->getIAUConstellation(getEquinoxEquatori alPos(core));
res += q_("IAU Constellation: %1").arg(constel) + "<br>"; res += q_("IAU Constellation: %1").arg(constel) + "<br>";
} }
if ((flags&SiderealTime) && (currentPlanet=="Earth")) if ((flags&SiderealTime) && (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>";
skipping to change at line 429 skipping to change at line 466
deg *= -1; deg *= -1;
map.insert("size", angularSize); map.insert("size", angularSize);
map.insert("size-dd", deg); map.insert("size-dd", deg);
map.insert("size-deg", StelUtils::radToDecDegStr(angularSize, 5)); map.insert("size-deg", StelUtils::radToDecDegStr(angularSize, 5));
map.insert("size-dms", StelUtils::radToDmsStr(angularSize, true)); map.insert("size-dms", StelUtils::radToDmsStr(angularSize, true));
// english name or designation & localized name // english name or designation & localized name
map.insert("name", getEnglishName()); map.insert("name", getEnglishName());
map.insert("localized-name", getNameI18n()); map.insert("localized-name", getNameI18n());
// 'above horizon' flag
map.insert("above-horizon", isAboveRealHorizon(core));
return map; return map;
} }
 End of changes. 6 change blocks. 
3 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/