Kstars

guideinterface.h
1 /*
2  SPDX-FileCopyrightText: 2016 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "ekos/ekos.h"
10 #include "indi/indimount.h"
11 #include <QObject>
12 #include <QVector3D>
13 
14 #include <cstdint>
15 
16 class QString;
17 
18 namespace Ekos
19 {
20 /**
21  * @class GuideInterface
22  * @short Interface skeleton for implementation of different guiding applications and/or routines
23  *
24  * @author Jasem Mutlaq
25  * @version 1.0
26  */
27 class GuideInterface : public QObject
28 {
29  Q_OBJECT
30 
31  public:
32  GuideInterface() = default;
33  virtual ~GuideInterface() override = default;
34 
35  virtual bool Connect() = 0;
36  virtual bool Disconnect() = 0;
37  virtual bool isConnected() = 0;
38 
39  virtual bool calibrate() = 0;
40  virtual bool guide() = 0;
41  virtual bool suspend() = 0;
42  virtual bool resume() = 0;
43  virtual bool abort() = 0;
44  virtual bool dither(double pixels) = 0;
45  virtual bool clearCalibration() = 0;
46  virtual bool reacquire()
47  {
48  return false;
49  }
50 
51  virtual bool setGuiderParams(double ccdPixelSizeX, double ccdPixelSizeY, double mountAperture,
52  double mountFocalLength);
53  virtual bool getGuiderParams(double *ccdPixelSizeX, double *ccdPixelSizeY, double *mountAperture,
54  double *mountFocalLength);
55 
56  virtual bool setFrameParams(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t binX, uint16_t binY);
57  virtual bool getFrameParams(uint16_t *x, uint16_t *y, uint16_t *w, uint16_t *h, uint16_t *binX, uint16_t *binY);
58 
59  virtual void setStarPosition(QVector3D &starCenter);
60 
61  virtual void setMountCoords(const SkyPoint &position, ISD::Mount::PierSide side);
62  virtual void setPierSide(ISD::Mount::PierSide newSide);
63  virtual void resetGPG() {};
64 
65  enum CalibrationUpdateType
66  {
67  RA_IN,
68  RA_OUT,
69  BACKLASH,
70  DEC_IN,
71  DEC_OUT,
72  CALIBRATION_MESSAGE_ONLY
73  };
74 
75  signals:
76  void newLog(const QString &);
77  void newStatus(Ekos::GuideState);
78  void newAxisDelta(double delta_ra, double delta_dec);
79  void newAxisSigma(double sigma_ra, double sigma_dec);
80  void newAxisPulse(double pulse_ra, double pulse_dec);
81  void newStarPosition(const QVector3D &newCenter, bool updateNow);
82  void newStarPixmap(QPixmap &);
83  void newSNR(double snr);
84  void calibrationUpdate(CalibrationUpdateType type, const QString &message = QString(""), double x = 0, double y = 0);
85  void frameCaptureRequested();
86  void guideStats(double raError, double decError, int raPulse, int decPulse,
87  double snr, double skyBg, int numStars);
88  void guideEquipmentUpdated();
89 
90  protected:
91  Ekos::GuideState state { GUIDE_IDLE };
92  double ccdPixelSizeX { 0 };
93  double ccdPixelSizeY { 0 };
94  double mountAperture { 0 };
95  double mountFocalLength { 0 };
96  uint16_t subX { 0 };
97  uint16_t subY { 0 };
98  uint16_t subW { 0 };
99  uint16_t subH { 0 };
100  uint16_t subBinX { 1 };
101  uint16_t subBinY { 1 };
102 
103  // Recent mount position.
104  dms mountRA, mountDEC, mountAzimuth, mountAltitude;
105  ISD::Mount::PierSide pierSide { ISD::Mount::PIER_UNKNOWN };
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:70
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:37
Interface skeleton for implementation of different guiding applications and/or routines.
QString message
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 03:59:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.