Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/guide/guide.h
1 | /* Ekos guide tool | 1 | /* Ekos guide tool | ||
---|---|---|---|---|---|
2 | Copyright (C) 2012 Jasem Mutlaq <mutlaqja@ikarustech.com> | 2 | Copyright (C) 2012 Jasem Mutlaq <mutlaqja@ikarustech.com> | ||
3 | 3 | | |||
4 | This application is free software; you can redistribute it and/or | 4 | This application is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU General Public | 5 | modify it under the terms of the GNU General Public | ||
6 | License as published by the Free Software Foundation; either | 6 | License as published by the Free Software Foundation; either | ||
7 | version 2 of the License, or (at your option) any later version. | 7 | version 2 of the License, or (at your option) any later version. | ||
8 | */ | 8 | */ | ||
9 | 9 | | |||
10 | #pragma once | 10 | #pragma once | ||
11 | 11 | | |||
12 | #include "ui_guide.h" | 12 | #include "ui_guide.h" | ||
13 | #include "guideinterface.h" | ||||
13 | #include "ekos/ekos.h" | 14 | #include "ekos/ekos.h" | ||
14 | #include "indi/indiccd.h" | 15 | #include "indi/indiccd.h" | ||
15 | #include "indi/inditelescope.h" | 16 | #include "indi/inditelescope.h" | ||
16 | 17 | | |||
17 | #include <QTime> | 18 | #include <QTime> | ||
18 | #include <QTimer> | 19 | #include <QTimer> | ||
19 | #include <QtDBus> | 20 | #include <QtDBus> | ||
20 | 21 | | |||
21 | class QProgressIndicator; | 22 | class QProgressIndicator; | ||
22 | class QTabWidget; | 23 | class QTabWidget; | ||
23 | 24 | | |||
24 | class FITSView; | 25 | class FITSView; | ||
25 | class FITSViewer; | 26 | class FITSViewer; | ||
26 | class ScrollGraph; | 27 | class ScrollGraph; | ||
27 | 28 | | |||
28 | namespace Ekos | 29 | namespace Ekos | ||
29 | { | 30 | { | ||
30 | class GuideInterface; | | |||
31 | class OpsCalibration; | 31 | class OpsCalibration; | ||
32 | class OpsGuide; | 32 | class OpsGuide; | ||
33 | class InternalGuider; | 33 | class InternalGuider; | ||
34 | class PHD2; | 34 | class PHD2; | ||
35 | class LinGuider; | 35 | class LinGuider; | ||
36 | 36 | | |||
37 | /** | 37 | /** | ||
38 | * @class Guide | 38 | * @class Guide | ||
▲ Show 20 Lines • Show All 357 Lines • ▼ Show 20 Line(s) | 248 | public slots: | |||
396 | 396 | | |||
397 | void refreshColorScheme(); | 397 | void refreshColorScheme(); | ||
398 | void setupNSEWLabels(); | 398 | void setupNSEWLabels(); | ||
399 | 399 | | |||
400 | //plot slots | 400 | //plot slots | ||
401 | void handleVerticalPlotSizeChange(); | 401 | void handleVerticalPlotSizeChange(); | ||
402 | void handleHorizontalPlotSizeChange(); | 402 | void handleHorizontalPlotSizeChange(); | ||
403 | void clearGuideGraphs(); | 403 | void clearGuideGraphs(); | ||
404 | void clearCalibrationGraphs(); | ||||
404 | void slotAutoScaleGraphs(); | 405 | void slotAutoScaleGraphs(); | ||
405 | void buildTarget(); | 406 | void buildTarget(); | ||
406 | void guideHistory(); | 407 | void guideHistory(); | ||
407 | void setLatestGuidePoint(bool isChecked); | 408 | void setLatestGuidePoint(bool isChecked); | ||
408 | void toggleShowRAPlot(bool isChecked); | 409 | void toggleShowRAPlot(bool isChecked); | ||
409 | void toggleShowDEPlot(bool isChecked); | 410 | void toggleShowDEPlot(bool isChecked); | ||
410 | void toggleRACorrectionsPlot(bool isChecked); | 411 | void toggleRACorrectionsPlot(bool isChecked); | ||
411 | void toggleDECorrectionsPlot(bool isChecked); | 412 | void toggleDECorrectionsPlot(bool isChecked); | ||
Show All 40 Lines | 421 | protected slots: | |||
452 | void onEnableDirDEC(bool enable); | 453 | void onEnableDirDEC(bool enable); | ||
453 | void syncSettings(); | 454 | void syncSettings(); | ||
454 | 455 | | |||
455 | //void onRapidGuideChanged(bool enable); | 456 | //void onRapidGuideChanged(bool enable); | ||
456 | 457 | | |||
457 | void setAxisDelta(double ra, double de); | 458 | void setAxisDelta(double ra, double de); | ||
458 | void setAxisSigma(double ra, double de); | 459 | void setAxisSigma(double ra, double de); | ||
459 | void setAxisPulse(double ra, double de); | 460 | void setAxisPulse(double ra, double de); | ||
461 | void calibrationUpdate(GuideInterface::CalibrationUpdateType type, const QString& message = QString(""), double dx = 0, double dy = 0); | ||||
460 | 462 | | |||
461 | void processGuideOptions(); | 463 | void processGuideOptions(); | ||
462 | 464 | | |||
463 | void onControlDirectionChanged(bool enable); | 465 | void onControlDirectionChanged(bool enable); | ||
464 | void updatePHD2Directions(); | 466 | void updatePHD2Directions(); | ||
465 | 467 | | |||
466 | void showFITSViewer(); | 468 | void showFITSViewer(); | ||
467 | 469 | | |||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 494 | private: | |||
530 | 532 | | |||
531 | // Operation stack | 533 | // Operation stack | ||
532 | void buildOperationStack(GuideState operation); | 534 | void buildOperationStack(GuideState operation); | ||
533 | bool executeOperationStack(); | 535 | bool executeOperationStack(); | ||
534 | bool executeOneOperation(GuideState operation); | 536 | bool executeOneOperation(GuideState operation); | ||
535 | 537 | | |||
536 | // Init Functions | 538 | // Init Functions | ||
537 | void initPlots(); | 539 | void initPlots(); | ||
540 | void initDriftGraph(); | ||||
541 | void initDriftPlot(); | ||||
542 | void initCalibrationPlot(); | ||||
538 | void initView(); | 543 | void initView(); | ||
539 | void initConnections(); | 544 | void initConnections(); | ||
540 | 545 | | |||
541 | bool captureOneFrame(); | 546 | bool captureOneFrame(); | ||
542 | 547 | | |||
543 | // Driver | 548 | // Driver | ||
544 | void reconnectDriver(const QString &camera, const QString &via); | 549 | void reconnectDriver(const QString &camera, const QString &via); | ||
545 | 550 | | |||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | |||||
639 | 644 | | |||
640 | bool graphOnLatestPt = true; | 645 | bool graphOnLatestPt = true; | ||
641 | QUrl guideURLPath; | 646 | QUrl guideURLPath; | ||
642 | 647 | | |||
643 | //This is for enforcing the PHD2 Star lock when Guide is pressed, | 648 | //This is for enforcing the PHD2 Star lock when Guide is pressed, | ||
644 | //autostar is not selected, and the user has chosen a star. | 649 | //autostar is not selected, and the user has chosen a star. | ||
645 | //This connection storage is so that the connection can be disconnected after enforcement | 650 | //This connection storage is so that the connection can be disconnected after enforcement | ||
646 | QMetaObject::Connection guideConnect; | 651 | QMetaObject::Connection guideConnect; | ||
652 | | ||||
653 | QCPItemText *calLabel { nullptr }; | ||||
647 | }; | 654 | }; | ||
648 | } | 655 | } |