Instrument Neutral Distributed Interface INDI 2.2.5
celestronprotocol.h
Go to the documentation of this file.
1/*
2* Header File for the Telescope Control protocols for the Meade LX200
3* Author: John Kielkopf ([email protected])
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#pragma once
26
27#include <libnova/julian_day.h>
28
29/* These are user defined quantities that set the limits over which it */
30/* is safe to operate the telescope. */
31
32/* LOWER is the number of degrees from the zenith that you will allow. */
33/* Use 80, for example, to keep the eyepiece end out of the fork arm space */
34/* of an LX200 telescope. */
35
36#define LOWER 90.
37
38/* HIGHER is the horizon. 0 is an unobstructed horizon in every direction. */
39/* Use 10, for example, to limit sighting below 10 degrees above the horizon. */
40
41#define HIGHER 0.
42
43/* Set this if a slew to the north sends the telescope south. */
44
45#define REVERSE_NS 0 /* 1 for reverse; 0 for normal. */
46
47/* Set this for maximum slew rate allowed in degree/sec. */
48
49#define MAXSLEWRATE 4 /* 2 for safety; 4 for 16-inch; 8 otherwise. */
50
51/* The following parameters are used internally to set speed and direction. */
52/* Do not change these values. */
53
54#define SLEW 0
55#define FIND 1
56#define CENTER 2
57#define GUIDE 3
58
59#if REVERSE_NS > 0
60#define NORTH 3
61#define SOUTH 0
62#else
63#define NORTH 0
64#define SOUTH 3
65#endif
66
67#define EAST 2
68#define WEST 1
69
70/* Slew speed defines */
71
72#define SLEWRATE8 8 /* should be 8 degrees per second (not 16-inch) */
73#define SLEWRATE4 4 /* should be 4 degrees per second */
74#define SLEWRATE3 3 /* should be 3 degrees per second */
75#define SLEWRATE2 2 /* should be 2 degrees per second */
76
77/* Reticle defines */
78
79#define BRIGHTER 16 /* increase */
80#define DIMMER 8 /* decrease */
81#define BLINK0 0 /* no blinking */
82#define BLINK1 1 /* blink rate 1 */
83#define BLINK2 2 /* blink rate 2 */
84#define BLINK3 4 /* blink rate 3 */
85
86/* Focus defines */
87
88#define FOCUSOUT 8 /* positive voltage output */
89#define FOCUSIN 4 /* negative voltage output */
90#define FOCUSSTOP 0 /* no output */
91#define FOCUSSLOW 1 /* half voltage */
92#define FOCUSFAST 2 /* full voltage */
93
94/* Rotator defines */
95
96#define ROTATORON 1 /* image rotator on */
97#define ROTATOROFF 0 /* image rotator off */
98
99/* Fan defines */
100
101#define FANON 1 /* cooling fan on */
102#define FANOFF 0 /* cooling fan off */
103
104#ifdef __cplusplus
105extern "C" {
106#endif
107
108int ConnectTel(char *port);
109void DisconnectTel();
110/* 0 if connection is OK, -1 otherwise */
111int CheckConnectTel();
112
113void SetRate(int newRate);
114void SetLimits(double limitLower, double limitHigher);
115int StartSlew(int direction);
116int StopSlew(int direction);
117double GetRA();
118double GetDec();
119int SlewToCoords(double newRA, double newDec);
120int SyncToCoords(double newRA, double newDec);
121int CheckCoords(double desRA, double desDec, double tolRA, double tolDEC);
122int isScopeSlewing();
123int updateLocation(double lng, double lat);
124int updateTime(struct ln_date *utc, double utc_offset);
125
126void StopNSEW();
127int SetSlewRate();
128
129int SyncLST(double newTime);
130int SyncLocalTime();
131
132void Reticle(int reticle);
133void Focus(int focus);
134void Derotator(int rotate);
135void Fan(int fan);
136
137#ifdef __cplusplus
138}
139#endif
int updateTime(struct ln_date *utc, double utc_offset)
int CheckCoords(double desRA, double desDec, double tolRA, double tolDEC)
double GetDec()
void Fan(int fan)
void Derotator(int rotate)
int StartSlew(int direction)
int CheckConnectTel()
void DisconnectTel()
double GetRA()
void Focus(int focus)
int updateLocation(double lng, double lat)
void Reticle(int reticle)
void SetLimits(double limitLower, double limitHigher)
int SetSlewRate()
int ConnectTel(char *port)
int SyncLST(double newTime)
void StopNSEW()
int SyncToCoords(double newRA, double newDec)
int SyncLocalTime()
void SetRate(int newRate)
int StopSlew(int direction)
int SlewToCoords(double newRA, double newDec)
int isScopeSlewing()