Class to provide general functionality of a telescope device.
Developers need to subclass Telescope to implement any driver for telescopes within INDI.
Implementing a basic telescope driver involves the child class performing the following steps:
-
The child class should define the telescope capabilities via the TelescopeCapability structure and sets in the default constructor.
-
If the telescope has additional properties, the child class should override initProperties and initialize the respective additional properties.
-
The child class can optionally set the connection mode in initProperties(). By default the driver provide controls for both serial and TCP/IP connections.
-
Once the parent class calls Connect(), the child class attempts to connect to the telescope and return either success of failure
-
Telescope calls updateProperties() to enable the child class to define which properties to send to the client upon connection
-
Telescope calls ReadScopeStatus() to check the link to the telescope and update its state and position. The child class should call newRaDec() whenever a new value is read from the telescope.
-
The child class should implement Goto() and Sync(), and Park()/UnPark() if applicable.
-
Telescope calls disconnect() when the client request a disconnection. The child class should remove any additional properties it defined in updateProperties() if applicable
TrackState is used to monitor changes in Tracking state. There are three main tracking properties:
- TrackMode: Changes tracking mode or rate. Common modes are TRACK_SIDEREAL, TRACK_LUNAR, TRACK_SOLAR, and TRACK_CUSTOM
- TrackRate: If the mount supports custom tracking rates, it should set the capability flag TELESCOPE_HAS_TRACK_RATE. If the user changes the custom tracking rates while the mount is tracking, it it sent to the child class via SetTrackRate(...) function. The base class will reject any track rates that switch from positive to negative (reverse) tracking rates as the mount must be stopped before such change takes place.
- TrackState: Engages or Disengages tracking. When engaging tracking, the child class should take the necessary steps to set the appropiate TrackMode and TrackRate properties before or after engaging tracking as governed by the mount protocol.
Ideally, the child class should avoid changing property states directly within a function call from the base class as such state changes take place in the base class after checking the return values of such functions.
- Author
- Jasem Mutlaq, Gerry Rozema
- See also
- TelescopeSimulator and SynScan drivers for examples of implementations of Telescope.