Kstars

mount.h
1 /*
2  SPDX-FileCopyrightText: 2015 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #ifndef MOUNT_H
8 #define MOUNT_H
9 
10 #include <QQmlContext>
11 #include <QtDBus>
12 #include "ui_mount.h"
13 
14 #include "indi/indistd.h"
15 #include "indi/indifocuser.h"
16 #include "indi/indimount.h"
17 #include "ekos/align/polaralignmentassistant.h"
18 
19 class QQuickView;
20 class QQuickItem;
21 
22 namespace Ekos
23 {
24 /**
25  *@class Mount
26  *@short Supports controlling INDI telescope devices including setting/retrieving mount properties, slewing, motion and speed controls, in addition to enforcing altitude limits and parking/unparking.
27  *@author Jasem Mutlaq
28  *@version 1.5
29  */
30 
31 class Mount : public QWidget, public Ui::Mount
32 {
33  Q_OBJECT
34  Q_CLASSINFO("D-Bus Interface", "org.kde.kstars.Ekos.Mount")
35  Q_PROPERTY(ISD::Mount::Status status READ status NOTIFY newStatus)
36  Q_PROPERTY(ISD::ParkStatus parkStatus READ parkStatus NOTIFY newParkStatus)
37  Q_PROPERTY(QStringList logText READ logText NOTIFY newLog)
38  Q_PROPERTY(QList<double> altitudeLimits READ altitudeLimits WRITE setAltitudeLimits)
39  Q_PROPERTY(bool altitudeLimitsEnabled READ altitudeLimitsEnabled WRITE setAltitudeLimitsEnabled)
40  Q_PROPERTY(double hourAngleLimit READ hourAngleLimit WRITE setHourAngleLimit)
41  Q_PROPERTY(bool hourAngleLimitEnabled READ hourAngleLimitEnabled WRITE setHourAngleLimitEnabled)
42  Q_PROPERTY(bool autoParkEnabled READ autoParkEnabled WRITE setAutoParkEnabled)
43  Q_PROPERTY(QList<double> equatorialCoords READ equatorialCoords)
44  Q_PROPERTY(QList<double> horizontalCoords READ horizontalCoords)
45  Q_PROPERTY(QList<double> telescopeInfo READ telescopeInfo WRITE setTelescopeInfo)
47  Q_PROPERTY(int slewRate READ slewRate WRITE setSlewRate)
48  Q_PROPERTY(int slewStatus READ slewStatus)
49  Q_PROPERTY(bool canPark READ canPark)
50  Q_PROPERTY(ISD::Mount::PierSide pierSide READ pierSide NOTIFY pierSideChanged)
51 
52  public:
53  Mount();
54  ~Mount() override;
55 
56  //typedef enum { PARKING_IDLE, PARKING_OK, UNPARKING_OK, PARKING_BUSY, UNPARKING_BUSY, PARKING_ERROR } ParkingStatus;
57 
58  // This enum defines the meridian flip state machine, this is implemented in
59  typedef enum
60  {
61  FLIP_NONE, // this is the default state, comparing the hour angle with the next flip position
62  // it moves to FLIP_PLANNED when a flip is needed
63  FLIP_PLANNED, // a meridian flip is ready to be started due to the target position and the
64  // configured offsets and signals to the Capture class that a flip is required
65  FLIP_WAITING, // step after FLUP_PLANNED waiting until Capture completes a running exposure
66  FLIP_ACCEPTED, // Capture is idle or has completed the exposure and will wait until the flip
67  // is completed.
68  FLIP_RUNNING, // this signals that a flip slew is in progress, when the slew is completed
69  // the state is set to FLIP_COMPLETED
70  FLIP_COMPLETED, // this checks that the flip was completed successfully or not and after tidying up
71  // moves to FLIP_NONE to wait for the next flip requirement.
72  // Capture sees this and resumes.
73  FLIP_ERROR, // errors in the flip process should end up here
74  FLIP_INACTIVE // do not execute a meridian flip since it will disturb other activities like
75  // a running polar alignment
76  } MeridianFlipStatus;
77 
78  /**
79  * @brief addMount Add a new Mount device
80  * @param device pointer to mount device
81  * @return True if added successfully, false if duplicate or failed to add.
82  */
83  bool addMount(ISD::Mount *device);
84 
85  /**
86  * @brief addGPS Add a new GPS device
87  * @param device pointer to gps device
88  * @return True if added successfully, false if duplicate or failed to add.
89  */
90  bool addGPS(ISD::GPS *device);
91 
92  void removeDevice(ISD::GenericDevice *device);
93 
94  // Log functions
95  void appendLogText(const QString &);
96  void clearLog();
97  QStringList logText()
98  {
99  return m_LogText;
100  }
101  QString getLogText() const
102  {
103  return m_LogText.join("\n");
104  }
105 
106  ISD::Mount::Status status() const
107  {
108  return m_Status;
109  }
110  ISD::Mount *activeMount() const
111  {
112  return m_Mount;
113  }
114  QString statusString(bool translated = true) const
115  {
116  if (m_Mount)
117  return m_Mount->statusString(m_Status, translated);
118  else
119  return "NA";
120  }
121  ISD::Mount::PierSide pierSide() const
122  {
123  if (m_Mount)
124  return m_Mount->pierSide();
125  else
126  return ISD::Mount::PIER_UNKNOWN;
127  }
128  ISD::ParkStatus parkStatus() const
129  {
130  return m_ParkStatus;
131  }
132 
133  MeridianFlipStatus meridianFlipStatus() const
134  {
135  return m_MFStatus;
136  }
137 
138  /** @defgroup MountDBusInterface Ekos Mount DBus Interface
139  * Mount interface provides advanced scripting capabilities to control INDI mounts.
140  */
141 
142  /*@{*/
143 
144  /** DBUS interface function.
145  * Returns the mount altitude limits.
146  * @return Returns array of doubles. First item is minimum altitude in degrees. Second item is maximum altitude limit in degrees.
147  */
148  Q_SCRIPTABLE QList<double> altitudeLimits();
149 
150  /** DBUS interface function.
151  * Sets the mount altitude limits, and whether they are enabled or disabled.
152  * @param limits is a list of double values. 2 values are expected: minAltitude & maxAltitude
153  */
154  Q_SCRIPTABLE Q_NOREPLY void setAltitudeLimits(QList<double> limits);
155 
156  /** DBUS interface function.
157  * Enable or disable mount altitude limits.
158  */
159  Q_SCRIPTABLE void setAltitudeLimitsEnabled(bool enable);
160 
161  /** DBUS interface function.
162  * Returns whether the mount limits are enabled or disabled.
163  * @return True if enabled, false otherwise.
164  */
165  Q_SCRIPTABLE bool altitudeLimitsEnabled();
166 
167  /** DBUS interface function.
168  * Returns the mount hour angle limit.
169  * @return Returns hour angle limit in hours.
170  */
171  Q_SCRIPTABLE double hourAngleLimit();
172 
173  /** DBUS interface function.
174  * Sets the mount altitude limits, and whether they are enabled or disabled.
175  * @param limits is a list of double values. 2 values are expected: minAltitude & maxAltitude
176  */
177  Q_SCRIPTABLE Q_NOREPLY void setHourAngleLimit(double limit);
178 
179  /** DBUS interface function.
180  * Enable or disable mount hour angle limit. Mount cannot slew and/or track past this
181  * hour angle distance.
182  */
183  Q_SCRIPTABLE void setHourAngleLimitEnabled(bool enable);
184 
185  /** DBUS interface function.
186  * Returns whether the mount limits are enabled or disabled.
187  * @return True if enabled, false otherwise.
188  */
189  Q_SCRIPTABLE bool hourAngleLimitEnabled();
190 
191  /**
192  * @brief autoParkEnabled Check if auto-park is enabled.
193  * @return True if enabled.
194  */
195  Q_SCRIPTABLE bool autoParkEnabled();
196 
197  /**
198  * @brief setAutoParkEnabled Toggle Auto Park
199  * @param enable True to start, false to stop
200  */
201  Q_SCRIPTABLE void setAutoParkEnabled(bool enable);
202 
203  /**
204  * @brief setAutoParkDailyEnabled toggles everyday Auto Park
205  * @param enable true to activate, false to deactivate
206  */
207  Q_SCRIPTABLE void setAutoParkDailyEnabled(bool enabled);
208 
209  /**
210  * @brief setAutoParkStartup Set time when automatic parking is activated.
211  * @param startup Startup time. should not be more than 12 hours away.
212  */
213  Q_SCRIPTABLE void setAutoParkStartup(QTime startup);
214 
215  Q_SCRIPTABLE bool meridianFlipEnabled();
216  Q_SCRIPTABLE double meridianFlipValue();
217 
218  /** DBUS interface function.
219  * Slew the mount to the RA/DEC (JNow).
220  * @param RA Right ascention is hours.
221  * @param DEC Declination in degrees.
222  * @return true if the command is sent successfully, false otherwise.
223  */
224  Q_INVOKABLE Q_SCRIPTABLE bool slew(double RA, double DEC);
225 
226  /**
227  @brief Like above but RA and DEC are strings HH:MM:SS and DD:MM:SS
228  */
229  Q_INVOKABLE bool slew(const QString &RA, const QString &DEC);
230 
231  /** DBUS interface function.
232  * Slew the mount to the target. Target name must be valid in KStars.
233  * @param target name
234  * @return true if the command is sent successfully, false otherwise.
235  */
236  Q_INVOKABLE Q_SCRIPTABLE bool gotoTarget(const QString &target);
237 
238  /** DBUS interface function.
239  * Sync the mount to the RA/DEC (JNow).
240  * @param RA Right ascention is hours.
241  * @param DEC Declination in degrees.
242  * @return true if the command is sent successfully, false otherwise.
243  */
244  Q_INVOKABLE Q_SCRIPTABLE bool sync(double RA, double DEC);
245 
246  /** DBUS interface function.
247  * Sync the mount to the target. Target name must be valid in KStars.
248  * @param target name
249  * @return true if the command is sent successfully, false otherwise.
250  */
251  Q_INVOKABLE Q_SCRIPTABLE bool syncTarget(const QString &target);
252 
253  /**
254  @brief Like above but RA and DEC are strings HH:MM:SS and DD:MM:SS
255  */
256  Q_INVOKABLE bool sync(const QString &RA, const QString &DEC);
257 
258  /** DBUS interface function.
259  * Get equatorial coords (JNow). An array of doubles is returned. First element is RA in hours. Second elements is DEC in degrees.
260  */
261  Q_SCRIPTABLE QList<double> equatorialCoords();
262 
263  /** DBUS interface function.
264  * Get Horizontal coords. An array of doubles is returned. First element is Azimuth in degrees. Second elements is Altitude in degrees.
265  */
266  Q_SCRIPTABLE QList<double> horizontalCoords();
267 
268  /** DBUS interface function.
269  * Get Horizontal coords.
270  */
271  Q_SCRIPTABLE SkyPoint currentTarget();
272 
273  /** DBUS interface function.
274  * Get mount hour angle in hours (-12 to +12).
275  */
276  Q_SCRIPTABLE double hourAngle();
277 
278  double initialPositionHA;
279  /** DBUS interface function.
280  * Get the hour angle of that time the mount has slewed to the current position.
281  * This is used to manage the meridian flip for mounts which do not report pier side.
282  * only one attempt to flip is done.
283  */
284  Q_SCRIPTABLE double initialHA()
285  {
286  return initialPositionHA;
287  }
288 
289  Q_SCRIPTABLE void setInitialHA(double ha)
290  {
291  initialPositionHA = ha;
292  }
293 
294  /** DBUS interface function.
295  * Aborts the mount motion
296  * @return true if the command is sent successfully, false otherwise.
297  */
298  Q_INVOKABLE Q_SCRIPTABLE bool abort();
299 
300  /** DBUS interface function.
301  * Get the mount slew status ("Idle","Complete", "Busy", "Error")
302  */
303  Q_INVOKABLE Q_SCRIPTABLE IPState slewStatus();
304 
305 
306  /** DBUS interface function.
307  * Get the mount slew rate index 0 to N-1, or -1 if slew rates are not supported.
308  */
309  Q_INVOKABLE Q_SCRIPTABLE int slewRate();
310 
311  Q_INVOKABLE Q_SCRIPTABLE bool setSlewRate(int index);
312 
313  /** DBUS interface function.
314  * Get telescope and guide scope info. An array of doubles is returned in order.
315  * Primary Telescope Focal Length (mm), Primary Telescope Aperture (mm), Guide Telescope Focal Length (mm), Guide Telescope Aperture (mm)
316  */
317  Q_INVOKABLE Q_SCRIPTABLE QList<double> telescopeInfo();
318 
319  /** DBUS interface function.
320  * Set telescope and guide scope info and save them in INDI mount driver. All measurements is in millimeters.
321  * @param info An ordered 4-item list as following:
322  * primaryFocalLength Primary Telescope Focal Length. Set to 0 to skip setting this value.
323  * primaryAperture Primary Telescope Aperture. Set to 0 to skip setting this value.
324  * guideFocalLength Guide Telescope Focal Length. Set to 0 to skip setting this value.
325  * guideAperture Guide Telescope Aperture. Set to 0 to skip setting this value.
326  */
327  Q_SCRIPTABLE Q_NOREPLY void setTelescopeInfo(const QList<double> &info);
328 
329  /** DBUS interface function.
330  * Reset mount model if supported by the mount.
331  * @return true if the command is executed successfully, false otherwise.
332  */
333  Q_INVOKABLE Q_SCRIPTABLE bool resetModel();
334 
335  /** DBUS interface function.
336  * Can mount park?
337  */
338  Q_INVOKABLE Q_SCRIPTABLE bool canPark();
339 
340  /** DBUS interface function.
341  * Park mount
342  */
343  Q_INVOKABLE Q_SCRIPTABLE bool park();
344 
345  /** DBUS interface function.
346  * Unpark mount
347  */
348  Q_INVOKABLE Q_SCRIPTABLE bool unpark();
349 
350  /** DBUS interface function.
351  * Return parking status of the mount.
352  */
353  //Q_INVOKABLE Q_SCRIPTABLE ParkingStatus getParkingStatus();
354 
356 
357  Q_INVOKABLE void setJ2000Enabled(bool enabled);
358 
359  /** @}*/
360 
361  Q_INVOKABLE void findTarget();
362 
363  // target coord conversions for displaying
364  Q_INVOKABLE bool raDecToAzAlt(QString qsRA, QString qsDec);
365  Q_INVOKABLE bool raDecToHaDec(QString qsRA);
366  Q_INVOKABLE bool azAltToRaDec(QString qsAz, QString qsAlt);
367  Q_INVOKABLE bool azAltToHaDec(QString qsAz, QString qsAlt);
368  Q_INVOKABLE bool haDecToRaDec(QString qsHA);
369  Q_INVOKABLE bool haDecToAzAlt(QString qsHA, QString qsDec);
370 
371  // Center mount in Sky Map
372  Q_INVOKABLE void centerMount();
373 
374  // Get list of scopes
375  //QJsonArray getScopes() const;
376 
377  /**
378  * @brief Check if a meridian flip if necessary.
379  * @param lst local sideral time
380  * @return true if a meridian flip is necessary
381  */
382  bool checkMeridianFlip(dms lst);
383 
384  /*
385  * @brief Execute a meridian flip if necessary.
386  * @return true if a meridian flip was necessary
387  */
388  Q_INVOKABLE bool executeMeridianFlip();
389 
390  Q_INVOKABLE void setUpDownReversed(bool enabled);
391  Q_INVOKABLE void setLeftRightReversed(bool enabled);
392 
393  QString meridianFlipStatusDescription()
394  {
395  return meridianFlipStatusText->text();
396  }
397 
398  ///
399  /// \brief meridianFlipStatusString
400  /// \param status
401  /// \return return the string for the status
402  ///
403  static QString meridianFlipStatusString(MeridianFlipStatus status);
404 
405  public slots:
406 
407  /**
408  * @brief syncTelescopeInfo Update telescope information to reflect any property changes
409  */
410  void syncTelescopeInfo();
411  /**
412  * @brief updateNumber Update number properties under watch in the mount module
413  * @param nvp pointer to number property
414  */
415  void updateNumber(INumberVectorProperty *nvp);
416 
417  /**
418  * @brief updateSwitch Update switch properties under watch in the mount module
419  * @param svp pointer to switch property
420  */
421  void updateSwitch(ISwitchVectorProperty *svp);
422 
423 
424  /**
425  * @brief updateText Update text properties under watch in the mount module
426  * @param tvp pointer to text property
427  */
428  void updateText(ITextVectorProperty *tvp);
429 
430  /**
431  * @brief updateLog Update mount module log to include any messages arriving for the telescope driver
432  * @param messageID ID of the new message
433  */
434  void updateLog(int messageID);
435 
436  /**
437  * @brief updateTelescopeCoords is triggered by the ISD::Mount::newCoord() event and updates the displayed
438  * coordinates of the mount and to ensure mount is within altitude limits if the altitude limits are enabled.
439  * The frequency of this update depends on the REFRESH parameter of the INDI mount device.
440  * @param position latest coordinates the mount reports it is pointing to
441  * @param pierSide pierSide
442  * @param ha hour angle of the latest coordinates
443  */
444  void updateTelescopeCoords(const SkyPoint &position, ISD::Mount::PierSide pierSide, const dms &ha);
445 
446  /**
447  * @brief move Issues motion command to the mount to move in a particular direction based the request NS and WE values
448  * @param command Either ISD::Mount::MOTION_START (0) or ISD::Mount::MOTION_STOP (1)
449  * @param NS is either -1 for no direction, or ISD::Mount::MOTION_NORTH (0), or ISD::Mount::MOTION_SOUTH (1)
450  * @param WE is either -1 for no direction, or ISD::Mount::MOTION_WEST (0), or ISD::Mount::MOTION_EAST (1)
451  */
452  void motionCommand(int command, int NS, int WE);
453 
454  /**
455  * @brief Send a guide pulse to the telescope.
456  * @param ra_dir RA guide direction
457  * @param ra_msecs duration of the RA guiding pulse in milliseconds
458  * @param dec_dir dec guide direction
459  * @param dec_msecs duration of the DEC guiding pulse in milliseconds
460  */
461  void doPulse(GuideDirection ra_dir, int ra_msecs, GuideDirection dec_dir, int dec_msecs);
462 
463  /**
464  * @brief save Save telescope focal length and aperture in the INDI telescope driver configuration.
465  */
466  void save();
467 
468  /**
469  * @brief saveLimits Saves altitude limit to the user options and updates the INDI telescope driver limits
470  */
471  void saveLimits();
472 
473  /**
474  * @brief enableAltitudeLimits Enable or disable altitude limits
475  * @param enable True to enable, false to disable.
476  */
477  void enableAltitudeLimits(bool enable);
478 
479  /**
480  * @brief enableAltLimits calls enableAltitudeLimits(true). This function is mostly used to enable altitude limit after a meridian flip is complete.
481  */
482  void enableAltLimits();
483 
484  /**
485  * @brief disableAltLimits calls enableAltitudeLimits(false). This function is mostly used to disable altitude limit once a meridial flip process is started.
486  */
487  void disableAltLimits();
488 
489  /**
490  * @brief enableHourAngleLimits Enable or disable hour angle limits
491  * @param enable True to enable, false to disable.
492  */
493  void enableHourAngleLimits(bool enable);
494 
495  /**
496  * @brief enableHaLimits calls enableHourAngleLimits(true). This function is mostly used to enable hour angle limit after a meridian flip is complete.
497  */
498  void enableHaLimits();
499 
500  /**
501  * @brief disableAltLimits calls enableHourAngleLimits(false). This function is mostly used to disable altitude limit once a meridial flip process is started.
502  */
503  void disableHaLimits();
504 
505  bool setScopeConfig(int index);
506 
507  void toggleMountToolBox();
508 
509  void meridianFlipStatusChanged(MeridianFlipStatus status);
510 
511  /**
512  * @brief set meridian flip activation and hours
513  * @param activate true iff the meridian flip should be executed
514  * @param hours angle past the meridian when the flip should be delayed
515  */
516  void setMeridianFlipValues(bool activate, double hours);
517 
518  /**
519  * @brief React upon status changes of the polar alignment - mainly to
520  * avoid meridian flips happening during polar alignment.
521  */
522  void paaStageChanged(int stage);
523 
524  /**
525  * @brief registerNewModule Register an Ekos module as it arrives via DBus
526  * and create the appropriate DBus interface to communicate with it.
527  * @param name of module
528  */
529  void registerNewModule(const QString &name);
530 
531  /**
532  * @brief gotoTarget Slew to target coordinates.
533  * @param target Target
534  * @return True if slew successful, false otherwise.
535  */
536  bool gotoTarget(const SkyPoint &target);
537 
538  /**
539  * @brief syncAxisReversed Update Mount Control GUI on the reverse motion toggled state.
540  * @param axis RA (left/right) or DE (up/down)
541  * @param reversed True if reversed, false otherwise.
542  */
543  void syncAxisReversed(INDI_EQ_AXIS axis, bool reversed);
544 
545  /**
546  * @brief stopTimers Need to stop update timers when profile is disconnected
547  * but due to timing and race conditions, the timers can trigger an invalid access
548  * to INDI device.
549  */
550  void stopTimers();
551 
552  private slots:
553  void startParkTimer();
554  void stopParkTimer();
555  void startAutoPark();
556 
557  void meridianFlipSetupChanged();
558 
559  signals:
560  void newLog(const QString &text);
561  /**
562  * @brief Update event with the current telescope position
563  * @param position mount position. Independent from the mount type,
564  * the EQ coordinates(both JNow and J2000) as well as the alt/az values are filled.
565  * @param pierside for GEMs report the pier side the scope is currently (PierSide::PIER_WEST means
566  * the mount is on the western side of the pier pointing east of the meridian).
567  * @param ha current hour angle
568  */
569  void newCoords(const SkyPoint &position, ISD::Mount::PierSide pierSide, const dms &ha);
570  /**
571  * @brief The mount has finished the slew to a new target.
572  * @param currentCoords exact position where the mount is positioned
573  */
574  void newTarget(SkyPoint &currentCoord);
575 
576  /**
577  * @brief The mount has finished the slew to a new target.
578  * @param Name Name of object, if any, the mount is positioned at.
579  */
580  void newTargetName(const QString &name);
581  /**
582  * @brief Change in the mount status.
583  */
584  void newStatus(ISD::Mount::Status status);
585  void newParkStatus(ISD::ParkStatus status);
586  void pierSideChanged(ISD::Mount::PierSide side);
587  void slewRateChanged(int index);
588  void ready();
589  void newMeridianFlipStatus(MeridianFlipStatus status);
590  void newMeridianFlipText(const QString &text);
591 
592  private:
593  void syncGPS();
594  void setScopeStatus(ISD::Mount::Status status);
595  MeridianFlipStatus m_MFStatus = FLIP_NONE;
596  void setMeridianFlipStatus(MeridianFlipStatus status);
597  void meridianFlipStatusChangedInternal(MeridianFlipStatus status);
598  QString pierSideStateString();
599  void setupParkUI();
600 
601  // A meridian flip requires a slew of 180 degrees in the hour angle axis so will take at least
602  // the time for that, currently set to 20 seconds
603  // not reliable for pointing state change detection but reported if the pier side is unknown
604  QDateTime minMeridianFlipEndTime;
605  int minMeridianFlipDurationSecs = 20;
606 
607  double flipDelayHrs = 0.0; // delays the next flip attempt if it fails
608 
609  QPointer<QDBusInterface> captureInterface { nullptr };
610 
611  ISD::Mount *m_Mount {nullptr};
612  QList<ISD::Mount *> m_Mounts;
613  ISD::GPS *m_GPS {nullptr};
614  QList<ISD::GPS*> m_GPSes;
615 
616  QStringList m_LogText;
617  SkyPoint *currentTargetPosition {nullptr};
618  SkyPoint telescopeCoord;
619  QString lastNotificationMessage;
620 
621  // Auto Park
622  QTimer autoParkTimer;
623 
624  // Limits
625  int m_AbortDispatch {-1};
626  bool m_AltitudeLimitEnabled {false};
627  double m_LastAltitude {0};
628  bool m_HourAngleLimitEnabled {false};
629  double m_LastHourAngle {0};
630 
631  // GPS
632  bool GPSInitialized = {false};
633 
634  ISD::Mount::Status m_Status = ISD::Mount::MOUNT_IDLE;
635  ISD::ParkStatus m_ParkStatus = ISD::PARK_UNKNOWN;
636 
637  QQuickView *m_BaseView = nullptr;
638  QQuickItem *m_BaseObj = nullptr;
639  QQmlContext *m_Ctxt = nullptr;
640 
641  QQuickItem *m_SpeedSlider = nullptr, *m_SpeedLabel = nullptr,
642  *m_raValue = nullptr, *m_deValue = nullptr, *m_azValue = nullptr,
643  *m_altValue = nullptr, *m_haValue = nullptr, *m_zaValue = nullptr,
644  *m_targetText = nullptr, *m_targetRAText = nullptr,
645  *m_targetDEText = nullptr, *m_Park = nullptr, *m_Unpark = nullptr,
646  *m_statusText = nullptr, *m_J2000Check = nullptr,
647  *m_JNowCheck = nullptr, *m_equatorialCheck = nullptr,
648  *m_horizontalCheck = nullptr, *m_haEquatorialCheck = nullptr,
649  *m_leftRightCheck = nullptr, *m_upDownCheck = nullptr;
650 };
651 }
652 
653 
654 #endif // Mount
Q_INVOKABLE void setTrackEnabled(bool enabled)
DBUS interface function.
Definition: mount.cpp:1990
Q_OBJECTQ_OBJECT
void stopTimers()
stopTimers Need to stop update timers when profile is disconnected but due to timing and race conditi...
Definition: mount.cpp:2068
Q_SCRIPTABLE SkyPoint currentTarget()
DBUS interface function.
Definition: mount.cpp:1608
Q_PROPERTY(...)
void save()
save Save telescope focal length and aperture in the INDI telescope driver configuration.
Definition: mount.cpp:1006
void newCoords(const SkyPoint &position, ISD::Mount::PierSide pierSide, const dms &ha)
Update event with the current telescope position.
Q_SCRIPTABLE void setHourAngleLimitEnabled(bool enable)
DBUS interface function.
Definition: mount.cpp:1174
double hourAngle
Mount::hourAngle.
Definition: mount.h:46
Q_SCRIPTABLE Q_NOREPLY void setAltitudeLimits(QList< double > limits)
DBUS interface function.
Definition: mount.cpp:1148
Supports controlling INDI telescope devices including setting/retrieving mount properties,...
Definition: mount.h:31
void disableHaLimits()
disableAltLimits calls enableHourAngleLimits(false).
Definition: mount.cpp:1131
void updateSwitch(ISwitchVectorProperty *svp)
updateSwitch Update switch properties under watch in the mount module
Definition: mount.cpp:949
Q_INVOKABLE Q_SCRIPTABLE bool abort()
DBUS interface function.
Definition: mount.cpp:1667
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:70
Q_INVOKABLE Q_SCRIPTABLE bool syncTarget(const QString &target)
DBUS interface function.
Definition: mount.cpp:1207
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
bool addMount(ISD::Mount *device)
addMount Add a new Mount device
Definition: mount.cpp:267
Q_CLASSINFO(Name, Value)
Q_INVOKABLE Q_SCRIPTABLE bool resetModel()
DBUS interface function.
Definition: mount.cpp:1960
static QString meridianFlipStatusString(MeridianFlipStatus status)
meridianFlipStatusString
Definition: mount.cpp:2157
void enableHourAngleLimits(bool enable)
enableHourAngleLimits Enable or disable hour angle limits
Definition: mount.cpp:1116
void updateTelescopeCoords(const SkyPoint &position, ISD::Mount::PierSide pierSide, const dms &ha)
updateTelescopeCoords is triggered by the ISD::Mount::newCoord() event and updates the displayed coor...
Definition: mount.cpp:599
Q_SCRIPTABLE void setAltitudeLimitsEnabled(bool enable)
DBUS interface function.
Definition: mount.cpp:1154
void paaStageChanged(int stage)
React upon status changes of the polar alignment - mainly to avoid meridian flips happening during po...
Definition: mount.cpp:882
void updateLog(int messageID)
updateLog Update mount module log to include any messages arriving for the telescope driver
Definition: mount.cpp:970
Q_SCRIPTABLE Q_NOREPLY void setHourAngleLimit(double limit)
DBUS interface function.
Definition: mount.cpp:1169
void updateNumber(INumberVectorProperty *nvp)
updateNumber Update number properties under watch in the mount module
Definition: mount.cpp:814
void enableAltitudeLimits(bool enable)
enableAltitudeLimits Enable or disable altitude limits
Definition: mount.cpp:1074
Q_SCRIPTABLE void setAutoParkEnabled(bool enable)
setAutoParkEnabled Toggle Auto Park
Definition: mount.cpp:2040
void newTarget(SkyPoint &currentCoord)
The mount has finished the slew to a new target.
Q_INVOKABLE Q_SCRIPTABLE bool park()
DBUS interface function.
Definition: mount.cpp:1756
void newStatus(ISD::Mount::Status status)
Change in the mount status.
Q_SCRIPTABLE double initialHA()
DBUS interface function.
Definition: mount.h:284
void motionCommand(int command, int NS, int WE)
move Issues motion command to the mount to move in a particular direction based the request NS and WE...
Definition: mount.cpp:984
QString join(const QString &separator) const const
Q_INVOKABLEQ_INVOKABLE
void syncAxisReversed(INDI_EQ_AXIS axis, bool reversed)
syncAxisReversed Update Mount Control GUI on the reverse motion toggled state.
Definition: mount.cpp:2194
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:37
Q_SCRIPTABLE void setAutoParkDailyEnabled(bool enabled)
setAutoParkDailyEnabled toggles everyday Auto Park
Definition: mount.cpp:2048
bool checkMeridianFlip(dms lst)
Check if a meridian flip if necessary.
Definition: mount.cpp:1311
void newTargetName(const QString &name)
The mount has finished the slew to a new target.
Q_INVOKABLE Q_SCRIPTABLE bool slew(double RA, double DEC)
DBUS interface function.
Definition: mount.cpp:1267
void setMeridianFlipValues(bool activate, double hours)
set meridian flip activation and hours
Definition: mount.cpp:870
Q_INVOKABLE Q_SCRIPTABLE bool sync(double RA, double DEC)
DBUS interface function.
Definition: mount.cpp:1659
void enableAltLimits()
enableAltLimits calls enableAltitudeLimits(true).
Definition: mount.cpp:1102
void disableAltLimits()
disableAltLimits calls enableAltitudeLimits(false).
Definition: mount.cpp:1109
void doPulse(GuideDirection ra_dir, int ra_msecs, GuideDirection dec_dir, int dec_msecs)
Send a guide pulse to the telescope.
Definition: mount.cpp:1000
void enableHaLimits()
enableHaLimits calls enableHourAngleLimits(true).
Definition: mount.cpp:1124
void updateText(ITextVectorProperty *tvp)
updateText Update text properties under watch in the mount module
Definition: mount.cpp:575
Q_INVOKABLE Q_SCRIPTABLE bool unpark()
DBUS interface function.
Definition: mount.cpp:1764
Q_SCRIPTABLE void setAutoParkStartup(QTime startup)
setAutoParkStartup Set time when automatic parking is activated.
Definition: mount.cpp:2053
void registerNewModule(const QString &name)
registerNewModule Register an Ekos module as it arrives via DBus and create the appropriate DBus inte...
Definition: mount.cpp:564
Q_SCRIPTABLE Q_NOREPLY void setTelescopeInfo(const QList< double > &info)
DBUS interface function.
Definition: mount.cpp:1731
void saveLimits()
saveLimits Saves altitude limit to the user options and updates the INDI telescope driver limits
Definition: mount.cpp:1065
void syncTelescopeInfo()
syncTelescopeInfo Update telescope information to reflect any property changes
Definition: mount.cpp:445
bool addGPS(ISD::GPS *device)
addGPS Add a new GPS device
Definition: mount.cpp:338
Q_INVOKABLE Q_SCRIPTABLE bool gotoTarget(const QString &target)
DBUS interface function.
Definition: mount.cpp:1189
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 04:04:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.