Instrument Neutral Distributed Interface INDI  1.9.5
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  virtual 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 
609 
614  virtual void SyncParkStatus(bool isparked);
615 
625  virtual bool SetSlewRate(int index);
626 
632  bool callHandshake();
633 
634  // Joystick
635  void processNSWE(double mag, double angle);
636  void processJoystick(const char *joystick_n, double mag, double angle);
637  void processAxis(const char *axis_n, double value);
638  void processSlewPresets(double mag, double angle);
639  void processButton(const char *button_n, ISState state);
640 
646 
647  // Geographic Location
649 
654  bool LoadScopeConfig();
655 
660  bool HasDefaultScopeConfig();
661 
665  bool UpdateScopeConfig();
666 
672  std::string GetHomeDirectory() const;
673 
678  int GetScopeConfigIndex() const;
679 
686  bool CheckFile(const std::string &file_name, bool writable) const;
687 
694 
699 
700  // All telescopes should produce equatorial co-ordinates
703 
704  // When a goto is issued, domes will snoop the target property
705  // to start moving the dome when a telescope moves
708 
709  // Abort motion
712 
713  // On a coord_set message, sync, or slew
716 
717  // A number vector that stores lattitude and longitude
720 
721  // A Switch in the client interface to park the scope
724 
725  // Custom parking position
728 
729  // Custom parking options
732  enum
733  {
738  };
739 
740  // A switch for North/South motion
743 
744  // A switch for West/East motion
747 
748  // Slew Rate
750  ISwitch *SlewRateS {nullptr};
751 
752  // Telescope & guider aperture and focal length
755 
756  // UTC and UTC Offset
757  IText TimeT[2] {};
759  void sendTimeFromSystem();
760 
761  // Active GPS/Dome device to snoop
764 
765  // Switch to lock if dome is closed.
768 
769  // Switch for choosing between motion control by 4-way joystick or two seperate axes
772  enum
773  {
776  };
777 
778  // Lock Joystick Axis to one direciton only
781 
782  // Pier Side
785 
786  // Pier Side Simulation
789  bool getSimulatePierSide() const;
790  void setSimulatePierSide(bool value);
791 
792  // Pier Side
794 
795  const char * getPierSideStr(TelescopePierSide ps);
796 
797  // Satellite tracking
808  enum
809  {
813  } SatelliteWindow;
824  enum
825  {
836 
837  // PEC State
840 
841  // Track Mode
843  ISwitch *TrackModeS { nullptr };
844 
845  // Track State
848 
849  // Track Rate
852 
853  // PEC State
855 
856  uint32_t capability {0};
858 
859  //Park
860  const char *LoadParkData();
861  bool WriteParkData();
862  bool PurgeParkData();
863 
864  int PortFD = -1;
867 
868  // XML node names for scope config
869  const std::string ScopeConfigRootXmlNode { "scopeconfig" };
870  const std::string ScopeConfigDeviceXmlNode { "device" };
871  const std::string ScopeConfigNameXmlNode { "name" };
872  const std::string ScopeConfigScopeFocXmlNode { "scopefoc" };
873  const std::string ScopeConfigScopeApXmlNode { "scopeap" };
874  const std::string ScopeConfigGScopeFocXmlNode { "gscopefoc" };
875  const std::string ScopeConfigGScopeApXmlNode { "gscopeap" };
876  const std::string ScopeConfigLabelApXmlNode { "label" };
877 
878  // A switch to apply custom aperture/focal length config
879  enum
880  {
887  };
890 
891  // Scope config name
894 
896  const std::string ScopeConfigFileName;
897 
898  bool IsParked {false};
900 
901  private:
902  bool processTimeInfo(const char *utc, const char *offset);
903  bool processLocationInfo(double latitude, double longitude, double elevation);
904  void triggerSnoop(const char *driverName, const char *propertyName);
905 
910  const char *LoadParkXML();
911 
912  bool IsLocked {true};
913  const char *ParkDeviceName {nullptr};
914  const std::string ParkDataFileName;
915  XMLEle *ParkdataXmlRoot {nullptr}, *ParkdeviceXml {nullptr}, *ParkstatusXml {nullptr}, *ParkpositionXml {nullptr},
916  *ParkpositionAxis1Xml {nullptr}, *ParkpositionAxis2Xml {nullptr};
917 
918  double Axis1ParkPosition {0};
919  double Axis1DefaultParkPosition {0};
920  double Axis2ParkPosition {0};
921  double Axis2DefaultParkPosition {0};
922 
923  uint8_t nSlewRate {0};
924  IPState lastEqState { IPS_IDLE };
925 
926  uint8_t telescopeConnection = (CONNECTION_SERIAL | CONNECTION_TCP);
927 
928  Controller *controller {nullptr};
929 
930  float motionDirNSValue {0};
931  float motionDirWEValue {0};
932 
933  bool m_simulatePierSide; // use setSimulatePierSide and getSimulatePierSide for public access
934 };
935 
936 }
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_CAN_PARK
@ TELESCOPE_CAN_PARK
Definition: inditelescope.h:161
INDI::Telescope::Telescope
Telescope()
Definition: inditelescope.cpp:58
INDI::Telescope::SCOPE_IDLE
@ SCOPE_IDLE
Definition: inditelescope.h:75
INDI::Telescope::SatelliteTracking
enum INDI::Telescope::@206 SatelliteTracking
INDI::Telescope::DomePolicyS
ISwitch DomePolicyS[2]
Definition: inditelescope.h:767
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:857
INDI::Telescope::TELESCOPE_HAS_TRACK_RATE
@ TELESCOPE_HAS_TRACK_RATE
Definition: inditelescope.h:169
INDI::Telescope::SLEW_GUIDE
@ SLEW_GUIDE
Definition: inditelescope.h:88
INDI::Telescope::ActiveDeviceT
IText ActiveDeviceT[2]
Definition: inditelescope.h:763
INDI::Telescope::SAT_PASS_WINDOW_START
@ SAT_PASS_WINDOW_START
Index for start of the window.
Definition: inditelescope.h:810
INDI::Telescope::SlewRateS
ISwitch * SlewRateS
Definition: inditelescope.h:750
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::TelescopeParkData
TelescopeParkData
Definition: inditelescope.h:106
INDI::Telescope::UpdateScopeConfig
bool UpdateScopeConfig()
Save scope settings to XML files.
Definition: inditelescope.cpp:2859
INDI::Telescope::SCOPE_CONFIG4
@ SCOPE_CONFIG4
Definition: inditelescope.h:884
INDI::Telescope::WriteParkData
bool WriteParkData()
Definition: inditelescope.cpp:2192
INDI::Telescope::SAT_PASS_WINDOW_COUNT
@ SAT_PASS_WINDOW_COUNT
Number of indices.
Definition: inditelescope.h:812
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::PIER_WEST
@ PIER_WEST
Definition: inditelescope.h:124
INDI::Telescope::TelescopeCapability
enum INDI::Telescope::@202 TelescopeCapability
INDI::Telescope::SatelliteWindow
enum INDI::Telescope::@205 SatelliteWindow
INDI::Telescope::LoadScopeConfig
bool LoadScopeConfig()
Load scope settings from XML files.
Definition: inditelescope.cpp:2659
INDI::Telescope::PierSideSP
ISwitchVectorProperty PierSideSP
Definition: inditelescope.h:784
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:719
INDI::Telescope::SCOPE_SLEWING
@ SCOPE_SLEWING
Definition: inditelescope.h:76
INDI::Telescope::SAT_TRACK
@ SAT_TRACK
Track signal.
Definition: inditelescope.h:826
INDI::Telescope::SCOPE_PARKING
@ SCOPE_PARKING
Definition: inditelescope.h:78
INDI::Telescope::currentPECState
TelescopePECState currentPECState
Definition: inditelescope.h:854
INDI::Telescope::CoordS
ISwitch CoordS[3]
Definition: inditelescope.h:715
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::PARK_WRITE_DATA
@ PARK_WRITE_DATA
Definition: inditelescope.h:736
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:835
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:742
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::Telescope::TELESCOPE_HAS_PEC
@ TELESCOPE_HAS_PEC
Definition: inditelescope.h:166
INDI_DIR_WE
INDI_DIR_WE
Definition: indibasetypes.h:50
INDI::Telescope::GetHomeDirectory
std::string GetHomeDirectory() const
Validate a file name.
Definition: inditelescope.cpp:2989
INDI::Telescope::TrackModeS
ISwitch * TrackModeS
Definition: inditelescope.h:843
INDI::Telescope::PARK_AZ_ALT_ENCODER
@ PARK_AZ_ALT_ENCODER
Definition: inditelescope.h:113
INDI::Telescope::lastPECState
TelescopePECState lastPECState
Definition: inditelescope.h:854
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:874
INDI::Telescope::PARK_CURRENT
@ PARK_CURRENT
Definition: inditelescope.h:734
INDI::Telescope::LocationNP
INumberVectorProperty LocationNP
Definition: inditelescope.h:718
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::processNSWE
void processNSWE(double mag, double angle)
Definition: inditelescope.cpp:2430
INDI::Telescope::ScopeConfigGScopeApXmlNode
const std::string ScopeConfigGScopeApXmlNode
Definition: inditelescope.h:875
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:730
INDI::Telescope::TELESCOPE_HAS_TRACK_MODE
@ TELESCOPE_HAS_TRACK_MODE
Definition: inditelescope.h:167
INDI::Telescope::TLEtoTrackT
IText TLEtoTrackT[1]
Definition: inditelescope.h:803
INDI::Telescope::DomePolicySP
ISwitchVectorProperty DomePolicySP
Definition: inditelescope.h:766
INDI::Telescope::PEC_ON
@ PEC_ON
Definition: inditelescope.h:132
INDI::Telescope::MovementWES
ISwitch MovementWES[2]
Definition: inditelescope.h:745
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::ScopeConfigsSP
ISwitchVectorProperty ScopeConfigsSP
Definition: inditelescope.h:889
INDI::Telescope::LockAxisS
ISwitch LockAxisS[2]
Definition: inditelescope.h:779
INDI::Telescope::setSimulatePierSide
void setSimulatePierSide(bool value)
Definition: inditelescope.cpp:3080
INDI::Telescope::EqNP
INumberVectorProperty EqNP
Definition: inditelescope.h:701
INDI::Telescope::m_Location
IGeographicCoordinates m_Location
Definition: inditelescope.h:648
INDI::Telescope::ScopeConfigScopeFocXmlNode
const std::string ScopeConfigScopeFocXmlNode
Definition: inditelescope.h:872
INDI::Telescope::processSlewPresets
void processSlewPresets(double mag, double angle)
Definition: inditelescope.cpp:2558
INDI::Telescope::ScopeConfigNameTP
ITextVectorProperty ScopeConfigNameTP
Definition: inditelescope.h:892
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:866
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:793
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:851
INDI::Telescope::HasTrackMode
bool HasTrackMode()
Definition: inditelescope.h:290
INDI::Telescope::TrackState
TelescopeStatus TrackState
Definition: inditelescope.h:693
INDI::Telescope::ScopeConfigScopeApXmlNode
const std::string ScopeConfigScopeApXmlNode
Definition: inditelescope.h:873
INDI::Telescope::TargetN
INumber TargetN[2]
Definition: inditelescope.h:707
INDI::Telescope::isParked
bool isParked()
isParked is mount currently parked?
Definition: inditelescope.cpp:1945
INDI::Telescope::TimeTP
ITextVectorProperty TimeTP
Definition: inditelescope.h:758
INDI::Telescope::processAxis
void processAxis(const char *axis_n, double value)
Definition: inditelescope.cpp:2365
INDI::Telescope::AbortSP
ISwitchVectorProperty AbortSP
Definition: inditelescope.h:710
INDI::Telescope::getTelescopeConnection
uint8_t getTelescopeConnection() const
Definition: inditelescope.cpp:640
INDI::Telescope::TRACK_OFF
@ TRACK_OFF
Definition: inditelescope.h:103
INDI::Telescope::SLEW_MAX
@ SLEW_MAX
Definition: inditelescope.h:91
INDI::Telescope::SatPassWindowT
IText SatPassWindowT[SAT_PASS_WINDOW_COUNT]
Definition: inditelescope.h:819
INDI::Telescope::TRACK_ON
@ TRACK_ON
Definition: inditelescope.h:102
INDI::Telescope::last_we_motion
int last_we_motion
Definition: inditelescope.h:857
_ITextVectorProperty
Text vector property descriptor.
Definition: indiapi.h:244
INDI::Telescope::TELESCOPE_HAS_TIME
@ TELESCOPE_HAS_TIME
Definition: inditelescope.h:163
INDI::Telescope::processJoystick
void processJoystick(const char *joystick_n, double mag, double angle)
Definition: inditelescope.cpp:2349
INDI::Telescope::SLEW_CENTERING
@ SLEW_CENTERING
Definition: inditelescope.h:89
INDI::Telescope::LOCATION_ELEVATION
@ LOCATION_ELEVATION
Definition: inditelescope.h:119
INDI::Telescope::TELESCOPE_HAS_LOCATION
@ TELESCOPE_HAS_LOCATION
Definition: inditelescope.h:164
INDI::Telescope::ScopeConfigNameXmlNode
const std::string ScopeConfigNameXmlNode
Definition: inditelescope.h:871
type
__le16 type
Definition: pwc-ioctl.h:2
INDI::Telescope::HasPierSideSimulation
bool HasPierSideSimulation()
Definition: inditelescope.h:268
INDI::Telescope::SyncParkStatus
virtual void SyncParkStatus(bool isparked)
SyncParkStatus Update the state and switches for parking.
Definition: inditelescope.cpp:1915
INDI::Telescope::MotionControlModeT
ISwitch MotionControlModeT[2]
Definition: inditelescope.h:771
_INumberVectorProperty
Number vector property descriptor.
Definition: indiapi.h:317
INDI::Telescope::MOTION_CONTROL_JOYSTICK
@ MOTION_CONTROL_JOYSTICK
Definition: inditelescope.h:774
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:723
INDI::Telescope::PARK_PURGE_DATA
@ PARK_PURGE_DATA
Definition: inditelescope.h:737
ra
double ra
Definition: ieqprolegacydriver.cpp:43
INDI::Telescope::TELESCOPE_HAS_PIER_SIDE_SIMULATION
@ TELESCOPE_HAS_PIER_SIDE_SIMULATION
Definition: inditelescope.h:170
INDI::Telescope::SimulatePierSideS
ISwitch SimulatePierSideS[2]
Definition: inditelescope.h:788
IText
One text descriptor.
INDI::Telescope::TRACK_SIDEREAL
@ TRACK_SIDEREAL
Definition: inditelescope.h:95
INDI::Telescope::ScopeConfigNameT
IText ScopeConfigNameT[1]
Definition: inditelescope.h:893
INDI::Telescope::TelescopePierSide
TelescopePierSide
Definition: inditelescope.h:121
INDI::Telescope::ParkPositionN
INumber ParkPositionN[2]
Definition: inditelescope.h:726
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:896
INDI::Telescope::TLEtoTrackTP
ITextVectorProperty TLEtoTrackTP
Text Vector property defining the orbital elements of an artificial satellite (TLE)....
Definition: inditelescope.h:802
INDI::Telescope::TelescopeTrackState
TelescopeTrackState
Definition: inditelescope.h:100
INDI::Telescope::CONNECTION_NONE
@ CONNECTION_NONE
Definition: inditelescope.h:148
INDI::Telescope::ScopeConfigDeviceXmlNode
const std::string ScopeConfigDeviceXmlNode
Definition: inditelescope.h:870
INDI::Telescope::TrackModeSP
ISwitchVectorProperty TrackModeSP
Definition: inditelescope.h:842
INDI::Telescope::CONNECTION_TCP
@ CONNECTION_TCP
Definition: inditelescope.h:150
INDI::Telescope::ActiveDeviceTP
ITextVectorProperty ActiveDeviceTP
Definition: inditelescope.h:762
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::MOTION_CONTROL_AXES
@ MOTION_CONTROL_AXES
Definition: inditelescope.h:775
INDI::Telescope::TELESCOPE_CAN_ABORT
@ TELESCOPE_CAN_ABORT
Definition: inditelescope.h:162
INDI::Telescope::MOTION_START
@ MOTION_START
Definition: inditelescope.h:83
INDI::Telescope::TrackRateNP
INumberVectorProperty TrackRateNP
Definition: inditelescope.h:850
INDI::Telescope::TargetNP
INumberVectorProperty TargetNP
Definition: inditelescope.h:706
INDI::Telescope::CanPark
bool CanPark()
Definition: inditelescope.h:228
dec
double dec
Definition: ieqprolegacydriver.cpp:44
INDI::Telescope::SAT_TRACK_COUNT
@ SAT_TRACK_COUNT
State counter.
Definition: inditelescope.h:828
INDI::Telescope::MovementWESP
ISwitchVectorProperty MovementWESP
Definition: inditelescope.h:746
INDI::Telescope::SCOPE_CONFIG3
@ SCOPE_CONFIG3
Definition: inditelescope.h:883
xml_ele_
Definition: lilxml.c:105
INDI::Telescope::processButton
void processButton(const char *button_n, ISState state)
Definition: inditelescope.cpp:2308
INDI::Telescope::TELESCOPE_HAS_PIER_SIDE
@ TELESCOPE_HAS_PIER_SIDE
Definition: inditelescope.h:165
INDI::Telescope::PARK_HA_DEC
@ PARK_HA_DEC
Definition: inditelescope.h:110
INDI::Telescope::TELESCOPE_CAN_CONTROL_TRACK
@ TELESCOPE_CAN_CONTROL_TRACK
Definition: inditelescope.h:168
INDI::Telescope::SAT_HALT
@ SAT_HALT
Halt signal (abort)
Definition: inditelescope.h:827
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
defaultdevice.h
INDI::Telescope::ReadScopeStatus
virtual bool ReadScopeStatus()=0
Read telescope status.
INDI::Telescope::TelescopeConnection
enum INDI::Telescope::@201 TelescopeConnection
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::SCOPE_CONFIG5
@ SCOPE_CONFIG5
Definition: inditelescope.h:885
INDI::Telescope::ParkOptionSP
ISwitchVectorProperty ParkOptionSP
Definition: inditelescope.h:731
INDI::Telescope::AbortS
ISwitch AbortS[1]
Definition: inditelescope.h:711
INDI::IGeographicCoordinates
Definition: libastro.h:64
INDI::Telescope::UnPark
virtual bool UnPark()
Unpark the telescope if already parked.
Definition: inditelescope.cpp:1648
INDI::Telescope::currentPierSide
TelescopePierSide currentPierSide
Definition: inditelescope.h:793
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:754
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:770
INDI::Telescope::SCOPE_CONFIG1
@ SCOPE_CONFIG1
Definition: inditelescope.h:881
INDI::Telescope::LOCATION_LATITUDE
@ LOCATION_LATITUDE
Definition: inditelescope.h:117
INDI::Telescope::TrackStateSP
ISwitchVectorProperty TrackStateSP
Definition: inditelescope.h:846
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:839
INDI::Telescope::LoadParkData
const char * LoadParkData()
Definition: inditelescope.cpp:2061
INDI::Telescope::MovementNSS
ISwitch MovementNSS[2]
Definition: inditelescope.h:741
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:856
INDI::Telescope::serialConnection
Connection::Serial * serialConnection
Definition: inditelescope.h:865
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::SCOPE_CONFIG6
@ SCOPE_CONFIG6
Definition: inditelescope.h:886
INDI::Telescope::EqN
INumber EqN[2]
Definition: inditelescope.h:702
INDI::Telescope::SLEW_FIND
@ SLEW_FIND
Definition: inditelescope.h:90
INDI::Telescope::ScopeParametersN
INumber ScopeParametersN[4]
Definition: inditelescope.h:753
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::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::TELESCOPE_CAN_GOTO
@ TELESCOPE_CAN_GOTO
Definition: inditelescope.h:159
INDI::Telescope::LockAxisSP
ISwitchVectorProperty LockAxisSP
Definition: inditelescope.h:780
INDI::Telescope::ScopeConfigRootXmlNode
const std::string ScopeConfigRootXmlNode
Definition: inditelescope.h:869
INDI::Telescope::CanTrackSatellite
bool CanTrackSatellite()
Definition: inditelescope.h:275
INDI::Telescope::TimeT
IText TimeT[2]
Definition: inditelescope.h:757
INDI::Telescope::TELESCOPE_CAN_SYNC
@ TELESCOPE_CAN_SYNC
Definition: inditelescope.h:160
name
const char * name
Definition: indiserver.c:116
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
virtual 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:783
INDI::Telescope::parkDataType
TelescopeParkData parkDataType
Definition: inditelescope.h:899
INDI::Telescope::IsParked
bool IsParked
Definition: inditelescope.h:898
INDI::Telescope::CoordSP
ISwitchVectorProperty CoordSP
Definition: inditelescope.h:714
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::setPECState
void setPECState(TelescopePECState state)
Definition: inditelescope.cpp:2643
INDI::Telescope::SlewRateSP
ISwitchVectorProperty SlewRateSP
Definition: inditelescope.h:749
INDI
Namespace to encapsulate INDI client, drivers, and mediator classes.
Definition: AlignmentSubsystemForClients.cpp:11
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:888
INDI::Telescope::LOCATION_LONGITUDE
@ LOCATION_LONGITUDE
Definition: inditelescope.h:118
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::CanGOTO
bool CanGOTO()
Definition: inditelescope.h:204
INDI::Telescope::PECStateS
ISwitch PECStateS[2]
Definition: inditelescope.h:838
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:698
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:727
INDI::Telescope::HasDefaultScopeConfig
bool HasDefaultScopeConfig()
Load scope settings from XML files.
Definition: inditelescope.cpp:2800
INDI::Telescope::SCOPE_CONFIG2
@ SCOPE_CONFIG2
Definition: inditelescope.h:882
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::TRACK_SOLAR
@ TRACK_SOLAR
Definition: inditelescope.h:96
INDI::Telescope::PARK_DEFAULT
@ PARK_DEFAULT
Definition: inditelescope.h:735
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:864
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::SAT_PASS_WINDOW_END
@ SAT_PASS_WINDOW_END
Index for end of the window.
Definition: inditelescope.h:811
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::TrackSatSP
ISwitchVectorProperty TrackSatSP
Switch Vector property defining the state of the satellite tracking of the mount. Example implementat...
Definition: inditelescope.h:834
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:722
INDI::Telescope::TRACK_LUNAR
@ TRACK_LUNAR
Definition: inditelescope.h:97
INDI::Telescope::getPECState
TelescopePECState getPECState()
Definition: inditelescope.h:425
INDI::Telescope::ScopeConfigLabelApXmlNode
const std::string ScopeConfigLabelApXmlNode
Definition: inditelescope.h:876
INDI::Telescope::PIER_EAST
@ PIER_EAST
Definition: inditelescope.h:125
INDI::Telescope::TrackStateS
ISwitch TrackStateS[2]
Definition: inditelescope.h:847
INDI::Telescope::CONNECTION_SERIAL
@ CONNECTION_SERIAL
Definition: inditelescope.h:149
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::TELESCOPE_CAN_TRACK_SATELLITE
@ TELESCOPE_CAN_TRACK_SATELLITE
Definition: inditelescope.h:171
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:818
INDI::Telescope::getSimulatePierSide
bool getSimulatePierSide() const
Definition: inditelescope.cpp:3062
INDI::Telescope::SimulatePierSideSP
ISwitchVectorProperty SimulatePierSideSP
Definition: inditelescope.h:787
_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