52 virtual bool ISNewBLOB(
const char *dev,
const char *name,
int sizes[],
int blobsizes[],
char *blobs[],
53 char *formats[],
char *names[],
int n)
override;
54 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
55 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
56 virtual bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
override;
70 virtual bool Goto(
double ra,
double dec)
override;
71 virtual bool Sync(
double ra,
double dec)
override;
72 virtual bool Abort()
override;
80 virtual bool updateLocation(
double latitude,
double longitude,
double elevation)
override;
96 virtual bool Park()
override;
97 virtual bool UnPark()
override;
106 void CalculateGuidePulses();
107 void ResetGuidePulses();
108 void ConvertGuideCorrection(
double delta_ra,
double delta_dec,
double &delta_alt,
double &delta_az);
113 void SkywatcherMicrostepsFromTelescopeDirectionVector(
115 long &Axis2Microsteps);
117 TelescopeDirectionVectorFromSkywatcherMicrosteps(
long Axis1Microsteps,
long Axis2Microsteps);
122 void UpdateDetailedMountInformation(
bool InformClient);
126 void resetTracking();
127 inline double average(
const std::vector<double> &values)
129 return values.empty() ? 0 : std::accumulate(values.begin(), values.end(), 0.0) / values.size();
135 static constexpr
const char *MountInfoTab {
"Mount Info" };
136 IText BasicMountInfoT[4] {};
140 MOTOR_CONTROL_FIRMWARE_VERSION,
152 MICROSTEPS_PER_REVOLUTION,
153 STEPPER_CLOCK_FREQUENCY,
155 MICROSTEPS_PER_WORM_REVOLUTION
176 MICROSTEPS_PER_ARCSEC,
180 INumber AxisOneEncoderValuesN[4];
182 INumber AxisTwoEncoderValuesN[4];
261 std::unique_ptr<PID> m_Controllers[2];
264 static constexpr
double MAX_TRACKING_DELTA {5};
265 static constexpr
const char *TRACKING_TAB =
"Tracking";
268 uint8_t m_LastCustomDirection[2];
269 double GuideDeltaAlt { 0 };
270 double GuideDeltaAz { 0 };
274 std::vector<GuidingPulse> GuidingPulses;
276 bool m_ManualMotionActive {
false };
277 bool m_IterativeGOTOPending {
false};
This class encapsulates all the alignment subsystem classes that are useful to driver implementations...
The ElapsedTimer class provides a fast way to calculate elapsed times.
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
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 IPState GuideEast(uint32_t ms) override
Guide east for ms milliseconds. East is defined as RA+.
virtual void TimerHit() override
Called when setTimer() time is up.
virtual bool ReadScopeStatus() override
Read telescope status.
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 Abort() override
Abort any telescope motion including tracking if possible.
virtual const char * getDefaultName() override
Misc.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool Handshake() override
Communication.
virtual IPState GuideWest(uint32_t ms) override
Guide west for ms milliseconds. West is defined as RA-.
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override
Move the telescope in the direction dir.
virtual ~SkywatcherAPIMount() override=default
virtual bool Park() override
Parking.
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 updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override
Motion.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual IPState GuideSouth(uint32_t ms) override
Guide south for ms milliseconds. South is defined as DEC-.
virtual bool Goto(double ra, double dec) override
Move the scope to the supplied RA and DEC coordinates.
virtual 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 UnPark() override
Unpark the telescope if already parked.
virtual IPState GuideNorth(uint32_t ms) override
Guiding.
virtual bool SetTrackEnabled(bool enabled) override
SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available,...
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
double GetParkDeltaAz(ParkDirection_t target_direction, ParkPosition_t target_position)
Holds a nomalised direction vector (direction cosines)
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.