Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/align/offlineastrometryparser.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 23 | { | |||
---|---|---|---|---|---|
46 | connect(this, &OfflineAstrometryParser::solverFailed, this, [&]() { parity = QString(); }); | 46 | connect(this, &OfflineAstrometryParser::solverFailed, this, [&]() { parity = QString(); }); | ||
47 | 47 | | |||
48 | } | 48 | } | ||
49 | 49 | | |||
50 | bool OfflineAstrometryParser::init() | 50 | bool OfflineAstrometryParser::init() | ||
51 | { | 51 | { | ||
52 | #ifdef Q_OS_OSX | 52 | #ifdef Q_OS_OSX | ||
53 | if (Options::astrometryConfFileIsInternal()) | 53 | if (Options::astrometryConfFileIsInternal()) | ||
54 | KSUtils::configureDefaultAstrometry(); | 54 | { | ||
55 | if(KSUtils::configureAstrometry()==false) | ||||
56 | { | ||||
57 | KMessageBox::information( | ||||
58 | nullptr, | ||||
59 | i18n( | ||||
60 | "Failed to properly configure astrometry config file. Please click the options button in the lower right of the Astrometry Tab in Ekos to correct your settings. Then try starting Ekos again."), | ||||
61 | i18n("Astrometry Config File Error"), "astrometry_configuration_failure_warning"); | ||||
62 | return false; | ||||
63 | } | ||||
64 | } | ||||
55 | #endif | 65 | #endif | ||
56 | 66 | | |||
57 | if (astrometryFilesOK) | 67 | if (astrometryFilesOK) | ||
58 | return true; | 68 | return true; | ||
59 | 69 | | |||
60 | if (astrometryNetOK() == false) | 70 | if (astrometryNetOK() == false) | ||
61 | { | 71 | { | ||
62 | if (align && align->isEnabled()) | 72 | if (align && align->isEnabled()) | ||
63 | KMessageBox::information( | 73 | KMessageBox::information( | ||
64 | nullptr, | 74 | nullptr, | ||
65 | i18n( | 75 | i18n( | ||
66 | "Failed to find astrometry.net binaries. Please ensure astrometry.net is installed and try again."), | 76 | "Failed to find astrometry.net binaries. Please click the options button in the lower right of the Astrometry Tab in Ekos to correct your settings and make sure that astrometry.net is installed. Then try starting Ekos again."), | ||
67 | i18n("Missing astrometry files"), "missing_astrometry_binaries_warning"); | 77 | i18n("Missing astrometry files"), "missing_astrometry_binaries_warning"); | ||
68 | 78 | | |||
69 | return false; | 79 | return false; | ||
70 | } | 80 | } | ||
71 | 81 | | |||
72 | astrometryFilesOK = true; | 82 | astrometryFilesOK = true; | ||
73 | 83 | | |||
74 | QString solverPath; | 84 | QString solverPath; | ||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 156 | { | |||
152 | last_fov_x = fov_x; | 162 | last_fov_x = fov_x; | ||
153 | last_fov_y = fov_y; | 163 | last_fov_y = fov_y; | ||
154 | double fov_lower = 0.10 * fov_x; | 164 | double fov_lower = 0.10 * fov_x; | ||
155 | double fov_upper = fov_x; | 165 | double fov_upper = fov_x; | ||
156 | QStringList indexFiles; | 166 | QStringList indexFiles; | ||
157 | QString astrometryDataDir; | 167 | QString astrometryDataDir; | ||
158 | bool indexesOK = true; | 168 | bool indexesOK = true; | ||
159 | 169 | | |||
160 | if (getAstrometryDataDir(astrometryDataDir) == false) | 170 | if (KSUtils::getAstrometryDataDir(astrometryDataDir) == false) | ||
161 | return; | 171 | return; | ||
162 | 172 | | |||
163 | QStringList nameFilter("*.fits"); | 173 | QStringList nameFilter("*.fits"); | ||
164 | QDir directory(astrometryDataDir); | 174 | QDir directory(astrometryDataDir); | ||
165 | QStringList indexList = directory.entryList(nameFilter); | 175 | QStringList indexList = directory.entryList(nameFilter); | ||
166 | 176 | | |||
167 | // JM 2018-09-26: Also add locally stored indexes. | 177 | // JM 2018-09-26: Also add locally stored indexes. | ||
168 | #ifdef Q_OS_LINUX | 178 | #ifdef Q_OS_LINUX | ||
▲ Show 20 Lines • Show All 314 Lines • Show Last 20 Lines |