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 RA_OUT_OK,
70 BACKLASH,
71 DEC_IN,
72 DEC_OUT,
73 DEC_OUT_OK,
74 CALIBRATION_MESSAGE_ONLY
75 };
76
77 signals:
78 void newLog(const QString &);
79 void newStatus(Ekos::GuideState);
80 void newAxisDelta(double delta_ra, double delta_dec);
81 void newAxisSigma(double sigma_ra, double sigma_dec);
82 void newAxisPulse(double pulse_ra, double pulse_dec);
83 void newStarPosition(const QVector3D &newCenter, bool updateNow);
84 void newStarPixmap(QPixmap &);
85 void newSNR(double snr);
86 void calibrationUpdate(CalibrationUpdateType type, const QString &message = QString(""), double x = 0, double y = 0);
87 void frameCaptureRequested();
88 void guideStats(double raError, double decError, int raPulse, int decPulse,
89 double snr, double skyBg, int numStars);
90 void guideEquipmentUpdated();
91 void guideInfo(const QString &);
92 void abortExposure();
93
94 protected:
95 Ekos::GuideState state { GUIDE_IDLE };
96 double ccdPixelSizeX { 0 };
97 double ccdPixelSizeY { 0 };
98 double mountAperture { 0 };
99 double mountFocalLength { 0 };
100 uint16_t subX { 0 };
101 uint16_t subY { 0 };
102 uint16_t subW { 0 };
103 uint16_t subH { 0 };
104 uint16_t subBinX { 1 };
105 uint16_t subBinY { 1 };
106
107 // Recent mount position.
108 dms mountRA, mountDEC, mountAzimuth, mountAltitude;
109 ISD::Mount::PierSide pierSide { ISD::Mount::PIER_UNKNOWN };
110};
111
112enum CaptureAfterPulses {StartCaptureAfterPulses, DontCaptureAfterPulses};
113
114}
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:83
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 7 2025 11:47:10 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.