Kstars

guideinterface.h
1/*
2 SPDX-FileCopyrightText: 2016 Jasem Mutlaq <mutlaqja@ikarustech.com>
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
16class QString;
17
18namespace 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 */
27class GuideInterface : public QObject
28{
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 void guideInfo(const QString &);
90 void abortExposure();
91
92 protected:
93 Ekos::GuideState state { GUIDE_IDLE };
94 double ccdPixelSizeX { 0 };
95 double ccdPixelSizeY { 0 };
96 double mountAperture { 0 };
97 double mountFocalLength { 0 };
98 uint16_t subX { 0 };
99 uint16_t subY { 0 };
100 uint16_t subW { 0 };
101 uint16_t subH { 0 };
102 uint16_t subBinX { 1 };
103 uint16_t subBinY { 1 };
104
105 // Recent mount position.
106 dms mountRA, mountDEC, mountAzimuth, mountAltitude;
107 ISD::Mount::PierSide pierSide { ISD::Mount::PIER_UNKNOWN };
108};
109
110enum CaptureAfterPulses {StartCaptureAfterPulses, DontCaptureAfterPulses};
111
112}
Interface skeleton for implementation of different guiding applications and/or routines.
The sky coordinates of a point in the sky.
Definition skypoint.h:45
An angle, stored as degrees, but expressible in many ways.
Definition dms.h:38
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:79
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:48:26 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.