8#include "polaralignmentassistant.h"
13#include "kstarsdata.h"
14#include "ksmessagebox.h"
15#include "ekos/auxiliary/stellarsolverprofile.h"
16#include "ekos/auxiliary/solverutils.h"
18#include "polaralignwidget.h"
19#include <ekos_align_debug.h>
21#define PAA_VERSION "v3.0"
29 {PAH_FIRST_CAPTURE,
I18N_NOOP(
"First Capture")},
30 {PAH_FIRST_SOLVE,
I18N_NOOP(
"First Solve")},
32 {PAH_FIRST_ROTATE,
I18N_NOOP(
"First Rotation")},
33 {PAH_FIRST_SETTLE,
I18N_NOOP(
"First Settle")},
34 {PAH_SECOND_CAPTURE,
I18N_NOOP(
"Second Capture")},
35 {PAH_SECOND_SOLVE,
I18N_NOOP(
"Second Solve")},
36 {PAH_SECOND_ROTATE,
I18N_NOOP(
"Second Rotation")},
37 {PAH_SECOND_SETTLE,
I18N_NOOP(
"Second Settle")},
38 {PAH_THIRD_CAPTURE,
I18N_NOOP(
"Third Capture")},
39 {PAH_THIRD_SOLVE,
I18N_NOOP(
"Third Solve")},
40 {PAH_STAR_SELECT,
I18N_NOOP(
"Select Star")},
42 {PAH_POST_REFRESH,
I18N_NOOP(
"Refresh Complete")},
48 polarAlignWidget =
new PolarAlignWidget();
51 m_AlignInstance = parent;
59 setPAHRefreshAlgorithm(
static_cast<RefreshAlgorithm
>(index));
61 starCorrespondencePAH.reset();
65 connect(
this, &PolarAlignmentAssistant::PAHEnabled, [&](
bool enabled)
81 hemisphere = KStarsData::Instance()->geo()->lat()->Degrees() > 0 ? NORTH_HEMISPHERE : SOUTH_HEMISPHERE;
87PolarAlignmentAssistant::~PolarAlignmentAssistant()
91void PolarAlignmentAssistant::showUpdatedError(
bool show)
101void PolarAlignmentAssistant::syncMountSpeed(
const QString &speed)
110void PolarAlignmentAssistant::setEnabled(
bool enabled)
114 emit PAHEnabled(enabled);
122 PAHWidgets->setToolTip(
i18n(
"<p>Polar Alignment tool requires a German Equatorial Mount.</p>"));
129void PolarAlignmentAssistant::startSolver()
131 auto profiles = getDefaultAlignOptionsProfiles();
132 auto parameters = profiles.at(Options::solveOptionsProfile());
134 parameters.search_radius = parameters.search_radius * 2;
135 constexpr double solverTimeout = 10.0;
141 m_Solver->useScale(Options::astrometryUseImageScale(), m_LastPixscale * 0.9, m_LastPixscale * 1.1);
142 m_Solver->usePosition(
true, m_LastRa, m_LastDec);
143 m_Solver->setHealpix(m_IndexToUse, m_HealpixToUse);
144 m_Solver->runSolver(m_ImageData);
147void PolarAlignmentAssistant::solverDone(
bool timedOut,
bool success,
const FITSImage::Solution &solution,
150 disconnect(m_Solver.get(), &SolverUtils::done,
this, &PolarAlignmentAssistant::solverDone);
152 if (m_PAHStage != PAH_REFRESH)
172 m_Solver->getSolutionHealpix(&m_IndexToUse, &m_HealpixToUse);
178 emit captureAndSolve();
183 emit updatedErrorsChanged(-1, -1, -1);
184 emit captureAndSolve();
188 m_NumHealpixFailures = 0;
190 const double ra = solution.ra;
191 const double dec = solution.dec;
192 m_LastRa = solution.ra;
193 m_LastDec = solution.dec;
194 m_LastOrientation = solution.orientation;
195 m_LastPixscale = solution.pixscale;
197 emit newLog(
QString(
"Refresh solver success %1s: ra %2 dec %3 scale %4")
199 .arg(dec, 0,
'f', 3).arg(solution.pixscale));
211 m_AlignView->injectWCS(solution.orientation, ra, dec, solution.pixscale,
eastToTheRight,
false);
212 updatePlateSolveTriangle(m_ImageData);
215 emit newLog(
QString(
"Could not estimate mount rotation"));
218 emit captureAndSolve();
271void leftArrow(
QPainter *painter,
int w,
int h)
293void PolarAlignmentAssistant::drawArrows(
double azError,
double altError)
295 constexpr double minError = 20.0 / 3600.0;
339bool PolarAlignmentAssistant::detectStarsPAHRefresh(
QList<Edge> *stars,
int num,
int x,
int y,
int *
starIndex)
345 QVariantMap settings;
346 settings[
"optionsProfileIndex"] = Options::solveOptionsProfile();
347 settings[
"optionsProfileGroup"] =
static_cast<int>(Ekos::AlignProfiles);
348 m_ImageData->setSourceExtractorSettings(settings);
351 m_ImageData->findStars(ALGORITHM_SEP).waitForFinished();
353 QString debugString =
QString(
"PAA Refresh: Detected %1 stars (%2s)")
354 .
arg(m_ImageData->getStarCenters().size()).
arg(timer.elapsed() / 1000.0, 5,
'f', 3);
359 std::sort(detectedStars.begin(), detectedStars.end(), [](
const Edge *
edge1,
const Edge *
edge2) ->
bool { return edge1->sum > edge2->sum;});
364 for (
int i = 0; i < detectedStars.size(); i++)
366 double dx = detectedStars[i]->x - x;
367 double dy = detectedStars[i]->y - y;
368 double dist = dx * dx + dy * dy;
378 stars->append(*(detectedStars[i]));
383 stars->append(*(detectedStars[
bestIndex]));
393 detectedStars.clear();
395 return stars->count();
398void PolarAlignmentAssistant::updateRefreshDisplay(
double azE,
double altE)
407 QString debugString =
QString(
"PAA Refresh(%1): Corrected az: %2 alt: %4 total: %6")
410 emit newLog(debugString);
414void PolarAlignmentAssistant::processPAHRefresh()
416 m_AlignView->setStarCircle();
435 if ((
pAHRefreshAlgorithm->currentIndex() == MOVE_STAR_UPDATE_ERR_ALGORITHM) || (refreshIteration == 0))
444 detectStarsPAHRefresh(&stars, 100, correctionFrom.x(), correctionFrom.y(), &
clickedStarIndex);
447 debugString =
QString(
"PAA Refresh(%1): Didn't find the clicked star near %2,%3")
448 .
arg(refreshIteration).
arg(correctionFrom.x()).
arg(correctionFrom.y());
451 emit newAlignTableResult(Align::ALIGN_RESULT_FAILED);
452 emit captureAndSolve();
456 debugString =
QString(
"PAA Refresh(%1): Refresh star(%2,%3) is index %4 with offset %5 %6")
457 .
arg(refreshIteration + 1).
arg(correctionFrom.x(), 4,
'f', 0)
469 if (refreshIteration++ == 0)
477 emit newCorrectionVector(
QLineF(correctionFrom, correctionTo));
478 emit newFrame(m_AlignView);
487 starCorrespondencePAH.find(stars, 200.0, &starMap,
false, 0.40);
491 for (
int i = 0; i < starMap.size(); ++i)
493 if (starMap[i] == starCorrespondencePAH.guideStar())
495 dx = stars[i].x - correctionFrom.x();
496 dy = stars[i].y - correctionFrom.y();
504 for (
int i = 0; i < starMap.size(); ++i)
506 if (starMap[i] != -1)
509 debugString =
QString(
"PAA Refresh(%1): starMap %2").
arg(refreshIteration).
arg(
allOnes ?
"ALL -1's" :
"not all -1's");
518 debugString =
QString(
"PAA Refresh(%1): User's star is now at %2,%3, with movement = %4,%5").
arg(refreshIteration)
526 updateRefreshDisplay(
azE,
altE);
527 debugString =
QString(
"PAA Refresh(%1): %2,%3 --> %4,%5 @ %6,%7")
528 .
arg(refreshIteration).
arg(correctionFrom.x(), 4,
'f', 0).
arg(correctionFrom.y(), 4,
'f', 0)
529 .
arg(correctionTo.x(), 4,
'f', 0).
arg(correctionTo.y(), 4,
'f', 0)
535 debugString =
QString(
"PAA Refresh(%1): pixelError failed to estimate the remaining correction").
arg(refreshIteration);
541 if (refreshIteration > 1)
543 debugString =
QString(
"PAA Refresh(%1): Didn't find the user's star").
arg(refreshIteration);
550 debugString =
QString(
"PAA Refresh(%1): Too few stars detected (%2)").
arg(refreshIteration).
arg(stars.size());
552 emit updatedErrorsChanged(-1, -1, -1);
556 emit captureAndSolve();
559bool PolarAlignmentAssistant::processSolverFailure()
561 if ((m_PAHStage == PAH_FIRST_CAPTURE ||
562 m_PAHStage == PAH_SECOND_CAPTURE ||
563 m_PAHStage == PAH_THIRD_CAPTURE ||
564 m_PAHStage == PAH_FIRST_SOLVE ||
565 m_PAHStage == PAH_SECOND_SOLVE ||
566 m_PAHStage == PAH_THIRD_SOLVE)
567 && ++m_PAHRetrySolveCounter < 4)
569 emit newLog(
i18n(
"PAA: Solver failed, retrying."));
570 emit captureAndSolve();
574 if (m_PAHStage != PAH_IDLE)
576 emit newLog(
i18n(
"PAA: Stopping, solver failed too many times."));
583void PolarAlignmentAssistant::setPAHStage(Stage stage)
585 if (stage != m_PAHStage)
588 polarAlignWidget->updatePAHStage(stage);
589 emit newPAHStage(m_PAHStage);
593void PolarAlignmentAssistant::processMountRotation(
const dms &ra,
double settleDuration)
595 double deltaAngle =
fabs(ra.
deltaAngle(targetPAH.ra()).Degrees());
602 if (m_PAHStage == PAH_FIRST_ROTATE)
609 else if (m_PAHStage == PAH_SECOND_ROTATE)
618 if (m_PAHStage == PAH_FIRST_ROTATE || m_PAHStage == PAH_SECOND_ROTATE)
624 if (deltaAngle <= PAH_ROTATION_THRESHOLD)
626 m_CurrentTelescope->StopWE();
632 updateDisplay(m_PAHStage, getPAHMessage());
637 updateDisplay(m_PAHStage, getPAHMessage());
643 updateDisplay(m_PAHStage, getPAHMessage());
650 m_CurrentTelescope->abort();
651 emit newLog(
i18n(
"Mount aborted. Reverse RA axis direction and try again."));
659bool PolarAlignmentAssistant::checkPAHForMeridianCrossing()
662 double hourAngle = m_CurrentTelescope->hourAngle().Degrees();
663 while (hourAngle < -180)
665 while (hourAngle > 180)
667 double ra = 0,
dec = 0;
668 m_CurrentTelescope->getEqCoords(&ra, &dec);
689 (m_CurrentTelescope->pierSide() == ISD::Mount::PIER_UNKNOWN &&
closeToMeridian));
694void PolarAlignmentAssistant::updateDisplay(Stage stage,
const QString &message)
698 case PAH_FIRST_ROTATE:
699 case PAH_SECOND_ROTATE:
702 polarAlignWidget->updatePAHStage(stage);
705 emit newPAHMessage(message);
709 case PAH_FIRST_CAPTURE:
710 case PAH_SECOND_CAPTURE:
711 case PAH_THIRD_CAPTURE:
712 case PAH_FIRST_SOLVE:
713 case PAH_SECOND_SOLVE:
714 case PAH_THIRD_SOLVE:
715 polarAlignWidget->updatePAHStage(stage);
718 emit newPAHMessage(message);
727void PolarAlignmentAssistant::startPAHProcess()
733 setPAHStage(PAH_FIRST_CAPTURE);
735 if (Options::limitedResourcesMode())
736 emit newLog(
i18n(
"Warning: Equatorial Grid Lines will not be drawn due to limited resources mode."));
738 if (m_CurrentTelescope->hasAlignmentModel())
740 emit newLog(
i18n(
"Clearing mount Alignment Model..."));
741 m_CurrentTelescope->clearAlignmentModel();
745 m_CurrentTelescope->unpark();
748 if (m_CurrentTelescope->canControlTrack() && m_CurrentTelescope->isTracking() ==
false)
749 m_CurrentTelescope->setTrackEnabled(
true);
762 updateDisplay(m_PAHStage, getPAHMessage());
766 m_PAHRetrySolveCounter = 0;
767 emit captureAndSolve();
772 if (checkPAHForMeridianCrossing())
777 KSMessageBox::Instance()->disconnect(
this);
781 KSMessageBox::Instance()->warningContinueCancel(
i18n(
"This could cause the telescope to cross the meridian."),
782 i18n(
"Warning"), 15);
788void PolarAlignmentAssistant::stopPAHProcess()
790 if (m_PAHStage == PAH_IDLE)
800 if (m_PAHStage == PAH_REFRESH)
802 setPAHStage(PAH_POST_REFRESH);
803 polarAlignWidget->updatePAHStage(m_PAHStage);
808 if (m_CurrentTelescope && m_CurrentTelescope->isInMotion())
809 m_CurrentTelescope->abort();
811 setPAHStage(PAH_IDLE);
812 polarAlignWidget->updatePAHStage(m_PAHStage);
820 m_AlignView->reset();
821 m_AlignView->setRefreshEnabled(
false);
823 emit newFrame(m_AlignView);
824 disconnect(m_AlignView.get(), &AlignView::trackingStarSelected,
this,
825 &Ekos::PolarAlignmentAssistant::setPAHCorrectionOffset);
826 disconnect(m_AlignView.get(), &AlignView::newCorrectionVector,
this, &Ekos::PolarAlignmentAssistant::newCorrectionVector);
828 if (Options::pAHAutoPark())
830 m_CurrentTelescope->park();
831 emit newLog(
i18n(
"Parking the mount..."));
835void PolarAlignmentAssistant::rotatePAH()
855 const SkyPoint telescopeCoord = m_CurrentTelescope->currentCoordinates();
861 targetPAH.setDec(telescopeCoord.
dec());
866 m_CurrentTelescope->setSlewRate(
pAHMountSpeed->currentIndex());
868 m_CurrentTelescope->MoveWE(
westMeridian ? ISD::Mount::MOTION_WEST :
ISD::Mount::MOTION_EAST,
869 ISD::Mount::MOTION_START);
871 emit newLog(
i18n(
"Please wait until mount completes rotating to RA (%1) DE (%2)", targetPAH.ra().toHMSString(),
872 targetPAH.dec().toDMSString()));
875void PolarAlignmentAssistant::setupCorrectionGraphics(
const QPointF &pixel)
877 polarAlign.refreshSolution(&refreshSolution, &altOnlyRefreshSolution);
885 if (!polarAlign.findCorrectedPixel(imageData, pixel, &correctionAltTo,
true))
891 if (!polarAlign.findCorrectedPixel(imageData, pixel, &correctionTo))
896 QString debugString =
QString(
"PAA: Correction: %1,%2 --> %3,%4 (alt only %5,%6)")
897 .
arg(pixel.
x(), 4,
'f', 0).
arg(pixel.
y(), 4,
'f', 0)
898 .
arg(correctionTo.x(), 4,
'f', 0).
arg(correctionTo.y(), 4,
'f', 0)
899 .
arg(correctionAltTo.x(), 4,
'f', 0).
arg(correctionAltTo.y(), 4,
'f', 0);
901 correctionFrom = pixel;
904 updatePlateSolveTriangle(imageData);
906 m_AlignView->setCorrectionParams(correctionFrom, correctionTo, correctionAltTo);
912bool PolarAlignmentAssistant::calculatePAHError()
915 m_AlignView->holdOnToImage();
917 if (!polarAlign.findAxis())
919 emit newLog(
i18n(
"PAA: Failed to find RA Axis center."));
937 emit newLog(
QString(
"Polar Alignment Error: %1").arg(msg));
939 polarAlign.setMaxPixelSearchRange(
polarError.Degrees() + 1);
946 setupCorrectionGraphics(
QPointF(m_ImageData->width() / 2, m_ImageData->height() / 2));
949 SkyPoint CP(0, (hemisphere == NORTH_HEMISPHERE) ? 90 : -90);
951 m_ImageData->wcsToPixel(
CP, celestialPolePoint,
imagePoint);
952 if (m_ImageData->contains(celestialPolePoint))
954 m_AlignView->setCelestialPole(celestialPolePoint);
956 if (polarAlign.findCorrectedPixel(m_ImageData, celestialPolePoint, &raAxis))
957 m_AlignView->setRaAxis(raAxis);
960 connect(m_AlignView.get(), &AlignView::trackingStarSelected,
this, &Ekos::PolarAlignmentAssistant::setPAHCorrectionOffset);
963 connect(m_AlignView.get(), &AlignView::newCorrectionVector,
this, &Ekos::PolarAlignmentAssistant::newCorrectionVector,
965 syncCorrectionVector();
966 emit newFrame(m_AlignView);
971void PolarAlignmentAssistant::syncCorrectionVector()
975 emit newCorrectionVector(
QLineF(correctionFrom, correctionTo));
976 m_AlignView->setCorrectionParams(correctionFrom, correctionTo, correctionAltTo);
979void PolarAlignmentAssistant::setPAHCorrectionOffsetPercentage(
double dx,
double dy)
981 double x = dx * m_AlignView->zoomedWidth();
982 double y = dy * m_AlignView->zoomedHeight();
983 setPAHCorrectionOffset(
static_cast<int>(round(x)),
static_cast<int>(round(y)));
986void PolarAlignmentAssistant::setPAHCorrectionOffset(
int x,
int y)
988 if (m_PAHStage == PAH_REFRESH)
990 emit newLog(
i18n(
"Polar-alignment star cannot be updated during refresh phase as it might affect error measurements."));
994 setupCorrectionGraphics(
QPointF(x, y));
995 emit newCorrectionVector(
QLineF(correctionFrom, correctionTo));
996 emit newFrame(m_AlignView);
1000void PolarAlignmentAssistant::setPAHSlewDone()
1002 emit newPAHMessage(
"Manual slew done.");
1005 case PAH_FIRST_ROTATE :
1006 setPAHStage(PAH_SECOND_CAPTURE);
1007 emit newLog(
i18n(
"First manual rotation done."));
1008 updateDisplay(m_PAHStage, getPAHMessage());
1010 case PAH_SECOND_ROTATE :
1011 setPAHStage(PAH_THIRD_CAPTURE);
1012 emit newLog(
i18n(
"Second manual rotation done."));
1013 updateDisplay(m_PAHStage, getPAHMessage());
1022void PolarAlignmentAssistant::startPAHRefreshProcess()
1024 qCInfo(
KSTARS_EKOS_ALIGN) <<
"Starting Polar Alignment Assistant refreshing...";
1026 refreshIteration = 0;
1028 m_NumHealpixFailures = 0;
1030 setPAHStage(PAH_REFRESH);
1031 polarAlignWidget->updatePAHStage(m_PAHStage);
1032 auto message = getPAHMessage();
1034 emit newPAHMessage(message);
1039 if (m_AlignView->isEQGridShown())
1040 m_AlignView->toggleEQGrid();
1042 m_AlignView->setRefreshEnabled(
true);
1044 Options::setAstrometrySolverWCS(
false);
1045 Options::setAutoWCS(
false);
1048 emit captureAndSolve();
1051void PolarAlignmentAssistant::processPAHStage(
double orientation,
double ra,
double dec,
double pixscale,
1054 if (m_PAHStage == PAH_FIND_CP)
1057 i18n(
"Mount is synced to celestial pole. You can now continue Polar Alignment Assistant procedure."));
1058 setPAHStage(PAH_FIRST_CAPTURE);
1059 polarAlignWidget->updatePAHStage(m_PAHStage);
1063 if (m_PAHStage == PAH_FIRST_SOLVE || m_PAHStage == PAH_SECOND_SOLVE || m_PAHStage == PAH_THIRD_SOLVE)
1068 m_LastOrientation = orientation;
1069 m_LastPixscale = pixscale;
1071 m_IndexToUse = index;
1073 bool doWcs = (m_PAHStage == PAH_THIRD_SOLVE) || !Options::limitedResourcesMode();
1076 emit newLog(
i18n(
"Please wait while WCS data is processed..."));
1078 m_PAHStage == PAH_FIRST_SOLVE
1079 ?
"Calculating WCS for the first image...</p>"
1080 : (m_PAHStage == PAH_SECOND_SOLVE ?
"Calculating WCS for the second image...</p>"
1081 :
"Calculating WCS for the third image...</p>"));
1083 connect(m_AlignView.get(), &AlignView::wcsToggled,
this, &Ekos::PolarAlignmentAssistant::setWCSToggled,
1085 m_AlignView->injectWCS(orientation, ra, dec, pixscale,
eastToTheRight);
1092 m_ImageData = image;
1094 if (m_PAHStage == PAH_FIRST_CAPTURE)
1095 setPAHStage(PAH_FIRST_SOLVE);
1096 else if (m_PAHStage == PAH_SECOND_CAPTURE)
1097 setPAHStage(PAH_SECOND_SOLVE);
1098 else if (m_PAHStage == PAH_THIRD_CAPTURE)
1099 setPAHStage(PAH_THIRD_SOLVE);
1102 updateDisplay(m_PAHStage, getPAHMessage());
1105void PolarAlignmentAssistant::setWCSToggled(
bool result)
1107 emit newLog(
i18n(
"WCS data processing is complete."));
1109 disconnect(m_AlignView.get(), &AlignView::wcsToggled,
this, &Ekos::PolarAlignmentAssistant::setWCSToggled);
1111 if (m_PAHStage == PAH_FIRST_CAPTURE || m_PAHStage == PAH_FIRST_SOLVE)
1114 if (result ==
false && m_AlignInstance->wcsSynced() ==
true)
1116 emit newLog(
i18n(
"WCS info is now valid. Capturing next frame..."));
1117 emit captureAndSolve();
1122 polarAlign.addPoint(m_ImageData);
1124 setPAHStage(PAH_FIRST_ROTATE);
1125 auto msg = getPAHMessage();
1128 msg =
QString(
"Please rotate your mount about %1 deg in RA")
1132 updateDisplay(m_PAHStage, msg);
1136 else if (m_PAHStage == PAH_SECOND_CAPTURE || m_PAHStage == PAH_SECOND_SOLVE)
1138 setPAHStage(PAH_SECOND_ROTATE);
1139 auto msg = getPAHMessage();
1143 msg =
QString(
"Please rotate your mount about %1 deg in RA")
1147 updateDisplay(m_PAHStage, msg);
1149 polarAlign.addPoint(m_ImageData);
1153 else if (m_PAHStage == PAH_THIRD_CAPTURE || m_PAHStage == PAH_THIRD_SOLVE)
1156 if (result ==
false)
1158 emit newLog(
i18n(
"Failed to process World Coordinate System: %1. Try again.", m_ImageData->getLastError()));
1162 polarAlign.addPoint(m_ImageData);
1166 if (calculatePAHError())
1168 setPAHStage(PAH_STAR_SELECT);
1169 polarAlignWidget->updatePAHStage(m_PAHStage);
1172 emit newPAHMessage(getPAHMessage());
1176 emit newLog(
i18n(
"PAA: Failed to find the RA axis. Quitting."));
1182void PolarAlignmentAssistant::setMountStatus(ISD::Mount::Status
newState)
1186 case ISD::Mount::MOUNT_PARKING:
1187 case ISD::Mount::MOUNT_SLEWING:
1188 case ISD::Mount::MOUNT_MOVING:
1193 if (m_PAHStage == PAH_IDLE)
1199QString PolarAlignmentAssistant::getPAHMessage()
const
1206 case PAH_FIRST_CAPTURE:
1207 return i18n(
"<p>The assistant requires three images to find a solution. Ekos is now capturing the first image...</p>");
1208 case PAH_FIRST_SOLVE:
1209 return i18n(
"<p>Solving the <i>first</i> image...</p>");
1210 case PAH_FIRST_ROTATE:
1211 return i18n(
"<p>Executing the <i>first</i> mount rotation...</p>");
1212 case PAH_FIRST_SETTLE:
1213 return i18n(
"<p>Settling after the <i>first</i> mount rotation.</p>");
1214 case PAH_SECOND_SETTLE:
1215 return i18n(
"<p>Settling after the <i>second</i> mount rotation.</p>");
1216 case PAH_SECOND_CAPTURE:
1217 return i18n(
"<p>Capturing the second image...</p>");
1218 case PAH_SECOND_SOLVE:
1219 return i18n(
"<p>Solving the <i>second</i> image...</p>");
1220 case PAH_SECOND_ROTATE:
1221 return i18n(
"<p>Executing the <i>second</i> mount rotation...</p>");
1222 case PAH_THIRD_CAPTURE:
1223 return i18n(
"<p>Capturing the <i>third</i> and final image...</p>");
1224 case PAH_THIRD_SOLVE:
1225 return i18n(
"<p>Solving the <i>third</i> image...</p>");
1226 case PAH_STAR_SELECT:
1228 return i18n(
"<p>Choose your exposure time & select an adjustment method. Then click <i>refresh</i> to begin adjustments.</p>");
1230 return i18n(
"<p>Choose your exposure time & select an adjustment method. Click <i>Refresh</i> to begin.</p><p>Correction triangle is plotted above. <i>Zoom in and select a bright star</i> to reposition the correction vector. Use the <i>MoveStar & Calc Error</i> method to estimate the remaining error.</p>");
1233 return i18n(
"<p>Adjust mount's <i>Altitude and Azimuth knobs</i> to reduce the polar alignment error.</p><p>Be patient, plate solving can be affected by knob movement. Consider using results after 2 images. Click <i>Stop</i> when you're finished.</p>");
1235 return i18n(
"<p>Adjust mount's <i>Altitude knob</i> to move the star along the yellow line, then adjust the <i>Azimuth knob</i> to move it along the Green line until the selected star is centered within the crosshair.</p><p>Click <i>Stop</i> when the star is centered.</p>");
1243void PolarAlignmentAssistant::setPAHRefreshAlgorithm(RefreshAlgorithm value)
1247 if ((m_PAHStage == PAH_REFRESH) && refreshIteration > 0 && (value != PLATE_SOLVE_ALGORITHM)
1248 && !starCorrespondencePAH.size())
1251 emit newLog(
i18n(
"Cannot change to MoveStar algorithm once refresh has begun"));
1254 if (m_PAHStage == PAH_REFRESH || m_PAHStage == PAH_STAR_SELECT)
1257 emit newPAHMessage(getPAHMessage());
1260 showUpdatedError((value == PLATE_SOLVE_ALGORITHM) ||
1261 (value == MOVE_STAR_UPDATE_ERR_ALGORITHM));
1262 if (value == PLATE_SOLVE_ALGORITHM)
1263 updatePlateSolveTriangle(m_ImageData);
1265 m_AlignView->setCorrectionParams(correctionFrom, correctionTo, correctionAltTo);
The sky coordinates of a point in the sky.
const CachingDms & dec() const
const CachingDms & ra() const
An angle, stored as degrees, but expressible in many ways.
const dms deltaAngle(dms angle) const
deltaAngle Return the shortest difference (path) between this angle and the supplied angle.
QString i18n(const char *text, const TYPE &arg...)
Ekos is an advanced Astrophotography tool for Linux.
ISD is a collection of INDI Standard Devices.
void currentIndexChanged(int index)
void drawConvexPolygon(const QPoint *points, int pointCount)
void drawRect(const QRect &rectangle)
QString arg(Args &&... args) const const
QTextStream & dec(QTextStream &stream)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)