Instrument Neutral Distributed Interface INDI 2.2.5
eq500x.h
Go to the documentation of this file.
1#if 0
2LX200 - based Omegon EQ500X Equatorial Mount
3
4Copyright (C) 2019 Eric Dejouhanet ([email protected])
5
6This library is free software;
7you can redistribute it and / or
8modify it under the terms of the GNU Lesser General Public
9License as published by the Free Software Foundation;
10either
11version 2.1 of the License, or (at your option) any later version.
12
13This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY;
15without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public
20License along with this library;
21if not, write to the Free Software
22Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110 - 1301 USA
23#endif
24
25#ifndef EQ500X_H
26#define EQ500X_H
27
28class EQ500X : public LX200Generic
29{
30 public:
32 {
33 public:
34 MechanicalPoint(double, double);
36 public:
37 bool atParkingPosition() const;
38 public:
39 double RAm() const;
40 double DECm() const;
41 double RAm(double const);
42 double DECm(double const);
43 public:
44 double RAsky() const;
45 double DECsky() const;
46 double RAsky(double const);
47 double DECsky(double const);
48 public:
52 public:
53 bool parseStringDEC(char const *, size_t);
54 bool parseStringRA(char const *, size_t);
55 char const * toStringDEC(char *, size_t) const;
56 char const * toStringRA(char *, size_t) const;
57 public:
58 char const * toStringDEC_Sim(char *, size_t) const;
59 public:
60 double RA_degrees_to(MechanicalPoint const &) const;
61 double DEC_degrees_to(MechanicalPoint const &) const;
62 public:
63 double operator -(MechanicalPoint const &) const;
64 bool operator !=(MechanicalPoint const &) const;
65 bool operator ==(MechanicalPoint const &) const;
66 protected:
67 enum PointingState _pointingState {POINTING_NORMAL};
68 long _RAm {0 * 3600}, _DECm {0 * 3600};
69 };
70 public:
71 EQ500X();
72 const char *getDefautName();
73 protected:
74 bool getCurrentMechanicalPosition(MechanicalPoint &);
75 bool setTargetMechanicalPosition(MechanicalPoint const &);
76 bool gotoTargetPosition(MechanicalPoint const &);
77 protected:
78 bool isParked();
79 virtual double getLST();
80 void resetSimulation();
81 protected:
82 int sendCmd(char const *);
83 int getReply(char *, size_t const);
84 protected:
85 virtual bool checkConnection() override;
86 virtual bool updateLocation(double, double, double) override;
87 virtual void getBasicData() override;
88 virtual bool ReadScopeStatus() override;
89 virtual bool initProperties() override;
90 virtual bool Goto(double, double) override;
91 virtual bool Sync(double, double) override;
92 virtual bool Abort() override;
93 virtual void setPierSide(TelescopePierSide);
94 virtual bool MoveNS(INDI_DIR_NS, TelescopeMotionCommand) override;
95 private:
96 MechanicalPoint currentMechPosition, targetMechPosition;
97 double previousRA = {0}, previousDEC = {0};
98 int countdown {0};
99 // Movement markers, adjustment is done when no movement is required and all flags are cleared
100 bool RAmIncrease {false}, RAmDecrease {false};
101 bool DECmIncrease {false}, DECmDecrease {false};
102 // Current adjustment rate
103 struct _adjustment const * adjustment
104 {
105 nullptr
106 };
107 bool _gotoEngaged {false};
108 enum TelescopeSlewRate savedSlewRateIndex {SLEW_MAX};
109 };
110
111#endif // EQ500X_H
double DECsky() const
Definition eq500x.cpp:962
enum PointingState setPointingState(enum PointingState)
Definition eq500x.cpp:1279
bool operator==(MechanicalPoint const &) const
Definition eq500x.cpp:1274
char const * toStringDEC_Sim(char *, size_t) const
Definition eq500x.cpp:1035
double DEC_degrees_to(MechanicalPoint const &) const
Definition eq500x.cpp:1254
bool operator!=(MechanicalPoint const &) const
Definition eq500x.cpp:1268
bool atParkingPosition() const
Definition eq500x.cpp:914
double DECm() const
Definition eq500x.cpp:925
enum PointingState getPointingState() const
Definition eq500x.cpp:1285
bool parseStringRA(char const *, size_t)
Definition eq500x.cpp:1015
double RA_degrees_to(MechanicalPoint const &) const
Definition eq500x.cpp:1243
double RAm() const
Definition eq500x.cpp:920
char const * toStringDEC(char *, size_t) const
Definition eq500x.cpp:1114
double RAsky() const
Definition eq500x.cpp:950
double operator-(MechanicalPoint const &) const
Definition eq500x.cpp:1260
bool parseStringDEC(char const *, size_t)
Definition eq500x.cpp:1130
char const * toStringRA(char *, size_t) const
Definition eq500x.cpp:1001
virtual bool updateLocation(double, double, double) override
Update telescope location settings.
Definition eq500x.cpp:227
bool setTargetMechanicalPosition(MechanicalPoint const &)
Definition eq500x.cpp:874
virtual bool MoveNS(INDI_DIR_NS, TelescopeMotionCommand) override
Start or Stop the telescope motion in the direction dir.
Definition eq500x.cpp:755
virtual bool checkConnection() override
Definition eq500x.cpp:165
bool gotoTargetPosition(MechanicalPoint const &)
Definition eq500x.cpp:816
virtual bool Goto(double, double) override
Move the scope to the supplied RA and DEC coordinates.
Definition eq500x.cpp:605
const char * getDefautName()
Definition eq500x.cpp:127
int getReply(char *, size_t const)
Definition eq500x.cpp:803
EQ500X()
Definition eq500x.cpp:102
virtual bool ReadScopeStatus() override
Read telescope status.
Definition eq500x.cpp:249
int sendCmd(char const *)
Definition eq500x.cpp:792
virtual bool Sync(double, double) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
Definition eq500x.cpp:696
bool isParked()
virtual bool initProperties() override
Called to initialize basic properties required all the time.
Definition eq500x.cpp:147
bool getCurrentMechanicalPosition(MechanicalPoint &)
Definition eq500x.cpp:840
void resetSimulation()
Definition eq500x.cpp:137
virtual void getBasicData() override
Definition eq500x.cpp:160
virtual void setPierSide(TelescopePierSide)
Definition eq500x.cpp:747
virtual bool Abort() override
Abort any telescope motion including tracking if possible.
Definition eq500x.cpp:740
virtual double getLST()
Definition eq500x.cpp:132
INDI_DIR_NS