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;
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 void createJobs();
72 // Select sequence file
73 void selectSequence();
74 // Select jobs directory
75 void selectDirectory();
76 // Select mosaic import
77 void selectImport();
78 // Import mosaic CSV
79 bool parseMosaicCSV(const QString &filename);
80 // Sanitize target name
81 void sanitizeTarget();
82
83 public slots:
84 void updateTargetFOVFromGrid();
85 void updateGridFromTargetFOV();
86 void constructMosaic();
87 void calculateFOV();
88 void resetFOV();
89 void fetchINDIInformation();
90 void rewordStepEvery(int v);
91 void setMountState(ISD::Mount::Status value);
92 void setAlignState(AlignState value);
93
94 private:
95
96 SkyPoint m_CenterPoint;
97 Ui::FramingAssistant *ui {nullptr};
98
99 double renderedWFOV { 0 }, renderedHFOV { 0 };
100 QTimer *m_DebounceTimer { nullptr };
101
102 // Go and solve
103 bool m_GOTOSolvePending {false};
104 AlignState m_AlignState {ALIGN_IDLE};
105 ISD::Mount::Status m_MountState {ISD::Mount::MOUNT_IDLE};
106
107 // Equipment
108 double m_FocalLength {0};
109 double m_FocalReducer {1};
110 QSize m_CameraSize;
111 QSizeF m_PixelSize, m_cameraFOV, m_MosaicFOV;
112 QSize m_GridSize {1, 1};
113 double m_Overlap {10}, m_PA {0};
114 QString m_JobsDirectory;
115};
116}
The sky coordinates of a point in the sky.
Definition skypoint.h:45
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:78
@ ALIGN_IDLE
No ongoing operations.
Definition ekos.h:146
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.