summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2017-05-12 09:46:23 +0300
committerJasem Mutlaq <[email protected]>2017-05-12 09:46:23 +0300
commitfc16143af76aa6660f96048a525d77896bd5ff5e (patch)
tree6d54b7b9a1072cd5710f6a857f8ff44f938d7158
parent839b5e877962ed92e50af36c6f587aa44db4bf02 (diff)
Check offline astrometry.net version and if equal or less than 0.67 then --no-fits2fits must be enforced and vice versa
-rw-r--r--kstars/ekos/align/offlineastrometryparser.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/kstars/ekos/align/offlineastrometryparser.cpp b/kstars/ekos/align/offlineastrometryparser.cpp
index ee70772..bd87e7d 100644
--- a/kstars/ekos/align/offlineastrometryparser.cpp
+++ b/kstars/ekos/align/offlineastrometryparser.cpp
@@ -75,6 +75,36 @@ bool OfflineAstrometryParser::init()
}
astrometryFilesOK = true;
+
+ QProcess solveField;
+#ifdef Q_OS_OSX
+ // Please check if this works!
+ solveField.start("bash", QStringList() << "-c" << "solve-field | grep Revision");
+#else
+ solveField.start("bash", QStringList() << "-c" << "solve-field | grep Revision");
+#endif
+ solveField.waitForFinished();
+ QString output = solveField.readAllStandardOutput();
+ qDebug() << output;
+
+ if (output.isEmpty() == false)
+ {
+ QString version = output.mid(9, 4);
+
+ align->appendLogText(i18n("Detected Astrometry.net version %1", version));
+
+ if (version <= "0.67" && Options::astrometryUseNoFITS2FITS() == false)
+ {
+ Options::setAstrometryUseNoFITS2FITS(true);
+ align->appendLogText(i18n("Setting astrometry option --no-fits2fits"));
+ }
+ else if (version > "0.67" && Options::astrometryUseNoFITS2FITS())
+ {
+ Options::setAstrometryUseNoFITS2FITS(false);
+ align->appendLogText(i18n("Turning off option --no-fits2fits"));
+ }
+ }
+
return true;
}