2 * Header File for the Telescope Control protocols for the Meade LX200
3 * Author: John Kielkopf (kielkopf@louisville.edu)
5 * This file contains header information used in common with xmtel.
7 * 15 May 2003 -- Version 2.00
12 #ifndef CELESTRON_PROTOCOL_H
13 #define CELESTRON_PROTOCOL_H
15 /* These are user defined quantities that set the limits over which it */
16 /* is safe to operate the telescope. */
19 /* LOWER is the number of degrees from the zenith that you will allow. */
20 /* Use 80, for example, to keep the eyepiece end out of the fork arm space */
21 /* of an LX200 telescope. */
25 /* HIGHER is the horizon. 0 is an unobstructed horizon in every direction. */
26 /* Use 10, for example, to limit sighting below 10 degrees above the horizon. */
31 /* Set this if a slew to the north sends the telescope south. */
33 #define REVERSE_NS 0 /* 1 for reverse; 0 for normal. */
36 /* Set this for maximum slew rate allowed in degree/sec. */
38 #define MAXSLEWRATE 4 /* 2 for safety; 4 for 16-inch; 8 otherwise. */
43 /* The following parameters are used internally to set speed and direction. */
44 /* Do not change these values. */
63 /* Slew speed defines */
65 # define SLEWRATE8 8 /* should be 8 degrees per second (not 16-inch) */
66 # define SLEWRATE4 4 /* should be 4 degrees per second */
67 # define SLEWRATE3 3 /* should be 3 degrees per second */
68 # define SLEWRATE2 2 /* should be 2 degrees per second */
72 #define BRIGHTER 16 /* increase */
73 #define DIMMER 8 /* decrease */
74 #define BLINK0 0 /* no blinking */
75 #define BLINK1 1 /* blink rate 1 */
76 #define BLINK2 2 /* blink rate 2 */
77 #define BLINK3 4 /* blink rate 3 */
82 #define FOCUSOUT 8 /* positive voltage output */
83 #define FOCUSIN 4 /* negative voltage output */
84 #define FOCUSSTOP 0 /* no output */
85 #define FOCUSSLOW 1 /* half voltage */
86 #define FOCUSFAST 2 /* full voltage */
91 #define ROTATORON 1 /* image rotator on */
92 #define ROTATOROFF 0 /* image rotator off */
97 #define FANON 1 /* cooling fan on */
98 #define FANOFF 0 /* cooling fan off */
104 int ConnectTel(char *port
);
105 void DisconnectTel(void);
106 int CheckConnectTel(void);
108 void SetRate(int newRate
);
109 void SetLimits(double limitLower
, double limitHigher
);
110 void StartSlew(int direction
);
111 void StopSlew(int direction
);
114 int SlewToCoords(double newRA
, double newDec
);
115 int SyncToCoords(double newRA
, double newDec
);
116 int CheckCoords(double desRA
, double desDec
);
119 int SetSlewRate(void);
121 int SyncLST(double newTime
);
124 void Reticle(int reticle
);
125 void Focus(int focus
);
126 void Derotator(int rotate
);