Instrument Neutral Distributed Interface INDI  1.9.2
indidome.h
Go to the documentation of this file.
1 /*******************************************************************************
2  INDI Dome Base Class
3  Copyright(c) 2014 Jasem Mutlaq. All rights reserved.
4 
5  The code used calculate dome target AZ and ZD is written by Ferran Casarramona, and adapted from code from Markus Wildi.
6  The transformations are based on the paper Matrix Method for Coodinates Transformation written by Toshimi Taki (http://www.asahi-net.or.jp/~zs3t-tk).
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License version 2 as published by the Free Software Foundation.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 *******************************************************************************/
22 
23 #pragma once
24 
25 #include "defaultdevice.h"
26 #include "libastro.h"
27 #include "inditimer.h"
28 
29 #include <string>
30 
31 // Defines a point in a 3 dimension space
32 typedef struct
33 {
34  double x, y, z;
35 } point3D;
36 
37 namespace Connection
38 {
39 class Serial;
40 class TCP;
41 }
42 
71 namespace INDI
72 {
73 
74 class Dome : public DefaultDevice
75 {
76  public:
81  typedef enum
82  {
90 
92  {
95  };
97  {
100  };
101 
104  {
108  };
109 
113  typedef enum
114  {
118 
121  {
124  };
125 
129  typedef enum
130  {
140  } DomeState;
141 
145  typedef enum
146  {
152  } ShutterState;
153 
154  enum
155  {
156  DOME_CAN_ABORT = 1 << 0,
157  DOME_CAN_ABS_MOVE = 1 << 1,
158  DOME_CAN_REL_MOVE = 1 << 2,
159  DOME_CAN_PARK = 1 << 3,
160  DOME_CAN_SYNC = 1 << 4,
161  DOME_HAS_SHUTTER = 1 << 5,
164  };
165 
169  enum
170  {
171  CONNECTION_NONE = 1 << 0,
172  CONNECTION_SERIAL = 1 << 1,
173  CONNECTION_TCP = 1 << 2
174  } DomeConnection;
175 
176  Dome();
177  virtual ~Dome();
178 
179  virtual bool initProperties() override;
180  virtual void ISGetProperties(const char * dev) override;
181  virtual bool updateProperties() override;
182  virtual bool ISNewNumber(const char * dev, const char * name, double values[], char * names[], int n) override;
183  virtual bool ISNewSwitch(const char * dev, const char * name, ISState * states, char * names[], int n) override;
184  virtual bool ISNewText(const char * dev, const char * name, char * texts[], char * names[], int n) override;
185  virtual bool ISSnoopDevice(XMLEle * root) override;
186 
187  static void buttonHelper(const char * button_n, ISState state, void * context);
188 
194  void setDomeConnection(const uint8_t &value);
195 
199  uint8_t getDomeConnection() const;
200 
204  uint32_t GetDomeCapability() const
205  {
206  return capability;
207  }
208 
213  void SetDomeCapability(uint32_t cap);
214 
218  bool CanAbort()
219  {
220  return capability & DOME_CAN_ABORT;
221  }
222 
226  bool CanAbsMove()
227  {
228  return capability & DOME_CAN_ABS_MOVE;
229  }
230 
234  bool CanRelMove()
235  {
236  return capability & DOME_CAN_REL_MOVE;
237  }
238 
242  bool CanPark()
243  {
244  return capability & DOME_CAN_PARK;
245  }
246 
250  bool CanSync()
251  {
252  return capability & DOME_CAN_SYNC;
253  }
254 
258  bool HasShutter()
259  {
260  return capability & DOME_HAS_SHUTTER;
261  }
262 
267  {
269  }
270 
274  bool HasBacklash()
275  {
276  return capability & DOME_HAS_BACKLASH;
277  }
278 
283  bool isLocked();
284 
286  {
287  return m_DomeState;
288  }
289  void setDomeState(const DomeState &value);
290 
292  {
293  return m_ShutterState;
294  }
295  void setShutterState(const ShutterState &value);
296 
297  IPState getMountState() const;
298 
299  protected:
305  virtual bool SetSpeed(double rpm);
306 
311  virtual IPState Move(DomeDirection dir, DomeMotionCommand operation);
312 
318  virtual IPState MoveAbs(double az);
319 
325  virtual IPState MoveRel(double azDiff);
326 
331  virtual bool Sync(double az);
332 
337  virtual bool Abort();
338 
344  virtual IPState Park();
345 
352  virtual IPState UnPark();
353 
359  virtual bool SetBacklash(int32_t steps);
360 
366  virtual bool SetBacklashEnabled(bool enabled);
367 
374  virtual IPState ControlShutter(ShutterOperation operation);
375 
381  const char * GetShutterStatusString(ShutterState status);
382 
388 
397  bool InitPark();
398 
403  bool isParked();
404 
409  void SetParked(bool isparked);
410 
414  double GetAxis1Park();
415 
419  double GetAxis1ParkDefault();
420 
425  void SetAxis1Park(double value);
426 
431  void SetAxis1ParkDefault(double steps);
432 
437  virtual bool SetCurrentPark();
438 
443  virtual bool SetDefaultPark();
444 
445  //Park
446  const char * LoadParkData();
447  bool WriteParkData();
448 
457  bool GetTargetAz(double &Az, double &Alt, double &minAz, double &maxAz);
458 
472  bool Intersection(point3D p1, point3D p2, double r, double &mu1, double &mu2);
473 
483  bool OpticalCenter(point3D MountCenter, double dOpticalAxis, double Lat, double Ah, point3D &OP);
484 
492  bool OpticalVector(double Az, double Alt, point3D &OV);
493 
501  bool CheckHorizon(double HA, double dec, double lat);
502 
508  virtual bool saveConfigItems(FILE * fp) override;
509 
513  void UpdateMountCoords();
514 
519  virtual void UpdateAutoSync();
520 
522  virtual bool Handshake();
523 
524  double Csc(double x);
525  double Sec(double x);
526 
529 
532 
535 
538 
541 
544 
547 
550 
553 
556 
559 
560  // ISwitch AutoParkS[2];
561  // ISwitchVectorProperty AutoParkSP;
562 
563  uint32_t capability;
565 
568 
569  // Switch to lock id mount is unparked
572 
573  // Shutter control on Park/Unpark
576  enum
577  {
580  };
581 
588 
591  // 0 is East, 1 is West, 2 is as reported by mout, 3 as deducted by Hour Angle
592  // 4 ignore pier side and perform as in a fork mount
593  enum
594  {
600  };
601 
602  int mountOTASide = 0; // Side of the telescope with respect of the mount, 1: west, -1: east, 0 not reported
605 
606  // Backlash toogle
609 
610  // Backlash steps
613 
615 
616  // For Serial and TCP connections
617  int PortFD = -1;
618 
621 
622  // States
626 
627  // Observer geographic coords. Snooped from mount driver.
629  // Do we have valid geographic coords from mount driver?
630  bool HaveLatLong = false;
631 
632  // Mount horizontal and equatorial coords. Snoops from mount driver.
635  // Do we have valid coords from mount driver?
636  bool HaveRaDec = false;
637 
638  private:
639  void processButton(const char * button_n, ISState state);
640  void triggerSnoop(const char * driverName, const char * propertyName);
645  void SyncParkStatus(bool isparked);
650  const char * LoadParkXML();
651 
657  std::string GetHomeDirectory() const;
658 
659  Controller * controller = nullptr;
660 
661  bool IsParked = false;
662  bool IsMountParked = false;
663  bool IsLocked = true;
664  bool AutoSyncWarning = false;
665 
666  const char * ParkDeviceName;
667  const std::string ParkDataFileName;
668  INDI::Timer m_MountUpdateTimer;
669  //int m_HorizontalUpdateTimerID { -1 };
670  XMLEle * ParkdataXmlRoot, *ParkdeviceXml, *ParkstatusXml, *ParkpositionXml, *ParkpositionAxis1Xml;
671 
672  double Axis1ParkPosition;
673  double Axis1DefaultParkPosition;
674 
675  bool callHandshake();
676  uint8_t domeConnection = CONNECTION_SERIAL | CONNECTION_TCP;
677 
678  // How often we update horizontal coordinates (10 seconds).
679  static constexpr uint32_t HORZ_UPDATE_TIMER { 10000 };
680 };
681 
682 }
INDI::Dome::ActiveDeviceTP
ITextVectorProperty ActiveDeviceTP
Definition: indidome.h:566
INDI::Dome::Dome
Dome()
Definition: indidome.cpp:50
INDI::Dome::SetAxis1Park
void SetAxis1Park(double value)
SetRAPark Set current AZ parking position. The data park file (stored in ~/.indi/ParkData....
Definition: indidome.cpp:1858
INDI::Dome::Park
virtual IPState Park()
Goto Park Position. The park position is an absolute azimuth value.
Definition: indidome.cpp:2168
INDI::Dome::DOME_PARKED
@ DOME_PARKED
Definition: indidome.h:136
INDI::Dome::DM_OTA_SIDE_HA
@ DM_OTA_SIDE_HA
Definition: indidome.h:598
INDI::Dome::PresetGotoS
ISwitch PresetGotoS[3]
Definition: indidome.h:584
INDI::Dome::DOME_HAS_VARIABLE_SPEED
@ DOME_HAS_VARIABLE_SPEED
Definition: indidome.h:162
INDI::Dome::MOUNT_IGNORED
@ MOUNT_IGNORED
Definition: indidome.h:122
INDI::Dome::DomeRelPosN
INumber DomeRelPosN[1]
Definition: indidome.h:537
INDI::Dome::DomeSpeedN
INumber DomeSpeedN[1]
Definition: indidome.h:528
INDI::Dome::initProperties
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
Definition: indidome.cpp:93
INDI::Dome::SetBacklash
virtual bool SetBacklash(int32_t steps)
SetBacklash Set the dome backlash compensation value.
Definition: indidome.cpp:1025
IPState
IPState
Property state.
Definition: indiapi.h:158
INDI::Dome
Class to provide general functionality of a Dome device.
Definition: indidome.h:74
INDI::Dome::UnPark
virtual IPState UnPark()
UnPark dome. The action of the Unpark command is dome specific, but it may include opening the shutte...
Definition: indidome.cpp:2222
INDI::Dome::DOME_UNKNOWN
@ DOME_UNKNOWN
Definition: indidome.h:138
INDI::Dome::prev_alt
double prev_alt
Definition: indidome.h:614
INDI::Dome::DOME_CAN_ABORT
@ DOME_CAN_ABORT
Definition: indidome.h:156
INDI::Dome::SetParkDataType
void SetParkDataType(DomeParkData type)
setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
Definition: indidome.cpp:1584
INDI::Dome::SHUTTER_UNKNOWN
@ SHUTTER_UNKNOWN
Definition: indidome.h:150
INDI::Dome::MoveAbs
virtual IPState MoveAbs(double az)
Move the Dome to an absolute azimuth.
Definition: indidome.cpp:1978
INDI::Dome::ActiveDeviceT
IText ActiveDeviceT[1]
Definition: indidome.h:567
INDI::Dome::DomeSpeedNP
INumberVectorProperty DomeSpeedNP
Definition: indidome.h:527
INDI::Dome::DomeShutterS
ISwitch DomeShutterS[2]
Definition: indidome.h:549
INDI::Dome::tcpConnection
Connection::TCP * tcpConnection
Definition: indidome.h:620
ISwitch
One switch descriptor.
INDI::Dome::Move
virtual IPState Move(DomeDirection dir, DomeMotionCommand operation)
Move the Dome in a particular direction.
Definition: indidome.cpp:1870
INDI::Dome::DM_OTA_SIDE_EAST
@ DM_OTA_SIDE_EAST
Definition: indidome.h:595
INDI::Dome::AbortS
ISwitch AbortS[1]
Definition: indidome.h:540
INDI::Dome::OpticalCenter
bool OpticalCenter(point3D MountCenter, double dOpticalAxis, double Lat, double Ah, point3D &OP)
OpticalCenter This function calculates the distance from the optical axis to the Dome center.
Definition: indidome.cpp:1429
INDI::Controller
The Controller class provides functionality to access a controller (e.g. joystick) input and send it ...
Definition: indicontroller.h:81
INDI::Dome::buttonHelper
static void buttonHelper(const char *button_n, ISState state, void *context)
Definition: indidome.cpp:1080
INDI::Dome::SetSpeed
virtual bool SetSpeed(double rpm)
SetSpeed Set Dome speed. This does not initiate motion, it sets the speed for the next motion command...
Definition: indidome.cpp:2103
INDI::Dome::ISNewSwitch
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
Definition: indidome.cpp:492
INDI::Dome::parkDataType
DomeParkData parkDataType
Definition: indidome.h:564
INDI::Dome::SHUTTER_ERROR
@ SHUTTER_ERROR
Definition: indidome.h:151
INDI::Dome::mountEquatorialCoords
INDI::IEquatorialCoordinates mountEquatorialCoords
Definition: indidome.h:634
INumber
One number descriptor.
INDI::Dome::OpticalVector
bool OpticalVector(double Az, double Alt, point3D &OV)
OpticalVector This function calculates a second point for determining the optical axis.
Definition: indidome.cpp:1450
inditimer.h
Connection::Serial
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
Definition: connectionserial.h:56
INDI::Dome::MOTION_START
@ MOTION_START
Definition: indidome.h:98
Connection::TCP
The TCP class manages connection with devices over the network via TCP/IP. Upon successfull connectio...
Definition: connectiontcp.h:55
INDI::Dome::DomeParkData
DomeParkData
Definition: indidome.h:103
INDI::Dome::MOUNT_LOCKS
@ MOUNT_LOCKS
Definition: indidome.h:123
INDI::Dome::DOME_SYNCED
@ DOME_SYNCED
Definition: indidome.h:133
INDI::Dome::MountLockingPolicy
MountLockingPolicy
Definition: indidome.h:120
INDI::Dome::DM_NORTH_DISPLACEMENT
@ DM_NORTH_DISPLACEMENT
Definition: indidome.h:85
INDI::Dome::Csc
double Csc(double x)
Definition: indidome.cpp:1463
INDI::Dome::DOME_UNPARKED
@ DOME_UNPARKED
Definition: indidome.h:137
INDI::Dome::SetDefaultPark
virtual bool SetDefaultPark()
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
Definition: indidome.cpp:2265
INDI::Dome::DomeBacklashNP
INumberVectorProperty DomeBacklashNP
Definition: indidome.h:611
INDI::Dome::ParkOptionSP
ISwitchVectorProperty ParkOptionSP
Definition: indidome.h:558
INDI::Dome::saveConfigItems
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Saves the Device Port and Dome Presets in the configuration file
Definition: indidome.cpp:1041
INDI::Dome::isLocked
bool isLocked()
isLocked, is the dome currently locked?
Definition: indidome.cpp:1075
INDI::Dome::MoveRel
virtual IPState MoveRel(double azDiff)
Move the Dome to an relative position.
Definition: indidome.cpp:1910
INDI::Dome::DomeDirection
DomeDirection
Definition: indidome.h:91
INDI::Dome::CONNECTION_SERIAL
@ CONNECTION_SERIAL
Definition: indidome.h:172
INDI::Dome::DOME_ERROR
@ DOME_ERROR
Definition: indidome.h:139
INDI::Timer
The Timer class provides repetitive and single-shot timers.
Definition: inditimer.h:40
INDI::Dome::Abort
virtual bool Abort()
Abort all dome motion.
Definition: indidome.cpp:2049
INDI::Dome::ParkSP
ISwitchVectorProperty ParkSP
Definition: indidome.h:551
INDI::Dome::ISNewText
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
Definition: indidome.cpp:795
INDI::Dome::CanRelMove
bool CanRelMove()
Definition: indidome.h:234
INDI::Dome::CanAbsMove
bool CanAbsMove()
Definition: indidome.h:226
INDI::Dome::SHUTTER_OPENED
@ SHUTTER_OPENED
Definition: indidome.h:147
INDI::Dome::ShutterParkPolicyS
ISwitch ShutterParkPolicyS[2]
Definition: indidome.h:575
INDI::Dome::SHUTTER_CLOSED
@ SHUTTER_CLOSED
Definition: indidome.h:148
INDI::Dome::DomeAutoSyncSP
ISwitchVectorProperty DomeAutoSyncSP
Definition: indidome.h:603
INDI::Dome::DomeParamNP
INumberVectorProperty DomeParamNP
Definition: indidome.h:542
INDI::Dome::UpdateMountCoords
void UpdateMountCoords()
updateCoords updates the horizontal coordinates (Az & Alt) of the mount from the snooped RA,...
Definition: indidome.cpp:1485
INDI::Dome::setDomeState
void setDomeState(const DomeState &value)
Definition: indidome.cpp:1154
INDI::Dome::DOME_CAN_REL_MOVE
@ DOME_CAN_REL_MOVE
Definition: indidome.h:158
INDI::Dome::GetTargetAz
bool GetTargetAz(double &Az, double &Alt, double &minAz, double &maxAz)
GetTargetAz.
Definition: indidome.cpp:1271
INDI::Dome::DM_OTA_OFFSET
@ DM_OTA_OFFSET
Definition: indidome.h:88
INDI::Dome::DOME_HAS_BACKLASH
@ DOME_HAS_BACKLASH
Definition: indidome.h:163
INDI::Dome::serialConnection
Connection::Serial * serialConnection
Definition: indidome.h:619
INDI::Dome::DomeRelPosNP
INumberVectorProperty DomeRelPosNP
Definition: indidome.h:536
INDI::Dome::observer
IGeographicCoordinates observer
Definition: indidome.h:628
INDI::Dome::mountOTASide
int mountOTASide
Definition: indidome.h:602
INDI::Dome::CONNECTION_NONE
@ CONNECTION_NONE
Definition: indidome.h:171
INDI::Dome::DM_SHUTTER_WIDTH
@ DM_SHUTTER_WIDTH
Definition: indidome.h:84
INDI::Dome::GetAxis1Park
double GetAxis1Park()
Definition: indidome.cpp:1848
_ITextVectorProperty
Text vector property descriptor.
Definition: indiapi.h:244
INDI::Dome::DomeBacklashSP
ISwitchVectorProperty DomeBacklashSP
Definition: indidome.h:607
INDI::Dome::SHUTTER_CLOSE_ON_PARK
@ SHUTTER_CLOSE_ON_PARK
Definition: indidome.h:578
INDI::Dome::HaveLatLong
bool HaveLatLong
Definition: indidome.h:630
INDI::Dome::HasVariableSpeed
bool HasVariableSpeed()
Definition: indidome.h:266
INDI::Dome::DOME_MOVING
@ DOME_MOVING
Definition: indidome.h:132
type
__le16 type
Definition: pwc-ioctl.h:2
INDI::Dome::mountHoriztonalCoords
INDI::IHorizontalCoordinates mountHoriztonalCoords
Definition: indidome.h:633
INDI::Dome::DomeMeasurements
DomeMeasurements
Measurements necessary for dome-slit synchronization. All values are in meters. The displacements are...
Definition: indidome.h:81
INDI::Dome::DM_OTA_SIDE_WEST
@ DM_OTA_SIDE_WEST
Definition: indidome.h:596
INDI::Dome::DM_EAST_DISPLACEMENT
@ DM_EAST_DISPLACEMENT
Definition: indidome.h:86
_INumberVectorProperty
Number vector property descriptor.
Definition: indiapi.h:317
INDI::Dome::PresetN
INumber PresetN[3]
Definition: indidome.h:582
INDI::Dome::getDomeConnection
uint8_t getDomeConnection() const
Definition: indidome.cpp:2289
INDI::Dome::DomeMeasurementsN
INumber DomeMeasurementsN[6]
Definition: indidome.h:586
INDI::Dome::DOME_HAS_SHUTTER
@ DOME_HAS_SHUTTER
Definition: indidome.h:161
INDI::Dome::m_DomeState
DomeState m_DomeState
Definition: indidome.h:623
IText
One text descriptor.
INDI::Dome::HasShutter
bool HasShutter()
Definition: indidome.h:258
INDI::Dome::ControlShutter
virtual IPState ControlShutter(ShutterOperation operation)
Open or Close shutter.
Definition: indidome.cpp:2124
INDI::Dome::GetShutterStatusString
const char * GetShutterStatusString(ShutterState status)
getShutterStatusString
Definition: indidome.cpp:1566
INDI::Dome::DM_OTA_SIDE_IGNORE
@ DM_OTA_SIDE_IGNORE
Definition: indidome.h:599
INDI::Dome::LoadParkData
const char * LoadParkData()
Definition: indidome.cpp:1755
INDI::Dome::SetBacklashEnabled
virtual bool SetBacklashEnabled(bool enabled)
SetBacklashEnabled Enables or disables the dome backlash compensation.
Definition: indidome.cpp:1032
INDI::Dome::ISNewNumber
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
Definition: indidome.cpp:390
INDI::Dome::ParkPositionNP
INumberVectorProperty ParkPositionNP
Definition: indidome.h:555
INDI::Dome::ISSnoopDevice
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
Definition: indidome.cpp:822
INDI::Dome::PresetGotoSP
ISwitchVectorProperty PresetGotoSP
Definition: indidome.h:585
INDI::Dome::DomeAutoSyncS
ISwitch DomeAutoSyncS[2]
Definition: indidome.h:604
INDI::Dome::AbortSP
ISwitchVectorProperty AbortSP
Definition: indidome.h:539
INDI::Dome::m_MountState
IPState m_MountState
Definition: indidome.h:625
INDI::Dome::~Dome
virtual ~Dome()
Definition: indidome.cpp:71
INDI::Dome::MOTION_STOP
@ MOTION_STOP
Definition: indidome.h:99
INDI::Dome::SHUTTER_OPEN
@ SHUTTER_OPEN
Definition: indidome.h:115
dec
double dec
Definition: ieqprolegacydriver.cpp:44
INDI::Dome::DomeSyncN
INumber DomeSyncN[1]
Definition: indidome.h:546
INDI::Dome::getDomeState
DomeState getDomeState() const
Definition: indidome.h:285
xml_ele_
Definition: lilxml.c:105
INDI::Dome::SetAxis1ParkDefault
void SetAxis1ParkDefault(double steps)
SetAxis1Park Set default AZ parking position.
Definition: indidome.cpp:1865
INDI::Dome::DomeState
DomeState
Dome status.
Definition: indidome.h:129
point3D
Definition: indidome.h:32
INDI::Dome::OTASideS
ISwitch OTASideS[5]
Definition: indidome.h:590
defaultdevice.h
INDI::Dome::getMountState
IPState getMountState() const
Definition: indidome.cpp:1112
INDI::Dome::DOME_CAN_ABS_MOVE
@ DOME_CAN_ABS_MOVE
Definition: indidome.h:157
INDI::IGeographicCoordinates
Definition: libastro.h:64
INDI::Dome::DomeSyncNP
INumberVectorProperty DomeSyncNP
Definition: indidome.h:545
INDI::Dome::DOME_CAN_SYNC
@ DOME_CAN_SYNC
Definition: indidome.h:160
INDI::Dome::ShutterOperation
ShutterOperation
Shutter operation command.
Definition: indidome.h:113
INDI::Dome::DM_DOME_RADIUS
@ DM_DOME_RADIUS
Definition: indidome.h:83
INDI::Dome::DM_UP_DISPLACEMENT
@ DM_UP_DISPLACEMENT
Definition: indidome.h:87
INDI::Dome::HaveRaDec
bool HaveRaDec
Definition: indidome.h:636
INDI::Dome::OTASideSP
ISwitchVectorProperty OTASideSP
Definition: indidome.h:589
INDI::Dome::SHUTTER_MOVING
@ SHUTTER_MOVING
Definition: indidome.h:149
INDI::Dome::DomeMotionCommand
DomeMotionCommand
Definition: indidome.h:96
INDI::Dome::DomeBacklashN
INumber DomeBacklashN[1]
Definition: indidome.h:612
INDI::Dome::GetAxis1ParkDefault
double GetAxis1ParkDefault()
Definition: indidome.cpp:1853
INDI::Dome::CanSync
bool CanSync()
Definition: indidome.h:250
INDI::Dome::DomeShutterSP
ISwitchVectorProperty DomeShutterSP
Definition: indidome.h:548
INDI::Dome::isParked
bool isParked()
isParked is dome currently parked?
Definition: indidome.cpp:1636
INDI::Dome::WriteParkData
bool WriteParkData()
Definition: indidome.cpp:1786
INDI::Dome::setShutterState
void setShutterState(const ShutterState &value)
Definition: indidome.cpp:1117
INDI::Dome::DOME_UNPARKING
@ DOME_UNPARKING
Definition: indidome.h:135
INDI::Dome::HasBacklash
bool HasBacklash()
Definition: indidome.h:274
INDI::Dome::CheckHorizon
bool CheckHorizon(double HA, double dec, double lat)
CheckHorizon Returns true if telescope points above horizon.
Definition: indidome.cpp:1473
Connection
Combines all INDI Connection Plugins. Each INDI connection plugin is responsible of managing communic...
Definition: arduino_st4.h:33
INDI::Dome::SetParked
void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
Definition: indidome.cpp:1630
INDI::Dome::Intersection
bool Intersection(point3D p1, point3D p2, double r, double &mu1, double &mu2)
Intersection Calculate the intersection of a ray and a sphere. The line segment is defined from p1 to...
Definition: indidome.cpp:1405
INDI::Dome::DomeMeasurementsNP
INumberVectorProperty DomeMeasurementsNP
Definition: indidome.h:587
INDI::Dome::prev_az
double prev_az
Definition: indidome.h:614
INDI::Dome::DomeConnection
enum INDI::Dome::@176 DomeConnection
INDI::Dome::ISGetProperties
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
Definition: indidome.cpp:259
INDI
Namespace to encapsulate INDI client, drivers, and mediator classes.
Definition: AlignmentSubsystemForClients.cpp:11
INDI::Dome::ShutterParkPolicySP
ISwitchVectorProperty ShutterParkPolicySP
Definition: indidome.h:574
INDI::Dome::CONNECTION_TCP
@ CONNECTION_TCP
Definition: indidome.h:173
INDI::Dome::DomeParamN
INumber DomeParamN[1]
Definition: indidome.h:543
INDI::Dome::Sync
virtual bool Sync(double az)
Sync sets the dome current azimuth as the supplied azimuth position.
Definition: indidome.cpp:2042
INDI::Dome::CanPark
bool CanPark()
Definition: indidome.h:242
INDI::Dome::prev_dec
double prev_dec
Definition: indidome.h:614
INDI::Dome::DM_OTA_SIDE_MOUNT
@ DM_OTA_SIDE_MOUNT
Definition: indidome.h:597
INDI::Dome::ParkS
ISwitch ParkS[2]
Definition: indidome.h:552
INDI::Dome::m_ShutterState
ShutterState m_ShutterState
Definition: indidome.h:624
INDI::Dome::DOME_CCW
@ DOME_CCW
Definition: indidome.h:94
INDI::Dome::DomeAbsPosNP
INumberVectorProperty DomeAbsPosNP
Definition: indidome.h:533
INDI::Dome::Sec
double Sec(double x)
Definition: indidome.cpp:1468
INDI::Dome::MountPolicySP
ISwitchVectorProperty MountPolicySP
Definition: indidome.h:570
INDI::Dome::PresetNP
INumberVectorProperty PresetNP
Definition: indidome.h:583
INDI::Dome::InitPark
bool InitPark()
InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking...
Definition: indidome.cpp:1641
INDI::Dome::setDomeConnection
void setDomeConnection(const uint8_t &value)
setDomeConnection Set Dome connection mode. Child class should call this in the constructor before Do...
Definition: indidome.cpp:2294
INDI::Dome::DOME_CW
@ DOME_CW
Definition: indidome.h:93
INDI::Dome::SetDomeCapability
void SetDomeCapability(uint32_t cap)
SetDomeCapability set the dome capabilities. All capabilities must be initialized.
Definition: indidome.cpp:1558
INDI::Dome::PARK_AZ_ENCODER
@ PARK_AZ_ENCODER
Definition: indidome.h:107
INDI::Dome::DomeBacklashS
ISwitch DomeBacklashS[2]
Definition: indidome.h:608
INDI::Dome::CanAbort
bool CanAbort()
Definition: indidome.h:218
ISState
ISState
Switch state.
Definition: indiapi.h:148
INDI::Dome::DomeMotionSP
ISwitchVectorProperty DomeMotionSP
Definition: indidome.h:530
INDI::Dome::DomeMotionS
ISwitch DomeMotionS[2]
Definition: indidome.h:531
INDI::Dome::PARK_AZ
@ PARK_AZ
Definition: indidome.h:106
INDI::IHorizontalCoordinates
Definition: libastro.h:56
INDI::Dome::DOME_CAN_PARK
@ DOME_CAN_PARK
Definition: indidome.h:159
INDI::Dome::DOME_PARKING
@ DOME_PARKING
Definition: indidome.h:134
INDI::Dome::prev_ra
double prev_ra
Definition: indidome.h:614
INDI::IEquatorialCoordinates
Definition: libastro.h:48
INDI::Dome::SHUTTER_CLOSE
@ SHUTTER_CLOSE
Definition: indidome.h:116
INDI::Dome::getShutterState
ShutterState getShutterState() const
Definition: indidome.h:291
INDI::DefaultDevice
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
Definition: defaultdevice.h:118
INDI::Dome::ParkOptionS
ISwitch ParkOptionS[3]
Definition: indidome.h:557
INDI::Dome::ParkPositionN
INumber ParkPositionN[1]
Definition: indidome.h:554
INDI::Dome::capability
uint32_t capability
Definition: indidome.h:563
INDI::Dome::DOME_IDLE
@ DOME_IDLE
Definition: indidome.h:131
INDI::Dome::SetCurrentPark
virtual bool SetCurrentPark()
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
Definition: indidome.cpp:2259
INDI::Dome::SHUTTER_OPEN_ON_UNPARK
@ SHUTTER_OPEN_ON_UNPARK
Definition: indidome.h:579
INDI::Dome::MountPolicyS
ISwitch MountPolicyS[2]
Definition: indidome.h:571
INDI::Dome::DomeAbsPosN
INumber DomeAbsPosN[1]
Definition: indidome.h:534
INDI::Dome::ShutterState
ShutterState
Definition: indidome.h:145
INDI::Dome::Handshake
virtual bool Handshake()
perform handshake with device to check communication
Definition: indidome.cpp:2271
_ISwitchVectorProperty
Switch vector property descriptor.
Definition: indiapi.h:365
libastro.h
INDI::Dome::PortFD
int PortFD
Definition: indidome.h:617
INDI::Dome::GetDomeCapability
uint32_t GetDomeCapability() const
GetDomeCapability returns the capability of the dome.
Definition: indidome.h:204
INDI::Dome::updateProperties
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Definition: indidome.cpp:279
INDI::Dome::PARK_NONE
@ PARK_NONE
Definition: indidome.h:105
INDI::Dome::UpdateAutoSync
virtual void UpdateAutoSync()
UpdateAutoSync This function calculates the target dome azimuth from the mount's target coordinates g...
Definition: indidome.cpp:1513