moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / indi / celestronprotocol.h
blobd7c956f715238d8dbd574ecd3cdf388d74225803
1 /*
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
9 */
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. */
23 #define LOWER 90.
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. */
28 #define HIGHER 0.
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. */
47 #define SLEW 0
48 #define FIND 1
49 #define CENTER 2
50 #define GUIDE 3
52 #if REVERSE_NS > 0
53 #define NORTH 3
54 #define SOUTH 0
55 #else
56 #define NORTH 0
57 #define SOUTH 3
58 #endif
60 #define EAST 2
61 #define WEST 1
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 */
70 /* Reticle defines */
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 */
80 /* Focus defines */
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 */
89 /* Rotator defines */
91 #define ROTATORON 1 /* image rotator on */
92 #define ROTATOROFF 0 /* image rotator off */
95 /* Fan defines */
97 #define FANON 1 /* cooling fan on */
98 #define FANOFF 0 /* cooling fan off */
100 #ifdef __cplusplus
101 extern "C" {
102 #endif
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);
112 double GetRA(void);
113 double GetDec(void);
114 int SlewToCoords(double newRA, double newDec);
115 int SyncToCoords(double newRA, double newDec);
116 int CheckCoords(double desRA, double desDec);
118 void StopNSEW(void);
119 int SetSlewRate(void);
121 int SyncLST(double newTime);
122 int SyncLocalTime();
124 void Reticle(int reticle);
125 void Focus(int focus);
126 void Derotator(int rotate);
127 void Fan(int fan);
129 #ifdef __cplusplus
131 #endif
133 #endif