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);
118 double AzimuthToDegrees(
double degree);
119 double DegreesToAzimuth(
double degree);
120 bool isNorthHemisphere()
const
128 void UpdateDetailedMountInformation(
bool InformClient);
132 void resetTracking();
134 bool trackUsingPID();
136 bool trackUsingPredictiveRates();
138 void getGuidePulses(
double &az,
double &alt);
148 bool trackByRate(
AXISID axis,
double rate);
150 inline double average(
const std::vector<double> &values)
152 return values.empty() ? 0 : std::accumulate(values.begin(), values.end(), 0.0) / values.size();
158 static constexpr const char *MountInfoTab {
"Mount Info" };
159 IText BasicMountInfoT[4] {};
163 MOTOR_CONTROL_FIRMWARE_VERSION,
175 MICROSTEPS_PER_REVOLUTION,
176 STEPPER_CLOCK_FREQUENCY,
178 MICROSTEPS_PER_WORM_REVOLUTION
199 MICROSTEPS_PER_ARCSEC,
203 INumber AxisOneEncoderValuesN[4];
205 INumber AxisTwoEncoderValuesN[4];
284 std::unique_ptr<PID> m_Controllers[2];
287 static constexpr double MAX_TRACKING_DELTA {5};
288 static constexpr const char *TRACKING_TAB =
"Tracking";
289 static constexpr double ALT_BACKLASH_DEG {0.5};
290 static constexpr double AZ_BACKLASH_DEG {0.5};
291 static constexpr double MIN_TRACK_RATE_FACTOR {0.1};
294 int32_t m_LastTrackRate[2] = {-1, -1};
295 uint8_t m_LastCustomDirection[2];
296 double GuideDeltaAlt { 0 };
297 double GuideDeltaAz { 0 };
298 double m_LastOffset[2] = {0, 0};
299 uint8_t m_OffsetSwitchSettle[2] = {0, 0};
303 std::vector<GuidingPulse> GuidingPulses;
305 bool m_ManualMotionActive[2] {
false,
false };
306 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.
IGeographicCoordinates m_Location
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 normalised direction vector (direction cosines)
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.