StelMainScriptAPI.cpp   StelMainScriptAPI.cpp 
skipping to change at line 65 skipping to change at line 65
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
#include <QFile> #include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QRegExp> #include <QRegExp>
#include <QSet> #include <QSet>
#include <QStringList> #include <QStringList>
#include <QTemporaryFile> #include <QTemporaryFile>
#include <QTimer>
#include <QEventLoop>
#include <cmath> #include <cmath>
StelMainScriptAPI::StelMainScriptAPI(QObject *parent) : QObject(parent) StelMainScriptAPI::StelMainScriptAPI(QObject *parent) : QObject(parent)
{ {
if(StelSkyLayerMgr* smgr = GETSTELMODULE(StelSkyLayerMgr)) if(StelSkyLayerMgr* smgr = GETSTELMODULE(StelSkyLayerMgr))
{ {
connect(this, SIGNAL(requestLoadSkyImage(const QString&, con st QString&, double, double, double, double, double, double, double, double , double, double, bool)), smgr, SLOT(loadSkyImage(const QString&, const QSt ring&, double, double, double, double, double, double, double, double, doub le, double, bool))); connect(this, SIGNAL(requestLoadSkyImage(const QString&, con st QString&, double, double, double, double, double, double, double, double , double, double, bool)), smgr, SLOT(loadSkyImage(const QString&, const QSt ring&, double, double, double, double, double, double, double, double, doub le, double, bool)));
connect(this, SIGNAL(requestLoadSkyImageAltAz(const QString& , const QString&, double, double, double, double, double, double, double, d ouble, double, double, bool)), smgr, SLOT(loadSkyImageAltAz(const QString&, const QString&, double, double, double, double, double, double, double, do uble, double, double, bool))); connect(this, SIGNAL(requestLoadSkyImageAltAz(const QString& , const QString&, double, double, double, double, double, double, double, d ouble, double, double, bool)), smgr, SLOT(loadSkyImageAltAz(const QString&, const QString&, double, double, double, double, double, double, double, do uble, double, double, bool)));
connect(this, SIGNAL(requestRemoveSkyImage(const QString&)), smgr, SLOT(removeSkyLayer(const QString&))); connect(this, SIGNAL(requestRemoveSkyImage(const QString&)), smgr, SLOT(removeSkyLayer(const QString&)));
skipping to change at line 178 skipping to change at line 180
// core->setJDay(JD); // core->setJDay(JD);
// } // }
// } // }
} }
QString StelMainScriptAPI::getDate(const QString& spec) QString StelMainScriptAPI::getDate(const QString& spec)
{ {
if (spec=="utc") if (spec=="utc")
return StelUtils::julianDayToISO8601String(getJDay()); return StelUtils::julianDayToISO8601String(getJDay());
else else
return StelUtils::julianDayToISO8601String(getJDay()+StelUti ls::getGMTShiftFromQT(getJDay())/24); return StelUtils::julianDayToISO8601String(getJDay()+StelApp ::getInstance().getCore()->getUTCOffset(getJDay())/24);
} }
QString StelMainScriptAPI::getDeltaT() const QString StelMainScriptAPI::getDeltaT() const
{ {
return StelUtils::hoursToHmsStr(StelApp::getInstance().getCore()->ge tDeltaT()/3600.); return StelUtils::hoursToHmsStr(StelApp::getInstance().getCore()->ge tDeltaT()/3600.);
} }
QString StelMainScriptAPI::getDeltaTAlgorithm() const QString StelMainScriptAPI::getDeltaTAlgorithm() const
{ {
return StelApp::getInstance().getCore()->getCurrentDeltaTAlgorithmKe y(); return StelApp::getInstance().getCore()->getCurrentDeltaTAlgorithmKe y();
skipping to change at line 794 skipping to change at line 796
jd += (unit * delta); jd += (unit * delta);
else if (nowRe.capturedTexts().at(3) == "-") else if (nowRe.capturedTexts().at(3) == "-")
jd -= (unit * delta); jd -= (unit * delta);
return jd; return jd;
} }
qWarning() << "StelMainScriptAPI::jdFromDateString error: date strin g" << dt << "not recognised, returning \"now\""; qWarning() << "StelMainScriptAPI::jdFromDateString error: date strin g" << dt << "not recognised, returning \"now\"";
return StelUtils::getJDFromSystem(); return StelUtils::getJDFromSystem();
} }
void StelMainScriptAPI::wait(double t) {
QEventLoop loop;
QTimer timer;
timer.setInterval(1000*t);
connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
timer.start();
loop.exec();
}
void StelMainScriptAPI::waitFor(const QString& dt, const QString& spec)
{
double deltaJD = jdFromDateString(dt, spec) - getJDay();
double timeSpeed = getTimeRate();
if (timeSpeed == 0.) { qDebug() << "waitFor() called with no time pa
ssing - would be infinite. not waiting!"; return;}
QEventLoop loop;
QTimer timer;
int interval=1000*deltaJD*86400/timeSpeed;
//qDebug() << "timeSpeed is" << timeSpeed << " interval:" << interva
l;
timer.setInterval(interval);
connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
timer.start();
loop.exec();
}
void StelMainScriptAPI::selectObjectByName(const QString& name, bool pointe r) void StelMainScriptAPI::selectObjectByName(const QString& name, bool pointe r)
{ {
StelObjectMgr* omgr = GETSTELMODULE(StelObjectMgr); StelObjectMgr* omgr = GETSTELMODULE(StelObjectMgr);
omgr->setFlagSelectedObjectPointer(pointer); omgr->setFlagSelectedObjectPointer(pointer);
if (name.isEmpty() || !omgr->findAndSelect(name)) if (name.isEmpty() || !omgr->findAndSelect(name))
{ {
omgr->unSelect(); omgr->unSelect();
} }
} }
skipping to change at line 873 skipping to change at line 899
map.insert("altitude-geometric", alt*180./M_PI); map.insert("altitude-geometric", alt*180./M_PI);
map.insert("azimuth-geometric", az*180./M_PI); map.insert("azimuth-geometric", az*180./M_PI);
// galactic long/lat // galactic long/lat
pos = obj->getGalacticPos(core); pos = obj->getGalacticPos(core);
StelUtils::rectToSphe(&glong, &glat, pos); StelUtils::rectToSphe(&glong, &glat, pos);
map.insert("glong", glong*180./M_PI); map.insert("glong", glong*180./M_PI);
map.insert("glat", glat*180./M_PI); map.insert("glat", glat*180./M_PI);
if (core->getCurrentLocation().planetName == "Earth") // supergalactic long/lat
{ pos = obj->getSupergalacticPos(core);
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem); StelUtils::rectToSphe(&glong, &glat, pos);
double ra_equ, dec_equ, lambda, beta; map.insert("sglong", glong*180./M_PI);
// J2000 map.insert("sglat", glat*180./M_PI);
double eclJ2000 = ssmgr->getEarth()->getRotObliquity(2451545
.0); SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
double ecl = ssmgr->getEarth()->getRotObliquity(core->getJDE double ra_equ, dec_equ, lambda, beta;
()); // J2000
double eclJ2000 = ssmgr->getEarth()->getRotObliquity(2451545.0);
// ecliptic longitude/latitude (J2000 frame) double ecl = ssmgr->getEarth()->getRotObliquity(core->getJDE());
StelUtils::rectToSphe(&ra_equ,&dec_equ, obj->getJ2000Equator
ialPos(core)); // ecliptic longitude/latitude (J2000 frame)
StelUtils::equToEcl(ra_equ, dec_equ, eclJ2000, &lambda, &bet StelUtils::rectToSphe(&ra_equ,&dec_equ, obj->getJ2000EquatorialPos(c
a); ore));
if (lambda<0) lambda+=2.0*M_PI; StelUtils::equToEcl(ra_equ, dec_equ, eclJ2000, &lambda, &beta);
map.insert("elongJ2000", lambda*180./M_PI); if (lambda<0) lambda+=2.0*M_PI;
map.insert("elatJ2000", beta*180./M_PI); map.insert("elongJ2000", lambda*180./M_PI);
map.insert("elatJ2000", beta*180./M_PI);
if (QString("Earth Sun").contains(core->getCurrentLocation().planetN
ame))
{
// ecliptic longitude/latitude // ecliptic longitude/latitude
StelUtils::rectToSphe(&ra_equ,&dec_equ, obj->getEquinoxEquat orialPos(core)); StelUtils::rectToSphe(&ra_equ,&dec_equ, obj->getEquinoxEquat orialPos(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;
map.insert("elong", lambda*180./M_PI); map.insert("elong", lambda*180./M_PI);
map.insert("elat", beta*180./M_PI); map.insert("elat", beta*180./M_PI);
} }
// magnitude // magnitude
map.insert("vmag", obj->getVMagnitude(core)); map.insert("vmag", obj->getVMagnitude(core));
skipping to change at line 927 skipping to change at line 959
map.insert("phase", phase); map.insert("phase", phase);
map.insert("illumination", 100.*phase); map.insert("illumination", 100.*phase);
double phaseAngle = ssmgr->getPhaseAngleForPlanet(name); double phaseAngle = ssmgr->getPhaseAngleForPlanet(name);
map.insert("phase-angle", phaseAngle); map.insert("phase-angle", phaseAngle);
map.insert("phase-angle-dms", StelUtils::radToDmsStr(phaseAn gle)); map.insert("phase-angle-dms", StelUtils::radToDmsStr(phaseAn gle));
map.insert("phase-angle-deg", StelUtils::radToDecDegStr(phas eAngle)); map.insert("phase-angle-deg", StelUtils::radToDecDegStr(phas eAngle));
double elongation = ssmgr->getElongationForPlanet(name); double elongation = ssmgr->getElongationForPlanet(name);
map.insert("elongation", elongation); map.insert("elongation", elongation);
map.insert("elongation-dms", StelUtils::radToDmsStr(elongati on)); map.insert("elongation-dms", StelUtils::radToDmsStr(elongati on));
map.insert("elongation-deg", StelUtils::radToDecDegStr(elong ation)); map.insert("elongation-deg", StelUtils::radToDecDegStr(elong ation));
map.insert("ptype", ssmgr->getPlanetType(name));
} }
// localized name // localized name
map.insert("localized-name", obj->getNameI18n()); map.insert("localized-name", obj->getNameI18n());
return map; return map;
} }
QVariantMap StelMainScriptAPI::getSelectedObjectInfo() QVariantMap StelMainScriptAPI::getSelectedObjectInfo()
{ {
skipping to change at line 1006 skipping to change at line 1039
map.insert("altitude-geometric", alt*180./M_PI); map.insert("altitude-geometric", alt*180./M_PI);
map.insert("azimuth-geometric", az*180./M_PI); map.insert("azimuth-geometric", az*180./M_PI);
// galactic long/lat // galactic long/lat
pos = obj->getGalacticPos(core); pos = obj->getGalacticPos(core);
StelUtils::rectToSphe(&glong, &glat, pos); StelUtils::rectToSphe(&glong, &glat, pos);
map.insert("glong", glong*180./M_PI); map.insert("glong", glong*180./M_PI);
map.insert("glat", glat*180./M_PI); map.insert("glat", glat*180./M_PI);
if (core->getCurrentLocation().planetName == "Earth") // supergalactic long/lat
{ pos = obj->getSupergalacticPos(core);
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem); StelUtils::rectToSphe(&glong, &glat, pos);
double ra_equ, dec_equ, lambda, beta; map.insert("sglong", glong*180./M_PI);
// J2000 map.insert("sglat", glat*180./M_PI);
double eclJ2000 = ssmgr->getEarth()->getRotObliquity(2451545
.0); SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
double ecl = ssmgr->getEarth()->getRotObliquity(core->getJDE double ra_equ, dec_equ, lambda, beta;
()); // J2000
double eclJ2000 = ssmgr->getEarth()->getRotObliquity(2451545.0);
// ecliptic longitude/latitude (J2000 frame) double ecl = ssmgr->getEarth()->getRotObliquity(core->getJDE());
StelUtils::rectToSphe(&ra_equ,&dec_equ, obj->getJ2000Equator
ialPos(core)); // ecliptic longitude/latitude (J2000 frame)
StelUtils::equToEcl(ra_equ, dec_equ, eclJ2000, &lambda, &bet StelUtils::rectToSphe(&ra_equ,&dec_equ, obj->getJ2000EquatorialPos(c
a); ore));
if (lambda<0) lambda+=2.0*M_PI; StelUtils::equToEcl(ra_equ, dec_equ, eclJ2000, &lambda, &beta);
map.insert("elongJ2000", lambda*180./M_PI); if (lambda<0) lambda+=2.0*M_PI;
map.insert("elatJ2000", beta*180./M_PI); map.insert("elongJ2000", lambda*180./M_PI);
map.insert("elatJ2000", beta*180./M_PI);
if (QString("Earth Sun").contains(core->getCurrentLocation().planetN
ame))
{
// ecliptic longitude/latitude // ecliptic longitude/latitude
StelUtils::rectToSphe(&ra_equ,&dec_equ, obj->getEquinoxEquat orialPos(core)); StelUtils::rectToSphe(&ra_equ,&dec_equ, obj->getEquinoxEquat orialPos(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;
map.insert("elong", lambda*180./M_PI); map.insert("elong", lambda*180./M_PI);
map.insert("elat", beta*180./M_PI); map.insert("elat", beta*180./M_PI);
} }
// magnitude // magnitude
map.insert("vmag", obj->getVMagnitude(core)); map.insert("vmag", obj->getVMagnitude(core));
skipping to change at line 1060 skipping to change at line 1099
map.insert("phase", phase); map.insert("phase", phase);
map.insert("illumination", 100.*phase); map.insert("illumination", 100.*phase);
double phaseAngle = ssmgr->getPhaseAngleForPlanet(obj->getEn glishName()); double phaseAngle = ssmgr->getPhaseAngleForPlanet(obj->getEn glishName());
map.insert("phase-angle", phaseAngle); map.insert("phase-angle", phaseAngle);
map.insert("phase-angle-dms", StelUtils::radToDmsStr(phaseAn gle)); map.insert("phase-angle-dms", StelUtils::radToDmsStr(phaseAn gle));
map.insert("phase-angle-deg", StelUtils::radToDecDegStr(phas eAngle)); map.insert("phase-angle-deg", StelUtils::radToDecDegStr(phas eAngle));
double elongation = ssmgr->getElongationForPlanet(obj->getEn glishName()); double elongation = ssmgr->getElongationForPlanet(obj->getEn glishName());
map.insert("elongation", elongation); map.insert("elongation", elongation);
map.insert("elongation-dms", StelUtils::radToDmsStr(elongati on)); map.insert("elongation-dms", StelUtils::radToDmsStr(elongati on));
map.insert("elongation-deg", StelUtils::radToDecDegStr(elong ation)); map.insert("elongation-deg", StelUtils::radToDecDegStr(elong ation));
map.insert("ptype", ssmgr->getPlanetType(obj->getEnglishName ()));
} }
// english name or designation & localized name // english name or designation & localized name
map.insert("name", obj->getEnglishName()); map.insert("name", obj->getEnglishName());
map.insert("localized-name", obj->getNameI18n()); map.insert("localized-name", obj->getNameI18n());
return map; return map;
} }
void StelMainScriptAPI::clear(const QString& state) void StelMainScriptAPI::clear(const QString& state)
skipping to change at line 1095 skipping to change at line 1135
skyd->setFlagTwinkle(true); skyd->setFlagTwinkle(true);
skyd->setFlagLuminanceAdaptation(true); skyd->setFlagLuminanceAdaptation(true);
ssmgr->setFlagPlanets(true); ssmgr->setFlagPlanets(true);
ssmgr->setFlagHints(false); ssmgr->setFlagHints(false);
ssmgr->setFlagOrbits(false); ssmgr->setFlagOrbits(false);
ssmgr->setFlagMoonScale(false); ssmgr->setFlagMoonScale(false);
ssmgr->setFlagTrails(false); ssmgr->setFlagTrails(false);
mmgr->setZHR(10); mmgr->setZHR(10);
glmgr->setFlagAzimuthalGrid(false); glmgr->setFlagAzimuthalGrid(false);
glmgr->setFlagGalacticGrid(false); glmgr->setFlagGalacticGrid(false);
glmgr->setFlagSupergalacticGrid(false);
glmgr->setFlagEquatorGrid(false); glmgr->setFlagEquatorGrid(false);
glmgr->setFlagEquatorJ2000Grid(false);
glmgr->setFlagEquatorLine(false); glmgr->setFlagEquatorLine(false);
glmgr->setFlagEquatorJ2000Line(false);
glmgr->setFlagEclipticLine(false); glmgr->setFlagEclipticLine(false);
glmgr->setFlagEclipticJ2000Line(false); glmgr->setFlagEclipticJ2000Line(false);
glmgr->setFlagMeridianLine(false); glmgr->setFlagMeridianLine(false);
glmgr->setFlagLongitudeLine(false); glmgr->setFlagLongitudeLine(false);
glmgr->setFlagHorizonLine(false); glmgr->setFlagHorizonLine(false);
glmgr->setFlagColureLines(false); glmgr->setFlagColureLines(false);
glmgr->setFlagPrimeVerticalLine(false); glmgr->setFlagPrimeVerticalLine(false);
glmgr->setFlagGalacticEquatorLine(false); glmgr->setFlagGalacticEquatorLine(false);
glmgr->setFlagEquatorJ2000Grid(false); glmgr->setFlagSupergalacticEquatorLine(false);
glmgr->setFlagCircumpolarCircles(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagEclipticGrid(false); glmgr->setFlagEclipticGrid(false);
glmgr->setFlagEclipticJ2000Grid(false); glmgr->setFlagEclipticJ2000Grid(false);
glmgr->setFlagCelestialJ2000Poles(false);
glmgr->setFlagCelestialPoles(false);
glmgr->setFlagZenithNadir(false);
glmgr->setFlagEclipticJ2000Poles(false);
glmgr->setFlagEclipticPoles(false);
glmgr->setFlagGalacticPoles(false);
glmgr->setFlagSupergalacticPoles(false);
glmgr->setFlagEquinoxJ2000Points(false);
glmgr->setFlagEquinoxPoints(false);
lmgr->setFlagCardinalsPoints(false); lmgr->setFlagCardinalsPoints(false);
cmgr->setFlagLines(false); cmgr->setFlagLines(false);
cmgr->setFlagLabels(false); cmgr->setFlagLabels(false);
cmgr->setFlagBoundaries(false); cmgr->setFlagBoundaries(false);
cmgr->setFlagArt(false); cmgr->setFlagArt(false);
smgr->setFlagLabels(false); smgr->setFlagLabels(false);
ssmgr->setFlagLabels(false); ssmgr->setFlagLabels(false);
nmgr->setFlagHints(false); nmgr->setFlagHints(false);
lmgr->setFlagLandscape(true); lmgr->setFlagLandscape(true);
lmgr->setFlagAtmosphere(true); lmgr->setFlagAtmosphere(true);
skipping to change at line 1134 skipping to change at line 1188
skyd->setFlagTwinkle(false); skyd->setFlagTwinkle(false);
skyd->setFlagLuminanceAdaptation(false); skyd->setFlagLuminanceAdaptation(false);
ssmgr->setFlagPlanets(true); ssmgr->setFlagPlanets(true);
ssmgr->setFlagHints(false); ssmgr->setFlagHints(false);
ssmgr->setFlagOrbits(false); ssmgr->setFlagOrbits(false);
ssmgr->setFlagMoonScale(false); ssmgr->setFlagMoonScale(false);
ssmgr->setFlagTrails(false); ssmgr->setFlagTrails(false);
mmgr->setZHR(0); mmgr->setZHR(0);
glmgr->setFlagAzimuthalGrid(false); glmgr->setFlagAzimuthalGrid(false);
glmgr->setFlagGalacticGrid(false); glmgr->setFlagGalacticGrid(false);
glmgr->setFlagSupergalacticGrid(false);
glmgr->setFlagEquatorGrid(true); glmgr->setFlagEquatorGrid(true);
glmgr->setFlagEquatorJ2000Grid(false);
glmgr->setFlagEquatorLine(false); glmgr->setFlagEquatorLine(false);
glmgr->setFlagEquatorJ2000Line(false);
glmgr->setFlagEclipticLine(false); glmgr->setFlagEclipticLine(false);
glmgr->setFlagMeridianLine(false); glmgr->setFlagMeridianLine(false);
glmgr->setFlagLongitudeLine(false); glmgr->setFlagLongitudeLine(false);
glmgr->setFlagHorizonLine(false); glmgr->setFlagHorizonLine(false);
glmgr->setFlagGalacticEquatorLine(false); glmgr->setFlagGalacticEquatorLine(false);
glmgr->setFlagEquatorJ2000Grid(false); glmgr->setFlagSupergalacticEquatorLine(false);
glmgr->setFlagCircumpolarCircles(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagCelestialJ2000Poles(false);
glmgr->setFlagCelestialPoles(false);
glmgr->setFlagZenithNadir(false);
glmgr->setFlagEclipticJ2000Poles(false);
glmgr->setFlagEclipticPoles(false);
glmgr->setFlagGalacticPoles(false);
glmgr->setFlagSupergalacticPoles(false);
glmgr->setFlagEquinoxJ2000Points(false);
glmgr->setFlagEquinoxPoints(false);
lmgr->setFlagCardinalsPoints(false); lmgr->setFlagCardinalsPoints(false);
cmgr->setFlagLines(true); cmgr->setFlagLines(true);
cmgr->setFlagLabels(true); cmgr->setFlagLabels(true);
cmgr->setFlagBoundaries(true); cmgr->setFlagBoundaries(true);
cmgr->setFlagArt(false); cmgr->setFlagArt(false);
smgr->setFlagLabels(true); smgr->setFlagLabels(true);
ssmgr->setFlagLabels(true); ssmgr->setFlagLabels(true);
nmgr->setFlagHints(true); nmgr->setFlagHints(true);
lmgr->setFlagLandscape(false); lmgr->setFlagLandscape(false);
lmgr->setFlagAtmosphere(false); lmgr->setFlagAtmosphere(false);
skipping to change at line 1168 skipping to change at line 1236
skyd->setFlagTwinkle(false); skyd->setFlagTwinkle(false);
skyd->setFlagLuminanceAdaptation(false); skyd->setFlagLuminanceAdaptation(false);
ssmgr->setFlagPlanets(false); ssmgr->setFlagPlanets(false);
ssmgr->setFlagHints(false); ssmgr->setFlagHints(false);
ssmgr->setFlagOrbits(false); ssmgr->setFlagOrbits(false);
ssmgr->setFlagMoonScale(false); ssmgr->setFlagMoonScale(false);
ssmgr->setFlagTrails(false); ssmgr->setFlagTrails(false);
mmgr->setZHR(0); mmgr->setZHR(0);
glmgr->setFlagAzimuthalGrid(false); glmgr->setFlagAzimuthalGrid(false);
glmgr->setFlagGalacticGrid(false); glmgr->setFlagGalacticGrid(false);
glmgr->setFlagSupergalacticGrid(false);
glmgr->setFlagEquatorGrid(false); glmgr->setFlagEquatorGrid(false);
glmgr->setFlagEquatorJ2000Grid(false);
glmgr->setFlagEquatorLine(false); glmgr->setFlagEquatorLine(false);
glmgr->setFlagEquatorJ2000Line(false);
glmgr->setFlagEclipticLine(false); glmgr->setFlagEclipticLine(false);
glmgr->setFlagMeridianLine(false); glmgr->setFlagMeridianLine(false);
glmgr->setFlagLongitudeLine(false); glmgr->setFlagLongitudeLine(false);
glmgr->setFlagHorizonLine(false); glmgr->setFlagHorizonLine(false);
glmgr->setFlagGalacticEquatorLine(false); glmgr->setFlagGalacticEquatorLine(false);
glmgr->setFlagEquatorJ2000Grid(false); glmgr->setFlagSupergalacticEquatorLine(false);
glmgr->setFlagCircumpolarCircles(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagCelestialJ2000Poles(false);
glmgr->setFlagCelestialPoles(false);
glmgr->setFlagZenithNadir(false);
glmgr->setFlagEclipticJ2000Poles(false);
glmgr->setFlagEclipticPoles(false);
glmgr->setFlagGalacticPoles(false);
glmgr->setFlagSupergalacticPoles(false);
glmgr->setFlagEquinoxJ2000Points(false);
glmgr->setFlagEquinoxPoints(false);
lmgr->setFlagCardinalsPoints(false); lmgr->setFlagCardinalsPoints(false);
cmgr->setFlagLines(false); cmgr->setFlagLines(false);
cmgr->setFlagLabels(false); cmgr->setFlagLabels(false);
cmgr->setFlagBoundaries(false); cmgr->setFlagBoundaries(false);
cmgr->setFlagArt(false); cmgr->setFlagArt(false);
smgr->setFlagLabels(false); smgr->setFlagLabels(false);
ssmgr->setFlagLabels(false); ssmgr->setFlagLabels(false);
nmgr->setFlagHints(false); nmgr->setFlagHints(false);
lmgr->setFlagLandscape(false); lmgr->setFlagLandscape(false);
lmgr->setFlagAtmosphere(false); lmgr->setFlagAtmosphere(false);
skipping to change at line 1201 skipping to change at line 1283
movmgr->setMountMode(StelMovementMgr::MountGalactic); movmgr->setMountMode(StelMovementMgr::MountGalactic);
skyd->setFlagTwinkle(false); skyd->setFlagTwinkle(false);
skyd->setFlagLuminanceAdaptation(false); skyd->setFlagLuminanceAdaptation(false);
ssmgr->setFlagPlanets(false); ssmgr->setFlagPlanets(false);
ssmgr->setFlagHints(false); ssmgr->setFlagHints(false);
ssmgr->setFlagOrbits(false); ssmgr->setFlagOrbits(false);
ssmgr->setFlagMoonScale(false); ssmgr->setFlagMoonScale(false);
ssmgr->setFlagTrails(false); ssmgr->setFlagTrails(false);
mmgr->setZHR(0); mmgr->setZHR(0);
glmgr->setFlagAzimuthalGrid(false); glmgr->setFlagAzimuthalGrid(false);
glmgr->setFlagGalacticGrid(false); glmgr->setFlagGalacticGrid(true);
glmgr->setFlagSupergalacticGrid(false);
glmgr->setFlagEquatorGrid(false); glmgr->setFlagEquatorGrid(false);
glmgr->setFlagEquatorJ2000Grid(false);
glmgr->setFlagEquatorLine(false); glmgr->setFlagEquatorLine(false);
glmgr->setFlagEquatorJ2000Line(false);
glmgr->setFlagEclipticLine(false); glmgr->setFlagEclipticLine(false);
glmgr->setFlagMeridianLine(false); glmgr->setFlagMeridianLine(false);
glmgr->setFlagLongitudeLine(false); glmgr->setFlagLongitudeLine(false);
glmgr->setFlagHorizonLine(false); glmgr->setFlagHorizonLine(false);
glmgr->setFlagGalacticEquatorLine(false); glmgr->setFlagGalacticEquatorLine(false);
glmgr->setFlagSupergalacticEquatorLine(false);
glmgr->setFlagCircumpolarCircles(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagCelestialJ2000Poles(false);
glmgr->setFlagCelestialPoles(false);
glmgr->setFlagZenithNadir(false);
glmgr->setFlagEclipticJ2000Poles(false);
glmgr->setFlagEclipticPoles(false);
glmgr->setFlagGalacticPoles(false);
glmgr->setFlagSupergalacticPoles(false);
glmgr->setFlagEquinoxJ2000Points(false);
glmgr->setFlagEquinoxPoints(false);
lmgr->setFlagCardinalsPoints(false);
cmgr->setFlagLines(false);
cmgr->setFlagLabels(false);
cmgr->setFlagBoundaries(false);
cmgr->setFlagArt(false);
smgr->setFlagLabels(false);
ssmgr->setFlagLabels(false);
nmgr->setFlagHints(false);
lmgr->setFlagLandscape(false);
lmgr->setFlagAtmosphere(false);
lmgr->setFlagFog(false);
zl->setFlagShow(false);
}
else if (state.toLower() == "supergalactic")
{
movmgr->setMountMode(StelMovementMgr::MountSupergalactic);
skyd->setFlagTwinkle(false);
skyd->setFlagLuminanceAdaptation(false);
ssmgr->setFlagPlanets(false);
ssmgr->setFlagHints(false);
ssmgr->setFlagOrbits(false);
ssmgr->setFlagMoonScale(false);
ssmgr->setFlagTrails(false);
mmgr->setZHR(0);
glmgr->setFlagAzimuthalGrid(false);
glmgr->setFlagGalacticGrid(false);
glmgr->setFlagSupergalacticGrid(true);
glmgr->setFlagEquatorGrid(false);
glmgr->setFlagEquatorJ2000Grid(false); glmgr->setFlagEquatorJ2000Grid(false);
glmgr->setFlagEquatorLine(false);
glmgr->setFlagEquatorJ2000Line(false);
glmgr->setFlagEclipticLine(false);
glmgr->setFlagMeridianLine(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagHorizonLine(false);
glmgr->setFlagGalacticEquatorLine(false);
glmgr->setFlagSupergalacticEquatorLine(false);
glmgr->setFlagCircumpolarCircles(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagCelestialJ2000Poles(false);
glmgr->setFlagCelestialPoles(false);
glmgr->setFlagZenithNadir(false);
glmgr->setFlagEclipticJ2000Poles(false);
glmgr->setFlagEclipticPoles(false);
glmgr->setFlagGalacticPoles(false);
glmgr->setFlagSupergalacticPoles(false);
glmgr->setFlagEquinoxJ2000Points(false);
glmgr->setFlagEquinoxPoints(false);
lmgr->setFlagCardinalsPoints(false); lmgr->setFlagCardinalsPoints(false);
cmgr->setFlagLines(false); cmgr->setFlagLines(false);
cmgr->setFlagLabels(false); cmgr->setFlagLabels(false);
cmgr->setFlagBoundaries(false); cmgr->setFlagBoundaries(false);
cmgr->setFlagArt(false); cmgr->setFlagArt(false);
smgr->setFlagLabels(false); smgr->setFlagLabels(false);
ssmgr->setFlagLabels(false); ssmgr->setFlagLabels(false);
nmgr->setFlagHints(false); nmgr->setFlagHints(false);
lmgr->setFlagLandscape(false); lmgr->setFlagLandscape(false);
lmgr->setFlagAtmosphere(false); lmgr->setFlagAtmosphere(false);
lmgr->setFlagFog(false); lmgr->setFlagFog(false);
zl->setFlagShow(false); zl->setFlagShow(false);
} }
else else
{ {
qWarning() << "WARNING clear(" << state << ") - state not kn own"; qWarning() << "WARNING clear(" << state << ") - state not kn own";
} }
} }
double StelMainScriptAPI::getViewAltitudeAngle() double StelMainScriptAPI::getViewAltitudeAngle()
{ {
const Vec3d& current = StelApp::getInstance().getCore()->j2000ToAltA z(GETSTELMODULE(StelMovementMgr)->getViewDirectionJ2000(), StelCore::Refrac tionOff); const Vec3d& current = StelApp::getInstance().getCore()->j2000ToAltA z(GETSTELMODULE(StelMovementMgr)->getViewDirectionJ2000(), StelCore::Refrac tionOff);
double alt, azi; double alt, azi;
 End of changes. 28 change blocks. 
41 lines changed or deleted 184 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/