Kstars

framingassistantui.h
1 /*
2  SPDX-FileCopyrightText: 2015 Jasem Mutlaq <[email protected]>
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 
19 namespace Ui
20 {
21 class FramingAssistant;
22 }
23 
24 namespace Ekos
25 {
26 class Scheduler;
27 class MosaicTilesManager;
28 class MosaicTilesScene;
29 
30 class FramingAssistantUI : public QDialog
31 {
32  Q_OBJECT
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  protected:
48  /// @brief Camera information validity checker.
49  bool isEquipmentValid() const;
50 
51  /// @brief Expected arcmin field width for the current number of tiles.
52  double getTargetWFOV() const;
53 
54  /// @brief Expected arcmin field height for the current number of tiles.
55  double getTargetHFOV() const;
56 
57  /// @brief Expected number of tiles for the current target field width.
58  double getTargetMosaicW() const;
59 
60  /// @brief Expected number of tiles for the current target field height.
61  double getTargetMosaicH() const;
62 
63  /**
64  * @brief goAndSolve Go to current center, capture an image, and solve.
65  */
66  void goAndSolve();
67 
68  void createJobs();
69  // Select sequence file
70  void selectSequence();
71  // Select jobs directory
72  void selectDirectory();
73 
74  public slots:
75  void updateTargetFOVFromGrid();
76  void updateGridFromTargetFOV();
77  void constructMosaic();
78  void calculateFOV();
79  void resetFOV();
80  void fetchINDIInformation();
81  void rewordStepEvery(int v);
82  void setMountState(ISD::Mount::Status value);
83  void setAlignState(AlignState value);
84 
85  private:
86 
87  QString sanitize(const QString &name);
88  SkyPoint m_CenterPoint;
89  Ui::FramingAssistant *ui {nullptr};
90 
91  double renderedWFOV { 0 }, renderedHFOV { 0 };
92  QTimer *m_DebounceTimer { nullptr };
93 
94  // Go and solve
95  bool m_GOTOSolvePending {false};
96  AlignState m_AlignState {ALIGN_IDLE};
97  ISD::Mount::Status m_MountState {ISD::Mount::MOUNT_IDLE};
98 
99  // Equipment
100  double m_FocalLength {0};
101  QSize m_CameraSize;
102  QSizeF m_PixelSize, m_cameraFOV, m_MosaicFOV;
103  QSize m_GridSize {1, 1};
104  double m_Overlap {10}, m_PA {0};
105  QString m_JobsDirectory;
106 };
107 }
Q_OBJECTQ_OBJECT
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:66
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.