Kstars

rotatorutils.h
1/*
2 SPDX-FileCopyrightText: 2022 Toni Schriber
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5
6
7#pragma once
8
9#include "indi/indimount.h"
10
11class RotatorUtils : public QObject
12{
14
15 public:
16 static RotatorUtils *Instance();
17 static void release();
18
19 void initRotatorUtils(const QString &train);
20 void setImageFlip(bool state);
21 bool checkImageFlip();
22 double calcRotatorAngle(double PositionAngle);
23 double calcCameraAngle(double RotatorAngle, bool flippedImage);
24 double calcOffsetAngle(double RotatorAngle, double PositionAngle);
25 void updateOffset(double Angle);
26 void setImagePierside(ISD::Mount::PierSide ImgPierside);
27 ISD::Mount::PierSide getMountPierside();
28 double DiffPA(double diff);
29 void initTimeFrame(const double EndAngle);
30 int calcTimeFrame(const double CurrentAngle);
31 void startTimeFrame(const double StartAngle);
32
33 private:
34 RotatorUtils();
35 ~RotatorUtils();
36 static RotatorUtils *m_Instance;
37
38 ISD::Mount::PierSide m_CalPierside {ISD::Mount::PIER_WEST};
39 ISD::Mount::PierSide m_ImgPierside {ISD::Mount::PIER_UNKNOWN};
40 double m_Offset {0};
41 bool m_flippedMount {false};
42 ISD::Mount *m_Mount {nullptr};
43 double m_StartAngle, m_EndAngle {0};
44 double m_ShiftAngle, m_DiffAngle {0};
45 QTime m_StartTime, m_CurrentTime;
46 int m_DeltaTime = 0;
47 double m_DeltaAngle = 0;
48 int m_TimeFrame = 0;
49 bool m_initParameter, m_CCW = true;
50
51 signals:
52 void changedPierside(ISD::Mount::PierSide index);
53};
device handle controlling Mounts.
Definition indimount.h:29
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.