Kstars

framingassistantui.h
1/*
2 SPDX-FileCopyrightText: 2015 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "skypoint.h"
10#include "ekos/ekos.h"
11#include "indi/indimount.h"
12
13#include <QGraphicsScene>
14#include <QGraphicsItem>
15#include <QDialog>
16#include <QBrush>
17#include <QPen>
18
19namespace Ui
20{
21class FramingAssistant;
22}
23
24namespace Ekos
25{
26class Scheduler;
27class MosaicTilesManager;
28class MosaicTilesScene;
29
30class FramingAssistantUI : public QDialog
31{
33 public:
34
35 FramingAssistantUI();
36 ~FramingAssistantUI() override;
37
38 public:
39 enum
40 {
41 PAGE_EQUIPMENT,
42 PAGE_SELECT_GRID,
43 PAGE_ADJUST_GRID,
44 PAGE_CREATE_JOBS
45 };
46
47 // Import Mosaic JSON Data
48 bool importMosaic(const QJsonObject &payload);
49
50 protected:
51 /// @brief Camera information validity checker.
52 bool isEquipmentValid() const;
53
54 /// @brief Expected arcmin field width for the current number of tiles.
55 double getTargetWFOV() const;
56
57 /// @brief Expected arcmin field height for the current number of tiles.
58 double getTargetHFOV() const;
59
60 /// @brief Expected number of tiles for the current target field width.
61 double getTargetMosaicW() const;
62
63 /// @brief Expected number of tiles for the current target field height.
64 double getTargetMosaicH() const;
65
66 /**
67 * @brief goAndSolve Go to current center, capture an image, and solve.
68 */
69 void goAndSolve();
70
71 /**
72 * @brief goAndRotate Set position angle then go and solve.
73 */
74 void goAndRotate();
75
76 void createJobs();
77 // Select sequence file
78 void selectSequence();
79 // Select jobs directory
80 void selectDirectory();
81 // Select mosaic import
82 void selectImport();
83 // Import mosaic CSV
84 bool parseMosaicCSV(const QString &filename);
85 // Sanitize target name
86 void sanitizeTarget();
87
88 public slots:
89 void updateTargetFOVFromGrid();
90 void updateGridFromTargetFOV();
91 void constructMosaic();
92 void calculateFOV();
93 void resetFOV();
94 void fetchINDIInformation();
95 void rewordStepEvery(int v);
96 void setMountState(ISD::Mount::Status value);
97 void setAlignState(AlignState value);
98
99 private:
100
101 SkyPoint m_CenterPoint;
102 Ui::FramingAssistant *ui {nullptr};
103
104 double renderedWFOV { 0 }, renderedHFOV { 0 };
105 QTimer *m_DebounceTimer { nullptr };
106
107 // Go and solve
108 bool m_GOTOSolvePending {false};
109 AlignState m_AlignState {ALIGN_IDLE};
110 ISD::Mount::Status m_MountState {ISD::Mount::MOUNT_IDLE};
111
112 // Equipment
113 double m_FocalLength {0};
114 double m_FocalReducer {1};
115 QSize m_CameraSize;
116 QSizeF m_PixelSize, m_cameraFOV, m_MosaicFOV;
117 QSize m_GridSize {1, 1};
118 double m_Overlap {10}, m_PA {0};
119 QString m_JobsDirectory;
120};
121}
The Ekos scheduler is a simple scheduler class to orchestrate automated multi object observation jobs...
Definition scheduler.h:55
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
AlignState
Definition ekos.h:145
@ ALIGN_IDLE
No ongoing operations.
Definition ekos.h:146
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Mar 28 2025 11:57:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.