24 #include <libnova/transform.h>
152 return "Astro-Electronic FS-2";
182 char AzStr[16], AltStr[16];
183 fs_sexa(AzStr, parkAz, 2, 3600);
184 fs_sexa(AltStr, parkAlt, 2, 3600);
185 LOGF_DEBUG(
"Parking to Az (%s) Alt (%s)...", AzStr, AltStr);
191 char RAStr[16], DEStr[16];
192 fs_sexa(RAStr, equatorialCoords.rightascension, 2, 3600);
193 fs_sexa(DEStr, equatorialCoords.declination, 2, 3600);
194 LOGF_DEBUG(
"Parking to RA (%s) DEC (%s)...", RAStr, DEStr);
196 if (
Goto(equatorialCoords.rightascension, equatorialCoords.declination))
199 LOG_INFO(
"Parking is in progress...");
270 LOG_INFO(
"Mount at park position. Tracking stopping.");
278 LOG_INFO(
"Mount is parked, motors stopped.");
293 LOG_INFO(
"Mount is unparked, restoring slew rate.");
316 char AzStr[16], AltStr[16];
317 fs_sexa(AzStr, parkAz, 2, 3600);
318 fs_sexa(AltStr, parkAlt, 2, 3600);
319 LOGF_DEBUG(
"Unparking from Az (%s) Alt (%s)...", AzStr, AltStr);
325 char RAStr[16], DEStr[16];
326 fs_sexa(RAStr, equatorialCoords.rightascension, 2, 3600);
327 fs_sexa(DEStr, equatorialCoords.declination, 2, 3600);
328 LOGF_DEBUG(
"Syncing to parked coordinates RA (%s) DEC (%s)...", RAStr, DEStr);
330 if (
Sync(equatorialCoords.rightascension, equatorialCoords.declination))
348 double parkAZ = horizontalCoords.azimuth;
349 double parkAlt = horizontalCoords.altitude;
350 char AzStr[16], AltStr[16];
351 fs_sexa(AzStr, parkAZ, 2, 3600);
352 fs_sexa(AltStr, parkAlt, 2, 3600);
353 LOGF_DEBUG(
"Setting current parking position to coordinates Az (%s) Alt (%s)...", AzStr, AltStr);
const char * getDeviceName() 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
TelescopeStatus TrackState
void SetAxis1Park(double value)
SetRAPark Set current RA/AZ parking position. The data park file (stored in ~/.indi/ParkData....
void SetAxis1ParkDefault(double steps)
SetRAPark Set default RA/AZ parking position.
void SetTelescopeCapability(uint32_t cap, uint8_t slewRateCount)
SetTelescopeCapability sets the Telescope capabilities. All capabilities must be initialized.
double GetAxis1Park() const
double GetAxis2Park() const
bool isParked()
isParked is mount currently parked?
ISwitchVectorProperty SlewRateSP
virtual void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
IGeographicCoordinates m_Location
bool InitPark()
InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking...
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
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.
void SetAxis2ParkDefault(double steps)
SetDEParkDefault Set default DEC/ALT parking position.
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
void TrackingStart_RestoreSlewRate()
enum LX200FS2::TelescopeParkedStatus ParkedStatus
INumberVectorProperty SlewAccuracyNP
void TrackingStop_Abort()
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual bool Park() override
Park the telescope to its home position.
virtual bool checkConnection() override
virtual bool ReadScopeStatus() override
Read telescope status.
ISwitchVectorProperty StopAfterParkSP
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
virtual bool UnPark() override
Unpark the telescope if already parked.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual const char * getDefaultName() override
virtual bool isSlewComplete() override
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
void TrackingStop_AllStop()
ISwitch StopAfterParkS[2]
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.
bool updateSlewRate(int index)
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool Abort() override
Abort any telescope motion including tracking if possible.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool ReadScopeStatus() override
Read telescope status.
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override
Move the telescope in the direction dir.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool Goto(double ra, double dec) override
Move the scope to the supplied RA and DEC coordinates.
const char * OPTIONS_TAB
OPTIONS_TAB Where all the driver's options are located. Those may include auxiliary controls,...
#define NARRAY(a)
Handy macro to find the number of elements in array a[]. Must be used with actual array,...
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[].
Implementations for common driver routines.
void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
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.
int IUFindOnSwitchIndex(const ISwitchVectorProperty *svp)
Returns the index of first ON switch it finds in the vector switch property.
const char * IUFindOnSwitchName(ISState *states, char *names[], int n)
Returns the name of the first ON switch it finds in the supplied arguments.
void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp)
Add a number vector property value to the configuration file.
void IUFillSwitch(ISwitch *sp, const char *name, const char *label, ISState s)
Assign attributes for a switch property. The switch's auxiliary elements will be set to NULL.
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.
void IUFillSwitchVector(ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name, const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s)
Assign attributes for a switch vector property. The vector's auxiliary elements will be set to NULL.
int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n)
Update all switches in a switch vector property.
void IDSetNumber(const INumberVectorProperty *nvp, const char *fmt,...)
void IDSetSwitch(const ISwitchVectorProperty *svp, const char *fmt,...)
int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n)
Update all numbers in a number vector property.
#define LOGF_DEBUG(fmt,...)
#define DEBUGF(priority, msg,...)
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.