Instrument Neutral Distributed Interface INDI 2.2.5
lx200ss2000pc.cpp
Go to the documentation of this file.
1/*
2 SkySensor2000PC
3 Copyright (C) 2015 Camiel Severijns
4 Copyright (C) 2025 Jasem Mutlaq
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20*/
21
22#include "lx200ss2000pc.h"
23
24#include "indicom.h"
25#include "lx200driver.h"
26
27#include <cmath>
28#include <string.h>
29
30#include <libnova/transform.h>
31#include <termios.h>
32#include <unistd.h>
33
34#define RB_MAX_LEN 64
35
36const int LX200SS2000PC::ShortTimeOut = 2; // In seconds.
37const int LX200SS2000PC::LongTimeOut = 10; // In seconds.
38
52
54{
56
57 IUFillNumber(&SlewAccuracyN[0], "SlewRA", "RA (arcmin)", "%10.6m", 0., 60., 1., 3.0);
58 IUFillNumber(&SlewAccuracyN[1], "SlewDEC", "Dec (arcmin)", "%10.6m", 0., 60., 1., 3.0);
59 IUFillNumberVector(&SlewAccuracyNP, SlewAccuracyN, NARRAY(SlewAccuracyN), getDeviceName(), "Slew Accuracy", "",
61
63
64 return true;
65}
66
68{
70
71 if (isConnected())
72 {
73 defineProperty(&SlewAccuracyNP);
74 }
75 else
76 {
77 deleteProperty(SlewAccuracyNP.name);
78 }
79
80 return true;
81}
82
83bool LX200SS2000PC::ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
84{
85 if (strcmp(dev, getDeviceName()) == 0)
86 {
87 if (!strcmp(name, SlewAccuracyNP.name))
88 {
89 if (IUUpdateNumber(&SlewAccuracyNP, values, names, n) < 0)
90 return false;
91
92 SlewAccuracyNP.s = IPS_OK;
93
94 if (SlewAccuracyN[0].value < 3 || SlewAccuracyN[1].value < 3)
95 IDSetNumber(&SlewAccuracyNP, "Warning: Setting the slew accuracy too low may result in a dead lock");
96
97 IDSetNumber(&SlewAccuracyNP, nullptr);
98 return true;
99 }
100 }
101
102 return LX200Generic::ISNewNumber(dev, name, values, names, n);
103}
104
106{
108
109 IUSaveConfigNumber(fp, &SlewAccuracyNP);
110
111 return true;
112}
113
115{
116 return const_cast<const char *>("SkySensor2000PC");
117}
118
119bool LX200SS2000PC::updateTime(ln_date *utc, double utc_offset)
120{
121 bool result = true;
122 // This method is largely identical to the one in the LX200Generic class.
123 // The difference is that it ensures that updates that require planetary
124 // data to be recomputed by the SkySensor2000PC are only done when really
125 // necessary because this takes quite some time.
126 if (!isSimulation())
127 {
128 result = false;
129 struct ln_zonedate ltm;
130 ln_date_to_zonedate(utc, &ltm, static_cast<long>(utc_offset * 3600.0 + 0.5));
131 LOGF_DEBUG("New zonetime is %04d-%02d-%02d %02d:%02d:%06.3f (offset=%ld)", ltm.years,
132 ltm.months, ltm.days, ltm.hours, ltm.minutes, ltm.seconds, ltm.gmtoff);
133 JD = ln_get_julian_day(utc);
134 LOGF_DEBUG("New JD is %f", JD);
135 if (setLocalTime(PortFD, ltm.hours, ltm.minutes, static_cast<int>(ltm.seconds + 0.5), true))
136 {
137 LOG_ERROR("Error setting local time.");
138 }
139 else if (!setCalenderDate(ltm.years, ltm.months, ltm.days))
140 {
141 LOG_ERROR("Error setting local date.");
142 }
143 // Meade defines UTC Offset as the offset ADDED to local time to yield UTC, which
144 // is the opposite of the standard definition of UTC offset!
145 else if (!setUTCOffset(-(utc_offset)))
146 {
147 LOG_ERROR("Error setting UTC Offset.");
148 }
149 else
150 {
151 LOG_INFO("Time updated.");
152 result = true;
153 }
154 }
155 return result;
156}
157
165
167{
168 const double dx = targetRA - currentRA;
169 const double dy = targetDEC - currentDEC;
170 return fabs(dx) <= (SlewAccuracyN[0].value / (900.0)) && fabs(dy) <= (SlewAccuracyN[1].value / 60.0);
171}
172
173bool LX200SS2000PC::getCalendarDate(int &year, int &month, int &day)
174{
175 char date[RB_MAX_LEN];
176 bool result = (getCommandString(PortFD, date, ":GC#") == 0);
177 LOGF_DEBUG("LX200SS2000PC::getCalendarDate():: Date string from telescope: %s", date);
178 if (result)
179 {
180 result = (sscanf(date, "%d%*c%d%*c%d", &month, &day, &year) == 3); // Meade format is MM/DD/YY
181 LOGF_DEBUG("setCalenderDate: Date retrieved from telescope: %02d/%02d/%02d.", month, day,
182 year);
183 if (result)
184 year +=
185 (year > 50 ? 1900 :
186 2000); // Year 50 or later is in the 20th century, anything less is in the 21st century.
187 }
188 return result;
189}
190
191bool LX200SS2000PC::setCalenderDate(int year, int month, int day)
192{
193 // This method differs from the setCalenderDate function in lx200driver.cpp
194 // in that it reads and checks the complete response from the SkySensor2000PC.
195 // In addition, this method only sends the date when it differs from the date
196 // of the SkySensor2000PC because the resulting update of the planetary data
197 // takes quite some time.
198 bool result = true;
199 int ss_year = 0, ss_month = 0, ss_day = 0;
200 const bool send_to_skysensor =
201 (!getCalendarDate(ss_year, ss_month, ss_day) || year != ss_year || month != ss_month || day != ss_day);
202 LOGF_DEBUG("LX200SS2000PC::setCalenderDate(): Driver date %02d/%02d/%02d, SS2000PC date %02d/%02d/%02d.", month, day,
203 year, ss_month, ss_day, ss_year);
204 if (send_to_skysensor)
205 {
206 char buffer[RB_MAX_LEN];
207 int nbytes_written = 0;
208
209 snprintf(buffer, sizeof(buffer), ":SC %02d/%02d/%02d#", month, day, (year % 100));
210 result = (tty_write_string(PortFD, buffer, &nbytes_written) == TTY_OK && nbytes_written == (int)strlen(buffer));
211 if (result)
212 {
213 int nbytes_read = 0;
214 result = (tty_nread_section(PortFD, buffer, RB_MAX_LEN, '#', ShortTimeOut, &nbytes_read) == TTY_OK
215 && nbytes_read == 1 &&
216 buffer[0] == '1');
217 if (result)
218 {
219 if (tty_nread_section(PortFD, buffer, RB_MAX_LEN, '#', ShortTimeOut, &nbytes_read) != TTY_OK ||
220 strncmp(buffer, "Updating planetary data#", 24) != 0)
221 {
223 "LX200SS2000PC::setCalenderDate(): Received unexpected first line '%s'.", buffer);
224 result = false;
225 }
226 else if (tty_nread_section(PortFD, buffer, RB_MAX_LEN, '#', LongTimeOut, &nbytes_read) != TTY_OK &&
227 strncmp(buffer, " #", 24) != 0)
228 {
230 "LX200SS2000PC::setCalenderDate(): Received unexpected second line '%s'.", buffer);
231 result = false;
232 }
233 }
234 }
235 }
236 return result;
237}
238
240{
241 bool result = true;
242 int ss_timezone;
243 const bool send_to_skysensor = (getUTCOffset(PortFD, &ss_timezone) != 0 || offset != ss_timezone);
244 if (send_to_skysensor)
245 {
246 char temp_string[RB_MAX_LEN];
247 snprintf(temp_string, sizeof(temp_string), ":SG %+03d#", static_cast<int>(offset));
248 result = (setStandardProcedure(PortFD, temp_string) == 0);
249 }
250 return result;
251}
252
253bool LX200SS2000PC::updateLocation(double latitude, double longitude, double elevation)
254{
255 INDI_UNUSED(elevation);
256
257 if (isSimulation())
258 return true;
259
260 if (latitude == 0.0 && longitude == 0.0)
261 return true;
262
263 if (setSiteLatitude(PortFD, latitude) < 0)
264 {
265 LOG_ERROR("Error setting site latitude coordinates");
266 }
267
268 if (setSiteLongitude(PortFD, 360.0 - longitude) < 0)
269 {
270 LOG_ERROR("Error setting site longitude coordinates");
271 return false;
272 }
273
274 char slat[RB_MAX_LEN], slong[RB_MAX_LEN];
275 fs_sexa(slat, latitude, 3, 3600);
276 fs_sexa(slong, longitude, 4, 3600);
277
278 LOGF_INFO("Site location updated to Latitude: %.32s - Longitude: %.32s", slat, slong);
279
280 return true;
281}
282
283// This override is needed, because the Sky Sensor 2000 PC requires a space
284// between the command its argument, unlike the 'standard' LX200 mounts, which
285// does not work on this mount.
286int LX200SS2000PC::setSiteLatitude(int fd, double Lat)
287{
288 int d, m, s;
289 char sign;
290 char temp_string[RB_MAX_LEN];
291
292 if (Lat > 0)
293 sign = '+';
294 else
295 sign = '-';
296
297 getSexComponents(Lat, &d, &m, &s);
298
299 snprintf(temp_string, sizeof(temp_string), ":St %c%03d*%02d#", sign, d, m);
300
301 return setStandardProcedure(fd, temp_string);
302}
303
304// This override is needed, because the Sky Sensor 2000 PC requires a space
305// between the command its argument, unlike the 'standard' LX200 mounts, which
306// does not work on this mount.
307int LX200SS2000PC::setSiteLongitude(int fd, double Long)
308{
309 int d, m, s;
310 char temp_string[RB_MAX_LEN];
311
312 getSexComponents(Long, &d, &m, &s);
313
314 snprintf(temp_string, sizeof(temp_string), ":Sg %03d*%02d#", d, m);
315
316 return setStandardProcedure(fd, temp_string);
317}
318
320{
321 double parkAz = GetAxis1Park();
322 double parkAlt = GetAxis2Park();
323
324 char AzStr[16], AltStr[16];
325 fs_sexa(AzStr, parkAz, 2, 3600);
326 fs_sexa(AltStr, parkAlt, 2, 3600);
327 LOGF_DEBUG("Parking to Az (%s) Alt (%s)...", AzStr, AltStr);
328
329 if (isSimulation())
330 {
331
332 INDI::IEquatorialCoordinates equatorialCoords {0, 0};
333 INDI::IHorizontalCoordinates horizontalCoords {parkAz, parkAlt};
334 INDI::HorizontalToEquatorial(&horizontalCoords, &m_Location, ln_get_julian_from_sys(), &equatorialCoords);
335 Goto(equatorialCoords.rightascension, equatorialCoords.declination);
336 }
337 else
338 {
339 if (setObjAz(PortFD, parkAz) < 0 || setObjAlt(PortFD, parkAlt) < 0)
340 {
341 LOG_ERROR("Error setting Az/Alt.");
342 return false;
343 }
344
345 int err = 0;
346
347 /* Slew reads the '0', that is not the end of the slew */
348 if ((err = Slew(PortFD)))
349 {
350 LOGF_ERROR("Error Slewing to Az %s - Alt %s", AzStr, AltStr);
351 slewError(err);
352 return false;
353 }
354 }
355
358 LOG_INFO("Parking is in progress...");
359
360 return true;
361}
362
364{
365 // First we unpark astrophysics
366 if (isSimulation() == false)
367 {
369 {
370 LOG_ERROR("UnParking Failed.");
371 return false;
372 }
373 }
374
375 // Then we sync with to our last stored position
376 double parkAz = GetAxis1Park();
377 double parkAlt = GetAxis2Park();
378
379 char AzStr[16], AltStr[16];
380 fs_sexa(AzStr, parkAz, 2, 3600);
381 fs_sexa(AltStr, parkAlt, 2, 3600);
382 LOGF_DEBUG("Syncing to parked coordinates Az (%s) Alt (%s)...", AzStr, AltStr);
383
384 if (isSimulation())
385 {
386 INDI::IEquatorialCoordinates equatorialCoords {0, 0};
387 INDI::IHorizontalCoordinates horizontalCoords {parkAz, parkAlt};
388 INDI::HorizontalToEquatorial(&horizontalCoords, &m_Location, ln_get_julian_from_sys(), &equatorialCoords);
389 currentRA = equatorialCoords.rightascension;
390 currentDEC = equatorialCoords.declination;
391 }
392 else
393 {
394 if (setObjAz(PortFD, parkAz) < 0 || (setObjAlt(PortFD, parkAlt)) < 0)
395 {
396 LOG_ERROR("Error setting Az/Alt.");
397 return false;
398 }
399
400 char syncString[256];
401 if (::Sync(PortFD, syncString) < 0)
402 {
403 LOG_WARN("Sync failed.");
404 return false;
405 }
406 }
407
408 SetParked(false);
409 return true;
410}
411
413{
415 INDI::IHorizontalCoordinates horizontalCoords {0, 0};
416 INDI::EquatorialToHorizontal(&equatorialCoords, &m_Location, ln_get_julian_from_sys(), &horizontalCoords);
417 double parkAZ = horizontalCoords.azimuth;
418 double parkAlt = horizontalCoords.altitude;
419
420 char AzStr[16], AltStr[16];
421 fs_sexa(AzStr, parkAZ, 2, 3600);
422 fs_sexa(AltStr, parkAlt, 2, 3600);
423
424 LOGF_DEBUG("Setting current parking position to coordinates Az (%s) Alt (%s)...", AzStr, AltStr);
425
426 SetAxis1Park(parkAZ);
427 SetAxis2Park(parkAlt);
428
429 return true;
430}
431
433{
434 // Az = 0 for North hemisphere
435 SetAxis1Park(LocationNP[LOCATION_LATITUDE].getValue() > 0 ? 0 : 180);
436
437 // Alt = Latitude
439
440 return true;
441}
442
443bool LX200SS2000PC::Goto(double ra, double dec)
444{
445 const struct timespec timeout = {0, 100000000L};
446
447 targetRA = ra;
448 targetDEC = dec;
449 char RAStr[64] = {0}, DecStr[64] = {0};
450 int fracbase = 0;
451
452 switch (getLX200EquatorialFormat())
453 {
455 fracbase = 360000;
456 break;
459 default:
460 fracbase = 3600;
461 break;
462 }
463
464 fs_sexa(RAStr, targetRA, 2, fracbase);
465 fs_sexa(DecStr, targetDEC, 2, fracbase);
466
467 // If moving, let's stop it first.
468 if (EqNP.getState() == IPS_BUSY)
469 {
470 if (!isSimulation() && abortSlew(PortFD) < 0)
471 {
473 LOG_ERROR("Abort slew failed.");
474 AbortSP.apply();
475 return false;
476 }
477
480 LOG_ERROR("Slew aborted.");
481 AbortSP.apply();
482 EqNP.apply();
483
485 {
493 }
494
495 // sleep for 100 mseconds
496 nanosleep(&timeout, nullptr);
497 }
498
499 if (!isSimulation())
500 {
501 if (setObjectRA(PortFD, targetRA, true) < 0 || (setObjectDEC(PortFD, targetDEC, true)) < 0)
502 {
504 LOG_ERROR("Error setting RA/DEC.");
505 EqNP.apply();
506 return false;
507 }
508
509 int err = 0;
510
511 /* Slew reads the '0', that is not the end of the slew */
512 if ((err = Slew(PortFD)))
513 {
514 LOGF_ERROR("Error Slewing to JNow RA %s - DEC %s", RAStr, DecStr);
515 slewError(err);
516 return false;
517 }
518 }
519
521 //EqNP.s = IPS_BUSY;
522
523 LOGF_INFO("Slewing to RA: %s - DEC: %s", RAStr, DecStr);
524
525 return true;
526}
527
528bool LX200SS2000PC::Sync(double ra, double dec)
529{
530 char syncString[256] = {0};
531
532 if (!isSimulation() && (setObjectRA(PortFD, ra, true) < 0 || (setObjectDEC(PortFD, dec, true)) < 0))
533 {
535 LOG_ERROR("Error setting RA/DEC. Unable to Sync.");
536 EqNP.apply();
537 return false;
538 }
539
540 if (!isSimulation() && ::Sync(PortFD, syncString) < 0)
541 {
543 LOG_ERROR("Synchronization failed.");
544 EqNP.apply();
545 return false;
546 }
547
548 currentRA = ra;
549 currentDEC = dec;
550
551 LOG_INFO("Synchronization successful.");
552
554
556
557 return true;
558}
559
561{
562 if (!isConnected())
563 return false;
564
565 if (isSimulation())
566 {
567 mountSim();
568 return true;
569 }
570
571 //if (check_lx200_connection(PortFD))
572 //return false;
573
575 {
576 // Check if LX200 is done slewing
577 if (isSlewComplete())
578 {
579 // Set slew mode to "Centering"
583
585 LOG_INFO("Slew is complete. Tracking...");
586 }
587 }
588 else if (TrackState == SCOPE_PARKING)
589 {
590 if (isSlewComplete())
591 {
592 SetParked(true);
593
595 }
596 }
597
599 {
601 LOG_ERROR("Error reading RA/DEC.");
602 EqNP.apply();
603 return false;
604 }
605
607
608 return true;
609}
bool isConnected() const
void setVersion(uint16_t vMajor, uint16_t vMinor)
Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor.
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
bool isSimulation() const
void setState(IPState state)
void apply(const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
TelescopeStatus TrackState
void SetAxis1Park(double value)
SetRAPark Set current RA/AZ parking position. The data park file (stored in ~/.indi/ParkData....
void SetTelescopeCapability(uint32_t cap, uint8_t slewRateCount)
SetTelescopeCapability sets the Telescope capabilities. All capabilities must be initialized.
double GetAxis1Park() const
double GetAxis2Park() const
virtual void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
IGeographicCoordinates m_Location
void NewRaDec(double ra, double dec)
The child class calls this function when it has updates.
void SetAxis2Park(double steps)
SetDEPark Set current DEC/ALT parking position. The data park file (stored in ~/.indi/ParkData....
void SetParkDataType(TelescopeParkData type)
setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual void getBasicData(void) override
virtual const char * getDefaultName(void) override
virtual bool setUTCOffset(double offset) override
virtual bool Goto(double ra, double dec) override
Move the scope to the supplied RA and DEC coordinates.
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
virtual bool updateTime(ln_date *utc, double utc_offset) override
Update telescope time, date, and UTC offset.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual bool UnPark() override
Unpark the telescope if already parked.
virtual bool Park() override
Park the telescope to its home position.
virtual bool ReadScopeStatus() override
Read telescope status.
virtual bool isSlewComplete(void) override
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool Sync(double ra, double dec) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual void slewError(int slewCode)
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool sendScopeLocation()
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual bool sendScopeTime()
void setLX200Capability(uint32_t cap)
const char * OPTIONS_TAB
OPTIONS_TAB Where all the driver's options are located. Those may include auxiliary controls,...
INDI::PropertySwitch AbortSP
INDI::PropertySwitch MovementNSSP
INDI::PropertyNumber EqNP
INDI::PropertySwitch SlewRateSP
INDI::PropertySwitch MovementWESP
INDI::PropertyNumber LocationNP
#define setLocalTime(fd, x, y, z)
double ra
double dec
@ ISS_ON
Definition indiapi.h:150
#define NARRAY(a)
Handy macro to find the number of elements in array a[]. Must be used with actual array,...
Definition indiapi.h:498
@ IP_RW
Definition indiapi.h:184
@ IPS_BUSY
Definition indiapi.h:161
@ IPS_ALERT
Definition indiapi.h:162
@ IPS_IDLE
Definition indiapi.h:159
@ IPS_OK
Definition indiapi.h:160
void getSexComponents(double value, int *d, int *m, int *s)
Definition indicom.c:243
int tty_write_string(int fd, const char *buf, int *nbytes_written)
Writes a null terminated string to fd.
Definition indicom.c:473
int fs_sexa(char *out, double a, int w, int fracbase)
Converts a sexagesimal number to a string. sprint the variable a in sexagesimal format into out[].
Definition indicom.c:130
int tty_nread_section(int fd, char *buf, int nsize, char stop_char, int timeout, int *nbytes_read)
read buffer from terminal with a delimiter
Definition indicom.c:759
Implementations for common driver routines.
@ TTY_OK
Definition indicom.h:54
void IUFillNumberVector(INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a number vector property. The vector's auxiliary elements will be set to NULL.
Definition indidevapi.c:490
void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp)
Add a number vector property value to the configuration file.
Definition indidevapi.c:23
void IUFillNumber(INumber *np, const char *name, const char *label, const char *format, double min, double max, double step, double value)
Assign attributes for a number property. The number's auxiliary elements will be set to NULL.
Definition indidevapi.c:398
#define INDI_UNUSED(x)
Definition indidevapi.h:132
void IDSetNumber(const INumberVectorProperty *nvp, const char *fmt,...)
int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n)
Update all numbers in a number vector property.
#define LOGF_INFO(fmt,...)
Definition indilogger.h:82
#define LOG_WARN(txt)
Definition indilogger.h:73
#define LOGF_DEBUG(fmt,...)
Definition indilogger.h:83
#define LOG_ERROR(txt)
Shorter logging macros. In order to use these macros, the function (or method) "getDeviceName()" must...
Definition indilogger.h:72
#define LOGF_ERROR(fmt,...)
Definition indilogger.h:80
#define LOG_INFO(txt)
Definition indilogger.h:74
#define getDeviceName
int fd
#define RB_MAX_LEN
int setAlignmentMode(int fd, unsigned int alignMode)
int setObjAlt(int fd, double alt)
int setObjAz(int fd, double az)
int setObjectRA(int fd, double ra, bool addSpace)
int getLX200EquatorialFormat()
int setStandardProcedure(int fd, const char *data)
int setSiteLongitude(int fd, double CartographicLongitude, bool addSpace)
int setObjectDEC(int fd, double dec, bool addSpace)
int checkLX200EquatorialFormat(int fd)
int abortSlew(int fd)
int setSiteLatitude(int fd, double Lat, bool addSpace)
int setCalenderDate(int fd, int dd, int mm, int yy, bool addSpace)
int getCalendarDate(int fd, char *date)
int Slew(int fd)
int getCommandString(int fd, char *data, const char *cmd)
#define getUTCOffset(fd, x)
@ LX200_ALIGN_POLAR
Definition lx200driver.h:34
@ LX200_ALIGN_LAND
Definition lx200driver.h:36
#define getLX200DEC(fd, x)
#define getLX200RA(fd, x)
@ LX200_EQ_LONGER_FORMAT
Definition lx200driver.h:52
@ LX200_EQ_SHORT_FORMAT
Definition lx200driver.h:50
@ LX200_EQ_LONG_FORMAT
Definition lx200driver.h:51
std::vector< uint8_t > buffer
void EquatorialToHorizontal(IEquatorialCoordinates *object, IGeographicCoordinates *observer, double JD, IHorizontalCoordinates *position)
EquatorialToHorizontal Calculate horizontal coordinates from equatorial coordinates.
Definition libastro.cpp:141
void HorizontalToEquatorial(IHorizontalCoordinates *object, IGeographicCoordinates *observer, double JD, IEquatorialCoordinates *position)
HorizontalToEquatorial Calculate Equatorial EOD Coordinates from horizontal coordinates.
Definition libastro.cpp:161
char name[MAXINDINAME]
Definition indiapi.h:321