Instrument Neutral Distributed Interface INDI  1.9.2
inditelescope.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright(c) 2011 Gerry Rozema, Jasem Mutlaq. All rights reserved.
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 *******************************************************************************/
18 
19 #pragma once
20 
21 #include "defaultdevice.h"
22 #include "libastro.h"
23 #include <libnova/julian_day.h>
24 
25 #include <string>
26 
67 namespace INDI
68 {
69 
70 class Telescope : public DefaultDevice
71 {
72  public:
74  {
80  };
82  {
85  };
87  {
92  };
94  {
99  };
101  {
105  };
107  {
114  };
116  {
120  };
122  {
126  };
127 
129  {
131  PEC_OFF = 0,
132  PEC_ON = 1
133  };
134 
137  {
140  };
141 
146  enum
147  {
148  CONNECTION_NONE = 1 << 0,
149  CONNECTION_SERIAL = 1 << 1,
150  CONNECTION_TCP = 1 << 2
152 
157  enum
158  {
166  TELESCOPE_HAS_PEC = 1 << 7,
173 
174  Telescope();
175  virtual ~Telescope();
176 
177  virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
178  virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override;
179  virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
180  virtual void ISGetProperties(const char *dev) override;
181  virtual bool ISSnoopDevice(XMLEle *root) override;
182 
186  uint32_t GetTelescopeCapability() const
187  {
188  return capability;
189  }
190 
199  void SetTelescopeCapability(uint32_t cap, uint8_t slewRateCount = 0);
200 
204  bool CanGOTO()
205  {
207  }
208 
212  bool CanSync()
213  {
215  }
216 
220  bool CanAbort()
221  {
223  }
224 
228  bool CanPark()
229  {
231  }
232 
237  {
239  }
240 
244  bool HasTime()
245  {
247  }
248 
252  bool HasLocation()
253  {
255  }
256 
260  bool HasPierSide()
261  {
263  }
264 
269  {
271  }
276  {
278  }
282  bool HasPECState()
283  {
284  return capability & TELESCOPE_HAS_PEC;
285  }
286 
291  {
293  }
294 
299  {
301  }
302 
304  virtual bool initProperties() override;
306  virtual bool updateProperties() override;
307 
309  virtual bool Handshake();
310 
312  virtual void TimerHit() override;
313 
321 
330  bool InitPark();
331 
336  bool isParked();
337 
343  void SetParked(bool isparked);
344 
348  double GetAxis1Park() const;
349 
353  double GetAxis1ParkDefault() const;
354 
358  double GetAxis2Park() const;
359 
363  double GetAxis2ParkDefault() const;
364 
371  void SetAxis1Park(double value);
372 
378  void SetAxis1ParkDefault(double steps);
379 
386  void SetAxis2Park(double steps);
387 
393  void SetAxis2ParkDefault(double steps);
394 
399  bool isLocked() const;
400 
401  // Joystick helpers
402  static void joystickHelper(const char *joystick_n, double mag, double angle, void *context);
403  static void axisHelper(const char *axis_n, double value, void *context);
404  static void buttonHelper(const char *button_n, ISState state, void *context);
405 
411  void setTelescopeConnection(const uint8_t &value);
412 
416  uint8_t getTelescopeConnection() const;
417 
418  void setPierSide(TelescopePierSide side);
420  {
421  return currentPierSide;
422  }
423 
424  void setPECState(TelescopePECState state);
426  {
427  return currentPECState;
428  }
429 
430  protected:
431  virtual bool saveConfigItems(FILE *fp) override;
432 
434  void NewRaDec(double ra, double dec);
435 
449  virtual bool ReadScopeStatus() = 0;
450 
457  virtual bool Goto(double ra, double dec);
458 
465  virtual bool Sync(double ra, double dec);
466 
475  virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command);
476 
485  virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command);
486 
493  virtual bool Park();
494 
501  virtual bool UnPark();
502 
509  virtual bool Abort();
510 
518  virtual bool SetTrackMode(uint8_t mode);
519 
528  virtual bool SetTrackRate(double raRate, double deRate);
529 
538  virtual int AddTrackMode(const char *name, const char *label, bool isDefault = false);
539 
548  virtual bool SetTrackEnabled(bool enabled);
549 
558  virtual bool updateTime(ln_date *utc, double utc_offset);
559 
569  virtual bool updateLocation(double latitude, double longitude, double elevation);
570 
580  void updateObserverLocation(double latitude, double longitude, double elevation);
581 
591  virtual bool SetParkPosition(double Axis1Value, double Axis2Value);
592 
599  virtual bool SetCurrentPark();
600 
607  virtual bool SetDefaultPark();
608 
618  virtual bool SetSlewRate(int index);
619 
625  bool callHandshake();
626 
627  // Joystick
628  void processNSWE(double mag, double angle);
629  void processJoystick(const char *joystick_n, double mag, double angle);
630  void processAxis(const char *axis_n, double value);
631  void processSlewPresets(double mag, double angle);
632  void processButton(const char *button_n, ISState state);
633 
639 
640  // Geographic Location
642 
647  bool LoadScopeConfig();
648 
653  bool HasDefaultScopeConfig();
654 
658  bool UpdateScopeConfig();
659 
665  std::string GetHomeDirectory() const;
666 
671  int GetScopeConfigIndex() const;
672 
679  bool CheckFile(const std::string &file_name, bool writable) const;
680 
687 
692 
693  // All telescopes should produce equatorial co-ordinates
696 
697  // When a goto is issued, domes will snoop the target property
698  // to start moving the dome when a telescope moves
701 
702  // Abort motion
705 
706  // On a coord_set message, sync, or slew
709 
710  // A number vector that stores lattitude and longitude
713 
714  // A Switch in the client interface to park the scope
717 
718  // Custom parking position
721 
722  // Custom parking options
725  enum
726  {
731  };
732 
733  // A switch for North/South motion
736 
737  // A switch for West/East motion
740 
741  // Slew Rate
743  ISwitch *SlewRateS {nullptr};
744 
745  // Telescope & guider aperture and focal length
748 
749  // UTC and UTC Offset
750  IText TimeT[2] {};
752  void sendTimeFromSystem();
753 
754  // Active GPS/Dome device to snoop
757 
758  // Switch to lock if dome is closed.
761 
762  // Switch for choosing between motion control by 4-way joystick or two seperate axes
765  enum
766  {
769  };
770 
771  // Lock Joystick Axis to one direciton only
774 
775  // Pier Side
778 
779  // Pier Side Simulation
782  bool getSimulatePierSide() const;
783  void setSimulatePierSide(bool value);
784 
785  // Pier Side
787 
788  const char * getPierSideStr(TelescopePierSide ps);
789 
790  // Satellite tracking
801  enum
802  {
806  } SatelliteWindow;
817  enum
818  {
829 
830  // PEC State
833 
834  // Track Mode
836  ISwitch *TrackModeS { nullptr };
837 
838  // Track State
841 
842  // Track Rate
845 
846  // PEC State
848 
849  uint32_t capability {0};
851 
852  //Park
853  const char *LoadParkData();
854  bool WriteParkData();
855  bool PurgeParkData();
856 
857  int PortFD = -1;
860 
861  // XML node names for scope config
862  const std::string ScopeConfigRootXmlNode { "scopeconfig" };
863  const std::string ScopeConfigDeviceXmlNode { "device" };
864  const std::string ScopeConfigNameXmlNode { "name" };
865  const std::string ScopeConfigScopeFocXmlNode { "scopefoc" };
866  const std::string ScopeConfigScopeApXmlNode { "scopeap" };
867  const std::string ScopeConfigGScopeFocXmlNode { "gscopefoc" };
868  const std::string ScopeConfigGScopeApXmlNode { "gscopeap" };
869  const std::string ScopeConfigLabelApXmlNode { "label" };
870 
871  // A switch to apply custom aperture/focal length config
872  enum
873  {
880  };
883 
884  // Scope config name
887 
889  const std::string ScopeConfigFileName;
890 
891  private:
892  bool processTimeInfo(const char *utc, const char *offset);
893  bool processLocationInfo(double latitude, double longitude, double elevation);
894  void triggerSnoop(const char *driverName, const char *propertyName);
899  void SyncParkStatus(bool isparked);
900 
905  const char *LoadParkXML();
906 
907  TelescopeParkData parkDataType {PARK_NONE};
908  bool IsLocked {true};
909  bool IsParked {false};
910  const char *ParkDeviceName {nullptr};
911  const std::string ParkDataFileName;
912  XMLEle *ParkdataXmlRoot {nullptr}, *ParkdeviceXml {nullptr}, *ParkstatusXml {nullptr}, *ParkpositionXml {nullptr},
913  *ParkpositionAxis1Xml {nullptr}, *ParkpositionAxis2Xml {nullptr};
914 
915  double Axis1ParkPosition {0};
916  double Axis1DefaultParkPosition {0};
917  double Axis2ParkPosition {0};
918  double Axis2DefaultParkPosition {0};
919 
920  uint8_t nSlewRate {0};
921  IPState lastEqState { IPS_IDLE };
922 
923  uint8_t telescopeConnection = (CONNECTION_SERIAL | CONNECTION_TCP);
924 
925  Controller *controller {nullptr};
926 
927  float motionDirNSValue {0};
928  float motionDirWEValue {0};
929 
930  bool m_simulatePierSide; // use setSimulatePierSide and getSimulatePierSide for public access
931 };
932 
933 }
INDI::Telescope::ISNewNumber
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
Definition: inditelescope.cpp:816
INDI::Telescope::joystickHelper
static void joystickHelper(const char *joystick_n, double mag, double angle, void *context)
Definition: inditelescope.cpp:2590
INDI::Telescope::Telescope
Telescope()
Definition: inditelescope.cpp:58
INDI::Telescope::SCOPE_IDLE
@ SCOPE_IDLE
Definition: inditelescope.h:75
INDI::Telescope::DomePolicyS
ISwitch DomePolicyS[2]
Definition: inditelescope.h:760
INDI::Telescope::TELESCOPE_HAS_TRACK_MODE
@ TELESCOPE_HAS_TRACK_MODE
Definition: inditelescope.h:167
INDI::Telescope::Abort
virtual bool Abort()
Abort any telescope motion including tracking if possible.
Definition: inditelescope.cpp:1636
INDI::Telescope::last_ns_motion
int last_ns_motion
Definition: inditelescope.h:850
INDI::Telescope::TELESCOPE_CAN_PARK
@ TELESCOPE_CAN_PARK
Definition: inditelescope.h:161
INDI::Telescope::SLEW_GUIDE
@ SLEW_GUIDE
Definition: inditelescope.h:88
INDI::Telescope::ActiveDeviceT
IText ActiveDeviceT[2]
Definition: inditelescope.h:756
INDI::Telescope::SlewRateS
ISwitch * SlewRateS
Definition: inditelescope.h:743
INDI::Telescope::saveConfigItems
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
Definition: inditelescope.cpp:658
INDI::Telescope::TELESCOPE_HAS_PIER_SIDE_SIMULATION
@ TELESCOPE_HAS_PIER_SIDE_SIMULATION
Definition: inditelescope.h:170
INDI::Telescope::TelescopeParkData
TelescopeParkData
Definition: inditelescope.h:106
INDI::Telescope::UpdateScopeConfig
bool UpdateScopeConfig()
Save scope settings to XML files.
Definition: inditelescope.cpp:2859
INDI::Telescope::WriteParkData
bool WriteParkData()
Definition: inditelescope.cpp:2192
INDI::Telescope::getPierSide
TelescopePierSide getPierSide()
Definition: inditelescope.h:419
INDI::Telescope::updateLocation
virtual bool updateLocation(double latitude, double longitude, double elevation)
Update telescope location settings.
Definition: inditelescope.cpp:1786
INDI::Telescope::sendTimeFromSystem
void sendTimeFromSystem()
Definition: inditelescope.cpp:3043
IPState
IPState
Property state.
Definition: indiapi.h:158
INDI::Telescope::CONNECTION_SERIAL
@ CONNECTION_SERIAL
Definition: inditelescope.h:149
INDI::Telescope::PIER_WEST
@ PIER_WEST
Definition: inditelescope.h:124
INDI::Telescope::LoadScopeConfig
bool LoadScopeConfig()
Load scope settings from XML files.
Definition: inditelescope.cpp:2659
INDI::Telescope::PierSideSP
ISwitchVectorProperty PierSideSP
Definition: inditelescope.h:777
INDI::Telescope::GetAxis1ParkDefault
double GetAxis1ParkDefault() const
Definition: inditelescope.cpp:2256
INDI::Telescope::initProperties
virtual bool initProperties() override
Called to initialize basic properties required all the time.
Definition: inditelescope.cpp:82
INDI::Telescope::LocationN
INumber LocationN[3]
Definition: inditelescope.h:712
INDI::Telescope::SCOPE_SLEWING
@ SCOPE_SLEWING
Definition: inditelescope.h:76
INDI::Telescope::SCOPE_PARKING
@ SCOPE_PARKING
Definition: inditelescope.h:78
INDI::Telescope::TELESCOPE_CAN_SYNC
@ TELESCOPE_CAN_SYNC
Definition: inditelescope.h:160
INDI::Telescope::currentPECState
TelescopePECState currentPECState
Definition: inditelescope.h:847
INDI::Telescope::CoordS
ISwitch CoordS[3]
Definition: inditelescope.h:708
ISwitch
One switch descriptor.
INDI::Telescope::setPierSide
void setPierSide(TelescopePierSide side)
Definition: inditelescope.cpp:2605
INDI::Telescope::Goto
virtual bool Goto(double ra, double dec)
Move the scope to the supplied RA and DEC coordinates.
Definition: inditelescope.cpp:1627
INDI::Telescope::CanAbort
bool CanAbort()
Definition: inditelescope.h:220
INDI::Telescope::expectedPierSide
TelescopePierSide expectedPierSide(double ra)
Calculate the expected pier side for scopes that do not report this property themselves.
Definition: inditelescope.cpp:2629
INDI::Telescope::TrackSatS
ISwitch TrackSatS[SAT_TRACK_COUNT]
Definition: inditelescope.h:828
INDI_DIR_NS
INDI_DIR_NS
Definition: indibasetypes.h:44
INDI::Telescope::PIER_UNKNOWN
@ PIER_UNKNOWN
Definition: inditelescope.h:123
INDI::Telescope::MovementNSSP
ISwitchVectorProperty MovementNSSP
Definition: inditelescope.h:735
INDI::Telescope::Handshake
virtual bool Handshake()
perform handshake with device to check communication
Definition: inditelescope.cpp:1602
INDI::Telescope::CanSync
bool CanSync()
Definition: inditelescope.h:212
INumber
One number descriptor.
INDI::Telescope::buttonHelper
static void buttonHelper(const char *button_n, ISState state, void *context)
Definition: inditelescope.cpp:2600
Connection::Serial
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
Definition: connectionserial.h:56
INDI::Telescope::NewRaDec
void NewRaDec(double ra, double dec)
The child class calls this function when it has updates.
Definition: inditelescope.cpp:693
Connection::TCP
The TCP class manages connection with devices over the network via TCP/IP. Upon successfull connectio...
Definition: connectiontcp.h:55
INDI_DIR_WE
INDI_DIR_WE
Definition: indibasetypes.h:50
INDI::Telescope::SCOPE_CONFIG1
@ SCOPE_CONFIG1
Definition: inditelescope.h:874
INDI::Telescope::GetHomeDirectory
std::string GetHomeDirectory() const
Validate a file name.
Definition: inditelescope.cpp:2989
INDI::Telescope::TrackModeS
ISwitch * TrackModeS
Definition: inditelescope.h:836
INDI::Telescope::PARK_AZ_ALT_ENCODER
@ PARK_AZ_ALT_ENCODER
Definition: inditelescope.h:113
INDI::Telescope::lastPECState
TelescopePECState lastPECState
Definition: inditelescope.h:847
INDI::Telescope::HasPECState
bool HasPECState()
Definition: inditelescope.h:282
INDI::Telescope::SetSlewRate
virtual bool SetSlewRate(int index)
SetSlewRate Set desired slew rate index.
Definition: inditelescope.cpp:2302
INDI::Telescope::ScopeConfigGScopeFocXmlNode
const std::string ScopeConfigGScopeFocXmlNode
Definition: inditelescope.h:867
INDI::Telescope::LocationNP
INumberVectorProperty LocationNP
Definition: inditelescope.h:711
INDI::Telescope::GetAxis1Park
double GetAxis1Park() const
Definition: inditelescope.cpp:2252
INDI::Telescope::SetAxis2Park
void SetAxis2Park(double steps)
SetDEPark Set current DEC/ALT parking position. The data park file (stored in ~/.indi/ParkData....
Definition: inditelescope.cpp:2283
INDI::Telescope::SetAxis1ParkDefault
void SetAxis1ParkDefault(double steps)
SetRAPark Set default RA/AZ parking position.
Definition: inditelescope.cpp:2277
INDI::Telescope::PARK_PURGE_DATA
@ PARK_PURGE_DATA
Definition: inditelescope.h:730
INDI::Telescope::processNSWE
void processNSWE(double mag, double angle)
Definition: inditelescope.cpp:2430
INDI::Telescope::ScopeConfigGScopeApXmlNode
const std::string ScopeConfigGScopeApXmlNode
Definition: inditelescope.h:868
INDI::Telescope::PARK_RA_DEC_ENCODER
@ PARK_RA_DEC_ENCODER
Definition: inditelescope.h:112
INDI::Telescope::TelescopeStatus
TelescopeStatus
Definition: inditelescope.h:73
INDI::Telescope::InitPark
bool InitPark()
InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking...
Definition: inditelescope.cpp:1950
INDI::Telescope::ParkOptionS
ISwitch ParkOptionS[4]
Definition: inditelescope.h:723
INDI::Telescope::TLEtoTrackT
IText TLEtoTrackT[1]
Definition: inditelescope.h:796
INDI::Telescope::DomePolicySP
ISwitchVectorProperty DomePolicySP
Definition: inditelescope.h:759
INDI::Telescope::PEC_ON
@ PEC_ON
Definition: inditelescope.h:132
INDI::Telescope::MovementWES
ISwitch MovementWES[2]
Definition: inditelescope.h:738
INDI::Telescope::TRACK_UNKNOWN
@ TRACK_UNKNOWN
Definition: inditelescope.h:104
INDI::Telescope::HasLocation
bool HasLocation()
Definition: inditelescope.h:252
INDI::Telescope::axisHelper
static void axisHelper(const char *axis_n, double value, void *context)
Definition: inditelescope.cpp:2595
INDI::Telescope::GetAxis2ParkDefault
double GetAxis2ParkDefault() const
Definition: inditelescope.cpp:2264
INDI::Telescope::PEC_UNKNOWN
@ PEC_UNKNOWN
Definition: inditelescope.h:130
INDI::Telescope::TELESCOPE_CAN_GOTO
@ TELESCOPE_CAN_GOTO
Definition: inditelescope.h:159
INDI::Telescope::ScopeConfigsSP
ISwitchVectorProperty ScopeConfigsSP
Definition: inditelescope.h:882
INDI::Telescope::TELESCOPE_HAS_LOCATION
@ TELESCOPE_HAS_LOCATION
Definition: inditelescope.h:164
INDI::Telescope::LockAxisS
ISwitch LockAxisS[2]
Definition: inditelescope.h:772
INDI::Telescope::setSimulatePierSide
void setSimulatePierSide(bool value)
Definition: inditelescope.cpp:3080
INDI::Telescope::EqNP
INumberVectorProperty EqNP
Definition: inditelescope.h:694
INDI::Telescope::m_Location
IGeographicCoordinates m_Location
Definition: inditelescope.h:641
INDI::Telescope::ScopeConfigScopeFocXmlNode
const std::string ScopeConfigScopeFocXmlNode
Definition: inditelescope.h:865
INDI::Telescope::processSlewPresets
void processSlewPresets(double mag, double angle)
Definition: inditelescope.cpp:2558
INDI::Telescope::ScopeConfigNameTP
ITextVectorProperty ScopeConfigNameTP
Definition: inditelescope.h:885
INDI::Telescope::updateObserverLocation
void updateObserverLocation(double latitude, double longitude, double elevation)
Update location settings of the observer.
Definition: inditelescope.cpp:1794
INDI::Telescope::tcpConnection
Connection::TCP * tcpConnection
Definition: inditelescope.h:859
INDI::Telescope::DomeLockingPolicy
DomeLockingPolicy
Definition: inditelescope.h:136
INDI::Telescope::PurgeParkData
bool PurgeParkData()
Definition: inditelescope.cpp:2096
INDI::Telescope::lastPierSide
TelescopePierSide lastPierSide
Definition: inditelescope.h:786
INDI::Telescope::updateTime
virtual bool updateTime(ln_date *utc, double utc_offset)
Update telescope time, date, and UTC offset.
Definition: inditelescope.cpp:1779
INDI::Telescope::HasPierSide
bool HasPierSide()
Definition: inditelescope.h:260
INDI::Telescope::DOME_IGNORED
@ DOME_IGNORED
Definition: inditelescope.h:138
INDI::Telescope::DOME_LOCKS
@ DOME_LOCKS
Definition: inditelescope.h:139
INDI::Telescope::TelescopeTrackMode
TelescopeTrackMode
Definition: inditelescope.h:93
INDI::Telescope::setTelescopeConnection
void setTelescopeConnection(const uint8_t &value)
setTelescopeConnection Set telescope connection mode. Child class should call this in the constructor...
Definition: inditelescope.cpp:645
INDI::Telescope::TrackRateN
INumber TrackRateN[2]
Definition: inditelescope.h:844
INDI::Telescope::HasTrackMode
bool HasTrackMode()
Definition: inditelescope.h:290
INDI::Telescope::TrackState
TelescopeStatus TrackState
Definition: inditelescope.h:686
INDI::Telescope::ScopeConfigScopeApXmlNode
const std::string ScopeConfigScopeApXmlNode
Definition: inditelescope.h:866
INDI::Telescope::TargetN
INumber TargetN[2]
Definition: inditelescope.h:700
INDI::Telescope::isParked
bool isParked()
isParked is mount currently parked?
Definition: inditelescope.cpp:1945
INDI::Telescope::TimeTP
ITextVectorProperty TimeTP
Definition: inditelescope.h:751
INDI::Telescope::processAxis
void processAxis(const char *axis_n, double value)
Definition: inditelescope.cpp:2365
INDI::Telescope::AbortSP
ISwitchVectorProperty AbortSP
Definition: inditelescope.h:703
INDI::Telescope::getTelescopeConnection
uint8_t getTelescopeConnection() const
Definition: inditelescope.cpp:640
INDI::Telescope::TRACK_OFF
@ TRACK_OFF
Definition: inditelescope.h:103
INDI::Telescope::SAT_PASS_WINDOW_END
@ SAT_PASS_WINDOW_END
Index for end of the window.
Definition: inditelescope.h:804
INDI::Telescope::SLEW_MAX
@ SLEW_MAX
Definition: inditelescope.h:91
INDI::Telescope::SatPassWindowT
IText SatPassWindowT[SAT_PASS_WINDOW_COUNT]
Definition: inditelescope.h:812
INDI::Telescope::TRACK_ON
@ TRACK_ON
Definition: inditelescope.h:102
INDI::Telescope::last_we_motion
int last_we_motion
Definition: inditelescope.h:850
_ITextVectorProperty
Text vector property descriptor.
Definition: indiapi.h:244
INDI::Telescope::processJoystick
void processJoystick(const char *joystick_n, double mag, double angle)
Definition: inditelescope.cpp:2349
INDI::Telescope::TELESCOPE_CAN_CONTROL_TRACK
@ TELESCOPE_CAN_CONTROL_TRACK
Definition: inditelescope.h:168
INDI::Telescope::SLEW_CENTERING
@ SLEW_CENTERING
Definition: inditelescope.h:89
INDI::Telescope::SCOPE_CONFIG5
@ SCOPE_CONFIG5
Definition: inditelescope.h:878
INDI::Telescope::LOCATION_ELEVATION
@ LOCATION_ELEVATION
Definition: inditelescope.h:119
INDI::Telescope::ScopeConfigNameXmlNode
const std::string ScopeConfigNameXmlNode
Definition: inditelescope.h:864
type
__le16 type
Definition: pwc-ioctl.h:2
INDI::Telescope::HasPierSideSimulation
bool HasPierSideSimulation()
Definition: inditelescope.h:268
INDI::Telescope::SatelliteWindow
enum INDI::Telescope::@197 SatelliteWindow
INDI::Telescope::MotionControlModeT
ISwitch MotionControlModeT[2]
Definition: inditelescope.h:764
INDI::Telescope::TELESCOPE_HAS_TRACK_RATE
@ TELESCOPE_HAS_TRACK_RATE
Definition: inditelescope.h:169
_INumberVectorProperty
Number vector property descriptor.
Definition: indiapi.h:317
INDI::Telescope::TelescopeCapability
enum INDI::Telescope::@194 TelescopeCapability
INDI::Telescope::TELESCOPE_HAS_PIER_SIDE
@ TELESCOPE_HAS_PIER_SIDE
Definition: inditelescope.h:165
INDI::Telescope::callHandshake
bool callHandshake()
callHandshake Helper function that sets the port file descriptor before calling the actual Handshake ...
Definition: inditelescope.cpp:1589
INDI::Telescope::ParkS
ISwitch ParkS[2]
Definition: inditelescope.h:716
INDI::Telescope::SAT_TRACK
@ SAT_TRACK
Track signal.
Definition: inditelescope.h:819
ra
double ra
Definition: ieqprolegacydriver.cpp:43
INDI::Telescope::SimulatePierSideS
ISwitch SimulatePierSideS[2]
Definition: inditelescope.h:781
IText
One text descriptor.
INDI::Telescope::TRACK_SIDEREAL
@ TRACK_SIDEREAL
Definition: inditelescope.h:95
INDI::Telescope::ScopeConfigNameT
IText ScopeConfigNameT[1]
Definition: inditelescope.h:886
INDI::Telescope::TelescopePierSide
TelescopePierSide
Definition: inditelescope.h:121
INDI::Telescope::ParkPositionN
INumber ParkPositionN[2]
Definition: inditelescope.h:719
INDI::Telescope::PARK_RA_DEC
@ PARK_RA_DEC
Definition: inditelescope.h:109
INDI::Telescope::HasTime
bool HasTime()
Definition: inditelescope.h:244
INDI::Telescope::ScopeConfigFileName
const std::string ScopeConfigFileName
The telescope/guide scope configuration file name.
Definition: inditelescope.h:889
INDI::Telescope::TLEtoTrackTP
ITextVectorProperty TLEtoTrackTP
Text Vector property defining the orbital elements of an artificial satellite (TLE)....
Definition: inditelescope.h:795
INDI::Telescope::TelescopeTrackState
TelescopeTrackState
Definition: inditelescope.h:100
INDI::Telescope::ScopeConfigDeviceXmlNode
const std::string ScopeConfigDeviceXmlNode
Definition: inditelescope.h:863
INDI::Telescope::TrackModeSP
ISwitchVectorProperty TrackModeSP
Definition: inditelescope.h:835
INDI::Telescope::ActiveDeviceTP
ITextVectorProperty ActiveDeviceTP
Definition: inditelescope.h:755
INDI::Telescope::TelescopeMotionCommand
TelescopeMotionCommand
Definition: inditelescope.h:81
INDI::Telescope::TelescopeLocation
TelescopeLocation
Definition: inditelescope.h:115
INDI::Telescope::SetTelescopeCapability
void SetTelescopeCapability(uint32_t cap, uint8_t slewRateCount=0)
SetTelescopeCapability sets the Telescope capabilities. All capabilities must be initialized.
Definition: inditelescope.cpp:1818
IPS_IDLE
@ IPS_IDLE
Definition: indiapi.h:160
INDI::Telescope::TELESCOPE_HAS_TIME
@ TELESCOPE_HAS_TIME
Definition: inditelescope.h:163
INDI::Telescope::SAT_TRACK_COUNT
@ SAT_TRACK_COUNT
State counter.
Definition: inditelescope.h:821
INDI::Telescope::MOTION_START
@ MOTION_START
Definition: inditelescope.h:83
INDI::Telescope::TrackRateNP
INumberVectorProperty TrackRateNP
Definition: inditelescope.h:843
INDI::Telescope::TargetNP
INumberVectorProperty TargetNP
Definition: inditelescope.h:699
INDI::Telescope::CanPark
bool CanPark()
Definition: inditelescope.h:228
dec
double dec
Definition: ieqprolegacydriver.cpp:44
INDI::Telescope::MovementWESP
ISwitchVectorProperty MovementWESP
Definition: inditelescope.h:739
xml_ele_
Definition: lilxml.c:105
INDI::Telescope::SAT_HALT
@ SAT_HALT
Halt signal (abort)
Definition: inditelescope.h:820
INDI::Telescope::processButton
void processButton(const char *button_n, ISState state)
Definition: inditelescope.cpp:2308
INDI::Telescope::PARK_HA_DEC
@ PARK_HA_DEC
Definition: inditelescope.h:110
INDI::Telescope::ISNewText
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
Definition: inditelescope.cpp:770
INDI::Telescope::MOTION_CONTROL_AXES
@ MOTION_CONTROL_AXES
Definition: inditelescope.h:768
defaultdevice.h
INDI::Telescope::ReadScopeStatus
virtual bool ReadScopeStatus()=0
Read telescope status.
INDI::Telescope
Definition: inditelescope.h:70
INDI::Telescope::SetAxis1Park
void SetAxis1Park(double value)
SetRAPark Set current RA/AZ parking position. The data park file (stored in ~/.indi/ParkData....
Definition: inditelescope.cpp:2269
INDI::Telescope::ParkOptionSP
ISwitchVectorProperty ParkOptionSP
Definition: inditelescope.h:724
INDI::Telescope::AbortS
ISwitch AbortS[1]
Definition: inditelescope.h:704
INDI::IGeographicCoordinates
Definition: libastro.h:64
INDI::Telescope::UnPark
virtual bool UnPark()
Unpark the telescope if already parked.
Definition: inditelescope.cpp:1648
INDI::Telescope::SCOPE_CONFIG3
@ SCOPE_CONFIG3
Definition: inditelescope.h:876
INDI::Telescope::currentPierSide
TelescopePierSide currentPierSide
Definition: inditelescope.h:786
INDI::Telescope::TelescopeConnection
enum INDI::Telescope::@193 TelescopeConnection
INDI::Telescope::PARK_NONE
@ PARK_NONE
Definition: inditelescope.h:108
INDI::Telescope::~Telescope
virtual ~Telescope()
Definition: inditelescope.cpp:74
INDI::Telescope::SCOPE_TRACKING
@ SCOPE_TRACKING
Definition: inditelescope.h:77
INDI::Telescope::ScopeParametersNP
INumberVectorProperty ScopeParametersNP
Definition: inditelescope.h:747
INDI::Telescope::MoveWE
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command)
Move the telescope in the direction dir.
Definition: inditelescope.cpp:756
INDI::Telescope::MotionControlModeTP
ISwitchVectorProperty MotionControlModeTP
Definition: inditelescope.h:763
INDI::Telescope::LOCATION_LATITUDE
@ LOCATION_LATITUDE
Definition: inditelescope.h:117
INDI::Telescope::TrackStateSP
ISwitchVectorProperty TrackStateSP
Definition: inditelescope.h:839
INDI::Telescope::SetDefaultPark
virtual bool SetDefaultPark()
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
Definition: inditelescope.cpp:1695
INDI::Telescope::SCOPE_PARKED
@ SCOPE_PARKED
Definition: inditelescope.h:79
INDI::Telescope::CanControlTrack
bool CanControlTrack()
Definition: inditelescope.h:236
INDI::Telescope::PECStateSP
ISwitchVectorProperty PECStateSP
Definition: inditelescope.h:832
INDI::Telescope::LoadParkData
const char * LoadParkData()
Definition: inditelescope.cpp:2061
INDI::Telescope::MovementNSS
ISwitch MovementNSS[2]
Definition: inditelescope.h:734
INDI::Telescope::SetCurrentPark
virtual bool SetCurrentPark()
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
Definition: inditelescope.cpp:1689
INDI::Telescope::capability
uint32_t capability
Definition: inditelescope.h:849
INDI::Telescope::serialConnection
Connection::Serial * serialConnection
Definition: inditelescope.h:858
INDI::Telescope::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: inditelescope.cpp:320
INDI::Telescope::TRACK_CUSTOM
@ TRACK_CUSTOM
Definition: inditelescope.h:98
INDI::Telescope::EqN
INumber EqN[2]
Definition: inditelescope.h:695
INDI::Telescope::SLEW_FIND
@ SLEW_FIND
Definition: inditelescope.h:90
INDI::Telescope::ScopeParametersN
INumber ScopeParametersN[4]
Definition: inditelescope.h:746
INDI::Telescope::SetParkDataType
void SetParkDataType(TelescopeParkData type)
setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
Definition: inditelescope.cpp:1873
INDI::Telescope::TELESCOPE_CAN_TRACK_SATELLITE
@ TELESCOPE_CAN_TRACK_SATELLITE
Definition: inditelescope.h:171
INDI::Telescope::SetAxis2ParkDefault
void SetAxis2ParkDefault(double steps)
SetDEParkDefault Set default DEC/ALT parking position.
Definition: inditelescope.cpp:2291
INDI::Telescope::MoveNS
virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command)
Start or Stop the telescope motion in the direction dir.
Definition: inditelescope.cpp:745
INDI::Telescope::LockAxisSP
ISwitchVectorProperty LockAxisSP
Definition: inditelescope.h:773
INDI::Telescope::SAT_PASS_WINDOW_COUNT
@ SAT_PASS_WINDOW_COUNT
Number of indices.
Definition: inditelescope.h:805
INDI::Telescope::ScopeConfigRootXmlNode
const std::string ScopeConfigRootXmlNode
Definition: inditelescope.h:862
INDI::Telescope::CanTrackSatellite
bool CanTrackSatellite()
Definition: inditelescope.h:275
INDI::Telescope::TimeT
IText TimeT[2]
Definition: inditelescope.h:750
INDI::Telescope::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: inditelescope.cpp:536
INDI::Telescope::SetParked
void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
Definition: inditelescope.cpp:1937
INDI::Telescope::PierSideS
ISwitch PierSideS[2]
Definition: inditelescope.h:776
INDI::Telescope::CoordSP
ISwitchVectorProperty CoordSP
Definition: inditelescope.h:707
INDI::Telescope::SetTrackEnabled
virtual bool SetTrackEnabled(bool enabled)
SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available,...
Definition: inditelescope.cpp:1669
INDI::Telescope::ISNewSwitch
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
Definition: inditelescope.cpp:1029
INDI::Telescope::PARK_DEFAULT
@ PARK_DEFAULT
Definition: inditelescope.h:728
INDI::Telescope::setPECState
void setPECState(TelescopePECState state)
Definition: inditelescope.cpp:2643
INDI::Telescope::SlewRateSP
ISwitchVectorProperty SlewRateSP
Definition: inditelescope.h:742
INDI::Telescope::SAT_PASS_WINDOW_START
@ SAT_PASS_WINDOW_START
Index for start of the window.
Definition: inditelescope.h:803
INDI
Namespace to encapsulate INDI client, drivers, and mediator classes.
Definition: AlignmentSubsystemForClients.cpp:11
INDI::Telescope::CONNECTION_TCP
@ CONNECTION_TCP
Definition: inditelescope.h:150
INDI::Telescope::TelescopePECState
TelescopePECState
Definition: inditelescope.h:128
INDI::Telescope::GetScopeConfigIndex
int GetScopeConfigIndex() const
Get the scope config index.
Definition: inditelescope.cpp:3002
INDI::Telescope::ScopeConfigs
ISwitch ScopeConfigs[6]
Definition: inditelescope.h:881
INDI::Telescope::LOCATION_LONGITUDE
@ LOCATION_LONGITUDE
Definition: inditelescope.h:118
INDI::Telescope::SCOPE_CONFIG2
@ SCOPE_CONFIG2
Definition: inditelescope.h:875
INDI::Telescope::MOTION_CONTROL_JOYSTICK
@ MOTION_CONTROL_JOYSTICK
Definition: inditelescope.h:767
INDI::Telescope::MOTION_STOP
@ MOTION_STOP
Definition: inditelescope.h:84
INDI::Telescope::SetTrackMode
virtual bool SetTrackMode(uint8_t mode)
SetTrackMode Set active tracking mode. Do not change track state.
Definition: inditelescope.cpp:1654
INDI::Telescope::SatelliteTracking
enum INDI::Telescope::@198 SatelliteTracking
INDI::Telescope::CanGOTO
bool CanGOTO()
Definition: inditelescope.h:204
INDI::Telescope::PECStateS
ISwitch PECStateS[2]
Definition: inditelescope.h:831
INDI::Telescope::Park
virtual bool Park()
Park the telescope to its home position.
Definition: inditelescope.cpp:1642
INDI::Telescope::RememberTrackState
TelescopeStatus RememberTrackState
RememberTrackState Remember last state of Track State to fall back to in case of errors or aborts.
Definition: inditelescope.h:691
INDI::Telescope::AddTrackMode
virtual int AddTrackMode(const char *name, const char *label, bool isDefault=false)
AddTrackMode.
Definition: inditelescope.cpp:1676
INDI::Telescope::ParkPositionNP
INumberVectorProperty ParkPositionNP
Definition: inditelescope.h:720
INDI::Telescope::HasDefaultScopeConfig
bool HasDefaultScopeConfig()
Load scope settings from XML files.
Definition: inditelescope.cpp:2800
INDI::Telescope::HasTrackRate
bool HasTrackRate()
Definition: inditelescope.h:298
INDI::Telescope::SetParkPosition
virtual bool SetParkPosition(double Axis1Value, double Axis2Value)
SetParkPosition Set desired parking position to the supplied value. This ONLY sets the desired park p...
Definition: inditelescope.cpp:1811
ISState
ISState
Switch state.
Definition: indiapi.h:148
INDI::Telescope::CONNECTION_NONE
@ CONNECTION_NONE
Definition: inditelescope.h:148
INDI::Telescope::TRACK_SOLAR
@ TRACK_SOLAR
Definition: inditelescope.h:96
INDI::Telescope::SCOPE_CONFIG4
@ SCOPE_CONFIG4
Definition: inditelescope.h:877
INDI::Telescope::isLocked
bool isLocked() const
isLocked is mount currently locked?
Definition: inditelescope.cpp:2297
INDI::Telescope::getPierSideStr
const char * getPierSideStr(TelescopePierSide ps)
Definition: inditelescope.cpp:3067
INDI::Telescope::Sync
virtual bool Sync(double ra, double dec)
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
Definition: inditelescope.cpp:736
INDI::Telescope::PortFD
int PortFD
Definition: inditelescope.h:857
INDI::Telescope::PARK_AZ_ALT
@ PARK_AZ_ALT
Definition: inditelescope.h:111
INDI::Telescope::TimerHit
virtual void TimerHit() override
Called when setTimer() time is up.
Definition: inditelescope.cpp:1608
INDI::Telescope::PEC_OFF
@ PEC_OFF
Definition: inditelescope.h:131
INDI::Telescope::updateProperties
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
Definition: inditelescope.cpp:356
INDI::Telescope::GetAxis2Park
double GetAxis2Park() const
Definition: inditelescope.cpp:2260
INDI::Telescope::PARK_WRITE_DATA
@ PARK_WRITE_DATA
Definition: inditelescope.h:729
INDI::Telescope::TrackSatSP
ISwitchVectorProperty TrackSatSP
Switch Vector property defining the state of the satellite tracking of the mount. Example implementat...
Definition: inditelescope.h:827
INDI::Telescope::TELESCOPE_CAN_ABORT
@ TELESCOPE_CAN_ABORT
Definition: inditelescope.h:162
INDI::DefaultDevice
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
Definition: defaultdevice.h:118
INDI::Telescope::GetTelescopeCapability
uint32_t GetTelescopeCapability() const
GetTelescopeCapability returns the capability of the Telescope.
Definition: inditelescope.h:186
INDI::Telescope::ParkSP
ISwitchVectorProperty ParkSP
Definition: inditelescope.h:715
INDI::Telescope::TRACK_LUNAR
@ TRACK_LUNAR
Definition: inditelescope.h:97
INDI::Telescope::TELESCOPE_HAS_PEC
@ TELESCOPE_HAS_PEC
Definition: inditelescope.h:166
INDI::Telescope::getPECState
TelescopePECState getPECState()
Definition: inditelescope.h:425
INDI::Telescope::ScopeConfigLabelApXmlNode
const std::string ScopeConfigLabelApXmlNode
Definition: inditelescope.h:869
INDI::Telescope::SCOPE_CONFIG6
@ SCOPE_CONFIG6
Definition: inditelescope.h:879
INDI::Telescope::PIER_EAST
@ PIER_EAST
Definition: inditelescope.h:125
INDI::Telescope::TrackStateS
ISwitch TrackStateS[2]
Definition: inditelescope.h:840
INDI::Telescope::CheckFile
bool CheckFile(const std::string &file_name, bool writable) const
Check if a file exists and it is readable.
Definition: inditelescope.cpp:3031
INDI::Telescope::TelescopeSlewRate
TelescopeSlewRate
Definition: inditelescope.h:86
INDI::Telescope::SatPassWindowTP
ITextVectorProperty SatPassWindowTP
Text Vector property defining the start and end of a satellite pass (window contains pass)....
Definition: inditelescope.h:811
INDI::Telescope::getSimulatePierSide
bool getSimulatePierSide() const
Definition: inditelescope.cpp:3062
INDI::Telescope::SimulatePierSideSP
ISwitchVectorProperty SimulatePierSideSP
Definition: inditelescope.h:780
_ISwitchVectorProperty
Switch vector property descriptor.
Definition: indiapi.h:365
libastro.h
INDI::Telescope::SetTrackRate
virtual bool SetTrackRate(double raRate, double deRate)
SetTrackRate Set custom tracking rates.
Definition: inditelescope.cpp:1661
INDI::Telescope::PARK_CURRENT
@ PARK_CURRENT
Definition: inditelescope.h:727