9 char _me[] =
"MockAlignmentScope";
17 m_mountType = mountType;
23 return "MockAlignmentScope";
27 bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override
30 ProcessAlignmentNumberProperties(
this, name, values, names, n);
33 bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
override
36 ProcessAlignmentTextProperties(
this, name, texts, names, n);
39 bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override
42 ProcessAlignmentSwitchProperties(
this, name, states, names, n);
45 bool ISNewBLOB(
const char *dev,
const char *name,
int sizes[],
int blobsizes[],
char *blobs[],
46 char *formats[],
char *names[],
int n)
override
49 ProcessAlignmentBLOBProperties(
this, name, sizes, blobsizes, blobs, formats, names, n);
65 InitAlignmentProperties(
this);
72 SetApproximateMountAlignmentFromMountType(m_mountType);
77 GetAlignmentDatabase().clear();
82 SetAlignmentSubsystemActive(
true);
87 virtual bool updateLocation(
double latitude,
double longitude,
double elevation)
override
90 UpdateLocation(latitude, longitude, elevation);
91 m_Location.longitude = longitude;
92 m_Location.latitude = latitude;
93 m_Location.elevation = elevation;
100 if (m_mountType == EQUATORIAL)
104 double mountRA = 0, mountDec = 0;
105 double actualRA, actualDec;
109 if (!TelescopeEquatorialToSky(
range24(mountRA),
rangeDec(mountDec), actualRA, actualDec))
113 actualDec = mountDec;
117 NewRaDec(actualRA, actualDec);
119 else if (m_mountType == ALTAZ)
122 double mountAlt = 0, mountAz = 0;
123 double actualRA, actualDec;
127 if (!TelescopeAltAzToSky(
range360(mountAlt),
range360(mountAz), actualRA, actualDec))
140 NewRaDec(actualRA, actualDec);
148 if (m_mountType == EQUATORIAL)
152 double mountRA =
ra, mountDec =
dec;
154 return AddAlignmentEntryEquatorial(
ra,
dec, mountRA, mountDec);
156 else if (m_mountType == ALTAZ)
163 GetDatabaseReferencePosition(location);
168 return AddAlignmentEntryAltAz(
ra,
dec, mountAlt, mountAz);
175 if (m_mountType == EQUATORIAL)
177 double mountRA, mountDec;
178 SkyToTelescopeEquatorial(
ra,
dec, mountRA, mountDec);
185 else if (m_mountType == ALTAZ)
187 double mountAlt, mountAz;
188 SkyToTelescopeAltAz(
ra,
dec, mountAlt, mountAz);
215 void ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
224 void ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
233 void ISNewBLOB(
const char *dev,
const char *name,
int sizes[],
int blobsizes[],
char *blobs[],
char *formats[],
234 char *names[],
int n)
void ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
Update data of an existing blob vector property.
void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Update the value of an existing switch vector property.
void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
Update the value of an existing text vector property.
void ISGetProperties(const char *dev)
Get Device Properties.
void ISSnoopDevice(XMLEle *root)
Function defined by Drivers that is called when another Driver it is snooping (by having previously c...
void ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
This class encapsulates all the alignment subsystem classes that are useful to driver implementations...
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool Handshake()
perform handshake with device to check communication
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
virtual bool ReadScopeStatus() override
Read telescope status.
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual bool Sync(double ra, double dec) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
Scope(MountType mountType)
virtual const char * getDefaultName() override
virtual bool Goto(double ra, double dec) override
Move the scope to the supplied RA and DEC coordinates.
bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
bool ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n) override
Process the client newBLOB command.
virtual bool Handshake() override
perform handshake with device to check communication
void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
Class to provide general functionality of a telescope device.
double range24(double r)
range24 Limits a number to be between 0-24 range.
double range360(double r)
range360 Limits an angle to be between 0-360 degrees.
double rangeDec(double decdegrees)
rangeDec Limits declination value to be in -90 to 90 range.
Implementations for common driver routines.
Namespace to encapsulate the INDI Alignment Subsystem classes. For more information see "INDI Alignme...
Namespace to encapsulate INDI client, drivers, and mediator classes.
void EquatorialToHorizontal(IEquatorialCoordinates *object, IGeographicCoordinates *observer, double JD, IHorizontalCoordinates *position)
EquatorialToHorizontal Calculate horizontal coordinates from equatorial coordinates.
void HorizontalToEquatorial(IHorizontalCoordinates *object, IGeographicCoordinates *observer, double JD, IEquatorialCoordinates *position)
HorizontalToEquatorial Calculate Equatorial EOD Coordinates from horizontal coordinates.
const char * getDeviceName()