kstars
celestrongps.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef CELESTRONGPS_H
00022 #define CELESTRONGPS_H
00023
00024 #include "indidevapi.h"
00025 #include "indicom.h"
00026
00027 #define POLLMS 1000
00028
00029 class CelestronGPS
00030 {
00031 public:
00032 CelestronGPS();
00033 virtual ~CelestronGPS() {}
00034
00035 virtual void ISGetProperties (const char *dev);
00036 virtual void ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n);
00037 virtual void ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n);
00038 virtual void ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n);
00039 virtual void ISPoll ();
00040 virtual void getBasicData();
00041
00042 int checkPower(INumberVectorProperty *np);
00043 int checkPower(ISwitchVectorProperty *sp);
00044 int checkPower(ITextVectorProperty *tp);
00045 void powerTelescope();
00046 void slewError(int slewCode);
00047 int handleCoordSet();
00048 int getOnSwitch(ISwitchVectorProperty *sp);
00049
00050 private:
00051 int timeFormat;
00052
00053 double JD;
00054 double currentRA;
00055 double currentDEC;
00056 double targetRA;
00057 double targetDEC;
00058 double lastRA;
00059 double lastDEC;
00060
00061 int lastSet;
00062 int currentSet;
00063 int lastMove[4];
00064
00065 };
00066
00067 #endif
00068