1 | /*
|
---|
2 | * Header File for the Telescope Control protocols for the Meade LX200
|
---|
3 | * Author: John Kielkopf (kielkopf@louisville.edu)
|
---|
4 | *
|
---|
5 | * This file contains header information used in common with xmtel.
|
---|
6 |
|
---|
7 | This library is free software; you can redistribute it and/or
|
---|
8 | modify it under the terms of the GNU Lesser General Public
|
---|
9 | License as published by the Free Software Foundation; either
|
---|
10 | version 2.1 of the License, or (at your option) any later version.
|
---|
11 |
|
---|
12 | This library is distributed in the hope that it will be useful,
|
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
15 | Lesser General Public License for more details.
|
---|
16 |
|
---|
17 | You should have received a copy of the GNU Lesser General Public
|
---|
18 | License along with this library; if not, write to the Free Software
|
---|
19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
---|
20 | *
|
---|
21 | * 15 May 2003 -- Version 2.00
|
---|
22 | *
|
---|
23 | */
|
---|
24 |
|
---|
25 |
|
---|
26 | #ifndef CELESTRON_PROTOCOL_H
|
---|
27 | #define CELESTRON_PROTOCOL_H
|
---|
28 |
|
---|
29 | /* These are user defined quantities that set the limits over which it */
|
---|
30 | /* is safe to operate the telescope. */
|
---|
31 |
|
---|
32 |
|
---|
33 | /* LOWER is the number of degrees from the zenith that you will allow. */
|
---|
34 | /* Use 80, for example, to keep the eyepiece end out of the fork arm space */
|
---|
35 | /* of an LX200 telescope. */
|
---|
36 |
|
---|
37 | #define LOWER 90.
|
---|
38 |
|
---|
39 | /* HIGHER is the horizon. 0 is an unobstructed horizon in every direction. */
|
---|
40 | /* Use 10, for example, to limit sighting below 10 degrees above the horizon. */
|
---|
41 |
|
---|
42 | #define HIGHER 0.
|
---|
43 |
|
---|
44 |
|
---|
45 | /* Set this if a slew to the north sends the telescope south. */
|
---|
46 |
|
---|
47 | #define REVERSE_NS 0 /* 1 for reverse; 0 for normal. */
|
---|
48 |
|
---|
49 |
|
---|
50 | /* Set this for maximum slew rate allowed in degree/sec. */
|
---|
51 |
|
---|
52 | #define MAXSLEWRATE 4 /* 2 for safety; 4 for 16-inch; 8 otherwise. */
|
---|
53 |
|
---|
54 |
|
---|
55 |
|
---|
56 |
|
---|
57 | /* The following parameters are used internally to set speed and direction. */
|
---|
58 | /* Do not change these values. */
|
---|
59 |
|
---|
60 |
|
---|
61 | #define SLEW 0
|
---|
62 | #define FIND 1
|
---|
63 | #define CENTER 2
|
---|
64 | #define GUIDE 3
|
---|
65 |
|
---|
66 | #if REVERSE_NS > 0
|
---|
67 | #define NORTH 3
|
---|
68 | #define SOUTH 0
|
---|
69 | #else
|
---|
70 | #define NORTH 0
|
---|
71 | #define SOUTH 3
|
---|
72 | #endif
|
---|
73 |
|
---|
74 | #define EAST 2
|
---|
75 | #define WEST 1
|
---|
76 |
|
---|
77 | /* Slew speed defines */
|
---|
78 |
|
---|
79 | # define SLEWRATE8 8 /* should be 8 degrees per second (not 16-inch) */
|
---|
80 | # define SLEWRATE4 4 /* should be 4 degrees per second */
|
---|
81 | # define SLEWRATE3 3 /* should be 3 degrees per second */
|
---|
82 | # define SLEWRATE2 2 /* should be 2 degrees per second */
|
---|
83 |
|
---|
84 | /* Reticle defines */
|
---|
85 |
|
---|
86 | #define BRIGHTER 16 /* increase */
|
---|
87 | #define DIMMER 8 /* decrease */
|
---|
88 | #define BLINK0 0 /* no blinking */
|
---|
89 | #define BLINK1 1 /* blink rate 1 */
|
---|
90 | #define BLINK2 2 /* blink rate 2 */
|
---|
91 | #define BLINK3 4 /* blink rate 3 */
|
---|
92 |
|
---|
93 |
|
---|
94 | /* Focus defines */
|
---|
95 |
|
---|
96 | #define FOCUSOUT 8 /* positive voltage output */
|
---|
97 | #define FOCUSIN 4 /* negative voltage output */
|
---|
98 | #define FOCUSSTOP 0 /* no output */
|
---|
99 | #define FOCUSSLOW 1 /* half voltage */
|
---|
100 | #define FOCUSFAST 2 /* full voltage */
|
---|
101 |
|
---|
102 |
|
---|
103 | /* Rotator defines */
|
---|
104 |
|
---|
105 | #define ROTATORON 1 /* image rotator on */
|
---|
106 | #define ROTATOROFF 0 /* image rotator off */
|
---|
107 |
|
---|
108 |
|
---|
109 | /* Fan defines */
|
---|
110 |
|
---|
111 | #define FANON 1 /* cooling fan on */
|
---|
112 | #define FANOFF 0 /* cooling fan off */
|
---|
113 |
|
---|
114 | #ifdef __cplusplus
|
---|
115 | extern "C" {
|
---|
116 | #endif
|
---|
117 |
|
---|
118 | int ConnectTel(char *port);
|
---|
119 | void DisconnectTel(void);
|
---|
120 | int CheckConnectTel(void);
|
---|
121 |
|
---|
122 | void SetRate(int newRate);
|
---|
123 | void SetLimits(double limitLower, double limitHigher);
|
---|
124 | void StartSlew(int direction);
|
---|
125 | void StopSlew(int direction);
|
---|
126 | double GetRA(void);
|
---|
127 | double GetDec(void);
|
---|
128 | int SlewToCoords(double newRA, double newDec);
|
---|
129 | int SyncToCoords(double newRA, double newDec);
|
---|
130 | int CheckCoords(double desRA, double desDec, double tolRA, double tolDEC);
|
---|
131 |
|
---|
132 | void StopNSEW(void);
|
---|
133 | int SetSlewRate(void);
|
---|
134 |
|
---|
135 | int SyncLST(double newTime);
|
---|
136 | int SyncLocalTime();
|
---|
137 |
|
---|
138 | void Reticle(int reticle);
|
---|
139 | void Focus(int focus);
|
---|
140 | void Derotator(int rotate);
|
---|
141 | void Fan(int fan);
|
---|
142 |
|
---|
143 | #ifdef __cplusplus
|
---|
144 | }
|
---|
145 | #endif
|
---|
146 |
|
---|
147 | #endif
|
---|
148 |
|
---|